saltext.vmware.modules.vmc_sddc_host#
Salt execution module for ESX hosts Provides methods to Add/Remove one or more ESX hosts in the target SDDC
- saltext.vmware.modules.vmc_sddc_host.manage(hostname, refresh_key, authorization_host, org_id, sddc_id, num_hosts, availability_zone=None, cluster_id=None, esxs=None, strict_placement=False, action=None, verify_ssl=True, cert=None)[source]#
Add/remove host for a given SDDC
Please refer the VMC Create ESXs documentation to get insight of functionality and input parameters
CLI Example:
salt <minion-key-id> vmc_sddc_host.manage hostname=vmc.vmware.com ...
- hostname
The host name of VMC
- refresh_key
API Token of the user which is used to get the Access Token required for VMC operations
- authorization_host
Hostname of the Cloud Services Platform (CSP)
- org_id
The Id of organization to which the SDDC belongs to
- sddc_id
The Id of SDDC for which the host would be added/removed
- num_hosts: Integer
(Required) Count of Hosts that would be added/removed for the given SDDC
- availability_zone: String
(Optional) Availability zone where the hosts should be provisioned. (Can be specified only for privileged host operations).
- cluster_id: String
(Optional) An optional cluster id if the esxs operation has to be on a specific cluster.
- esxs: Array Of String As UUID
(Optional) An optional list of ESX IDs to remove.
- strict_placement: Boolean
(Optional) An option to indicate if the host needs to be strictly placed in a placement group. Fail the operation otherwise.
- action: String
(Optional) If action = ‘add’, will add the esx.
If action = ‘remove’, will delete the esx/esxs bound to a single cluster(Cluster Id is mandatory for non cluster 1 esx remove).
If action = ‘force-remove’, will delete the esx even if it can lead to data loss (This is an privileged operation).
If action = ‘addToAll’, will add esxs to all clusters in the SDDC (This is an privileged operation).
If action = ‘removeFromAll’, will delete the esxs from all clusters in the SDDC (This is an privileged operation).
If action = ‘attach-diskgroup’, will attach the provided diskgroups to a given host (privileged).
If action = ‘detach-diskgroup’, will detach the diskgroups of a given host (privileged).
Default behaviour is ‘add’
- verify_ssl
(Optional) Option to enable/disable SSL verification. Enabled by default. If set to False, the certificate validation is skipped.
- cert
(Optional) Path to the SSL client certificate file to connect to VMC Cloud Console. The certificate can be retrieved from browser.
- For example:
{ "availability_zone": "us-west-2a", "cluster_id": "e97920ae-1410-4269-9caa-29584eb8cf6d", "esxs": [ "94ce40e1-8619-45b5-9817-0f3466d0dc78" ], "num_hosts": 1, "strict_placement": false }
- saltext.vmware.modules.vmc_sddc_host.list_(hostname, refresh_key, authorization_host, org_id, sddc_id, verify_ssl=True, cert=None)[source]#
Retrieves ESX hosts list for the given SDDC
Please refer the VMC Get SDDC documentation to get insight of functionality and input parameters
CLI Example:
salt <minion-key-id> vmc_sddc_host.get hostname=vmc.vmware.com …
- hostname
The host name of VMC
- refresh_key
API Token of the user which is used to get the Access Token required for VMC operations
- authorization_host
Hostname of the Cloud Services Platform (CSP)
- org_id
The Id of organization to which the SDDC belongs to
- sddc_id
The Id of SDDC for which the hosts would be retrieved
verify_ssl (Optional) Option to enable/disable SSL verification. Enabled by default. If set to False, the certificate validation is skipped.
cert (Optional) Path to the SSL client certificate file to connect to VMC Cloud Console. The certificate can be retrieved from browser.