Class: NutanixClustermgmt::ClusterProfilesApi
- Inherits:
-
Object
- Object
- NutanixClustermgmt::ClusterProfilesApi
- Defined in:
- lib/nutanix_clustermgmt/api/cluster_profiles_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#apply_cluster_profile(ext_id, ntnx_request_id, clustermgmt_v40_config_cluster_reference_list_spec, opts = {}) ⇒ ApplyClusterProfile202Response
Apply cluster profile Apply profile to all the attached clusters.
-
#apply_cluster_profile_with_http_info(ext_id, ntnx_request_id, clustermgmt_v40_config_cluster_reference_list_spec, opts = {}) ⇒ Array<(ApplyClusterProfile202Response, Integer, Hash)>
Apply cluster profile Apply profile to all the attached clusters.
-
#create_cluster_profile(ntnx_request_id, clustermgmt_v40_config_cluster_profile, opts = {}) ⇒ CreateClusterProfile202Response
Create a cluster profile Create cluster profile with the required settings.
-
#create_cluster_profile_with_http_info(ntnx_request_id, clustermgmt_v40_config_cluster_profile, opts = {}) ⇒ Array<(CreateClusterProfile202Response, Integer, Hash)>
Create a cluster profile Create cluster profile with the required settings.
-
#delete_cluster_profile_by_id(ext_id, ntnx_request_id, opts = {}) ⇒ DeleteClusterProfileById202Response
Delete cluster profile Delete cluster profile.
-
#delete_cluster_profile_by_id_with_http_info(ext_id, ntnx_request_id, opts = {}) ⇒ Array<(DeleteClusterProfileById202Response, Integer, Hash)>
Delete cluster profile Delete cluster profile.
-
#disassociate_cluster_from_cluster_profile(ext_id, ntnx_request_id, clustermgmt_v40_config_cluster_reference_list_spec, opts = {}) ⇒ DisassociateClusterFromClusterProfile202Response
Disassociate cluster from a cluster profile Disassociate cluster from a profile.
-
#disassociate_cluster_from_cluster_profile_with_http_info(ext_id, ntnx_request_id, clustermgmt_v40_config_cluster_reference_list_spec, opts = {}) ⇒ Array<(DisassociateClusterFromClusterProfile202Response, Integer, Hash)>
Disassociate cluster from a cluster profile Disassociate cluster from a profile.
-
#get_cluster_profile_by_id(ext_id, opts = {}) ⇒ GetClusterProfileById200Response
Get cluster profile Get cluster profile.
-
#get_cluster_profile_by_id_with_http_info(ext_id, opts = {}) ⇒ Array<(GetClusterProfileById200Response, Integer, Hash)>
Get cluster profile Get cluster profile.
-
#initialize(api_client = ApiClient.default) ⇒ ClusterProfilesApi
constructor
A new instance of ClusterProfilesApi.
-
#list_cluster_profiles(opts = {}) ⇒ ListClusterProfiles200Response
List cluster profiles Fetches a list of cluster profile entities.
-
#list_cluster_profiles_with_http_info(opts = {}) ⇒ Array<(ListClusterProfiles200Response, Integer, Hash)>
List cluster profiles Fetches a list of cluster profile entities.
-
#update_cluster_profile_by_id(ext_id, if_match, ntnx_request_id, clustermgmt_v40_config_cluster_profile, opts = {}) ⇒ UpdateClusterProfileById202Response
Update cluster profile Update cluster profile.
-
#update_cluster_profile_by_id_with_http_info(ext_id, if_match, ntnx_request_id, clustermgmt_v40_config_cluster_profile, opts = {}) ⇒ Array<(UpdateClusterProfileById202Response, Integer, Hash)>
Update cluster profile Update cluster profile.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ClusterProfilesApi
Returns a new instance of ClusterProfilesApi.
19 20 21 |
# File 'lib/nutanix_clustermgmt/api/cluster_profiles_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/nutanix_clustermgmt/api/cluster_profiles_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#apply_cluster_profile(ext_id, ntnx_request_id, clustermgmt_v40_config_cluster_reference_list_spec, opts = {}) ⇒ ApplyClusterProfile202Response
Apply cluster profile Apply profile to all the attached clusters
30 31 32 33 |
# File 'lib/nutanix_clustermgmt/api/cluster_profiles_api.rb', line 30 def apply_cluster_profile(ext_id, ntnx_request_id, clustermgmt_v40_config_cluster_reference_list_spec, opts = {}) data, _status_code, _headers = apply_cluster_profile_with_http_info(ext_id, ntnx_request_id, clustermgmt_v40_config_cluster_reference_list_spec, opts) data end |
#apply_cluster_profile_with_http_info(ext_id, ntnx_request_id, clustermgmt_v40_config_cluster_reference_list_spec, opts = {}) ⇒ Array<(ApplyClusterProfile202Response, Integer, Hash)>
Apply cluster profile Apply profile to all the attached clusters
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 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/nutanix_clustermgmt/api/cluster_profiles_api.rb', line 43 def apply_cluster_profile_with_http_info(ext_id, ntnx_request_id, clustermgmt_v40_config_cluster_reference_list_spec, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ClusterProfilesApi.apply_cluster_profile ...' end # verify the required parameter 'ext_id' is set if @api_client.config.client_side_validation && ext_id.nil? fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClusterProfilesApi.apply_cluster_profile" end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if @api_client.config.client_side_validation && ext_id !~ pattern fail ArgumentError, "invalid value for 'ext_id' when calling ClusterProfilesApi.apply_cluster_profile, must conform to the pattern #{pattern}." end # verify the required parameter 'ntnx_request_id' is set if @api_client.config.client_side_validation && ntnx_request_id.nil? fail ArgumentError, "Missing the required parameter 'ntnx_request_id' when calling ClusterProfilesApi.apply_cluster_profile" end # verify the required parameter 'clustermgmt_v40_config_cluster_reference_list_spec' is set if @api_client.config.client_side_validation && clustermgmt_v40_config_cluster_reference_list_spec.nil? fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_cluster_reference_list_spec' when calling ClusterProfilesApi.apply_cluster_profile" end # resource path local_var_path = '/clustermgmt/v4.0/config/cluster-profiles/{extId}/$actions/apply'.sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'$dryrun'] = opts[:'dryrun'] if !opts[:'dryrun'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'NTNX-Request-Id'] = ntnx_request_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(clustermgmt_v40_config_cluster_reference_list_spec) # return_type return_type = opts[:debug_return_type] || 'ApplyClusterProfile202Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"ClusterProfilesApi.apply_cluster_profile", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ClusterProfilesApi#apply_cluster_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_cluster_profile(ntnx_request_id, clustermgmt_v40_config_cluster_profile, opts = {}) ⇒ CreateClusterProfile202Response
Create a cluster profile Create cluster profile with the required settings
117 118 119 120 |
# File 'lib/nutanix_clustermgmt/api/cluster_profiles_api.rb', line 117 def create_cluster_profile(ntnx_request_id, clustermgmt_v40_config_cluster_profile, opts = {}) data, _status_code, _headers = create_cluster_profile_with_http_info(ntnx_request_id, clustermgmt_v40_config_cluster_profile, opts) data end |
#create_cluster_profile_with_http_info(ntnx_request_id, clustermgmt_v40_config_cluster_profile, opts = {}) ⇒ Array<(CreateClusterProfile202Response, Integer, Hash)>
Create a cluster profile Create cluster profile with the required settings
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 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 |
# File 'lib/nutanix_clustermgmt/api/cluster_profiles_api.rb', line 128 def create_cluster_profile_with_http_info(ntnx_request_id, clustermgmt_v40_config_cluster_profile, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ClusterProfilesApi.create_cluster_profile ...' end # verify the required parameter 'ntnx_request_id' is set if @api_client.config.client_side_validation && ntnx_request_id.nil? fail ArgumentError, "Missing the required parameter 'ntnx_request_id' when calling ClusterProfilesApi.create_cluster_profile" end # verify the required parameter 'clustermgmt_v40_config_cluster_profile' is set if @api_client.config.client_side_validation && clustermgmt_v40_config_cluster_profile.nil? fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_cluster_profile' when calling ClusterProfilesApi.create_cluster_profile" end # resource path local_var_path = '/clustermgmt/v4.0/config/cluster-profiles' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'NTNX-Request-Id'] = ntnx_request_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(clustermgmt_v40_config_cluster_profile) # return_type return_type = opts[:debug_return_type] || 'CreateClusterProfile202Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"ClusterProfilesApi.create_cluster_profile", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ClusterProfilesApi#create_cluster_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_cluster_profile_by_id(ext_id, ntnx_request_id, opts = {}) ⇒ DeleteClusterProfileById202Response
Delete cluster profile Delete cluster profile. Profile consist of different cluster settings like NTP, DNS etc.
192 193 194 195 |
# File 'lib/nutanix_clustermgmt/api/cluster_profiles_api.rb', line 192 def delete_cluster_profile_by_id(ext_id, ntnx_request_id, opts = {}) data, _status_code, _headers = delete_cluster_profile_by_id_with_http_info(ext_id, ntnx_request_id, opts) data end |
#delete_cluster_profile_by_id_with_http_info(ext_id, ntnx_request_id, opts = {}) ⇒ Array<(DeleteClusterProfileById202Response, Integer, Hash)>
Delete cluster profile Delete cluster profile. Profile consist of different cluster settings like NTP, DNS etc.
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 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/nutanix_clustermgmt/api/cluster_profiles_api.rb', line 203 def delete_cluster_profile_by_id_with_http_info(ext_id, ntnx_request_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ClusterProfilesApi.delete_cluster_profile_by_id ...' end # verify the required parameter 'ext_id' is set if @api_client.config.client_side_validation && ext_id.nil? fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClusterProfilesApi.delete_cluster_profile_by_id" end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if @api_client.config.client_side_validation && ext_id !~ pattern fail ArgumentError, "invalid value for 'ext_id' when calling ClusterProfilesApi.delete_cluster_profile_by_id, must conform to the pattern #{pattern}." end # verify the required parameter 'ntnx_request_id' is set if @api_client.config.client_side_validation && ntnx_request_id.nil? fail ArgumentError, "Missing the required parameter 'ntnx_request_id' when calling ClusterProfilesApi.delete_cluster_profile_by_id" end # resource path local_var_path = '/clustermgmt/v4.0/config/cluster-profiles/{extId}'.sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'NTNX-Request-Id'] = ntnx_request_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeleteClusterProfileById202Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"ClusterProfilesApi.delete_cluster_profile_by_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ClusterProfilesApi#delete_cluster_profile_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#disassociate_cluster_from_cluster_profile(ext_id, ntnx_request_id, clustermgmt_v40_config_cluster_reference_list_spec, opts = {}) ⇒ DisassociateClusterFromClusterProfile202Response
Disassociate cluster from a cluster profile Disassociate cluster from a profile
268 269 270 271 |
# File 'lib/nutanix_clustermgmt/api/cluster_profiles_api.rb', line 268 def disassociate_cluster_from_cluster_profile(ext_id, ntnx_request_id, clustermgmt_v40_config_cluster_reference_list_spec, opts = {}) data, _status_code, _headers = disassociate_cluster_from_cluster_profile_with_http_info(ext_id, ntnx_request_id, clustermgmt_v40_config_cluster_reference_list_spec, opts) data end |
#disassociate_cluster_from_cluster_profile_with_http_info(ext_id, ntnx_request_id, clustermgmt_v40_config_cluster_reference_list_spec, opts = {}) ⇒ Array<(DisassociateClusterFromClusterProfile202Response, Integer, Hash)>
Disassociate cluster from a cluster profile Disassociate cluster from a profile
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/nutanix_clustermgmt/api/cluster_profiles_api.rb', line 280 def disassociate_cluster_from_cluster_profile_with_http_info(ext_id, ntnx_request_id, clustermgmt_v40_config_cluster_reference_list_spec, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ClusterProfilesApi.disassociate_cluster_from_cluster_profile ...' end # verify the required parameter 'ext_id' is set if @api_client.config.client_side_validation && ext_id.nil? fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClusterProfilesApi.disassociate_cluster_from_cluster_profile" end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if @api_client.config.client_side_validation && ext_id !~ pattern fail ArgumentError, "invalid value for 'ext_id' when calling ClusterProfilesApi.disassociate_cluster_from_cluster_profile, must conform to the pattern #{pattern}." end # verify the required parameter 'ntnx_request_id' is set if @api_client.config.client_side_validation && ntnx_request_id.nil? fail ArgumentError, "Missing the required parameter 'ntnx_request_id' when calling ClusterProfilesApi.disassociate_cluster_from_cluster_profile" end # verify the required parameter 'clustermgmt_v40_config_cluster_reference_list_spec' is set if @api_client.config.client_side_validation && clustermgmt_v40_config_cluster_reference_list_spec.nil? fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_cluster_reference_list_spec' when calling ClusterProfilesApi.disassociate_cluster_from_cluster_profile" end # resource path local_var_path = '/clustermgmt/v4.0/config/cluster-profiles/{extId}/$actions/disassociate-cluster'.sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'NTNX-Request-Id'] = ntnx_request_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(clustermgmt_v40_config_cluster_reference_list_spec) # return_type return_type = opts[:debug_return_type] || 'DisassociateClusterFromClusterProfile202Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"ClusterProfilesApi.disassociate_cluster_from_cluster_profile", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ClusterProfilesApi#disassociate_cluster_from_cluster_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_cluster_profile_by_id(ext_id, opts = {}) ⇒ GetClusterProfileById200Response
Get cluster profile Get cluster profile. Profile consist of different cluster settings like NTP, DNS etc.
352 353 354 355 |
# File 'lib/nutanix_clustermgmt/api/cluster_profiles_api.rb', line 352 def get_cluster_profile_by_id(ext_id, opts = {}) data, _status_code, _headers = get_cluster_profile_by_id_with_http_info(ext_id, opts) data end |
#get_cluster_profile_by_id_with_http_info(ext_id, opts = {}) ⇒ Array<(GetClusterProfileById200Response, Integer, Hash)>
Get cluster profile Get cluster profile. Profile consist of different cluster settings like NTP, DNS etc.
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/nutanix_clustermgmt/api/cluster_profiles_api.rb', line 362 def get_cluster_profile_by_id_with_http_info(ext_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ClusterProfilesApi.get_cluster_profile_by_id ...' end # verify the required parameter 'ext_id' is set if @api_client.config.client_side_validation && ext_id.nil? fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClusterProfilesApi.get_cluster_profile_by_id" end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if @api_client.config.client_side_validation && ext_id !~ pattern fail ArgumentError, "invalid value for 'ext_id' when calling ClusterProfilesApi.get_cluster_profile_by_id, must conform to the pattern #{pattern}." end # resource path local_var_path = '/clustermgmt/v4.0/config/cluster-profiles/{extId}'.sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetClusterProfileById200Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"ClusterProfilesApi.get_cluster_profile_by_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ClusterProfilesApi#get_cluster_profile_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_cluster_profiles(opts = {}) ⇒ ListClusterProfiles200Response
List cluster profiles Fetches a list of cluster profile entities. A profile consists of different cluster settings like Network Time Protocol(NTP), Domain Name System(DNS), and so on.
424 425 426 427 |
# File 'lib/nutanix_clustermgmt/api/cluster_profiles_api.rb', line 424 def list_cluster_profiles(opts = {}) data, _status_code, _headers = list_cluster_profiles_with_http_info(opts) data end |
#list_cluster_profiles_with_http_info(opts = {}) ⇒ Array<(ListClusterProfiles200Response, Integer, Hash)>
List cluster profiles Fetches a list of cluster profile entities. A profile consists of different cluster settings like Network Time Protocol(NTP), Domain Name System(DNS), and so on.
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 |
# File 'lib/nutanix_clustermgmt/api/cluster_profiles_api.rb', line 438 def list_cluster_profiles_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ClusterProfilesApi.list_cluster_profiles ...' end if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0 fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ClusterProfilesApi.list_cluster_profiles, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ClusterProfilesApi.list_cluster_profiles, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ClusterProfilesApi.list_cluster_profiles, must be greater than or equal to 1.' end # resource path local_var_path = '/clustermgmt/v4.0/config/cluster-profiles' # query parameters query_params = opts[:query_params] || {} query_params[:'$page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'$limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil? query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListClusterProfiles200Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"ClusterProfilesApi.list_cluster_profiles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ClusterProfilesApi#list_cluster_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_cluster_profile_by_id(ext_id, if_match, ntnx_request_id, clustermgmt_v40_config_cluster_profile, opts = {}) ⇒ UpdateClusterProfileById202Response
Update cluster profile Update cluster profile. Profile consist of different cluster settings like NTP, DNS etc.
508 509 510 511 |
# File 'lib/nutanix_clustermgmt/api/cluster_profiles_api.rb', line 508 def update_cluster_profile_by_id(ext_id, if_match, ntnx_request_id, clustermgmt_v40_config_cluster_profile, opts = {}) data, _status_code, _headers = update_cluster_profile_by_id_with_http_info(ext_id, if_match, ntnx_request_id, clustermgmt_v40_config_cluster_profile, opts) data end |
#update_cluster_profile_by_id_with_http_info(ext_id, if_match, ntnx_request_id, clustermgmt_v40_config_cluster_profile, opts = {}) ⇒ Array<(UpdateClusterProfileById202Response, Integer, Hash)>
Update cluster profile Update cluster profile. Profile consist of different cluster settings like NTP, DNS etc.
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 |
# File 'lib/nutanix_clustermgmt/api/cluster_profiles_api.rb', line 522 def update_cluster_profile_by_id_with_http_info(ext_id, if_match, ntnx_request_id, clustermgmt_v40_config_cluster_profile, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ClusterProfilesApi.update_cluster_profile_by_id ...' end # verify the required parameter 'ext_id' is set if @api_client.config.client_side_validation && ext_id.nil? fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClusterProfilesApi.update_cluster_profile_by_id" end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if @api_client.config.client_side_validation && ext_id !~ pattern fail ArgumentError, "invalid value for 'ext_id' when calling ClusterProfilesApi.update_cluster_profile_by_id, must conform to the pattern #{pattern}." end # verify the required parameter 'if_match' is set if @api_client.config.client_side_validation && if_match.nil? fail ArgumentError, "Missing the required parameter 'if_match' when calling ClusterProfilesApi.update_cluster_profile_by_id" end # verify the required parameter 'ntnx_request_id' is set if @api_client.config.client_side_validation && ntnx_request_id.nil? fail ArgumentError, "Missing the required parameter 'ntnx_request_id' when calling ClusterProfilesApi.update_cluster_profile_by_id" end # verify the required parameter 'clustermgmt_v40_config_cluster_profile' is set if @api_client.config.client_side_validation && clustermgmt_v40_config_cluster_profile.nil? fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_cluster_profile' when calling ClusterProfilesApi.update_cluster_profile_by_id" end # resource path local_var_path = '/clustermgmt/v4.0/config/cluster-profiles/{extId}'.sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'$dryrun'] = opts[:'dryrun'] if !opts[:'dryrun'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'If-Match'] = if_match header_params[:'NTNX-Request-Id'] = ntnx_request_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(clustermgmt_v40_config_cluster_profile) # return_type return_type = opts[:debug_return_type] || 'UpdateClusterProfileById202Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"ClusterProfilesApi.update_cluster_profile_by_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ClusterProfilesApi#update_cluster_profile_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |