Class: Netscaler::ServiceGroup::Request

Inherits:
BaseRequest show all
Defined in:
lib/netscaler/servicegroup/request.rb

Instance Attribute Summary

Attributes inherited from BaseRequest

#client

Instance Method Summary collapse

Methods inherited from BaseRequest

#initialize

Methods included from Logging

configure, log, #log

Constructor Details

This class inherits a constructor from Netscaler::BaseRequest

Instance Method Details

#bind(servicegroup, options) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/netscaler/servicegroup/request.rb', line 19

def bind(servicegroup, options)
  params = {
    :name => options[:vserver],
    :servicegroupname => servicegroup
  }
  send_request('bindlbvserver_servicegroup', params)
end

#disable(servicegroup, options) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/netscaler/servicegroup/request.rb', line 11

def disable(servicegroup, options)
  params = { 
    :servicegroupname => servicename, 
    :delay => 0 
  }
  send_request('disableservicegroup', params)
end

#enable(service, options) ⇒ Object



6
7
8
9
# File 'lib/netscaler/servicegroup/request.rb', line 6

def enable(service, options)
  params = { :servicegroupname => service }
  send_request('enableservicegroup', params)
end

#status(servicegroup, options) ⇒ Object



35
36
37
38
39
40
# File 'lib/netscaler/servicegroup/request.rb', line 35

def status(servicegroup, options)
  params = { :servicegroupname => servicegroup }
  send_request('getservicegroup', params) do |response|
    yield Response.new(response).to_hash if block_given?
  end
end

#unbind(servicegroup, options) ⇒ Object



27
28
29
30
31
32
33
# File 'lib/netscaler/servicegroup/request.rb', line 27

def unbind(servicegroup, options)
  params = {
    :name => options[:vserver],
    :servicename => servicegroup
  }
  send_request('unbindlbvserver_servicegroup', params)
end