Class: VCloudSdk::Xml::DiskCreateParams

Inherits:
Wrapper
  • Object
show all
Defined in:
lib/ruby_vcloud_sdk/xml/wrapper_classes/disk_create_params.rb

Instance Method Summary collapse

Methods inherited from Wrapper

#==, #[], #[]=, #add_child, #attribute, #content, #content=, #create_child, #create_qualified_name, #create_xpath_query, #doc_namespaces, #edit_link, #get_nodes, #href, #href=, #href_id, #initialize, #name, #power_off_link, #power_on_link, #remove_link, #running_tasks, #to_s, #type, #type=, #undeploy_link, #urn, #xpath

Constructor Details

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

Instance Method Details

#add_locality(local) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/disk_create_params.rb', line 20

def add_locality(local)
  if !@local_exists.nil? && @local_exists
    fail "Cannot add locality more than once to DiskCreateParams"
  end
  @local_exists = true
  node = create_child("Locality")
  node["href"] = local.href
  # Bug in create independent disk API.  It needs the UUID part of the
  # ID instead of the entire ID like other REST API calls.
  node["id"] = extract_uuid(local.urn)
  node["type"] = MEDIA_TYPE[:VM]
  disk.node.after(node)
end

#bus_sub_type=(value) ⇒ Object



8
9
10
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/disk_create_params.rb', line 8

def bus_sub_type=(value)
  disk["busSubType"] = value.to_s
end

#bus_type=(value) ⇒ Object



4
5
6
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/disk_create_params.rb', line 4

def bus_type=(value)
  disk["busType"] = value.to_s
end

#name=(name) ⇒ Object



12
13
14
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/disk_create_params.rb', line 12

def name=(name)
  disk["name"] = name.to_s
end

#size_bytes=(value) ⇒ Object



16
17
18
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/disk_create_params.rb', line 16

def size_bytes=(value)
  disk["size"] = value.to_s
end