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
@@ -28,6 +28,8 @@ module Fog
|
|
28
28
|
# * 'Ebs.SnapshotId'<~String> - id of snapshot to boot volume from
|
29
29
|
# * 'Ebs.VolumeSize'<~String> - size of volume in GiBs required unless snapshot is specified
|
30
30
|
# * 'Ebs.DeleteOnTermination'<~String> - specifies whether or not to delete the volume on instance termination
|
31
|
+
# * 'Ebs.VolumeType'<~String> - Type of EBS volue. Valid options in ['standard', 'io1'] default is 'standard'.
|
32
|
+
# * 'Ebs.Iops'<~String> - The number of I/O operations per second (IOPS) that the volume supports. Required when VolumeType is 'io1'
|
31
33
|
# * 'ClientToken'<~String> - unique case-sensitive token for ensuring idempotency
|
32
34
|
# * 'DisableApiTermination'<~Boolean> - specifies whether or not to allow termination of the instance from the api
|
33
35
|
# * 'SecurityGroup'<~Array> or <~String> - Name of security group(s) for instances (not supported for VPC)
|
@@ -9,8 +9,7 @@ module Fog
|
|
9
9
|
# ==== Parameters
|
10
10
|
# * PipelineId <~String> - The id of the pipeline to delete
|
11
11
|
# ==== Returns
|
12
|
-
# *
|
13
|
-
# * body<~Hash>:
|
12
|
+
# * success<~Boolean> - Whether the delete was successful
|
14
13
|
def delete_pipeline(id)
|
15
14
|
params = { 'pipelineId' => id }
|
16
15
|
|
@@ -19,7 +18,7 @@ module Fog
|
|
19
18
|
:headers => { 'X-Amz-Target' => 'DataPipeline.DeletePipeline' },
|
20
19
|
})
|
21
20
|
|
22
|
-
|
21
|
+
200 == response.status
|
23
22
|
end
|
24
23
|
|
25
24
|
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class DataPipeline
|
4
|
+
|
5
|
+
class Real
|
6
|
+
|
7
|
+
# Queries a pipeline for the names of objects that match a specified set of conditions.
|
8
|
+
# http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_DescribeObjects.html
|
9
|
+
# ==== Parameters
|
10
|
+
# * PipelineId <~String> - The ID of the pipeline
|
11
|
+
# * ObjectIds <~Array> - Identifiers of the pipeline objects that contain the definitions
|
12
|
+
# to be described. You can pass as many as 25 identifiers in a
|
13
|
+
# single call to DescribeObjects.
|
14
|
+
# ==== Returns
|
15
|
+
# * response<~Excon::Response>:
|
16
|
+
# * body<~Hash>:
|
17
|
+
def describe_objects(id, objectIds)
|
18
|
+
params = {
|
19
|
+
'pipelineId' => id,
|
20
|
+
'objectIds' => objectIds,
|
21
|
+
}
|
22
|
+
|
23
|
+
response = request({
|
24
|
+
:body => Fog::JSON.encode(params),
|
25
|
+
:headers => { 'X-Amz-Target' => 'DataPipeline.DescribeObjects' },
|
26
|
+
})
|
27
|
+
|
28
|
+
Fog::JSON.decode(response.body)
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
class Mock
|
34
|
+
def describe_objects(id, objects)
|
35
|
+
Fog::Mock.not_implemented
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class DataPipeline
|
4
|
+
|
5
|
+
class Real
|
6
|
+
|
7
|
+
# Get pipeline definition JSON
|
8
|
+
# http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_GetPipelineDefinition.html
|
9
|
+
# ==== Parameters
|
10
|
+
# * PipelineId <~String> - The ID of the pipeline
|
11
|
+
# ==== Returns
|
12
|
+
# * response<~Excon::Response>:
|
13
|
+
# * body<~Hash>:
|
14
|
+
def get_pipeline_definition(id)
|
15
|
+
params = {
|
16
|
+
'pipelineId' => id,
|
17
|
+
}
|
18
|
+
|
19
|
+
response = request({
|
20
|
+
:body => Fog::JSON.encode(params),
|
21
|
+
:headers => { 'X-Amz-Target' => 'DataPipeline.GetPipelineDefinition' },
|
22
|
+
})
|
23
|
+
|
24
|
+
Fog::JSON.decode(response.body)
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
class Mock
|
30
|
+
def get_pipeline_definition(id, objects)
|
31
|
+
Fog::Mock.not_implemented
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class DataPipeline
|
4
|
+
|
5
|
+
class Real
|
6
|
+
|
7
|
+
# Queries a pipeline for the names of objects that match a specified set of conditions.
|
8
|
+
# http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_QueryObjects.html
|
9
|
+
# ==== Parameters
|
10
|
+
# * PipelineId <~String> - The ID of the pipeline
|
11
|
+
# * Sphere <~String> - Specifies whether the query applies to components or instances.
|
12
|
+
# Allowable values: COMPONENT, INSTANCE, ATTEMPT.
|
13
|
+
# ==== Returns
|
14
|
+
# * response<~Excon::Response>:
|
15
|
+
# * body<~Hash>:
|
16
|
+
def query_objects(id, sphere)
|
17
|
+
params = {
|
18
|
+
'pipelineId' => id,
|
19
|
+
'sphere' => sphere,
|
20
|
+
}
|
21
|
+
|
22
|
+
response = request({
|
23
|
+
:body => Fog::JSON.encode(params),
|
24
|
+
:headers => { 'X-Amz-Target' => 'DataPipeline.QueryObjects' },
|
25
|
+
})
|
26
|
+
|
27
|
+
Fog::JSON.decode(response.body)
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
class Mock
|
33
|
+
def query_objects(id, objects)
|
34
|
+
Fog::Mock.not_implemented
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
@@ -27,8 +27,33 @@ module Fog
|
|
27
27
|
end
|
28
28
|
|
29
29
|
class Mock
|
30
|
-
|
31
|
-
|
30
|
+
|
31
|
+
def authorize_cache_security_group_ingress(name, ec2_name, ec2_owner_id)
|
32
|
+
opts = {
|
33
|
+
'EC2SecurityGroupName' => ec2_name,
|
34
|
+
'EC2SecurityGroupOwnerId' => ec2_owner_id
|
35
|
+
}
|
36
|
+
|
37
|
+
if sec_group = self.data[:security_groups][name]
|
38
|
+
|
39
|
+
if sec_group['EC2SecurityGroups'].detect{|h| h['EC2SecurityGroupName'] == opts['EC2SecurityGroupName']}
|
40
|
+
raise Fog::AWS::Elasticache::AuthorizationAlreadyExists.new("AuthorizationAlreadyExists => #{opts['EC2SecurityGroupName']} is alreay defined")
|
41
|
+
end
|
42
|
+
sec_group['EC2SecurityGroups'] << opts.merge({'Status' => 'authorizing'})
|
43
|
+
|
44
|
+
Excon::Response.new(
|
45
|
+
{
|
46
|
+
:status => 200,
|
47
|
+
:body => {
|
48
|
+
'ResponseMetadata'=>{ 'RequestId'=> Fog::AWS::Mock.request_id },
|
49
|
+
'CacheSecurityGroup' => sec_group
|
50
|
+
}
|
51
|
+
}
|
52
|
+
)
|
53
|
+
else
|
54
|
+
raise Fog::AWS::Elasticache::NotFound.new("CacheSecurityGroupNotFound => #{name} not found")
|
55
|
+
end
|
56
|
+
|
32
57
|
end
|
33
58
|
end
|
34
59
|
end
|
@@ -24,8 +24,29 @@ module Fog
|
|
24
24
|
end
|
25
25
|
|
26
26
|
class Mock
|
27
|
-
def create_cache_security_group(name,
|
28
|
-
|
27
|
+
def create_cache_security_group(name, description = name)
|
28
|
+
|
29
|
+
if self.data[:security_groups][name]
|
30
|
+
raise Fog::AWS::Elasticache::IdentifierTaken.new("CacheClusterAlreadyExists => The security group '#{name}' already exists")
|
31
|
+
end
|
32
|
+
|
33
|
+
data = {
|
34
|
+
'CacheSecurityGroupName' => name,
|
35
|
+
'Description' => description,
|
36
|
+
'EC2SecurityGroups' => [],
|
37
|
+
'OwnerId' => '0123456789'
|
38
|
+
}
|
39
|
+
self.data[:security_groups][name] = data
|
40
|
+
|
41
|
+
Excon::Response.new(
|
42
|
+
{
|
43
|
+
:body => {
|
44
|
+
'ResponseMetadata'=>{ 'RequestId'=> Fog::AWS::Mock.request_id },
|
45
|
+
'CacheSecurityGroup' => data
|
46
|
+
}
|
47
|
+
}
|
48
|
+
)
|
49
|
+
|
29
50
|
end
|
30
51
|
end
|
31
52
|
end
|
@@ -23,7 +23,16 @@ module Fog
|
|
23
23
|
|
24
24
|
class Mock
|
25
25
|
def delete_cache_security_group(name)
|
26
|
-
|
26
|
+
if self.data[:security_groups].delete(name)
|
27
|
+
Excon::Response.new(
|
28
|
+
{
|
29
|
+
:status => 200,
|
30
|
+
:body => { 'ResponseMetadata'=>{ 'RequestId'=> Fog::AWS::Mock.request_id } }
|
31
|
+
}
|
32
|
+
)
|
33
|
+
else
|
34
|
+
raise Fog::AWS::RDS::NotFound.new("DBSecurityGroupNotFound => #{name} not found")
|
35
|
+
end
|
27
36
|
end
|
28
37
|
end
|
29
38
|
end
|
@@ -25,8 +25,42 @@ module Fog
|
|
25
25
|
end
|
26
26
|
|
27
27
|
class Mock
|
28
|
-
def describe_cache_security_groups(name = nil,
|
29
|
-
|
28
|
+
def describe_cache_security_groups(name = nil, opts={})
|
29
|
+
|
30
|
+
if name
|
31
|
+
sec_group_set = [self.data[:security_groups][name]].compact
|
32
|
+
raise Fog::AWS::Elasticache::NotFound.new("Security Group #{name} not found") if sec_group_set.empty?
|
33
|
+
else
|
34
|
+
sec_group_set = self.data[:security_groups].values
|
35
|
+
end
|
36
|
+
|
37
|
+
# TODO: refactor to not delete items that we're iterating over. Causes
|
38
|
+
# model tests to fail (currently pending)
|
39
|
+
sec_group_set.each do |sec_group|
|
40
|
+
# TODO: refactor to not delete items that we're iterating over. Causes
|
41
|
+
# model tests to fail (currently pending)
|
42
|
+
sec_group["EC2SecurityGroups"].each do |ec2_secg|
|
43
|
+
if ec2_secg["Status"] == "authorizing" || ec2_secg["Status"] == "revoking"
|
44
|
+
ec2_secg[:tmp] ||= Time.now + Fog::Mock.delay * 2
|
45
|
+
if ec2_secg[:tmp] <= Time.now
|
46
|
+
ec2_secg["Status"] = "authorized" if ec2_secg["Status"] == "authorizing"
|
47
|
+
ec2_secg.delete(:tmp)
|
48
|
+
sec_group["EC2SecurityGroups"].delete(ec2_secg) if ec2_secg["Status"] == "revoking"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
Excon::Response.new(
|
55
|
+
{
|
56
|
+
:status => 200,
|
57
|
+
:body => {
|
58
|
+
"ResponseMetadata"=>{ "RequestId"=> Fog::AWS::Mock.request_id },
|
59
|
+
"CacheSecurityGroups" => sec_group_set
|
60
|
+
}
|
61
|
+
}
|
62
|
+
)
|
63
|
+
|
30
64
|
end
|
31
65
|
end
|
32
66
|
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class Redshift
|
4
|
+
class Real
|
5
|
+
require 'fog/aws/parsers/redshift/revoke_cluster_security_group_ingress'
|
6
|
+
|
7
|
+
# ==== Parameters
|
8
|
+
#
|
9
|
+
# @param [Hash] options
|
10
|
+
# * :cluster_security_group_name - required - (String)
|
11
|
+
# The name of the security Group from which to revoke the ingress rule.
|
12
|
+
# * :cidrip - (String)
|
13
|
+
# The IP range for which to revoke access. This range must be a valid Classless
|
14
|
+
# Inter-Domain Routing (CIDR) block of IP addresses. If CIDRIP is specified,
|
15
|
+
# EC2SecurityGroupName and EC2SecurityGroupOwnerId cannot be provided.
|
16
|
+
# * :ec2_security_group_name - (String)
|
17
|
+
# The name of the EC2 Security Group whose access is to be revoked. If
|
18
|
+
# EC2SecurityGroupName is specified, EC2SecurityGroupOwnerId must also be
|
19
|
+
# provided and CIDRIP cannot be provided.
|
20
|
+
# * :ec2_security_group_owner_id - (String)
|
21
|
+
# The AWS account number of the owner of the security group specified in the
|
22
|
+
# EC2SecurityGroupName parameter. The AWS access key ID is not an acceptable
|
23
|
+
# value. If EC2SecurityGroupOwnerId is specified, EC2SecurityGroupName must
|
24
|
+
# also be provided. and CIDRIP cannot be provided. Example: 111122223333
|
25
|
+
#
|
26
|
+
# ==== See Also
|
27
|
+
# http://docs.aws.amazon.com/redshift/latest/APIReference/API_AuthorizeClusterSecurityGroupIngress.html
|
28
|
+
def authorize_cluster_security_group_ingress(options = {})
|
29
|
+
cluster_security_group_name = options[:cluster_security_group_name]
|
30
|
+
cidrip = options[:cidrip]
|
31
|
+
ec2_security_group_name = options[:ec2_security_group_name]
|
32
|
+
ec2_security_group_owner_id = options[:ec2_security_group_owner_id]
|
33
|
+
|
34
|
+
path = "/"
|
35
|
+
params = {
|
36
|
+
:headers => {},
|
37
|
+
:path => path,
|
38
|
+
:method => :put,
|
39
|
+
:query => {},
|
40
|
+
:parser => Fog::Parsers::Redshift::AWS::RevokeClusterSecurityGroupIngress.new
|
41
|
+
}
|
42
|
+
|
43
|
+
params[:query]['Action'] = 'AuthorizeClusterSecurityGroupIngress'
|
44
|
+
params[:query]['ClusterSecurityGroupName'] = cluster_security_group_name if cluster_security_group_name
|
45
|
+
params[:query]['CIDRIP'] = cidrip if cidrip
|
46
|
+
params[:query]['EC2SecurityGroupName'] = ec2_security_group_name if ec2_security_group_name
|
47
|
+
params[:query]['EC2SecurityGroupOwnerId'] = ec2_security_group_owner_id if ec2_security_group_owner_id
|
48
|
+
|
49
|
+
request(params)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class Redshift
|
4
|
+
class Real
|
5
|
+
require 'fog/aws/parsers/redshift/cluster_snapshot'
|
6
|
+
|
7
|
+
# ==== Parameters
|
8
|
+
#
|
9
|
+
# @param [Hash] options
|
10
|
+
# * :snapshot_identifier - required - (String)
|
11
|
+
# The identifier of the snapshot the account is authorized to restore.
|
12
|
+
# * :snapshot_cluster_identifier - (String)
|
13
|
+
# * :account_with_restore_access - required - (String)
|
14
|
+
# The identifier of the AWS customer account authorized to restore the specified snapshot. #
|
15
|
+
#
|
16
|
+
# ==== See Also
|
17
|
+
# http://docs.aws.amazon.com/redshift/latest/APIReference/API_CopyClusterSnapshot.html
|
18
|
+
def authorize_snapshot_access(options = {})
|
19
|
+
snapshot_identifier = options[:snapshot_identifier]
|
20
|
+
snapshot_cluster_identifier = options[:snapshot_cluster_identifier]
|
21
|
+
account_with_restore_access = options[:account_with_restore_access]
|
22
|
+
|
23
|
+
path = "/"
|
24
|
+
params = {
|
25
|
+
:headers => {},
|
26
|
+
:path => path,
|
27
|
+
:method => :put,
|
28
|
+
:query => {},
|
29
|
+
:parser => Fog::Parsers::Redshift::AWS::ClusterSnapshot.new
|
30
|
+
}
|
31
|
+
|
32
|
+
params[:query]['Action'] = 'AuthorizeSnapshotAccess'
|
33
|
+
params[:query]['SnapshotIdentifier'] = snapshot_identifier if snapshot_identifier
|
34
|
+
params[:query]['SnapshotClusterIdentifier'] = snapshot_cluster_identifier if snapshot_cluster_identifier
|
35
|
+
params[:query]['AccountWithRestoreAccess'] = account_with_restore_access if account_with_restore_access
|
36
|
+
|
37
|
+
request(params)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class Redshift
|
4
|
+
class Real
|
5
|
+
require 'fog/aws/parsers/redshift/cluster_snapshot'
|
6
|
+
|
7
|
+
# ==== Parameters
|
8
|
+
#
|
9
|
+
# @param [Hash] options
|
10
|
+
# * :source_snapshot_identifier - required - (String)
|
11
|
+
# The identifier for the source snapshot. Constraints: Must be the identifier for
|
12
|
+
# a valid automated snapshot whose state is "available".
|
13
|
+
# * :source_snapshot_cluster_identifier - (String)
|
14
|
+
# * :target_snapshot_identifier - required - (String)
|
15
|
+
# The identifier given to the new manual snapshot. Constraints: Cannot be null,
|
16
|
+
# empty, or blank. Must contain from 1 to 255 alphanumeric characters or hyphens.
|
17
|
+
# First character must be a letter. Cannot end with a hyphen or contain two
|
18
|
+
# consecutive hyphens. Must be unique for the AWS account that is making the request.
|
19
|
+
#
|
20
|
+
# ==== See Also
|
21
|
+
# http://docs.aws.amazon.com/redshift/latest/APIReference/API_CopyClusterSnapshot.html
|
22
|
+
def copy_cluster_snapshot(options = {})
|
23
|
+
source_snapshot_identifier = options[:source_snapshot_identifier]
|
24
|
+
source_snapshot_cluster_identifier = options[:source_snapshot_cluster_identifier]
|
25
|
+
target_snapshot_identifier = options[:target_snapshot_identifier]
|
26
|
+
|
27
|
+
path = "/"
|
28
|
+
params = {
|
29
|
+
:headers => {},
|
30
|
+
:path => path,
|
31
|
+
:method => :put,
|
32
|
+
:query => {},
|
33
|
+
:parser => Fog::Parsers::Redshift::AWS::ClusterSnapshot.new
|
34
|
+
}
|
35
|
+
|
36
|
+
params[:query]['Action'] = 'CopyClusterSnapshot'
|
37
|
+
params[:query]['SourceSnapshotIdentifier'] = source_snapshot_identifier if source_snapshot_identifier
|
38
|
+
params[:query]['SourceSnapshotClusterIdentifier'] = source_snapshot_cluster_identifier if source_snapshot_cluster_identifier
|
39
|
+
params[:query]['TargetSnapshotIdentifier'] = target_snapshot_identifier if target_snapshot_identifier
|
40
|
+
|
41
|
+
request(params)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
@@ -0,0 +1,151 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class Redshift
|
4
|
+
class Real
|
5
|
+
require 'fog/aws/parsers/redshift/cluster'
|
6
|
+
|
7
|
+
# ==== Parameters
|
8
|
+
#
|
9
|
+
# @param [Hash] options
|
10
|
+
# * :db_name - (String)
|
11
|
+
# The name of the first database to be created when the cluster is created. To create
|
12
|
+
# additional databases after the cluster is created, connect to the cluster with a SQL
|
13
|
+
# client and use SQL commands to create a database. Default: dev Constraints: Must
|
14
|
+
# contain 1 to 64 alphanumeric characters. Must contain only lowercase letters.
|
15
|
+
# * :cluster_identifier - required - (String)
|
16
|
+
# A unique identifier for the cluster. You use this identifier to refer to the cluster
|
17
|
+
# for any subsequent cluster operations such as deleting or modifying. Must be unique
|
18
|
+
# for all clusters within an AWS account. Example: myexamplecluster
|
19
|
+
# * :cluster_type - (String)
|
20
|
+
# Type of the cluster. When cluster type is specified as single-node, the NumberOfNodes
|
21
|
+
# parameter is not required. multi-node, the NumberOfNodes parameter is required. Valid
|
22
|
+
# Values: multi-node | single-node Default: multi-node
|
23
|
+
# * :node_type - required - (String)
|
24
|
+
# The node type to be provisioned. Valid Values: dw.hs1.xlarge | dw.hs1.8xlarge.
|
25
|
+
# * :master_username - required - (String)
|
26
|
+
# The user name associated with the master user account for the cluster that is being
|
27
|
+
# created. Constraints: Must be 1 - 128 alphanumeric characters. First character must
|
28
|
+
# be a letter. Cannot be a reserved word.
|
29
|
+
# * :master_user_password - required - (String)
|
30
|
+
# The password associated with the master user account for the cluster that is being
|
31
|
+
# created. Constraints: Must be between 8 and 64 characters in length. Must contain at
|
32
|
+
# least one uppercase letter. Must contain at least one lowercase letter. Must contain
|
33
|
+
# one number.
|
34
|
+
# * :cluster_security_groups - (Array<String>)
|
35
|
+
# A list of security groups to be associated with this cluster. Default: The default
|
36
|
+
# cluster security group for Amazon Redshift.
|
37
|
+
# * :vpc_security_group_ids - (Array<String>)
|
38
|
+
# A list of Virtual Private Cloud (VPC) security groups to be associated with the
|
39
|
+
# cluster. Default: The default VPC security group is associated with the cluster.
|
40
|
+
# * :cluster_subnet_group_name - (String)
|
41
|
+
# The name of a cluster subnet group to be associated with this cluster. If this
|
42
|
+
# parameter is not provided the resulting cluster will be deployed outside virtual
|
43
|
+
# private cloud (VPC).
|
44
|
+
# * :availability_zone - (String)
|
45
|
+
# The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the
|
46
|
+
# cluster. Default: A random, system-chosen Availability Zone in the region that is
|
47
|
+
# specified by the endpoint. Example: us-east-1d Constraint: The specified
|
48
|
+
# Availability Zone must be in the same region as the current endpoint.
|
49
|
+
# * :preferred_maintenance_window - (String)
|
50
|
+
# The weekly time range (in UTC) during which automated cluster maintenance can occur.
|
51
|
+
# Format: ddd:hh24:mi-ddd:hh24:mi Default: A 30-minute window selected at random from
|
52
|
+
# an 8-hour block of time per region, occurring on a random day of the week.
|
53
|
+
# Constraints: Minimum 30-minute window.
|
54
|
+
# * :cluster_parameter_group_name - (String)
|
55
|
+
# The name of the parameter group to be associated with this cluster. Default: The
|
56
|
+
# default Amazon Redshift cluster parameter group. Constraints: Must be 1 to 255
|
57
|
+
# alphanumeric characters or hyphens. First character must be a letter. Cannot end
|
58
|
+
# with a hyphen or contain two consecutive hyphens.
|
59
|
+
# * :automated_snapshot_retention_period - (Integer)
|
60
|
+
# Number of days that automated snapshots are retained. If the value is 0, automated
|
61
|
+
# snapshots are disabled. Default: 1 Constraints: Must be a value from 0 to 35.
|
62
|
+
# * :port - (Integer)
|
63
|
+
# The port number on which the cluster accepts incoming connections. Default: 5439
|
64
|
+
# Valid Values: 1150-65535
|
65
|
+
# * :cluster_version - (String)
|
66
|
+
# The version of the Amazon Redshift engine software that you want to deploy on the
|
67
|
+
# cluster. The version selected runs on all the nodes in the cluster. Constraints:
|
68
|
+
# Only version 1.0 is currently available. Example: 1.0
|
69
|
+
# * :allow_version_upgrade - (Boolean)
|
70
|
+
# If `true` , upgrades can be applied during the maintenance window to the Amazon
|
71
|
+
# Redshift engine that is running on the cluster. Default: `true`
|
72
|
+
# * :number_of_nodes - (Integer)
|
73
|
+
# The number of compute nodes in the cluster. This parameter is required when the
|
74
|
+
# ClusterType parameter is specified as multi-node. If you don't specify this parameter,
|
75
|
+
# you get a single-node cluster. When requesting a multi-node cluster, you must specify
|
76
|
+
# the number of nodes that you want in the cluster. Default: 1 Constraints: Value must
|
77
|
+
# be at least 1 and no more than 100.
|
78
|
+
# * :publicly_accessible - (Boolean)
|
79
|
+
# If `true` , the cluster can be accessed from a public network.
|
80
|
+
# * :encrypted - (Boolean)
|
81
|
+
# If `true` , the data in cluster is encrypted at rest. Default: `false`
|
82
|
+
|
83
|
+
# ==== See Also
|
84
|
+
# http://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateCluster.html
|
85
|
+
def create_cluster(options = {})
|
86
|
+
db_name = options[:db_name]
|
87
|
+
cluster_identifier = options[:cluster_identifier]
|
88
|
+
cluster_type = options[:cluster_type]
|
89
|
+
node_type = options[:node_type]
|
90
|
+
master_username = options[:master_username]
|
91
|
+
master_user_password = options[:master_user_password]
|
92
|
+
cluster_subnet_group_name = options[:cluster_subnet_group_name]
|
93
|
+
availability_zone = options[:availability_zone]
|
94
|
+
preferred_maintenance_window = options[:preferred_maintenance_window]
|
95
|
+
cluster_parameter_group_name = options[:cluster_parameter_group_name]
|
96
|
+
automated_snapshot_retention_period = options[:automated_snapshot_retention_period]
|
97
|
+
port = options[:port]
|
98
|
+
cluster_version = options[:cluster_version]
|
99
|
+
allow_version_upgrade = options[:allow_version_upgrade]
|
100
|
+
number_of_nodes = options[:number_of_nodes]
|
101
|
+
publicly_accessible = options[:publicly_accessible]
|
102
|
+
encrypted = options[:encrypted]
|
103
|
+
|
104
|
+
path = "/"
|
105
|
+
params = {
|
106
|
+
:idempotent => true,
|
107
|
+
:headers => {},
|
108
|
+
:path => path,
|
109
|
+
:method => :put,
|
110
|
+
:query => {},
|
111
|
+
:parser => Fog::Parsers::Redshift::AWS::Cluster.new
|
112
|
+
}
|
113
|
+
|
114
|
+
if cluster_security_groups = options.delete(:ClusterSecurityGroups)
|
115
|
+
params[:query].merge!(Fog::AWS.indexed_param('ClusterSecurityGroups.member.%d', [*cluster_security_groups]))
|
116
|
+
end
|
117
|
+
|
118
|
+
if vpc_security_group_ids = options.delete(:VpcSecurityGroupIds)
|
119
|
+
params[:query].merge!(Fog::AWS.indexed_param('VpcSecurityGroupIds.member.%d', [*vpc_security_group_ids]))
|
120
|
+
end
|
121
|
+
|
122
|
+
|
123
|
+
params[:query]['Action'] = 'CreateCluster'
|
124
|
+
params[:query]['DBName'] = db_name if db_name
|
125
|
+
params[:query]['ClusterIdentifier'] = cluster_identifier if cluster_identifier
|
126
|
+
params[:query]['ClusterType'] = cluster_type if cluster_type
|
127
|
+
params[:query]['NodeType'] = node_type if node_type
|
128
|
+
params[:query]['MasterUsername'] = master_username if master_username
|
129
|
+
params[:query]['MasterUserPassword'] = master_user_password if master_user_password
|
130
|
+
params[:query]['ClusterSecurityGroups'] = cluster_security_groups if cluster_security_groups
|
131
|
+
params[:query]['VpcSecurityGroupIds'] = vpc_security_group_ids if vpc_security_group_ids
|
132
|
+
params[:query]['ClusterSubnetGroupName'] = cluster_subnet_group_name if cluster_subnet_group_name
|
133
|
+
params[:query]['AvailabilityZone'] = availability_zone if availability_zone
|
134
|
+
params[:query]['PreferredMaintenanceWindow'] = preferred_maintenance_window if preferred_maintenance_window
|
135
|
+
params[:query]['ClusterParameterGroupName'] = cluster_parameter_group_name if cluster_parameter_group_name
|
136
|
+
params[:query]['AutomatedSnapshotRetentionPeriod'] = automated_snapshot_retention_period if automated_snapshot_retention_period
|
137
|
+
params[:query]['Port'] = port if port
|
138
|
+
params[:query]['ClusterVersion'] = cluster_version if cluster_version
|
139
|
+
params[:query]['AllowVersionUpgrade'] = allow_version_upgrade if allow_version_upgrade
|
140
|
+
params[:query]['NumberOfNodes'] = number_of_nodes if number_of_nodes
|
141
|
+
params[:query]['PubliclyAccessible'] = publicly_accessible if publicly_accessible
|
142
|
+
params[:query]['Encrypted'] = encrypted if encrypted
|
143
|
+
|
144
|
+
|
145
|
+
request(params)
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|