Class: Netscaler::Lb::Vserver::Unbind

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

Instance Method Summary collapse

Methods inherited from NetscalerService

#validate_payload

Constructor Details

#initialize(netscaler) ⇒ Unbind

Returns a new instance of Unbind.



6
7
8
# File 'lib/netscaler/lb/vserver/unbind.rb', line 6

def initialize(netscaler)
  @netscaler=netscaler
end

Instance Method Details

#responder_policy(payload) ⇒ Object

Raises:

  • (ArgumentError)


22
23
24
25
26
# File 'lib/netscaler/lb/vserver/unbind.rb', line 22

def responder_policy(payload)
  raise ArgumentError, 'payload cannot be null' if payload.nil?
  validate_payload(payload, [:name, :policyName])
  return @netscaler.adapter.post_no_body("config/lbvserver_service_binding/#{payload['name']}?action=bind/", {'params' => {'action' => 'unbind'}, 'lbvserver_rewritepolicy_binding' => payload})
end

#rewrite_policy(payload) ⇒ Object

Raises:

  • (ArgumentError)


16
17
18
19
20
# File 'lib/netscaler/lb/vserver/unbind.rb', line 16

def rewrite_policy(payload)
  raise ArgumentError, 'payload cannot be null' if payload.nil?
  validate_payload(payload, [:name, :policyName])
  return @netscaler.adapter.post_no_body("config/lbvserver_service_binding/#{payload['name']}?action=bind/", {'params' => {'action' => 'unbind'}, 'lbvserver_rewritepolicy_binding' => payload})
end

#service(payload) ⇒ Object

Raises:

  • (ArgumentError)


10
11
12
13
14
# File 'lib/netscaler/lb/vserver/unbind.rb', line 10

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=unbind/", {'params' => {'action' => 'unbind'}, 'lbvserver_service_binding' => payload})
end