Unsupported content

 

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

service

This topic describes the following verbs command-line arguments, and API parameters available for the service noun in the BMC Cloud Lifecycle Management SDK:

create

Use service-create from the command line to create a service from the specified offering.

Command-line syntax
clm service-create [-h] [--waitfor TIME_OUT_SECONDS] [--onbehalfuser USERNAME] 
[--option OPTION_NAME=CHOICE_NAME [OPTION_NAME=CHOICE_NAME ...]] 
[--param PARAM_NAME=PARAM_VALUE [PARAM_NAME=PARAM_VALUE ...]] 
[--decommissiondate YYYY-MM-DD|Nd] --offeringname NAME --servicename NAME 
[--quantity [NUMBER]] --serverusername USERNAME 
--serverpassword PASSWORD --serverhostprefix SERVERHOSTPREFIX 
--tenantname NAME

(4.1.00 patch 5 and later)
clm service-create [-h] [--waitfor TIME_OUT_SECONDS] [--onbehalfuser USERNAME] 
[--option OPTION_NAME=CHOICE_NAME [OPTION_NAME=CHOICE_NAME ...]] 
[--param PARAM_NAME=PARAM_VALUE [PARAM_NAME=PARAM_VALUE ...]] 
[--decommissiondate YYYY-MM-DD|Nd] --offeringname NAME --servicename NAME 
[--quantity [NUMBER]] --serverusername USERNAME 
--serverpassword PASSWORD --serverhostprefix SERVERHOSTPREFIX 
--tenantname NAME [--usetemplatecredentials]

Use service_create in the API to create a service from the specified offering. This command returns a ServiceOfferingInstance API object with the same attributes and relationships.

API syntax
obj = service_create(gcac, offeringName=None, serviceName=None, 
quantity=1, userName=None, password=None, hostNamePrefix=None, 
tenantName=None, options=None, params=None, decommissiondate=None)

obj.guid # returns the GUID
obj.name # returns the name
...
Command-line argumentAPI parameterDescriptionRequired?
--offeringnameofferingNameName of the offering to use for the new service.Yes
--servicenameserviceNameName of the new service.Yes
--serverusernameuserNameUser name with administrator access on the servers to configure.Yes
--serverpasswordpassword

Password for the administrator user.

Note: Ensure that you specify the password in the correct format based on the provider type before running the SDK command.

  • For AWS, VMware, and Azure providers: If the password is in plain text, add the prefix "plaintext:" to your password. For example, "plaintext:myclmpassword"
  • For vCloud Director (vCD) and BMC Database Automation providers: Specify an encrypted password
  • For Public Platform as a Service (PaaS) providers: Specify only the password; do not add a prefix. For example, "myclmpassword"
Yes
--serverhostprefixhostNamePrefixHostname prefix to use for all servers created for this service.Yes
--tenantnametenantNameName of the tenant for the new service.Yes
--optionoptionKey and value of an option and choice. 
--paramparamKey and value of a parameter name and value. 
--decommissiondatedecommissiondateDate in YYYY-MM-DD or Nd format, where Nd indicates how many days after the present day. 
--quantityquantityNumber of services to create. 
--onbehalfuser Perform the action as the specified user name. 
--waitfor 

Time in seconds to wait for a response from the server, otherwise return running task details.

 
--usetemplatecredentials
 (4.1 patch 5 and later)  If it is set to true, default user credentials are used from the template.
 
 gcacGenericCloudAPIClient instance/user authentication. 

Back to top

delete

Use service-delete from the command line to delete the specified service.

Command-line syntax
clm service-delete [-h] [--waitfor TIME_OUT_SECONDS] 
[--decommissiondate YYYY-MM-DD|Nd] --servicename NAME

Use service_delete in the API to delete the specified service. This command returns a ServiceOfferingInstance API object with the same attributes and relationships.

API syntax
obj = service_delete(gcac, serviceName=None, 
decommissiondate=None)

