1
0
Fork 0
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:
Nick Osborn 2013-10-14 18:28:43 +01:00
parent 409edda444
commit f521ad2ed0
6 changed files with 8 additions and 8 deletions

View file

@ -27,7 +27,7 @@ module Fog
if options.key?(:Description)
Description options[:Description]
end
Source(:href => "#{endpoint}vApp/#{source_id}")
Source(:href => "#{end_point}vApp/#{source_id}")
}
end.to_xml

View file

@ -29,7 +29,7 @@ module Fog
if options.key?(:Description)
Description options[:Description]
end
Source(:href => "#{endpoint}media/#{source_id}")
Source(:href => "#{end_point}media/#{source_id}")
if options.key?(:IsSourceDelete)
IsSourceDelete options[:IsSourceDelete]
end

View file

@ -40,7 +40,7 @@ module Fog
InstantiationParams {
# TODO
}
Source(:href => "#{endpoint}vApp/#{source_id}")
Source(:href => "#{end_point}vApp/#{source_id}")
if options.key?(:IsSourceDelete)
IsSourceDelete options[:IsSourceDelete]
end

View file

@ -30,7 +30,7 @@ module Fog
if options.key?(:Description)
Description options[:Description]
end
Source(:href => "#{endpoint}vAppTemplate/#{source_id}")
Source(:href => "#{end_point}vAppTemplate/#{source_id}")
if options.key?(:IsSourceDelete)
IsSourceDelete options[:IsSourceDelete]
end

View file

@ -19,7 +19,7 @@ module Fog
# @since vCloud API version 0.9
def put_cpu(id, num_cpus)
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:Description>Number of Virtual CPUs</rasd:Description>
<rasd:ElementName>#{num_cpus} virtual CPU(s)</rasd:ElementName>
@ -28,7 +28,7 @@ module Fog
<rasd:ResourceType>3</rasd:ResourceType>
<rasd:VirtualQuantity>#{num_cpus}</rasd:VirtualQuantity>
<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>
EOF

View file

@ -19,7 +19,7 @@ module Fog
# @since vCloud API version 0.9
def put_memory(id, memory)
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:Description>Memory Size</rasd:Description>
<rasd:ElementName>#{memory} MB of memory</rasd:ElementName>
@ -28,7 +28,7 @@ module Fog
<rasd:ResourceType>4</rasd:ResourceType>
<rasd:VirtualQuantity>#{memory}</rasd:VirtualQuantity>
<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>
EOF