Class: CloudControl::API::Server

Inherits:
Core
  • Object
show all
Defined in:
lib/cloudcontrol/api/server.rb

Instance Attribute Summary

Attributes inherited from Core

#client

Instance Method Summary collapse

Methods inherited from Core

#endpoint, #get, #get_simple, #initialize, #log, #org_endpoint, #org_id, #perform, #post, #post_simple, #query_params, #request_query_string, #request_simple_body, #request_xml_body, #simple_params, #single, #xml_params

Constructor Details

This class inherits a constructor from CloudControl::API::Core

Instance Method Details

#list(options = {}) ⇒ Object



3
4
5
6
7
# File 'lib/cloudcontrol/api/server.rb', line 3

def list(options = {})
  org_endpoint '/server/server'
  query_params options
  get_simple
end

#list_anti_affinity_rules(options = {}) ⇒ Object



9
10
11
12
13
# File 'lib/cloudcontrol/api/server.rb', line 9

def list_anti_affinity_rules(options = {})
  org_endpoint '/server/antiAffinityRule'
  query_params options
  get_simple
end

#list_nics(vlan_id, options = {}) ⇒ Object



22
23
24
25
26
27
# File 'lib/cloudcontrol/api/server.rb', line 22

def list_nics(vlan_id, options = {})
  org_endpoint '/server/nic'
  options[:vlanId] = vlan_id
  query_params options
  get_simple
end

#list_snapshots(server_id, options = {}) ⇒ Object



15
16
17
18
19
20
# File 'lib/cloudcontrol/api/server.rb', line 15

def list_snapshots(server_id, options = {})
  org_endpoint '/snapshot/snapshot'
  options[:serverId] = server_id
  query_params options
  get_simple
end