Class: Netscaler::Ssl::Vserver
- Inherits:
-
NetscalerService
- Object
- NetscalerService
- Netscaler::Ssl::Vserver
- Defined in:
- lib/netscaler/ssl/vserver.rb,
lib/netscaler/ssl/vserver/bind.rb,
lib/netscaler/ssl/vserver/unbind.rb
Defined Under Namespace
Instance Method Summary collapse
- #add(payload) ⇒ Object
- #bind ⇒ Object
-
#initialize(netscaler) ⇒ Vserver
constructor
A new instance of Vserver.
-
#remove(payload) ⇒ Object
:args: :name.
- #show(payload = {}) ⇒ Object
- #show_binding(payload) ⇒ Object
- #stat(payload) ⇒ Object
- #unbind ⇒ Object
- #update(payload) ⇒ Object
Methods inherited from NetscalerService
Constructor Details
#initialize(netscaler) ⇒ Vserver
Returns a new instance of Vserver.
6 7 8 |
# File 'lib/netscaler/ssl/vserver.rb', line 6 def initialize(netscaler) @netscaler=netscaler end |
Instance Method Details
#add(payload) ⇒ Object
33 34 35 36 37 |
# File 'lib/netscaler/ssl/vserver.rb', line 33 def add(payload) raise ArgumentError, 'payload cannot be null' if payload.nil? validate_payload(payload, [:name, :serviceType, :ipv46, :port]) return @netscaler.adapter.post_no_body('config/sslvserver/', {'sslvserver' => payload}) end |
#bind ⇒ Object
51 52 53 |
# File 'lib/netscaler/ssl/vserver.rb', line 51 def bind Bind.new @netscaler end |
#remove(payload) ⇒ Object
:args: :name
27 28 29 30 31 |
# File 'lib/netscaler/ssl/vserver.rb', line 27 def remove(payload) # :args: :name raise ArgumentError, 'payload cannot be null' if payload.nil? validate_payload(payload, [:name]) return @netscaler.adapter.delete("config/sslvserver/#{payload[:name]}") end |
#show(payload = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/netscaler/ssl/vserver.rb', line 10 def show(payload={}) if payload[:name] != nil then validate_payload(payload, [:name]) return @netscaler.adapter.get("config/sslvserver/#{payload[:name]}") elsif payload == {} then return @netscaler.adapter.get('config/sslvserver/') else raise ArgumentError, 'payload supplied must have been missing :name' end end |
#show_binding(payload) ⇒ Object
21 22 23 24 25 |
# File 'lib/netscaler/ssl/vserver.rb', line 21 def show_binding(payload) raise ArgumentError, 'payload cannot be null' if payload.nil? validate_payload(payload, [:name]) return @netscaler.adapter.get("config/sslvserver_binding/#{payload[:name]}") end |
#stat(payload) ⇒ Object
45 46 47 48 49 |
# File 'lib/netscaler/ssl/vserver.rb', line 45 def stat(payload) raise ArgumentError, 'payload cannot be null' if payload.nil? validate_payload(payload, [:name]) return @netscaler.adapter.get("stat/sslvserver/#{payload[:name]}") end |
#unbind ⇒ Object
55 56 57 |
# File 'lib/netscaler/ssl/vserver.rb', line 55 def unbind Unbind.new @netscaler end |
#update(payload) ⇒ Object
39 40 41 42 43 |
# File 'lib/netscaler/ssl/vserver.rb', line 39 def update(payload) raise ArgumentError, 'payload cannot be null' if payload.nil? validate_payload(payload, [:vservername]) return @netscaler.adapter.put('config/sslvserver/', {'sslvserver' => payload}, {no_wrapper: true}) end |