obj.guid # returns the GUID
obj.name # returns the name
...
Command-line argumentAPI parameterDescriptionRequired?
--servicenameserviceNameName of the service to delete.Yes
--decommissiondatedecommissiondateDate in YYYY-MM-DD or Nd format, where Nd indicates how many days after the present day. 
--waitfor 

Time in seconds to wait for a response from the server, otherwise return running task details.

 
 gcacGenericCloudAPIClient instance/user authentication. 

Back to top

list

Use service-list from the command line to list available services.

Command-line syntax
clm service-list [-h] [-l] [-u] [-n] [-s] 
[-k FIELD_NAME [FIELD_NAME ...]] 
[--filter FIELD_NAME=VALUE [FIELD_NAME=VALUE ...]]

Use service_list in the API to list available services. This command returns a list of ServiceOfferingInstance API objects with the same attributes and relationships.

API syntax
obj = service_list(gcac, filters=None)

obj[n].guid returns the GUID
obj[n].name returns the name
...
Command-line argumentAPI parameterDescriptionRequired?
-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 in the value for this parameter. 
--filterfiltersList the output that matches the specified filters. 
 gcacGenericCloudAPIClient instance/user authentication. 

Back to top

offboard

Use service-offboard from the command line to offboard the specified service.

Command-line syntax
clm service-offboard [-h] [--waitfor TIME_OUT_SECONDS] 
--servicename NAME --retainvm {True,False}

Use service_offboard in the API to offboard the specified service. This command returns a ServiceOfferingInstance API object with the same attributes and relationships.

API syntax
obj = service_offboard(gcac, serviceName=None, 
retainVM=None)

obj.guid # returns the GUID
obj.name # returns the name
...
Command-line argumentAPI parameterDescriptionRequired?
--servicenameserviceNameName of the service to offboard.Yes
--retainvmretainVM

Indicate whether to keep the servers for this service enrolled in their provider after the service is offboarded. The value can be True or False.

Yes
--waitfor 

Time in seconds to wait for a response from the server, otherwise return running task details.

 
 gcacGenericCloudAPIClient instance/user authentication. 

Back to top

onboard

Use service-onboard from the command line to onboard the specified server as a new service.

clm service-onboard [-h] [--waitfor TIME_OUT_SECONDS] 
[--providername NAME] --environmentname NAME --offeringname NAME 
--tenantname NAME --ownername USERNAME --virtualcentername NAME 
--virtualguestname NAME

Use service_onboard in the API to onboard the specified server as a new service. This command returns a ServiceOfferingInstance API object with the same attributes and relationships.

API syntax
obj = service_onboard(gcac, tenantName=None, ownerName=None, 
providerName=None, environmentName=None, offeringName=None, 
virtualCenterName=None, virtualGuestName=None)

obj.guid # returns the GUID
obj.name # returns the name
...
Command-line argumentAPI parameterDescriptionRequired?
--environmentnameenvironmentNameName of the environment of the server. To discover the environment name use the environment-list command.Yes
--offeringnameofferingNameName of the offering to associate with the new service.Yes
--tenantnametenantNameName of the service owner's tenant.Yes
--ownernameownerNameName of the service owner.Yes
--virtualcenternamevirtualCenterNameName of the VMWare vCenter host to onboard.Yes
--virtualguestnamevirtualGuestNameName of the virtual guest or virtual machine to onboard.Yes
--providernameproviderNameName of the provider of the server. 
--waitfor 

Time in seconds to wait for a response from the server, otherwise return running task details.

 
 gcacGenericCloudAPIClient instance/user authentication. 

Back to top

refresh

Use service-refresh from the command line to synchronize the states of all servers in the specified service to make them current with their actual configuration.

Command-line syntax
clm service-refresh [-h] [--waitfor TIME_OUT_SECONDS] 
--servicename NAME

Use service_refresh in the API to synchronize the states of all servers in the specified service to make them current with their actual configuration. This command returns a ServiceOfferingInstance API object with the same attributes and relationships.

