mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[vcloud_director] Call end_point
not endpoint
.
This commit is contained in:
parent
409edda444
commit
f521ad2ed0
6 changed files with 8 additions and 8 deletions
|
@ -27,7 +27,7 @@ module Fog
|
||||||
if options.key?(:Description)
|
if options.key?(:Description)
|
||||||
Description options[:Description]
|
Description options[:Description]
|
||||||
end
|
end
|
||||||
Source(:href => "#{endpoint}vApp/#{source_id}")
|
Source(:href => "#{end_point}vApp/#{source_id}")
|
||||||
}
|
}
|
||||||
end.to_xml
|
end.to_xml
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ module Fog
|
||||||
if options.key?(:Description)
|
if options.key?(:Description)
|
||||||
Description options[:Description]
|
Description options[:Description]
|
||||||
end
|
end
|
||||||
Source(:href => "#{endpoint}media/#{source_id}")
|
Source(:href => "#{end_point}media/#{source_id}")
|
||||||
if options.key?(:IsSourceDelete)
|
if options.key?(:IsSourceDelete)
|
||||||
IsSourceDelete options[:IsSourceDelete]
|
IsSourceDelete options[:IsSourceDelete]
|
||||||
end
|
end
|
||||||
|
|
|
@ -40,7 +40,7 @@ module Fog
|
||||||
InstantiationParams {
|
InstantiationParams {
|
||||||
# TODO
|
# TODO
|
||||||
}
|
}
|
||||||
Source(:href => "#{endpoint}vApp/#{source_id}")
|
Source(:href => "#{end_point}vApp/#{source_id}")
|
||||||
if options.key?(:IsSourceDelete)
|
if options.key?(:IsSourceDelete)
|
||||||
IsSourceDelete options[:IsSourceDelete]
|
IsSourceDelete options[:IsSourceDelete]
|
||||||
end
|
end
|
||||||
|
|
|
@ -30,7 +30,7 @@ module Fog
|
||||||
if options.key?(:Description)
|
if options.key?(:Description)
|
||||||
Description options[:Description]
|
Description options[:Description]
|
||||||
end
|
end
|
||||||
Source(:href => "#{endpoint}vAppTemplate/#{source_id}")
|
Source(:href => "#{end_point}vAppTemplate/#{source_id}")
|
||||||
if options.key?(:IsSourceDelete)
|
if options.key?(:IsSourceDelete)
|
||||||
IsSourceDelete options[:IsSourceDelete]
|
IsSourceDelete options[:IsSourceDelete]
|
||||||
end
|
end
|
||||||
|
|
|
@ -19,7 +19,7 @@ module Fog
|
||||||
# @since vCloud API version 0.9
|
# @since vCloud API version 0.9
|
||||||
def put_cpu(id, num_cpus)
|
def put_cpu(id, num_cpus)
|
||||||
data = <<EOF
|
data = <<EOF
|
||||||
<Item xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns12="http://www.vmware.com/vcloud/v1.5" ns12:href="#{endpoint}vApp/#{id}/virtualHardwareSection/cpu" ns12:type="application/vnd.vmware.vcloud.rasdItem+xml" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://10.194.1.65/api/v1.5/schema/master.xsd http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.22.0/CIM_ResourceAllocationSettingData.xsd">
|
<Item xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns12="http://www.vmware.com/vcloud/v1.5" ns12:href="#{end_point}vApp/#{id}/virtualHardwareSection/cpu" ns12:type="application/vnd.vmware.vcloud.rasdItem+xml" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://10.194.1.65/api/v1.5/schema/master.xsd http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.22.0/CIM_ResourceAllocationSettingData.xsd">
|
||||||
<rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits>
|
<rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits>
|
||||||
<rasd:Description>Number of Virtual CPUs</rasd:Description>
|
<rasd:Description>Number of Virtual CPUs</rasd:Description>
|
||||||
<rasd:ElementName>#{num_cpus} virtual CPU(s)</rasd:ElementName>
|
<rasd:ElementName>#{num_cpus} virtual CPU(s)</rasd:ElementName>
|
||||||
|
@ -28,7 +28,7 @@ module Fog
|
||||||
<rasd:ResourceType>3</rasd:ResourceType>
|
<rasd:ResourceType>3</rasd:ResourceType>
|
||||||
<rasd:VirtualQuantity>#{num_cpus}</rasd:VirtualQuantity>
|
<rasd:VirtualQuantity>#{num_cpus}</rasd:VirtualQuantity>
|
||||||
<rasd:Weight>0</rasd:Weight>
|
<rasd:Weight>0</rasd:Weight>
|
||||||
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="#{endpoint}vApp/#{id}/virtualHardwareSection/cpu"/>
|
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="#{end_point}vApp/#{id}/virtualHardwareSection/cpu"/>
|
||||||
</Item>
|
</Item>
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ module Fog
|
||||||
# @since vCloud API version 0.9
|
# @since vCloud API version 0.9
|
||||||
def put_memory(id, memory)
|
def put_memory(id, memory)
|
||||||
data = <<EOF
|
data = <<EOF
|
||||||
<Item xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns12="http://www.vmware.com/vcloud/v1.5" ns12:href="#{endpoint}vApp/#{id}/virtualHardwareSection/memory" ns12:type="application/vnd.vmware.vcloud.rasdItem+xml" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://10.194.1.65/api/v1.5/schema/master.xsd http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.22.0/CIM_ResourceAllocationSettingData.xsd">
|
<Item xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns12="http://www.vmware.com/vcloud/v1.5" ns12:href="#{end_point}vApp/#{id}/virtualHardwareSection/memory" ns12:type="application/vnd.vmware.vcloud.rasdItem+xml" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://10.194.1.65/api/v1.5/schema/master.xsd http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.22.0/CIM_ResourceAllocationSettingData.xsd">
|
||||||
<rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits>
|
<rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits>
|
||||||
<rasd:Description>Memory Size</rasd:Description>
|
<rasd:Description>Memory Size</rasd:Description>
|
||||||
<rasd:ElementName>#{memory} MB of memory</rasd:ElementName>
|
<rasd:ElementName>#{memory} MB of memory</rasd:ElementName>
|
||||||
|
@ -28,7 +28,7 @@ module Fog
|
||||||
<rasd:ResourceType>4</rasd:ResourceType>
|
<rasd:ResourceType>4</rasd:ResourceType>
|
||||||
<rasd:VirtualQuantity>#{memory}</rasd:VirtualQuantity>
|
<rasd:VirtualQuantity>#{memory}</rasd:VirtualQuantity>
|
||||||
<rasd:Weight>0</rasd:Weight>
|
<rasd:Weight>0</rasd:Weight>
|
||||||
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="#{endpoint}vApp/#{id}/virtualHardwareSection/memory"/>
|
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="#{end_point}vApp/#{id}/virtualHardwareSection/memory"/>
|
||||||
</Item>
|
</Item>
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue