Class: Netscaler::Ssl::Certkey
- Inherits:
-
NetscalerService
- Object
- NetscalerService
- Netscaler::Ssl::Certkey
- Defined in:
- lib/netscaler/ssl/certkey.rb
Instance Method Summary collapse
- #add(payload = {}) ⇒ Object
-
#initialize(netscaler) ⇒ Certkey
constructor
A new instance of Certkey.
- #remove(payload = {}) ⇒ Object
Methods inherited from NetscalerService
Constructor Details
#initialize(netscaler) ⇒ Certkey
Returns a new instance of Certkey.
6 7 8 |
# File 'lib/netscaler/ssl/certkey.rb', line 6 def initialize(netscaler) @netscaler = netscaler end |
Instance Method Details
#add(payload = {}) ⇒ Object
10 11 12 13 14 |
# File 'lib/netscaler/ssl/certkey.rb', line 10 def add(payload={}) raise ArgumentError, 'payload cannot be null' if payload.nil? validate_payload(payload, [:certkey, :cert, :key]) return @netscaler.adapter.post('config/sslcertkey', { 'sslcertkey' => payload }) end |
#remove(payload = {}) ⇒ Object
16 17 18 19 20 |
# File 'lib/netscaler/ssl/certkey.rb', line 16 def remove(payload={}) raise ArgumentError, 'payload cannot be null' if payload.nil? validate_payload(payload, [:certkey]) return @netscaler.adapter.delete("config/sslcertkey/#{payload[:certkey]}") end |