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
@@ -83,8 +83,10 @@ module Fog
|
|
83
83
|
raise Fog::AWS::AutoScaling::IdentifierTaken.new("Launch Configuration by this name already exists - A launch configuration already exists with the name #{launch_configuration_name}")
|
84
84
|
end
|
85
85
|
self.data[:launch_configurations][launch_configuration_name] = {
|
86
|
+
'AssociatePublicIpAddress' => nil,
|
86
87
|
'BlockDeviceMappings' => [],
|
87
88
|
'CreatedTime' => Time.now.utc,
|
89
|
+
'IamInstanceProfile' => nil,
|
88
90
|
'ImageId' => image_id,
|
89
91
|
'InstanceMonitoring' => {'Enabled' => true},
|
90
92
|
'InstanceType' => instance_type,
|
@@ -11,7 +11,7 @@ module Fog
|
|
11
11
|
#
|
12
12
|
# ==== Parameters
|
13
13
|
# * options<~Hash>:
|
14
|
-
# * '
|
14
|
+
# * 'AutoScalingGroupNames'<~String> - The name of the Auto Scaling
|
15
15
|
# group.
|
16
16
|
# * 'MaxRecords'<~Integer> - The maximum number of records to return.
|
17
17
|
# * 'NextToken'<~String> - A string that is used to mark the start of
|
@@ -0,0 +1,60 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class AWS
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/compute/assign_private_ip_addresses'
|
7
|
+
|
8
|
+
# Assigns one or more secondary private IP addresses to the specified network interface.
|
9
|
+
#
|
10
|
+
# ==== Parameters
|
11
|
+
# * NetworkInterfaceId<~String> - The ID of the network interface
|
12
|
+
# * PrivateIpAddresses<~Array> - One or more IP addresses to be assigned as a secondary private IP address (conditional)
|
13
|
+
# * SecondaryPrivateIpAddressCount<~String> - The number of secondary IP addresses to assign (conditional)
|
14
|
+
# * AllowReassignment<~Boolean> - Whether to reassign an IP address
|
15
|
+
# ==== Returns
|
16
|
+
# * response<~Excon::Response>:
|
17
|
+
# * body<~Hash>:
|
18
|
+
# * 'requestId'<~String> - The ID of the request.
|
19
|
+
# * 'return'<~Boolean> - success?
|
20
|
+
#
|
21
|
+
# {Amazon API Reference}[http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-AssignPrivateIpAddresses.html]
|
22
|
+
def assign_private_ip_addresses(network_interface_id, options={})
|
23
|
+
|
24
|
+
if options['PrivateIpAddresses'] && options['SecondaryPrivateIpAddressCount']
|
25
|
+
raise Fog::Compute::AWS::Error.new("You may specify secondaryPrivateIpAddressCount or specific secondary private IP addresses, but not both.")
|
26
|
+
end
|
27
|
+
|
28
|
+
if private_ip_addresses = options.delete('PrivateIpAddresses')
|
29
|
+
options.merge!(Fog::AWS.indexed_param('PrivateIpAddress.%d', [*private_ip_addresses]))
|
30
|
+
end
|
31
|
+
|
32
|
+
request({
|
33
|
+
'Action' => 'AssignPrivateIpAddresses',
|
34
|
+
'NetworkInterfaceId' => network_interface_id,
|
35
|
+
:parser => Fog::Parsers::Compute::AWS::AssignPrivateIpAddresses.new
|
36
|
+
}.merge(options))
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
class Mock
|
42
|
+
|
43
|
+
def assign_private_ip_addresses(network_interface_id, options={})
|
44
|
+
if options['PrivateIpAddresses'] && options['SecondaryPrivateIpAddressCount']
|
45
|
+
raise Fog::Compute::AWS::Error.new("You may specify secondaryPrivateIpAddressCount or specific secondary private IP addresses, but not both.")
|
46
|
+
end
|
47
|
+
|
48
|
+
response = Excon::Response.new
|
49
|
+
response.status = 200
|
50
|
+
response.body = {
|
51
|
+
'requestId' => Fog::AWS::Mock.request_id,
|
52
|
+
'return' => true
|
53
|
+
}
|
54
|
+
response
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -11,7 +11,7 @@ module Fog
|
|
11
11
|
# * RouteTableId<~String> - The ID of the route table for the route.
|
12
12
|
# * DestinationCidrBlock<~String> - The CIDR address block used for the destination match. Routing decisions are based on the most specific match.
|
13
13
|
# * GatewayId<~String> - The ID of an Internet gateway attached to your VPC.
|
14
|
-
# * InstanceId<~String> -
|
14
|
+
# * InstanceId<~String> - The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.
|
15
15
|
# * NetworkInterfaceId<~String> - The ID of a network interface.
|
16
16
|
#
|
17
17
|
# === Returns
|
@@ -43,7 +43,7 @@ module Fog
|
|
43
43
|
options = {}
|
44
44
|
for key in ['ExecutableBy', 'ImageId', 'Owner']
|
45
45
|
if filters.is_a?(Hash) && filters.key?(key)
|
46
|
-
options
|
46
|
+
options.merge!(Fog::AWS.indexed_request_param(key, filters.delete(key)))
|
47
47
|
end
|
48
48
|
end
|
49
49
|
params = Fog::AWS.indexed_filters(filters).merge!(options)
|
@@ -46,6 +46,14 @@ module Fog
|
|
46
46
|
def describe_subnets(filters = {})
|
47
47
|
subnets = self.data[:subnets]
|
48
48
|
|
49
|
+
# Transition from pending to available
|
50
|
+
subnets.each do |subnet|
|
51
|
+
case subnet['state']
|
52
|
+
when 'pending'
|
53
|
+
subnet['state'] = 'available'
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
49
57
|
if filters['subnet-id']
|
50
58
|
subnets = subnets.reject {|subnet| subnet['subnetId'] != filters['subnet-id']}
|
51
59
|
end
|
@@ -43,6 +43,14 @@ module Fog
|
|
43
43
|
def describe_vpcs(filters = {})
|
44
44
|
vpcs = self.data[:vpcs]
|
45
45
|
|
46
|
+
# Transition from pending to available
|
47
|
+
vpcs.each do |vpc|
|
48
|
+
case vpc['state']
|
49
|
+
when 'pending'
|
50
|
+
vpc['state'] = 'available'
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
46
54
|
if filters['vpc-id']
|
47
55
|
vpcs = vpcs.reject {|vpc| vpc['vpcId'] != filters['vpc-id']}
|
48
56
|
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class AWS
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/compute/basic'
|
7
|
+
|
8
|
+
# Modifies the specified attribute of the specified VPC.
|
9
|
+
#
|
10
|
+
# ==== Parameters
|
11
|
+
# * vpc_id<~String> - The ID of the VPC.
|
12
|
+
# * options<~Hash>:
|
13
|
+
# * enableDnsSupport<~Boolean> - Indicates whether DNS resolution is supported for the VPC. If this attribute is true, the Amazon DNS
|
14
|
+
# server resolves DNS hostnames for your instances to their corresponding IP addresses; otherwise, it does not.
|
15
|
+
# * enableDnsHostnames<~Boolean> - Indicates whether the instances launched in the VPC get DNS hostnames. If this attribute is true,
|
16
|
+
# instances in the VPC get DNS hostnames; otherwise, they do not. You can only set enableDnsHostnames to true if you also set the
|
17
|
+
# EnableDnsSupport attribute to true.
|
18
|
+
#
|
19
|
+
# ==== Returns
|
20
|
+
# * response<~Excon::Response>:
|
21
|
+
# * body<~Hash>:
|
22
|
+
# * 'requestId'<~String> - Id of request
|
23
|
+
# * 'return'<~Boolean> - success?
|
24
|
+
#
|
25
|
+
# {Amazon API Reference}[http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-ModifyVpcAttribute.html]
|
26
|
+
def modify_vpc_attribute(vpc_id, options = {})
|
27
|
+
request({
|
28
|
+
'Action' => 'ModifyVpcAttribute',
|
29
|
+
'VpcId' => vpc_id,
|
30
|
+
:idempotent => true,
|
31
|
+
:parser => Fog::Parsers::Compute::AWS::Basic.new
|
32
|
+
}.merge!(options))
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
class Mock
|
38
|
+
|
39
|
+
def modify_vpc_attribute(vpc_id, options = {})
|
40
|
+
response = Excon::Response.new
|
41
|
+
if options.size == 0
|
42
|
+
raise Fog::Compute::AWS::Error.new("InvalidParameterCombination => No attributes specified.")
|
43
|
+
elsif options.size > 1
|
44
|
+
raise Fog::Compute::AWS::Error.new("InvalidParameterCombination => InvalidParameterCombination => Fields for multiple attribute types specified: #{options.keys.join(', ')}")
|
45
|
+
elsif self.data[:vpcs].select{|x| x['vpcId'] == vpc_id}.size
|
46
|
+
response.status = 200
|
47
|
+
response.body = {
|
48
|
+
'requestId' => Fog::AWS::Mock.request_id,
|
49
|
+
'return' => true
|
50
|
+
}
|
51
|
+
response
|
52
|
+
else
|
53
|
+
raise Fog::Compute::AWS::NotFound.new("The vpc '#{vpc_id}' does not exist.")
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -141,6 +141,7 @@ module Fog
|
|
141
141
|
if (zone = self.data[:zones][zone_id])
|
142
142
|
response.status = 200
|
143
143
|
|
144
|
+
change_id = Fog::AWS::Mock.change_id
|
144
145
|
change_batch.each do |change|
|
145
146
|
case change[:action]
|
146
147
|
when "CREATE"
|
@@ -149,12 +150,23 @@ module Fog
|
|
149
150
|
end
|
150
151
|
|
151
152
|
if zone[:records][change[:type]][change[:name]].nil?
|
153
|
+
# raise change.to_s if change[:resource_records].nil?
|
154
|
+
zone[:records][change[:type]][change[:name]] =
|
155
|
+
if change[:alias_target]
|
156
|
+
record = {
|
157
|
+
:alias_target => change[:alias_target]
|
158
|
+
}
|
159
|
+
else
|
160
|
+
record = {
|
161
|
+
:ttl => change[:ttl].to_s,
|
162
|
+
}
|
163
|
+
end
|
152
164
|
zone[:records][change[:type]][change[:name]] = {
|
165
|
+
:change_id => change_id,
|
166
|
+
:resource_records => change[:resource_records] || [],
|
153
167
|
:name => change[:name],
|
154
|
-
:type => change[:type]
|
155
|
-
|
156
|
-
:resource_records => change[:resource_records]
|
157
|
-
}
|
168
|
+
:type => change[:type]
|
169
|
+
}.merge(record)
|
158
170
|
else
|
159
171
|
errors << "Tried to create resource record set #{change[:name]}. type #{change[:type]}, but it already exists"
|
160
172
|
end
|
@@ -166,12 +178,16 @@ module Fog
|
|
166
178
|
end
|
167
179
|
|
168
180
|
if errors.empty?
|
181
|
+
change = {
|
182
|
+
:id => change_id,
|
183
|
+
:status => 'PENDING',
|
184
|
+
:submitted_at => Time.now.utc.iso8601
|
185
|
+
}
|
186
|
+
self.data[:changes][change[:id]] = change
|
169
187
|
response.body = {
|
170
|
-
'
|
171
|
-
|
172
|
-
|
173
|
-
'SubmittedAt' => Time.now.utc.iso8601
|
174
|
-
}
|
188
|
+
'Id' => change[:id],
|
189
|
+
'Status' => change[:status],
|
190
|
+
'SubmittedAt' => change[:submitted_at]
|
175
191
|
}
|
176
192
|
response
|
177
193
|
else
|
@@ -184,6 +200,7 @@ module Fog
|
|
184
200
|
response.body = "<?xml version=\"1.0\"?><Response><Errors><Error><Code>NoSuchHostedZone</Code><Message>A hosted zone with the specified hosted zone ID does not exist.</Message></Error></Errors><RequestID>#{Fog::AWS::Mock.request_id}</RequestID></Response>"
|
185
201
|
raise(Excon::Errors.status_error({:expects => 200}, response))
|
186
202
|
end
|
203
|
+
|
187
204
|
end
|
188
205
|
end
|
189
206
|
|
@@ -60,6 +60,9 @@ module Fog
|
|
60
60
|
require 'time'
|
61
61
|
|
62
62
|
def create_hosted_zone(name, options = {})
|
63
|
+
# Append a trailing period to the name if absent.
|
64
|
+
name = name + "." unless name.end_with?(".")
|
65
|
+
|
63
66
|
response = Excon::Response.new
|
64
67
|
if list_hosted_zones.body['HostedZones'].find_all {|z| z['Name'] == name}.size < self.data[:limits][:duplicate_domains]
|
65
68
|
response.status = 201
|
@@ -77,6 +80,12 @@ module Fog
|
|
77
80
|
:comment => options[:comment],
|
78
81
|
:records => {}
|
79
82
|
}
|
83
|
+
change = {
|
84
|
+
:id => Fog::AWS::Mock.change_id,
|
85
|
+
:status => 'PENDING',
|
86
|
+
:submitted_at => Time.now.utc.iso8601
|
87
|
+
}
|
88
|
+
self.data[:changes][change[:id]] = change
|
80
89
|
response.body = {
|
81
90
|
'HostedZone' => {
|
82
91
|
'Id' => zone_id,
|
@@ -85,9 +94,9 @@ module Fog
|
|
85
94
|
'Comment' => options[:comment]
|
86
95
|
},
|
87
96
|
'ChangeInfo' => {
|
88
|
-
'Id' =>
|
89
|
-
'Status' =>
|
90
|
-
'SubmittedAt' =>
|
97
|
+
'Id' => change[:id],
|
98
|
+
'Status' => change[:status],
|
99
|
+
'SubmittedAt' => change[:submitted_at]
|
91
100
|
},
|
92
101
|
'NameServers' => Fog::AWS::Mock.nameservers
|
93
102
|
}
|
@@ -34,6 +34,39 @@ module Fog
|
|
34
34
|
end
|
35
35
|
|
36
36
|
end
|
37
|
+
|
38
|
+
class Mock
|
39
|
+
|
40
|
+
require 'time'
|
41
|
+
|
42
|
+
def delete_hosted_zone(zone_id)
|
43
|
+
response = Excon::Response.new
|
44
|
+
key = [zone_id, "/hostedzone/#{zone_id}"].find{|k| !self.data[:zones][k].nil?}
|
45
|
+
if key
|
46
|
+
change = {
|
47
|
+
:id => Fog::AWS::Mock.change_id,
|
48
|
+
:status => 'INSYNC',
|
49
|
+
:submitted_at => Time.now.utc.iso8601
|
50
|
+
}
|
51
|
+
self.data[:changes][change[:id]] = change
|
52
|
+
response.status = 200
|
53
|
+
response.body = {
|
54
|
+
'ChangeInfo' => {
|
55
|
+
'Id' => change[:id],
|
56
|
+
'Status' => change[:status],
|
57
|
+
'SubmittedAt' => change[:submitted_at]
|
58
|
+
}
|
59
|
+
}
|
60
|
+
self.data[:zones].delete(key)
|
61
|
+
response
|
62
|
+
else
|
63
|
+
response.status = 404
|
64
|
+
response.body = "<?xml version=\"1.0\"?><ErrorResponse xmlns=\"https://route53.amazonaws.com/doc/2012-02-29/\"><Error><Type>Sender</Type><Code>NoSuchHostedZone</Code><Message>The specified hosted zone does not exist.</Message></Error><RequestId>#{Fog::AWS::Mock.request_id}</RequestId></ErrorResponse>"
|
65
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
37
70
|
end
|
38
71
|
end
|
39
72
|
end
|
@@ -33,6 +33,32 @@ module Fog
|
|
33
33
|
end
|
34
34
|
|
35
35
|
end
|
36
|
+
|
37
|
+
class Mock
|
38
|
+
def get_change(change_id)
|
39
|
+
response = Excon::Response.new
|
40
|
+
# find the record with matching change_id
|
41
|
+
# records = data[:zones].values.map{|z| z[:records].values.map{|r| r.values}}.flatten
|
42
|
+
change = self.data[:changes][change_id]
|
43
|
+
|
44
|
+
if change
|
45
|
+
response.status = 200
|
46
|
+
submitted_at = Time.parse(change[:submitted_at])
|
47
|
+
response.body = {
|
48
|
+
'Id' => change[:id],
|
49
|
+
# set as insync after some time
|
50
|
+
'Status' => (submitted_at + Fog::Mock.delay) < Time.now ? 'INSYNC' : change[:status],
|
51
|
+
'SubmittedAt' => change[:submitted_at]
|
52
|
+
}
|
53
|
+
response
|
54
|
+
else
|
55
|
+
response.status = 404
|
56
|
+
response.body = "<?xml version=\"1.0\"?><ErrorResponse xmlns=\"https://route53.amazonaws.com/doc/2012-02-29/\"><Error><Type>Sender</Type><Code>NoSuchChange</Code><Message>Could not find resource with ID: #{change_id}</Message></Error><RequestId>#{Fog::AWS::Mock.request_id}</RequestId></ErrorResponse>"
|
57
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
36
62
|
end
|
37
63
|
end
|
38
64
|
end
|
@@ -55,7 +55,7 @@ module Fog
|
|
55
55
|
response
|
56
56
|
else
|
57
57
|
response.status = 404
|
58
|
-
response.body = "<?xml version=\"1.0\"?><
|
58
|
+
response.body = "<?xml version=\"1.0\"?><ErrorResponse xmlns=\"https://route53.amazonaws.com/doc/2012-02-29/\"><Error><Type>Sender</Type><Code>NoSuchHostedZone</Code><Message>The specified hosted zone does not exist.</Message></Error><RequestId>#{Fog::AWS::Mock.request_id}</RequestId></ErrorResponse>"
|
59
59
|
raise(Excon::Errors.status_error({:expects => 200}, response))
|
60
60
|
end
|
61
61
|
end
|
@@ -53,12 +53,7 @@ module Fog
|
|
53
53
|
class Mock
|
54
54
|
|
55
55
|
def list_hosted_zones(options = {})
|
56
|
-
|
57
|
-
if options[:max_items].nil?
|
58
|
-
maxitems = 100
|
59
|
-
else
|
60
|
-
maxitems = options[:max_items]
|
61
|
-
end
|
56
|
+
maxitems = [options[:max_items]||100,100].min
|
62
57
|
|
63
58
|
if options[:marker].nil?
|
64
59
|
start = 0
|
@@ -82,8 +77,8 @@ module Fog
|
|
82
77
|
}
|
83
78
|
end,
|
84
79
|
'Marker' => options[:marker].to_s,
|
85
|
-
'MaxItems' =>
|
86
|
-
'IsTruncated' => truncated
|
80
|
+
'MaxItems' => maxitems,
|
81
|
+
'IsTruncated' => truncated
|
87
82
|
}
|
88
83
|
|
89
84
|
if truncated
|
@@ -60,6 +60,74 @@ module Fog
|
|
60
60
|
end
|
61
61
|
|
62
62
|
end
|
63
|
+
|
64
|
+
class Mock
|
65
|
+
|
66
|
+
def list_resource_record_sets(zone_id, options = {})
|
67
|
+
maxitems = [options[:max_items]||100,100].min
|
68
|
+
|
69
|
+
response = Excon::Response.new
|
70
|
+
|
71
|
+
zone = self.data[:zones][zone_id]
|
72
|
+
if zone.nil?
|
73
|
+
response.status = 404
|
74
|
+
response.body = "<?xml version=\"1.0\"?>\n<ErrorResponse xmlns=\"https://route53.amazonaws.com/doc/2012-02-29/\"><Error><Type>Sender</Type><Code>NoSuchHostedZone</Code><Message>No hosted zone found with ID: #{zone_id}</Message></Error><RequestId>#{Fog::AWS::Mock.request_id}</RequestId></ErrorResponse>"
|
75
|
+
raise(Excon::Errors.status_error({:expects => 200}, response))
|
76
|
+
end
|
77
|
+
|
78
|
+
if options[:type]
|
79
|
+
records = zone[:records][options[:type]].values
|
80
|
+
else
|
81
|
+
records = zone[:records].values.map{|r| r.values}.flatten
|
82
|
+
end
|
83
|
+
|
84
|
+
# sort for pagination
|
85
|
+
records.sort! { |a,b| a[:name].gsub(zone[:name],"") <=> b[:name].gsub(zone[:name],"") }
|
86
|
+
|
87
|
+
if options[:name]
|
88
|
+
name = options[:name].gsub(zone[:name],"")
|
89
|
+
records = records.select{|r| r[:name].gsub(zone[:name],"") >= name }
|
90
|
+
require 'pp'
|
91
|
+
end
|
92
|
+
|
93
|
+
next_record = records[maxitems]
|
94
|
+
records = records[0, maxitems]
|
95
|
+
truncated = !next_record.nil?
|
96
|
+
|
97
|
+
response.status = 200
|
98
|
+
response.body = {
|
99
|
+
'ResourceRecordSets' => records.map do |r|
|
100
|
+
if r[:alias_target]
|
101
|
+
record = {
|
102
|
+
'AliasTarget' => {
|
103
|
+
'HostedZoneId' => r[:alias_target][:hosted_zone_id],
|
104
|
+
'DNSName' => r[:alias_target][:dns_name]
|
105
|
+
}
|
106
|
+
}
|
107
|
+
else
|
108
|
+
record = {
|
109
|
+
'TTL' => r[:ttl]
|
110
|
+
}
|
111
|
+
end
|
112
|
+
{
|
113
|
+
'ResourceRecords' => r[:resource_records],
|
114
|
+
'Name' => r[:name],
|
115
|
+
'Type' => r[:type]
|
116
|
+
}.merge(record)
|
117
|
+
end,
|
118
|
+
'MaxItems' => maxitems,
|
119
|
+
'IsTruncated' => truncated
|
120
|
+
}
|
121
|
+
|
122
|
+
if truncated
|
123
|
+
response.body['NextRecordName'] = next_record[:name]
|
124
|
+
response.body['NextRecordType'] = next_record[:type]
|
125
|
+
end
|
126
|
+
|
127
|
+
response
|
128
|
+
end
|
129
|
+
|
130
|
+
end
|
63
131
|
end
|
64
132
|
end
|
65
133
|
end
|