Class: VCloudSdk::Xml::Vdc

Inherits:
Wrapper
  • Object
show all
Defined in:
lib/cloud/vcloud/xml/wrapper_classes/vdc.rb

Instance Method Summary collapse

Methods inherited from Wrapper

#==, #[], #[]=, #add_child, #attribute_with_ns, #content, #content=, #create_child, #create_qualified_name, #create_xpath_query, #doc_namespaces, #get_nodes, #href, #initialize, #name, #to_s, #type, #urn, #xpath

Constructor Details

This class inherits a constructor from VCloudSdk::Xml::Wrapper

Instance Method Details



5
6
7
# File 'lib/cloud/vcloud/xml/wrapper_classes/vdc.rb', line 5

def add_disk_link
   get_nodes("Link", {"type"=>MEDIA_TYPE[:DISK_CREATE_PARAMS]}).first
end

#available_network(name) ⇒ Object



47
48
49
50
# File 'lib/cloud/vcloud/xml/wrapper_classes/vdc.rb', line 47

def available_network(name)
  get_nodes("Network",
    {"type"=>MEDIA_TYPE[:NETWORK], "name"=>name}).first
end

#available_networksObject



43
44
45
# File 'lib/cloud/vcloud/xml/wrapper_classes/vdc.rb', line 43

def available_networks
  get_nodes("Network", {"type"=>MEDIA_TYPE[:NETWORK]})
end

#disks(name = nil) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/cloud/vcloud/xml/wrapper_classes/vdc.rb', line 9

def disks(name = nil)
  if name.nil?
    get_nodes("ResourceEntity", {"type"=>MEDIA_TYPE[:DISK]})
  else
    get_nodes("ResourceEntity",
      {"type"=>MEDIA_TYPE[:DISK], "name"=>name})
  end
end

#get_vapp(name) ⇒ Object



38
39
40
41
# File 'lib/cloud/vcloud/xml/wrapper_classes/vdc.rb', line 38

def get_vapp(name)
  get_nodes("ResourceEntity",
            {"type"=>MEDIA_TYPE[:VAPP], "name"=>name}).first
end

#get_vapp_templates(name) ⇒ Object

vApp Template names are not unique so multiple ones can be returned.



33
34
35
36
# File 'lib/cloud/vcloud/xml/wrapper_classes/vdc.rb', line 33

def get_vapp_templates(name)
  get_nodes("ResourceEntity",
    {"type"=>MEDIA_TYPE[:VAPP_TEMPLATE], "name"=>name})
end


18
19
20
21
# File 'lib/cloud/vcloud/xml/wrapper_classes/vdc.rb', line 18

def instantiate_vapp_template_link
  get_nodes("Link",
    {"type"=>MEDIA_TYPE[:INSTANTIATE_VAPP_TEMPLATE_PARAMS]}).first
end

#storage_profilesObject



52
53
54
55
# File 'lib/cloud/vcloud/xml/wrapper_classes/vdc.rb', line 52

def storage_profiles
  get_nodes("VdcStorageProfile",
    {"type"=>MEDIA_TYPE[:VDC_STORAGE_PROFILE]})
end


23
24
25
26
# File 'lib/cloud/vcloud/xml/wrapper_classes/vdc.rb', line 23

def upload_link
  get_nodes("Link",
    {"type"=>MEDIA_TYPE[:UPLOAD_VAPP_TEMPLATE_PARAMS]}).first
end


28
29
30
# File 'lib/cloud/vcloud/xml/wrapper_classes/vdc.rb', line 28

def upload_media_link
  get_nodes("Link", {"type"=>MEDIA_TYPE[:MEDIA]}).first
end