API syntax
obj = service_refresh(gcac, service_name=None)

obj.guid # returns the GUID
obj.name # returns the name
...
Command-line argumentAPI parameterDescriptionRequired?
--servicenameservice_nameName of the service to refresh.Yes
--waitfor 

Time in seconds to wait for a response from the server, otherwise return running task details.

 
 gcacGenericCloudAPIClient instance/user authentication. 

Back to top

restart

Starting with version 4.1 patch 5 and later, use service-restart from the command line to restart all the servers in the specified service.

Command-line syntax
clm service-restart [-h] [--waitfor TIME_OUT_SECONDS] 
--servicename NAME

Use service_restart in the API to restart all servers in the specified service. This command returns a ServiceOfferingInstance API object with the same attributes and relationships.

API syntax
obj = service_restart(gcac, service_name=None)

obj.guid # returns the GUID
obj.name # returns the name
...
Command-line argumentAPI parameterDescriptionRequired?
--servicenameservice_nameName of the service to restart.Yes
--waitfor 

Time in seconds to wait for a response from the server, otherwise return running task details.

 
 gcacGenericCloudAPIClient instance/user authentication. 

Back to top

share

Use service-share from the command line to share a service with multiple users.

Command-line syntax
clm service-share [-h] [--waitfor TIME_OUT_SECONDS] 
--service NAME|id:<GUID> --user NAME|id:<GUID> 
[NAME|id:<GUID> ...]

Use service_share in the API to share a service with multiple users. This command returns a ServiceOfferingInstance API object with the same attributes and relationships.

API syntax
obj = service_share(gcac, service=None, user_list=None)

obj.guid # returns the GUID
obj.name # returns the name
...
Command-line argumentAPI parameterDescriptionRequired?
--serviceserviceName or GUID of the service to share.Yes
--useruserNames or GUIDs of the users to share the specified service.Yes
 gcacGenericCloudAPIClient instance/user authentication. 

Back to top

start

Use service-start from the command line to start the specified service and all of its servers.

Command-line syntax
clm service-start [-h] [--waitfor TIME_OUT_SECONDS] 
--servicename NAME

Use service_start in the API to start the specified service and all of its servers. This command returns a ServiceOfferingInstance API object with the same attributes and relationships.

API syntax
obj = service_start(gcac, serviceName=None)

obj.guid # returns the GUID
obj.name # returns the name
...
Command-line argumentAPI parameterDescriptionRequired?
--servicenameserviceNameName of the service to start.Yes
--waitfor 

Time in seconds to wait for a response from the server, otherwise return running task details.

 
 gcacGenericCloudAPIClient instance/user authentication. 

Back to top

stop

Use service-stop from the command line to stop the specified service and all of its servers.

Command-line syntax
clm service-stop [-h] [--waitfor TIME_OUT_SECONDS] 
--servicename NAME

(4.1.00 patch 5 and later)
clm service-stop [-h] [--waitfor TIME_OUT_SECONDS] 
--servicename NAME [--force]

Use service_stop in the API to stop the specified service and all of its servers. This command returns a ServiceOfferingInstance API object with the same attributes and relationships.

API syntax
obj = service_stop(gcac, serviceName=None)
# force = True/False
# if set to True, it will stop the service and all servers
in it, else it will shutdown the specified service
obj.guid # returns the GUID
obj.name # returns the name
...
Command-line argumentAPI parameterDescriptionRequired?
--servicenameserviceNameName of the service to stop.Yes
--waitfor 

Time in seconds to wait for a response from the server, otherwise return running task details.

 
--force
 (4.1 patch 5 and later) If it is set to true, the service is stopped, otherwise, the service is shutdown. 
 gcacGenericCloudAPIClient instance/user authentication. 

Back to top

transfer

Use service-transfer from the command line to transfer ownership of a service to another user.

Command-line syntax
clm service-transfer [-h] [--waitfor TIME_OUT_SECONDS] 
--servicename NAME --touser USERNAME --totenant NAME

