ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Not able create Virtual Service with Live Invocation using Invoke API (Curl Command)

book

Article ID: 227687

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

I would like create Virtual Service with Live Invocation using Invoke API (Curl Command), but could not find this option in config. 

My requirement is, create and deploy Virtual Service with Live Invocation Step and which should include different executions modes like (Pass requests to the live system (Live Invocation) and Fall through to live system if no virtualized response (Stand In) ..etc).

What are the parameters for all available execution modes in Config?

 

Environment

Release : 10.6

Component : DevTest API

Resolution

Step process:

  1. Create VS with v3 API and config that has target Endpoint
  2. Change mode using Lisa Invoke API:         PUT 'http://DevTestRegistry:1505/api/Dcm/VSEs/VseServer/VsNAme' \ --header 'Content-Type: application/vnd.ca.lisaInvoke.virtualService+xml' \ --header 'Authorization: Basic c3Zwb3dlcjpzdnBvd2Vy' \ --header 'Cookie: JSESSIONID=10tu9fooo92t1127qs211gisol' \ --data-raw '<VirtualService xmlns="http://www.ca.com/lisa/invoke/v2.0" name="A1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ca.com/lisa/invoke/v2.0VirtualService.xsd" href="http://localhost:1505/api/Dcm/VSEs/VSE/A1" type="application/vnd.ca.lisaInvoke.virtualService+xml"> <ExecutionMode>Live System</ExecutionMode> </VirtualService>'

 

{
"virtualService": {
"version": "2",
"name": "Analyze_Live_2",
"description": "VSE_LIVE",
"status": ""
},
"transportProtocol": {
"typeId": "HTTP",
"basePath": "/",
"useGateway": true,
"duptxns": true,
"hostHeaderPassThrough": false,
"recordingEndpoint": {
"useSSL": false,
"host": "localhost",
"port": "8988"
},
"targetEndpoint": {
"host": "lABC.bpc.bbbbb.net",
"port": "8080"
}
},
"dataProtocol": {
"forRequest": true,
"typeId": "RESTDPH"
}
}