fog 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/README.md +1 -0
- data/Rakefile +2 -1
- data/changelog.txt +184 -0
- data/docs/cdn/index.markdown +69 -3
- data/fog.gemspec +2 -2
- data/lib/fog.rb +2 -1
- data/lib/fog/atmos/models/storage/file.rb +16 -14
- data/lib/fog/aws/auto_scaling.rb +55 -13
- data/lib/fog/aws/cdn.rb +69 -9
- data/lib/fog/aws/cloud_watch.rb +15 -1
- data/lib/fog/aws/compute.rb +2 -0
- data/lib/fog/aws/models/auto_scaling/group.rb +10 -4
- data/lib/fog/aws/models/cdn/distribution.rb +93 -0
- data/lib/fog/aws/models/cdn/distribution_helper.rb +64 -0
- data/lib/fog/aws/models/cdn/distributions.rb +32 -0
- data/lib/fog/aws/models/cdn/distributions_helper.rb +47 -0
- data/lib/fog/aws/models/cdn/invalidation.rb +64 -0
- data/lib/fog/aws/models/cdn/invalidations.rb +54 -0
- data/lib/fog/aws/models/cdn/streaming_distribution.rb +77 -0
- data/lib/fog/aws/models/cdn/streaming_distributions.rb +32 -0
- data/lib/fog/aws/models/compute/server.rb +0 -23
- data/lib/fog/aws/models/compute/spot_request.rb +2 -24
- data/lib/fog/aws/models/rds/server.rb +18 -0
- data/lib/fog/aws/models/rds/subnet_group.rb +20 -0
- data/lib/fog/aws/models/rds/subnet_groups.rb +27 -0
- data/lib/fog/aws/models/storage/file.rb +1 -1
- data/lib/fog/aws/parsers/auto_scaling/describe_adjustment_types.rb +15 -2
- data/lib/fog/aws/parsers/auto_scaling/describe_auto_scaling_groups.rb +39 -13
- data/lib/fog/aws/parsers/auto_scaling/describe_auto_scaling_notification_types.rb +43 -0
- data/lib/fog/aws/parsers/auto_scaling/describe_metric_collection_types.rb +3 -3
- data/lib/fog/aws/parsers/auto_scaling/describe_notification_configurations.rb +42 -0
- data/lib/fog/aws/parsers/auto_scaling/describe_scaling_process_types.rb +15 -2
- data/lib/fog/aws/parsers/auto_scaling/describe_tags.rb +46 -0
- data/lib/fog/aws/parsers/auto_scaling/describe_termination_policy_types.rb +44 -0
- data/lib/fog/aws/parsers/cdn/get_invalidation.rb +32 -0
- data/lib/fog/aws/parsers/cloud_formation/describe_stacks.rb +1 -1
- data/lib/fog/aws/parsers/cloud_watch/list_metrics.rb +1 -1
- data/lib/fog/aws/parsers/compute/describe_availability_zones.rb +13 -2
- data/lib/fog/aws/parsers/compute/describe_reserved_instances.rb +1 -1
- data/lib/fog/aws/parsers/elasticache/base.rb +0 -2
- data/lib/fog/aws/parsers/elasticache/engine_defaults_parser.rb +1 -1
- data/lib/fog/aws/parsers/elasticache/event_list.rb +2 -0
- data/lib/fog/aws/parsers/rds/base.rb +32 -0
- data/lib/fog/aws/parsers/rds/create_db_subnet_group.rb +38 -0
- data/lib/fog/aws/parsers/rds/describe_db_subnet_groups.rb +38 -0
- data/lib/fog/aws/parsers/rds/event_list.rb +40 -0
- data/lib/fog/aws/parsers/rds/subnet_group_parser.rb +38 -0
- data/lib/fog/aws/parsers/rds/tag_list_parser.rb +35 -0
- data/lib/fog/aws/rds.rb +24 -7
- data/lib/fog/aws/requests/auto_scaling/create_auto_scaling_group.rb +36 -16
- data/lib/fog/aws/requests/auto_scaling/create_launch_configuration.rb +19 -12
- data/lib/fog/aws/requests/auto_scaling/create_or_update_tags.rb +63 -0
- data/lib/fog/aws/requests/auto_scaling/delete_auto_scaling_group.rb +10 -3
- data/lib/fog/aws/requests/auto_scaling/delete_notification_configuration.rb +21 -5
- data/lib/fog/aws/requests/auto_scaling/delete_policy.rb +2 -2
- data/lib/fog/aws/requests/auto_scaling/delete_tags.rb +63 -0
- data/lib/fog/aws/requests/auto_scaling/describe_adjustment_types.rb +4 -3
- data/lib/fog/aws/requests/auto_scaling/describe_auto_scaling_groups.rb +17 -13
- data/lib/fog/aws/requests/auto_scaling/describe_auto_scaling_instances.rb +1 -1
- data/lib/fog/aws/requests/auto_scaling/describe_auto_scaling_notification_types.rb +55 -0
- data/lib/fog/aws/requests/auto_scaling/describe_metric_collection_types.rb +6 -5
- data/lib/fog/aws/requests/auto_scaling/describe_notification_configurations.rb +79 -0
- data/lib/fog/aws/requests/auto_scaling/describe_policies.rb +1 -1
- data/lib/fog/aws/requests/auto_scaling/describe_scaling_process_types.rb +4 -3
- data/lib/fog/aws/requests/auto_scaling/describe_tags.rb +74 -0
- data/lib/fog/aws/requests/auto_scaling/describe_termination_policy_types.rb +53 -0
- data/lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb +1 -1
- data/lib/fog/aws/requests/auto_scaling/enable_metrics_collection.rb +2 -2
- data/lib/fog/aws/requests/auto_scaling/put_notification_configuration.rb +30 -11
- data/lib/fog/aws/requests/auto_scaling/put_scaling_policy.rb +4 -4
- data/lib/fog/aws/requests/auto_scaling/put_scheduled_update_group_action.rb +8 -5
- data/lib/fog/aws/requests/auto_scaling/set_desired_capacity.rb +2 -2
- data/lib/fog/aws/requests/auto_scaling/set_instance_health.rb +2 -2
- data/lib/fog/aws/requests/auto_scaling/suspend_processes.rb +1 -1
- data/lib/fog/aws/requests/auto_scaling/update_auto_scaling_group.rb +30 -18
- data/lib/fog/aws/requests/cdn/delete_distribution.rb +31 -0
- data/lib/fog/aws/requests/cdn/delete_streaming_distribution.rb +30 -0
- data/lib/fog/aws/requests/cdn/get_distribution.rb +28 -0
- data/lib/fog/aws/requests/cdn/get_distribution_list.rb +29 -0
- data/lib/fog/aws/requests/cdn/get_invalidation.rb +60 -0
- data/lib/fog/aws/requests/cdn/get_invalidation_list.rb +41 -0
- data/lib/fog/aws/requests/cdn/get_streaming_distribution.rb +26 -0
- data/lib/fog/aws/requests/cdn/get_streaming_distribution_list.rb +30 -0
- data/lib/fog/aws/requests/cdn/post_distribution.rb +44 -0
- data/lib/fog/aws/requests/cdn/post_invalidation.rb +33 -0
- data/lib/fog/aws/requests/cdn/post_streaming_distribution.rb +44 -0
- data/lib/fog/aws/requests/cdn/put_distribution_config.rb +28 -0
- data/lib/fog/aws/requests/cdn/put_streaming_distribution_config.rb +28 -0
- data/lib/fog/aws/requests/compute/create_image.rb +32 -5
- data/lib/fog/aws/requests/compute/create_subnet.rb +3 -3
- data/lib/fog/aws/requests/compute/create_volume.rb +2 -2
- data/lib/fog/aws/requests/compute/register_image.rb +1 -1
- data/lib/fog/aws/requests/elasticache/describe_events.rb +7 -4
- data/lib/fog/aws/requests/glacier/create_archive.rb +1 -1
- data/lib/fog/aws/requests/glacier/initiate_multipart_upload.rb +1 -1
- data/lib/fog/aws/requests/rds/add_tags_to_resource.rb +46 -0
- data/lib/fog/aws/requests/rds/create_db_instance.rb +2 -0
- data/lib/fog/aws/requests/rds/create_db_subnet_group.rb +58 -0
- data/lib/fog/aws/requests/rds/describe_db_subnet_groups.rb +63 -0
- data/lib/fog/aws/requests/rds/describe_events.rb +52 -0
- data/lib/fog/aws/requests/rds/list_tags_for_resource.rb +44 -0
- data/lib/fog/aws/requests/rds/remove_tags_from_resource.rb +44 -0
- data/lib/fog/aws/sqs.rb +1 -1
- data/lib/fog/aws/storage.rb +1 -1
- data/lib/fog/bin/openstack.rb +5 -0
- data/lib/fog/bluebox/models/compute/server.rb +0 -19
- data/lib/fog/bluebox/requests/compute/create_block.rb +8 -8
- data/lib/fog/brightbox/compute.rb +56 -7
- data/lib/fog/brightbox/models/compute/accounts.rb +29 -0
- data/lib/fog/brightbox/models/compute/api_client.rb +37 -0
- data/lib/fog/brightbox/models/compute/api_clients.rb +24 -0
- data/lib/fog/brightbox/models/compute/application.rb +27 -0
- data/lib/fog/brightbox/models/compute/applications.rb +28 -0
- data/lib/fog/brightbox/models/compute/server.rb +3 -1
- data/lib/fog/brightbox/models/compute/users.rb +1 -3
- data/lib/fog/brightbox/requests/compute/create_application.rb +13 -0
- data/lib/fog/brightbox/requests/compute/create_cloud_ip.rb +2 -2
- data/lib/fog/brightbox/requests/compute/destroy_application.rb +14 -0
- data/lib/fog/brightbox/requests/compute/get_account.rb +28 -4
- data/lib/fog/brightbox/requests/compute/get_application.rb +14 -0
- data/lib/fog/brightbox/requests/compute/get_authenticated_user.rb +19 -0
- data/lib/fog/brightbox/requests/compute/get_scoped_account.rb +19 -0
- data/lib/fog/brightbox/requests/compute/get_user.rb +28 -5
- data/lib/fog/brightbox/requests/compute/list_accounts.rb +13 -0
- data/lib/fog/brightbox/requests/compute/list_applications.rb +13 -0
- data/lib/fog/brightbox/requests/compute/reset_secret_application.rb +14 -0
- data/lib/fog/brightbox/requests/compute/update_account.rb +51 -3
- data/lib/fog/brightbox/requests/compute/update_application.rb +15 -0
- data/lib/fog/brightbox/requests/compute/update_firewall_rule.rb +4 -2
- data/lib/fog/brightbox/requests/compute/update_scoped_account.rb +37 -0
- data/lib/fog/clodo/models/compute/server.rb +7 -44
- data/lib/fog/compute/models/server.rb +23 -2
- data/lib/fog/core/time.rb +2 -0
- data/lib/fog/core/wait_for.rb +0 -2
- data/lib/fog/ecloud/models/compute/servers.rb +3 -1
- data/lib/fog/ecloud/requests/compute/get_servers.rb +1 -1
- data/lib/fog/ecloud/requests/compute/get_tasks.rb +1 -1
- data/lib/fog/go_grid/models/compute/server.rb +0 -4
- data/lib/fog/google/storage.rb +1 -1
- data/lib/fog/hp/models/compute/server.rb +1 -23
- data/lib/fog/hp/storage.rb +0 -1
- data/lib/fog/joyent/models/compute/server.rb +4 -0
- data/lib/fog/joyent/models/compute/servers.rb +4 -3
- data/lib/fog/libvirt/models/compute/server.rb +1 -27
- data/lib/fog/linode/models/compute/server.rb +0 -1
- data/lib/fog/local/models/storage/directory.rb +1 -1
- data/lib/fog/network.rb +26 -0
- data/lib/fog/ninefold/compute.rb +8 -0
- data/lib/fog/ninefold/requests/compute/assign_to_load_balancer_rule.rb +13 -0
- data/lib/fog/ninefold/requests/compute/create_load_balancer_rule.rb +11 -0
- data/lib/fog/ninefold/requests/compute/delete_load_balancer_rule.rb +11 -0
- data/lib/fog/ninefold/requests/compute/list_load_balancer_rule_instances.rb +15 -0
- data/lib/fog/ninefold/requests/compute/list_load_balancer_rules.rb +14 -0
- data/lib/fog/ninefold/requests/compute/remove_from_load_balancer_rule.rb +12 -0
- data/lib/fog/ninefold/requests/compute/update_load_balancer_rule.rb +15 -0
- data/lib/fog/ninefold/storage.rb +14 -112
- data/lib/fog/openstack.rb +4 -1
- data/lib/fog/openstack/compute.rb +20 -1
- data/lib/fog/openstack/identity.rb +67 -18
- data/lib/fog/openstack/image.rb +12 -4
- data/lib/fog/openstack/models/compute/security_group.rb +1 -1
- data/lib/fog/openstack/models/compute/server.rb +5 -23
- data/lib/fog/openstack/models/identity/tenants.rb +5 -3
- data/lib/fog/openstack/models/identity/users.rb +4 -1
- data/lib/fog/openstack/models/image/image.rb +6 -1
- data/lib/fog/openstack/models/network/network.rb +46 -0
- data/lib/fog/openstack/models/network/networks.rb +34 -0
- data/lib/fog/openstack/models/network/port.rb +52 -0
- data/lib/fog/openstack/models/network/ports.rb +34 -0
- data/lib/fog/openstack/models/network/subnet.rb +55 -0
- data/lib/fog/openstack/models/network/subnets.rb +34 -0
- data/lib/fog/openstack/network.rb +234 -0
- data/lib/fog/openstack/requests/compute/attach_volume.rb +10 -0
- data/lib/fog/openstack/requests/compute/create_security_group.rb +15 -11
- data/lib/fog/openstack/requests/compute/create_security_group_rule.rb +17 -15
- data/lib/fog/openstack/requests/compute/create_server.rb +7 -1
- data/lib/fog/openstack/requests/compute/create_volume.rb +10 -10
- data/lib/fog/openstack/requests/compute/create_volume_snapshot.rb +16 -1
- data/lib/fog/openstack/requests/compute/detach_volume.rb +5 -0
- data/lib/fog/openstack/requests/compute/get_snapshot_details.rb +4 -4
- data/lib/fog/openstack/requests/compute/get_volume_details.rb +9 -9
- data/lib/fog/openstack/requests/compute/list_security_groups.rb +3 -3
- data/lib/fog/openstack/requests/compute/list_volumes.rb +14 -14
- data/lib/fog/openstack/requests/identity/create_tenant.rb +3 -3
- data/lib/fog/openstack/requests/identity/create_user.rb +1 -1
- data/lib/fog/openstack/requests/identity/delete_role.rb +1 -1
- data/lib/fog/openstack/requests/identity/get_tenant.rb +1 -1
- data/lib/fog/openstack/requests/identity/list_roles.rb +7 -0
- data/lib/fog/openstack/requests/image/create_image.rb +36 -38
- data/lib/fog/openstack/requests/image/delete_image.rb +0 -2
- data/lib/fog/openstack/requests/image/list_public_images.rb +7 -25
- data/lib/fog/openstack/requests/image/list_public_images_detailed.rb +2 -41
- data/lib/fog/openstack/requests/image/update_image.rb +26 -21
- data/lib/fog/openstack/requests/image/update_image_members.rb +37 -0
- data/lib/fog/openstack/requests/network/create_network.rb +44 -0
- data/lib/fog/openstack/requests/network/create_port.rb +52 -0
- data/lib/fog/openstack/requests/network/create_subnet.rb +56 -0
- data/lib/fog/openstack/requests/network/delete_network.rb +30 -0
- data/lib/fog/openstack/requests/network/delete_port.rb +30 -0
- data/lib/fog/openstack/requests/network/delete_subnet.rb +30 -0
- data/lib/fog/openstack/requests/network/get_network.rb +42 -0
- data/lib/fog/openstack/requests/network/get_port.rb +48 -0
- data/lib/fog/openstack/requests/network/get_subnet.rb +49 -0
- data/lib/fog/openstack/requests/network/list_networks.rb +27 -0
- data/lib/fog/openstack/requests/network/list_ports.rb +27 -0
- data/lib/fog/openstack/requests/network/list_subnets.rb +27 -0
- data/lib/fog/openstack/requests/network/set_tenant.rb +21 -0
- data/lib/fog/openstack/requests/network/update_network.rb +41 -0
- data/lib/fog/openstack/requests/network/update_port.rb +44 -0
- data/lib/fog/openstack/requests/network/update_subnet.rb +44 -0
- data/lib/fog/openstack/requests/volume/create_volume.rb +10 -10
- data/lib/fog/openstack/requests/volume/create_volume_snapshot.rb +16 -1
- data/lib/fog/openstack/requests/volume/get_snapshot_details.rb +6 -6
- data/lib/fog/openstack/requests/volume/get_volume_details.rb +10 -10
- data/lib/fog/openstack/requests/volume/list_volumes.rb +14 -14
- data/lib/fog/openstack/volume.rb +10 -0
- data/lib/fog/rackspace/models/compute/server.rb +1 -24
- data/lib/fog/rackspace/models/compute_v2/server.rb +4 -2
- data/lib/fog/rackspace/requests/compute_v2/create_server.rb +1 -1
- data/lib/fog/rackspace/requests/compute_v2/list_servers.rb +1 -1
- data/lib/fog/storm_on_demand/models/compute/server.rb +1 -5
- data/lib/fog/virtual_box/models/compute/server.rb +2 -44
- data/lib/fog/vmfusion/models/compute/server.rb +3 -36
- data/lib/fog/vsphere/models/compute/server.rb +1 -1
- data/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +2 -31
- data/lib/fog/vsphere/requests/compute/vm_clone.rb +35 -7
- data/tests/aws/models/cdn/distribution_tests.rb +15 -0
- data/tests/aws/models/cdn/distributions_tests.rb +15 -0
- data/tests/aws/models/cdn/invalidation_tests.rb +32 -0
- data/tests/aws/models/cdn/invalidations_tests.rb +15 -0
- data/tests/aws/models/cdn/streaming_distribution_tests.rb +15 -0
- data/tests/aws/models/cdn/streaming_distributions_tests.rb +15 -0
- data/tests/aws/models/rds/tagging_tests.rb +20 -0
- data/tests/aws/requests/auto_scaling/auto_scaling_tests.rb +1 -11
- data/tests/aws/requests/auto_scaling/describe_types_tests.rb +102 -0
- data/tests/aws/requests/auto_scaling/helper.rb +47 -3
- data/tests/aws/requests/auto_scaling/notification_configuration_tests.rb +123 -0
- data/tests/aws/requests/auto_scaling/tag_tests.rb +62 -0
- data/tests/aws/requests/cdn/cdn_tests.rb +252 -0
- data/tests/aws/requests/compute/image_tests.rb +32 -1
- data/tests/aws/requests/compute/volume_tests.rb +3 -3
- data/tests/aws/requests/rds/describe_events.rb +16 -0
- data/tests/aws/requests/rds/helper.rb +26 -0
- data/tests/aws/requests/rds/subnet_groups_test.rb +48 -0
- data/tests/aws/requests/rds/tagging_tests.rb +78 -0
- data/tests/brightbox/requests/compute/account_tests.rb +24 -4
- data/tests/brightbox/requests/compute/application_test.rb +63 -0
- data/tests/brightbox/requests/compute/helper.rb +49 -1
- data/tests/helper.rb +4 -1
- data/tests/local/models/directory_tests.rb +16 -0
- data/tests/ninefold/requests/compute/helper.rb +53 -0
- data/tests/ninefold/requests/compute/load_balancer_tests.rb +66 -0
- data/tests/openstack/models/image/image_tests.rb +1 -0
- data/tests/openstack/models/network/network_tests.rb +24 -0
- data/tests/openstack/models/network/networks_tests.rb +21 -0
- data/tests/openstack/models/network/port_tests.rb +28 -0
- data/tests/openstack/models/network/ports_tests.rb +25 -0
- data/tests/openstack/models/network/subnet_tests.rb +30 -0
- data/tests/openstack/models/network/subnets_tests.rb +27 -0
- data/tests/openstack/requests/compute/image_tests.rb +3 -4
- data/tests/openstack/requests/compute/quota_tests.rb +2 -0
- data/tests/openstack/requests/compute/security_group_tests.rb +10 -10
- data/tests/openstack/requests/compute/server_tests.rb +3 -1
- data/tests/openstack/requests/compute/volume_tests.rb +11 -12
- data/tests/openstack/requests/identity/tenant_tests.rb +2 -1
- data/tests/openstack/requests/image/image_tests.rb +66 -45
- data/tests/openstack/requests/network/network_tests.rb +56 -0
- data/tests/openstack/requests/network/port_tests.rb +63 -0
- data/tests/openstack/requests/network/subnet_tests.rb +66 -0
- data/tests/rackspace/models/identity/user_tests.rb +1 -1
- data/tests/rackspace/models/identity/users_tests.rb +1 -1
- metadata +137 -13
- data/lib/fog/ninefold/models/storage/directories.rb +0 -48
- data/lib/fog/ninefold/models/storage/directory.rb +0 -53
- data/lib/fog/ninefold/models/storage/file.rb +0 -108
- data/lib/fog/ninefold/models/storage/files.rb +0 -73
- data/lib/fog/ninefold/requests/storage/delete_namespace.rb +0 -19
- data/lib/fog/ninefold/requests/storage/get_namespace.rb +0 -20
- data/lib/fog/ninefold/requests/storage/head_namespace.rb +0 -20
- data/lib/fog/ninefold/requests/storage/post_namespace.rb +0 -20
- data/lib/fog/ninefold/requests/storage/put_namespace.rb +0 -20
@@ -11,8 +11,8 @@ module Fog
|
|
11
11
|
# ==== Parameters
|
12
12
|
# * auto_scaling_group_name<~String> - The name of the Auto Scaling
|
13
13
|
# group.
|
14
|
-
# * topic_arn<~String> - The Amazon Resource Name (ARN) of the Amazon
|
15
|
-
#
|
14
|
+
# * topic_arn<~String> - The Amazon Resource Name (ARN) of the Amazon
|
15
|
+
# Simple Notification Service (SNS) topic.
|
16
16
|
#
|
17
17
|
# ==== Returns
|
18
18
|
# * response<~Excon::Response>:
|
@@ -27,7 +27,7 @@ module Fog
|
|
27
27
|
request({
|
28
28
|
'Action' => 'DeleteNotificationConfiguration',
|
29
29
|
'AutoScalingGroupName' => auto_scaling_group_name,
|
30
|
-
'TopicARN'
|
30
|
+
'TopicARN' => topic_arn,
|
31
31
|
:parser => Fog::Parsers::AWS::AutoScaling::Basic.new
|
32
32
|
})
|
33
33
|
end
|
@@ -37,9 +37,25 @@ module Fog
|
|
37
37
|
class Mock
|
38
38
|
|
39
39
|
def delete_notification_configuration(auto_scaling_group_name, topic_arn)
|
40
|
-
|
40
|
+
unless self.data[:notification_configurations].has_key?(auto_scaling_group_name)
|
41
|
+
raise Fog::AWS::AutoScaling::ValidationError.new('AutoScalingGroup name not found - %s' % auto_scaling_group_name)
|
42
|
+
end
|
43
|
+
unless self.data[:notification_configurations][auto_scaling_group_name].has_key?(topic_arn)
|
44
|
+
raise Fog::AWS::AutoScaling::ValidationError.new("Notification Topic '#{topic_arn}' doesn't exist for '#{self.data[:owner_id]}'")
|
45
|
+
end
|
46
|
+
|
47
|
+
self.data[:notification_configurations][auto_scaling_group_name].delete(topic_arn)
|
48
|
+
if self.data[:notification_configurations][auto_scaling_group_name].empty?
|
49
|
+
self.data[:notification_configurations].delete(auto_scaling_group_name)
|
50
|
+
end
|
51
|
+
|
52
|
+
response = Excon::Response.new
|
53
|
+
response.status = 200
|
54
|
+
response.body = {
|
55
|
+
'ResponseMetadata' => { 'RequestId' => Fog::AWS::Mock.request_id }
|
56
|
+
}
|
57
|
+
response
|
41
58
|
end
|
42
|
-
|
43
59
|
end
|
44
60
|
|
45
61
|
end
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
#
|
11
11
|
# ==== Parameters
|
12
12
|
# * auto_scaling_group_name<~String> - The name of the Auto Scaling
|
13
|
-
|
13
|
+
# group.
|
14
14
|
# * policy_name<~String> - The name or PolicyARN of the policy you want
|
15
15
|
# to delete.
|
16
16
|
#
|
@@ -37,7 +37,7 @@ module Fog
|
|
37
37
|
class Mock
|
38
38
|
|
39
39
|
def delete_policy(auto_scaling_group_name, policy_name)
|
40
|
-
unless data[:scaling_policies].delete(policy_name)
|
40
|
+
unless self.data[:scaling_policies].delete(policy_name)
|
41
41
|
raise Fog::AWS::AutoScaling::NotFound, "The scaling policy '#{policy_name}' does not exist."
|
42
42
|
end
|
43
43
|
|
@@ -0,0 +1,63 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class AutoScaling
|
4
|
+
|
5
|
+
class Real
|
6
|
+
|
7
|
+
require 'fog/aws/parsers/auto_scaling/basic'
|
8
|
+
|
9
|
+
# Removes the specified tags or a set of tags from a set of resources.
|
10
|
+
#
|
11
|
+
# ==== Parameters
|
12
|
+
# * tags<~Array>:
|
13
|
+
# * tag<~Hash>:
|
14
|
+
# * Key<~String> - The key of the tag.
|
15
|
+
# * PropagateAtLaunch<~Boolean> - Specifies whether the new tag
|
16
|
+
# will be applied to instances launched after the tag is created.
|
17
|
+
# The same behavior applies to updates: If you change a tag, the
|
18
|
+
# changed tag will be applied to all instances launched after you
|
19
|
+
# made the change.
|
20
|
+
# * ResourceId<~String> - The name of the Auto Scaling group.
|
21
|
+
# * ResourceType<~String> - The kind of resource to which the tag
|
22
|
+
# is applied. Currently, Auto Scaling supports the
|
23
|
+
# auto-scaling-group resource type.
|
24
|
+
# * Value<~String> - The value of the tag.
|
25
|
+
#
|
26
|
+
# ==== Returns
|
27
|
+
# * response<~Excon::Response>:
|
28
|
+
# * body<~Hash>:
|
29
|
+
# * 'ResponseMetadata'<~Hash>:
|
30
|
+
# * 'RequestId'<~String> - Id of request
|
31
|
+
#
|
32
|
+
# ==== See Also
|
33
|
+
# http://docs.amazonwebservices.com/AutoScaling/latest/APIReference/API_DeleteTags.html
|
34
|
+
#
|
35
|
+
def delete_tags(tags)
|
36
|
+
params = {}
|
37
|
+
tags.each_with_index do |tag, i|
|
38
|
+
tag.each do |key, value|
|
39
|
+
params["Tags.member.#{i+1}.#{key}"] = value unless value.nil?
|
40
|
+
end
|
41
|
+
end
|
42
|
+
request({
|
43
|
+
'Action' => 'DeleteTags',
|
44
|
+
:parser => Fog::Parsers::AWS::AutoScaling::Basic.new
|
45
|
+
}.merge!(params))
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
class Mock
|
51
|
+
|
52
|
+
def delete_tags(tags)
|
53
|
+
if tags.to_a.empty?
|
54
|
+
raise Fog::AWS::AutoScaling::ValidationError.new("1 validation error detected: Value null at 'tags' failed to satisfy constraint: Member must not be null")
|
55
|
+
end
|
56
|
+
raise Fog::Mock::NotImplementedError
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -23,8 +23,9 @@ module Fog
|
|
23
23
|
#
|
24
24
|
def describe_adjustment_types()
|
25
25
|
request({
|
26
|
-
'Action'
|
27
|
-
:
|
26
|
+
'Action' => 'DescribeAdjustmentTypes',
|
27
|
+
:idempotent => true,
|
28
|
+
:parser => Fog::Parsers::AWS::AutoScaling::DescribeAdjustmentTypes.new
|
28
29
|
})
|
29
30
|
end
|
30
31
|
|
@@ -34,7 +35,7 @@ module Fog
|
|
34
35
|
|
35
36
|
def describe_adjustment_types()
|
36
37
|
results = { 'AdjustmentTypes' => [] }
|
37
|
-
data[:adjustment_types].each do |adjustment_type|
|
38
|
+
self.data[:adjustment_types].each do |adjustment_type|
|
38
39
|
results['AdjustmentTypes'] << { 'AdjustmentType' => adjustment_type }
|
39
40
|
end
|
40
41
|
response = Excon::Response.new
|
@@ -20,8 +20,8 @@ module Fog
|
|
20
20
|
# * 'AutoScalingGroupNames'<~Array> - A list of Auto Scaling group
|
21
21
|
# names.
|
22
22
|
# * 'MaxRecords'<~Integer> - The maximum number of records to return.
|
23
|
-
# * 'NextToken'<~String> -
|
24
|
-
#
|
23
|
+
# * 'NextToken'<~String> - A string that marks the start of the next
|
24
|
+
# batch of returned results.
|
25
25
|
#
|
26
26
|
# ==== Returns
|
27
27
|
# * response<~Excon::Response>:
|
@@ -39,11 +39,11 @@ module Fog
|
|
39
39
|
# availability zones for the group.
|
40
40
|
# * 'CreatedTime'<~Time> - Specifies the date and time the
|
41
41
|
# Auto Scaling group was created.
|
42
|
-
# * 'DefaultCooldown'<~Integer> - The
|
42
|
+
# * 'DefaultCooldown'<~Integer> - The number of seconds after
|
43
43
|
# a scaling activity completes before any further scaling
|
44
44
|
# activities can start.
|
45
45
|
# * 'DesiredCapacity'<~Integer> - Specifies the desired
|
46
|
-
# capacity of the
|
46
|
+
# capacity of the Auto Scaling group.
|
47
47
|
# * 'EnabledMetrics'<~Array>:
|
48
48
|
# * enabledmetric<~Hash>:
|
49
49
|
# * 'Granularity'<~String> - The granularity of the
|
@@ -71,8 +71,10 @@ module Fog
|
|
71
71
|
# of the associated launch configuration.
|
72
72
|
# * 'LoadBalancerNames'<~Array> - A list of load balancers
|
73
73
|
# associated with this Auto Scaling group.
|
74
|
-
# * 'MaxSize'<~Integer> - The maximum size of the
|
75
|
-
#
|
74
|
+
# * 'MaxSize'<~Integer> - The maximum size of the Auto
|
75
|
+
# Scaling group.
|
76
|
+
# * 'MinSize'<~Integer> - The minimum size of the Auto
|
77
|
+
# Scaling group.
|
76
78
|
# * 'PlacementGroup'<~String> - The name of the cluster
|
77
79
|
# placement group, if applicable.
|
78
80
|
# * 'SuspendedProcesses'<~Array>:
|
@@ -81,12 +83,14 @@ module Fog
|
|
81
83
|
# process.
|
82
84
|
# * 'SuspensionReason'<~String> - The reason that the
|
83
85
|
# process was suspended.
|
84
|
-
# * '
|
85
|
-
#
|
86
|
-
#
|
87
|
-
#
|
88
|
-
#
|
89
|
-
#
|
86
|
+
# * 'TerminationPolicies'<~Array> - A standalone termination
|
87
|
+
# policy or a list of termination policies for this Auto
|
88
|
+
# Scaling group.
|
89
|
+
# * 'VPCZoneIdentifier'<~String> - The subnet identifier for
|
90
|
+
# the Amazon VPC connection, if applicable. You can specify
|
91
|
+
# several subnets in a comma-separated list.
|
92
|
+
# * 'NextToken'<~String> - A string that marks the start of the
|
93
|
+
# next batch of returned results.
|
90
94
|
#
|
91
95
|
# ==== See Also
|
92
96
|
# http://docs.amazonwebservices.com/AutoScaling/latest/APIReference/API_DescribeAutoScalingGroups.html
|
@@ -107,7 +111,7 @@ module Fog
|
|
107
111
|
|
108
112
|
def describe_auto_scaling_groups(options = {})
|
109
113
|
results = { 'AutoScalingGroups' => [] }
|
110
|
-
data[:auto_scaling_groups].each do |asg_name, asg_data|
|
114
|
+
self.data[:auto_scaling_groups].each do |asg_name, asg_data|
|
111
115
|
results['AutoScalingGroups'] << {
|
112
116
|
'AutoScalingGroupName' => asg_name
|
113
117
|
}.merge!(asg_data)
|
@@ -72,7 +72,7 @@ module Fog
|
|
72
72
|
|
73
73
|
def describe_auto_scaling_instances(options = {})
|
74
74
|
results = { 'AutoScalingInstances' => [] }
|
75
|
-
data[:auto_scaling_groups].each do |asg_name, asg_data|
|
75
|
+
self.data[:auto_scaling_groups].each do |asg_name, asg_data|
|
76
76
|
asg_data['Instances'].each do |instance|
|
77
77
|
results['AutoScalingInstances'] << {
|
78
78
|
'AutoScalingGroupName' => asg_name
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class AutoScaling
|
4
|
+
|
5
|
+
class Real
|
6
|
+
|
7
|
+
require 'fog/aws/parsers/auto_scaling/describe_auto_scaling_notification_types'
|
8
|
+
|
9
|
+
# Returns a list of all notification types that are supported by Auto
|
10
|
+
# Scaling.
|
11
|
+
#
|
12
|
+
# ==== Returns
|
13
|
+
# * response<~Excon::Response>:
|
14
|
+
# * body<~Hash>:
|
15
|
+
# * 'ResponseMetadata'<~Hash>:
|
16
|
+
# * 'RequestId'<~String> - Id of request
|
17
|
+
# * 'DescribeAutoScalingNotificationTypesResult'<~Hash>:
|
18
|
+
# * 'AutoScalingNotificationTypes'<~Array>:
|
19
|
+
# * 'notificationType'<~String> - A notification type.
|
20
|
+
#
|
21
|
+
# ==== See Also
|
22
|
+
# http://docs.amazonwebservices.com/AutoScaling/latest/APIReference/API_DescribeAutoScalingNotificationTypes.html
|
23
|
+
#
|
24
|
+
def describe_auto_scaling_notification_types()
|
25
|
+
request({
|
26
|
+
'Action' => 'DescribeAutoScalingNotificationTypes',
|
27
|
+
:idempotent => true,
|
28
|
+
:parser => Fog::Parsers::AWS::AutoScaling::DescribeAutoScalingNotificationTypes.new
|
29
|
+
})
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
class Mock
|
35
|
+
|
36
|
+
def describe_auto_scaling_notification_types()
|
37
|
+
results = {
|
38
|
+
'AutoScalingNotificationTypes' => [],
|
39
|
+
}
|
40
|
+
self.data[:notification_types].each do |notification_type|
|
41
|
+
results['AutoScalingNotificationTypes'] << notification_type
|
42
|
+
end
|
43
|
+
response = Excon::Response.new
|
44
|
+
response.status = 200
|
45
|
+
response.body = {
|
46
|
+
'DescribeAutoScalingNotificationTypesResult' => results,
|
47
|
+
'ResponseMetadata' => { 'RequestId' => Fog::AWS::Mock.request_id }
|
48
|
+
}
|
49
|
+
response
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -21,12 +21,13 @@ module Fog
|
|
21
21
|
# * 'Metric'<~String> - The name of a Metric.
|
22
22
|
#
|
23
23
|
# ==== See Also
|
24
|
-
# http://docs.amazonwebservices.com/AutoScaling/latest/APIReference/
|
24
|
+
# http://docs.amazonwebservices.com/AutoScaling/latest/APIReference/API_DescribeMetricCollectionTypes.html
|
25
25
|
#
|
26
26
|
def describe_metric_collection_types()
|
27
27
|
request({
|
28
|
-
'Action'
|
29
|
-
:
|
28
|
+
'Action' => 'DescribeMetricCollectionTypes',
|
29
|
+
:idempotent => true,
|
30
|
+
:parser => Fog::Parsers::AWS::AutoScaling::DescribeMetricCollectionTypes.new
|
30
31
|
})
|
31
32
|
end
|
32
33
|
|
@@ -39,10 +40,10 @@ module Fog
|
|
39
40
|
'Granularities' => [],
|
40
41
|
'Metrics' => []
|
41
42
|
}
|
42
|
-
data[:metric_collection_types][:granularities].each do |granularity|
|
43
|
+
self.data[:metric_collection_types][:granularities].each do |granularity|
|
43
44
|
results['Granularities'] << { 'Granularity' => granularity }
|
44
45
|
end
|
45
|
-
data[:metric_collection_types][:metrics].each do |metric|
|
46
|
+
self.data[:metric_collection_types][:metrics].each do |metric|
|
46
47
|
results['Metrics'] << { 'Metric' => metric }
|
47
48
|
end
|
48
49
|
response = Excon::Response.new
|
@@ -0,0 +1,79 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class AutoScaling
|
4
|
+
|
5
|
+
class Real
|
6
|
+
|
7
|
+
require 'fog/aws/parsers/auto_scaling/describe_notification_configurations'
|
8
|
+
|
9
|
+
# Returns a list of notification actions associated with Auto Scaling
|
10
|
+
# groups for specified events.
|
11
|
+
#
|
12
|
+
# ==== Parameters
|
13
|
+
# * options<~Hash>:
|
14
|
+
# * 'AutoScalingGroupsName'<~String> - The name of the Auto Scaling
|
15
|
+
# group.
|
16
|
+
# * 'MaxRecords'<~Integer> - The maximum number of records to return.
|
17
|
+
# * 'NextToken'<~String> - A string that is used to mark the start of
|
18
|
+
# the next batch of returned results for pagination.
|
19
|
+
#
|
20
|
+
# ==== Returns
|
21
|
+
# * response<~Excon::Response>:
|
22
|
+
# * body<~Hash>:
|
23
|
+
# * 'ResponseMetadata'<~Hash>:
|
24
|
+
# * 'RequestId'<~String> - Id of request
|
25
|
+
# * 'DescribeNotificationConfigurationsResult'<~Hash>:
|
26
|
+
# * 'NotificationConfigurations'<~Array>:
|
27
|
+
# * notificationConfiguration<~Hash>:
|
28
|
+
# * 'AutoScalingGroupName'<~String> - Specifies the Auto
|
29
|
+
# Scaling group name.
|
30
|
+
# * 'NotificationType'<~String> - The types of events for an
|
31
|
+
# action to start.
|
32
|
+
# * 'TopicARN'<~String> - The Amazon Resource Name (ARN) of the
|
33
|
+
# Amazon Simple Notification Service (SNS) topic.
|
34
|
+
#
|
35
|
+
# ==== See Also
|
36
|
+
# http://docs.amazonwebservices.com/AutoScaling/latest/APIReference/API_DescribeNotificationConfigurations.html
|
37
|
+
#
|
38
|
+
def describe_notification_configurations(options = {})
|
39
|
+
if auto_scaling_group_names = options.delete('AutoScalingGroupNames')
|
40
|
+
options.merge!(AWS.indexed_param('AutoScalingGroupNames.member.%d', [*auto_scaling_group_names]))
|
41
|
+
end
|
42
|
+
request({
|
43
|
+
'Action' => 'DescribeNotificationConfigurations',
|
44
|
+
:parser => Fog::Parsers::AWS::AutoScaling::DescribeNotificationConfigurations.new
|
45
|
+
}.merge!(options))
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
class Mock
|
51
|
+
|
52
|
+
def describe_notification_configurations(options = {})
|
53
|
+
results = { 'NotificationConfigurations' => [] }
|
54
|
+
(options['AutoScalingGroupNames']||self.data[:notification_configurations].keys).each do |asg_name|
|
55
|
+
(self.data[:notification_configurations][asg_name]||{}).each do |topic_arn, notification_types|
|
56
|
+
notification_types.each do |notification_type|
|
57
|
+
results['NotificationConfigurations'] << {
|
58
|
+
'AutoScalingGroupName' => asg_name,
|
59
|
+
'NotificationType' => notification_type,
|
60
|
+
'TopicARN' => topic_arn,
|
61
|
+
}
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
response = Excon::Response.new
|
67
|
+
response.status = 200
|
68
|
+
response.body = {
|
69
|
+
'DescribeNotificationConfigurationsResult' => results,
|
70
|
+
'ResponseMetadata' => { 'RequestId' => Fog::AWS::Mock.request_id }
|
71
|
+
}
|
72
|
+
response
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -76,7 +76,7 @@ module Fog
|
|
76
76
|
|
77
77
|
def describe_policies(options = {})
|
78
78
|
results = { 'ScalingPolicies' => [] }
|
79
|
-
data[:scaling_policies].each do |asp_name, asp_data|
|
79
|
+
self.data[:scaling_policies].each do |asp_name, asp_data|
|
80
80
|
results['ScalingPolicies'] << {
|
81
81
|
'PolicyName' => asp_name
|
82
82
|
}.merge!(asp_data)
|
@@ -24,8 +24,9 @@ module Fog
|
|
24
24
|
#
|
25
25
|
def describe_scaling_process_types()
|
26
26
|
request({
|
27
|
-
'Action'
|
28
|
-
:
|
27
|
+
'Action' => 'DescribeScalingProcessTypes',
|
28
|
+
:idempotent => true,
|
29
|
+
:parser => Fog::Parsers::AWS::AutoScaling::DescribeScalingProcessTypes.new
|
29
30
|
})
|
30
31
|
end
|
31
32
|
|
@@ -35,7 +36,7 @@ module Fog
|
|
35
36
|
|
36
37
|
def describe_scaling_process_types()
|
37
38
|
results = { 'Processes' => [] }
|
38
|
-
data[:process_types].each do |process_type|
|
39
|
+
self.data[:process_types].each do |process_type|
|
39
40
|
results['Processes'] << { 'ProcessName' => process_type }
|
40
41
|
end
|
41
42
|
response = Excon::Response.new
|
@@ -0,0 +1,74 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class AutoScaling
|
4
|
+
|
5
|
+
class Real
|
6
|
+
|
7
|
+
require 'fog/aws/parsers/auto_scaling/describe_tags'
|
8
|
+
|
9
|
+
# Lists the Auto Scaling group tags.
|
10
|
+
#
|
11
|
+
# ==== Parameters
|
12
|
+
# * options<~Hash>:
|
13
|
+
# * tag<~Hash>:
|
14
|
+
# * Key<~String> - The key of the tag.
|
15
|
+
# * PropagateAtLaunch<~Boolean> - Specifies whether the new tag
|
16
|
+
# will be applied to instances launched after the tag is created.
|
17
|
+
# The same behavior applies to updates: If you change a tag,
|
18
|
+
# changed tag will be applied to all instances launched after you
|
19
|
+
# made the change.
|
20
|
+
# * ResourceId<~String> - The name of the Auto Scaling group.
|
21
|
+
# * ResourceType<~String> - The kind of resource to which the tag
|
22
|
+
# is applied. Currently, Auto Scaling supports the
|
23
|
+
# auto-scaling-group resource type.
|
24
|
+
# * Value<~String> - The value of the tag.
|
25
|
+
#
|
26
|
+
# ==== Returns
|
27
|
+
# * response<~Excon::Response>:
|
28
|
+
# * body<~Hash>:
|
29
|
+
# * 'ResponseMetadata'<~Hash>:
|
30
|
+
# * 'RequestId'<~String> - Id of request
|
31
|
+
# * 'DescribeTagsResult'<~Hash>:
|
32
|
+
# * 'NextToken'<~String> - A string used to mark the start of the
|
33
|
+
# next batch of returned results.
|
34
|
+
# * 'Tags'<~Hash>:
|
35
|
+
# * tagDescription<~Hash>:
|
36
|
+
# * 'Key'<~String> - The key of the tag.
|
37
|
+
# * 'PropagateAtLaunch'<~Boolean> - Specifies whether the new
|
38
|
+
# tag will be applied to instances launched after the tag
|
39
|
+
# is created. The same behavior applies to updates: If you
|
40
|
+
# change a tag, the changed tag will be applied to all
|
41
|
+
# instances launched after you made the change.
|
42
|
+
# * 'ResourceId'<~String> - The name of the Auto Scaling
|
43
|
+
# group.
|
44
|
+
# * 'ResourceType'<~String> - The kind of resource to which
|
45
|
+
# the tag is applied. Currently, Auto Scaling supports the
|
46
|
+
# auto-scaling-group resource type.
|
47
|
+
# * 'Value'<~String> - The value of the tag.
|
48
|
+
#
|
49
|
+
# ==== See Also
|
50
|
+
# http://docs.amazonwebservices.com/AutoScaling/latest/APIReference/API_DescribeTags.html
|
51
|
+
#
|
52
|
+
def describe_tags(options={})
|
53
|
+
if filters = options.delete('Filters')
|
54
|
+
options.merge!(Fog::AWS.indexed_filters(filters))
|
55
|
+
end
|
56
|
+
request({
|
57
|
+
'Action' => 'DescribeTags',
|
58
|
+
:parser => Fog::Parsers::AWS::AutoScaling::DescribeTags.new
|
59
|
+
}.merge!(options))
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
|
64
|
+
class Mock
|
65
|
+
|
66
|
+
def describe_tags(options={})
|
67
|
+
raise Fog::Mock::NotImplementedError
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|