server
This topic describes the following verbs, command-line arguments, and API parameters available for the server
noun in the BMC Cloud Lifecycle Management SDK:
list
Use server-list
from the command line to list servers for the specified service.
clm server-list [-h] [-l] [-u] [-n] [-s] [-k FIELD_NAME
[FIELD_NAME ...]] [--filter FIELD_NAME=VALUE
[FIELD_NAME=VALUE ...]] --servicename NAME
Use server_list
in the API to list servers for the specified service. This command returns a list of ComputeContainer
API objects with the same attributes and relationships.
obj = server_list(gcac, service_name, filters=None)
obj[n].guid returns the GUID
obj[n].name returns the name
...
Command-line argument | API parameter | Description | Required? |
---|---|---|---|
--servicename | service_name | Name of the service for which to list servers. | Yes |
-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. | ||
--filter | filters | List the output that matches the specified filters. | |
gcac | GenericCloudAPIClient instance/user authentication. |
refresh
Use server-refresh
from the command line to synchronize the state of the specified server to make it current with its actual configuration.
clm server-refresh [-h] [-l] [-u] [-n] [-s] [-k FIELD_NAME
[FIELD_NAME ...]] [--waitfor TIME_OUT_SECONDS]
--servicename NAME --servername NAME
Use server_refresh
in the API to synchronize the state of the specified server to make it current with its actual configuration. This command returns a ComputeContainer
API object with the same attributes and relationships.
obj = server_refresh(gcac, server_name=None,
service_name=None)
obj.guid # returns the GUID
obj.name # returns the name
...
Command-line argument | API parameter | Description | Required? |
---|---|---|---|
--servicename | service_name | Name of the service containing the server to refresh. | Yes |
--servername | server_name | Name of the server to refresh. | Yes |
-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. | ||
--waitfor | Time in seconds to wait for response from the server, otherwise return running task details. | ||
gcac | GenericCloudAPIClient instance/user authentication. |
restart
Starting with version 4.1 patch 5 and later, use server-restart
from the command line to restart a server in the specified service.
clm server-restart [-h] [--waitfor TIME_OUT_SECONDS]
--servicename NAME --servername NAME
Use server_restart
in the API to restart a server in the specified service. This command returns a ComputeContainer
API object with the same attributes and relationships.
obj = server_restart(gcac, service_name, server_name)
obj.guid # returns the GUID
obj.name # returns the name
...
Command-line argument | API parameter | Description | Required? |
---|---|---|---|
--servicename | service_name | Name of the service to restart. | Yes |
--servername | server_name | Name of the server to restart. | Yes |
--waitfor | Time in seconds to wait for a response from the server, otherwise return running task details. | ||
gcac | GenericCloudAPIClient instance/user authentication. |
start
Use server-start
from the command line to start a server in a specified service.
clm server-start [-h] [--waitfor TIME_OUT_SECONDS]
--servicename NAME --servername NAME
Use server_start
in the API to start a server in a specified service. This command returns a ComputeContainer
API object with the same attributes and relationships.
obj = server_start(gcac, service_name, server_name)
obj.guid # returns the GUID
obj.name # returns the name
...
Command-line argument | API parameter | Description | Required? |
---|---|---|---|
--servicename | service_name | Name of the service containing the server to start. | Yes |
--servername | server_name | Name of the server to start. | Yes |
--waitfor | Time in seconds to wait for response from the server, otherwise return running task details. | ||
gcac | GenericCloudAPIClient instance/user authentication. |
stop
Use server-stop
from the command line to stop a server in a specified service.
clm server-stop [-h] [--waitfor TIME_OUT_SECONDS]
--servicename NAME --servername NAME server_name
(4.1.00 patch 5 and later)
clm server-stop [-h] [--waitfor TIME_OUT_SECONDS]
--servicename NAME --servername NAME server_name [--force]
Use server_stop
in the API to stop a server in a specified service. This command returns a ComputeContainer
API object with the same attributes and relationships.
obj = server_stop(gcac, service_name, server_name)
# force = True/False
# if set to True, it will stop the server, else
it will shutdown the server
obj.guid # returns the GUID
obj.name # returns the name
...
Command-line argument | API parameter | Description | Required? |
---|---|---|---|
--servicename | service_name | Name of the service containing the server to stop. | Yes |
--servername | server_name | Name of the server to stop. | Yes |
--waitfor | Time in seconds to wait for response from the server, otherwise return running task details. | ||
--force | (4.1 patch 5 and later) If it is set to true, the server is stopped, otherwise, the server is shutdown. | ||
gcac | GenericCloudAPIClient instance/user authentication. |
Comments
Log in or register to comment.