class VCloudSdk::Xml::DiskCreateParams

Public Instance Methods

add_locality(local) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# File lib/ruby_vcloud_sdk/xml/wrapper_classes/disk_create_params.rb, line 16
def size_bytes=(value)
  disk["size"] = value.to_s
end

Private Instance Methods

disk() click to toggle source
# File lib/ruby_vcloud_sdk/xml/wrapper_classes/disk_create_params.rb, line 36
def disk
  get_nodes("Disk").first
end
extract_uuid(id) click to toggle source
# File lib/ruby_vcloud_sdk/xml/wrapper_classes/disk_create_params.rb, line 40
def extract_uuid(id)
  id.split(":").first
end