Verify Virtual Lab Configuration from Designer

Prerequisite: Create a virtual lab, as described in Run Virtual Lab from Designer.

When you add your first Service Model or Application Model to your virtualization project, a virtual lab with a default JSON configuration file is created automatically.

Both the lab and configuration file are used by all of the models in the project.

To modify the configuration file:

In the Virtualization Explorer, double-click Lab Configuration.

About the configuration file

Every Lab has a unique id and an optional displayName. To start the Lab with the correct Application Model, you specify the applicationModelId.

 "virtualLab": [
  {
    "id": "virtual-lab:30000",
    "displayName": "Hello Lab",
    "applicationModelId": "HelloApplicationModel"
  }
]

The next configuration section is related to Connectors, which provide connectivity to virtual services.

 "connector": [
  {
    "id": "connector",
    "connectorType": "httpGateway",
    "properties": {
      "bindPort": 30000
    }
  }
]

And finally there is a section dedicated to virtual service instances. In this section are specified service endpoints and service mode. Available service modes are:

  • FORWARD_TO_REAL_SERVICE
  • INVOKE_REAL_SERVICE
  • SIMULATE_SERVICE
 "virtualServiceInstance": [
  {
    "virtualServiceId": "HelloServiceModel.RestServiceInterface",
    "serviceMode": "SIMULATE_SERVICE",
    "endpoints": [
      {
        "properties": {
          "httpVirtualPath": "/"
        },
        "requestConnectorId": "connector",
        "responseConnectorId": "connector",
        "realRequestConnectorId": "connector",
        "realResponseConnectorId": "connector"
      }
    ]
  }
]

Back to top

See also: