Class: OneviewSDK::API200::WebServerCertificate
- Defined in:
- lib/oneview-sdk/resource/api200/web_server_certificate.rb
Overview
Web Server Certificate certificate resource implementation
Direct Known Subclasses
OneviewSDK::API300::C7000::WebServerCertificate, OneviewSDK::API300::Synergy::WebServerCertificate
Constant Summary collapse
- BASE_URI =
'/rest/certificates/https'.freeze
Constants inherited from Resource
Resource::DEFAULT_REQUEST_HEADER, Resource::UNIQUE_IDENTIFIERS
Instance Attribute Summary
Attributes inherited from Resource
#api_version, #client, #data, #logger
Class Method Summary collapse
-
.get_certificate(client, address, options = { 'requestername' => 'DEFAULT' }) ⇒ Boolean, WebServerCertificate
Retrieves the existing SSL certificate information.
Instance Method Summary collapse
-
#create ⇒ Resource
Creates a Certificate Signing Request (CSR) using input certificate data and returns the newly-created CSR.
-
#create! ⇒ Object
Method is not available.
-
#create_self_signed ⇒ Resource
Creates a new self-signed appliance certificate based on the certificate data provided.
-
#delete ⇒ Object
Method is not available.
-
#import ⇒ Resource
Imports a signed server certificate into the appliance.
-
#retrieve! ⇒ Boolean
Retrieves the existing SSL certificate information.
-
#update ⇒ Object
Method is not available.
Methods inherited from Resource
#==, #[], #[]=, build_query, #deep_merge!, #each, #eql?, #exists?, find_by, find_with_pagination, from_file, get_all, #initialize, #like?, #refresh, #schema, schema, #set, #set_all, #to_file
Constructor Details
This class inherits a constructor from OneviewSDK::Resource
Class Method Details
.get_certificate(client, address, options = { 'requestername' => 'DEFAULT' }) ⇒ Boolean, WebServerCertificate
Retrieves the existing SSL certificate information
57 58 59 60 61 |
# File 'lib/oneview-sdk/resource/api200/web_server_certificate.rb', line 57 def self.get_certificate(client, address, = { 'requestername' => 'DEFAULT' }) response = client.rest_api(:get, self::BASE_URI + "/remote/#{address}", ) body = client.response_handler(response) new(client, body) end |
Instance Method Details
#create ⇒ Resource
Calls the refresh method to set additional data
Creates a Certificate Signing Request (CSR) using input certificate data and returns the newly-created CSR.
78 79 80 81 82 83 |
# File 'lib/oneview-sdk/resource/api200/web_server_certificate.rb', line 78 def create ensure_client response = @client.rest_post(self.class::BASE_URI + '/certificaterequest', { 'body' => @data }, @api_version) body = @client.response_handler(response) set_all(body) end |
#create! ⇒ Object
Method is not available
34 35 36 |
# File 'lib/oneview-sdk/resource/api200/web_server_certificate.rb', line 34 def create!(*) unavailable_method end |
#create_self_signed ⇒ Resource
Creates a new self-signed appliance certificate based on the certificate data provided.
89 90 91 92 93 94 |
# File 'lib/oneview-sdk/resource/api200/web_server_certificate.rb', line 89 def create_self_signed ensure_client response = @client.rest_put(self.class::BASE_URI, { 'body' => @data }, @api_version) body = @client.response_handler(response) set_all(body) end |
#delete ⇒ Object
Method is not available
28 29 30 |
# File 'lib/oneview-sdk/resource/api200/web_server_certificate.rb', line 28 def delete(*) unavailable_method end |
#import ⇒ Resource
Imports a signed server certificate into the appliance
66 67 68 69 70 71 |
# File 'lib/oneview-sdk/resource/api200/web_server_certificate.rb', line 66 def import ensure_client response = @client.rest_put(self.class::BASE_URI + '/certificaterequest', { 'body' => @data }, @api_version) body = @client.response_handler(response) set_all(body) end |
#retrieve! ⇒ Boolean
Retrieves the existing SSL certificate information
40 41 42 43 44 45 |
# File 'lib/oneview-sdk/resource/api200/web_server_certificate.rb', line 40 def retrieve! response = @client.rest_get(self.class::BASE_URI) body = @client.response_handler(response) set_all(body) true end |
#update ⇒ Object
Method is not available
22 23 24 |
# File 'lib/oneview-sdk/resource/api200/web_server_certificate.rb', line 22 def update(*) unavailable_method end |