lib/ruby-linstor-client/api/developers_api.rb
# enable a drbd proxy on a node connection
# Enables a drbd proxy on a node connection
# @param resource [String] resource to use
# @param node_a [String] source node of the connection
# @param node_b [String] target node of the connection
# @param [Hash] opts the optional parameters
# @option opts [DrbdProxyEnable] :drbd_proxy_enable 
# @return [Array<(ApiCallRc, Integer, Hash)>] ApiCallRc data, response status code and response headers
enable a drbd proxy on a node connection
Enables a drbd proxy on a node connection
enable a drbd proxy on a node connection Enables a drbd proxy on a node connection
def resource_drbd_proxy_enable_with_http_info(resource, node_a, node_b, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: DevelopersApi.resource_drbd_proxy_enable ...'
      end
      if @api_client.config.client_side_validation && resource.nil?
        fail ArgumentError, "Missing the required parameter 'resource' when calling DevelopersApi.resource_drbd_proxy_enable"
      end
      if @api_client.config.client_side_validation && node_a.nil?
        fail ArgumentError, "Missing the required parameter 'node_a' when calling DevelopersApi.resource_drbd_proxy_enable"
      end
      if @api_client.config.client_side_validation && node_b.nil?
        fail ArgumentError, "Missing the required parameter 'node_b' when calling DevelopersApi.resource_drbd_proxy_enable"
      end
      local_var_path = '/v1/resource-definitions/{resource}/drbd-proxy/enable/{node_a}/{node_b}'.sub('{' + 'resource' + '}', CGI.escape(resource.to_s)).sub('{' + 'node_a' + '}', CGI.escape(node_a.to_s)).sub('{' + 'node_b' + '}', CGI.escape(node_b.to_s))
      query_params = opts[:query_params] || {}
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      content_type = @api_client.select_header_content_type(['application/json'])
      if !content_type.nil?
          header_params['Content-Type'] = content_type
      end
      form_params = opts[:form_params] || {}
      post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'drbd_proxy_enable'])
      return_type = opts[:debug_return_type] || 'ApiCallRc'
      auth_names = opts[:debug_auth_names] || []
      new_options = opts.merge(
        :operation => :"DevelopersApi.resource_drbd_proxy_enable",
        :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, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: DevelopersApi#resource_drbd_proxy_enable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def resource_drbd_proxy_enable_with_http_info ( resource , node_a , node_b , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: DevelopersApi.resource_drbd_proxy_enable ...' end if @api_client . config . client_side_validation && resource . nil? fail ArgumentError , "Missing the required parameter 'resource' when calling DevelopersApi.resource_drbd_proxy_enable" end if @api_client . config . client_side_validation && node_a . nil? fail ArgumentError , "Missing the required parameter 'node_a' when calling DevelopersApi.resource_drbd_proxy_enable" end if @api_client . config . client_side_validation && node_b . nil? fail ArgumentError , "Missing the required parameter 'node_b' when calling DevelopersApi.resource_drbd_proxy_enable" end local_var_path = '/v1/resource-definitions/{resource}/drbd-proxy/enable/{node_a}/{node_b}' . sub ( '{' + 'resource' + '}' , CGI . escape ( resource . to_s ) ) . sub ( '{' + 'node_a' + '}' , CGI . escape ( node_a . to_s ) ) . sub ( '{' + 'node_b' + '}' , CGI . escape ( node_b . to_s ) ) query_params = opts [ :query_params ] || { } header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) content_type = @api_client . select_header_content_type ( [ 'application/json' ] ) if ! content_type . nil? header_params [ 'Content-Type' ] = content_type end form_params = opts [ :form_params ] || { } post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( opts [ :' drbd_proxy_enable ' ] ) return_type = opts [ :debug_return_type ] || 'ApiCallRc' auth_names = opts [ :debug_auth_names ] || [ ] new_options = opts . merge ( :operation => :" DevelopersApi.resource_drbd_proxy_enable " , :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 , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: DevelopersApi#resource_drbd_proxy_enable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
enable a drbd proxy on a node connection
Enables a drbd proxy on a node connection
enable a drbd proxy on a node connection Enables a drbd proxy on a node connection
# verify the required parameter 'resource' is set # verify the required parameter 'node_a' is set # verify the required parameter 'node_b' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # HTTP header 'Content-Type' # form parameters # http body (model) # return_type # auth_names
ApiCallRc data, response status code and response headers
ApiCallRc data response status code and response headers
Array<(ApiCallRc, Integer, Hash)>
resource
resource to use
resource to use
node_a
source node of the connection
source node of the connection
node_b
target node of the connection
target node of the connection
opts
None
opts the optional parameters
opts the optional parameters