class Harbor1Client::SystemApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/harbor1_client/api/system_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

system_cve_whitelist_get(opts = {}) click to toggle source

Get the system level whitelist of CVE. Get the system level whitelist of CVE. This API can be called by all authenticated users. @param [Hash] opts the optional parameters @return [CVEWhitelist]

# File lib/harbor1_client/api/system_api.rb, line 26
def system_cve_whitelist_get(opts = {})
  data, _status_code, _headers = system_cve_whitelist_get_with_http_info(opts)
  data
end
system_cve_whitelist_get_with_http_info(opts = {}) click to toggle source

Get the system level whitelist of CVE. Get the system level whitelist of CVE. This API can be called by all authenticated users. @param [Hash] opts the optional parameters @return [Array<(CVEWhitelist, Fixnum, Hash)>] CVEWhitelist data, response status code and response headers

# File lib/harbor1_client/api/system_api.rb, line 35
def system_cve_whitelist_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SystemApi.system_cve_whitelist_get ...'
  end
  # resource path
  local_var_path = '/system/CVEWhitelist'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CVEWhitelist')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SystemApi#system_cve_whitelist_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
system_cve_whitelist_put(opts = {}) click to toggle source

Update the system level whitelist of CVE. This API overwrites the system level whitelist of CVE with the list in request body. Only system Admin has permission to call this API. @param [Hash] opts the optional parameters @option opts [CVEWhitelist] :whitelist The whitelist with new content @return [nil]

# File lib/harbor1_client/api/system_api.rb, line 75
def system_cve_whitelist_put(opts = {})
  system_cve_whitelist_put_with_http_info(opts)
  nil
end
system_cve_whitelist_put_with_http_info(opts = {}) click to toggle source

Update the system level whitelist of CVE. This API overwrites the system level whitelist of CVE with the list in request body. Only system Admin has permission to call this API. @param [Hash] opts the optional parameters @option opts [CVEWhitelist] :whitelist The whitelist with new content @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/harbor1_client/api/system_api.rb, line 85
def system_cve_whitelist_put_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SystemApi.system_cve_whitelist_put ...'
  end
  # resource path
  local_var_path = '/system/CVEWhitelist'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'whitelist'])
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SystemApi#system_cve_whitelist_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
system_oidc_ping_post(endpoint, opts = {}) click to toggle source

Test the OIDC endpoint. Test the OIDC endpoint, the setting of the endpoint is provided in the request. This API can only be called by system admin. @param endpoint Request body for OIDC endpoint to be tested. @param [Hash] opts the optional parameters @return [nil]

# File lib/harbor1_client/api/system_api.rb, line 124
def system_oidc_ping_post(endpoint, opts = {})
  system_oidc_ping_post_with_http_info(endpoint, opts)
  nil
end
system_oidc_ping_post_with_http_info(endpoint, opts = {}) click to toggle source

Test the OIDC endpoint. Test the OIDC endpoint, the setting of the endpoint is provided in the request. This API can only be called by system admin. @param endpoint Request body for OIDC endpoint to be tested. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/harbor1_client/api/system_api.rb, line 134
def system_oidc_ping_post_with_http_info(endpoint, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SystemApi.system_oidc_ping_post ...'
  end
  # verify the required parameter 'endpoint' is set
  if @api_client.config.client_side_validation && endpoint.nil?
    fail ArgumentError, "Missing the required parameter 'endpoint' when calling SystemApi.system_oidc_ping_post"
  end
  # resource path
  local_var_path = '/system/oidc/ping'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(endpoint)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SystemApi#system_oidc_ping_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end