Class: PulpRpmClient::RepositoriesRpmVersionsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ RepositoriesRpmVersionsApi

Returns a new instance of RepositoriesRpmVersionsApi.



19
20
21
# File 'lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb', line 19

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#delete(rpm_repository_version_href, opts = {}) ⇒ AsyncOperationResponse

Delete a repository version Trigger an asynchronous task to delete a repositroy version.

Parameters:

  • rpm_repository_version_href (String)

    URI of Repository Version. e.g.: /pulp/api/v3/repositories/rpm/rpm/1/versions/1/

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

    the optional parameters

Returns:



27
28
29
30
# File 'lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb', line 27

def delete(rpm_repository_version_href, opts = {})
  data, _status_code, _headers = delete_with_http_info(rpm_repository_version_href, opts)
  data
end

#delete_with_http_info(rpm_repository_version_href, opts = {}) ⇒ Array<(AsyncOperationResponse, Integer, Hash)>

Delete a repository version Trigger an asynchronous task to delete a repositroy version.

Parameters:

  • rpm_repository_version_href (String)

    URI of Repository Version. e.g.: /pulp/api/v3/repositories/rpm/rpm/1/versions/1/

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

    the optional parameters

Returns:

  • (Array<(AsyncOperationResponse, Integer, Hash)>)

    AsyncOperationResponse data, response status code and response headers



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
# File 'lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb', line 37

