Class: Netscaler::Lb::Vserver::Bind

Inherits:
NetscalerService show all
Defined in:
lib/netscaler/lb/vserver/bind.rb

Instance Method Summary collapse

Methods inherited from NetscalerService

#validate_payload

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

Raises:

  • (ArgumentError)


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

Raises:

  • (ArgumentError)


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

Raises:

  • (ArgumentError)


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