host
This topic describes the verb, command-line arguments, and API parameters available for the host noun in the BMC Cloud Lifecycle Management SDK.
list
Use host-list from the command line to list onboarded hosts.
[--filter FIELD_NAME=VALUE [FIELD_NAME=VALUE ...]]
Use host_list in the API to list onboarded hosts. This command returns a list of VirtualHost API objects with the same attributes and relationships.
obj[n].guid returns the GUID
obj[n].name returns the name
...
Command-line argument | API parameter | Description | Required? |
---|---|---|---|
-l |
| List all fields. This parameter does not need a value. |
|
-u |
| List only GUIDs. This parameter does not need a value. |
|
-n |
| List only names. This parameter does not need a value. |
|
-s |
| List GUIDs, names, and status (if applicable). This parameter does not need a value. |
|
-k |
| List the field names specified as the value for this parameter. |
|
--filter | filters | Filter the output according to the specified criteria. |
|
| gcac | GenericCloudAPIClient instance/user authentication. |
|
migrate
In BMC Cloud Lifecycle Management 4.6.05 and later, use host-migrate from the command line to migrate infrastructure resources of one or more services from a specified vCenter, cluster, or host to another. Because BMC Cloud Lifecycle Management retains only cluster information, specify the source and target clusters as input. For more information, see Synchronizing-migrated-server-infrastructure.
[--sourcecluster NAME|id:GUID] [--dryrun true/false] [--provider NAME|id:GUID]
[--destinationcluster NAME|id:GUID] [--destinationpodname NAME]
(--host NAME|id:GUID | --hostfilter ATTRIBUTENAME=ATTRIBUTEVALUE | --file CSV FORMAT FILE)
Use host_migrate in the API to migrate infrastructure resources of one or more services from a specified vCenter, cluster, or host to another.
obj.guid # returns the GUID
obj.name # returns the name
...
Command-line argument | Description | Required? |
---|---|---|
-h, --help | Show help message and exit.
|
|
--waitfor TIME_OUT_SECONDS | Time-out in seconds to wait for a response from the server; otherwise, return the running task’s details. If you enter -1 as the number of timeout seconds, the timeout will wait indefinitely. |
|
--sourcepodname NAME | Name of the pod containing the source cluster. This argument is required only if you specify NAME as a value for the --sourcecluster argument and the cluster name is not unique across vCenters. |
|
--dryrun true/false | Used for report generation. By default, it is true. |
|
--provider NAME|id:GUID | Name or GUID of the provider. Note: Currently, only BMC BladeLogic Server Automation (BBSA) is supported as a provider.
|
|
--destinationcluster NAME|id:GUID | Name or GUID of the destination cluster. This argument is used to extract destination vCenter details. --destinationcluster and --destinationpodname are required only when you migrate infrastructure across different vCenters. |
|
--destinationpodname NAME | Name of the pod containing the destination cluster. This argument is required only if you specify NAME as a value for the --destinationcluster argument. |
|
--sourcecluster NAME|id:GUID | Name or GUID of the source cluster. This argument is used to extract source vCenter details. | Yes |
--host NAME|id:GUID | Name or GUID of the host. | Yes |
--hostfilter ATTRIBUTENAME=ATTRIBUTEVALUE | Filter applicable for host to be migrated. | Yes |
--file CSV FORMAT FILE | Full path of the CSV file. | Yes |