brightbox-cli 0.14.1 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +7 -0
- data/bin/brightbox-firewall-policies +14 -0
- data/bin/brightbox-firewall-rules +14 -0
- data/bin/brightbox-groups +14 -0
- data/lib/brightbox-cli/api.rb +2 -1
- data/lib/brightbox-cli/cloud_ips.rb +2 -2
- data/lib/brightbox-cli/command_generator.rb +3 -0
- data/lib/brightbox-cli/commands/cloudips-update.rb +2 -2
- data/lib/brightbox-cli/commands/config-client-list.rb +1 -1
- data/lib/brightbox-cli/commands/firewall-policies-apply.rb +31 -0
- data/lib/brightbox-cli/commands/firewall-policies-create.rb +39 -0
- data/lib/brightbox-cli/commands/firewall-policies-destroy.rb +24 -0
- data/lib/brightbox-cli/commands/firewall-policies-list.rb +17 -0
- data/lib/brightbox-cli/commands/firewall-policies-remove.rb +31 -0
- data/lib/brightbox-cli/commands/firewall-policies-show.rb +19 -0
- data/lib/brightbox-cli/commands/firewall-rules-create.rb +51 -0
- data/lib/brightbox-cli/commands/firewall-rules-destroy.rb +24 -0
- data/lib/brightbox-cli/commands/firewall-rules-list.rb +19 -0
- data/lib/brightbox-cli/commands/firewall-rules-show.rb +22 -0
- data/lib/brightbox-cli/commands/groups-add-server.rb +23 -0
- data/lib/brightbox-cli/commands/groups-create.rb +22 -0
- data/lib/brightbox-cli/commands/groups-destroy.rb +23 -0
- data/lib/brightbox-cli/commands/groups-list.rb +16 -0
- data/lib/brightbox-cli/commands/groups-move_servers.rb +39 -0
- data/lib/brightbox-cli/commands/groups-remove-servers.rb +35 -0
- data/lib/brightbox-cli/commands/groups-show.rb +14 -0
- data/lib/brightbox-cli/commands/groups-update.rb +38 -0
- data/lib/brightbox-cli/commands/images-register.rb +11 -3
- data/lib/brightbox-cli/commands/images-update.rb +4 -0
- data/lib/brightbox-cli/commands/servers-create.rb +19 -8
- data/lib/brightbox-cli/commands/servers-list.rb +0 -3
- data/lib/brightbox-cli/commands/servers-show.rb +3 -39
- data/lib/brightbox-cli/commands/servers-stop.rb +1 -1
- data/lib/brightbox-cli/detailed_server.rb +43 -0
- data/lib/brightbox-cli/detailed_server_group.rb +13 -0
- data/lib/brightbox-cli/firewall_policy.rb +32 -0
- data/lib/brightbox-cli/firewall_rule.rb +39 -0
- data/lib/brightbox-cli/firewall_rules.rb +26 -0
- data/lib/brightbox-cli/images.rb +2 -1
- data/lib/brightbox-cli/server_groups.rb +64 -0
- data/lib/brightbox-cli/servers.rb +5 -13
- data/lib/brightbox-cli/vendor/fog/Rakefile +17 -2
- data/lib/brightbox-cli/vendor/fog/changelog.txt +434 -0
- data/lib/brightbox-cli/vendor/fog/docs/_layouts/default.html +12 -12
- data/lib/brightbox-cli/vendor/fog/docs/about/getting_started.markdown +2 -2
- data/lib/brightbox-cli/vendor/fog/docs/dns/index.markdown +3 -3
- data/lib/brightbox-cli/vendor/fog/docs/index.markdown +1 -1
- data/lib/brightbox-cli/vendor/fog/docs/public/css/fog.css +14 -1
- data/lib/brightbox-cli/vendor/fog/docs/public/images/engineyard.png +0 -0
- data/lib/brightbox-cli/vendor/fog/docs/public/images/fog.png +0 -0
- data/lib/brightbox-cli/vendor/fog/fog.gemspec +4 -4
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/cloud_watch.rb +14 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/compute.rb +50 -19
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/elasticache.rb +127 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/cloud_watch/alarm.rb +12 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/cloud_watch/alarm_data.rb +39 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/cloud_watch/alarm_datum.rb +66 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/cloud_watch/alarm_histories.rb +18 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/cloud_watch/alarm_history.rb +16 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/cloud_watch/alarms.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/servers.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elasticache/cluster.rb +69 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elasticache/clusters.rb +31 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elasticache/parameter_group.rb +32 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elasticache/parameter_groups.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elasticache/security_group.rb +52 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elasticache/security_groups.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/delete_alarms.rb +26 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/describe_alarm_history.rb +40 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/describe_alarms.rb +73 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/describe_alarms_for_metric.rb +71 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/disable_alarm_actions.rb +26 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/enable_alarm_actions.rb +26 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/get_metric_statistics.rb +1 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/put_metric_alarm.rb +26 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/set_alarm_state.rb +26 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/compute/spot_instance_requests.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/{aws → dns}/change_resource_record_sets.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/{aws → dns}/create_hosted_zone.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/{aws → dns}/delete_hosted_zone.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/{aws → dns}/get_change.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/{aws → dns}/get_hosted_zone.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/{aws → dns}/list_hosted_zones.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/{aws → dns}/list_resource_record_sets.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/authorize_cache_security_group_ingress.rb +26 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/base.rb +34 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/cache_cluster_parser.rb +79 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/describe_cache_clusters.rb +27 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/describe_cache_parameters.rb +22 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/describe_engine_default_parameters.rb +22 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/describe_parameter_groups.rb +27 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/describe_security_groups.rb +27 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/engine_defaults_parser.rb +59 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/event_list.rb +38 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/modify_parameter_group.rb +27 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/parameter_group_parser.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/reset_parameter_group.rb +27 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/security_group_parser.rb +40 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/single_cache_cluster.rb +22 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/single_parameter_group.rb +22 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/single_security_group.rb +34 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_watch/delete_alarms.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_watch/describe_alarm_history.rb +33 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_watch/describe_alarms.rb +38 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb +39 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_watch/disable_alarm_actions.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_watch/enable_alarm_actions.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_watch/put_metric_alarm.rb +84 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_watch/set_alarm_state.rb +31 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/create_security_group.rb +5 -4
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/create_snapshot.rb +2 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/create_tags.rb +5 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/create_volume.rb +0 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/delete_tags.rb +2 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_images.rb +5 -8
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_instances.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_snapshots.rb +3 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_volumes.rb +3 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/modify_image_attribute.rb +32 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/purchase_reserved_instances_offering.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/register_image.rb +0 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/run_instances.rb +1 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/authorize_cache_security_group_ingress.rb +36 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/create_cache_cluster.rb +62 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/create_cache_parameter_group.rb +37 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/create_cache_security_group.rb +33 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/delete_cache_cluster.rb +32 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/delete_cache_parameter_group.rb +31 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/delete_cache_security_group.rb +31 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/describe_cache_clusters.rb +39 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb +34 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/describe_cache_parameters.rb +36 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/describe_cache_security_groups.rb +34 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/describe_engine_default_parameters.rb +35 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/describe_events.rb +46 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/modify_cache_cluster.rb +70 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/modify_cache_parameter_group.rb +45 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/reboot_cache_cluster.rb +44 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/reset_cache_parameter_group.rb +46 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/revoke_cache_security_group_ingress.rb +37 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/create_load_balancer.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/create_load_balancer_listeners.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/describe_instance_health.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/get_server_certificate.rb +5 -7
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/list_server_certificates.rb +3 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/upload_server_certificate.rb +3 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/change_message_visibility.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/create_queue.rb +35 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/delete_message.rb +29 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/delete_queue.rb +24 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/get_queue_attributes.rb +22 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/list_queues.rb +15 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/receive_message.rb +55 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/send_message.rb +39 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/set_queue_attributes.rb +19 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/copy_object.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_object_acl.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/hash_to_acl.rb +2 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/sqs.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/storage.rb +2 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws.rb +17 -14
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/aws.rb +4 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/openstack.rb +31 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin.rb +1 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/bluebox/models/compute/server.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bluebox/requests/compute/create_template.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bluebox.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/compute.rb +5 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/account.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/firewall_policies.rb +29 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/firewall_policy.rb +65 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/firewall_rule.rb +54 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/firewall_rules.rb +24 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/image.rb +2 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/server.rb +27 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/server_group.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/requests/compute/remove_firewall_policy.rb +14 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/compute/models/server.rb +1 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/compute.rb +3 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/core/attributes.rb +5 -5
- data/lib/brightbox-cli/vendor/fog/lib/fog/core/credentials.rb +5 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/core/errors.rb +4 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/core/provider.rb +9 -4
- data/lib/brightbox-cli/vendor/fog/lib/fog/dnsimple.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/dnsmadeeasy.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/dynect.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/compute.rb +1 -5
- data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/glesys/compute.rb +20 -4
- data/lib/brightbox-cli/vendor/fog/lib/fog/glesys/models/compute/templates.rb +0 -6
- data/lib/brightbox-cli/vendor/fog/lib/fog/glesys.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/go_grid.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/google.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/server.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/uri.rb +7 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode/models/compute/server.rb +10 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode/{models/dns/linode → requests/dns}/domain_create.rb +3 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode/{models/dns/linode → requests/dns}/domain_delete.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode/{models/dns/linode → requests/dns}/domain_list.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode/{models/dns/linode → requests/dns}/domain_resource_create.rb +8 -8
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode/{models/dns/linode → requests/dns}/domain_resource_delete.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode/{models/dns/linode → requests/dns}/domain_resource_list.rb +8 -8
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode/{models/dns/linode → requests/dns}/domain_resource_update.rb +9 -9
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode/{models/dns/linode → requests/dns}/domain_update.rb +5 -5
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/local/models/storage/directories.rb +33 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/local/models/storage/directory.rb +57 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/local/models/storage/file.rb +113 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/local/models/storage/files.rb +87 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/local/storage.rb +71 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/local.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/new_servers.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/ninefold/compute.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/ninefold/models/compute/server.rb +2 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/ninefold.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/compute.rb +198 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/compute/flavor.rb +20 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/compute/flavors.rb +28 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/compute/image.rb +57 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/compute/images.rb +33 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/compute/meta.rb +29 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/compute/metadata.rb +69 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/compute/server.rb +195 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/compute/servers.rb +36 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/meta_parent.rb +33 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/change_password_server.rb +24 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/confirm_resized_server.rb +24 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/create_image.rb +49 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/create_server.rb +75 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/delete_image.rb +40 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/delete_meta.rb +28 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/delete_server.rb +38 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/get_flavor_details.rb +43 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/get_image_details.rb +33 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/get_meta.rb +29 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/get_server_details.rb +32 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_addresses.rb +32 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_flavors.rb +38 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_flavors_detail.rb +38 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_images.rb +33 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_images_detail.rb +39 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_metadata.rb +28 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_private_addresses.rb +32 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_public_addresses.rb +32 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_servers.rb +33 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_servers_detail.rb +39 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/reboot_server.rb +24 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/rebuild_server.rb +31 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/resize_server.rb +24 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/revert_resized_server.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/server_action.rb +18 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/set_metadata.rb +45 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/update_meta.rb +45 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/update_metadata.rb +46 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/update_server.rb +35 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack.rb +113 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/providers.rb +1 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/dns.rb +25 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/dns/callback.rb +3 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace.rb +5 -5
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/{parsers/dns/slicehost → requests/dns}/create_record.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/{parsers/dns/slicehost → requests/dns}/create_zone.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/{parsers/dns/slicehost → requests/dns}/delete_record.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/{parsers/dns/slicehost → requests/dns}/delete_zone.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/{parsers/dns/slicehost → requests/dns}/get_record.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/{parsers/dns/slicehost → requests/dns}/get_records.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/{parsers/dns/slicehost → requests/dns}/get_zone.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/{parsers/dns/slicehost → requests/dns}/get_zones.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/virtual_box.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/vmfusion/models/compute/servers.rb +6 -6
- data/lib/brightbox-cli/vendor/fog/lib/fog/vmfusion.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/voxel.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/compute.rb +0 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/dns.rb +14 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/models/dns/record.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/models/dns/records.rb +5 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/models/dns/zones.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/count_hosts.rb +20 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/count_zones.rb +12 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/create_host.rb +67 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/create_zone.rb +44 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/delete_host.rb +19 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/delete_zone.rb +17 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/find_hosts.rb +22 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/get_host.rb +18 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/get_zone.rb +19 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/get_zone_stats.rb +23 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/list_hosts.rb +20 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/list_zones.rb +15 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/update_host.rb +20 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/update_zone.rb +20 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/tests/aws/models/cloud_watch/alarm_data_tests.rb +40 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/models/cloud_watch/alarm_history_tests.rb +20 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/models/compute/server_tests.rb +2 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/models/elasticache/cluster_tests.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/models/elasticache/parameter_groups_tests.rb +17 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/models/elasticache/security_groups_tests.rb +52 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/models/elb/model_tests.rb +2 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/cloud_watch/list_metrics_test.rb +5 -5
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/compute/image_tests.rb +33 -2
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/compute/tag_tests.rb +40 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/elasticache/cache_cluster_tests.rb +137 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/elasticache/describe_events.rb +17 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/elasticache/helper.rb +68 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/elasticache/parameter_group_tests.rb +105 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/elasticache/security_group_tests.rb +107 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/iam/server_certificate_tests.rb +39 -18
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/simpledb/attributes_tests.rb +18 -18
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/simpledb/domain_tests.rb +7 -7
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/sqs/message_tests.rb +1 -7
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/sqs/queue_tests.rb +0 -5
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/load_balancer_tests.rb +1 -0
- data/lib/brightbox-cli/vendor/fog/tests/compute/models/flavors_tests.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/tests/core/attribute_tests.rb +29 -0
- data/lib/brightbox-cli/vendor/fog/tests/core/credential_tests.rb +2 -0
- data/lib/brightbox-cli/vendor/fog/tests/helper.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/tests/helpers/collection_helper.rb +5 -0
- data/lib/brightbox-cli/vendor/fog/tests/helpers/compute/server_helper.rb +1 -0
- data/lib/brightbox-cli/vendor/fog/tests/helpers/formats_helper.rb +16 -8
- data/lib/brightbox-cli/vendor/fog/tests/helpers/formats_helper_tests.rb +8 -0
- data/lib/brightbox-cli/vendor/fog/tests/helpers/mock_helper.rb +6 -2
- data/lib/brightbox-cli/vendor/fog/tests/linode/requests/compute/linodeplans_tests.rb +2 -1
- data/lib/brightbox-cli/vendor/fog/tests/ninefold/requests/compute/helper.rb +14 -17
- data/lib/brightbox-cli/vendor/fog/tests/openstack/requests/compute/flavor_tests.rb +35 -0
- data/lib/brightbox-cli/vendor/fog/tests/openstack/requests/compute/helper.rb +17 -0
- data/lib/brightbox-cli/vendor/fog/tests/openstack/requests/compute/image_tests.rb +59 -0
- data/lib/brightbox-cli/vendor/fog/tests/openstack/requests/compute/server_tests.rb +142 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/dns/dns_tests.rb +21 -21
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/dns/helper.rb +17 -9
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/dns/records_tests.rb +16 -16
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{access_list_tests.rb → load_balancers/access_list_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{algorithm_tests.rb → load_balancers/algorithm_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{connection_logging_tests.rb → load_balancers/connection_logging_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{connection_throttling_tests.rb → load_balancers/connection_throttling_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{helper.rb → load_balancers/helper.rb} +12 -1
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{load_balancer_tests.rb → load_balancers/load_balancer_tests.rb} +1 -1
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{load_balancer_usage_tests.rb → load_balancers/load_balancer_usage_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{monitor_tests.rb → load_balancers/monitor_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{node_tests.rb → load_balancers/node_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{protocol_tests.rb → load_balancers/protocol_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{session_persistence_tests.rb → load_balancers/session_persistence_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{usage_tests.rb → load_balancers/usage_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{virtual_ip_tests.rb → load_balancers/virtual_ip_tests.rb} +2 -2
- data/lib/brightbox-cli/vendor/fog/tests/vsphere/requests/compute/vm_clone_tests.rb +2 -1
- data/lib/brightbox-cli/version.rb +1 -1
- data/lib/brightbox_cli.rb +16 -10
- data/spec/cloud_ips_spec.rb +17 -0
- data/spec/firewall_policy_spec.rb +78 -0
- data/spec/firewall_rule_spec.rb +74 -0
- data/spec/fixtures/vcr_cassettes/apply_firewall_policy.yml +137 -0
- data/spec/fixtures/vcr_cassettes/create_firewall_policy.yml +104 -0
- data/spec/fixtures/vcr_cassettes/destroy_firewall_policy.yml +137 -0
- data/spec/fixtures/vcr_cassettes/firewall_rule.yml +36 -0
- data/spec/fixtures/vcr_cassettes/firewall_rule_create.yml +36 -0
- data/spec/fixtures/vcr_cassettes/firewall_rule_destroy.yml +69 -0
- data/spec/fixtures/vcr_cassettes/firewall_rule_list.yml +36 -0
- data/spec/fixtures/vcr_cassettes/firewall_rule_show.yml +36 -0
- data/spec/fixtures/vcr_cassettes/list_cloud_ip.yml +36 -0
- data/spec/fixtures/vcr_cassettes/list_firewall_policy.yml +36 -0
- data/spec/fixtures/vcr_cassettes/list_server_groups.yml +36 -0
- data/spec/fixtures/vcr_cassettes/server_destroy.yml +71 -0
- data/spec/fixtures/vcr_cassettes/server_show.yml +141 -0
- data/spec/fixtures/vcr_cassettes/server_shutdown.yml +104 -0
- data/spec/fixtures/vcr_cassettes/server_start.yml +137 -0
- data/spec/fixtures/vcr_cassettes/server_stop.yml +104 -0
- data/spec/fixtures/vcr_cassettes/show_firewall_policy.yml +36 -0
- data/spec/server_group_spec.rb +15 -0
- data/spec/servers_spec.rb +75 -0
- data/spec/spec_helper.rb +0 -3
- data/tools/bash_completion_script +269 -122
- metadata +224 -41
@@ -0,0 +1,59 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module AWS
|
4
|
+
module Elasticache
|
5
|
+
require 'fog/aws/parsers/elasticache/base'
|
6
|
+
|
7
|
+
class EngineDefaultsParser < Base
|
8
|
+
|
9
|
+
def reset
|
10
|
+
super
|
11
|
+
reset_engine_defaults
|
12
|
+
end
|
13
|
+
|
14
|
+
def reset_engine_defaults
|
15
|
+
@engine_defaults = {
|
16
|
+
'CacheNodeTypeSpecificParameters' => [],
|
17
|
+
'Parameters' => [],
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
def start_element(name, attrs = [])
|
22
|
+
case name
|
23
|
+
when 'CacheNodeTypeSpecificParameter', 'Parameter'
|
24
|
+
@parameter = {}
|
25
|
+
when 'CacheNodeTypeSpecificValues'
|
26
|
+
@parameter[name] = []
|
27
|
+
when 'CacheNodeTypeSpecificValue'
|
28
|
+
@node_specific_value = {}
|
29
|
+
else
|
30
|
+
super
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def end_element(name)
|
35
|
+
case name
|
36
|
+
when 'CacheParameterGroupFamily'
|
37
|
+
@engine_defaults[name] = value
|
38
|
+
when 'CacheNodeTypeSpecificParameter', 'Parameter'
|
39
|
+
if not @parameter.empty?
|
40
|
+
@engine_defaults["#{name}s"] << @parameter
|
41
|
+
end
|
42
|
+
when 'AllowedValues', 'DataType', 'Description', 'IsModifiable',
|
43
|
+
'MinimumEngineVersion', 'ParameterName', 'Source'
|
44
|
+
@parameter[name] = value
|
45
|
+
when 'CacheNodeType', 'Value'
|
46
|
+
@node_specific_value[name] = value
|
47
|
+
when 'CacheNodeTypeSpecificValue'
|
48
|
+
if not @node_specific_value.empty?
|
49
|
+
@parameter["#{name}s"] << @node_specific_value
|
50
|
+
end
|
51
|
+
else
|
52
|
+
super
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module AWS
|
4
|
+
module Elasticache
|
5
|
+
require 'fog/aws/parsers/elasticache/base'
|
6
|
+
|
7
|
+
class EventListParser < Base
|
8
|
+
|
9
|
+
def reset
|
10
|
+
super
|
11
|
+
@response['Events'] = []
|
12
|
+
end
|
13
|
+
|
14
|
+
def start_element(name, attrs = [])
|
15
|
+
super
|
16
|
+
case name
|
17
|
+
when 'Event'; then @event = {}
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
def end_element(name)
|
23
|
+
case name
|
24
|
+
when 'Date'
|
25
|
+
@event[name] = DateTime.parse(value.strip)
|
26
|
+
when 'Message', 'SourceIdentifier', 'SourceType'
|
27
|
+
@event[name] = value ? value.strip : name
|
28
|
+
when 'Event'
|
29
|
+
@response['Events'] << @event unless @event.empty?
|
30
|
+
else
|
31
|
+
super
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module AWS
|
4
|
+
module Elasticache
|
5
|
+
require 'fog/aws/parsers/elasticache/parameter_group_parser'
|
6
|
+
|
7
|
+
class ModifyParameterGroup < ParameterGroupParser
|
8
|
+
|
9
|
+
def reset
|
10
|
+
super
|
11
|
+
@response['ModifyCacheParameterGroupResult'] = []
|
12
|
+
end
|
13
|
+
|
14
|
+
def end_element(name)
|
15
|
+
case name
|
16
|
+
when 'ModifyCacheParameterGroupResult'
|
17
|
+
@response[name] = @parameter_group
|
18
|
+
reset_parameter_group
|
19
|
+
else
|
20
|
+
super
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module AWS
|
4
|
+
module Elasticache
|
5
|
+
require 'fog/aws/parsers/elasticache/base'
|
6
|
+
|
7
|
+
class ParameterGroupParser < Base
|
8
|
+
|
9
|
+
def reset
|
10
|
+
super
|
11
|
+
reset_parameter_group
|
12
|
+
end
|
13
|
+
|
14
|
+
def reset_parameter_group
|
15
|
+
@parameter_group = {}
|
16
|
+
end
|
17
|
+
|
18
|
+
def end_element(name)
|
19
|
+
case name
|
20
|
+
when 'Description', 'CacheParameterGroupName', 'CacheParameterGroupFamily'
|
21
|
+
@parameter_group[name] = value
|
22
|
+
else
|
23
|
+
super
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module AWS
|
4
|
+
module Elasticache
|
5
|
+
require 'fog/aws/parsers/elasticache/parameter_group_parser'
|
6
|
+
|
7
|
+
class ResetParameterGroup < ParameterGroupParser
|
8
|
+
|
9
|
+
def reset
|
10
|
+
super
|
11
|
+
@response['ResetCacheParameterGroupResult'] = []
|
12
|
+
end
|
13
|
+
|
14
|
+
def end_element(name)
|
15
|
+
case name
|
16
|
+
when 'ResetCacheParameterGroupResult'
|
17
|
+
@response[name] = @parameter_group
|
18
|
+
reset_parameter_group
|
19
|
+
else
|
20
|
+
super
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module AWS
|
4
|
+
module Elasticache
|
5
|
+
require 'fog/aws/parsers/elasticache/base'
|
6
|
+
|
7
|
+
class SecurityGroupParser < Fog::Parsers::Base
|
8
|
+
|
9
|
+
def reset
|
10
|
+
super
|
11
|
+
reset_security_group
|
12
|
+
end
|
13
|
+
|
14
|
+
def reset_security_group
|
15
|
+
@security_group = {'EC2SecurityGroups' => []}
|
16
|
+
end
|
17
|
+
|
18
|
+
def start_element(name, attrs = [])
|
19
|
+
super
|
20
|
+
case name
|
21
|
+
when 'EC2SecurityGroup'; then @ec2_group = {}
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
def end_element(name)
|
27
|
+
case name
|
28
|
+
when 'Description', 'CacheSecurityGroupName', 'OwnerId'
|
29
|
+
@security_group[name] = value
|
30
|
+
when 'EC2SecurityGroup'
|
31
|
+
@security_group["#{name}s"] << @ec2_group unless @ec2_group.empty?
|
32
|
+
when 'EC2SecurityGroupName', 'EC2SecurityGroupOwnerId', 'Status'
|
33
|
+
@ec2_group[name] = value
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module AWS
|
4
|
+
module Elasticache
|
5
|
+
require 'fog/aws/parsers/elasticache/cache_cluster_parser'
|
6
|
+
|
7
|
+
class SingleCacheCluster < CacheClusterParser
|
8
|
+
|
9
|
+
def end_element(name)
|
10
|
+
case name
|
11
|
+
when 'CacheCluster'
|
12
|
+
@response[name] = @cache_cluster
|
13
|
+
reset_cache_cluster
|
14
|
+
else
|
15
|
+
super
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module AWS
|
4
|
+
module Elasticache
|
5
|
+
require 'fog/aws/parsers/elasticache/parameter_group_parser'
|
6
|
+
|
7
|
+
class SingleParameterGroup < ParameterGroupParser
|
8
|
+
|
9
|
+
def end_element(name)
|
10
|
+
case name
|
11
|
+
when 'CacheParameterGroup'
|
12
|
+
@response[name] = @parameter_group
|
13
|
+
reset_parameter_group
|
14
|
+
else
|
15
|
+
super
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module AWS
|
4
|
+
module Elasticache
|
5
|
+
require 'fog/aws/parsers/elasticache/security_group_parser'
|
6
|
+
|
7
|
+
class SingleSecurityGroup < SecurityGroupParser
|
8
|
+
|
9
|
+
def reset
|
10
|
+
super
|
11
|
+
@response = { 'ResponseMetadata' => {} }
|
12
|
+
end
|
13
|
+
|
14
|
+
def start_element(name, attrs = [])
|
15
|
+
super
|
16
|
+
end
|
17
|
+
|
18
|
+
def end_element(name)
|
19
|
+
case name
|
20
|
+
when 'CacheSecurityGroup'
|
21
|
+
@response[name] = @security_group
|
22
|
+
reset_security_group
|
23
|
+
|
24
|
+
when 'RequestId'
|
25
|
+
@response['ResponseMetadata'][name] = value
|
26
|
+
else
|
27
|
+
super
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class CloudWatch
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/cloud_watch/delete_alarms'
|
7
|
+
|
8
|
+
# Delete a list of alarms
|
9
|
+
# ==== Options
|
10
|
+
# * AlarmNames<~Array>: A list of alarms to be deleted
|
11
|
+
#
|
12
|
+
# ==== Returns
|
13
|
+
# * response<~Excon::Response>:
|
14
|
+
#
|
15
|
+
# ==== See Also
|
16
|
+
# http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference/index.html?API_DeleteAlarms.html
|
17
|
+
#
|
18
|
+
|
19
|
+
def delete_alarms(alarm_names)
|
20
|
+
options = {}
|
21
|
+
options.merge!(AWS.indexed_param('AlarmNames.member.%d', [*alarm_names]))
|
22
|
+
request({
|
23
|
+
'Action' => 'DeleteAlarms',
|
24
|
+
:parser => Fog::Parsers::AWS::CloudWatch::DeleteAlarms.new
|
25
|
+
}.merge(options))
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class CloudWatch
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/cloud_watch/describe_alarm_history'
|
7
|
+
|
8
|
+
# Retrieves history for the specified alarm
|
9
|
+
# ==== Options
|
10
|
+
# * AlarmName<~String>: The name of the alarm
|
11
|
+
# * EndDate<~DateTime>: The ending date to retrieve alarm history
|
12
|
+
# * HistoryItemType<~String>: The type of alarm histories to retrieve
|
13
|
+
# * MaxRecords<~Integer>: The maximum number of alarm history records to retrieve
|
14
|
+
# * NextToken<~String> The token returned by a previous call to indicate that there is more data available
|
15
|
+
# * StartData<~DateTime>: The starting date to retrieve alarm history
|
16
|
+
#
|
17
|
+
# ==== Returns
|
18
|
+
# * response<~Excon::Response>:
|
19
|
+
#
|
20
|
+
# ==== See Also
|
21
|
+
# http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference/index.html?API_DescribeAlarmHistory.html
|
22
|
+
#
|
23
|
+
|
24
|
+
def describe_alarm_history(options={})
|
25
|
+
request({
|
26
|
+
'Action' => 'DescribeAlarmHistory',
|
27
|
+
:parser => Fog::Parsers::AWS::CloudWatch::DescribeAlarmHistory.new
|
28
|
+
}.merge(options))
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class CloudWatch
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/cloud_watch/describe_alarms'
|
7
|
+
|
8
|
+
# Retrieves alarms with the specified names
|
9
|
+
# ==== Options
|
10
|
+
# * ActionPrefix<~String>: The action name prefix
|
11
|
+
# * AlarmNamePrefix<~String>: The alarm name prefix.
|
12
|
+
# AlarmNames cannot be specified if this parameter is specified
|
13
|
+
# * AlarmNames<~Array>: A list of alarm names to retrieve information for.
|
14
|
+
# * MaxRecords<~Integer>: The maximum number of alarm descriptions to retrieve
|
15
|
+
# * NextToken<~String>: The token returned by a previous call to indicate that there is more data available
|
16
|
+
# * NextToken<~String> The token returned by a previous call to indicate that there is more data available
|
17
|
+
# * StateValue<~String>: The state value to be used in matching alarms
|
18
|
+
#
|
19
|
+
# ==== Returns
|
20
|
+
# * response<~Excon::Response>:
|
21
|
+
#
|
22
|
+
# ==== See Also
|
23
|
+
# http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html
|
24
|
+
#
|
25
|
+
|
26
|
+
def describe_alarms(options={})
|
27
|
+
if alarm_names = options.delete('AlarmNames')
|
28
|
+
options.merge!(AWS.indexed_param('AlarmNames.member.%d', [*alarm_names]))
|
29
|
+
end
|
30
|
+
request({
|
31
|
+
'Action' => 'DescribeAlarms',
|
32
|
+
:parser => Fog::Parsers::AWS::CloudWatch::DescribeAlarms.new
|
33
|
+
}.merge(options))
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class CloudWatch
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/cloud_watch/describe_alarms_for_metric'
|
7
|
+
|
8
|
+
# Retrieves all alarms for a single metric
|
9
|
+
# ==== Options
|
10
|
+
# * Dimensions<~Array>: a list of dimensions to filter against
|
11
|
+
# Name : The name of the dimension
|
12
|
+
# Value : The value to filter against
|
13
|
+
# * MetricName<~String>: The name of the metric
|
14
|
+
# * Namespace<~String>: The namespace of the metric
|
15
|
+
# * Period<~Integer>: The period in seconds over which the statistic is applied
|
16
|
+
# * Statistics<~String>: The statistic for the metric
|
17
|
+
# * Unit<~String> The unit for the metric
|
18
|
+
#
|
19
|
+
# ==== Returns
|
20
|
+
# * response<~Excon::Response>:
|
21
|
+
#
|
22
|
+
# ==== See Also
|
23
|
+
# http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html
|
24
|
+
#
|
25
|
+
|
26
|
+
def describe_alarms_for_metric(options)
|
27
|
+
if dimensions = options.delete('Dimensions')
|
28
|
+
options.merge!(AWS.indexed_param('Dimensions.member.%d.Name', dimensions.collect {|dimension| dimension['Name']}))
|
29
|
+
options.merge!(AWS.indexed_param('Dimensions.member.%d.Value', dimensions.collect {|dimension| dimension['Value']}))
|
30
|
+
end
|
31
|
+
request({
|
32
|
+
'Action' => 'DescribeAlarmsForMetric',
|
33
|
+
:parser => Fog::Parsers::AWS::CloudWatch::DescribeAlarmsForMetric.new
|
34
|
+
}.merge(options))
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class CloudWatch
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/cloud_watch/disable_alarm_actions'
|
7
|
+
|
8
|
+
# Disables actions for the specified alarms
|
9
|
+
# ==== Options
|
10
|
+
# * AlarmNames<~Array>: The names of the alarms to disable actions for
|
11
|
+
#
|
12
|
+
# ==== Returns
|
13
|
+
# * response<~Excon::Response>:
|
14
|
+
#
|
15
|
+
# ==== See Also
|
16
|
+
# http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference/API_DisableAlarmActions.html
|
17
|
+
#
|
18
|
+
|
19
|
+
def disable_alarm_actions(alarm_names)
|
20
|
+
options = {}
|
21
|
+
options.merge!(AWS.indexed_param('AlarmNames.member.%d', [*alarm_names]))
|
22
|
+
request({
|
23
|
+
'Action' => 'DisableAlarmActions',
|
24
|
+
:parser => Fog::Parsers::AWS::CloudWatch::DisableAlarmActions.new
|
25
|
+
}.merge(options))
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class CloudWatch
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/cloud_watch/enable_alarm_actions'
|
7
|
+
|
8
|
+
# Enables actions for the specified alarms
|
9
|
+
# ==== Options
|
10
|
+
# * AlarmNames<~Array>: The names of the alarms to enable actions for
|
11
|
+
#
|
12
|
+
# ==== Returns
|
13
|
+
# * response<~Excon::Response>:
|
14
|
+
#
|
15
|
+
# ==== See Also
|
16
|
+
# http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference/API_EnableAlarmActions.html
|
17
|
+
#
|
18
|
+
|
19
|
+
def enable_alarm_actions(alarm_names)
|
20
|
+
options = {}
|
21
|
+
options.merge!(AWS.indexed_param('AlarmNames.member.%d', [*alarm_names]))
|
22
|
+
request({
|
23
|
+
'Action' => 'EnableAlarmActions',
|
24
|
+
:parser => Fog::Parsers::AWS::CloudWatch::EnableAlarmActions.new
|
25
|
+
}.merge(options))
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class CloudWatch
|
4
|
+
class Real
|
5
|
+
require 'fog/aws/parsers/cloud_watch/put_metric_alarm'
|
6
|
+
|
7
|
+
# Creates or updates an alarm and associates it with the specified Amazon CloudWatch metric
|
8
|
+
# ==== Options
|
9
|
+
# * ActionsEnabled<~Boolean>: Indicates whether or not actions should be executed during any changes to the alarm's state
|
10
|
+
# * AlarmActions<~Array>: A list of actions to execute
|
11
|
+
# * AlarmDescription<~String>: The description for the alarm
|
12
|
+
# * AlarmName<~String> The unique name for the alarm
|
13
|
+
# * ComparisonOperator<~String>: The arithmetic operation to use for comparison
|
14
|
+
# * Dimensions<~Array>: a list of dimensions to filter against,
|
15
|
+
# Name : The name of the dimension
|
16
|
+
# Value : The value to filter against
|
17
|
+
# * EvaluationPeriods<~Integer>: The number of periods over which data is compared to the specified threshold
|
18
|
+
# * InsufficientDataActions<~Array>: A list of actions to execute
|
19
|
+
# * MetricName<~String>: The name for the alarm's associated metric
|
20
|
+
# * Namespace<~String>: The namespace for the alarm's associated metric
|
21
|
+
# * OKActions<~Array>: A list of actions to execute
|
22
|
+
# * Period<~Integer>: The period in seconds over which the specified statistic is applied
|
23
|
+
# * Statistic<~String>: The statistic to apply to the alarm's associated metric
|
24
|
+
# * Threshold<~Double>: The value against which the specified statistic is compared
|
25
|
+
# * Unit<~String>: The unit for the alarm's associated metric
|
26
|
+
#
|
27
|
+
# ==== Returns
|
28
|
+
# * response<~Excon::Response>:
|
29
|
+
#
|
30
|
+
# ==== See Also
|
31
|
+
# http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html
|
32
|
+
#
|
33
|
+
def put_metric_alarm(options)
|
34
|
+
if dimensions = options.delete('Dimensions')
|
35
|
+
options.merge!(AWS.indexed_param('Dimensions.member.%d.Name', dimensions.collect {|dimension| dimension['Name']}))
|
36
|
+
options.merge!(AWS.indexed_param('Dimensions.member.%d.Value', dimensions.collect {|dimension| dimension['Value']}))
|
37
|
+
end
|
38
|
+
if alarm_actions = options.delete('AlarmActions')
|
39
|
+
options.merge!(AWS.indexed_param('AlarmActions.member.%d', [*alarm_actions]))
|
40
|
+
end
|
41
|
+
if insufficient_data_actions = options.delete('InsufficientDataActions')
|
42
|
+
options.merge!(AWS.indexed_param('InsufficientDataActions.member.%d', [*insufficient_data_actions]))
|
43
|
+
end
|
44
|
+
if ok_actions = options.delete('OKActions')
|
45
|
+
options.merge!(AWS.indexed_param('OKActions.member.%d', [*ok_actions]))
|
46
|
+
end
|
47
|
+
|
48
|
+
request({
|
49
|
+
'Action' => 'PutMetricAlarm',
|
50
|
+
:parser => Fog::Parsers::AWS::CloudWatch::PutMetricAlarm.new
|
51
|
+
}.merge(options))
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
class Mock
|
56
|
+
require 'fog/aws/parsers/cloud_watch/put_metric_alarm'
|
57
|
+
|
58
|
+
# See: Fog::AWS::CloudWatch::Real.put_metric_alarm()
|
59
|
+
#
|
60
|
+
def put_metric_alarm(options)
|
61
|
+
supported_actions = [ "InsufficientDataActions", "OKActions", "AlarmActions" ]
|
62
|
+
found_actions = options.keys.select {|key| supported_actions.include? key }
|
63
|
+
if found_actions.empty?
|
64
|
+
raise Fog::Compute::AWS::Error.new("The request must contain at least one of #{supported_actions.join(", ")}'")
|
65
|
+
end
|
66
|
+
|
67
|
+
requirements = [ "AlarmName", "ComparisonOperator", "EvaluationPeriods", "Namespace", "Period", "Statistic", "Threshold" ]
|
68
|
+
requirements.each do |req|
|
69
|
+
unless options.has_key?(req)
|
70
|
+
raise Fog::Compute::AWS::Error.new("The request must contain a the parameter '%s'" % req)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
response = Excon::Response.new
|
75
|
+
response.status = 200
|
76
|
+
response.body = {
|
77
|
+
'requestId' => Fog::AWS::Mock.request_id
|
78
|
+
}
|
79
|
+
response
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class CloudWatch
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/cloud_watch/set_alarm_state'
|
7
|
+
|
8
|
+
# Temporarily sets the state of an alarm
|
9
|
+
# ==== Options
|
10
|
+
# * AlarmName<~String>: The names of the alarm
|
11
|
+
# * StateReason<~String>: The reason that this alarm is set to this specific state (in human-readable text format)
|
12
|
+
# * StateReasonData<~String>: The reason that this alarm is set to this specific state (in machine-readable JSON format)
|
13
|
+
# * StateValue<~String>: The value of the state
|
14
|
+
#
|
15
|
+
# ==== Returns
|
16
|
+
# * response<~Excon::Response>:
|
17
|
+
#
|
18
|
+
# ==== See Also
|
19
|
+
# http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference/API_SetAlarmState.html
|
20
|
+
#
|
21
|
+
|
22
|
+
def set_alarm_state(options)
|
23
|
+
request({
|
24
|
+
'Action' => 'SetAlarmState',
|
25
|
+
:parser => Fog::Parsers::AWS::CloudWatch::SetAlarmState.new
|
26
|
+
}.merge(options))
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -35,10 +35,11 @@ module Fog
|
|
35
35
|
response = Excon::Response.new
|
36
36
|
unless self.data[:security_groups][name]
|
37
37
|
data = {
|
38
|
-
'groupDescription'
|
39
|
-
'groupName'
|
40
|
-
'
|
41
|
-
'
|
38
|
+
'groupDescription' => description,
|
39
|
+
'groupName' => name,
|
40
|
+
'ipPermissionsEgress' => [],
|
41
|
+
'ipPermissions' => [],
|
42
|
+
'ownerId' => self.data[:owner_id]
|
42
43
|
}
|
43
44
|
self.data[:security_groups][name] = data
|
44
45
|
response.body = {
|
@@ -33,13 +33,13 @@ module Fog
|
|
33
33
|
end
|
34
34
|
|
35
35
|
class Mock
|
36
|
-
|
36
|
+
|
37
37
|
#
|
38
38
|
# Usage
|
39
39
|
#
|
40
40
|
# AWS[:compute].create_snapshot("vol-f7c23423", "latest snapshot")
|
41
41
|
#
|
42
|
-
|
42
|
+
|
43
43
|
def create_snapshot(volume_id, description = nil)
|
44
44
|
response = Excon::Response.new
|
45
45
|
if volume = self.data[:volumes][volume_id]
|
@@ -59,7 +59,6 @@ module Fog
|
|
59
59
|
response.body = {
|
60
60
|
'requestId' => Fog::AWS::Mock.request_id
|
61
61
|
}.merge!(data)
|
62
|
-
self.data[:snapshots][snapshot_id]['tagSet'] = {}
|
63
62
|
else
|
64
63
|
response.status = 400
|
65
64
|
raise(Excon::Errors.status_error({:expects => 200}, response))
|