Class: Netscaler::Cs::Policylabel
- Inherits:
-
NetscalerService
- Object
- NetscalerService
- Netscaler::Cs::Policylabel
- Defined in:
- lib/netscaler/cs/policylabel.rb
Instance Method Summary collapse
-
#initialize(netscaler) ⇒ Policylabel
constructor
A new instance of Policylabel.
- #show(payload = {}) ⇒ Object
- #show_binding(payload) ⇒ Object
Methods inherited from NetscalerService
Constructor Details
#initialize(netscaler) ⇒ Policylabel
Returns a new instance of Policylabel.
7 8 9 |
# File 'lib/netscaler/cs/policylabel.rb', line 7 def initialize(netscaler) @netscaler=netscaler end |
Instance Method Details
#show(payload = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/netscaler/cs/policylabel.rb', line 11 def show(payload={}) if payload[:name] != nil then validate_payload(payload, [:name]) return @netscaler.adapter.get("config/cspolicylabel/#{payload[:name]}") elsif payload == {} then return @netscaler.adapter.get('config/cspolicylabel/') else raise ArgumentError, 'payload supplied must have been missing :name' end end |
#show_binding(payload) ⇒ Object
22 23 24 25 26 |
# File 'lib/netscaler/cs/policylabel.rb', line 22 def show_binding(payload) raise ArgumentError, 'payload cannot be null' if payload.nil? validate_payload(payload, [:name]) return @netscaler.adapter.get("config/cspolicylabel_binding/#{payload[:name]}") end |