Class: XClarityClient::RemoteAccessManagement

Inherits:
Object
  • Object
show all
Defined in:
lib/xclarity_client/services/remote_access_management.rb

Instance Method Summary collapse

Constructor Details

#initialize(conf) ⇒ RemoteAccessManagement

Returns a new instance of RemoteAccessManagement.



6
7
8
# File 'lib/xclarity_client/services/remote_access_management.rb', line 6

def initialize(conf)
  @connection = XClarityClient::Connection.new(conf)
end

Instance Method Details

#remote_control(uuid) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/xclarity_client/services/remote_access_management.rb', line 10

def remote_control(uuid)
  raise 'UUID must not be blank' if uuid.nil? || uuid.empty?
  con = @connection.do_get(
    "#{RemoteAccess::BASE_URI}/remoteControl", :query => { :uuid => uuid }
  )

  unless con.success?
    $lxca_log.error "XClarityClient::RemoteAccessManagement remote_control", "Request failed"
    raise 'Request failed'
  end

  build_remote_access_object(con)
end