Class: Morpheus::VdiInterface

Inherits:
APIClient
  • Object
show all
Defined in:
lib/morpheus/api/vdi_interface.rb

Overview

Interface for VDI Persona that provides viewing and allocating virtual desktops (VDI pools)

Instance Method Summary collapse

Instance Method Details

#allocate(id, payload, params = {}) ⇒ Object



23
24
25
26
# File 'lib/morpheus/api/vdi_interface.rb', line 23

def allocate(id, payload, params={})
  validate_id!(id)
  execute(method: :post, url: "#{base_path}/#{id}/allocate", params: params, payload: payload.to_json)
end

#base_pathObject



6
7
8
# File 'lib/morpheus/api/vdi_interface.rb', line 6

def base_path
  "/api/vdi"
end

#get(id, params = {}) ⇒ Object



18
19
20
21
# File 'lib/morpheus/api/vdi_interface.rb', line 18

def get(id, params={})
  validate_id!(id)
  execute(method: :get, url: "#{base_path}/#{id}", params: params)
end

#list(params = {}) ⇒ Object

def dashboard(params={}) execute(method: :get, url: "##base_path/dashboard", params: params) end



14
15
16
# File 'lib/morpheus/api/vdi_interface.rb', line 14

def list(params={})
  execute(method: :get, url: "#{base_path}", params: params)
end