Class: Netscaler::Service::Request

Inherits:
BaseRequest show all
Defined in:
lib/netscaler/service/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(service, options) ⇒ Object



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

def bind(service, options)
  params = {
    :name => options[:vserver],
    :servicename => service
  }
  send_request('bindlbvserver_service', params)
end

#disable(service, options) ⇒ Object



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

def disable(service, options)
  params = { 
    :name => service, 
    :delay => 0 
  }
  send_request('disableservice', params)
end

#enable(service, options) ⇒ Object



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

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

#status(service, options) ⇒ Object



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

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

#unbind(service, options) ⇒ Object



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

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