def delete_with_http_info(rpm_repository_version_href, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RepositoriesRpmVersionsApi.delete ...'
  end
  # verify the required parameter 'rpm_repository_version_href' is set
  if @api_client.config.client_side_validation && rpm_repository_version_href.nil?
    fail ArgumentError, "Missing the required parameter 'rpm_repository_version_href' when calling RepositoriesRpmVersionsApi.delete"
  end
  # resource path
  local_var_path = '{rpm_repository_version_href}'.sub('{' + 'rpm_repository_version_href' + '}', CGI.escape(rpm_repository_version_href.to_s).gsub('%2F', '/'))

  # 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'])

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

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

  # return_type
  return_type = opts[:return_type] || 'AsyncOperationResponse' 

  # auth_names
  auth_names = opts[:auth_names] || ['Basic']

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

#list(rpm_repository_href, opts = {}) ⇒ InlineResponse20014

List repository versions RpmRepositoryVersion represents a single rpm repository version.

Parameters:

  • rpm_repository_href (String)

    URI of Rpm Repository. e.g.: /pulp/api/v3/repositories/rpm/rpm/1/

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

    the optional parameters

Options Hash (opts):

  • :ordering (String)

    Which field to use when ordering the results.

  • :number (Float)
  • :number__lt (Float)

    Filter results where number is less than value

  • :number__lte (Float)

    Filter results where number is less than or equal to value

  • :number__gt (Float)

    Filter results where number is greater than value

  • :number__gte (Float)

    Filter results where number is greater than or equal to value

  • :number__range (Float)

    Filter results where number is between two comma separated values

  • :pulp_created__lt (String)

    Filter results where pulp_created is less than value

  • :pulp_created__lte (String)

    Filter results where pulp_created is less than or equal to value

  • :pulp_created__gt (String)

    Filter results where pulp_created is greater than value

  • :pulp_created__gte (String)

    Filter results where pulp_created is greater than or equal to value

  • :pulp_created__range (String)

    Filter results where pulp_created is between two comma separated values

  • :content (String)

    Content Unit referenced by HREF

  • :pulp_created (String)

    ISO 8601 formatted dates are supported

  • :limit (Integer)

    Number of results to return per page.

  • :offset (Integer)

    The initial index from which to return the results.

  • :fields (String)

    A list of fields to include in the response.

  • :exclude_fields (String)

    A list of fields to exclude from the response.

Returns:



107
108
109
110
# File 'lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb', line 107

def list(rpm_repository_href, opts = {})
  data, _status_code, _headers = list_with_http_info(rpm_repository_href, opts)
  data
end

#list_with_http_info(rpm_repository_href, opts = {}) ⇒ Array<(InlineResponse20014, Integer, Hash)>

List repository versions RpmRepositoryVersion represents a single rpm repository version.

Parameters:

  • rpm_repository_href (String)

    URI of Rpm Repository. e.g.: /pulp/api/v3/repositories/rpm/rpm/1/

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

    the optional parameters

Options Hash (opts):

  • :ordering (String)

    Which field to use when ordering the results.

  • :number (Float)
  • :number__lt (Float)

    Filter results where number is less than value

  • :number__lte (Float)

    Filter results where number is less than or equal to value

  • :number__gt (Float)

    Filter results where number is greater than value

  • :number__gte (Float)

    Filter results where number is greater than or equal to value

  • :number__range (Float)

    Filter results where number is between two comma separated values

  • :pulp_created__lt (String)

    Filter results where pulp_created is less than value

  • :pulp_created__lte (String)

    Filter results where pulp_created is less than or equal to value

  • :pulp_created__gt (String)

    Filter results where pulp_created is greater than value

  • :pulp_created__gte (String)

    Filter results where pulp_created is greater than or equal to value

  • :pulp_created__range (String)

    Filter results where pulp_created is between two comma separated values

  • :content (String)

    Content Unit referenced by HREF

  • :pulp_created (String)

    ISO 8601 formatted dates are supported

  • :limit (Integer)

    Number of results to return per page.

  • :offset (Integer)

    The initial index from which to return the results.

  • :fields (String)

    A list of fields to include in the response.

  • :exclude_fields (String)

    A list of fields to exclude from the response.

Returns:

  • (Array<(InlineResponse20014, Integer, Hash)>)

    InlineResponse20014 data, response status code and response headers



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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb', line 135

def list_with_http_info(rpm_repository_href, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RepositoriesRpmVersionsApi.list ...'
  end
  # verify the required parameter 'rpm_repository_href' is set
  if @api_client.config.client_side_validation && rpm_repository_href.nil?
    fail ArgumentError, "Missing the required parameter 'rpm_repository_href' when calling RepositoriesRpmVersionsApi.list"
  end
  # resource path
  local_var_path = '{rpm_repository_href}versions/'.sub('{' + 'rpm_repository_href' + '}', CGI.escape(rpm_repository_href.to_s).gsub('%2F', '/'))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
  query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
  query_params[:'number__lt'] = opts[:'number__lt'] if !opts[:'number__lt'].nil?
  query_params[:'number__lte'] = opts[:'number__lte'] if !opts[:'number__lte'].nil?
  query_params[:'number__gt'] = opts[:'number__gt'] if !opts[:'number__gt'].nil?
  query_params[:'number__gte'] = opts[:'number__gte'] if !opts[:'number__gte'].nil?
  query_params[:'number__range'] = opts[:'number__range'] if !opts[:'number__range'].nil?
  query_params[:'pulp_created__lt'] = opts[:'pulp_created__lt'] if !opts[:'pulp_created__lt'].nil?
  query_params[:'pulp_created__lte'] = opts[:'pulp_created__lte'] if !opts[:'pulp_created__lte'].nil?
  query_params[:'pulp_created__gt'] = opts[:'pulp_created__gt'] if !opts[:'pulp_created__gt'].nil?
  query_params[:'pulp_created__gte'] = opts[:'pulp_created__gte'] if !opts[:'pulp_created__gte'].nil?
  query_params[:'pulp_created__range'] = opts[:'pulp_created__range'] if !opts[:'pulp_created__range'].nil?
  query_params[:'content'] = opts[:'content'] if !opts[:'content'].nil?
  query_params[:'pulp_created'] = opts[:'pulp_created'] if !opts[:'pulp_created'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'InlineResponse20014' 

  # auth_names
  auth_names = opts[:auth_names] || ['Basic']

  new_options = opts.merge(
    :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: RepositoriesRpmVersionsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#read(rpm_repository_version_href, opts = {}) ⇒ RepositoryVersion

Inspect a repository version RpmRepositoryVersion represents a single rpm repository version.

Parameters:

  • rpm_repository_version_href (String)

    URI of Repository Version. e.g.: /pulp/api/v3/repositories/rpm/rpm/1/versions/1/

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

    the optional parameters

Options Hash (opts):

  • :fields (String)

    A list of fields to include in the response.

  • :exclude_fields (String)

    A list of fields to exclude from the response.

Returns:



207
208
209
210
# File 'lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb', line 207

def read(rpm_repository_version_href, opts = {})
  data, _status_code, _headers = read_with_http_info(rpm_repository_version_href, opts)
  data
end

#read_with_http_info(rpm_repository_version_href, opts = {}) ⇒ Array<(RepositoryVersion, Integer, Hash)>

Inspect a repository version RpmRepositoryVersion represents a single rpm repository version.

Parameters:

  • rpm_repository_version_href (String)

    URI of Repository Version. e.g.: /pulp/api/v3/repositories/rpm/rpm/1/versions/1/

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

    the optional parameters

Options Hash (opts):

  • :fields (String)

    A list of fields to include in the response.

  • :exclude_fields (String)

    A list of fields to exclude from the response.

Returns:

  • (Array<(RepositoryVersion, Integer, Hash)>)

    RepositoryVersion data, response status code and response headers



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
# File 'lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb', line 219

def read_with_http_info(rpm_repository_version_href, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RepositoriesRpmVersionsApi.read ...'
  end
  # verify the required parameter 'rpm_repository_version_href' is set
  if @api_client.config.client_side_validation && rpm_repository_version_href.nil?
    fail ArgumentError, "Missing the required parameter 'rpm_repository_version_href' when calling RepositoriesRpmVersionsApi.read"
  end
  # resource path
  local_var_path = '{rpm_repository_version_href}'.sub('{' + 'rpm_repository_version_href' + '}', CGI.escape(rpm_repository_version_href.to_s).gsub('%2F', '/'))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'RepositoryVersion' 

  # auth_names
  auth_names = opts[:auth_names] || ['Basic']

  new_options = opts.merge(
    :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: RepositoriesRpmVersionsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end