Class: Netscaler::Lb::Vserver::Bind
- Inherits:
-
NetscalerService
- Object
- NetscalerService
- Netscaler::Lb::Vserver::Bind
- Defined in:
- lib/netscaler/lb/vserver/bind.rb
Instance Method Summary collapse
-
#initialize(netscaler) ⇒ Bind
constructor
A new instance of Bind.
- #responder_policy(payload) ⇒ Object
- #rewrite_policy(payload) ⇒ Object
- #service(payload) ⇒ Object
Methods inherited from NetscalerService
Constructor Details
#initialize(netscaler) ⇒ Bind
Returns a new instance of Bind.
5 6 7 |
# File 'lib/netscaler/lb/vserver/bind.rb', line 5 def initialize(netscaler) @netscaler=netscaler end |
Instance Method Details
#responder_policy(payload) ⇒ Object
21 22 23 24 25 |
# File 'lib/netscaler/lb/vserver/bind.rb', line 21 def responder_policy(payload) raise ArgumentError, 'payload cannot be null' if payload.nil? validate_payload(payload, [:name, :policyName, :priority]) return @netscaler.adapter.post_no_body("config/lbvserver_responderpolicy_binding/#{payload['name']}?action=bind/", {'params' => {'action' => 'bind'}, 'lbvserver_responderpolicy_binding' => payload}) end |
#rewrite_policy(payload) ⇒ Object
15 16 17 18 19 |
# File 'lib/netscaler/lb/vserver/bind.rb', line 15 def rewrite_policy(payload) raise ArgumentError, 'payload cannot be null' if payload.nil? validate_payload(payload, [:name, :policyName, :priority, :bindpoint]) return @netscaler.adapter.post_no_body("config/lbvserver_service_binding/#{payload['name']}?action=bind/", {'params' => {'action' => 'bind'}, 'lbvserver_rewritepolicy_binding' => payload}) end |
#service(payload) ⇒ Object
9 10 11 12 13 |
# File 'lib/netscaler/lb/vserver/bind.rb', line 9 def service(payload) raise ArgumentError, 'payload cannot be null' if payload.nil? validate_payload(payload, [:name, :serviceName]) return @netscaler.adapter.post_no_body("config/lbvserver_service_binding/#{payload['name']}?action=bind/", {'params' => {'action' => 'bind'}, 'lbvserver_service_binding' => payload}) end |