Use service_transfer in the API to transfer ownership of a service to another user. This command returns a ServiceOfferingInstance API object with the same attributes and relationships.

API syntax
obj = service_transfer(gcac, service_name=None, to_user=None, to_tenant=None)

obj.guid # returns the GUID
obj.name # returns the name
...
Command-line argumentAPI parameterDescriptionRequired?
--servicenameservice_nameName of the service to transfer.Yes
--touserto_userUser name of the new owner.Yes
--totenantto_tenantName of the new owner's tenant.Yes
--waitfor 

Time in seconds to wait for a response from the server, otherwise return running task details.

 
 gcacGenericCloudAPIClient instance/user authentication. 

Back to top

unshare

Use service-unshare from the command line to remove service sharing of a service for the specified users.

Command-line syntax
clm service-unshare [-h] [--waitfor TIME_OUT_SECONDS] 
--service NAME|id:<GUID> --user NAME|id:<GUID> 
[NAME|id:<GUID> ...]

Use service_unshare in the API to remove service sharing of a service for the specified users. This command returns a ServiceOfferingInstance API object with the same attributes and relationships.

API syntax
obj = service_unshare(gcac, service=None, 
user_list=None)

obj.guid # returns the GUID
obj.name # returns the name
...
Command-line argumentAPI parameterDescriptionRequired?
--serviceserviceName or GUID of the service.Yes
--useruserNames or GUIDs of the users to remove from sharing the specified serviceYes
 gcacGenericCloudAPIClient instance/user authentication. 

Back to top

update-option

Use service-update-option from the command line to update a service with the specified option.

Command-line syntax
(4.1.00 upto 4.1.00 patch 3)
clm service-update-option [-h] [--waitfor TIME_OUT_SECONDS] 
[--param PARAM_NAME=PARAM_VALUE [PARAM_NAME=PARAM_VALUE ...]] 
--servicename NAME --actionname NAME --servername NAME|id:<GUID> 
--option OPTION_NAME=CHOICE_NAME [OPTION_NAME=CHOICE_NAME ...]

(4.1.00 patch 4 and later)
clm service-update-option [-h] [--waitfor TIME_OUT_SECONDS] 
[--param PARAM_NAME=PARAM_VALUE [PARAM_NAME=PARAM_VALUE ...]] 
--servicename NAME --actionname NAME --servername NAME|id:<GUID> 
--option OPTION_NAME=CHOICE_NAME [OPTION_NAME=CHOICE_NAME ...] 
--disk <diskname/id:guid>

The following code snippet shows a sample service-update-option SDK call:

Command-line example
clm service-update-option --verbose --servicename 
SP_Requestable_Offering-8 --actionname "Resize Disk" 
--servername UPG-SP-1 --option "Resize Disk=14 GB" 
--disk Disk2

Use service_update in the API to update a service with the specified option. This command returns a ServiceOfferingInstance API object with the same attributes and relationships.

API syntax
(4.1.00 upto 4.1.00 patch 3)
obj = service_update(gcac, service_name=None, server_name=None, 
action_name=None options=None, params=None)

obj.guid # returns the GUID
obj.name # returns the name
...

(4.1.00 patch 4 and later)
obj = service_update(gcac, service_name=None, server_name=None, 
action_name=None options=None, params=None, disk=None)

obj.guid # returns the GUID
obj.name # returns the name
...
Command-line argumentAPI parameterDescriptionRequired?
--disk
disk

(4.1 patch 4 and later) Disk name or GUID of the disk on the server.

No
--servicenameservice_nameName of the service to update.Yes
--actionnameaction_nameName of an action to update.Yes
--servernameserver_nameName of the server to update.Yes
--optionoptionKey and value of an option and choice.Yes
--paramparamKey and value of a parameter name and value. 
--waitfor 

Time in seconds to wait for a response from the server, otherwise return running task details.

 
 gcacGenericCloudAPIClient instance/user authentication. 

Back to top

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Comments