Class: VSphereAutomation::VCenter::VchaClusterApi
- Inherits:
-
Object
- Object
- VSphereAutomation::VCenter::VchaClusterApi
- Defined in:
- lib/vsphere-automation-vcenter/api/vcha_cluster_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#deploytask(request_body, opts = {}) ⇒ VcenterVchaClusterDeployTaskResult|VapiStdErrorsErrorError|VapiStdErrorsUnauthorizedError|
Prepares, clones, and configures a VCHA cluster.
-
#deploytask_with_http_info(request_body, opts = {}) ⇒ Array<(VcenterVchaClusterDeployTaskResult|VapiStdErrorsErrorError|VapiStdErrorsUnauthorizedError|, Fixnum, Hash)>
private
Prepares, clones, and configures a VCHA cluster.
-
#failovertask(request_body, opts = {}) ⇒ VcenterVchaClusterFailoverTaskResult|VapiStdErrorsErrorError|VapiStdErrorsUnauthorizedError|
Initiates failover from the active vCenter node to the passive node.
-
#failovertask_with_http_info(request_body, opts = {}) ⇒ Array<(VcenterVchaClusterFailoverTaskResult|VapiStdErrorsErrorError|VapiStdErrorsUnauthorizedError|, Fixnum, Hash)>
private
Initiates failover from the active vCenter node to the passive node.
-
#get(opts = {}) ⇒ VcenterVchaClusterResult|VapiStdErrorsErrorError|VapiStdErrorsUnauthorizedError|
Retrieves the status of a VCHA cluster.
-
#get_with_http_info(opts = {}) ⇒ Array<(VcenterVchaClusterResult|VapiStdErrorsErrorError|VapiStdErrorsUnauthorizedError|, Fixnum, Hash)>
private
Retrieves the status of a VCHA cluster.
-
#initialize(api_client = ApiClient.default) ⇒ VchaClusterApi
constructor
A new instance of VchaClusterApi.
-
#undeploytask(request_body, opts = {}) ⇒ VcenterVchaClusterUndeployTaskResult|VapiStdErrorsErrorError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|
Destroys the VCHA cluster and removes all VCHA specific information from the VCVA appliance.
-
#undeploytask_with_http_info(request_body, opts = {}) ⇒ Array<(VcenterVchaClusterUndeployTaskResult|VapiStdErrorsErrorError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|, Fixnum, Hash)>
private
Destroys the VCHA cluster and removes all VCHA specific information from the VCVA appliance.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ VchaClusterApi
Returns a new instance of VchaClusterApi.
16 17 18 |
# File 'lib/vsphere-automation-vcenter/api/vcha_cluster_api.rb', line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
14 15 16 |
# File 'lib/vsphere-automation-vcenter/api/vcha_cluster_api.rb', line 14 def api_client @api_client end |
Instance Method Details
#deploytask(request_body, opts = {}) ⇒ VcenterVchaClusterDeployTaskResult|VapiStdErrorsErrorError|VapiStdErrorsUnauthorizedError|
Prepares, clones, and configures a VCHA cluster.
23 24 25 26 |
# File 'lib/vsphere-automation-vcenter/api/vcha_cluster_api.rb', line 23 def deploytask(request_body, opts = {}) data, _status_code, _headers = deploytask_with_http_info(request_body, opts) data end |
#deploytask_with_http_info(request_body, opts = {}) ⇒ Array<(VcenterVchaClusterDeployTaskResult|VapiStdErrorsErrorError|VapiStdErrorsUnauthorizedError|, Fixnum, Hash)>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Prepares, clones, and configures a VCHA cluster.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/vsphere-automation-vcenter/api/vcha_cluster_api.rb', line 33 def deploytask_with_http_info(request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VchaClusterApi.deploytask ...' end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling VchaClusterApi.deploytask" end # resource path local_var_path = '/vcenter/vcha/cluster?action=deploy&vmw-task=true' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request_body) auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => { '200' => 'VCenter::VcenterVchaClusterDeployTaskResult', '400' => 'VCenter::VapiStdErrorsErrorError', '403' => 'VCenter::VapiStdErrorsUnauthorizedError', }) if @api_client.config.debugging @api_client.config.logger.debug "API called: VchaClusterApi#deploytask\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#failovertask(request_body, opts = {}) ⇒ VcenterVchaClusterFailoverTaskResult|VapiStdErrorsErrorError|VapiStdErrorsUnauthorizedError|
Initiates failover from the active vCenter node to the passive node. For forced failover, Active node immediately initiates a failover. This may result into a data loss after failover. For planned failover, Active node flushes all the state to the Passive node, waits for the flush to complete before causing a failover. After the failover, Passive node starts without any data loss. A failover is allowed only in the following cases: 1. Cluster’s mode is enabled and all cluster members are present. 2. Cluster’s mode is maintenance and all cluster members are present.
80 81 82 83 |
# File 'lib/vsphere-automation-vcenter/api/vcha_cluster_api.rb', line 80 def failovertask(request_body, opts = {}) data, _status_code, _headers = failovertask_with_http_info(request_body, opts) data end |
#failovertask_with_http_info(request_body, opts = {}) ⇒ Array<(VcenterVchaClusterFailoverTaskResult|VapiStdErrorsErrorError|VapiStdErrorsUnauthorizedError|, Fixnum, Hash)>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initiates failover from the active vCenter node to the passive node. For forced failover, Active node immediately initiates a failover. This may result into a data loss after failover. For planned failover, Active node flushes all the state to the Passive node, waits for the flush to complete before causing a failover. After the failover, Passive node starts without any data loss. A failover is allowed only in the following cases: 1. Cluster's mode is enabled and all cluster members are present. 2. Cluster's mode is maintenance and all cluster members are present.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/vsphere-automation-vcenter/api/vcha_cluster_api.rb', line 90 def failovertask_with_http_info(request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VchaClusterApi.failovertask ...' end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling VchaClusterApi.failovertask" end # resource path local_var_path = '/vcenter/vcha/cluster?action=failover&vmw-task=true' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request_body) auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => { '200' => 'VCenter::VcenterVchaClusterFailoverTaskResult', '400' => 'VCenter::VapiStdErrorsErrorError', '403' => 'VCenter::VapiStdErrorsUnauthorizedError', }) if @api_client.config.debugging @api_client.config.logger.debug "API called: VchaClusterApi#failovertask\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get(opts = {}) ⇒ VcenterVchaClusterResult|VapiStdErrorsErrorError|VapiStdErrorsUnauthorizedError|
Retrieves the status of a VCHA cluster.
137 138 139 140 |
# File 'lib/vsphere-automation-vcenter/api/vcha_cluster_api.rb', line 137 def get(opts = {}) data, _status_code, _headers = get_with_http_info(opts) data end |
#get_with_http_info(opts = {}) ⇒ Array<(VcenterVchaClusterResult|VapiStdErrorsErrorError|VapiStdErrorsUnauthorizedError|, Fixnum, Hash)>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Retrieves the status of a VCHA cluster.
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/vsphere-automation-vcenter/api/vcha_cluster_api.rb', line 147 def get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VchaClusterApi.get ...' end # resource path local_var_path = '/vcenter/vcha/cluster?action=get' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'request_body']) auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => { '200' => 'VCenter::VcenterVchaClusterResult', '400' => 'VCenter::VapiStdErrorsErrorError', '403' => 'VCenter::VapiStdErrorsUnauthorizedError', }) if @api_client.config.debugging @api_client.config.logger.debug "API called: VchaClusterApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#undeploytask(request_body, opts = {}) ⇒ VcenterVchaClusterUndeployTaskResult|VapiStdErrorsErrorError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|
Destroys the VCHA cluster and removes all VCHA specific information from the VCVA appliance. Optionally, the passive and witness node virtual machines will be deleted only if VCHA was deployed using automatic deployment. The active node in the cluster continues to run as a standalone VCVA appliance after the destroy operation has been performed. If the VCHA cluster is in a transition state and not configured, then the VCHA cluster specific information is removed.
190 191 192 193 |
# File 'lib/vsphere-automation-vcenter/api/vcha_cluster_api.rb', line 190 def undeploytask(request_body, opts = {}) data, _status_code, _headers = undeploytask_with_http_info(request_body, opts) data end |
#undeploytask_with_http_info(request_body, opts = {}) ⇒ Array<(VcenterVchaClusterUndeployTaskResult|VapiStdErrorsErrorError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|, Fixnum, Hash)>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Destroys the VCHA cluster and removes all VCHA specific information from the VCVA appliance. Optionally, the passive and witness node virtual machines will be deleted only if VCHA was deployed using automatic deployment. The active node in the cluster continues to run as a standalone VCVA appliance after the destroy operation has been performed. If the VCHA cluster is in a transition state and not configured, then the VCHA cluster specific information is removed.
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/vsphere-automation-vcenter/api/vcha_cluster_api.rb', line 200 def undeploytask_with_http_info(request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VchaClusterApi.undeploytask ...' end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling VchaClusterApi.undeploytask" end # resource path local_var_path = '/vcenter/vcha/cluster?action=undeploy&vmw-task=true' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request_body) auth_names = ['api_key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => { '200' => 'VCenter::VcenterVchaClusterUndeployTaskResult', '400' => 'VCenter::VapiStdErrorsErrorError', '403' => 'VCenter::VapiStdErrorsUnauthorizedError', '404' => 'VCenter::VapiStdErrorsNotFoundError', }) if @api_client.config.debugging @api_client.config.logger.debug "API called: VchaClusterApi#undeploytask\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |