Class: Falcon::Deployments

Inherits:
Object
  • Object
show all
Defined in:
lib/crimson-falcon/api/deployments.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ Deployments

Returns a new instance of Deployments.



36
37
38
# File 'lib/crimson-falcon/api/deployments.rb', line 36

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



34
35
36
# File 'lib/crimson-falcon/api/deployments.rb', line 34

def api_client
  @api_client
end

Instance Method Details

#get_deployments_external_v1(authorization, ids, opts = {}) ⇒ DeploymentsAPIDeploymentViewWrapper

Get deployment resources by ids

Parameters:

  • authorization (String)

    authorization header

  • ids (Array<String>)

    release version ids to retrieve deployment details

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_cs_username (String)

    user name

Returns:



45
46
47
48
# File 'lib/crimson-falcon/api/deployments.rb', line 45

def get_deployments_external_v1(authorization, ids, opts = {})
  data, _status_code, _headers = get_deployments_external_v1_with_http_info(authorization, ids, opts)
  data
end

#get_deployments_external_v1_with_http_info(authorization, ids, opts = {}) ⇒ Array<(DeploymentsAPIDeploymentViewWrapper, Integer, Hash)>

Get deployment resources by ids

Parameters:

  • authorization (String)

    authorization header

  • ids (Array<String>)

    release version ids to retrieve deployment details

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_cs_username (String)

    user name

Returns:



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
110
111
112
113
# File 'lib/crimson-falcon/api/deployments.rb', line 56

def get_deployments_external_v1_with_http_info(authorization, ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Deployments.get_deployments_external_v1 ...'
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    fail ArgumentError, "Missing the required parameter 'authorization' when calling Deployments.get_deployments_external_v1"
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling Deployments.get_deployments_external_v1"
  end
  if @api_client.config.client_side_validation && ids.length < 1
    fail ArgumentError, 'invalid value for "ids" when calling Deployments.get_deployments_external_v1, number of items must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/deployment-coordinator/entities/deployments/external/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(ids, :csv)

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Authorization'] = authorization
  header_params[:'X-CS-USERNAME'] = opts[:'x_cs_username'] if !opts[:'x_cs_username'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DeploymentsAPIDeploymentViewWrapper'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Deployments.get_deployments_external_v1",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Deployments#get_deployments_external_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end