fog-maestrodev 1.15.0.20130829165835 → 1.15.0.20130927082724
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/README.md +1 -0
- data/fog.gemspec +5 -2
- data/lib/fog.rb +1 -0
- data/lib/fog/atmos/models/storage/file.rb +2 -1
- data/lib/fog/aws.rb +4 -1
- data/lib/fog/aws/data_pipeline.rb +3 -0
- data/lib/fog/aws/elasticache.rb +2 -0
- data/lib/fog/aws/models/auto_scaling/group.rb +12 -12
- data/lib/fog/aws/models/compute/subnet.rb +3 -1
- data/lib/fog/aws/models/elasticache/cluster.rb +3 -1
- data/lib/fog/aws/parsers/redshift/cluster.rb +29 -0
- data/lib/fog/aws/parsers/redshift/cluster_parser.rb +144 -0
- data/lib/fog/aws/parsers/redshift/cluster_security_group_parser.rb +50 -0
- data/lib/fog/aws/parsers/redshift/cluster_snapshot.rb +32 -0
- data/lib/fog/aws/parsers/redshift/cluster_snapshot_parser.rb +66 -0
- data/lib/fog/aws/parsers/redshift/cluster_subnet_group_parser.rb +51 -0
- data/lib/fog/aws/parsers/redshift/create_cluster_parameter_group.rb +30 -0
- data/lib/fog/aws/parsers/redshift/create_cluster_security_group.rb +31 -0
- data/lib/fog/aws/parsers/redshift/describe_cluster_parameter_groups.rb +41 -0
- data/lib/fog/aws/parsers/redshift/describe_cluster_parameters.rb +48 -0
- data/lib/fog/aws/parsers/redshift/describe_cluster_security_groups.rb +38 -0
- data/lib/fog/aws/parsers/redshift/describe_cluster_snapshots.rb +38 -0
- data/lib/fog/aws/parsers/redshift/describe_cluster_subnet_groups.rb +58 -0
- data/lib/fog/aws/parsers/redshift/describe_cluster_versions.rb +53 -0
- data/lib/fog/aws/parsers/redshift/describe_clusters.rb +30 -0
- data/lib/fog/aws/parsers/redshift/describe_default_cluster_parameters.rb +49 -0
- data/lib/fog/aws/parsers/redshift/describe_events.rb +44 -0
- data/lib/fog/aws/parsers/redshift/describe_orderable_cluster_options.rb +54 -0
- data/lib/fog/aws/parsers/redshift/describe_reserved_node_offerings.rb +64 -0
- data/lib/fog/aws/parsers/redshift/describe_reserved_nodes.rb +71 -0
- data/lib/fog/aws/parsers/redshift/describe_resize.rb +60 -0
- data/lib/fog/aws/parsers/redshift/purchase_reserved_node_offering.rb +58 -0
- data/lib/fog/aws/parsers/redshift/revoke_cluster_security_group_ingress.rb +31 -0
- data/lib/fog/aws/parsers/redshift/update_cluster_parameter_group_parser.rb +29 -0
- data/lib/fog/aws/parsers/sts/get_session_token.rb +1 -3
- data/lib/fog/aws/redshift.rb +126 -0
- data/lib/fog/aws/requests/compute/run_instances.rb +2 -0
- data/lib/fog/aws/requests/data_pipeline/delete_pipeline.rb +2 -3
- data/lib/fog/aws/requests/data_pipeline/describe_objects.rb +41 -0
- data/lib/fog/aws/requests/data_pipeline/get_pipeline_definition.rb +37 -0
- data/lib/fog/aws/requests/data_pipeline/query_objects.rb +41 -0
- data/lib/fog/aws/requests/elasticache/authorize_cache_security_group_ingress.rb +27 -2
- data/lib/fog/aws/requests/elasticache/create_cache_security_group.rb +23 -2
- data/lib/fog/aws/requests/elasticache/delete_cache_security_group.rb +10 -1
- data/lib/fog/aws/requests/elasticache/describe_cache_security_groups.rb +36 -2
- data/lib/fog/aws/requests/redshift/authorize_cluster_security_group_ingress.rb +56 -0
- data/lib/fog/aws/requests/redshift/authorize_snapshot_access.rb +43 -0
- data/lib/fog/aws/requests/redshift/copy_cluster_snapshot.rb +48 -0
- data/lib/fog/aws/requests/redshift/create_cluster.rb +151 -0
- data/lib/fog/aws/requests/redshift/create_cluster_parameter_group.rb +54 -0
- data/lib/fog/aws/requests/redshift/create_cluster_security_group.rb +42 -0
- data/lib/fog/aws/requests/redshift/create_cluster_snapshot.rb +44 -0
- data/lib/fog/aws/requests/redshift/create_cluster_subnet_group.rb +50 -0
- data/lib/fog/aws/requests/redshift/delete_cluster.rb +51 -0
- data/lib/fog/aws/requests/redshift/delete_cluster_parameter_group.rb +34 -0
- data/lib/fog/aws/requests/redshift/delete_cluster_security_group.rb +33 -0
- data/lib/fog/aws/requests/redshift/delete_cluster_snapshot.rb +44 -0
- data/lib/fog/aws/requests/redshift/delete_cluster_subnet_group.rb +38 -0
- data/lib/fog/aws/requests/redshift/describe_cluster_parameter_groups.rb +48 -0
- data/lib/fog/aws/requests/redshift/describe_cluster_parameters.rb +55 -0
- data/lib/fog/aws/requests/redshift/describe_cluster_security_groups.rb +50 -0
- data/lib/fog/aws/requests/redshift/describe_cluster_snapshots.rb +73 -0
- data/lib/fog/aws/requests/redshift/describe_cluster_subnet_groups.rb +47 -0
- data/lib/fog/aws/requests/redshift/describe_cluster_versions.rb +54 -0
- data/lib/fog/aws/requests/redshift/describe_clusters.rb +49 -0
- data/lib/fog/aws/requests/redshift/describe_default_cluster_parameters.rb +49 -0
- data/lib/fog/aws/requests/redshift/describe_events.rb +80 -0
- data/lib/fog/aws/requests/redshift/describe_orderable_cluster_options.rb +55 -0
- data/lib/fog/aws/requests/redshift/describe_reserved_node_offerings.rb +48 -0
- data/lib/fog/aws/requests/redshift/describe_reserved_nodes.rb +48 -0
- data/lib/fog/aws/requests/redshift/describe_resize.rb +39 -0
- data/lib/fog/aws/requests/redshift/modify_cluster.rb +111 -0
- data/lib/fog/aws/requests/redshift/modify_cluster_parameter_group.rb +44 -0
- data/lib/fog/aws/requests/redshift/modify_cluster_subnet_group.rb +50 -0
- data/lib/fog/aws/requests/redshift/purchase_reserved_node_offering.rb +41 -0
- data/lib/fog/aws/requests/redshift/reboot_cluster.rb +37 -0
- data/lib/fog/aws/requests/redshift/reset_cluster_parameter_group.rb +57 -0
- data/lib/fog/aws/requests/redshift/restore_from_cluster_snapshot.rb +77 -0
- data/lib/fog/aws/requests/redshift/revoke_cluster_security_group_ingress.rb +56 -0
- data/lib/fog/aws/requests/redshift/revoke_snapshot_access.rb +44 -0
- data/lib/fog/aws/requests/sts/get_federation_token.rb +42 -0
- data/lib/fog/bin.rb +1 -0
- data/lib/fog/bin/aws.rb +4 -0
- data/lib/fog/bin/openstack.rb +5 -0
- data/lib/fog/bin/rackspace.rb +4 -0
- data/lib/fog/bin/vcloud_director.rb +30 -0
- data/lib/fog/brightbox/requests/compute/update_server.rb +1 -0
- data/lib/fog/cloudsigma/compute.rb +5 -0
- data/lib/fog/cloudsigma/models/fwpolicies.rb +21 -0
- data/lib/fog/cloudsigma/models/fwpolicy.rb +21 -0
- data/lib/fog/cloudsigma/models/rule.rb +21 -0
- data/lib/fog/cloudsigma/requests/list_fwpolicies.rb +18 -0
- data/lib/fog/compute.rb +7 -4
- data/lib/fog/core.rb +1 -0
- data/lib/fog/core/errors.rb +3 -0
- data/lib/fog/dynect/dns.rb +3 -1
- data/lib/fog/dynect/models/dns/records.rb +32 -20
- data/lib/fog/dynect/requests/dns/get_all_records.rb +56 -0
- data/lib/fog/dynect/requests/dns/get_node_list.rb +1 -1
- data/lib/fog/dynect/requests/dns/put_record.rb +76 -0
- data/lib/fog/google/models/compute/flavors.rb +2 -2
- data/lib/fog/google/requests/compute/get_machine_type.rb +7 -2
- data/lib/fog/joyent/compute.rb +1 -1
- data/lib/fog/linode/models/compute/server.rb +1 -1
- data/lib/fog/local/models/storage/directories.rb +1 -1
- data/lib/fog/openstack.rb +1 -0
- data/lib/fog/openstack/models/compute/images.rb +10 -2
- data/lib/fog/openstack/models/compute/server.rb +2 -0
- data/lib/fog/openstack/models/orchestration/stack.rb +52 -0
- data/lib/fog/openstack/models/orchestration/stacks.rb +21 -0
- data/lib/fog/openstack/orchestration.rb +227 -0
- data/lib/fog/openstack/requests/compute/create_server.rb +36 -25
- data/lib/fog/openstack/requests/compute/list_images_detail.rb +4 -3
- data/lib/fog/openstack/requests/orchestration/create_stack.rb +55 -0
- data/lib/fog/openstack/requests/orchestration/delete_stack.rb +36 -0
- data/lib/fog/openstack/requests/orchestration/list_stacks.rb +48 -0
- data/lib/fog/openstack/requests/orchestration/update_stack.rb +41 -0
- data/lib/fog/openstack/requests/storage/get_object.rb +7 -7
- data/lib/fog/openstack/storage.rb +2 -2
- data/lib/fog/orchestration.rb +25 -0
- data/lib/fog/rackspace.rb +1 -0
- data/lib/fog/rackspace/auto_scale.rb +132 -0
- data/lib/fog/rackspace/block_storage.rb +2 -2
- data/lib/fog/rackspace/cdn.rb +23 -23
- data/lib/fog/rackspace/compute.rb +2 -2
- data/lib/fog/rackspace/compute_v2.rb +2 -2
- data/lib/fog/rackspace/databases.rb +2 -2
- data/lib/fog/rackspace/dns.rb +14 -16
- data/lib/fog/rackspace/examples/compute_v2/create_network.rb +81 -0
- data/lib/fog/rackspace/examples/compute_v2/delete_network.rb +78 -0
- data/lib/fog/rackspace/load_balancers.rb +2 -2
- data/lib/fog/rackspace/mock_data.rb +69 -4
- data/lib/fog/rackspace/models/auto_scale/group.rb +207 -0
- data/lib/fog/rackspace/models/auto_scale/group_config.rb +60 -0
- data/lib/fog/rackspace/models/auto_scale/groups.rb +46 -0
- data/lib/fog/rackspace/models/auto_scale/launch_config.rb +44 -0
- data/lib/fog/rackspace/models/auto_scale/policies.rb +65 -0
- data/lib/fog/rackspace/models/auto_scale/policy.rb +206 -0
- data/lib/fog/rackspace/models/auto_scale/webhook.rb +105 -0
- data/lib/fog/rackspace/models/auto_scale/webhooks.rb +64 -0
- data/lib/fog/rackspace/models/block_storage/volume.rb +2 -1
- data/lib/fog/rackspace/models/monitoring/notification.rb +42 -0
- data/lib/fog/rackspace/models/monitoring/notifications.rb +30 -0
- data/lib/fog/rackspace/monitoring.rb +21 -14
- data/lib/fog/rackspace/requests/auto_scale/create_group.rb +61 -0
- data/lib/fog/rackspace/requests/auto_scale/create_policy.rb +45 -0
- data/lib/fog/rackspace/requests/auto_scale/create_webhook.rb +57 -0
- data/lib/fog/rackspace/requests/auto_scale/delete_group.rb +23 -0
- data/lib/fog/rackspace/requests/auto_scale/delete_policy.rb +31 -0
- data/lib/fog/rackspace/requests/auto_scale/delete_webhook.rb +34 -0
- data/lib/fog/rackspace/requests/auto_scale/execute_anonymous_webhook.rb +22 -0
- data/lib/fog/rackspace/requests/auto_scale/execute_policy.rb +22 -0
- data/lib/fog/rackspace/requests/auto_scale/get_group.rb +29 -0
- data/lib/fog/rackspace/requests/auto_scale/get_group_config.rb +30 -0
- data/lib/fog/rackspace/requests/auto_scale/get_group_state.rb +62 -0
- data/lib/fog/rackspace/requests/auto_scale/get_launch_config.rb +30 -0
- data/lib/fog/rackspace/requests/auto_scale/get_policy.rb +35 -0
- data/lib/fog/rackspace/requests/auto_scale/get_webhook.rb +39 -0
- data/lib/fog/rackspace/requests/auto_scale/list_groups.rb +35 -0
- data/lib/fog/rackspace/requests/auto_scale/list_policies.rb +23 -0
- data/lib/fog/rackspace/requests/auto_scale/list_webhooks.rb +33 -0
- data/lib/fog/rackspace/requests/auto_scale/pause_group_state.rb +23 -0
- data/lib/fog/rackspace/requests/auto_scale/resume_group_state.rb +23 -0
- data/lib/fog/rackspace/requests/auto_scale/update_group_config.rb +39 -0
- data/lib/fog/rackspace/requests/auto_scale/update_launch_config.rb +36 -0
- data/lib/fog/rackspace/requests/auto_scale/update_policy.rb +33 -0
- data/lib/fog/rackspace/requests/auto_scale/update_webhook.rb +44 -0
- data/lib/fog/rackspace/requests/compute_v2/delete_server.rb +2 -2
- data/lib/fog/rackspace/requests/load_balancers/create_load_balancer.rb +5 -6
- data/lib/fog/rackspace/requests/load_balancers/delete_load_balancer.rb +10 -0
- data/lib/fog/rackspace/requests/load_balancers/get_load_balancer.rb +30 -0
- data/lib/fog/rackspace/requests/monitoring/create_agent_token.rb +31 -0
- data/lib/fog/rackspace/requests/monitoring/create_alarm.rb +32 -0
- data/lib/fog/rackspace/requests/monitoring/create_check.rb +31 -0
- data/lib/fog/rackspace/requests/monitoring/create_entity.rb +32 -0
- data/lib/fog/rackspace/requests/monitoring/create_notification.rb +18 -0
- data/lib/fog/rackspace/requests/monitoring/delete_agent_token.rb +32 -0
- data/lib/fog/rackspace/requests/monitoring/delete_alarm.rb +27 -0
- data/lib/fog/rackspace/requests/monitoring/delete_check.rb +26 -0
- data/lib/fog/rackspace/requests/monitoring/delete_entity.rb +27 -0
- data/lib/fog/rackspace/requests/monitoring/delete_notification.rb +16 -0
- data/lib/fog/rackspace/requests/monitoring/get_agent_token.rb +33 -0
- data/lib/fog/rackspace/requests/monitoring/get_alarm.rb +38 -0
- data/lib/fog/rackspace/requests/monitoring/get_check.rb +41 -0
- data/lib/fog/rackspace/requests/monitoring/get_entity.rb +30 -21
- data/lib/fog/rackspace/requests/monitoring/get_notification.rb +50 -0
- data/lib/fog/rackspace/requests/monitoring/list_agent_tokens.rb +39 -0
- data/lib/fog/rackspace/requests/monitoring/list_alarms.rb +50 -0
- data/lib/fog/rackspace/requests/monitoring/list_check_types.rb +72 -0
- data/lib/fog/rackspace/requests/monitoring/list_checks.rb +54 -0
- data/lib/fog/rackspace/requests/monitoring/list_data_points.rb +37 -0
- data/lib/fog/rackspace/requests/monitoring/list_entities.rb +53 -0
- data/lib/fog/rackspace/requests/monitoring/list_metrics.rb +65 -0
- data/lib/fog/rackspace/requests/monitoring/list_notification_plans.rb +55 -0
- data/lib/fog/rackspace/requests/monitoring/list_notifications.rb +67 -0
- data/lib/fog/rackspace/requests/monitoring/list_overview.rb +97 -1
- data/lib/fog/rackspace/requests/monitoring/update_alarm.rb +33 -2
- data/lib/fog/rackspace/requests/monitoring/update_check.rb +32 -2
- data/lib/fog/rackspace/requests/monitoring/update_entity.rb +33 -2
- data/lib/fog/rackspace/requests/monitoring/update_notification.rb +17 -0
- data/lib/fog/rackspace/requests/storage/get_object.rb +7 -9
- data/lib/fog/rackspace/service.rb +16 -8
- data/lib/fog/rackspace/storage.rb +2 -2
- data/lib/fog/vcloud_director.rb +11 -0
- data/lib/fog/vcloud_director/README.md +967 -0
- data/lib/fog/vcloud_director/compute.rb +398 -0
- data/lib/fog/vcloud_director/generators/compute/customization.rb +100 -0
- data/lib/fog/vcloud_director/generators/compute/disks.rb +175 -0
- data/lib/fog/vcloud_director/generators/compute/metadata.rb +105 -0
- data/lib/fog/vcloud_director/generators/compute/vm_network.rb +122 -0
- data/lib/fog/vcloud_director/models/compute/catalog.rb +25 -0
- data/lib/fog/vcloud_director/models/compute/catalog_item.rb +25 -0
- data/lib/fog/vcloud_director/models/compute/catalog_items.rb +32 -0
- data/lib/fog/vcloud_director/models/compute/catalogs.rb +32 -0
- data/lib/fog/vcloud_director/models/compute/disk.rb +51 -0
- data/lib/fog/vcloud_director/models/compute/disks.rb +40 -0
- data/lib/fog/vcloud_director/models/compute/network.rb +26 -0
- data/lib/fog/vcloud_director/models/compute/networks.rb +31 -0
- data/lib/fog/vcloud_director/models/compute/organization.rb +41 -0
- data/lib/fog/vcloud_director/models/compute/organizations.rb +30 -0
- data/lib/fog/vcloud_director/models/compute/tag.rb +36 -0
- data/lib/fog/vcloud_director/models/compute/tags.rb +51 -0
- data/lib/fog/vcloud_director/models/compute/task.rb +58 -0
- data/lib/fog/vcloud_director/models/compute/tasks.rb +31 -0
- data/lib/fog/vcloud_director/models/compute/vapp.rb +56 -0
- data/lib/fog/vcloud_director/models/compute/vapps.rb +34 -0
- data/lib/fog/vcloud_director/models/compute/vdc.rb +33 -0
- data/lib/fog/vcloud_director/models/compute/vdcs.rb +32 -0
- data/lib/fog/vcloud_director/models/compute/vm.rb +99 -0
- data/lib/fog/vcloud_director/models/compute/vm_customization.rb +40 -0
- data/lib/fog/vcloud_director/models/compute/vm_customizations.rb +16 -0
- data/lib/fog/vcloud_director/models/compute/vm_network.rb +30 -0
- data/lib/fog/vcloud_director/models/compute/vm_networks.rb +21 -0
- data/lib/fog/vcloud_director/models/compute/vms.rb +41 -0
- data/lib/fog/vcloud_director/parsers/compute/disks.rb +57 -0
- data/lib/fog/vcloud_director/parsers/compute/metadata.rb +66 -0
- data/lib/fog/vcloud_director/parsers/compute/network.rb +108 -0
- data/lib/fog/vcloud_director/parsers/compute/vm.rb +82 -0
- data/lib/fog/vcloud_director/parsers/compute/vm_customization.rb +56 -0
- data/lib/fog/vcloud_director/parsers/compute/vm_network.rb +111 -0
- data/lib/fog/vcloud_director/parsers/compute/vms.rb +96 -0
- data/lib/fog/vcloud_director/parsers/compute/vms_by_metadata.rb +41 -0
- data/lib/fog/vcloud_director/requests/compute/delete_metadata.rb +20 -0
- data/lib/fog/vcloud_director/requests/compute/delete_vapp.rb +20 -0
- data/lib/fog/vcloud_director/requests/compute/get_catalog.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/get_catalog_item.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/get_current_session.rb +75 -0
- data/lib/fog/vcloud_director/requests/compute/get_href.rb +19 -0
- data/lib/fog/vcloud_director/requests/compute/get_metadata.rb +20 -0
- data/lib/fog/vcloud_director/requests/compute/get_network.rb +21 -0
- data/lib/fog/vcloud_director/requests/compute/get_organization.rb +72 -0
- data/lib/fog/vcloud_director/requests/compute/get_organizations.rb +37 -0
- data/lib/fog/vcloud_director/requests/compute/get_request.rb +17 -0
- data/lib/fog/vcloud_director/requests/compute/get_supported_versions.rb +1160 -0
- data/lib/fog/vcloud_director/requests/compute/get_task.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/get_tasks_list.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/get_vapp.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/get_vapp_template.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/get_vdc.rb +154 -0
- data/lib/fog/vcloud_director/requests/compute/get_vm.rb +20 -0
- data/lib/fog/vcloud_director/requests/compute/get_vm_cpu.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/get_vm_customization.rb +20 -0
- data/lib/fog/vcloud_director/requests/compute/get_vm_disks.rb +20 -0
- data/lib/fog/vcloud_director/requests/compute/get_vm_memory.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/get_vm_network.rb +20 -0
- data/lib/fog/vcloud_director/requests/compute/get_vms.rb +20 -0
- data/lib/fog/vcloud_director/requests/compute/get_vms_by_metadata.rb +20 -0
- data/lib/fog/vcloud_director/requests/compute/helper.rb +93 -0
- data/lib/fog/vcloud_director/requests/compute/instantiate_vapp_template.rb +124 -0
- data/lib/fog/vcloud_director/requests/compute/post_task_cancel.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/post_vapp_undeploy.rb +26 -0
- data/lib/fog/vcloud_director/requests/compute/post_vm_metadata.rb +29 -0
- data/lib/fog/vcloud_director/requests/compute/post_vm_poweroff.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/post_vm_poweron.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/put_metadata_value.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/put_vm_cpu.rb +34 -0
- data/lib/fog/vcloud_director/requests/compute/put_vm_customization.rb +24 -0
- data/lib/fog/vcloud_director/requests/compute/put_vm_disks.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/put_vm_memory.rb +34 -0
- data/lib/fog/vcloud_director/requests/compute/put_vm_network.rb +24 -0
- data/tests/aws/models/auto_scaling/groups_test.rb +5 -0
- data/tests/aws/models/compute/subnet_tests.rb +1 -1
- data/tests/aws/models/compute/subnets_tests.rb +1 -1
- data/tests/aws/requests/data_pipeline/helper.rb +38 -8
- data/tests/aws/requests/data_pipeline/pipeline_tests.rb +25 -1
- data/tests/aws/requests/elasticache/security_group_tests.rb +3 -2
- data/tests/aws/requests/redshift/cluster_parameter_group_tests.rb +77 -0
- data/tests/aws/requests/redshift/cluster_security_group_tests.rb +44 -0
- data/tests/aws/requests/redshift/cluster_snapshot_tests.rb +75 -0
- data/tests/aws/requests/redshift/cluster_tests.rb +82 -0
- data/tests/aws/requests/sts/get_federation_token_tests.rb +0 -1
- data/tests/aws/signed_params_tests.rb +12 -0
- data/tests/brightbox/compute/helper.rb +1 -0
- data/tests/brightbox/compute/schema.rb +696 -0
- data/tests/brightbox/requests/compute/account_tests.rb +7 -7
- data/tests/brightbox/requests/compute/api_client_tests.rb +6 -6
- data/tests/brightbox/requests/compute/application_test.rb +6 -6
- data/tests/brightbox/requests/compute/cloud_ip_tests.rb +7 -7
- data/tests/brightbox/requests/compute/firewall_policy_tests.rb +5 -5
- data/tests/brightbox/requests/compute/firewall_rule_tests.rb +4 -4
- data/tests/brightbox/requests/compute/helper.rb +0 -688
- data/tests/brightbox/requests/compute/image_tests.rb +2 -2
- data/tests/brightbox/requests/compute/interface_tests.rb +1 -1
- data/tests/brightbox/requests/compute/load_balancer_tests.rb +9 -9
- data/tests/brightbox/requests/compute/server_group_tests.rb +8 -8
- data/tests/brightbox/requests/compute/server_tests.rb +13 -10
- data/tests/brightbox/requests/compute/server_type_tests.rb +2 -2
- data/tests/brightbox/requests/compute/user_tests.rb +3 -3
- data/tests/brightbox/requests/compute/zone_tests.rb +2 -2
- data/tests/compute/helper.rb +3 -2
- data/tests/dynect/requests/dns/dns_tests.rb +29 -0
- data/tests/helpers/mock_helper.rb +3 -0
- data/tests/openstack/requests/compute/server_tests.rb +30 -0
- data/tests/openstack/requests/orchestration/stack_tests.rb +30 -0
- data/tests/rackspace/auto_scale_tests.rb +84 -0
- data/tests/rackspace/models/auto_scale/group.rb +19 -0
- data/tests/rackspace/models/auto_scale/groups.rb +13 -0
- data/tests/rackspace/models/auto_scale/policies.rb +23 -0
- data/tests/rackspace/models/auto_scale/policy.rb +29 -0
- data/tests/rackspace/models/auto_scale/webhook.rb +35 -0
- data/tests/rackspace/models/auto_scale/webhooks.rb +28 -0
- data/tests/rackspace/models/monitoring/notification_tests.rb +19 -0
- data/tests/rackspace/models/monitoring/notifications_tests.rb +10 -0
- data/tests/rackspace/requests/auto_scale/config_tests.rb +51 -0
- data/tests/rackspace/requests/auto_scale/group_tests.rb +38 -0
- data/tests/rackspace/requests/auto_scale/helper.rb +181 -0
- data/tests/rackspace/requests/auto_scale/policy_tests.rb +61 -0
- data/tests/rackspace/requests/auto_scale/webhook_tests.rb +49 -0
- data/tests/rackspace/requests/compute_v2/address_tests.rb +1 -1
- data/tests/rackspace/requests/monitoring/agent_tests.rb +0 -1
- data/tests/rackspace/requests/monitoring/alarm_tests.rb +3 -3
- data/tests/rackspace/requests/monitoring/check_tests.rb +0 -1
- data/tests/rackspace/requests/monitoring/entity_tests.rb +3 -12
- data/tests/rackspace/requests/monitoring/list_tests.rb +18 -6
- data/tests/rackspace/requests/monitoring/notification_tests.rb +46 -0
- data/tests/vcloud_director/models/compute/catalog_items_tests.rb +42 -0
- data/tests/vcloud_director/models/compute/catalogs_tests.rb +42 -0
- data/tests/vcloud_director/models/compute/helper.rb +67 -0
- data/tests/vcloud_director/models/compute/organizations_tests.rb +22 -0
- data/tests/vcloud_director/models/compute/vapp_life_cycle_tests.rb +98 -0
- data/tests/vcloud_director/models/compute/vapp_tests.rb +42 -0
- data/tests/vcloud_director/models/compute/vdcs_tests.rb +45 -0
- data/tests/vcloud_director/models/compute/vms_tests.rb +89 -0
- data/tests/vcloud_director/models/tools/reduced_vcr_requests.rb +27 -0
- data/tests/vcloud_director/requests/compute/organization_tests.rb +48 -0
- data/tests/vcloud_director/requests/compute/session_tests.rb +29 -0
- data/tests/vcloud_director/requests/compute/vdc_tests.rb +90 -0
- data/tests/vcloud_director/requests/compute/versions_tests.rb +28 -0
- metadata +342 -43
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -10,6 +10,7 @@ fog is the Ruby cloud services library, top to bottom:
|
|
10
10
|
[![Gem Version](https://fury-badge.herokuapp.com/rb/fog.png)](http://badge.fury.io/rb/fog)
|
11
11
|
[![Dependency Status](https://gemnasium.com/fog/fog.png)](https://gemnasium.com/fog/fog)
|
12
12
|
[![Code Climate](https://codeclimate.com/github/fog/fog.png)](https://codeclimate.com/github/fog/fog)
|
13
|
+
[![Coverage Status](https://coveralls.io/repos/fog/fog/badge.png?branch=master)](https://coveralls.io/r/fog/fog?branch=master)
|
13
14
|
|
14
15
|
## Getting Started
|
15
16
|
|
data/fog.gemspec
CHANGED
@@ -6,8 +6,8 @@ Gem::Specification.new do |s|
|
|
6
6
|
## If your rubyforge_project name is different, then edit it and comment out
|
7
7
|
## the sub! line in the Rakefile
|
8
8
|
s.name = 'fog-maestrodev'
|
9
|
-
s.version = '1.15.0.
|
10
|
-
s.date = '2013-
|
9
|
+
s.version = '1.15.0.20130927082724'
|
10
|
+
s.date = '2013-09-27'
|
11
11
|
s.rubyforge_project = 'fog'
|
12
12
|
|
13
13
|
## Make sure your summary is short. The description may be as long
|
@@ -50,6 +50,7 @@ Gem::Specification.new do |s|
|
|
50
50
|
s.add_dependency('net-ssh', '>=2.1.3')
|
51
51
|
s.add_dependency('nokogiri', '~>1.5')
|
52
52
|
s.add_dependency('ruby-hmac')
|
53
|
+
s.add_dependency('unicode', "~> 0.4.4")
|
53
54
|
|
54
55
|
## List your development dependencies here. Development dependencies are
|
55
56
|
## those that are only needed during development
|
@@ -64,6 +65,8 @@ Gem::Specification.new do |s|
|
|
64
65
|
s.add_development_dependency('fission')
|
65
66
|
s.add_development_dependency('pry')
|
66
67
|
s.add_development_dependency('google-api-client', '~>0.6.2')
|
68
|
+
s.add_development_dependency('vcr', '~>2.5.0')
|
69
|
+
s.add_development_dependency('webmock', '~>1.11.0')
|
67
70
|
# s.add_development_dependency('ruby-libvirt','~>0.4.0')
|
68
71
|
|
69
72
|
s.files = `git ls-files`.split("\n")
|
data/lib/fog.rb
CHANGED
@@ -60,7 +60,8 @@ module Fog
|
|
60
60
|
file = directory.files.head(key)
|
61
61
|
self.objectid = if file && file.to_s.strip != "" then file.attributes['x-emc-meta'].scan(/objectid=(\w+),/).flatten[0] else nil end
|
62
62
|
if self.objectid && self.objectid.to_s.strip != ""
|
63
|
-
|
63
|
+
klass = service.ssl? ? URI::HTTPS : URI::HTTP
|
64
|
+
uri = klass.build(:host => service.host, :port => service.port.to_i, :path => "/rest/objects/#{self.objectid}" )
|
64
65
|
|
65
66
|
sb = "GET\n"
|
66
67
|
sb += uri.path.downcase + "\n"
|
data/lib/fog/aws.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'fog/core'
|
2
2
|
require 'fog/aws/credential_fetcher'
|
3
3
|
require 'fog/aws/signaturev4'
|
4
|
+
require 'unicode'
|
4
5
|
module Fog
|
5
6
|
module AWS
|
6
7
|
extend Fog::Provider
|
@@ -20,6 +21,7 @@ module Fog
|
|
20
21
|
service(:glacier, 'aws/glacier', 'Glacier')
|
21
22
|
service(:iam, 'aws/iam', 'IAM')
|
22
23
|
service(:rds, 'aws/rds', 'RDS')
|
24
|
+
service(:redshift, 'aws/redshift', 'Redshift')
|
23
25
|
service(:ses, 'aws/ses', 'SES')
|
24
26
|
service(:simpledb, 'aws/simpledb', 'SimpleDB')
|
25
27
|
service(:sns, 'aws/sns', 'SNS')
|
@@ -84,7 +86,8 @@ module Fog
|
|
84
86
|
end
|
85
87
|
|
86
88
|
def self.escape(string)
|
87
|
-
string
|
89
|
+
string = Unicode::normalize_C(string)
|
90
|
+
string.gsub(/([^a-zA-Z0-9_.\-~\/]+)/) {
|
88
91
|
"%" + $1.unpack("H2" * $1.bytesize).join("%").upcase
|
89
92
|
}
|
90
93
|
end
|
@@ -15,6 +15,9 @@ module Fog
|
|
15
15
|
request :describe_pipelines
|
16
16
|
request :list_pipelines
|
17
17
|
request :put_pipeline_definition
|
18
|
+
request :get_pipeline_definition
|
19
|
+
request :query_objects
|
20
|
+
request :describe_objects
|
18
21
|
|
19
22
|
model_path 'fog/aws/models/data_pipeline'
|
20
23
|
model :pipeline
|
data/lib/fog/aws/elasticache.rb
CHANGED
@@ -5,6 +5,7 @@ module Fog
|
|
5
5
|
|
6
6
|
class IdentifierTaken < Fog::Errors::Error; end
|
7
7
|
class InvalidInstance < Fog::Errors::Error; end
|
8
|
+
class AuthorizationAlreadyExists < Fog::Errors::Error; end
|
8
9
|
|
9
10
|
requires :aws_access_key_id, :aws_secret_access_key
|
10
11
|
recognizes :region, :host, :path, :port, :scheme, :persistent, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at
|
@@ -130,6 +131,7 @@ module Fog
|
|
130
131
|
hash[region] = Hash.new do |region_hash, key|
|
131
132
|
region_hash[key] = {
|
132
133
|
:clusters => {}, # cache cluster data, indexed by cluster ID
|
134
|
+
:security_groups => {}, # security groups
|
133
135
|
}
|
134
136
|
end
|
135
137
|
end
|
@@ -25,18 +25,18 @@ module Fog
|
|
25
25
|
attribute :vpc_zone_identifier, :aliases => 'VPCZoneIdentifier'
|
26
26
|
|
27
27
|
def initialize(attributes={})
|
28
|
-
attributes['
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
28
|
+
attributes['Instances'] = []
|
29
|
+
self.default_cooldown = 300
|
30
|
+
self.desired_capacity = 0
|
31
|
+
self.enabled_metrics = []
|
32
|
+
self.health_check_grace_period = 0
|
33
|
+
self.health_check_type = 'EC2'
|
34
|
+
self.load_balancer_names = []
|
35
|
+
self.max_size = 0
|
36
|
+
self.min_size = 0
|
37
|
+
self.suspended_processes = []
|
38
|
+
self.tags = []
|
39
|
+
self.termination_policies = ['Default']
|
40
40
|
super
|
41
41
|
end
|
42
42
|
|
@@ -43,7 +43,9 @@ module Fog
|
|
43
43
|
|
44
44
|
def save
|
45
45
|
requires :vpc_id, :cidr_block
|
46
|
-
|
46
|
+
options = {}
|
47
|
+
options['AvailabilityZone'] = availability_zone if availability_zone
|
48
|
+
data = service.create_subnet(vpc_id, cidr_block, options).body['subnetSet'].first
|
47
49
|
new_attributes = data.reject {|key,value| key == 'requestId'}
|
48
50
|
merge_attributes(new_attributes)
|
49
51
|
true
|
@@ -29,6 +29,8 @@ module Fog
|
|
29
29
|
attribute :notification_config,
|
30
30
|
:aliases => 'NotificationConfiguration', :type => :hash
|
31
31
|
|
32
|
+
attr_accessor :parameter_group_name
|
33
|
+
|
32
34
|
def ready?
|
33
35
|
status == 'available'
|
34
36
|
end
|
@@ -57,7 +59,7 @@ module Fog
|
|
57
59
|
:port => port,
|
58
60
|
:preferred_availablility_zone => zone,
|
59
61
|
:preferred_maintenance_window => maintenance_window,
|
60
|
-
:parameter_group_name
|
62
|
+
:parameter_group_name => parameter_group_name || parameter_group['CacheParameterGroupName'],
|
61
63
|
}
|
62
64
|
)
|
63
65
|
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Redshift
|
4
|
+
module AWS
|
5
|
+
require 'fog/aws/parsers/redshift/cluster_parser'
|
6
|
+
|
7
|
+
class Cluster < ClusterParser
|
8
|
+
def reset
|
9
|
+
super
|
10
|
+
@response = {}
|
11
|
+
end
|
12
|
+
|
13
|
+
def start_element(name, attrs = [])
|
14
|
+
super
|
15
|
+
end
|
16
|
+
|
17
|
+
def end_element(name)
|
18
|
+
super
|
19
|
+
case name
|
20
|
+
when 'Cluster'
|
21
|
+
@response = {name => @cluster}
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
@@ -0,0 +1,144 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Redshift
|
4
|
+
module AWS
|
5
|
+
|
6
|
+
class ClusterParser < Fog::Parsers::Base
|
7
|
+
# :cluster_identifier - (String)
|
8
|
+
# :node_type - (String)
|
9
|
+
# :cluster_status - (String)
|
10
|
+
# :modify_status - (String)
|
11
|
+
# :master_username - (String)
|
12
|
+
# :db_name - (String)
|
13
|
+
# :endpoint - (Hash)
|
14
|
+
# :address - (String)
|
15
|
+
# :port - (Integer)
|
16
|
+
# :cluster_create_time - (Time)
|
17
|
+
# :automated_snapshot_retention_period - (Integer)
|
18
|
+
# :cluster_security_groups - (Array)
|
19
|
+
# :cluster_security_group_name - (String)
|
20
|
+
# :status - (String)
|
21
|
+
# :vpc_security_groups - (Array)
|
22
|
+
# :vpc_security_group_id - (String)
|
23
|
+
# :status - (String)
|
24
|
+
# :cluster_parameter_groups - (Array)
|
25
|
+
# :parameter_group_name - (String)
|
26
|
+
# :parameter_apply_status - (String)
|
27
|
+
# :cluster_subnet_group_name - (String)
|
28
|
+
# :vpc_id - (String)
|
29
|
+
# :availability_zone - (String)
|
30
|
+
# :preferred_maintenance_window - (String)
|
31
|
+
# :pending_modified_values - (Hash)
|
32
|
+
# :master_user_password - (String)
|
33
|
+
# :node_type - (String)
|
34
|
+
# :number_of_nodes - (Integer)
|
35
|
+
# :cluster_type - (String)
|
36
|
+
# :cluster_version - (String)
|
37
|
+
# :automated_snapshot_retention_period - (Integer)
|
38
|
+
# :cluster_version - (String)
|
39
|
+
# :allow_version_upgrade - (Boolean)
|
40
|
+
# :number_of_nodes - (Integer)
|
41
|
+
# :publicly_accessible - (Boolean)
|
42
|
+
# :encrypted - (Boolean)
|
43
|
+
# :restore_status - (Hash)
|
44
|
+
# :status - (String)
|
45
|
+
# :current_restore_rate_in_mega_bytes_per_second - (Numeric)
|
46
|
+
# :snapshot_size_in_mega_bytes - (Integer)
|
47
|
+
# :progress_in_mega_bytes - (Integer)
|
48
|
+
# :elapsed_time_in_seconds - (Integer)
|
49
|
+
# :estimated_time_to_completion_in_seconds - (Integer)
|
50
|
+
|
51
|
+
def reset
|
52
|
+
@cluster = fresh_cluster
|
53
|
+
end
|
54
|
+
|
55
|
+
def fresh_cluster
|
56
|
+
{ 'ClusterParameterGroups' => [], 'ClusterSecurityGroups' => [], 'VpcSecurityGroups' => [],
|
57
|
+
'EndPoint' => {}, 'PendingModifiedValues'=> {}, 'RestoreStatus' => {}}
|
58
|
+
end
|
59
|
+
|
60
|
+
def start_element(name, attrs = [])
|
61
|
+
super
|
62
|
+
case name
|
63
|
+
when 'ClusterSecurityGroups'
|
64
|
+
@in_cluster_security_groups = true
|
65
|
+
@cluster_security_group = {}
|
66
|
+
when 'ClusterParameterGroups'
|
67
|
+
@cluster_parameter_group = {}
|
68
|
+
when 'VpcSecurityGroups'
|
69
|
+
@in_vpc_security_groups = true
|
70
|
+
@vpc_security_group = {}
|
71
|
+
when 'PendingModifiedValues'
|
72
|
+
@in_pending_modified_values = true
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
def end_element(name)
|
77
|
+
case name
|
78
|
+
when 'AvailabilityZone', 'ClusterIdentifier', 'ClusterStatus', 'ClusterSubnetGroupName', 'DBName',
|
79
|
+
'MasterUsername', 'ModifyStatus', 'PreferredMaintenanceWindow', 'VpcId'
|
80
|
+
@cluster[name] = value
|
81
|
+
when 'ClusterCreateTime'
|
82
|
+
@cluster[name] = Time.parse(value)
|
83
|
+
when 'AllowVersionUpgrade', 'Encrypted', 'PubliclyAccessible'
|
84
|
+
@cluster[name] = (value == "true")
|
85
|
+
when 'Address'
|
86
|
+
@cluster['EndPoint'][name] = value
|
87
|
+
when 'Port'
|
88
|
+
@cluster['EndPoint'][name] = value.to_i
|
89
|
+
when 'NodeType', 'ClusterVersion'
|
90
|
+
if @in_pending_modified_values
|
91
|
+
@cluster['PendingModifiedValues'][name] = value
|
92
|
+
else
|
93
|
+
@cluster[name] = value
|
94
|
+
end
|
95
|
+
when 'NumberOfNodes', 'AutomatedSnapshotRetentionPeriod'
|
96
|
+
if @in_pending_modified_values
|
97
|
+
@cluster['PendingModifiedValues'][name] = value.to_i
|
98
|
+
else
|
99
|
+
@cluster[name] = value.to_i
|
100
|
+
end
|
101
|
+
when 'MasterUserPassword', 'ClusterType'
|
102
|
+
@cluster['PendingModifiedValues'][name] = value
|
103
|
+
when 'Status'
|
104
|
+
if @in_vpc_security_groups
|
105
|
+
@vpc_security_group[name] = value
|
106
|
+
elsif @in_cluster_security_groups
|
107
|
+
@cluster_security_group[name] = value
|
108
|
+
else
|
109
|
+
@cluster['RestoreStatus'][name] = value
|
110
|
+
end
|
111
|
+
when 'ParameterGroupName', 'ParameterApplyStatus'
|
112
|
+
@cluster_parameter_group[name] = value
|
113
|
+
when 'ClusterSecurityGroupName'
|
114
|
+
@cluster_security_group[name] = value
|
115
|
+
when 'VpcSecurityGroupId'
|
116
|
+
@vpc_security_group[name] = value
|
117
|
+
when 'SnapshotSizeInMegaBytes', 'ProgressInMegaBytes', 'ElapsedTimeInSeconds', 'EstimatedTimeToCompletionInSeconds'
|
118
|
+
@cluster['RestoreStatus'][name] = value.to_i
|
119
|
+
when 'CurrentRestoreRateInMegaBytesPerSecond'
|
120
|
+
@cluster['RestoreStatus'][name] = value.to_f
|
121
|
+
|
122
|
+
when 'ClusterSecurityGroups'
|
123
|
+
@in_cluster_security_groups = false
|
124
|
+
when 'VpcSecurityGroups'
|
125
|
+
@in_vpc_security_groups = false
|
126
|
+
when 'PendingModifiedValues'
|
127
|
+
@in_pending_modified_values = false
|
128
|
+
|
129
|
+
when 'ClusterParameterGroup'
|
130
|
+
@cluster['ClusterParameterGroups'] << {name => @cluster_parameter_group}
|
131
|
+
@cluster_parameter_group = {}
|
132
|
+
when 'ClusterSecurityGroup'
|
133
|
+
@cluster['ClusterSecurityGroups'] << {name => @cluster_security_group}
|
134
|
+
@cluster_security_group = {}
|
135
|
+
when 'VpcSecurityGroup'
|
136
|
+
@cluster['VpcSecurityGroups'] << {name => @vpc_security_group}
|
137
|
+
@vpc_security_group = {}
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Redshift
|
4
|
+
module AWS
|
5
|
+
|
6
|
+
class ClusterSecurityGroupParser < Fog::Parsers::Base
|
7
|
+
# :cluster_security_group_name - (String)
|
8
|
+
# :description - (String)
|
9
|
+
# :ec_2_security_groups - (Array)
|
10
|
+
# :status - (String)
|
11
|
+
# :ec2_security_group_name - (String)
|
12
|
+
# :ec2_security_group_owner_id - (String)
|
13
|
+
# :ip_ranges - (Array)
|
14
|
+
# :status - (String)
|
15
|
+
# :cidrip - (String)
|
16
|
+
|
17
|
+
def reset
|
18
|
+
@cluster_security_group = fresh_cluster_security_group
|
19
|
+
end
|
20
|
+
|
21
|
+
def fresh_cluster_security_group
|
22
|
+
{'EC2SecurityGroups' => [], 'IPRanges' => []}
|
23
|
+
end
|
24
|
+
|
25
|
+
def start_element(name, attrs = [])
|
26
|
+
super
|
27
|
+
case name
|
28
|
+
when 'EC2SecurityGroups', 'IPRanges'
|
29
|
+
@list = {}
|
30
|
+
@list_name = name
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def end_element(name)
|
35
|
+
super
|
36
|
+
case name
|
37
|
+
when 'ClusterSecurityGroupName', 'Description'
|
38
|
+
@cluster_security_group[name] = value
|
39
|
+
when 'EC2SecurityGroupName', 'EC2SecurityGroupOwnerId', 'CIDRIP', 'Status'
|
40
|
+
@list[name] = value
|
41
|
+
when 'EC2SecurityGroup', 'IPRange'
|
42
|
+
@cluster_security_group[@list_name] << {name => @list}
|
43
|
+
@list = {}
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Redshift
|
4
|
+
module AWS
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/redshift/cluster_snapshot_parser'
|
7
|
+
|
8
|
+
class ClusterSnapshot < ClusterSnapshotParser
|
9
|
+
# :parameter_group_name - (String)
|
10
|
+
# :parameter_group_status - (String)
|
11
|
+
|
12
|
+
def reset
|
13
|
+
super
|
14
|
+
@response = {}
|
15
|
+
end
|
16
|
+
|
17
|
+
def start_element(name, attrs = [])
|
18
|
+
super
|
19
|
+
end
|
20
|
+
|
21
|
+
def end_element(name)
|
22
|
+
super
|
23
|
+
case name
|
24
|
+
when 'Snapshot'
|
25
|
+
@response = @snapshot
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Redshift
|
4
|
+
module AWS
|
5
|
+
|
6
|
+
class ClusterSnapshotParser < Fog::Parsers::Base
|
7
|
+
# :snapshot_identifier - (String)
|
8
|
+
# :cluster_identifier - (String)
|
9
|
+
# :snapshot_create_time - (Time)
|
10
|
+
# :status - (String)
|
11
|
+
# :port - (Integer)
|
12
|
+
# :availability_zone - (String)
|
13
|
+
# :cluster_create_time - (Time)
|
14
|
+
# :master_username - (String)
|
15
|
+
# :cluster_version - (String)
|
16
|
+
# :snapshot_type - (String)
|
17
|
+
# :node_type - (String)
|
18
|
+
# :number_of_nodes - (Integer)
|
19
|
+
# :db_name - (String)
|
20
|
+
# :vpc_id - (String)
|
21
|
+
# :encrypted - (Boolean)
|
22
|
+
# :accounts_with_restore_access - (Array)
|
23
|
+
# :account_id - (String)
|
24
|
+
# :owner_account - (String)
|
25
|
+
# :total_backup_size_in_mega_bytes - (Numeric)
|
26
|
+
# :actual_incremental_backup_size_in_mega_bytes - (Numeric)
|
27
|
+
# :backup_progress_in_mega_bytes - (Numeric)
|
28
|
+
# :current_backup_rate_in_mega_bytes_per_second - (Numeric)
|
29
|
+
# :estimated_seconds_to_completion - (Integer)
|
30
|
+
# :elapsed_time_in_seconds - (Integer)
|
31
|
+
|
32
|
+
def reset
|
33
|
+
@snapshot = fresh_snapshot
|
34
|
+
end
|
35
|
+
|
36
|
+
def fresh_snapshot
|
37
|
+
{'Snapshot' => { 'AccountsWithRestoreAccess' => [] }}
|
38
|
+
end
|
39
|
+
|
40
|
+
def start_element(name, attrs = [])
|
41
|
+
super
|
42
|
+
end
|
43
|
+
|
44
|
+
def end_element(name)
|
45
|
+
super
|
46
|
+
case name
|
47
|
+
when 'SnapshotIdentifier', 'ClusterIdentifier', 'Status', 'AvailabilityZone', 'MasterUsername', 'ClusterVersion', 'SnapshotType', 'NodeType',
|
48
|
+
'DBName', 'VpcId', 'OwnerAccount'
|
49
|
+
@snapshot['Snapshot'][name] = value
|
50
|
+
when 'Port', 'NumberOfNodes', 'ElapsedTimeInSeconds', 'EstimatedSecondsToCompletion'
|
51
|
+
@snapshot['Snapshot'][name] = value.to_i
|
52
|
+
when 'SnapshotCreateTime', 'ClusterCreateTime'
|
53
|
+
@snapshot['Snapshot'][name] = Time.parse(value)
|
54
|
+
when 'Encrypted'
|
55
|
+
@snapshot['Snapshot'][name] = (value == "true")
|
56
|
+
when 'TotalBackupSizeInMegaBytes', 'ActualIncrementalBackupSizeInMegaBytes', 'BackupProgressInMegaBytes', 'CurrentBackupRateInMegaBytesPerSecond'
|
57
|
+
@snapshot['Snapshot'][name] = value.to_f
|
58
|
+
when 'AccountId'
|
59
|
+
@snapshot['Snapshot']['AccountsWithRestoreAccess'] << value
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|