fog 1.18.0 → 1.19.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.travis.yml +6 -0
- data/CONTRIBUTING.md +22 -0
- data/LICENSE.md +20 -0
- data/README.md +41 -60
- data/Rakefile +2 -0
- data/changelog.txt +262 -0
- data/fog.gemspec +3 -3
- data/lib/fog/aws.rb +9 -7
- data/lib/fog/aws/cloud_watch.rb +0 -1
- data/lib/fog/aws/compute.rb +2 -0
- data/lib/fog/aws/dns.rb +2 -1
- data/lib/fog/aws/elb.rb +2 -0
- data/lib/fog/aws/models/auto_scaling/configuration.rb +4 -0
- data/lib/fog/aws/models/compute/address.rb +6 -5
- data/lib/fog/aws/models/compute/flavors.rb +10 -0
- data/lib/fog/aws/models/compute/spot_request.rb +1 -1
- data/lib/fog/aws/models/compute/subnet.rb +4 -0
- data/lib/fog/aws/models/compute/vpc.rb +5 -0
- data/lib/fog/aws/models/dns/records.rb +1 -3
- data/lib/fog/aws/models/elb/load_balancer.rb +10 -0
- data/lib/fog/aws/models/glacier/vault.rb +1 -1
- data/lib/fog/aws/models/rds/server.rb +5 -2
- data/lib/fog/aws/models/rds/subnet_group.rb +15 -1
- data/lib/fog/aws/models/storage/file.rb +2 -2
- data/lib/fog/aws/parsers/auto_scaling/describe_launch_configurations.rb +6 -0
- data/lib/fog/aws/parsers/compute/assign_private_ip_addresses.rb +25 -0
- data/lib/fog/aws/parsers/compute/describe_addresses.rb +1 -1
- data/lib/fog/aws/parsers/elb/describe_load_balancer_attributes.rb +40 -0
- data/lib/fog/aws/parsers/rds/delete_db_subnet_group.rb +35 -0
- data/lib/fog/aws/rds.rb +3 -3
- data/lib/fog/aws/requests/auto_scaling/create_launch_configuration.rb +2 -0
- data/lib/fog/aws/requests/auto_scaling/describe_notification_configurations.rb +1 -1
- data/lib/fog/aws/requests/compute/assign_private_ip_addresses.rb +60 -0
- data/lib/fog/aws/requests/compute/create_route.rb +1 -1
- data/lib/fog/aws/requests/compute/describe_images.rb +1 -1
- data/lib/fog/aws/requests/compute/describe_subnets.rb +8 -0
- data/lib/fog/aws/requests/compute/describe_vpcs.rb +8 -0
- data/lib/fog/aws/requests/compute/modify_vpc_attribute.rb +59 -0
- data/lib/fog/aws/requests/dns/change_resource_record_sets.rb +26 -9
- data/lib/fog/aws/requests/dns/create_hosted_zone.rb +12 -3
- data/lib/fog/aws/requests/dns/delete_hosted_zone.rb +33 -0
- data/lib/fog/aws/requests/dns/get_change.rb +26 -0
- data/lib/fog/aws/requests/dns/get_hosted_zone.rb +1 -1
- data/lib/fog/aws/requests/dns/list_hosted_zones.rb +3 -8
- data/lib/fog/aws/requests/dns/list_resource_record_sets.rb +68 -0
- data/lib/fog/aws/requests/elb/create_load_balancer.rb +1 -0
- data/lib/fog/aws/requests/elb/describe_load_balancer_attributes.rb +54 -0
- data/lib/fog/aws/requests/elb/modify_load_balancer_attributes.rb +59 -0
- data/lib/fog/aws/requests/rds/create_db_instance.rb +7 -1
- data/lib/fog/aws/requests/rds/create_db_subnet_group.rb +7 -1
- data/lib/fog/aws/requests/rds/delete_db_subnet_group.rb +42 -0
- data/lib/fog/aws/requests/storage/delete_multiple_objects.rb +6 -4
- data/lib/fog/aws/requests/storage/put_bucket.rb +4 -1
- data/lib/fog/aws/sqs.rb +2 -4
- data/lib/fog/aws/storage.rb +14 -1
- data/lib/fog/bluebox/compute.rb +1 -1
- data/lib/fog/brightbox/compute.rb +7 -9
- data/lib/fog/brightbox/compute/image_selector.rb +1 -1
- data/lib/fog/brightbox/compute/shared.rb +8 -10
- data/lib/fog/brightbox/models/compute/api_client.rb +1 -1
- data/lib/fog/brightbox/models/compute/application.rb +1 -4
- data/lib/fog/brightbox/models/compute/cloud_ip.rb +8 -5
- data/lib/fog/brightbox/models/compute/collaboration.rb +0 -2
- data/lib/fog/brightbox/models/compute/collaborations.rb +1 -1
- data/lib/fog/brightbox/models/compute/firewall_policy.rb +2 -4
- data/lib/fog/brightbox/models/compute/firewall_rule.rb +1 -1
- data/lib/fog/brightbox/models/compute/image.rb +1 -3
- data/lib/fog/brightbox/models/compute/load_balancer.rb +11 -8
- data/lib/fog/brightbox/models/compute/server.rb +28 -20
- data/lib/fog/brightbox/models/compute/server_group.rb +9 -11
- data/lib/fog/brightbox/models/compute/zone.rb +1 -1
- data/lib/fog/brightbox/oauth2.rb +3 -3
- data/lib/fog/brightbox/requests/compute/update_server.rb +1 -1
- data/lib/fog/cloudstack.rb +1 -1
- data/lib/fog/compute.rb +2 -2
- data/lib/fog/core.rb +1 -1
- data/lib/fog/core/connection.rb +1 -2
- data/lib/fog/core/errors.rb +3 -3
- data/lib/fog/core/hmac.rb +3 -3
- data/lib/fog/core/mock.rb +9 -2
- data/lib/fog/core/scp.rb +1 -1
- data/lib/fog/core/wait_for.rb +1 -1
- data/lib/fog/core/{timeout.rb → wait_for_defaults.rb} +10 -0
- data/lib/fog/digitalocean/models/compute/server.rb +4 -0
- data/lib/fog/digitalocean/requests/compute/create_server.rb +2 -0
- data/lib/fog/dnsimple/dns.rb +1 -1
- data/lib/fog/dreamhost/dns.rb +2 -4
- data/lib/fog/ecloud/compute.rb +1 -1
- data/lib/fog/ecloud/models/compute/environments.rb +5 -3
- data/lib/fog/google/compute.rb +105 -68
- data/lib/fog/google/examples/create.rb +1 -0
- data/lib/fog/google/models/compute/disk.rb +7 -1
- data/lib/fog/google/models/compute/operation.rb +42 -0
- data/lib/fog/google/models/compute/operations.rb +26 -0
- data/lib/fog/google/models/compute/server.rb +18 -2
- data/lib/fog/google/models/compute/servers.rb +2 -1
- data/lib/fog/google/models/compute/zones.rb +1 -1
- data/lib/fog/google/models/storage/file.rb +1 -1
- data/lib/fog/google/models/storage/files.rb +1 -1
- data/lib/fog/google/requests/compute/delete_disk.rb +22 -2
- data/lib/fog/google/requests/compute/delete_global_operation.rb +29 -0
- data/lib/fog/google/requests/compute/delete_server.rb +13 -9
- data/lib/fog/google/requests/compute/delete_zone_operation.rb +33 -0
- data/lib/fog/google/requests/compute/get_disk.rb +26 -2
- data/lib/fog/google/requests/compute/{delete_operation.rb → get_global_operation.rb} +5 -6
- data/lib/fog/google/requests/compute/get_image.rb +3 -3
- data/lib/fog/google/requests/compute/get_server.rb +1 -0
- data/lib/fog/google/requests/compute/get_zone_operation.rb +58 -0
- data/lib/fog/google/requests/compute/insert_disk.rb +43 -3
- data/lib/fog/google/requests/compute/insert_firewall.rb +2 -1
- data/lib/fog/google/requests/compute/insert_image.rb +2 -2
- data/lib/fog/google/requests/compute/insert_server.rb +64 -35
- data/lib/fog/google/requests/compute/list_disks.rb +8 -2
- data/lib/fog/google/requests/compute/list_images.rb +2 -2
- data/lib/fog/google/requests/compute/list_machine_types.rb +2 -2
- data/lib/fog/google/requests/compute/list_servers.rb +2 -2
- data/lib/fog/google/requests/compute/list_zone_operations.rb +2 -1
- data/lib/fog/google/requests/compute/list_zones.rb +1 -1
- data/lib/fog/google/requests/storage/copy_object.rb +1 -1
- data/lib/fog/hp.rb +1 -1
- data/lib/fog/hp/README.md +57 -0
- data/lib/fog/hp/articles/auth_caching.md +23 -0
- data/lib/fog/hp/docs/connect.md +152 -0
- data/lib/fog/hp/docs/install.md +133 -0
- data/lib/fog/hp/examples/block_storage.md +296 -0
- data/lib/fog/hp/examples/block_storage_v2.md +446 -0
- data/lib/fog/hp/examples/cdn.md +54 -0
- data/lib/fog/hp/examples/compute.md +794 -0
- data/lib/fog/hp/examples/compute_v2.md +848 -0
- data/lib/fog/hp/examples/getting_started_examples.md +30 -0
- data/lib/fog/hp/examples/networking.md +472 -0
- data/lib/fog/hp/examples/object_storage.md +387 -0
- data/lib/fog/json.rb +6 -3
- data/lib/fog/local/models/storage/directories.rb +8 -4
- data/lib/fog/openstack/compute.rb +3 -0
- data/lib/fog/openstack/examples/compute/basics.rb +74 -0
- data/lib/fog/openstack/identity.rb +2 -3
- data/lib/fog/openstack/image.rb +1 -4
- data/lib/fog/openstack/metering.rb +1 -4
- data/lib/fog/openstack/models/compute/host.rb +5 -1
- data/lib/fog/openstack/models/compute/security_group.rb +18 -4
- data/lib/fog/openstack/models/compute/security_group_rule.rb +32 -0
- data/lib/fog/openstack/models/compute/security_group_rules.rb +22 -0
- data/lib/fog/openstack/models/volume/volume_type.rb +20 -0
- data/lib/fog/openstack/models/volume/volume_types.rb +26 -0
- data/lib/fog/openstack/network.rb +34 -6
- data/lib/fog/openstack/requests/compute/add_flavor_access.rb +1 -1
- data/lib/fog/openstack/requests/compute/allocate_address.rb +1 -1
- data/lib/fog/openstack/requests/compute/attach_volume.rb +1 -1
- data/lib/fog/openstack/requests/compute/boot_from_snapshot.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_flavor.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_key_pair.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_security_group.rb +4 -4
- data/lib/fog/openstack/requests/compute/create_security_group_rule.rb +2 -2
- data/lib/fog/openstack/requests/compute/create_server.rb +12 -5
- data/lib/fog/openstack/requests/compute/create_volume.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_volume_snapshot.rb +1 -1
- data/lib/fog/openstack/requests/compute/delete_security_group.rb +1 -1
- data/lib/fog/openstack/requests/compute/delete_security_group_rule.rb +2 -0
- data/lib/fog/openstack/requests/compute/get_security_group.rb +14 -24
- data/lib/fog/openstack/requests/compute/get_security_group_rule.rb +38 -0
- data/lib/fog/openstack/requests/compute/list_hosts.rb +3 -3
- data/lib/fog/openstack/requests/compute/list_tenants.rb +1 -1
- data/lib/fog/openstack/requests/compute/remove_flavor_access.rb +1 -1
- data/lib/fog/openstack/requests/compute/update_quota.rb +1 -1
- data/lib/fog/openstack/requests/identity/create_ec2_credential.rb +1 -1
- data/lib/fog/openstack/requests/identity/create_role.rb +1 -1
- data/lib/fog/openstack/requests/identity/create_user.rb +1 -1
- data/lib/fog/openstack/requests/identity/update_user.rb +1 -1
- data/lib/fog/openstack/requests/image/update_image_members.rb +1 -1
- data/lib/fog/openstack/requests/orchestration/create_stack.rb +2 -2
- data/lib/fog/openstack/requests/orchestration/update_stack.rb +1 -1
- data/lib/fog/openstack/requests/storage/get_object_http_url.rb +13 -0
- data/lib/fog/openstack/requests/storage/get_object_https_url.rb +0 -14
- data/lib/fog/openstack/requests/volume/create_volume.rb +1 -1
- data/lib/fog/openstack/requests/volume/create_volume_snapshot.rb +1 -1
- data/lib/fog/openstack/requests/volume/get_volume_type_details.rb +32 -0
- data/lib/fog/openstack/requests/volume/list_volume_types.rb +41 -0
- data/lib/fog/openstack/storage.rb +2 -0
- data/lib/fog/openstack/volume.rb +9 -5
- data/lib/fog/rackspace/compute.rb +1 -4
- data/lib/fog/rackspace/compute_v2.rb +1 -0
- data/lib/fog/rackspace/docs/auto_scale.md +9 -9
- data/lib/fog/rackspace/docs/getting_started.md +1 -0
- data/lib/fog/rackspace/docs/queues.md +312 -0
- data/lib/fog/rackspace/examples/queues/claim_messages.rb +60 -0
- data/lib/fog/rackspace/examples/queues/create_queue.rb +45 -0
- data/lib/fog/rackspace/examples/queues/delete_message.rb +72 -0
- data/lib/fog/rackspace/examples/queues/delete_queue.rb +53 -0
- data/lib/fog/rackspace/examples/queues/list_messages.rb +64 -0
- data/lib/fog/rackspace/examples/queues/post_message.rb +59 -0
- data/lib/fog/rackspace/models/compute_v2/key_pairs.rb +1 -1
- data/lib/fog/rackspace/models/compute_v2/server.rb +9 -3
- data/lib/fog/rackspace/models/compute_v2/servers.rb +2 -2
- data/lib/fog/rackspace/models/identity/service_catalog.rb +44 -59
- data/lib/fog/rackspace/models/queues/claim.rb +41 -1
- data/lib/fog/rackspace/models/queues/claims.rb +25 -0
- data/lib/fog/rackspace/models/queues/message.rb +43 -5
- data/lib/fog/rackspace/models/queues/messages.rb +37 -0
- data/lib/fog/rackspace/models/queues/queue.rb +66 -3
- data/lib/fog/rackspace/models/queues/queues.rb +15 -0
- data/lib/fog/rackspace/models/storage/file.rb +8 -1
- data/lib/fog/rackspace/requests/compute_v2/delete_keypair.rb +1 -1
- data/lib/fog/rackspace/requests/compute_v2/get_keypair.rb +1 -1
- data/lib/fog/rackspace/requests/queues/create_claim.rb +15 -0
- data/lib/fog/rackspace/requests/queues/create_message.rb +15 -0
- data/lib/fog/rackspace/requests/queues/create_queue.rb +11 -0
- data/lib/fog/rackspace/requests/queues/delete_claim.rb +12 -0
- data/lib/fog/rackspace/requests/queues/delete_message.rb +14 -0
- data/lib/fog/rackspace/requests/queues/delete_queue.rb +10 -0
- data/lib/fog/rackspace/requests/queues/get_claim.rb +11 -0
- data/lib/fog/rackspace/requests/queues/get_message.rb +12 -0
- data/lib/fog/rackspace/requests/queues/get_queue.rb +10 -0
- data/lib/fog/rackspace/requests/queues/get_queue_stats.rb +10 -0
- data/lib/fog/rackspace/requests/queues/list_messages.rb +26 -0
- data/lib/fog/rackspace/requests/queues/list_queues.rb +17 -2
- data/lib/fog/rackspace/requests/queues/update_claim.rb +7 -0
- data/lib/fog/rackspace/service.rb +6 -2
- data/lib/fog/rackspace/storage.rb +1 -4
- data/lib/fog/riakcs.rb +2 -2
- data/lib/fog/riakcs/provisioning.rb +1 -3
- data/lib/fog/riakcs/requests/provisioning/create_user.rb +2 -2
- data/lib/fog/riakcs/requests/provisioning/get_user.rb +1 -1
- data/lib/fog/riakcs/requests/provisioning/list_users.rb +1 -1
- data/lib/fog/riakcs/requests/usage/get_usage.rb +1 -1
- data/lib/fog/riakcs/usage.rb +0 -2
- data/lib/fog/vcloud_director/README.md +2 -0
- data/lib/fog/vcloud_director/compute.rb +79 -8
- data/lib/fog/vcloud_director/generators/compute/org_vdc_network.rb +91 -0
- data/lib/fog/vcloud_director/generators/compute/vapp.rb +30 -0
- data/lib/fog/vcloud_director/generators/compute/vm.rb +33 -0
- data/lib/fog/vcloud_director/models/compute/medias.rb +1 -1
- data/lib/fog/vcloud_director/models/compute/vm_customization.rb +2 -0
- data/lib/fog/vcloud_director/parsers/compute/vm_customization.rb +2 -0
- data/lib/fog/vcloud_director/requests/compute/delete_network.rb +64 -0
- data/lib/fog/vcloud_director/requests/compute/get_execute_query.rb +433 -333
- data/lib/fog/vcloud_director/requests/compute/get_vapp_metadata.rb +3 -1
- data/lib/fog/vcloud_director/requests/compute/post_attach_disk.rb +1 -1
- data/lib/fog/vcloud_director/requests/compute/post_configure_edge_gateway_services.rb +20 -2
- data/lib/fog/vcloud_director/requests/compute/post_create_org_vdc_network.rb +176 -0
- data/lib/fog/vcloud_director/requests/compute/post_detach_disk.rb +1 -1
- data/lib/fog/vcloud_director/requests/compute/post_eject_cd_rom.rb +1 -1
- data/lib/fog/vcloud_director/requests/compute/post_insert_cd_rom.rb +1 -1
- data/lib/fog/vcloud_director/requests/compute/put_guest_customization_section_vapp.rb +1 -0
- data/lib/fog/vcloud_director/requests/compute/put_vapp_name_and_description.rb +37 -0
- data/lib/fog/vcloud_director/requests/compute/put_vm.rb +39 -0
- data/lib/fog/version.rb +1 -1
- data/lib/fog/vsphere/compute.rb +3 -0
- data/lib/fog/vsphere/models/compute/datastore.rb +1 -0
- data/lib/fog/vsphere/models/compute/interface.rb +50 -2
- data/lib/fog/vsphere/models/compute/interfaces.rb +25 -10
- data/lib/fog/vsphere/models/compute/scsicontroller.rb +19 -0
- data/lib/fog/vsphere/models/compute/server.rb +27 -8
- data/lib/fog/vsphere/requests/compute/create_vm.rb +34 -8
- data/lib/fog/vsphere/requests/compute/get_vm_first_scsi_controller.rb +26 -0
- data/lib/fog/vsphere/requests/compute/list_datastores.rb +9 -8
- data/lib/fog/vsphere/requests/compute/modify_vm_interface.rb +9 -6
- data/lib/fog/vsphere/requests/compute/set_vm_customvalue.rb +19 -0
- data/lib/fog/xenserver.rb +2 -1
- data/lib/fog/xenserver/compute.rb +37 -1
- data/lib/fog/xenserver/models/compute/blob.rb +22 -0
- data/lib/fog/xenserver/models/compute/blobs.rb +25 -0
- data/lib/fog/xenserver/models/compute/bond.rb +23 -0
- data/lib/fog/xenserver/models/compute/bonds.rb +25 -0
- data/lib/fog/xenserver/models/compute/console.rb +3 -1
- data/lib/fog/xenserver/models/compute/crash_dump.rb +19 -0
- data/lib/fog/xenserver/models/compute/crash_dumps.rb +25 -0
- data/lib/fog/xenserver/models/compute/dr_task.rb +17 -0
- data/lib/fog/xenserver/models/compute/dr_tasks.rb +25 -0
- data/lib/fog/xenserver/models/compute/gpu_group.rb +22 -0
- data/lib/fog/xenserver/models/compute/gpu_groups.rb +25 -0
- data/lib/fog/xenserver/models/compute/guest_metrics.rb +2 -1
- data/lib/fog/xenserver/models/compute/host.rb +41 -8
- data/lib/fog/xenserver/models/compute/host_cpu.rb +2 -1
- data/lib/fog/xenserver/models/compute/host_crash_dump.rb +20 -0
- data/lib/fog/xenserver/models/compute/host_crash_dumps.rb +25 -0
- data/lib/fog/xenserver/models/compute/host_metrics.rb +1 -1
- data/lib/fog/xenserver/models/compute/host_patch.rb +25 -0
- data/lib/fog/xenserver/models/compute/host_patchs.rb +25 -0
- data/lib/fog/xenserver/models/compute/network.rb +7 -6
- data/lib/fog/xenserver/models/compute/pbd.rb +3 -1
- data/lib/fog/xenserver/models/compute/pci.rb +22 -0
- data/lib/fog/xenserver/models/compute/pcis.rb +25 -0
- data/lib/fog/xenserver/models/compute/pgpu.rb +20 -0
- data/lib/fog/xenserver/models/compute/pgpus.rb +25 -0
- data/lib/fog/xenserver/models/compute/pif.rb +19 -8
- data/lib/fog/xenserver/models/compute/pif_metrics.rb +28 -0
- data/lib/fog/xenserver/models/compute/pifs_metrics.rb +25 -0
- data/lib/fog/xenserver/models/compute/pool.rb +18 -1
- data/lib/fog/xenserver/models/compute/pool_patch.rb +24 -0
- data/lib/fog/xenserver/models/compute/pool_patchs.rb +25 -0
- data/lib/fog/xenserver/models/compute/role.rb +19 -0
- data/lib/fog/xenserver/models/compute/roles.rb +25 -0
- data/lib/fog/xenserver/models/compute/server.rb +59 -26
- data/lib/fog/xenserver/models/compute/server_appliance.rb +21 -0
- data/lib/fog/xenserver/models/compute/server_appliances.rb +25 -0
- data/lib/fog/xenserver/models/compute/storage_manager.rb +28 -0
- data/lib/fog/xenserver/models/compute/storage_managers.rb +25 -0
- data/lib/fog/xenserver/models/compute/storage_repository.rb +4 -1
- data/lib/fog/xenserver/models/compute/tunnel.rb +20 -0
- data/lib/fog/xenserver/models/compute/tunnels.rb +25 -0
- data/lib/fog/xenserver/models/compute/vbd.rb +3 -2
- data/lib/fog/xenserver/models/compute/vbd_metrics.rb +1 -1
- data/lib/fog/xenserver/models/compute/vdi.rb +4 -1
- data/lib/fog/xenserver/models/compute/vif.rb +11 -2
- data/lib/fog/xenserver/models/compute/vlan.rb +2 -1
- data/lib/fog/xenserver/models/compute/vmpp.rb +35 -0
- data/lib/fog/xenserver/models/compute/vmpps.rb +25 -0
- data/lib/fog/xenserver/models/compute/vtpm.rb +18 -0
- data/lib/fog/xenserver/models/compute/vtpms.rb +25 -0
- data/lib/fog/xenserver/requests/compute/reboot_server.rb +1 -1
- data/lib/tasks/changelog_task.rb +0 -1
- data/tests/aws/models/dns/record_tests.rb +1 -2
- data/tests/aws/models/dns/records_tests.rb +2 -7
- data/tests/aws/models/dns/zone_tests.rb +1 -1
- data/tests/aws/models/dns/zones_tests.rb +1 -1
- data/tests/aws/models/elb/model_tests.rb +10 -0
- data/tests/aws/models/storage/file_tests.rb +4 -0
- data/tests/aws/requests/compute/assign_private_ip_tests.rb +52 -0
- data/tests/aws/requests/compute/vpc_tests.rb +17 -1
- data/tests/aws/requests/dns/dns_tests.rb +1 -26
- data/tests/aws/requests/elb/load_balancer_tests.rb +6 -0
- data/tests/aws/requests/rds/{subnet_groups_test.rb → subnet_groups_tests.rb} +4 -0
- data/tests/aws/requests/storage/bucket_tests.rb +17 -0
- data/tests/aws/requests/storage/delete_multiple_objects_tests.rb +12 -0
- data/tests/brightbox/compute/schema.rb +0 -13
- data/tests/brightbox/models/compute/server_tests.rb +7 -9
- data/tests/brightbox/requests/compute/interface_tests.rb +7 -19
- data/tests/digitalocean/models/compute/server_tests.rb +4 -3
- data/tests/google/models/compute/disk_tests.rb +5 -0
- data/tests/google/models/compute/disks_tests.rb +5 -0
- data/tests/google/models/compute/server_tests.rb +5 -1
- data/tests/google/models/compute/servers_tests.rb +5 -0
- data/tests/google/requests/compute/disk_tests.rb +2 -1
- data/tests/google/requests/compute/firewall_tests.rb +1 -0
- data/tests/google/requests/compute/image_tests.rb +3 -0
- data/tests/google/requests/compute/network_tests.rb +1 -0
- data/tests/google/requests/compute/operation_tests.rb +1 -0
- data/tests/google/requests/compute/server_tests.rb +2 -3
- data/tests/google/requests/compute/zone_tests.rb +1 -6
- data/tests/helpers/collection_helper.rb +10 -2
- data/tests/helpers/mock_helper.rb +4 -5
- data/tests/local/models/directories_tests.rb +17 -0
- data/tests/openstack/models/compute/security_group_tests.rb +54 -0
- data/tests/openstack/requests/compute/security_group_tests.rb +22 -20
- data/tests/openstack/requests/network/network_tests.rb +8 -8
- data/tests/rackspace/compute_tests.rb +0 -5
- data/tests/rackspace/helper.rb +9 -4
- data/tests/rackspace/models/compute_v2/server_tests.rb +29 -1
- data/tests/rackspace/models/identity/service_catalog_tests.rb +87 -39
- data/tests/rackspace/models/queues/message_tests.rb +16 -0
- data/tests/rackspace/models/storage/file_tests.rb +29 -0
- data/tests/rackspace/requests/compute_v2/address_tests.rb +3 -1
- data/tests/rackspace/requests/compute_v2/metadata_tests.rb +4 -2
- data/tests/rackspace/requests/compute_v2/server_tests.rb +3 -6
- data/tests/vcloud_director/models/compute/media_tests.rb +18 -5
- data/tests/vcloud_director/models/compute/vapp_tests.rb +3 -1
- data/tests/vcloud_director/models/compute/vms_tests.rb +2 -1
- data/tests/vcloud_director/requests/compute/edge_gateway_tests.rb +19 -10
- data/tests/vcloud_director/requests/compute/network_tests.rb +64 -3
- data/tests/vcloud_director/requests/compute/query_tests.rb +67 -2
- data/tests/vsphere/requests/compute/set_vm_customvalue_tests.rb +21 -0
- metadata +112 -11
- data/fogkeytest1.pem +0 -27
- data/lib/fog/hp/README_HP.rdoc +0 -61
@@ -0,0 +1,91 @@
|
|
1
|
+
module Fog
|
2
|
+
module Generators
|
3
|
+
module Compute
|
4
|
+
module VcloudDirector
|
5
|
+
|
6
|
+
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/types/OrgVdcNetworkType.html
|
7
|
+
class OrgVdcNetwork
|
8
|
+
attr_reader :options
|
9
|
+
|
10
|
+
def initialize(options={})
|
11
|
+
@options = options
|
12
|
+
end
|
13
|
+
|
14
|
+
def generate_xml
|
15
|
+
|
16
|
+
body = Nokogiri::XML::Builder.new do
|
17
|
+
attrs = {
|
18
|
+
:xmlns => 'http://www.vmware.com/vcloud/v1.5',
|
19
|
+
:name => options[:name]
|
20
|
+
}
|
21
|
+
OrgVdcNetwork(attrs) {
|
22
|
+
Description options[:Description] if options.key?(:Description)
|
23
|
+
if configuration = options[:Configuration]
|
24
|
+
Configuration {
|
25
|
+
if ip_scopes = configuration[:IpScopes]
|
26
|
+
IpScopes {
|
27
|
+
if ip_scope = ip_scopes[:IpScope]
|
28
|
+
IpScope {
|
29
|
+
IsInherited ip_scope[:IsInherited] if ip_scope.key?(:IsInherited)
|
30
|
+
Gateway ip_scope[:Gateway] if ip_scope.key?(:Gateway)
|
31
|
+
Netmask ip_scope[:Netmask] if ip_scope.key?(:Netmask)
|
32
|
+
Dns1 ip_scope[:Dns1] if ip_scope.key?(:Dns1)
|
33
|
+
Dns2 ip_scope[:Dns2] if ip_scope.key?(:Dns2)
|
34
|
+
DnsSuffix ip_scope[:DnsSuffix] if ip_scope.key?(:DnsSuffix)
|
35
|
+
IsEnabled ip_scope[:IsEnabled] if ip_scope.key?(:IsEnabled)
|
36
|
+
if ip_ranges = ip_scope[:IpRanges]
|
37
|
+
IpRanges {
|
38
|
+
ip_ranges.each do |h|
|
39
|
+
if h.key?(:IpRange)
|
40
|
+
IpRange {
|
41
|
+
StartAddress h[:IpRange][:StartAddress]
|
42
|
+
EndAddress h[:IpRange][:EndAddress]
|
43
|
+
}
|
44
|
+
end
|
45
|
+
end
|
46
|
+
}
|
47
|
+
end
|
48
|
+
}
|
49
|
+
end
|
50
|
+
}
|
51
|
+
end
|
52
|
+
FenceMode configuration[:FenceMode]
|
53
|
+
if router_info = configuration[:RouterInfo]
|
54
|
+
RouterInfoType {
|
55
|
+
ExternalIp router_info[:ExternalIp]
|
56
|
+
}
|
57
|
+
end
|
58
|
+
}
|
59
|
+
end # Configuration
|
60
|
+
|
61
|
+
if edgegw = options[:EdgeGateway] and configuration[:FenceMode] != 'isolated'
|
62
|
+
EdgeGateway(edgegw)
|
63
|
+
elsif options[:Configuration] && options[:Configuration][:FenceMode] == 'isolated'
|
64
|
+
# isolated networks can specify ServiceConfig
|
65
|
+
if sc = options[:ServiceConfig]
|
66
|
+
ServiceConfig {
|
67
|
+
if dhcp = sc[:GatewayDhcpService]
|
68
|
+
IsEnabled dhcp[:IsEnabled] if dhcp[:IsEnabled]
|
69
|
+
if pool = dhcp[:Pool]
|
70
|
+
IsEnabled pool[:IsEnabled]
|
71
|
+
DefaultLeaseTime pool[:DefaultLeaseTime]
|
72
|
+
MaxLeaseTime pool[:MaxLeaseTime]
|
73
|
+
LowIpAddress pool[:LowIpAddress]
|
74
|
+
HighIpAddress pool[:HighIpAddress]
|
75
|
+
end
|
76
|
+
end
|
77
|
+
}
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
IsShared options[:IsShared] if options.key?(:IsShared)
|
82
|
+
|
83
|
+
}
|
84
|
+
end.to_xml
|
85
|
+
end
|
86
|
+
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Fog
|
2
|
+
module Generators
|
3
|
+
module Compute
|
4
|
+
module VcloudDirector
|
5
|
+
|
6
|
+
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/types/VAppType.html
|
7
|
+
class Vapp
|
8
|
+
attr_reader :name, :options
|
9
|
+
|
10
|
+
def initialize(name, options={})
|
11
|
+
@name = name
|
12
|
+
@options = options
|
13
|
+
end
|
14
|
+
|
15
|
+
def generate_xml
|
16
|
+
attrs = @attrs
|
17
|
+
Nokogiri::XML::Builder.new do
|
18
|
+
VApp('xmlns' => 'http://www.vmware.com/vcloud/v1.5',
|
19
|
+
'name' => name
|
20
|
+
) {
|
21
|
+
Description options[:Description] if options.key?(:Description)
|
22
|
+
}
|
23
|
+
end.to_xml
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Fog
|
2
|
+
module Generators
|
3
|
+
module Compute
|
4
|
+
module VcloudDirector
|
5
|
+
|
6
|
+
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/types/VmType.html
|
7
|
+
class Vm
|
8
|
+
attr_reader :attrs
|
9
|
+
|
10
|
+
def initialize(attrs={})
|
11
|
+
@attrs = attrs
|
12
|
+
end
|
13
|
+
|
14
|
+
def generate_xml
|
15
|
+
attrs = @attrs
|
16
|
+
Nokogiri::XML::Builder.new do
|
17
|
+
Vm('xmlns' => 'http://www.vmware.com/vcloud/v1.5', 'name' => attrs[:name]) {
|
18
|
+
Description attrs[:Description] if attrs.key?(:Description)
|
19
|
+
if attrs.key?(:StorageProfile)
|
20
|
+
StorageProfile(
|
21
|
+
'type' => 'application/vnd.vmware.vcloud.vdcStorageProfile+xml',
|
22
|
+
'name' => attrs[:StorageProfile][:name],
|
23
|
+
'href' => attrs[:StorageProfile][:href]
|
24
|
+
)
|
25
|
+
end
|
26
|
+
}
|
27
|
+
end.to_xml
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -23,7 +23,7 @@ module Fog
|
|
23
23
|
|
24
24
|
# Perhaps this would be better implemented as media#upload.
|
25
25
|
|
26
|
-
file = response.body[:Files][:File]
|
26
|
+
file = response.body[:Files][:File].first
|
27
27
|
file[:Link] = [file[:Link]] if file[:Link].is_a?(Hash)
|
28
28
|
link = file[:Link].detect {|l| l[:rel] == 'upload:default'}
|
29
29
|
|
@@ -14,6 +14,8 @@ module Fog
|
|
14
14
|
attribute :change_sid
|
15
15
|
attribute :join_domain_enabled
|
16
16
|
attribute :use_org_settings
|
17
|
+
attribute :admin_password_auto
|
18
|
+
attribute :admin_password
|
17
19
|
attribute :admin_password_enabled
|
18
20
|
attribute :reset_password_required
|
19
21
|
attribute :virtual_machine_id
|
@@ -32,6 +32,8 @@ module Fog
|
|
32
32
|
@response[:join_domain_enabled] = (value == "true")
|
33
33
|
when 'UseOrgSettings'
|
34
34
|
@response[:use_org_settings] = (value == "true")
|
35
|
+
when 'AdminPassword'
|
36
|
+
@response[:admin_password] = value
|
35
37
|
when 'AdminPasswordEnabled'
|
36
38
|
@response[:admin_password_enabled] = (value == "true")
|
37
39
|
when 'AdminPasswordAuto'
|
@@ -0,0 +1,64 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class VcloudDirector
|
4
|
+
class Real
|
5
|
+
# Delete an OrgVdcNetwork
|
6
|
+
#
|
7
|
+
# This operation is asynchronous and returns a task that you can
|
8
|
+
# monitor to track the progress of the request.
|
9
|
+
#
|
10
|
+
# @param [String] id Object identifier of the OrgVdcNetwork.
|
11
|
+
# @return [Excon::Response]
|
12
|
+
# * body<~Hash>:
|
13
|
+
#
|
14
|
+
# @raise [Fog::Compute::VcloudDirector::BadRequest]
|
15
|
+
#
|
16
|
+
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/DELETE-Network.html
|
17
|
+
# @since vCloud API version 0.9
|
18
|
+
def delete_network(id)
|
19
|
+
request(
|
20
|
+
:expects => 202,
|
21
|
+
:method => 'DELETE',
|
22
|
+
:parser => Fog::ToHashDocument.new,
|
23
|
+
:path => "admin/network/#{id}"
|
24
|
+
)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
class Mock
|
29
|
+
def delete_network(id)
|
30
|
+
|
31
|
+
unless data[:networks][id]
|
32
|
+
raise Fog::Compute::VcloudDirector::Forbidden.new(
|
33
|
+
"No access to entity \"(com.vmware.vcloud.entity.orgVdcNetwork:#{id})\""
|
34
|
+
)
|
35
|
+
end
|
36
|
+
|
37
|
+
owner = {
|
38
|
+
:href => make_href("network/#{id}"),
|
39
|
+
:type => 'application/vnd.vmware.vcloud.network+xml'
|
40
|
+
}
|
41
|
+
task_id = enqueue_task(
|
42
|
+
"Deleting Network(#{id})", 'DeleteNetwork', owner,
|
43
|
+
:on_success => lambda do
|
44
|
+
data[:networks].delete(id)
|
45
|
+
end
|
46
|
+
)
|
47
|
+
|
48
|
+
body = {
|
49
|
+
:xmlns => xmlns,
|
50
|
+
:xmlns_xsi => xmlns_xsi,
|
51
|
+
:xsi_schemaLocation => xsi_schema_location,
|
52
|
+
}.merge(task_body(task_id))
|
53
|
+
|
54
|
+
Excon::Response.new(
|
55
|
+
:status => 202,
|
56
|
+
:headers => {'Content-Type' => "#{body[:type]};version=#{api_version}"},
|
57
|
+
:body => body
|
58
|
+
)
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -118,344 +118,444 @@ module Fog
|
|
118
118
|
|
119
119
|
class Mock
|
120
120
|
def get_execute_query(type=nil, options={})
|
121
|
+
|
122
|
+
unless options[:fields].nil?
|
123
|
+
Fog::Mock.not_implemented("Fields are not yet implemented in get_execute_query Mock for #{type}")
|
124
|
+
end
|
125
|
+
|
126
|
+
unless options[:format].nil? || options[:format] == 'records'
|
127
|
+
Fog::Mock.not_implemented("Formats #{options[:format]} is not yet implemented in get_execute_query Mock for #{type}")
|
128
|
+
end
|
129
|
+
|
130
|
+
# NB: default is to sort by 'Database ID' (uuid?). Does this matter?
|
131
|
+
unless options[:sortAsc].nil? && options[:sortDesc].nil?
|
132
|
+
Fog::Mock.not_implemented("Sorting by field is not yet implemented in get_execute_query Mock for #{type}")
|
133
|
+
end
|
134
|
+
|
135
|
+
# NB: default offset is 0
|
136
|
+
unless options[:offset].nil?
|
137
|
+
Fog::Mock.not_implemented("Offset results are not yet implemented in get_execute_query Mock for #{type}")
|
138
|
+
end
|
139
|
+
|
140
|
+
# NB: default page is 1
|
141
|
+
if options.key?(:page) && options[:page].to_i != 1
|
142
|
+
Fog::Mock.not_implemented("Paginated results are not yet implemented in get_execute_query Mock for #{type}")
|
143
|
+
end
|
144
|
+
|
145
|
+
# NB: default pageSize is 25
|
146
|
+
unless options[:pageSize].nil?
|
147
|
+
Fog::Mock.not_implemented("Paginated results are not yet implemented in get_execute_query Mock for #{type}")
|
148
|
+
end
|
149
|
+
|
121
150
|
if type.nil?
|
122
|
-
body =
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
:href=>make_href('query'),
|
127
|
-
:xsi_schemaLocation=>xsi_schema_location,
|
128
|
-
:Link=>
|
129
|
-
[{:rel=>"down",
|
130
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
131
|
-
:name=>"organization",
|
132
|
-
:href=>make_href('query?type=organization&format=references')},
|
133
|
-
{:rel=>"down",
|
134
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
135
|
-
:name=>"organization",
|
136
|
-
:href=>make_href('query?type=organization&format=records')},
|
137
|
-
{:rel=>"down",
|
138
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
139
|
-
:name=>"organization",
|
140
|
-
:href=>make_href('query?type=organization&format=idrecords')},
|
141
|
-
{:rel=>"down",
|
142
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
143
|
-
:name=>"orgVdc",
|
144
|
-
:href=>make_href('query?type=orgVdc&format=references')},
|
145
|
-
{:rel=>"down",
|
146
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
147
|
-
:name=>"orgVdc",
|
148
|
-
:href=>make_href('query?type=orgVdc&format=records')},
|
149
|
-
{:rel=>"down",
|
150
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
151
|
-
:name=>"orgVdc",
|
152
|
-
:href=>make_href('query?type=orgVdc&format=idrecords')},
|
153
|
-
{:rel=>"down",
|
154
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
155
|
-
:name=>"media",
|
156
|
-
:href=>make_href('query?type=media&format=references')},
|
157
|
-
{:rel=>"down",
|
158
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
159
|
-
:name=>"media",
|
160
|
-
:href=>make_href('query?type=media&format=records')},
|
161
|
-
{:rel=>"down",
|
162
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
163
|
-
:name=>"media",
|
164
|
-
:href=>make_href('query?type=media&format=idrecords')},
|
165
|
-
{:rel=>"down",
|
166
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
167
|
-
:name=>"vAppTemplate",
|
168
|
-
:href=>make_href('query?type=vAppTemplate&format=references')},
|
169
|
-
{:rel=>"down",
|
170
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
171
|
-
:name=>"vAppTemplate",
|
172
|
-
:href=>make_href('query?type=vAppTemplate&format=records')},
|
173
|
-
{:rel=>"down",
|
174
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
175
|
-
:name=>"vAppTemplate",
|
176
|
-
:href=>make_href('query?type=vAppTemplate&format=idrecords')},
|
177
|
-
{:rel=>"down",
|
178
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
179
|
-
:name=>"vApp",
|
180
|
-
:href=>make_href('query?type=vApp&format=references')},
|
181
|
-
{:rel=>"down",
|
182
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
183
|
-
:name=>"vApp",
|
184
|
-
:href=>make_href('query?type=vApp&format=records')},
|
185
|
-
{:rel=>"down",
|
186
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
187
|
-
:name=>"vApp",
|
188
|
-
:href=>make_href('query?type=vApp&format=idrecords')},
|
189
|
-
{:rel=>"down",
|
190
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
191
|
-
:name=>"vm",
|
192
|
-
:href=>make_href('query?type=vm&format=references')},
|
193
|
-
{:rel=>"down",
|
194
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
195
|
-
:name=>"vm",
|
196
|
-
:href=>make_href('query?type=vm&format=records')},
|
197
|
-
{:rel=>"down",
|
198
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
199
|
-
:name=>"vm",
|
200
|
-
:href=>make_href('query?type=vm&format=idrecords')},
|
201
|
-
{:rel=>"down",
|
202
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
203
|
-
:name=>"orgNetwork",
|
204
|
-
:href=>make_href('query?type=orgNetwork&format=references')},
|
205
|
-
{:rel=>"down",
|
206
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
207
|
-
:name=>"orgNetwork",
|
208
|
-
:href=>make_href('query?type=orgNetwork&format=records')},
|
209
|
-
{:rel=>"down",
|
210
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
211
|
-
:name=>"orgNetwork",
|
212
|
-
:href=>make_href('query?type=orgNetwork&format=idrecords')},
|
213
|
-
{:rel=>"down",
|
214
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
215
|
-
:name=>"vAppNetwork",
|
216
|
-
:href=>make_href('query?type=vAppNetwork&format=references')},
|
217
|
-
{:rel=>"down",
|
218
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
219
|
-
:name=>"vAppNetwork",
|
220
|
-
:href=>make_href('query?type=vAppNetwork&format=records')},
|
221
|
-
{:rel=>"down",
|
222
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
223
|
-
:name=>"vAppNetwork",
|
224
|
-
:href=>make_href('query?type=vAppNetwork&format=idrecords')},
|
225
|
-
{:rel=>"down",
|
226
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
227
|
-
:name=>"catalog",
|
228
|
-
:href=>make_href('query?type=catalog&format=references')},
|
229
|
-
{:rel=>"down",
|
230
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
231
|
-
:name=>"catalog",
|
232
|
-
:href=>make_href('query?type=catalog&format=records')},
|
233
|
-
{:rel=>"down",
|
234
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
235
|
-
:name=>"catalog",
|
236
|
-
:href=>make_href('query?type=catalog&format=idrecords')},
|
237
|
-
{:rel=>"down",
|
238
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
239
|
-
:name=>"group",
|
240
|
-
:href=>make_href('query?type=group&format=references')},
|
241
|
-
{:rel=>"down",
|
242
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
243
|
-
:name=>"group",
|
244
|
-
:href=>make_href('query?type=group&format=records')},
|
245
|
-
{:rel=>"down",
|
246
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
247
|
-
:name=>"group",
|
248
|
-
:href=>make_href('query?type=group&format=idrecords')},
|
249
|
-
{:rel=>"down",
|
250
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
251
|
-
:name=>"user",
|
252
|
-
:href=>make_href('query?type=user&format=references')},
|
253
|
-
{:rel=>"down",
|
254
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
255
|
-
:name=>"user",
|
256
|
-
:href=>make_href('query?type=user&format=records')},
|
257
|
-
{:rel=>"down",
|
258
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
259
|
-
:name=>"user",
|
260
|
-
:href=>make_href('query?type=user&format=idrecords')},
|
261
|
-
{:rel=>"down",
|
262
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
263
|
-
:name=>"strandedUser",
|
264
|
-
:href=>make_href('query?type=strandedUser&format=references')},
|
265
|
-
{:rel=>"down",
|
266
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
267
|
-
:name=>"strandedUser",
|
268
|
-
:href=>make_href('query?type=strandedUser&format=records')},
|
269
|
-
{:rel=>"down",
|
270
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
271
|
-
:name=>"strandedUser",
|
272
|
-
:href=>make_href('query?type=strandedUser&format=idrecords')},
|
273
|
-
{:rel=>"down",
|
274
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
275
|
-
:name=>"role",
|
276
|
-
:href=>make_href('query?type=role&format=references')},
|
277
|
-
{:rel=>"down",
|
278
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
279
|
-
:name=>"role",
|
280
|
-
:href=>make_href('query?type=role&format=records')},
|
281
|
-
{:rel=>"down",
|
282
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
283
|
-
:name=>"role",
|
284
|
-
:href=>make_href('query?type=role&format=idrecords')},
|
285
|
-
{:rel=>"down",
|
286
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
287
|
-
:name=>"allocatedExternalAddress",
|
288
|
-
:href=>make_href('query?type=allocatedExternalAddress&format=records')},
|
289
|
-
{:rel=>"down",
|
290
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
291
|
-
:name=>"allocatedExternalAddress",
|
292
|
-
:href=>make_href('query?type=allocatedExternalAddress&format=idrecords')},
|
293
|
-
{:rel=>"down",
|
294
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
295
|
-
:name=>"event",
|
296
|
-
:href=>make_href('query?type=event&format=records')},
|
297
|
-
{:rel=>"down",
|
298
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
299
|
-
:name=>"event",
|
300
|
-
:href=>make_href('query?type=event&format=idrecords')},
|
301
|
-
{:rel=>"down",
|
302
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
303
|
-
:name=>"right",
|
304
|
-
:href=>make_href('query?type=right&format=references')},
|
305
|
-
{:rel=>"down",
|
306
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
307
|
-
:name=>"right",
|
308
|
-
:href=>make_href('query?type=right&format=records')},
|
309
|
-
{:rel=>"down",
|
310
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
311
|
-
:name=>"right",
|
312
|
-
:href=>make_href('query?type=right&format=idrecords')},
|
313
|
-
{:rel=>"down",
|
314
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
315
|
-
:name=>"vAppOrgNetworkRelation",
|
316
|
-
:href=>make_href('query?type=vAppOrgNetworkRelation&format=references')},
|
317
|
-
{:rel=>"down",
|
318
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
319
|
-
:name=>"vAppOrgNetworkRelation",
|
320
|
-
:href=>make_href('query?type=vAppOrgNetworkRelation&format=records')},
|
321
|
-
{:rel=>"down",
|
322
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
323
|
-
:name=>"vAppOrgNetworkRelation",
|
324
|
-
:href=>make_href('query?type=vAppOrgNetworkRelation&format=idrecords')},
|
325
|
-
{:rel=>"down",
|
326
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
327
|
-
:name=>"catalogItem",
|
328
|
-
:href=>make_href('query?type=catalogItem&format=references')},
|
329
|
-
{:rel=>"down",
|
330
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
331
|
-
:name=>"catalogItem",
|
332
|
-
:href=>make_href('query?type=catalogItem&format=records')},
|
333
|
-
{:rel=>"down",
|
334
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
335
|
-
:name=>"catalogItem",
|
336
|
-
:href=>make_href('query?type=catalogItem&format=idrecords')},
|
337
|
-
{:rel=>"down",
|
338
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
339
|
-
:name=>"task",
|
340
|
-
:href=>make_href('query?type=task&format=references')},
|
341
|
-
{:rel=>"down",
|
342
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
343
|
-
:name=>"task",
|
344
|
-
:href=>make_href('query?type=task&format=records')},
|
345
|
-
{:rel=>"down",
|
346
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
347
|
-
:name=>"task",
|
348
|
-
:href=>make_href('query?type=task&format=idrecords')},
|
349
|
-
{:rel=>"down",
|
350
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
351
|
-
:name=>"disk",
|
352
|
-
:href=>make_href('query?type=disk&format=references')},
|
353
|
-
{:rel=>"down",
|
354
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
355
|
-
:name=>"disk",
|
356
|
-
:href=>make_href('query?type=disk&format=records')},
|
357
|
-
{:rel=>"down",
|
358
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
359
|
-
:name=>"disk",
|
360
|
-
:href=>make_href('query?type=disk&format=idrecords')},
|
361
|
-
{:rel=>"down",
|
362
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
363
|
-
:name=>"vmDiskRelation",
|
364
|
-
:href=>make_href('query?type=vmDiskRelation&format=records')},
|
365
|
-
{:rel=>"down",
|
366
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
367
|
-
:name=>"vmDiskRelation",
|
368
|
-
:href=>make_href('query?type=vmDiskRelation&format=idrecords')},
|
369
|
-
{:rel=>"down",
|
370
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
371
|
-
:name=>"service",
|
372
|
-
:href=>make_href('query?type=service&format=references')},
|
373
|
-
{:rel=>"down",
|
374
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
375
|
-
:name=>"service",
|
376
|
-
:href=>make_href('query?type=service&format=records')},
|
377
|
-
{:rel=>"down",
|
378
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
379
|
-
:name=>"service",
|
380
|
-
:href=>make_href('query?type=service&format=idrecords')},
|
381
|
-
{:rel=>"down",
|
382
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
383
|
-
:name=>"orgVdcStorageProfile",
|
384
|
-
:href=>make_href('query?type=orgVdcStorageProfile&format=references')},
|
385
|
-
{:rel=>"down",
|
386
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
387
|
-
:name=>"orgVdcStorageProfile",
|
388
|
-
:href=>make_href('query?type=orgVdcStorageProfile&format=records')},
|
389
|
-
{:rel=>"down",
|
390
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
391
|
-
:name=>"orgVdcStorageProfile",
|
392
|
-
:href=>make_href('query?type=orgVdcStorageProfile&format=idrecords')},
|
393
|
-
{:rel=>"down",
|
394
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
395
|
-
:name=>"apiDefinition",
|
396
|
-
:href=>make_href('query?type=apiDefinition&format=references')},
|
397
|
-
{:rel=>"down",
|
398
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
399
|
-
:name=>"apiDefinition",
|
400
|
-
:href=>make_href('query?type=apiDefinition&format=records')},
|
401
|
-
{:rel=>"down",
|
402
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
403
|
-
:name=>"apiDefinition",
|
404
|
-
:href=>make_href('query?type=apiDefinition&format=idrecords')},
|
405
|
-
{:rel=>"down",
|
406
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
407
|
-
:name=>"fileDescriptor",
|
408
|
-
:href=>make_href('query?type=fileDescriptor&format=records')},
|
409
|
-
{:rel=>"down",
|
410
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
411
|
-
:name=>"fileDescriptor",
|
412
|
-
:href=>make_href('query?type=fileDescriptor&format=idrecords')},
|
413
|
-
{:rel=>"down",
|
414
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
415
|
-
:name=>"edgeGateway",
|
416
|
-
:href=>make_href('query?type=edgeGateway&format=references')},
|
417
|
-
{:rel=>"down",
|
418
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
419
|
-
:name=>"edgeGateway",
|
420
|
-
:href=>make_href('query?type=edgeGateway&format=records')},
|
421
|
-
{:rel=>"down",
|
422
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
423
|
-
:name=>"edgeGateway",
|
424
|
-
:href=>make_href('query?type=edgeGateway&format=idrecords')},
|
425
|
-
{:rel=>"down",
|
426
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
427
|
-
:name=>"orgVdcNetwork",
|
428
|
-
:href=>make_href('query?type=orgVdcNetwork&format=references')},
|
429
|
-
{:rel=>"down",
|
430
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
431
|
-
:name=>"orgVdcNetwork",
|
432
|
-
:href=>make_href('query?type=orgVdcNetwork&format=records')},
|
433
|
-
{:rel=>"down",
|
434
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
435
|
-
:name=>"orgVdcNetwork",
|
436
|
-
:href=>make_href('query?type=orgVdcNetwork&format=idrecords')},
|
437
|
-
{:rel=>"down",
|
438
|
-
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
439
|
-
:name=>"vAppOrgVdcNetworkRelation",
|
440
|
-
:href=>make_href('query?type=vAppOrgVdcNetworkRelation&format=references')},
|
441
|
-
{:rel=>"down",
|
442
|
-
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
443
|
-
:name=>"vAppOrgVdcNetworkRelation",
|
444
|
-
:href=>make_href('query?type=vAppOrgVdcNetworkRelation&format=records')},
|
445
|
-
{:rel=>"down",
|
446
|
-
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
447
|
-
:name=>"vAppOrgVdcNetworkRelation",
|
448
|
-
:href=>make_href('query?type=vAppOrgVdcNetworkRelation&format=idrecords')}]}
|
151
|
+
body = all_types
|
152
|
+
else
|
153
|
+
body = fetch_items(type, options)
|
154
|
+
end
|
449
155
|
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
156
|
+
Excon::Response.new(
|
157
|
+
:status => 200,
|
158
|
+
:headers => {'Content-Type' => "#{body[:type]};version=#{api_version}"},
|
159
|
+
:body => body
|
160
|
+
)
|
161
|
+
|
162
|
+
end
|
163
|
+
|
164
|
+
private
|
165
|
+
|
166
|
+
def fetch_items(type, opts)
|
167
|
+
|
168
|
+
if opts.key?(:filter) && opts[:filter] =~ /^name==([^;,]+)$/
|
169
|
+
name = $1
|
170
|
+
elsif opts.key?(:filter)
|
171
|
+
Fog::Mock.not_implemented("Complex filters are not yet implemented in get_execute_query Mock for #{type}: #{opts[:filter]}")
|
172
|
+
end
|
173
|
+
|
174
|
+
body = {
|
175
|
+
:xmlns=>xmlns,
|
176
|
+
:xmlns_xsi=>xmlns_xsi,
|
177
|
+
:href=>make_href('query'),
|
178
|
+
:name=>type,
|
179
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
180
|
+
:xsi_schemaLocation=>xsi_schema_location,
|
181
|
+
}
|
182
|
+
|
183
|
+
if type == 'orgVdcNetwork'
|
184
|
+
record_type = :OrgVdcNetworkRecords
|
185
|
+
data_type = :networks
|
186
|
+
records = []
|
187
|
+
data[data_type].each do |id, dr|
|
188
|
+
r = {}
|
189
|
+
if name.nil? || dr[:name] == name
|
190
|
+
vdc_id = dr[:vdc]
|
191
|
+
if data[:vdcs][vdc_id] && data[:vdcs][vdc_id].key?(:name)
|
192
|
+
r[:vdcName] = data[:vdcs][vdc_id][:name]
|
193
|
+
end
|
194
|
+
r[:name] = dr[:name]
|
195
|
+
r[:vdc] = make_href("vdc/#{vdc_id}") if vdc_id
|
196
|
+
r[:href] = make_href("admin/network/#{id}")
|
197
|
+
mapping = {
|
198
|
+
:description => :Description,
|
199
|
+
:netmask => :Netmask,
|
200
|
+
:linkType => :LinkType,
|
201
|
+
:dns1 => :Dns1,
|
202
|
+
:dns2 => :Dns2,
|
203
|
+
:dnsSuffix => :DnsSuffix,
|
204
|
+
:defaultGateway => :Gateway,
|
205
|
+
:isShared => :IsShared,
|
206
|
+
:isBusy => :IsBusy,
|
207
|
+
:isIpScopeInherited => :IsIpScopeInherited,
|
208
|
+
}
|
209
|
+
|
210
|
+
mapping.each do |k,v|
|
211
|
+
r[k] = dr[v] if dr.key?(v)
|
212
|
+
end
|
213
|
+
|
214
|
+
records << r
|
215
|
+
end
|
216
|
+
end
|
217
|
+
body[:page] = 1.to_s # TODO: Support pagination
|
218
|
+
body[:pageSize] = records.size.to_s # TODO: Support pagination
|
219
|
+
body[:total] = records.size.to_s
|
220
|
+
body[record_type] = records
|
455
221
|
else
|
456
|
-
Fog::Mock.not_implemented
|
222
|
+
Fog::Mock.not_implemented("No 'get by name' get_execute_query Mock for #{type} (#{name})")
|
457
223
|
end
|
224
|
+
|
225
|
+
body
|
458
226
|
end
|
227
|
+
|
228
|
+
def all_types
|
229
|
+
{:xmlns=>xmlns,
|
230
|
+
:xmlns_xsi=>xmlns_xsi,
|
231
|
+
:type=>"application/vnd.vmware.vcloud.query.queryList+xml",
|
232
|
+
:href=>make_href('query'),
|
233
|
+
:xsi_schemaLocation=>xsi_schema_location,
|
234
|
+
:Link=>
|
235
|
+
[{:rel=>"down",
|
236
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
237
|
+
:name=>"organization",
|
238
|
+
:href=>make_href('query?type=organization&format=references')},
|
239
|
+
{:rel=>"down",
|
240
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
241
|
+
:name=>"organization",
|
242
|
+
:href=>make_href('query?type=organization&format=records')},
|
243
|
+
{:rel=>"down",
|
244
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
245
|
+
:name=>"organization",
|
246
|
+
:href=>make_href('query?type=organization&format=idrecords')},
|
247
|
+
{:rel=>"down",
|
248
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
249
|
+
:name=>"orgVdc",
|
250
|
+
:href=>make_href('query?type=orgVdc&format=references')},
|
251
|
+
{:rel=>"down",
|
252
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
253
|
+
:name=>"orgVdc",
|
254
|
+
:href=>make_href('query?type=orgVdc&format=records')},
|
255
|
+
{:rel=>"down",
|
256
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
257
|
+
:name=>"orgVdc",
|
258
|
+
:href=>make_href('query?type=orgVdc&format=idrecords')},
|
259
|
+
{:rel=>"down",
|
260
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
261
|
+
:name=>"media",
|
262
|
+
:href=>make_href('query?type=media&format=references')},
|
263
|
+
{:rel=>"down",
|
264
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
265
|
+
:name=>"media",
|
266
|
+
:href=>make_href('query?type=media&format=records')},
|
267
|
+
{:rel=>"down",
|
268
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
269
|
+
:name=>"media",
|
270
|
+
:href=>make_href('query?type=media&format=idrecords')},
|
271
|
+
{:rel=>"down",
|
272
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
273
|
+
:name=>"vAppTemplate",
|
274
|
+
:href=>make_href('query?type=vAppTemplate&format=references')},
|
275
|
+
{:rel=>"down",
|
276
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
277
|
+
:name=>"vAppTemplate",
|
278
|
+
:href=>make_href('query?type=vAppTemplate&format=records')},
|
279
|
+
{:rel=>"down",
|
280
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
281
|
+
:name=>"vAppTemplate",
|
282
|
+
:href=>make_href('query?type=vAppTemplate&format=idrecords')},
|
283
|
+
{:rel=>"down",
|
284
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
285
|
+
:name=>"vApp",
|
286
|
+
:href=>make_href('query?type=vApp&format=references')},
|
287
|
+
{:rel=>"down",
|
288
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
289
|
+
:name=>"vApp",
|
290
|
+
:href=>make_href('query?type=vApp&format=records')},
|
291
|
+
{:rel=>"down",
|
292
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
293
|
+
:name=>"vApp",
|
294
|
+
:href=>make_href('query?type=vApp&format=idrecords')},
|
295
|
+
{:rel=>"down",
|
296
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
297
|
+
:name=>"vm",
|
298
|
+
:href=>make_href('query?type=vm&format=references')},
|
299
|
+
{:rel=>"down",
|
300
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
301
|
+
:name=>"vm",
|
302
|
+
:href=>make_href('query?type=vm&format=records')},
|
303
|
+
{:rel=>"down",
|
304
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
305
|
+
:name=>"vm",
|
306
|
+
:href=>make_href('query?type=vm&format=idrecords')},
|
307
|
+
{:rel=>"down",
|
308
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
309
|
+
:name=>"orgNetwork",
|
310
|
+
:href=>make_href('query?type=orgNetwork&format=references')},
|
311
|
+
{:rel=>"down",
|
312
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
313
|
+
:name=>"orgNetwork",
|
314
|
+
:href=>make_href('query?type=orgNetwork&format=records')},
|
315
|
+
{:rel=>"down",
|
316
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
317
|
+
:name=>"orgNetwork",
|
318
|
+
:href=>make_href('query?type=orgNetwork&format=idrecords')},
|
319
|
+
{:rel=>"down",
|
320
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
321
|
+
:name=>"vAppNetwork",
|
322
|
+
:href=>make_href('query?type=vAppNetwork&format=references')},
|
323
|
+
{:rel=>"down",
|
324
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
325
|
+
:name=>"vAppNetwork",
|
326
|
+
:href=>make_href('query?type=vAppNetwork&format=records')},
|
327
|
+
{:rel=>"down",
|
328
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
329
|
+
:name=>"vAppNetwork",
|
330
|
+
:href=>make_href('query?type=vAppNetwork&format=idrecords')},
|
331
|
+
{:rel=>"down",
|
332
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
333
|
+
:name=>"catalog",
|
334
|
+
:href=>make_href('query?type=catalog&format=references')},
|
335
|
+
{:rel=>"down",
|
336
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
337
|
+
:name=>"catalog",
|
338
|
+
:href=>make_href('query?type=catalog&format=records')},
|
339
|
+
{:rel=>"down",
|
340
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
341
|
+
:name=>"catalog",
|
342
|
+
:href=>make_href('query?type=catalog&format=idrecords')},
|
343
|
+
{:rel=>"down",
|
344
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
345
|
+
:name=>"group",
|
346
|
+
:href=>make_href('query?type=group&format=references')},
|
347
|
+
{:rel=>"down",
|
348
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
349
|
+
:name=>"group",
|
350
|
+
:href=>make_href('query?type=group&format=records')},
|
351
|
+
{:rel=>"down",
|
352
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
353
|
+
:name=>"group",
|
354
|
+
:href=>make_href('query?type=group&format=idrecords')},
|
355
|
+
{:rel=>"down",
|
356
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
357
|
+
:name=>"user",
|
358
|
+
:href=>make_href('query?type=user&format=references')},
|
359
|
+
{:rel=>"down",
|
360
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
361
|
+
:name=>"user",
|
362
|
+
:href=>make_href('query?type=user&format=records')},
|
363
|
+
{:rel=>"down",
|
364
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
365
|
+
:name=>"user",
|
366
|
+
:href=>make_href('query?type=user&format=idrecords')},
|
367
|
+
{:rel=>"down",
|
368
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
369
|
+
:name=>"strandedUser",
|
370
|
+
:href=>make_href('query?type=strandedUser&format=references')},
|
371
|
+
{:rel=>"down",
|
372
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
373
|
+
:name=>"strandedUser",
|
374
|
+
:href=>make_href('query?type=strandedUser&format=records')},
|
375
|
+
{:rel=>"down",
|
376
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
377
|
+
:name=>"strandedUser",
|
378
|
+
:href=>make_href('query?type=strandedUser&format=idrecords')},
|
379
|
+
{:rel=>"down",
|
380
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
381
|
+
:name=>"role",
|
382
|
+
:href=>make_href('query?type=role&format=references')},
|
383
|
+
{:rel=>"down",
|
384
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
385
|
+
:name=>"role",
|
386
|
+
:href=>make_href('query?type=role&format=records')},
|
387
|
+
{:rel=>"down",
|
388
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
389
|
+
:name=>"role",
|
390
|
+
:href=>make_href('query?type=role&format=idrecords')},
|
391
|
+
{:rel=>"down",
|
392
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
393
|
+
:name=>"allocatedExternalAddress",
|
394
|
+
:href=>make_href('query?type=allocatedExternalAddress&format=records')},
|
395
|
+
{:rel=>"down",
|
396
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
397
|
+
:name=>"allocatedExternalAddress",
|
398
|
+
:href=>make_href('query?type=allocatedExternalAddress&format=idrecords')},
|
399
|
+
{:rel=>"down",
|
400
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
401
|
+
:name=>"event",
|
402
|
+
:href=>make_href('query?type=event&format=records')},
|
403
|
+
{:rel=>"down",
|
404
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
405
|
+
:name=>"event",
|
406
|
+
:href=>make_href('query?type=event&format=idrecords')},
|
407
|
+
{:rel=>"down",
|
408
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
409
|
+
:name=>"right",
|
410
|
+
:href=>make_href('query?type=right&format=references')},
|
411
|
+
{:rel=>"down",
|
412
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
413
|
+
:name=>"right",
|
414
|
+
:href=>make_href('query?type=right&format=records')},
|
415
|
+
{:rel=>"down",
|
416
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
417
|
+
:name=>"right",
|
418
|
+
:href=>make_href('query?type=right&format=idrecords')},
|
419
|
+
{:rel=>"down",
|
420
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
421
|
+
:name=>"vAppOrgNetworkRelation",
|
422
|
+
:href=>make_href('query?type=vAppOrgNetworkRelation&format=references')},
|
423
|
+
{:rel=>"down",
|
424
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
425
|
+
:name=>"vAppOrgNetworkRelation",
|
426
|
+
:href=>make_href('query?type=vAppOrgNetworkRelation&format=records')},
|
427
|
+
{:rel=>"down",
|
428
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
429
|
+
:name=>"vAppOrgNetworkRelation",
|
430
|
+
:href=>make_href('query?type=vAppOrgNetworkRelation&format=idrecords')},
|
431
|
+
{:rel=>"down",
|
432
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
433
|
+
:name=>"catalogItem",
|
434
|
+
:href=>make_href('query?type=catalogItem&format=references')},
|
435
|
+
{:rel=>"down",
|
436
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
437
|
+
:name=>"catalogItem",
|
438
|
+
:href=>make_href('query?type=catalogItem&format=records')},
|
439
|
+
{:rel=>"down",
|
440
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
441
|
+
:name=>"catalogItem",
|
442
|
+
:href=>make_href('query?type=catalogItem&format=idrecords')},
|
443
|
+
{:rel=>"down",
|
444
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
445
|
+
:name=>"task",
|
446
|
+
:href=>make_href('query?type=task&format=references')},
|
447
|
+
{:rel=>"down",
|
448
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
449
|
+
:name=>"task",
|
450
|
+
:href=>make_href('query?type=task&format=records')},
|
451
|
+
{:rel=>"down",
|
452
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
453
|
+
:name=>"task",
|
454
|
+
:href=>make_href('query?type=task&format=idrecords')},
|
455
|
+
{:rel=>"down",
|
456
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
457
|
+
:name=>"disk",
|
458
|
+
:href=>make_href('query?type=disk&format=references')},
|
459
|
+
{:rel=>"down",
|
460
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
461
|
+
:name=>"disk",
|
462
|
+
:href=>make_href('query?type=disk&format=records')},
|
463
|
+
{:rel=>"down",
|
464
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
465
|
+
:name=>"disk",
|
466
|
+
:href=>make_href('query?type=disk&format=idrecords')},
|
467
|
+
{:rel=>"down",
|
468
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
469
|
+
:name=>"vmDiskRelation",
|
470
|
+
:href=>make_href('query?type=vmDiskRelation&format=records')},
|
471
|
+
{:rel=>"down",
|
472
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
473
|
+
:name=>"vmDiskRelation",
|
474
|
+
:href=>make_href('query?type=vmDiskRelation&format=idrecords')},
|
475
|
+
{:rel=>"down",
|
476
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
477
|
+
:name=>"service",
|
478
|
+
:href=>make_href('query?type=service&format=references')},
|
479
|
+
{:rel=>"down",
|
480
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
481
|
+
:name=>"service",
|
482
|
+
:href=>make_href('query?type=service&format=records')},
|
483
|
+
{:rel=>"down",
|
484
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
485
|
+
:name=>"service",
|
486
|
+
:href=>make_href('query?type=service&format=idrecords')},
|
487
|
+
{:rel=>"down",
|
488
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
489
|
+
:name=>"orgVdcStorageProfile",
|
490
|
+
:href=>make_href('query?type=orgVdcStorageProfile&format=references')},
|
491
|
+
{:rel=>"down",
|
492
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
493
|
+
:name=>"orgVdcStorageProfile",
|
494
|
+
:href=>make_href('query?type=orgVdcStorageProfile&format=records')},
|
495
|
+
{:rel=>"down",
|
496
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
497
|
+
:name=>"orgVdcStorageProfile",
|
498
|
+
:href=>make_href('query?type=orgVdcStorageProfile&format=idrecords')},
|
499
|
+
{:rel=>"down",
|
500
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
501
|
+
:name=>"apiDefinition",
|
502
|
+
:href=>make_href('query?type=apiDefinition&format=references')},
|
503
|
+
{:rel=>"down",
|
504
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
505
|
+
:name=>"apiDefinition",
|
506
|
+
:href=>make_href('query?type=apiDefinition&format=records')},
|
507
|
+
{:rel=>"down",
|
508
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
509
|
+
:name=>"apiDefinition",
|
510
|
+
:href=>make_href('query?type=apiDefinition&format=idrecords')},
|
511
|
+
{:rel=>"down",
|
512
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
513
|
+
:name=>"fileDescriptor",
|
514
|
+
:href=>make_href('query?type=fileDescriptor&format=records')},
|
515
|
+
{:rel=>"down",
|
516
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
517
|
+
:name=>"fileDescriptor",
|
518
|
+
:href=>make_href('query?type=fileDescriptor&format=idrecords')},
|
519
|
+
{:rel=>"down",
|
520
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
521
|
+
:name=>"edgeGateway",
|
522
|
+
:href=>make_href('query?type=edgeGateway&format=references')},
|
523
|
+
{:rel=>"down",
|
524
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
525
|
+
:name=>"edgeGateway",
|
526
|
+
:href=>make_href('query?type=edgeGateway&format=records')},
|
527
|
+
{:rel=>"down",
|
528
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
529
|
+
:name=>"edgeGateway",
|
530
|
+
:href=>make_href('query?type=edgeGateway&format=idrecords')},
|
531
|
+
{:rel=>"down",
|
532
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
533
|
+
:name=>"orgVdcNetwork",
|
534
|
+
:href=>make_href('query?type=orgVdcNetwork&format=references')},
|
535
|
+
{:rel=>"down",
|
536
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
537
|
+
:name=>"orgVdcNetwork",
|
538
|
+
:href=>make_href('query?type=orgVdcNetwork&format=records')},
|
539
|
+
{:rel=>"down",
|
540
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
541
|
+
:name=>"orgVdcNetwork",
|
542
|
+
:href=>make_href('query?type=orgVdcNetwork&format=idrecords')},
|
543
|
+
{:rel=>"down",
|
544
|
+
:type=>"application/vnd.vmware.vcloud.query.references+xml",
|
545
|
+
:name=>"vAppOrgVdcNetworkRelation",
|
546
|
+
:href=>make_href('query?type=vAppOrgVdcNetworkRelation&format=references')},
|
547
|
+
{:rel=>"down",
|
548
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
549
|
+
:name=>"vAppOrgVdcNetworkRelation",
|
550
|
+
:href=>make_href('query?type=vAppOrgVdcNetworkRelation&format=records')},
|
551
|
+
{:rel=>"down",
|
552
|
+
:type=>"application/vnd.vmware.vcloud.query.idrecords+xml",
|
553
|
+
:name=>"vAppOrgVdcNetworkRelation",
|
554
|
+
:href=>make_href('query?type=vAppOrgVdcNetworkRelation&format=idrecords')}
|
555
|
+
]
|
556
|
+
}
|
557
|
+
end
|
558
|
+
|
459
559
|
end
|
460
560
|
end
|
461
561
|
end
|