ServiceOfferingInstance onboard request
Description
This API creates a service offering instance (SOI) for an existing virtual machine (VM). The API supports Single-tier and Multi-tier service offering instances. For additional information, see Onboarding-existing-VMs-checklist.
The following constraints apply to this API:
- BMC Cloud Lifecycle Management supports the onboarding of VMware and Amazon Web Services virtual machines.
- The onboarding of Service Offering Instances can be done with two different input formats:
- Requires manual steps to enroll the servers in BMC Server Automation.
- Servers are enrolled automatically in BMC Server Automation.
- There will be no validations on whether the LogicalHostingEnvironment passed to the API is topologically correct to have connectivity between the computes as defined in the blueprint.
- You can onboard only VMs that do not have load balancers or firewalls, that is, you cannot onboard any existing load balancer entries and firewall rules. However, after the VM is onboarded, you can create firewall rules and load balancer entries for the VM.
- You can onboard a VM if the service offering that you want to use for the onboard operation exists, and it includes a requestable offering (service request definition).
- You cannot apply options when you onboard a VM. However, after the VM is onboarded, you can use options associated with the SOI.
- This API does not support onboarding VMs that have NAT IP addresses.
- The VM must be configured correctly in BMC Server Automation. For information about enrolling VMs in BMC Server Automation, see Knowledge Base article 000030942.
- The VM must be powered on.
- The VM should have the same name in both BMC Server Automation and VMware vCenter Server. If BMC Server Automation and VMware vCenter Server each use a different name for the VM, then set "name" parameter in serverObject to the name used in VMware vCenter Server. Console actions such as start, stop, decommission, modify CPU or memory, and attach or detach storage work only for onboarded service offering instances that have the same name in BMC Server Automation and VMware vCenter Server. Only the offboard service offering instance action can be done through the REST API.
- If you want the hostname value displayed as the VM name in BMC Cloud Lifecycle Management, set the BBSA_SET_VIRTUALGUESTNAME_AS_VM_HOSTNAME parameter to TRUE in the cloudservices.json file before onboarding.
- If a static IP address is already marked as reserved in BMC Network Automation IP address management (IPAM), the VM onboard process fails to reserve the static IP address. Failure to reserve a static IP address triggers a rollback of the onboarding process that frees the allocated IP address. This case occurs only when two VMs in the network have the same static IP address.
Enforced validations to this API:- The number of networks defined in the resource set in the service blueprint must be equal to the number of interfaces of the VM
- Resource set names in the API request should match to the resource set names in blueprint
- The number of Resource Sets defined in the blueprint must be equal to the number of Resource Sets passed in input for the API.
- VM should be deployed on an CLM onboarded VirtualCluster/VirtualHost/VirtualResourcePool.
- The associated VirtualCluster/VirtualHost/VirtualResourcePool of the VM, should be member of a compute pool which is attached to the Network Container passed as input argument.
- The associated datastores of the VM, should be member of a VDR pool.
- Switch ports attached to the VM should match to the switch ports of the Network Container (or POD) passed as input argument.
API stability classification
API overview
HTTP | URI | Return | Return type |
---|---|---|---|
POST | csm/ServiceOfferingInstance/onboard | void | Not applicable |
HTTP request message
Query string parameters
This API does not use query string parameters.
Request message headers
This API uses only common headers listed in HTTP-request-and-response-headers.
Request message body
This API uses the following objects in the request message body JSON.
Top-level objects
Name | Type | Multi- | Description |
---|---|---|---|
callbackURL | String | 0..1 | URL to call when the operation finishes |
postCallout | String | 0..1 | Identifier of a callout to run after the operation executes |
preCallout | String | 0..1 | Identifier of a callout to run before the operation executes |
timeout | Integer | 0..1 | Timeout setting. For more information about using the timeout, see Synchronous-and-asynchronous-operations. Timeout values: |
- 0: Immediate timeout
- -1: Uses the system default timeout value
1..*: Times out in the specified number of seconds|
operationParams1
Array of input parameters. The following table contains the list of input parameters. For information about setting up the input parameters, see Passing-input-parameters-with-an-API-request.
Input parameters to include in operationParams
Name
Type
Multi-
plicityDescription
actualVMNameString0..1
VM name used in VMware vCenter Server. Include this parameter when the name used in VMware vCenter Server is different from the name used in BMC Server Automation.
computeContainers1..*
List of ComputeContainers that are to be onboarded.
In the JSON for this parameter, the followingclass objects are used in the value object:ComputeContainer
- cloudClass(Required) — Fully qualifed name of the ComputeContainer class
serverObject(Required) – the following
class objects are used in the value object:VirtualGuest- cloudClass(Required) — Fully qualifed name of the VirtualGuest class
- externalID(Required) — URI of the VM and the VMware vCenter Server. For example: /id/SystemObject/Server/c7f77fa8-b38c-4dcc-8f94-bb7f93dd5605,/id/SystemObject/Server/11bd6400-6ed8-47ba-99cc-9c9faceb92e6
- hostName(Optional) — Name of the host used in BMC Server Automation and VMware vCenter Server. For example: MyVM
- name(Optional) — VM name used in VMware vCenter Server. It is required to include this parameter when the name used in VMware vCenter Server is different from the name used in BMC Server Automation. For example: TestVM
- provider (Required) — URI of the BMC Server Automation provider. For example: /provider/cbc4152d-b823-4d19-a916-bf73278bba8e
resourceSetObject (Required) — the following
class objects are used in the value object:ResourceSet- cloudClass(Required) — Fully qualifed name of the ResourceSet class
name(Required) — Resourceset name from the CLM blueprint. For example: Server Group 1 |
decommisionDate0..1
Date on which the service offering instance should be decommissioned
hostedResource0..1
Identifier of the infrastructure resource that hosts the VM. The identifier can be a VirtualCluster, VirtualHost, or VirtualResourcePool GUID:
- For a virtual cluster, use the identifier of the target ESX cluster.
- For a virtual resource pool, use the identifier of the resource pool.
For a virtual host, use the identifier of the target ESX server. |
LogicalHostingEnvironmentIdString1
LogicalHostingEnvironment identifier on which the Service will be onboarded
nameString0..1
Name for the new service offering instance. For example: TestSOI
networkContainerIDString1
Identifier of the network container in which to place the service offering instance
ownerString1
User name of the service offering instance owner
serviceOfferingString1
Reconciliation identifier of the service offering
serviceOfferingReconIdString1
Reconciliation identifier of the service offering
tenantString1
Name of the tenant for the service offering instance
virtualGuest1
In the JSON for this parameter, the following
class objects are used in the value object:VirtualGuest- cloudClass(Required) — Fully qualifed name of the VirtualGuest class
- externalID(Required) — URI of the VM and the VMware vCenter Server. For example: /id/SystemObject/Server/c7f77fa8-b38c-4dcc-8f94-bb7f93dd5605,/id/SystemObject/Server/11bd6400-6ed8-47ba-99cc-9c9faceb92e6
- hostName(Optional) — Name of the host used in BMC Server Automation and VMware vCenter Server. For example: MyVM
- name(Optional) — Name for the new service offering instance. For example: TestVM
- provider (Required) — URI of the BMC Server Automation provider. For example: /provider/cbc4152d-b823-4d19-a916-bf73278bba8e |
HTTP response message
Response message headers
This API uses only common headers listed in HTTP-request-and-response-headers.
Response message body
The response message body contains a Task object.
Examples
The following example shows an HTTP response to the request. The response returns a Task object because the request is still being processed and is only 95% complete.
Date: Wed, 28 Mar 2012 08:41:47 GMT
BMC-Transaction-ID: 7206a3c3-b3f1-4ce9-8eb2-7c6622b790a6
Content-Type: application/json; charset=UTF-8
Content-Length: 680
Server: Jetty(6.1.x)
[
{
"cloudClass": "com.bmc.cloud.model.beans.Task",
"className": "ServiceOfferingInstance",
"completionTime": "-1",
"creationTime": "2012/03/28 01:41:47 PDT",
"errors": [ ],
"guid": "c003cf0e-70b9-4621-b1b9-618dd297a35f",
"isCallout": false,
"isError": false,
"isSuccess": false,
"operationName": "onboard",
"parentTaskInternalUUID": "37ebe4bf-49b0-4b06-a2da-26bd4d2f1cb8",
"taskInternalUUID": "dabfd81b-ff40-49f6-8511-f1755cd27bfd",
"taskProgress": 95,
"taskState": "SUSPENDED",
"taskStatusURI": "http://10.1.8.49:8080/csm/task/dabfd81b-ff40-49f6-8511-f1755cd27bfd/status",
"taskSubState": "createResourceSets"
}
]