Start of change

Test a software services template

You can use this operation to test a software services template.

HTTP method and URI path

POST /zosmf/provisioning/rest/<version>/scc/<object-id>/actions/test
In this request
<object-id>
Identifies the software services template to be published.
<version>
Is the URI path variable <version> that identifies the version of the z/OSMF software services template service. The following value is valid: 1.0.

Query parameters

None.

Description

This operation lets you perform a test run of a software services template. The test run creates a workflow entry, starts the workflow entry, and creates a software services registry entry in being provisioned state.

On successful completion, HTTP status code 200 (Normal) is returned, indicating that the entry in the registry was created.

All approvals for a software services template must be approved before it can be tested. The software services template must be in the draft or draft approved state.

The software services template must be in the draft or draft_approved state.

Request content

The request content is expected to contain a JSON object that describes the test run. See Request content for the software services template request and Table 2.

Table 1. Request content for the test software services template request
Field name Type Required or optional Description
input-variables Array of objects Optional Array of required run-time property objects.
user-data-id String Optional ID of user-data. The user-data-id and user-data values are associated with the software services instance that is created and are returned with requests for the software services instance.
user-data String Optional User-supplied data to be associated with the software services instance. Only allowed if user-data-id is also provided.
tenant-name String Optional Required if the template is associated with more than one tenant
account-info String Optional Account information to use in the JCL JOB statement. By default, it is the account information that is associated with the tenant resource pool
Table 2. Runtime properties
Field Type Description
name String Name of the runtime property.
value String Value of the runtime property.

Authorization requirements

The user's z/OS user ID must be defined as a landlord and a domain administrator.

The user’s z/OS user ID must have READ access to the following resource profile in the ZMFAPLA class: <SAF-prefix>.ZOSMF.PROVISIONING.SOFTWARE_SERVICES.

For more information, see Authorization requirements.

HTTP status codes

On successful completion, HTTP status code 200 (Normal) is returned.

Response content

On successful completion, the service returns a response body, which contains a JSON object with details about the software services template request. Table 1 lists the fields in the JSON object.

Table 3. Response from a test software services template request
Field Type Description
registry-info Object Object mapping matching the return response body from a registry create.
workflow-info Object Object mapping matching the return response body from a workflow create.

Example HTTP interaction

Figure 1 shows a request to test a software services template.
Figure 1. Sample request to test a software services template
POST https://localhost:4444/zosmf/provisioning/rest/1.0/scc/f2cd93d7-3b13-4fa0-9fb7-d36a93c358e8/actions/test

{    
     "input-variables":[{"name":"CSQ_MQ_SSID","value":"ZCT1"},
      {"name":"CSQ_CMD_PFX","value":"!ZCT1"},{"name":"CSQ_ENVIRONMENT","value":"TEST"}],
     "tenant-name":"tenant1",    
     "user-data-id":"10252015",
     "user-data":"scout is an amazing welshie puppy"
}

The following is the response body for the request.

Figure 2. Sample response body
{
   "registry-info": {
     "object-name": "QMgr_5",
     "object-id": "1d5fbad5-11e2-4bdf-bd81-02c0e322f71f",
     "object-uri": "/zosmf/provisioning/rest/1.0/scr/1d5fbad5-11e2-4bdf-bd81-02c0e322f71f"
   },
   "workflow-info": {
     "workflowKey": "4b917e88-d2db-4819-a7a1-6403a99f65d4",
     "workflowDescription": "Procedure to provision a MQ for zOS Queue Manager",
     "workflowID": "ProvisionQueueManager",
     "workflowVersion": "1.0.1",
     "vendor": "IBM"
   }
 }

End of change