Class: NutanixVolumes::IscsiClientsApi
- Inherits:
-
Object
- Object
- NutanixVolumes::IscsiClientsApi
- Defined in:
- lib/nutanix_volumes/api/iscsi_clients_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_iscsi_client_by_id(ext_id, opts = {}) ⇒ GetIscsiClientById200Response
Fetch an iSCSI client details Fetches the iSCSI client details identified by extId.
-
#get_iscsi_client_by_id_with_http_info(ext_id, opts = {}) ⇒ Array<(GetIscsiClientById200Response, Integer, Hash)>
Fetch an iSCSI client details Fetches the iSCSI client details identified by extId.
-
#initialize(api_client = ApiClient.default) ⇒ IscsiClientsApi
constructor
A new instance of IscsiClientsApi.
-
#list_iscsi_clients(opts = {}) ⇒ ListIscsiClients200Response
List all the iSCSI clients Fetches the list of iSCSI clients.
-
#list_iscsi_clients_with_http_info(opts = {}) ⇒ Array<(ListIscsiClients200Response, Integer, Hash)>
List all the iSCSI clients Fetches the list of iSCSI clients.
-
#update_iscsi_client_by_id(ext_id, if_match, ntnx_request_id, volumes_v40_config_iscsi_client, opts = {}) ⇒ UpdateIscsiClientById202Response
Update an iSCSI client Modifies the details of an existing iSCSI client configuration identified by extId.
-
#update_iscsi_client_by_id_with_http_info(ext_id, if_match, ntnx_request_id, volumes_v40_config_iscsi_client, opts = {}) ⇒ Array<(UpdateIscsiClientById202Response, Integer, Hash)>
Update an iSCSI client Modifies the details of an existing iSCSI client configuration identified by extId.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ IscsiClientsApi
Returns a new instance of IscsiClientsApi.
19 20 21 |
# File 'lib/nutanix_volumes/api/iscsi_clients_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_volumes/api/iscsi_clients_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_iscsi_client_by_id(ext_id, opts = {}) ⇒ GetIscsiClientById200Response
Fetch an iSCSI client details Fetches the iSCSI client details identified by extId.
27 28 29 30 |
# File 'lib/nutanix_volumes/api/iscsi_clients_api.rb', line 27 def get_iscsi_client_by_id(ext_id, opts = {}) data, _status_code, _headers = get_iscsi_client_by_id_with_http_info(ext_id, opts) data end |
#get_iscsi_client_by_id_with_http_info(ext_id, opts = {}) ⇒ Array<(GetIscsiClientById200Response, Integer, Hash)>
Fetch an iSCSI client details Fetches the iSCSI client details identified by extId.
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 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/nutanix_volumes/api/iscsi_clients_api.rb', line 37 def get_iscsi_client_by_id_with_http_info(ext_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IscsiClientsApi.get_iscsi_client_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 IscsiClientsApi.get_iscsi_client_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 IscsiClientsApi.get_iscsi_client_by_id, must conform to the pattern #{pattern}." end # resource path local_var_path = '/volumes/v4.0/config/iscsi-clients/{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] || 'GetIscsiClientById200Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"IscsiClientsApi.get_iscsi_client_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: IscsiClientsApi#get_iscsi_client_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_iscsi_clients(opts = {}) ⇒ ListIscsiClients200Response
List all the iSCSI clients Fetches the list of iSCSI clients.
100 101 102 103 |
# File 'lib/nutanix_volumes/api/iscsi_clients_api.rb', line 100 def list_iscsi_clients(opts = {}) data, _status_code, _headers = list_iscsi_clients_with_http_info(opts) data end |
#list_iscsi_clients_with_http_info(opts = {}) ⇒ Array<(ListIscsiClients200Response, Integer, Hash)>
List all the iSCSI clients Fetches the list of iSCSI clients.
115 116 117 118 119 120 121 122 123 124 125 126 127 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 |
# File 'lib/nutanix_volumes/api/iscsi_clients_api.rb', line 115 def list_iscsi_clients_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IscsiClientsApi.list_iscsi_clients ...' end if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0 fail ArgumentError, 'invalid value for "opts[:"page"]" when calling IscsiClientsApi.list_iscsi_clients, 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 IscsiClientsApi.list_iscsi_clients, 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 IscsiClientsApi.list_iscsi_clients, must be greater than or equal to 1.' end # resource path local_var_path = '/volumes/v4.0/config/iscsi-clients' # 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[:'$expand'] = opts[:'expand'] if !opts[:'expand'].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] || 'ListIscsiClients200Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"IscsiClientsApi.list_iscsi_clients", :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: IscsiClientsApi#list_iscsi_clients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_iscsi_client_by_id(ext_id, if_match, ntnx_request_id, volumes_v40_config_iscsi_client, opts = {}) ⇒ UpdateIscsiClientById202Response
Update an iSCSI client Modifies the details of an existing iSCSI client configuration identified by extId.
185 186 187 188 |
# File 'lib/nutanix_volumes/api/iscsi_clients_api.rb', line 185 def update_iscsi_client_by_id(ext_id, if_match, ntnx_request_id, volumes_v40_config_iscsi_client, opts = {}) data, _status_code, _headers = update_iscsi_client_by_id_with_http_info(ext_id, if_match, ntnx_request_id, volumes_v40_config_iscsi_client, opts) data end |
#update_iscsi_client_by_id_with_http_info(ext_id, if_match, ntnx_request_id, volumes_v40_config_iscsi_client, opts = {}) ⇒ Array<(UpdateIscsiClientById202Response, Integer, Hash)>
Update an iSCSI client Modifies the details of an existing iSCSI client configuration identified by extId.
198 199 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 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/nutanix_volumes/api/iscsi_clients_api.rb', line 198 def update_iscsi_client_by_id_with_http_info(ext_id, if_match, ntnx_request_id, volumes_v40_config_iscsi_client, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IscsiClientsApi.update_iscsi_client_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 IscsiClientsApi.update_iscsi_client_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 IscsiClientsApi.update_iscsi_client_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 IscsiClientsApi.update_iscsi_client_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 IscsiClientsApi.update_iscsi_client_by_id" end # verify the required parameter 'volumes_v40_config_iscsi_client' is set if @api_client.config.client_side_validation && volumes_v40_config_iscsi_client.nil? fail ArgumentError, "Missing the required parameter 'volumes_v40_config_iscsi_client' when calling IscsiClientsApi.update_iscsi_client_by_id" end # resource path local_var_path = '/volumes/v4.0/config/iscsi-clients/{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'] # 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(volumes_v40_config_iscsi_client) # return_type return_type = opts[:debug_return_type] || 'UpdateIscsiClientById202Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"IscsiClientsApi.update_iscsi_client_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: IscsiClientsApi#update_iscsi_client_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |