Module: XClarityClient::Mixins::SwitchMixin

Included in:
Client
Defined in:
lib/xclarity_client/mixins/switch_mixin.rb

Overview

Exposes SwitchManagement features

Instance Method Summary collapse

Instance Method Details

#discover_switches(opts = {}) ⇒ Object



6
7
8
# File 'lib/xclarity_client/mixins/switch_mixin.rb', line 6

def discover_switches(opts = {})
  switch_management.fetch_all(opts)
end

#fetch_switches(uuids = nil, include_attributes = nil, exclude_attributes = nil) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/xclarity_client/mixins/switch_mixin.rb', line 10

def fetch_switches(uuids = nil,
                   include_attributes = nil,
                   exclude_attributes = nil)
  switch_management.get_object(
    uuids,
    include_attributes,
    exclude_attributes
  )
end

#power_cycle_soft_switch(uuid = '') ⇒ Object



20
21
22
# File 'lib/xclarity_client/mixins/switch_mixin.rb', line 20

def power_cycle_soft_switch(uuid = '')
  switch_management.set_power_state(uuid, :powerCycleSoft)
end