Class: Harbor1Client::SystemApi
- Inherits:
-
Object
- Object
- Harbor1Client::SystemApi
- Defined in:
- lib/harbor1_client/api/system_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ SystemApi
constructor
A new instance of SystemApi.
-
#system_cve_whitelist_get(opts = {}) ⇒ CVEWhitelist
Get the system level whitelist of CVE.
-
#system_cve_whitelist_get_with_http_info(opts = {}) ⇒ Array<(CVEWhitelist, Fixnum, Hash)>
Get the system level whitelist of CVE.
-
#system_cve_whitelist_put(opts = {}) ⇒ nil
Update the system level whitelist of CVE.
-
#system_cve_whitelist_put_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update the system level whitelist of CVE.
-
#system_oidc_ping_post(endpoint, opts = {}) ⇒ nil
Test the OIDC endpoint.
-
#system_oidc_ping_post_with_http_info(endpoint, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Test the OIDC endpoint.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/harbor1_client/api/system_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#system_cve_whitelist_get(opts = {}) ⇒ CVEWhitelist
Get the system level whitelist of CVE. Get the system level whitelist of CVE. This API can be called by all authenticated users.
26 27 28 29 |
# 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 = {}) ⇒ Array<(CVEWhitelist, Fixnum, Hash)>
Get the system level whitelist of CVE. Get the system level whitelist of CVE. This API can be called by all authenticated users.
35 36 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 |
# 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 = {}) ⇒ nil
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.
75 76 77 78 |
# 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 = {}) ⇒ Array<(nil, Fixnum, Hash)>
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.
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 114 115 116 117 118 |
# 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 = {}) ⇒ nil
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.
124 125 126 127 |
# 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 = {}) ⇒ Array<(nil, Fixnum, Hash)>
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.
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 |
# 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 |