fog 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Rakefile +3 -3
- data/changelog.txt +213 -0
- data/docs/compute/index.markdown +15 -1
- data/fog.gemspec +3 -3
- data/lib/fog.rb +1 -1
- data/lib/fog/aws.rb +9 -0
- data/lib/fog/aws/auto_scaling.rb +3 -1
- data/lib/fog/aws/cloud_formation.rb +2 -0
- data/lib/fog/aws/cloud_watch.rb +2 -0
- data/lib/fog/aws/compute.rb +9 -3
- data/lib/fog/aws/elasticache.rb +8 -1
- data/lib/fog/aws/elb.rb +2 -0
- data/lib/fog/aws/models/cloud_watch/metric_statistic.rb +1 -2
- data/lib/fog/aws/models/compute/security_group.rb +1 -1
- data/lib/fog/aws/models/compute/server.rb +3 -1
- data/lib/fog/aws/models/dns/records.rb +3 -3
- data/lib/fog/aws/models/elb/load_balancer.rb +6 -0
- data/lib/fog/aws/models/storage/file.rb +2 -2
- data/lib/fog/aws/models/storage/files.rb +4 -4
- data/lib/fog/aws/parsers/compute/describe_instance_status.rb +64 -0
- data/lib/fog/aws/parsers/compute/describe_security_groups.rb +1 -1
- data/lib/fog/aws/parsers/sqs/receive_message.rb +1 -1
- data/lib/fog/aws/parsers/sts/get_session_token.rb +31 -0
- data/lib/fog/aws/rds.rb +36 -1
- data/lib/fog/aws/requests/compute/describe_availability_zones.rb +3 -0
- data/lib/fog/aws/requests/compute/describe_instance_status.rb +36 -0
- data/lib/fog/aws/requests/compute/describe_security_groups.rb +2 -0
- data/lib/fog/aws/requests/elb/set_load_balancer_listener_ssl_certificate.rb +27 -0
- data/lib/fog/aws/requests/rds/create_db_instance.rb +64 -1
- data/lib/fog/aws/requests/rds/delete_db_instance.rb +19 -3
- data/lib/fog/aws/requests/rds/describe_db_instances.rb +40 -1
- data/lib/fog/aws/requests/rds/describe_db_reserved_instances.rb +1 -1
- data/lib/fog/aws/requests/rds/modify_db_instance.rb +24 -1
- data/lib/fog/aws/requests/rds/reboot_db_instance.rb +17 -1
- data/lib/fog/aws/requests/storage/{hash_to_acl.rb → acl_utils.rb} +8 -0
- data/lib/fog/aws/requests/storage/copy_object.rb +8 -0
- data/lib/fog/aws/requests/storage/get_bucket_acl.rb +7 -1
- data/lib/fog/aws/requests/storage/get_object_acl.rb +7 -1
- data/lib/fog/aws/requests/storage/get_object_http_url.rb +4 -3
- data/lib/fog/aws/requests/storage/get_object_https_url.rb +4 -3
- data/lib/fog/aws/requests/storage/put_bucket_acl.rb +2 -2
- data/lib/fog/aws/requests/storage/put_object_acl.rb +1 -1
- data/lib/fog/aws/requests/sts/get_federation_token.rb +20 -0
- data/lib/fog/aws/requests/sts/get_session_token.rb +18 -0
- data/lib/fog/aws/simpledb.rb +5 -1
- data/lib/fog/aws/sns.rb +2 -0
- data/lib/fog/aws/sqs.rb +5 -1
- data/lib/fog/aws/storage.rb +6 -0
- data/lib/fog/aws/sts.rb +137 -0
- data/lib/fog/bin.rb +1 -0
- data/lib/fog/bin/aws.rb +2 -0
- data/lib/fog/bin/clodo.rb +31 -0
- data/lib/fog/brightbox/compute.rb +7 -0
- data/lib/fog/brightbox/models/compute/cloud_ip.rb +10 -2
- data/lib/fog/brightbox/models/compute/firewall_policies.rb +29 -0
- data/lib/fog/brightbox/models/compute/firewall_policy.rb +65 -0
- data/lib/fog/brightbox/models/compute/firewall_rule.rb +54 -0
- data/lib/fog/brightbox/models/compute/firewall_rules.rb +24 -0
- data/lib/fog/brightbox/models/compute/image.rb +2 -0
- data/lib/fog/brightbox/models/compute/server.rb +41 -6
- data/lib/fog/brightbox/models/compute/server_group.rb +56 -17
- data/lib/fog/brightbox/requests/compute/remove_firewall_policy.rb +14 -0
- data/lib/fog/clodo.rb +34 -0
- data/lib/fog/clodo/compute.rb +152 -0
- data/lib/fog/clodo/models/compute/image.rb +31 -0
- data/lib/fog/clodo/models/compute/images.rb +28 -0
- data/lib/fog/clodo/models/compute/server.rb +163 -0
- data/lib/fog/clodo/models/compute/servers.rb +36 -0
- data/lib/fog/clodo/requests/compute/add_ip_address.rb +49 -0
- data/lib/fog/clodo/requests/compute/create_server.rb +112 -0
- data/lib/fog/clodo/requests/compute/delete_ip_address.rb +47 -0
- data/lib/fog/clodo/requests/compute/delete_server.rb +44 -0
- data/lib/fog/clodo/requests/compute/get_image_details.rb +20 -0
- data/lib/fog/clodo/requests/compute/get_server_details.rb +49 -0
- data/lib/fog/clodo/requests/compute/list_images.rb +48 -0
- data/lib/fog/clodo/requests/compute/list_images_detail.rb +61 -0
- data/lib/fog/clodo/requests/compute/list_servers.rb +50 -0
- data/lib/fog/clodo/requests/compute/list_servers_detail.rb +51 -0
- data/lib/fog/clodo/requests/compute/move_ip_address.rb +34 -0
- data/lib/fog/clodo/requests/compute/reboot_server.rb +19 -0
- data/lib/fog/clodo/requests/compute/rebuild_server.rb +21 -0
- data/lib/fog/clodo/requests/compute/server_action.rb +25 -0
- data/lib/fog/clodo/requests/compute/start_server.rb +19 -0
- data/lib/fog/clodo/requests/compute/stop_server.rb +19 -0
- data/lib/fog/compute.rb +3 -0
- data/lib/fog/core/credentials.rb +3 -3
- data/lib/fog/core/errors.rb +2 -0
- data/lib/fog/core/wait_for.rb +1 -1
- data/lib/fog/dnsmadeeasy/dns.rb +1 -1
- data/lib/fog/libvirt/compute.rb +2 -0
- data/lib/fog/libvirt/models/compute/nodes.rb +1 -3
- data/lib/fog/libvirt/models/compute/server.rb +8 -1
- data/lib/fog/providers.rb +1 -0
- data/lib/fog/rackspace/dns.rb +10 -2
- data/lib/fog/rackspace/load_balancers.rb +3 -0
- data/lib/fog/rackspace/models/compute/server.rb +2 -2
- data/lib/fog/rackspace/models/dns/callback.rb +3 -1
- data/lib/fog/rackspace/models/dns/record.rb +4 -0
- data/lib/fog/rackspace/models/load_balancers/load_balancer.rb +18 -8
- data/lib/fog/rackspace/requests/load_balancers/delete_nodes.rb +1 -2
- data/lib/fog/rackspace/requests/load_balancers/get_error_page.rb +15 -0
- data/lib/fog/rackspace/requests/load_balancers/list_load_balancers.rb +8 -2
- data/lib/fog/rackspace/requests/load_balancers/remove_error_page.rb +15 -0
- data/lib/fog/rackspace/requests/load_balancers/set_error_page.rb +21 -0
- data/lib/fog/vcloud/compute.rb +7 -1
- data/lib/fog/vcloud/models/compute/catalogs.rb +4 -5
- data/lib/fog/vcloud/models/compute/helpers/status.rb +37 -0
- data/lib/fog/vcloud/models/compute/network.rb +13 -49
- data/lib/fog/vcloud/models/compute/networks.rb +12 -3
- data/lib/fog/vcloud/models/compute/organization.rb +44 -0
- data/lib/fog/vcloud/models/compute/organizations.rb +29 -0
- data/lib/fog/vcloud/models/compute/server.rb +35 -56
- data/lib/fog/vcloud/models/compute/servers.rb +11 -13
- data/lib/fog/vcloud/models/compute/vapp.rb +41 -0
- data/lib/fog/vcloud/models/compute/vapps.rb +32 -0
- data/lib/fog/vcloud/models/compute/vdc.rb +11 -26
- data/lib/fog/vcloud/models/compute/vdcs.rb +6 -8
- data/lib/fog/vcloud/requests/compute/get_server.rb +10 -0
- data/lib/fog/vsphere/compute.rb +1 -0
- data/lib/fog/vsphere/models/compute/server.rb +18 -0
- data/lib/fog/vsphere/models/compute/servers.rb +8 -2
- data/lib/fog/vsphere/requests/compute/datacenters.rb +34 -0
- data/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +132 -91
- data/lib/fog/vsphere/requests/compute/vm_clone.rb +76 -37
- data/spec/lib/fog/aws/parsers/sqs/receive_message_spec.rb +58 -0
- data/tests/aws/models/elb/model_tests.rb +5 -0
- data/tests/aws/requests/compute/instance_tests.rb +23 -0
- data/tests/aws/requests/compute/security_group_tests.rb +1 -0
- data/tests/aws/requests/elb/listener_tests.rb +4 -0
- data/tests/aws/requests/storage/{hash_to_acl_tests.rb → acl_utils_tests.rb} +38 -2
- data/tests/aws/requests/storage/bucket_tests.rb +0 -3
- data/tests/aws/requests/storage/object_tests.rb +2 -4
- data/tests/aws/requests/sts/get_federation_token_tests.rb +21 -0
- data/tests/aws/requests/sts/session_token_tests.rb +16 -0
- data/tests/brightbox/requests/compute/account_tests.rb +11 -6
- data/tests/brightbox/requests/compute/api_client_tests.rb +23 -12
- data/tests/brightbox/requests/compute/cloud_ip_tests.rb +32 -17
- data/tests/brightbox/requests/compute/helper.rb +29 -3
- data/tests/brightbox/requests/compute/image_tests.rb +17 -14
- data/tests/brightbox/requests/compute/interface_tests.rb +3 -2
- data/tests/brightbox/requests/compute/load_balancer_tests.rb +57 -11
- data/tests/brightbox/requests/compute/server_group_tests.rb +29 -22
- data/tests/brightbox/requests/compute/server_tests.rb +41 -22
- data/tests/brightbox/requests/compute/server_type_tests.rb +7 -6
- data/tests/brightbox/requests/compute/user_tests.rb +11 -16
- data/tests/brightbox/requests/compute/zone_tests.rb +7 -6
- data/tests/clodo/requests/compute/image_tests.rb +36 -0
- data/tests/clodo/requests/compute/server_tests.rb +152 -0
- data/tests/compute/helper.rb +1 -1
- data/tests/core/credential_tests.rb +2 -2
- data/tests/glesys/requests/compute/helper.rb +91 -66
- data/tests/glesys/requests/compute/ip_tests.rb +1 -1
- data/tests/glesys/requests/compute/server_tests.rb +5 -5
- data/tests/helpers/mock_helper.rb +2 -0
- data/tests/rackspace/models/dns/zone_tests.rb +14 -0
- data/tests/rackspace/models/{access_list_tests.rb → load_balancers/access_list_tests.rb} +0 -0
- data/tests/rackspace/models/{access_lists_tests.rb → load_balancers/access_lists_tests.rb} +0 -0
- data/tests/rackspace/models/{load_balancer_tests.rb → load_balancers/load_balancer_tests.rb} +25 -0
- data/tests/rackspace/models/{load_balancers_tests.rb → load_balancers/load_balancers_tests.rb} +0 -0
- data/tests/rackspace/models/{node_tests.rb → load_balancers/node_tests.rb} +0 -0
- data/tests/rackspace/models/{nodes_tests.rb → load_balancers/nodes_tests.rb} +0 -0
- data/tests/rackspace/models/{virtual_ip_tests.rb → load_balancers/virtual_ip_tests.rb} +0 -0
- data/tests/rackspace/models/{virtual_ips_tests.rb → load_balancers/virtual_ips_tests.rb} +0 -0
- data/tests/rackspace/requests/dns/dns_tests.rb +4 -2
- data/tests/rackspace/requests/load_balancers/error_page_tests.rb +31 -0
- data/tests/rackspace/requests/load_balancers/helper.rb +27 -11
- data/tests/rackspace/requests/load_balancers/load_balancer_tests.rb +4 -1
- data/tests/rackspace/requests/load_balancers/node_tests.rb +24 -25
- data/tests/slicehost/requests/compute/slice_tests.rb +2 -2
- data/tests/storm_on_demand/requests/compute/server_tests.rb +3 -3
- data/tests/vcloud/data/api_+_v1.0_+_admin_+_network_+_2 +110 -0
- data/tests/vcloud/data/api_+_v1.0_+_login +5 -0
- data/tests/vcloud/data/api_+_v1.0_+_network_+_1 +44 -0
- data/tests/vcloud/data/api_+_v1.0_+_network_+_2 +31 -0
- data/tests/vcloud/data/api_+_v1.0_+_org_+_1 +17 -0
- data/tests/vcloud/data/api_+_v1.0_+_vApp_+_vapp-1 +369 -0
- data/tests/vcloud/data/api_+_v1.0_+_vApp_+_vm-1 +139 -0
- data/tests/vcloud/data/api_+_v1.0_+_vApp_+_vm-2 +155 -0
- data/tests/vcloud/data/api_+_v1.0_+_vdc_+_1 +61 -0
- data/tests/vcloud/models/compute/conn_helper.rb +20 -0
- data/tests/vcloud/models/compute/network_tests.rb +65 -0
- data/tests/vcloud/models/compute/networks_tests.rb +42 -0
- data/tests/vcloud/models/compute/organization_tests.rb +13 -0
- data/tests/vcloud/models/compute/organizations_tests.rb +14 -0
- data/tests/vcloud/models/compute/server_tests.rb +136 -0
- data/tests/vcloud/models/compute/servers_tests.rb +10 -89
- data/tests/vcloud/models/compute/vapp_tests.rb +27 -0
- data/tests/vcloud/models/compute/vapps_tests.rb +17 -0
- data/tests/vcloud/models/compute/vdc_tests.rb +42 -0
- data/tests/vcloud/models/compute/vdcs_tests.rb +17 -0
- data/tests/vsphere/requests/compute/vm_clone_tests.rb +2 -6
- metadata +151 -55
@@ -0,0 +1,139 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Vm xmlns="http://www.vmware.com/vcloud/v1" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vmext="http://www.vmware.com/vcloud/extension/v1" deployed="true" status="8" name="vm1" type="application/vnd.vmware.vcloud.vm+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/extension/v1 http://vcloud.example.com/api/v1.0/schema/vmwextensions.xsd http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.22.0/CIM_VirtualSystemSettingData.xsd http://schemas.dmtf.org/ovf/envelope/1 http://schemas.dmtf.org/ovf/envelope/1/dsp8023_1.1.0.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 http://www.vmware.com/vcloud/v1 http://vcloud.example.com/api/v1.0/schema/master.xsd">
|
3
|
+
<VCloudExtension required="false">
|
4
|
+
<vmext:VimObjectRef>
|
5
|
+
<vmext:VimServerRef type="application/vnd.vmware.admin.vmwvirtualcenter+xml" name="vm1.example.com" href="https://vcloud.example.com/api/v1.0/admin/extension/vimServer/1"/>
|
6
|
+
<vmext:MoRef>vm-594</vmext:MoRef>
|
7
|
+
<vmext:VimObjectType>VIRTUAL_MACHINE</vmext:VimObjectType>
|
8
|
+
</vmext:VimObjectRef>
|
9
|
+
</VCloudExtension>
|
10
|
+
<Link rel="power:powerOn" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/power/action/powerOn"/>
|
11
|
+
<Link rel="power:powerOff" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/power/action/powerOff"/>
|
12
|
+
<Link rel="undeploy" type="application/vnd.vmware.vcloud.undeployVAppParams+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/action/undeploy"/>
|
13
|
+
<Link rel="up" type="application/vnd.vmware.vcloud.vApp+xml" href="https://vcloud.example.com/api/v1.0/vApp/vapp-1006933678"/>
|
14
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.vm+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1"/>
|
15
|
+
<Link rel="screen:thumbnail" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/screen"/>
|
16
|
+
<Link rel="media:insertMedia" type="application/vnd.vmware.vcloud.mediaInsertOrEjectParams+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/media/action/insertMedia"/>
|
17
|
+
<Link rel="media:ejectMedia" type="application/vnd.vmware.vcloud.mediaInsertOrEjectParams+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/media/action/ejectMedia"/>
|
18
|
+
<Description/>
|
19
|
+
<ovf:VirtualHardwareSection xmlns:vcloud="http://www.vmware.com/vcloud/v1" vcloud:href="https://vcloud.example.com/api/v1.0/vApp/vm-1/virtualHardwareSection/" vcloud:type="application/vnd.vmware.vcloud.virtualHardwareSection+xml">
|
20
|
+
<ovf:Info>Virtual hardware requirements</ovf:Info>
|
21
|
+
<ovf:System>
|
22
|
+
<vssd:ElementName>Virtual Hardware Family</vssd:ElementName>
|
23
|
+
<vssd:InstanceID>0</vssd:InstanceID>
|
24
|
+
<vssd:VirtualSystemIdentifier>vm1</vssd:VirtualSystemIdentifier>
|
25
|
+
<vssd:VirtualSystemType>vmx-07</vssd:VirtualSystemType>
|
26
|
+
</ovf:System>
|
27
|
+
<ovf:Item>
|
28
|
+
<rasd:Address>00:50:56:01:02:04</rasd:Address>
|
29
|
+
<rasd:AddressOnParent>0</rasd:AddressOnParent>
|
30
|
+
<rasd:AutomaticAllocation>true</rasd:AutomaticAllocation>
|
31
|
+
<rasd:Connection vcloud:ipAddress="192.168.2.101" vcloud:primaryNetworkConnection="true" vcloud:ipAddressingMode="POOL">Network1</rasd:Connection>
|
32
|
+
<rasd:Description>PCNet32 ethernet adapter</rasd:Description>
|
33
|
+
<rasd:ElementName>Network adapter 0</rasd:ElementName>
|
34
|
+
<rasd:InstanceID>1</rasd:InstanceID>
|
35
|
+
<rasd:ResourceSubType>PCNet32</rasd:ResourceSubType>
|
36
|
+
<rasd:ResourceType>10</rasd:ResourceType>
|
37
|
+
</ovf:Item>
|
38
|
+
<ovf:Item>
|
39
|
+
<rasd:Address>0</rasd:Address>
|
40
|
+
<rasd:Description>SCSI Controller</rasd:Description>
|
41
|
+
<rasd:ElementName>SCSI Controller 0</rasd:ElementName>
|
42
|
+
<rasd:InstanceID>2</rasd:InstanceID>
|
43
|
+
<rasd:ResourceSubType>lsilogicsas</rasd:ResourceSubType>
|
44
|
+
<rasd:ResourceType>6</rasd:ResourceType>
|
45
|
+
</ovf:Item>
|
46
|
+
<ovf:Item>
|
47
|
+
<rasd:AddressOnParent>0</rasd:AddressOnParent>
|
48
|
+
<rasd:Description>Hard disk</rasd:Description>
|
49
|
+
<rasd:ElementName>Hard disk 1</rasd:ElementName>
|
50
|
+
<rasd:HostResource vcloud:capacity="1600" vcloud:busType="6" vcloud:busSubType="lsilogicsas"/>
|
51
|
+
<rasd:InstanceID>2000</rasd:InstanceID>
|
52
|
+
<rasd:Parent>2</rasd:Parent>
|
53
|
+
<rasd:ResourceType>17</rasd:ResourceType>
|
54
|
+
</ovf:Item>
|
55
|
+
<ovf:Item>
|
56
|
+
<rasd:Address>0</rasd:Address>
|
57
|
+
<rasd:Description>IDE Controller</rasd:Description>
|
58
|
+
<rasd:ElementName>IDE Controller 0</rasd:ElementName>
|
59
|
+
<rasd:InstanceID>3</rasd:InstanceID>
|
60
|
+
<rasd:ResourceType>5</rasd:ResourceType>
|
61
|
+
</ovf:Item>
|
62
|
+
<ovf:Item>
|
63
|
+
<rasd:AddressOnParent>0</rasd:AddressOnParent>
|
64
|
+
<rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
|
65
|
+
<rasd:Description>CD/DVD Drive</rasd:Description>
|
66
|
+
<rasd:ElementName>CD/DVD Drive 1</rasd:ElementName>
|
67
|
+
<rasd:HostResource/>
|
68
|
+
<rasd:InstanceID>3002</rasd:InstanceID>
|
69
|
+
<rasd:Parent>3</rasd:Parent>
|
70
|
+
<rasd:ResourceType>15</rasd:ResourceType>
|
71
|
+
</ovf:Item>
|
72
|
+
<ovf:Item vcloud:href="https://vcloud.example.com/api/v1.0/vApp/vm-1/virtualHardwareSection/cpu" vcloud:type="application/vnd.vmware.vcloud.rasdItem+xml">
|
73
|
+
<rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits>
|
74
|
+
<rasd:Description>Number of Virtual CPUs</rasd:Description>
|
75
|
+
<rasd:ElementName>1 virtual CPU(s)</rasd:ElementName>
|
76
|
+
<rasd:InstanceID>4</rasd:InstanceID>
|
77
|
+
<rasd:Reservation>0</rasd:Reservation>
|
78
|
+
<rasd:ResourceType>3</rasd:ResourceType>
|
79
|
+
<rasd:VirtualQuantity>1</rasd:VirtualQuantity>
|
80
|
+
<rasd:Weight>0</rasd:Weight>
|
81
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/virtualHardwareSection/cpu"/>
|
82
|
+
</ovf:Item>
|
83
|
+
<ovf:Item vcloud:href="https://vcloud.example.com/api/v1.0/vApp/vm-1/virtualHardwareSection/memory" vcloud:type="application/vnd.vmware.vcloud.rasdItem+xml">
|
84
|
+
<rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits>
|
85
|
+
<rasd:Description>Memory Size</rasd:Description>
|
86
|
+
<rasd:ElementName>512 MB of memory</rasd:ElementName>
|
87
|
+
<rasd:InstanceID>5</rasd:InstanceID>
|
88
|
+
<rasd:Reservation>0</rasd:Reservation>
|
89
|
+
<rasd:ResourceType>4</rasd:ResourceType>
|
90
|
+
<rasd:VirtualQuantity>512</rasd:VirtualQuantity>
|
91
|
+
<rasd:Weight>0</rasd:Weight>
|
92
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/virtualHardwareSection/memory"/>
|
93
|
+
</ovf:Item>
|
94
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.virtualHardwareSection+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/virtualHardwareSection/"/>
|
95
|
+
<Link rel="down" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/virtualHardwareSection/cpu"/>
|
96
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/virtualHardwareSection/cpu"/>
|
97
|
+
<Link rel="down" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/virtualHardwareSection/memory"/>
|
98
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/virtualHardwareSection/memory"/>
|
99
|
+
<Link rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/virtualHardwareSection/disks"/>
|
100
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/virtualHardwareSection/disks"/>
|
101
|
+
<Link rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/virtualHardwareSection/media"/>
|
102
|
+
<Link rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/virtualHardwareSection/networkCards"/>
|
103
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/virtualHardwareSection/networkCards"/>
|
104
|
+
</ovf:VirtualHardwareSection>
|
105
|
+
<ovf:OperatingSystemSection xmlns:vcloud="http://www.vmware.com/vcloud/v1" xmlns:vmw="http://www.vmware.com/schema/ovf" ovf:id="80" vcloud:href="https://vcloud.example.com/api/v1.0/vApp/vm-1/operatingSystemSection/" vcloud:type="application/vnd.vmware.vcloud.operatingSystemSection+xml" vmw:osType="rhel5_64Guest">
|
106
|
+
<ovf:Info>Specifies the operating system installed</ovf:Info>
|
107
|
+
<ovf:Description>Red Hat Enterprise Linux 5 (64-bit)</ovf:Description>
|
108
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.operatingSystemSection+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/operatingSystemSection/"/>
|
109
|
+
</ovf:OperatingSystemSection>
|
110
|
+
<NetworkConnectionSection type="application/vnd.vmware.vcloud.networkConnectionSection+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/networkConnectionSection/" ovf:required="false">
|
111
|
+
<ovf:Info>Specifies the available VM network connections</ovf:Info>
|
112
|
+
<PrimaryNetworkConnectionIndex>0</PrimaryNetworkConnectionIndex>
|
113
|
+
<NetworkConnection network="Network1">
|
114
|
+
<NetworkConnectionIndex>0</NetworkConnectionIndex>
|
115
|
+
<IpAddress>192.168.2.101</IpAddress>
|
116
|
+
<ExternalIpAddress>192.168.1.102</ExternalIpAddress>
|
117
|
+
<IsConnected>true</IsConnected>
|
118
|
+
<MACAddress>00:50:56:01:02:04</MACAddress>
|
119
|
+
<IpAddressAllocationMode>POOL</IpAddressAllocationMode>
|
120
|
+
</NetworkConnection>
|
121
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.networkConnectionSection+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/networkConnectionSection/"/>
|
122
|
+
</NetworkConnectionSection>
|
123
|
+
<GuestCustomizationSection type="application/vnd.vmware.vcloud.guestCustomizationSection+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/guestCustomizationSection/" ovf:required="false">
|
124
|
+
<ovf:Info>Specifies Guest OS Customization Settings</ovf:Info>
|
125
|
+
<Enabled>true</Enabled>
|
126
|
+
<ChangeSid>false</ChangeSid>
|
127
|
+
<VirtualMachineId>1</VirtualMachineId>
|
128
|
+
<JoinDomainEnabled>false</JoinDomainEnabled>
|
129
|
+
<UseOrgSettings>false</UseOrgSettings>
|
130
|
+
<AdminPasswordEnabled>true</AdminPasswordEnabled>
|
131
|
+
<AdminPasswordAuto>true</AdminPasswordAuto>
|
132
|
+
<AdminPassword>password</AdminPassword>
|
133
|
+
<ResetPasswordRequired>false</ResetPasswordRequired>
|
134
|
+
<CustomizationScript/>
|
135
|
+
<ComputerName>vm1</ComputerName>
|
136
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.guestCustomizationSection+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-1/guestCustomizationSection/"/>
|
137
|
+
</GuestCustomizationSection>
|
138
|
+
<VAppScopedLocalId>vmware_RHEL5-U5-64-small_v01</VAppScopedLocalId>
|
139
|
+
</Vm>
|
@@ -0,0 +1,155 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Vm xmlns="http://www.vmware.com/vcloud/v1" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vmext="http://www.vmware.com/vcloud/extension/v1" deployed="true" status="8" name="vm2" type="application/vnd.vmware.vcloud.vm+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/extension/v1 http://vcloud.example.com/api/v1.0/schema/vmwextensions.xsd http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.22.0/CIM_VirtualSystemSettingData.xsd http://schemas.dmtf.org/ovf/envelope/1 http://schemas.dmtf.org/ovf/envelope/1/dsp8023_1.1.0.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 http://www.vmware.com/vcloud/v1 http://vcloud.example.com/api/v1.0/schema/master.xsd">
|
3
|
+
<VCloudExtension required="false">
|
4
|
+
<vmext:VimObjectRef>
|
5
|
+
<vmext:VimServerRef type="application/vnd.vmware.admin.vmwvirtualcenter+xml" name="vm2.example.com" href="https://vcloud.example.com/api/v1.0/admin/extension/vimServer/2"/>
|
6
|
+
<vmext:MoRef>vm-595</vmext:MoRef>
|
7
|
+
<vmext:VimObjectType>VIRTUAL_MACHINE</vmext:VimObjectType>
|
8
|
+
</vmext:VimObjectRef>
|
9
|
+
</VCloudExtension>
|
10
|
+
<Link rel="power:powerOn" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/power/action/powerOn"/>
|
11
|
+
<Link rel="power:powerOff" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/power/action/powerOff"/>
|
12
|
+
<Link rel="undeploy" type="application/vnd.vmware.vcloud.undeployVAppParams+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/action/undeploy"/>
|
13
|
+
<Link rel="up" type="application/vnd.vmware.vcloud.vApp+xml" href="https://vcloud.example.com/api/v1.0/vApp/vapp-1006933678"/>
|
14
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.vm+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2"/>
|
15
|
+
<Link rel="screen:thumbnail" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/screen"/>
|
16
|
+
<Link rel="media:insertMedia" type="application/vnd.vmware.vcloud.mediaInsertOrEjectParams+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/media/action/insertMedia"/>
|
17
|
+
<Link rel="media:ejectMedia" type="application/vnd.vmware.vcloud.mediaInsertOrEjectParams+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/media/action/ejectMedia"/>
|
18
|
+
<Description>Some VM Description</Description>
|
19
|
+
<ovf:VirtualHardwareSection xmlns:vcloud="http://www.vmware.com/vcloud/v1" vcloud:href="https://vcloud.example.com/api/v1.0/vApp/vm-2/virtualHardwareSection/" vcloud:type="application/vnd.vmware.vcloud.virtualHardwareSection+xml">
|
20
|
+
<ovf:Info>Virtual hardware requirements</ovf:Info>
|
21
|
+
<ovf:System>
|
22
|
+
<vssd:ElementName>Virtual Hardware Family</vssd:ElementName>
|
23
|
+
<vssd:InstanceID>0</vssd:InstanceID>
|
24
|
+
<vssd:VirtualSystemIdentifier>vm2</vssd:VirtualSystemIdentifier>
|
25
|
+
<vssd:VirtualSystemType>vmx-07</vssd:VirtualSystemType>
|
26
|
+
</ovf:System>
|
27
|
+
<ovf:Item>
|
28
|
+
<rasd:Address>00:50:56:01:02:03</rasd:Address>
|
29
|
+
<rasd:AddressOnParent>0</rasd:AddressOnParent>
|
30
|
+
<rasd:AutomaticAllocation>true</rasd:AutomaticAllocation>
|
31
|
+
<rasd:Connection vcloud:ipAddress="192.168.2.102" vcloud:primaryNetworkConnection="true" vcloud:ipAddressingMode="POOL">Network1</rasd:Connection>
|
32
|
+
<rasd:Description>PCNet32 ethernet adapter</rasd:Description>
|
33
|
+
<rasd:ElementName>Network adapter 0</rasd:ElementName>
|
34
|
+
<rasd:InstanceID>1</rasd:InstanceID>
|
35
|
+
<rasd:ResourceSubType>PCNet32</rasd:ResourceSubType>
|
36
|
+
<rasd:ResourceType>10</rasd:ResourceType>
|
37
|
+
</ovf:Item>
|
38
|
+
<ovf:Item>
|
39
|
+
<rasd:Address>0</rasd:Address>
|
40
|
+
<rasd:Description>SCSI Controller</rasd:Description>
|
41
|
+
<rasd:ElementName>SCSI Controller 0</rasd:ElementName>
|
42
|
+
<rasd:InstanceID>2</rasd:InstanceID>
|
43
|
+
<rasd:ResourceSubType>lsilogicsas</rasd:ResourceSubType>
|
44
|
+
<rasd:ResourceType>6</rasd:ResourceType>
|
45
|
+
</ovf:Item>
|
46
|
+
<ovf:Item>
|
47
|
+
<rasd:AddressOnParent>0</rasd:AddressOnParent>
|
48
|
+
<rasd:Description>Hard disk</rasd:Description>
|
49
|
+
<rasd:ElementName>Hard disk 1</rasd:ElementName>
|
50
|
+
<rasd:HostResource vcloud:capacity="1600" vcloud:busType="6" vcloud:busSubType="lsilogicsas"/>
|
51
|
+
<rasd:InstanceID>2000</rasd:InstanceID>
|
52
|
+
<rasd:Parent>2</rasd:Parent>
|
53
|
+
<rasd:ResourceType>17</rasd:ResourceType>
|
54
|
+
</ovf:Item>
|
55
|
+
<ovf:Item>
|
56
|
+
<rasd:AddressOnParent>1</rasd:AddressOnParent>
|
57
|
+
<rasd:Description>Hard disk</rasd:Description>
|
58
|
+
<rasd:ElementName>Hard disk 2</rasd:ElementName>
|
59
|
+
<rasd:HostResource vcloud:capacity="1600" vcloud:busType="6" vcloud:busSubType="lsilogicsas"/>
|
60
|
+
<rasd:InstanceID>3000</rasd:InstanceID>
|
61
|
+
<rasd:Parent>2</rasd:Parent>
|
62
|
+
<rasd:ResourceType>17</rasd:ResourceType>
|
63
|
+
</ovf:Item>
|
64
|
+
<ovf:Item>
|
65
|
+
<rasd:Address>0</rasd:Address>
|
66
|
+
<rasd:Description>IDE Controller</rasd:Description>
|
67
|
+
<rasd:ElementName>IDE Controller 0</rasd:ElementName>
|
68
|
+
<rasd:InstanceID>3</rasd:InstanceID>
|
69
|
+
<rasd:ResourceType>5</rasd:ResourceType>
|
70
|
+
</ovf:Item>
|
71
|
+
<ovf:Item>
|
72
|
+
<rasd:AddressOnParent>0</rasd:AddressOnParent>
|
73
|
+
<rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
|
74
|
+
<rasd:Description>CD/DVD Drive</rasd:Description>
|
75
|
+
<rasd:ElementName>CD/DVD Drive 1</rasd:ElementName>
|
76
|
+
<rasd:HostResource/>
|
77
|
+
<rasd:InstanceID>3002</rasd:InstanceID>
|
78
|
+
<rasd:Parent>3</rasd:Parent>
|
79
|
+
<rasd:ResourceType>15</rasd:ResourceType>
|
80
|
+
</ovf:Item>
|
81
|
+
<ovf:Item vcloud:href="https://vcloud.example.com/api/v1.0/vApp/vm-2/virtualHardwareSection/cpu" vcloud:type="application/vnd.vmware.vcloud.rasdItem+xml">
|
82
|
+
<rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits>
|
83
|
+
<rasd:Description>Number of Virtual CPUs</rasd:Description>
|
84
|
+
<rasd:ElementName>1 virtual CPU(s)</rasd:ElementName>
|
85
|
+
<rasd:InstanceID>4</rasd:InstanceID>
|
86
|
+
<rasd:Reservation>0</rasd:Reservation>
|
87
|
+
<rasd:ResourceType>3</rasd:ResourceType>
|
88
|
+
<rasd:VirtualQuantity>1</rasd:VirtualQuantity>
|
89
|
+
<rasd:Weight>0</rasd:Weight>
|
90
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/virtualHardwareSection/cpu"/>
|
91
|
+
</ovf:Item>
|
92
|
+
<ovf:Item vcloud:href="https://vcloud.example.com/api/v1.0/vApp/vm-2/virtualHardwareSection/memory" vcloud:type="application/vnd.vmware.vcloud.rasdItem+xml">
|
93
|
+
<rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits>
|
94
|
+
<rasd:Description>Memory Size</rasd:Description>
|
95
|
+
<rasd:ElementName>512 MB of memory</rasd:ElementName>
|
96
|
+
<rasd:InstanceID>5</rasd:InstanceID>
|
97
|
+
<rasd:Reservation>0</rasd:Reservation>
|
98
|
+
<rasd:ResourceType>4</rasd:ResourceType>
|
99
|
+
<rasd:VirtualQuantity>512</rasd:VirtualQuantity>
|
100
|
+
<rasd:Weight>0</rasd:Weight>
|
101
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/virtualHardwareSection/memory"/>
|
102
|
+
</ovf:Item>
|
103
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.virtualHardwareSection+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/virtualHardwareSection/"/>
|
104
|
+
<Link rel="down" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/virtualHardwareSection/cpu"/>
|
105
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/virtualHardwareSection/cpu"/>
|
106
|
+
<Link rel="down" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/virtualHardwareSection/memory"/>
|
107
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItem+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/virtualHardwareSection/memory"/>
|
108
|
+
<Link rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/virtualHardwareSection/disks"/>
|
109
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/virtualHardwareSection/disks"/>
|
110
|
+
<Link rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/virtualHardwareSection/media"/>
|
111
|
+
<Link rel="down" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/virtualHardwareSection/networkCards"/>
|
112
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.rasdItemsList+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/virtualHardwareSection/networkCards"/>
|
113
|
+
</ovf:VirtualHardwareSection>
|
114
|
+
<ovf:OperatingSystemSection xmlns:vcloud="http://www.vmware.com/vcloud/v1" xmlns:vmw="http://www.vmware.com/schema/ovf" ovf:id="80" vcloud:href="https://vcloud.example.com/api/v1.0/vApp/vm-2/operatingSystemSection/" vcloud:type="application/vnd.vmware.vcloud.operatingSystemSection+xml" vmw:osType="rhel5_64Guest">
|
115
|
+
<ovf:Info>Specifies the operating system installed</ovf:Info>
|
116
|
+
<ovf:Description>Red Hat Enterprise Linux 5 (64-bit)</ovf:Description>
|
117
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.operatingSystemSection+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/operatingSystemSection/"/>
|
118
|
+
</ovf:OperatingSystemSection>
|
119
|
+
<NetworkConnectionSection type="application/vnd.vmware.vcloud.networkConnectionSection+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/networkConnectionSection/" ovf:required="false">
|
120
|
+
<ovf:Info>Specifies the available VM network connections</ovf:Info>
|
121
|
+
<PrimaryNetworkConnectionIndex>0</PrimaryNetworkConnectionIndex>
|
122
|
+
<NetworkConnection network="Network1">
|
123
|
+
<NetworkConnectionIndex>0</NetworkConnectionIndex>
|
124
|
+
<IpAddress>192.168.2.102</IpAddress>
|
125
|
+
<ExternalIpAddress>192.168.1.103</ExternalIpAddress>
|
126
|
+
<IsConnected>true</IsConnected>
|
127
|
+
<MACAddress>00:50:56:01:02:03</MACAddress>
|
128
|
+
<IpAddressAllocationMode>POOL</IpAddressAllocationMode>
|
129
|
+
</NetworkConnection>
|
130
|
+
<NetworkConnection network="Network2">
|
131
|
+
<NetworkConnectionIndex>1</NetworkConnectionIndex>
|
132
|
+
<IpAddress>192.168.3.102</IpAddress>
|
133
|
+
<IsConnected>true</IsConnected>
|
134
|
+
<MACAddress>00:50:56:01:02:04</MACAddress>
|
135
|
+
<IpAddressAllocationMode>POOL</IpAddressAllocationMode>
|
136
|
+
</NetworkConnection>
|
137
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.networkConnectionSection+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/networkConnectionSection/"/>
|
138
|
+
</NetworkConnectionSection>
|
139
|
+
<GuestCustomizationSection type="application/vnd.vmware.vcloud.guestCustomizationSection+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/guestCustomizationSection/" ovf:required="false">
|
140
|
+
<ovf:Info>Specifies Guest OS Customization Settings</ovf:Info>
|
141
|
+
<Enabled>true</Enabled>
|
142
|
+
<ChangeSid>false</ChangeSid>
|
143
|
+
<VirtualMachineId>2</VirtualMachineId>
|
144
|
+
<JoinDomainEnabled>false</JoinDomainEnabled>
|
145
|
+
<UseOrgSettings>false</UseOrgSettings>
|
146
|
+
<AdminPasswordEnabled>true</AdminPasswordEnabled>
|
147
|
+
<AdminPasswordAuto>true</AdminPasswordAuto>
|
148
|
+
<AdminPassword>password</AdminPassword>
|
149
|
+
<ResetPasswordRequired>false</ResetPasswordRequired>
|
150
|
+
<CustomizationScript/>
|
151
|
+
<ComputerName>vm2</ComputerName>
|
152
|
+
<Link rel="edit" type="application/vnd.vmware.vcloud.guestCustomizationSection+xml" href="https://vcloud.example.com/api/v1.0/vApp/vm-2/guestCustomizationSection/"/>
|
153
|
+
</GuestCustomizationSection>
|
154
|
+
<VAppScopedLocalId>vmware_RHEL5-U5-64-small_v02</VAppScopedLocalId>
|
155
|
+
</Vm>
|
@@ -0,0 +1,61 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Vdc xmlns="http://www.vmware.com/vcloud/v1" xmlns:vmext="http://www.vmware.com/vcloud/extension/v1" status="1" name="vDC1" type="application/vnd.vmware.vcloud.vdc+xml" href="https://vcloud.example.com/api/v1.0/vdc/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/extension/v1 http://vcloud.example.com/api/v1.0/schema/vmwextensions.xsd http://www.vmware.com/vcloud/v1 http://vcloud.example.com/api/v1.0/schema/master.xsd">
|
3
|
+
<VCloudExtension required="false">
|
4
|
+
<vmext:VimObjectRef>
|
5
|
+
<vmext:VimServerRef type="application/vnd.vmware.admin.vmwvirtualcenter+xml" name="host.example.com" href="https://vcloud.example.com/api/v1.0/admin/extension/vimServer/1"/>
|
6
|
+
<vmext:MoRef>resgroup-1</vmext:MoRef>
|
7
|
+
<vmext:VimObjectType>RESOURCE_POOL</vmext:VimObjectType>
|
8
|
+
</vmext:VimObjectRef>
|
9
|
+
</VCloudExtension>
|
10
|
+
<Link rel="up" type="application/vnd.vmware.vcloud.org+xml" href="https://vcloud.example.com/api/v1.0/org/1"/>
|
11
|
+
<Link rel="add" type="application/vnd.vmware.vcloud.uploadVAppTemplateParams+xml" href="https://vcloud.example.com/api/v1.0/vdc/1/action/uploadVAppTemplate"/>
|
12
|
+
<Link rel="add" type="application/vnd.vmware.vcloud.media+xml" href="https://vcloud.example.com/api/v1.0/vdc/1/media"/>
|
13
|
+
<Link rel="add" type="application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml" href="https://vcloud.example.com/api/v1.0/vdc/1/action/instantiateVAppTemplate"/>
|
14
|
+
<Link rel="add" type="application/vnd.vmware.vcloud.cloneVAppParams+xml" href="https://vcloud.example.com/api/v1.0/vdc/1/action/cloneVApp"/>
|
15
|
+
<Link rel="add" type="application/vnd.vmware.vcloud.cloneVAppTemplateParams+xml" href="https://vcloud.example.com/api/v1.0/vdc/1/action/cloneVAppTemplate"/>
|
16
|
+
<Link rel="add" type="application/vnd.vmware.vcloud.cloneMediaParams+xml" href="https://vcloud.example.com/api/v1.0/vdc/1/action/cloneMedia"/>
|
17
|
+
<Link rel="add" type="application/vnd.vmware.vcloud.captureVAppParams+xml" href="https://vcloud.example.com/api/v1.0/vdc/1/action/captureVApp"/>
|
18
|
+
<Link rel="add" type="application/vnd.vmware.vcloud.composeVAppParams+xml" href="https://vcloud.example.com/api/v1.0/vdc/1/action/composeVApp"/>
|
19
|
+
<Link rel="move" type="application/vnd.vmware.vcloud.moveMediaParams+xml" href="https://vcloud.example.com/api/v1.0/vdc/1/action/moveMedia"/>
|
20
|
+
<Link rel="move" type="application/vnd.vmware.vcloud.moveVAppParams+xml" href="https://vcloud.example.com/api/v1.0/vdc/1/action/moveVApp"/>
|
21
|
+
<Link rel="move" type="application/vnd.vmware.vcloud.moveVAppTemplateParams+xml" href="https://vcloud.example.com/api/v1.0/vdc/1/action/moveVAppTemplate"/>
|
22
|
+
<Description>Some Description</Description>
|
23
|
+
<AllocationModel>AllocationVApp</AllocationModel>
|
24
|
+
<StorageCapacity>
|
25
|
+
<Units>MB</Units>
|
26
|
+
<Allocated>10240</Allocated>
|
27
|
+
<Limit>102400</Limit>
|
28
|
+
<Used>101650</Used>
|
29
|
+
<Overhead>0</Overhead>
|
30
|
+
</StorageCapacity>
|
31
|
+
<ComputeCapacity>
|
32
|
+
<Cpu>
|
33
|
+
<Units>MHz</Units>
|
34
|
+
<Allocated>20000</Allocated>
|
35
|
+
<Limit>40000</Limit>
|
36
|
+
<Used>2000</Used>
|
37
|
+
<Overhead>0</Overhead>
|
38
|
+
</Cpu>
|
39
|
+
<Memory>
|
40
|
+
<Units>MB</Units>
|
41
|
+
<Allocated>1024</Allocated>
|
42
|
+
<Limit>10240</Limit>
|
43
|
+
<Used>8385</Used>
|
44
|
+
<Overhead>0</Overhead>
|
45
|
+
</Memory>
|
46
|
+
</ComputeCapacity>
|
47
|
+
<ResourceEntities>
|
48
|
+
<ResourceEntity type="application/vnd.vmware.vcloud.vApp+xml" name="vApp_1" href="https://vcloud.example.com/api/v1.0/vApp/vapp-1"/>
|
49
|
+
<ResourceEntity type="application/vnd.vmware.vcloud.vApp+xml" name="vApp_2" href="https://vcloud.example.com/api/v1.0/vApp/vapp-2"/>
|
50
|
+
<ResourceEntity type="application/vnd.vmware.vcloud.media+xml" name="media1" href="https://vcloud.example.com/api/v1.0/media/1"/>
|
51
|
+
<ResourceEntity type="application/vnd.vmware.vcloud.media+xml" name="media2" href="https://vcloud.example.com/api/v1.0/media/2"/>
|
52
|
+
</ResourceEntities>
|
53
|
+
<AvailableNetworks>
|
54
|
+
<Network type="application/vnd.vmware.vcloud.network+xml" name="network1" href="https://vcloud.example.com/api/v1.0/network/1"/>
|
55
|
+
<Network type="application/vnd.vmware.vcloud.network+xml" name="network2" href="https://vcloud.example.com/api/v1.0/network/2"/>
|
56
|
+
</AvailableNetworks>
|
57
|
+
<NicQuota>10</NicQuota>
|
58
|
+
<NetworkQuota>10</NetworkQuota>
|
59
|
+
<VmQuota>10</VmQuota>
|
60
|
+
<IsEnabled>true</IsEnabled>
|
61
|
+
</Vdc>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Fog
|
2
|
+
module Vcloud
|
3
|
+
class Compute < Fog::Service
|
4
|
+
class Real
|
5
|
+
def request(params, &block)
|
6
|
+
path = File.expand_path(File.join(File.dirname(__FILE__),'..','..','data',params[:path].gsub(/^\//,'').gsub('/','_+_')))
|
7
|
+
if File.exists?(path)
|
8
|
+
body = File.read(path)
|
9
|
+
else
|
10
|
+
''
|
11
|
+
end
|
12
|
+
Excon::Response.new(
|
13
|
+
:body => body,
|
14
|
+
:status => 200,
|
15
|
+
:header => '')
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
require 'fog/vcloud/models/compute/networks'
|
2
|
+
|
3
|
+
Shindo.tests("Vcloud::Compute | network", ['vcloud']) do
|
4
|
+
|
5
|
+
pending if Fog.mocking?
|
6
|
+
|
7
|
+
connection = Fog::Vcloud::Compute.new(:vcloud_host => 'vcloud.example.com', :vcloud_username => 'username', :vcloud_password => 'password')
|
8
|
+
tests("an org network") do
|
9
|
+
instance = Fog::Vcloud::Compute::Networks.new(
|
10
|
+
:connection => connection,
|
11
|
+
:href => "https://vcloud.example.com/api/v1.0/vApp/vapp-1"
|
12
|
+
).first
|
13
|
+
instance.reload
|
14
|
+
|
15
|
+
tests("#href").returns("https://vcloud.example.com/api/v1.0/network/1") { instance.href }
|
16
|
+
tests("#name").returns("Network1") { instance.name }
|
17
|
+
tests("#description").returns("Some fancy Network") { instance.description }
|
18
|
+
|
19
|
+
tests("configuration") do
|
20
|
+
tests("parent network").returns("ParentNetwork1") { instance.configuration[:ParentNetwork][:name]}
|
21
|
+
tests("dns").returns("172.0.0.2") { instance.configuration[:IpScope][:Dns1]}
|
22
|
+
|
23
|
+
tests("#fence_mode").returns("natRouted") { instance.configuration[:FenceMode] }
|
24
|
+
|
25
|
+
tests("features") do
|
26
|
+
tests("dhcp_service") do
|
27
|
+
tests("#is_enabled").returns("false") { instance.configuration[:Features][:DhcpService][:IsEnabled] }
|
28
|
+
tests("ip_range") do
|
29
|
+
tests("#start_address").returns("192.168.0.151") { instance.configuration[:Features][:DhcpService][:IpRange][:StartAddress] }
|
30
|
+
end
|
31
|
+
end
|
32
|
+
tests("firewall_server") do
|
33
|
+
tests("is_enabled").returns("true"){ instance.configuration[:Features][:FirewallService][:IsEnabled] }
|
34
|
+
end
|
35
|
+
tests("nat_service") do
|
36
|
+
tests("is_enabled").returns("false"){ instance.configuration[:Features][:NatService][:IsEnabled] }
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
tests("#parent_network") do
|
42
|
+
tests("returned network name").returns("ParentNetwork1"){ p = instance.parent_network; p.reload; p.name }
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
tests("an external network") do
|
47
|
+
instance = Fog::Vcloud::Compute::Network.new(
|
48
|
+
:connection => connection,
|
49
|
+
:collection => Fog::Vcloud::Compute::Networks.new(:connection => connection),
|
50
|
+
:href => "https://vcloud.example.com/api/v1.0/admin/network/2"
|
51
|
+
)
|
52
|
+
instance.reload
|
53
|
+
tests("#href").returns("https://vcloud.example.com/api/v1.0/admin/network/2") { instance.href }
|
54
|
+
tests("#name").returns("ParentNetwork1") { instance.name }
|
55
|
+
tests("#description").returns("Internet Connection") { instance.description }
|
56
|
+
tests("#provider_info").returns("NETWORK:dvportgroup-230 on com.vmware.vcloud.entity.vimserver:35935555") { instance.provider_info }
|
57
|
+
|
58
|
+
tests("configuration") do
|
59
|
+
tests("dns").returns("172.0.0.2") { instance.configuration[:IpScope][:Dns1]}
|
60
|
+
tests("allocated addresses").returns("172.0.0.144") { instance.configuration[:IpScope][:AllocatedIpAddresses][:IpAddress].first }
|
61
|
+
end
|
62
|
+
|
63
|
+
tests("#parent_network").returns(nil){ instance.parent_network }
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'fog/vcloud/models/compute/networks'
|
2
|
+
|
3
|
+
Shindo.tests("Vcloud::Compute | networks", ['vcloud']) do
|
4
|
+
|
5
|
+
pending if Fog.mocking?
|
6
|
+
|
7
|
+
tests("from an org perspective") do
|
8
|
+
instance = Fog::Vcloud::Compute::Networks.new(
|
9
|
+
:connection => Fog::Vcloud::Compute.new(:vcloud_host => 'vcloud.example.com', :vcloud_username => 'username', :vcloud_password => 'password'),
|
10
|
+
:href => "https://vcloud.example.com/api/v1.0/org/1"
|
11
|
+
)
|
12
|
+
|
13
|
+
tests("collection") do
|
14
|
+
returns(2) { instance.size }
|
15
|
+
returns("https://vcloud.example.com/api/v1.0/network/1") { instance.first.href }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
tests("from a vdc perspective") do
|
20
|
+
instance = Fog::Vcloud::Compute::Networks.new(
|
21
|
+
:connection => Fog::Vcloud::Compute.new(:vcloud_host => 'vcloud.example.com', :vcloud_username => 'username', :vcloud_password => 'password'),
|
22
|
+
:href => "https://vcloud.example.com/api/v1.0/vdc/1"
|
23
|
+
)
|
24
|
+
|
25
|
+
tests("collection") do
|
26
|
+
returns(2) { instance.size }
|
27
|
+
returns("https://vcloud.example.com/api/v1.0/network/1") { instance.first.href }
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
tests("from a vapp perspective") do
|
32
|
+
instance = Fog::Vcloud::Compute::Networks.new(
|
33
|
+
:connection => Fog::Vcloud::Compute.new(:vcloud_host => 'vcloud.example.com', :vcloud_username => 'username', :vcloud_password => 'password'),
|
34
|
+
:href => "https://vcloud.example.com/api/v1.0/vApp/vapp-1"
|
35
|
+
)
|
36
|
+
|
37
|
+
tests("collection") do
|
38
|
+
returns(1) { instance.size }
|
39
|
+
returns("https://vcloud.example.com/api/v1.0/network/1") { instance.first.href }
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|