fog-maestrodev 1.15.0.20130927082724 → 1.18.0.20131111203459
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +0 -1
- data/.travis.yml +6 -0
- data/Gemfile.1.8.7 +1 -0
- data/README.md +27 -1
- data/Rakefile +18 -0
- data/changelog.txt +1112 -0
- data/fog.gemspec +8 -8
- data/lib/fog/atmos/models/storage/file.rb +10 -8
- data/lib/fog/atmos/models/storage/files.rb +5 -0
- data/lib/fog/atmos/storage.rb +5 -1
- data/lib/fog/aws/auto_scaling.rb +0 -1
- data/lib/fog/aws/cloud_formation.rb +0 -1
- data/lib/fog/aws/cloud_watch.rb +0 -1
- data/lib/fog/aws/compute.rb +1 -3
- data/lib/fog/aws/data_pipeline.rb +0 -1
- data/lib/fog/aws/elb.rb +2 -1
- data/lib/fog/aws/iam.rb +7 -2
- data/lib/fog/aws/models/auto_scaling/group.rb +2 -2
- data/lib/fog/aws/models/compute/route_table.rb +1 -1
- data/lib/fog/aws/models/compute/server.rb +16 -1
- data/lib/fog/aws/models/compute/spot_request.rb +1 -1
- data/lib/fog/aws/models/elb/load_balancer.rb +10 -0
- data/lib/fog/aws/models/iam/access_key.rb +5 -1
- data/lib/fog/aws/models/iam/access_keys.rb +0 -1
- data/lib/fog/aws/parsers/compute/describe_internet_gateways.rb +1 -1
- data/lib/fog/aws/parsers/compute/describe_reserved_instances.rb +2 -1
- data/lib/fog/aws/parsers/compute/run_instances.rb +2 -0
- data/lib/fog/aws/parsers/elb/describe_load_balancer_attributes.rb +40 -0
- data/lib/fog/aws/parsers/iam/get_group_policy.rb +10 -4
- data/lib/fog/aws/parsers/storage/get_bucket_tagging.rb +37 -0
- data/lib/fog/aws/rds.rb +0 -1
- data/lib/fog/aws/requests/auto_scaling/create_auto_scaling_group.rb +5 -4
- data/lib/fog/aws/requests/compute/copy_image.rb +1 -1
- data/lib/fog/aws/requests/compute/create_internet_gateway.rb +5 -4
- data/lib/fog/aws/requests/compute/create_tags.rb +2 -0
- data/lib/fog/aws/requests/compute/create_volume.rb +1 -1
- data/lib/fog/aws/requests/compute/delete_internet_gateway.rb +1 -1
- data/lib/fog/aws/requests/compute/describe_internet_gateways.rb +1 -1
- data/lib/fog/aws/requests/compute/describe_reserved_instances.rb +1 -0
- data/lib/fog/aws/requests/compute/purchase_reserved_instances_offering.rb +1 -0
- data/lib/fog/aws/requests/compute/run_instances.rb +2 -1
- data/lib/fog/aws/requests/elb/create_load_balancer.rb +1 -0
- data/lib/fog/aws/requests/elb/describe_load_balancer_attributes.rb +54 -0
- data/lib/fog/aws/requests/elb/modify_load_balancer_attributes.rb +59 -0
- data/lib/fog/aws/requests/iam/create_access_key.rb +22 -15
- data/lib/fog/aws/requests/iam/get_group_policy.rb +18 -1
- data/lib/fog/aws/requests/iam/get_user_policy.rb +4 -4
- data/lib/fog/aws/requests/iam/list_access_keys.rb +15 -11
- data/lib/fog/aws/requests/iam/put_group_policy.rb +17 -1
- data/lib/fog/aws/requests/iam/put_user_policy.rb +1 -1
- data/lib/fog/aws/requests/iam/update_access_key.rb +22 -0
- data/lib/fog/aws/requests/storage/delete_bucket_tagging.rb +46 -0
- data/lib/fog/aws/requests/storage/get_bucket_tagging.rb +53 -0
- data/lib/fog/aws/requests/storage/post_object_restore.rb +1 -1
- data/lib/fog/aws/requests/storage/put_bucket_tagging.rb +60 -0
- data/lib/fog/aws/simpledb.rb +0 -1
- data/lib/fog/aws/sqs.rb +2 -0
- data/lib/fog/aws/storage.rb +41 -20
- data/lib/fog/aws.rb +11 -3
- data/lib/fog/bin/hp.rb +17 -0
- data/lib/fog/bin/rackspace.rb +4 -0
- data/lib/fog/brightbox/models/compute/load_balancer.rb +53 -2
- data/lib/fog/cloudstack/models/compute/server.rb +1 -0
- data/lib/fog/compute.rb +13 -2
- data/lib/fog/core/class_from_string.rb +26 -0
- data/lib/fog/core/logger.rb +4 -5
- data/lib/fog/core/service.rb +1 -1
- data/lib/fog/core/uuid.rb +23 -0
- data/lib/fog/core.rb +2 -0
- data/lib/fog/dynect/dns.rb +1 -1
- data/lib/fog/ecloud/compute.rb +8 -3
- data/lib/fog/ecloud/models/compute/admin_organization.rb +4 -4
- data/lib/fog/ecloud/models/compute/catalog_item.rb +1 -1
- data/lib/fog/ecloud/models/compute/compute_pool.rb +8 -8
- data/lib/fog/ecloud/models/compute/environment.rb +15 -15
- data/lib/fog/ecloud/models/compute/firewall_acl.rb +1 -1
- data/lib/fog/ecloud/models/compute/internet_service.rb +1 -1
- data/lib/fog/ecloud/models/compute/internet_services.rb +1 -1
- data/lib/fog/ecloud/models/compute/location.rb +1 -1
- data/lib/fog/ecloud/models/compute/monitor.rb +1 -1
- data/lib/fog/ecloud/models/compute/network.rb +1 -1
- data/lib/fog/ecloud/models/compute/node.rb +1 -1
- data/lib/fog/ecloud/models/compute/nodes.rb +1 -1
- data/lib/fog/ecloud/models/compute/organization.rb +10 -10
- data/lib/fog/ecloud/models/compute/row.rb +1 -1
- data/lib/fog/ecloud/models/compute/rows.rb +1 -1
- data/lib/fog/ecloud/models/compute/server.rb +9 -9
- data/lib/fog/ecloud/models/compute/templates.rb +3 -1
- data/lib/fog/ecloud/models/compute/user.rb +2 -2
- data/lib/fog/ecloud/models/compute/virtual_machine_assigned_ip.rb +1 -1
- data/lib/fog/ecloud/requests/compute/get_virtual_machine_assigned_ips.rb +1 -1
- data/lib/fog/google/README.md +2 -2
- data/lib/fog/google/compute.rb +695 -45
- data/lib/fog/google/examples/bootstrap.rb +1 -1
- data/lib/fog/google/examples/create.rb +1 -0
- data/lib/fog/google/examples/get_list_images.rb +1 -2
- data/lib/fog/google/examples/network.rb +2 -0
- data/lib/fog/google/models/compute/disk.rb +25 -1
- data/lib/fog/google/models/compute/disks.rb +9 -2
- data/lib/fog/google/models/compute/server.rb +8 -2
- data/lib/fog/google/models/compute/servers.rb +1 -1
- data/lib/fog/google/models/compute/snapshot.rb +1 -0
- data/lib/fog/google/models/compute/zone.rb +25 -0
- data/lib/fog/google/models/compute/zones.rb +27 -0
- data/lib/fog/google/requests/compute/delete_server.rb +40 -13
- data/lib/fog/google/requests/compute/get_image.rb +15 -2
- data/lib/fog/google/requests/compute/get_machine_type.rb +16 -1
- data/lib/fog/google/requests/compute/get_server.rb +46 -2
- data/lib/fog/google/requests/compute/get_zone.rb +14 -1
- data/lib/fog/google/requests/compute/insert_server.rb +80 -8
- data/lib/fog/google/requests/compute/insert_snapshot.rb +49 -0
- data/lib/fog/google/requests/compute/list_images.rb +8 -2
- data/lib/fog/google/requests/compute/list_machine_types.rb +9 -2
- data/lib/fog/google/requests/compute/list_servers.rb +10 -2
- data/lib/fog/google/requests/compute/list_zones.rb +7 -1
- data/lib/fog/google/storage.rb +54 -29
- data/lib/fog/hp/CHANGELOG.hp +33 -0
- data/lib/fog/hp/block_storage.rb +9 -4
- data/lib/fog/hp/block_storage_v2.rb +164 -0
- data/lib/fog/hp/cdn.rb +7 -3
- data/lib/fog/hp/compute.rb +9 -5
- data/lib/fog/hp/compute_v2.rb +312 -0
- data/lib/fog/hp/dns.rb +135 -0
- data/lib/fog/hp/lb.rb +170 -0
- data/lib/fog/hp/models/block_storage_v2/snapshot.rb +76 -0
- data/lib/fog/hp/models/block_storage_v2/snapshots.rb +43 -0
- data/lib/fog/hp/models/block_storage_v2/volume.rb +139 -0
- data/lib/fog/hp/models/block_storage_v2/volume_backup.rb +58 -0
- data/lib/fog/hp/models/block_storage_v2/volume_backups.rb +42 -0
- data/lib/fog/hp/models/block_storage_v2/volumes.rb +42 -0
- data/lib/fog/hp/models/compute/image.rb +1 -1
- data/lib/fog/hp/models/compute/server.rb +41 -20
- data/lib/fog/hp/models/compute_v2/address.rb +70 -0
- data/lib/fog/hp/models/compute_v2/addresses.rb +29 -0
- data/lib/fog/hp/models/compute_v2/availability_zone.rb +22 -0
- data/lib/fog/hp/models/compute_v2/availability_zones.rb +29 -0
- data/lib/fog/hp/models/compute_v2/flavor.rb +22 -0
- data/lib/fog/hp/models/compute_v2/flavors.rb +42 -0
- data/lib/fog/hp/models/compute_v2/image.rb +87 -0
- data/lib/fog/hp/models/compute_v2/images.rb +43 -0
- data/lib/fog/hp/models/compute_v2/key_pair.rb +54 -0
- data/lib/fog/hp/models/compute_v2/key_pairs.rb +31 -0
- data/lib/fog/hp/models/compute_v2/meta.rb +29 -0
- data/lib/fog/hp/models/compute_v2/meta_parent.rb +33 -0
- data/lib/fog/hp/models/compute_v2/metadata.rb +79 -0
- data/lib/fog/hp/models/compute_v2/server.rb +339 -0
- data/lib/fog/hp/models/compute_v2/servers.rb +56 -0
- data/lib/fog/hp/models/compute_v2/volume_attachment.rb +42 -0
- data/lib/fog/hp/models/compute_v2/volume_attachments.rb +30 -0
- data/lib/fog/hp/models/dns/domain.rb +55 -0
- data/lib/fog/hp/models/dns/domains.rb +28 -0
- data/lib/fog/hp/models/dns/record.rb +59 -0
- data/lib/fog/hp/models/dns/records.rb +32 -0
- data/lib/fog/hp/models/lb/algorithm.rb +24 -0
- data/lib/fog/hp/models/lb/algorithms.rb +26 -0
- data/lib/fog/hp/models/lb/load_balancer.rb +83 -0
- data/lib/fog/hp/models/lb/load_balancers.rb +26 -0
- data/lib/fog/hp/models/lb/node.rb +53 -0
- data/lib/fog/hp/models/lb/nodes.rb +30 -0
- data/lib/fog/hp/models/lb/protocol.rb +25 -0
- data/lib/fog/hp/models/lb/protocols.rb +26 -0
- data/lib/fog/hp/models/lb/virtual_ip.rb +34 -0
- data/lib/fog/hp/models/lb/virtual_ips.rb +33 -0
- data/lib/fog/hp/models/network/floating_ip.rb +45 -0
- data/lib/fog/hp/models/network/floating_ips.rb +36 -0
- data/lib/fog/hp/models/network/network.rb +56 -0
- data/lib/fog/hp/models/network/networks.rb +36 -0
- data/lib/fog/hp/models/network/port.rb +54 -0
- data/lib/fog/hp/models/network/ports.rb +36 -0
- data/lib/fog/hp/models/network/router.rb +66 -0
- data/lib/fog/hp/models/network/routers.rb +36 -0
- data/lib/fog/hp/models/network/security_group.rb +30 -0
- data/lib/fog/hp/models/network/security_group_rule.rb +35 -0
- data/lib/fog/hp/models/network/security_group_rules.rb +36 -0
- data/lib/fog/hp/models/network/security_groups.rb +36 -0
- data/lib/fog/hp/models/network/subnet.rb +49 -0
- data/lib/fog/hp/models/network/subnets.rb +36 -0
- data/lib/fog/hp/models/storage/directories.rb +1 -1
- data/lib/fog/hp/models/storage/directory.rb +41 -8
- data/lib/fog/hp/models/storage/file.rb +12 -0
- data/lib/fog/hp/models/storage/files.rb +23 -1
- data/lib/fog/hp/models/storage/meta.rb +29 -0
- data/lib/fog/hp/models/storage/meta_parent.rb +23 -0
- data/lib/fog/hp/models/storage/metadata.rb +82 -0
- data/lib/fog/hp/network.rb +198 -0
- data/lib/fog/hp/requests/block_storage_v2/create_snapshot.rb +76 -0
- data/lib/fog/hp/requests/block_storage_v2/create_volume.rb +90 -0
- data/lib/fog/hp/requests/block_storage_v2/create_volume_backup.rb +83 -0
- data/lib/fog/hp/requests/block_storage_v2/delete_snapshot.rb +38 -0
- data/lib/fog/hp/requests/block_storage_v2/delete_volume.rb +38 -0
- data/lib/fog/hp/requests/block_storage_v2/delete_volume_backup.rb +38 -0
- data/lib/fog/hp/requests/block_storage_v2/get_snapshot_details.rb +54 -0
- data/lib/fog/hp/requests/block_storage_v2/get_volume_backup_details.rb +55 -0
- data/lib/fog/hp/requests/block_storage_v2/get_volume_details.rb +58 -0
- data/lib/fog/hp/requests/block_storage_v2/list_snapshots.rb +57 -0
- data/lib/fog/hp/requests/block_storage_v2/list_snapshots_detail.rb +54 -0
- data/lib/fog/hp/requests/block_storage_v2/list_volume_backups.rb +52 -0
- data/lib/fog/hp/requests/block_storage_v2/list_volume_backups_detail.rb +58 -0
- data/lib/fog/hp/requests/block_storage_v2/list_volumes.rb +61 -0
- data/lib/fog/hp/requests/block_storage_v2/list_volumes_detail.rb +59 -0
- data/lib/fog/hp/requests/block_storage_v2/restore_volume_backup.rb +97 -0
- data/lib/fog/hp/requests/block_storage_v2/update_snapshot.rb +69 -0
- data/lib/fog/hp/requests/block_storage_v2/update_volume.rb +70 -0
- data/lib/fog/hp/requests/compute/get_console_output.rb +0 -2
- data/lib/fog/hp/requests/compute/get_vnc_console.rb +45 -0
- data/lib/fog/hp/requests/compute_v2/add_security_group.rb +40 -0
- data/lib/fog/hp/requests/compute_v2/allocate_address.rb +53 -0
- data/lib/fog/hp/requests/compute_v2/associate_address.rb +46 -0
- data/lib/fog/hp/requests/compute_v2/attach_volume.rb +80 -0
- data/lib/fog/hp/requests/compute_v2/create_image.rb +63 -0
- data/lib/fog/hp/requests/compute_v2/create_key_pair.rb +73 -0
- data/lib/fog/hp/requests/compute_v2/create_persistent_server.rb +183 -0
- data/lib/fog/hp/requests/compute_v2/create_server.rb +168 -0
- data/lib/fog/hp/requests/compute_v2/delete_image.rb +44 -0
- data/lib/fog/hp/requests/compute_v2/delete_key_pair.rb +38 -0
- data/lib/fog/hp/requests/compute_v2/delete_meta.rb +55 -0
- data/lib/fog/hp/requests/compute_v2/delete_server.rb +43 -0
- data/lib/fog/hp/requests/compute_v2/detach_volume.rb +47 -0
- data/lib/fog/hp/requests/compute_v2/disassociate_address.rb +39 -0
- data/lib/fog/hp/requests/compute_v2/get_address.rb +48 -0
- data/lib/fog/hp/requests/compute_v2/get_console_output.rb +41 -0
- data/lib/fog/hp/requests/compute_v2/get_flavor_details.rb +57 -0
- data/lib/fog/hp/requests/compute_v2/get_image_details.rb +55 -0
- data/lib/fog/hp/requests/compute_v2/get_key_pair.rb +44 -0
- data/lib/fog/hp/requests/compute_v2/get_meta.rb +57 -0
- data/lib/fog/hp/requests/compute_v2/get_server_details.rb +72 -0
- data/lib/fog/hp/requests/compute_v2/get_server_volume_details.rb +47 -0
- data/lib/fog/hp/requests/compute_v2/get_vnc_console.rb +45 -0
- data/lib/fog/hp/requests/compute_v2/get_windows_password.rb +43 -0
- data/lib/fog/hp/requests/compute_v2/list_addresses.rb +44 -0
- data/lib/fog/hp/requests/compute_v2/list_availability_zones.rb +47 -0
- data/lib/fog/hp/requests/compute_v2/list_flavors.rb +53 -0
- data/lib/fog/hp/requests/compute_v2/list_flavors_detail.rb +53 -0
- data/lib/fog/hp/requests/compute_v2/list_images.rb +52 -0
- data/lib/fog/hp/requests/compute_v2/list_images_detail.rb +66 -0
- data/lib/fog/hp/requests/compute_v2/list_key_pairs.rb +42 -0
- data/lib/fog/hp/requests/compute_v2/list_limits.rb +62 -0
- data/lib/fog/hp/requests/compute_v2/list_metadata.rb +56 -0
- data/lib/fog/hp/requests/compute_v2/list_server_addresses.rb +42 -0
- data/lib/fog/hp/requests/compute_v2/list_server_addresses_by_network.rb +46 -0
- data/lib/fog/hp/requests/compute_v2/list_server_volumes.rb +49 -0
- data/lib/fog/hp/requests/compute_v2/list_servers.rb +53 -0
- data/lib/fog/hp/requests/compute_v2/list_servers_detail.rb +80 -0
- data/lib/fog/hp/requests/compute_v2/reboot_server.rb +34 -0
- data/lib/fog/hp/requests/compute_v2/rebuild_server.rb +82 -0
- data/lib/fog/hp/requests/compute_v2/release_address.rb +38 -0
- data/lib/fog/hp/requests/compute_v2/remove_security_group.rb +37 -0
- data/lib/fog/hp/requests/compute_v2/server_action.rb +25 -0
- data/lib/fog/hp/requests/compute_v2/set_metadata.rb +60 -0
- data/lib/fog/hp/requests/compute_v2/update_meta.rb +61 -0
- data/lib/fog/hp/requests/compute_v2/update_metadata.rb +60 -0
- data/lib/fog/hp/requests/compute_v2/update_server.rb +73 -0
- data/lib/fog/hp/requests/dns/create_domain.rb +66 -0
- data/lib/fog/hp/requests/dns/create_record.rb +79 -0
- data/lib/fog/hp/requests/dns/delete_domain.rb +37 -0
- data/lib/fog/hp/requests/dns/delete_record.rb +36 -0
- data/lib/fog/hp/requests/dns/get_domain.rb +43 -0
- data/lib/fog/hp/requests/dns/get_record.rb +47 -0
- data/lib/fog/hp/requests/dns/get_servers_hosting_domain.rb +62 -0
- data/lib/fog/hp/requests/dns/list_domains.rb +38 -0
- data/lib/fog/hp/requests/dns/list_records_in_a_domain.rb +55 -0
- data/lib/fog/hp/requests/dns/update_domain.rb +62 -0
- data/lib/fog/hp/requests/dns/update_record.rb +70 -0
- data/lib/fog/hp/requests/lb/create_load_balancer.rb +110 -0
- data/lib/fog/hp/requests/lb/create_load_balancer_node.rb +72 -0
- data/lib/fog/hp/requests/lb/delete_load_balancer.rb +36 -0
- data/lib/fog/hp/requests/lb/delete_load_balancer_node.rb +47 -0
- data/lib/fog/hp/requests/lb/get_load_balancer.rb +60 -0
- data/lib/fog/hp/requests/lb/get_load_balancer_node.rb +54 -0
- data/lib/fog/hp/requests/lb/list_algorithms.rb +32 -0
- data/lib/fog/hp/requests/lb/list_limits.rb +40 -0
- data/lib/fog/hp/requests/lb/list_load_balancer_nodes.rb +41 -0
- data/lib/fog/hp/requests/lb/list_load_balancer_virtual_ips.rb +44 -0
- data/lib/fog/hp/requests/lb/list_load_balancers.rb +41 -0
- data/lib/fog/hp/requests/lb/list_protocols.rb +34 -0
- data/lib/fog/hp/requests/lb/list_versions.rb +27 -0
- data/lib/fog/hp/requests/lb/update_load_balancer.rb +47 -0
- data/lib/fog/hp/requests/lb/update_load_balancer_node.rb +59 -0
- data/lib/fog/hp/requests/network/add_router_interface.rb +75 -0
- data/lib/fog/hp/requests/network/associate_floating_ip.rb +71 -0
- data/lib/fog/hp/requests/network/create_floating_ip.rb +69 -0
- data/lib/fog/hp/requests/network/create_network.rb +68 -0
- data/lib/fog/hp/requests/network/create_port.rb +92 -0
- data/lib/fog/hp/requests/network/create_router.rb +64 -0
- data/lib/fog/hp/requests/network/create_security_group.rb +100 -0
- data/lib/fog/hp/requests/network/create_security_group_rule.rb +83 -0
- data/lib/fog/hp/requests/network/create_subnet.rb +97 -0
- data/lib/fog/hp/requests/network/delete_floating_ip.rb +34 -0
- data/lib/fog/hp/requests/network/delete_network.rb +34 -0
- data/lib/fog/hp/requests/network/delete_port.rb +34 -0
- data/lib/fog/hp/requests/network/delete_router.rb +34 -0
- data/lib/fog/hp/requests/network/delete_security_group.rb +36 -0
- data/lib/fog/hp/requests/network/delete_security_group_rule.rb +36 -0
- data/lib/fog/hp/requests/network/delete_subnet.rb +34 -0
- data/lib/fog/hp/requests/network/disassociate_floating_ip.rb +71 -0
- data/lib/fog/hp/requests/network/get_floating_ip.rb +47 -0
- data/lib/fog/hp/requests/network/get_network.rb +49 -0
- data/lib/fog/hp/requests/network/get_port.rb +53 -0
- data/lib/fog/hp/requests/network/get_router.rb +46 -0
- data/lib/fog/hp/requests/network/get_security_group.rb +56 -0
- data/lib/fog/hp/requests/network/get_security_group_rule.rb +51 -0
- data/lib/fog/hp/requests/network/get_subnet.rb +52 -0
- data/lib/fog/hp/requests/network/list_floating_ips.rb +46 -0
- data/lib/fog/hp/requests/network/list_networks.rb +48 -0
- data/lib/fog/hp/requests/network/list_ports.rb +52 -0
- data/lib/fog/hp/requests/network/list_routers.rb +45 -0
- data/lib/fog/hp/requests/network/list_security_group_rules.rb +52 -0
- data/lib/fog/hp/requests/network/list_security_groups.rb +57 -0
- data/lib/fog/hp/requests/network/list_subnets.rb +51 -0
- data/lib/fog/hp/requests/network/remove_router_interface.rb +67 -0
- data/lib/fog/hp/requests/network/update_network.rb +62 -0
- data/lib/fog/hp/requests/network/update_port.rb +75 -0
- data/lib/fog/hp/requests/network/update_router.rb +62 -0
- data/lib/fog/hp/requests/network/update_subnet.rb +72 -0
- data/lib/fog/hp/requests/storage/post_container.rb +38 -0
- data/lib/fog/hp/requests/storage/post_object.rb +56 -0
- data/lib/fog/hp/simple_http_instrumentor.rb +59 -0
- data/lib/fog/hp/storage.rb +79 -23
- data/lib/fog/hp.rb +108 -23
- data/lib/fog/internet_archive/models/storage/file.rb +1 -1
- data/lib/fog/internet_archive/requests/storage/head_object.rb +2 -2
- data/lib/fog/linode/compute.rb +1 -1
- data/lib/fog/linode/dns.rb +1 -1
- data/lib/fog/local/models/storage/directories.rb +8 -4
- data/lib/fog/openstack/compute.rb +1 -2
- data/lib/fog/openstack/examples/compute/basics.rb +74 -0
- data/lib/fog/openstack/identity.rb +2 -3
- data/lib/fog/openstack/image.rb +1 -2
- data/lib/fog/openstack/metering.rb +0 -1
- data/lib/fog/openstack/models/compute/host.rb +4 -1
- data/lib/fog/openstack/models/compute/server.rb +1 -1
- data/lib/fog/openstack/models/network/floating_ip.rb +1 -1
- data/lib/fog/openstack/models/storage/file.rb +14 -0
- data/lib/fog/openstack/models/storage/files.rb +10 -0
- data/lib/fog/openstack/models/volume/volume_type.rb +20 -0
- data/lib/fog/openstack/models/volume/volume_types.rb +26 -0
- data/lib/fog/openstack/models/volume/volumes.rb +5 -2
- data/lib/fog/openstack/network.rb +0 -1
- data/lib/fog/openstack/orchestration.rb +4 -3
- data/lib/fog/openstack/requests/compute/create_server.rb +5 -6
- data/lib/fog/openstack/requests/network/create_floating_ip.rb +1 -4
- data/lib/fog/openstack/requests/orchestration/create_stack.rb +5 -2
- data/lib/fog/openstack/requests/orchestration/delete_stack.rb +2 -1
- data/lib/fog/openstack/requests/orchestration/list_stacks.rb +1 -0
- data/lib/fog/openstack/requests/orchestration/update_stack.rb +5 -5
- data/lib/fog/openstack/requests/storage/delete_multiple_objects.rb +67 -0
- data/lib/fog/openstack/requests/storage/delete_static_large_object.rb +43 -0
- data/lib/fog/openstack/requests/storage/get_object_https_url.rb +44 -6
- data/lib/fog/openstack/requests/storage/put_dynamic_obj_manifest.rb +43 -0
- data/lib/fog/openstack/requests/storage/put_object.rb +13 -4
- data/lib/fog/openstack/requests/storage/put_object_manifest.rb +3 -25
- data/lib/fog/openstack/requests/storage/put_static_obj_manifest.rb +57 -0
- data/lib/fog/openstack/requests/volume/get_volume_type_details.rb +32 -0
- data/lib/fog/openstack/requests/volume/list_volume_types.rb +41 -0
- data/lib/fog/openstack/requests/volume/list_volumes.rb +4 -4
- data/lib/fog/openstack/storage.rb +5 -1
- data/lib/fog/openstack/volume.rb +6 -2
- data/lib/fog/openstack.rb +0 -4
- data/lib/fog/rackspace/auto_scale.rb +4 -0
- data/lib/fog/rackspace/block_storage.rb +0 -2
- data/lib/fog/rackspace/compute.rb +1 -4
- data/lib/fog/rackspace/docs/auto_scale.md +501 -0
- data/lib/fog/rackspace/docs/compute_v2.md +2 -2
- data/lib/fog/rackspace/docs/getting_started.md +1 -0
- data/lib/fog/rackspace/docs/storage.md +1 -1
- data/lib/fog/rackspace/examples/auto_scale/add_policy.rb +68 -0
- data/lib/fog/rackspace/examples/auto_scale/add_webhook.rb +74 -0
- data/lib/fog/rackspace/examples/auto_scale/create_scaling_group.rb +115 -0
- data/lib/fog/rackspace/examples/auto_scale/delete_policy.rb +71 -0
- data/lib/fog/rackspace/examples/auto_scale/delete_scaling_group.rb +61 -0
- data/lib/fog/rackspace/examples/auto_scale/delete_webhook.rb +91 -0
- data/lib/fog/rackspace/examples/compute_v2/create_image.rb +1 -1
- data/lib/fog/rackspace/examples/compute_v2/delete_image.rb +1 -1
- data/lib/fog/rackspace/examples/compute_v2/delete_server.rb +1 -1
- data/lib/fog/rackspace/examples/compute_v2/detach_volume.rb +2 -2
- data/lib/fog/rackspace/examples/compute_v2/resize_server.rb +1 -1
- data/lib/fog/rackspace/examples/compute_v2/server_attachments.rb +1 -1
- data/lib/fog/rackspace/examples/storage/create_cdn_directory.rb +1 -1
- data/lib/fog/rackspace/examples/storage/delete_directory.rb +1 -1
- data/lib/fog/rackspace/examples/storage/delete_file.rb +1 -1
- data/lib/fog/rackspace/examples/storage/download_file.rb +1 -1
- data/lib/fog/rackspace/models/auto_scale/group.rb +3 -3
- data/lib/fog/rackspace/models/auto_scale/group_builder.rb +85 -0
- data/lib/fog/rackspace/models/auto_scale/group_config.rb +22 -3
- data/lib/fog/rackspace/models/auto_scale/groups.rb +3 -3
- data/lib/fog/rackspace/models/auto_scale/launch_config.rb +22 -2
- data/lib/fog/rackspace/models/auto_scale/policies.rb +5 -3
- data/lib/fog/rackspace/models/auto_scale/policy.rb +78 -62
- data/lib/fog/rackspace/models/auto_scale/webhook.rb +40 -27
- data/lib/fog/rackspace/models/auto_scale/webhooks.rb +8 -9
- data/lib/fog/rackspace/models/compute_v2/images.rb +1 -1
- data/lib/fog/rackspace/models/compute_v2/metadata.rb +2 -3
- data/lib/fog/rackspace/models/compute_v2/server.rb +11 -10
- data/lib/fog/rackspace/models/compute_v2/servers.rb +1 -1
- data/lib/fog/rackspace/models/identity/service_catalog.rb +44 -59
- data/lib/fog/rackspace/models/queues/claim.rb +92 -0
- data/lib/fog/rackspace/models/queues/claims.rb +40 -0
- data/lib/fog/rackspace/models/queues/message.rb +51 -0
- data/lib/fog/rackspace/models/queues/messages.rb +54 -0
- data/lib/fog/rackspace/models/queues/queue.rb +73 -0
- data/lib/fog/rackspace/models/queues/queues.rb +32 -0
- data/lib/fog/rackspace/models/storage/file.rb +26 -0
- data/lib/fog/rackspace/models/storage/files.rb +25 -0
- data/lib/fog/rackspace/monitoring.rb +20 -1
- data/lib/fog/rackspace/queues.rb +117 -0
- data/lib/fog/rackspace/requests/auto_scale/resume_group_state.rb +5 -6
- data/lib/fog/rackspace/requests/block_storage/create_volume.rb +1 -1
- data/lib/fog/rackspace/requests/compute_v2/delete_image.rb +1 -1
- data/lib/fog/rackspace/requests/compute_v2/list_metadata.rb +1 -1
- data/lib/fog/rackspace/requests/compute_v2/list_servers.rb +1 -1
- data/lib/fog/rackspace/requests/compute_v2/resize_server.rb +1 -1
- data/lib/fog/rackspace/requests/compute_v2/set_metadata.rb +1 -1
- data/lib/fog/rackspace/requests/compute_v2/set_metadata_item.rb +1 -1
- data/lib/fog/rackspace/requests/compute_v2/update_metadata.rb +1 -1
- data/lib/fog/rackspace/requests/databases/create_database.rb +2 -2
- data/lib/fog/rackspace/requests/databases/create_instance.rb +3 -1
- data/lib/fog/rackspace/requests/databases/create_user.rb +1 -1
- data/lib/fog/rackspace/requests/monitoring/get_monitoring_zone.rb +15 -0
- data/lib/fog/rackspace/requests/monitoring/list_monitoring_zones.rb +15 -0
- data/lib/fog/rackspace/requests/queues/create_claim.rb +24 -0
- data/lib/fog/rackspace/requests/queues/create_message.rb +21 -0
- data/lib/fog/rackspace/requests/queues/create_queue.rb +16 -0
- data/lib/fog/rackspace/requests/queues/delete_claim.rb +15 -0
- data/lib/fog/rackspace/requests/queues/delete_message.rb +18 -0
- data/lib/fog/rackspace/requests/queues/delete_queue.rb +15 -0
- data/lib/fog/rackspace/requests/queues/get_claim.rb +15 -0
- data/lib/fog/rackspace/requests/queues/get_message.rb +16 -0
- data/lib/fog/rackspace/requests/queues/get_queue.rb +15 -0
- data/lib/fog/rackspace/requests/queues/get_queue_stats.rb +15 -0
- data/lib/fog/rackspace/requests/queues/list_messages.rb +17 -0
- data/lib/fog/rackspace/requests/queues/list_queues.rb +15 -0
- data/lib/fog/rackspace/requests/queues/update_claim.rb +19 -0
- data/lib/fog/rackspace/requests/storage/get_object_http_url.rb +30 -0
- data/lib/fog/rackspace/requests/storage/get_object_https_url.rb +2 -1
- data/lib/fog/rackspace/requests/storage/put_object.rb +6 -1
- data/lib/fog/rackspace/service.rb +11 -3
- data/lib/fog/rackspace/storage.rb +2 -4
- data/lib/fog/rackspace.rb +6 -3
- data/lib/fog/vcloud_director/README.md +8 -22
- data/lib/fog/vcloud_director/compute.rb +417 -101
- data/lib/fog/vcloud_director/generators/compute/customization.rb +64 -59
- data/lib/fog/vcloud_director/generators/compute/disks.rb +81 -70
- data/lib/fog/vcloud_director/generators/compute/edge_gateway_service_configuration.rb +159 -0
- data/lib/fog/vcloud_director/generators/compute/metadata.rb +40 -41
- data/lib/fog/vcloud_director/generators/compute/vm_network.rb +55 -58
- data/lib/fog/vcloud_director/models/compute/catalog_item.rb +1 -0
- data/lib/fog/vcloud_director/models/compute/catalog_items.rb +4 -2
- data/lib/fog/vcloud_director/models/compute/disk.rb +2 -2
- data/lib/fog/vcloud_director/models/compute/disks.rb +1 -1
- data/lib/fog/vcloud_director/models/compute/media.rb +29 -0
- data/lib/fog/vcloud_director/models/compute/medias.rb +77 -0
- data/lib/fog/vcloud_director/models/compute/organizations.rb +1 -1
- data/lib/fog/vcloud_director/models/compute/tag.rb +2 -4
- data/lib/fog/vcloud_director/models/compute/tags.rb +8 -16
- data/lib/fog/vcloud_director/models/compute/task.rb +15 -14
- data/lib/fog/vcloud_director/models/compute/tasks.rb +2 -3
- data/lib/fog/vcloud_director/models/compute/vapp.rb +92 -6
- data/lib/fog/vcloud_director/models/compute/vapps.rb +1 -1
- data/lib/fog/vcloud_director/models/compute/vdc.rb +5 -0
- data/lib/fog/vcloud_director/models/compute/vm.rb +80 -6
- data/lib/fog/vcloud_director/models/compute/vm_customization.rb +3 -2
- data/lib/fog/vcloud_director/models/compute/vm_network.rb +1 -1
- data/lib/fog/vcloud_director/parsers/compute/metadata.rb +26 -29
- data/lib/fog/vcloud_director/parsers/compute/network.rb +60 -62
- data/lib/fog/vcloud_director/parsers/compute/vm_customization.rb +1 -1
- data/lib/fog/vcloud_director/parsers/compute/vm_network.rb +60 -62
- data/lib/fog/vcloud_director/requests/compute/delete_catalog_item.rb +22 -0
- data/lib/fog/vcloud_director/requests/compute/delete_catalog_item_metadata_item_metadata.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/delete_disk.rb +60 -0
- data/lib/fog/vcloud_director/requests/compute/delete_disk_metadata_item_metadata.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/delete_logout.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/delete_media.rb +122 -0
- data/lib/fog/vcloud_director/requests/compute/delete_media_metadata_item_metadata.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/delete_shadow_vm.rb +30 -0
- data/lib/fog/vcloud_director/requests/compute/delete_vapp.rb +18 -9
- data/lib/fog/vcloud_director/requests/compute/delete_vapp_metadata_item_metadata.rb +30 -0
- data/lib/fog/vcloud_director/requests/compute/delete_vapp_template.rb +27 -0
- data/lib/fog/vcloud_director/requests/compute/delete_vapp_template_metadata_item_metadata.rb +26 -0
- data/lib/fog/vcloud_director/requests/compute/get_allocated_ip_addresses.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_catalog.rb +31 -7
- data/lib/fog/vcloud_director/requests/compute/get_catalog_item.rb +14 -7
- data/lib/fog/vcloud_director/requests/compute/get_catalog_item_metadata.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_catalog_item_metadata_item_metadata.rb +26 -0
- data/lib/fog/vcloud_director/requests/compute/get_catalog_metadata.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_catalog_metadata_item_metadata.rb +26 -0
- data/lib/fog/vcloud_director/requests/compute/get_catalogs_from_query.rb +94 -0
- data/lib/fog/vcloud_director/requests/compute/get_control_access_params_catalog.rb +26 -0
- data/lib/fog/vcloud_director/requests/compute/get_control_access_params_vapp.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_cpu_rasd_item.rb +28 -0
- data/lib/fog/vcloud_director/requests/compute/get_current_session.rb +31 -23
- data/lib/fog/vcloud_director/requests/compute/get_disk.rb +123 -0
- data/lib/fog/vcloud_director/requests/compute/get_disk_metadata.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_disk_metadata_item_metadata.rb +26 -0
- data/lib/fog/vcloud_director/requests/compute/get_disk_owner.rb +70 -0
- data/lib/fog/vcloud_director/requests/compute/get_disks_from_query.rb +94 -0
- data/lib/fog/vcloud_director/requests/compute/get_disks_rasd_items_list.rb +26 -0
- data/lib/fog/vcloud_director/requests/compute/get_edge_gateway.rb +109 -0
- data/lib/fog/vcloud_director/requests/compute/get_entity.rb +38 -0
- data/lib/fog/vcloud_director/requests/compute/get_execute_query.rb +462 -0
- data/lib/fog/vcloud_director/requests/compute/get_groups_from_query.rb +95 -0
- data/lib/fog/vcloud_director/requests/compute/get_guest_customization_system_section_vapp.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_guest_customization_system_section_vapp_template.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_href.rb +4 -2
- data/lib/fog/vcloud_director/requests/compute/get_lease_settings_section_vapp.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_lease_settings_section_vapp_template.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_media.rb +111 -0
- data/lib/fog/vcloud_director/requests/compute/get_media_drives_rasd_items_list.rb +26 -0
- data/lib/fog/vcloud_director/requests/compute/get_media_metadata.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_media_metadata_item_metadata.rb +26 -0
- data/lib/fog/vcloud_director/requests/compute/get_media_owner.rb +70 -0
- data/lib/fog/vcloud_director/requests/compute/get_medias_from_query.rb +94 -0
- data/lib/fog/vcloud_director/requests/compute/get_memory_rasd_item.rb +28 -0
- data/lib/fog/vcloud_director/requests/compute/get_metadata.rb +17 -7
- data/lib/fog/vcloud_director/requests/compute/get_network.rb +49 -7
- data/lib/fog/vcloud_director/requests/compute/get_network_cards_items_list.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_network_config_section_vapp.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_network_config_section_vapp_template.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_network_connection_system_section_vapp.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_network_connection_system_section_vapp_template.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_network_metadata.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_network_metadata_item_metadata.rb +26 -0
- data/lib/fog/vcloud_director/requests/compute/get_network_section_vapp.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_network_section_vapp_template.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_operating_system_section.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_org_settings.rb +38 -0
- data/lib/fog/vcloud_director/requests/compute/get_org_vdc_gateways.rb +83 -0
- data/lib/fog/vcloud_director/requests/compute/get_organization.rb +70 -42
- data/lib/fog/vcloud_director/requests/compute/get_organization_metadata.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_organization_metadata_item_metadata.rb +28 -0
- data/lib/fog/vcloud_director/requests/compute/get_organizations.rb +28 -13
- data/lib/fog/vcloud_director/requests/compute/get_organizations_from_query.rb +95 -0
- data/lib/fog/vcloud_director/requests/compute/get_product_sections_vapp.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_product_sections_vapp_template.rb +26 -0
- data/lib/fog/vcloud_director/requests/compute/get_request.rb +7 -5
- data/lib/fog/vcloud_director/requests/compute/get_runtime_info_section_type.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_serial_ports_items_list.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_shadow_vm.rb +24 -0
- data/lib/fog/vcloud_director/requests/compute/get_snapshot_section.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_startup_section.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_supported_systems_info.rb +239 -0
- data/lib/fog/vcloud_director/requests/compute/get_supported_versions.rb +4 -5
- data/lib/fog/vcloud_director/requests/compute/get_task.rb +156 -6
- data/lib/fog/vcloud_director/requests/compute/get_task_list.rb +130 -0
- data/lib/fog/vcloud_director/requests/compute/get_thumbnail.rb +28 -0
- data/lib/fog/vcloud_director/requests/compute/get_users_from_query.rb +95 -0
- data/lib/fog/vcloud_director/requests/compute/get_vapp.rb +17 -8
- data/lib/fog/vcloud_director/requests/compute/get_vapp_metadata.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_vapp_metadata_item_metadata.rb +26 -0
- data/lib/fog/vcloud_director/requests/compute/get_vapp_ovf_descriptor.rb +24 -0
- data/lib/fog/vcloud_director/requests/compute/get_vapp_owner.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_vapp_template.rb +14 -7
- data/lib/fog/vcloud_director/requests/compute/get_vapp_template_customization_system_section.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_vapp_template_metadata.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_vapp_template_metadata_item_metadata.rb +27 -0
- data/lib/fog/vcloud_director/requests/compute/get_vapp_template_ovf_descriptor.rb +24 -0
- data/lib/fog/vcloud_director/requests/compute/get_vapp_template_owner.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_vapp_templates_from_query.rb +95 -0
- data/lib/fog/vcloud_director/requests/compute/get_vapps_in_lease_from_query.rb +94 -0
- data/lib/fog/vcloud_director/requests/compute/get_vcloud.rb +76 -0
- data/lib/fog/vcloud_director/requests/compute/get_vdc.rb +66 -62
- data/lib/fog/vcloud_director/requests/compute/get_vdc_metadata.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_vdc_metadata_item_metadata.rb +28 -0
- data/lib/fog/vcloud_director/requests/compute/get_vdc_storage_class.rb +83 -0
- data/lib/fog/vcloud_director/requests/compute/get_vdc_storage_class_metadata.rb +27 -0
- data/lib/fog/vcloud_director/requests/compute/get_vdc_storage_class_metadata_item_metadata.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/get_vdcs_from_query.rb +94 -0
- data/lib/fog/vcloud_director/requests/compute/get_virtual_hardware_section.rb +29 -0
- data/lib/fog/vcloud_director/requests/compute/get_vm.rb +15 -7
- data/lib/fog/vcloud_director/requests/compute/get_vm_capabilities.rb +30 -0
- data/lib/fog/vcloud_director/requests/compute/get_vm_compliance_results.rb +24 -0
- data/lib/fog/vcloud_director/requests/compute/get_vm_customization.rb +18 -7
- data/lib/fog/vcloud_director/requests/compute/get_vm_disks.rb +18 -7
- data/lib/fog/vcloud_director/requests/compute/get_vm_network.rb +18 -7
- data/lib/fog/vcloud_director/requests/compute/get_vm_pending_question.rb +34 -0
- data/lib/fog/vcloud_director/requests/compute/get_vms.rb +15 -7
- data/lib/fog/vcloud_director/requests/compute/get_vms_by_metadata.rb +6 -5
- data/lib/fog/vcloud_director/requests/compute/get_vms_disk_attached_to.rb +39 -0
- data/lib/fog/vcloud_director/requests/compute/get_vms_in_lease_from_query.rb +95 -0
- data/lib/fog/vcloud_director/requests/compute/instantiate_vapp_template.rb +36 -63
- data/lib/fog/vcloud_director/requests/compute/post_acquire_ticket.rb +27 -0
- data/lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb +36 -0
- data/lib/fog/vcloud_director/requests/compute/post_attach_disk.rb +51 -0
- data/lib/fog/vcloud_director/requests/compute/post_cancel_task.rb +43 -0
- data/lib/fog/vcloud_director/requests/compute/post_capture_vapp.rb +46 -0
- data/lib/fog/vcloud_director/requests/compute/post_check_vm_compliance.rb +28 -0
- data/lib/fog/vcloud_director/requests/compute/post_clone_media.rb +102 -0
- data/lib/fog/vcloud_director/requests/compute/post_clone_vapp.rb +62 -0
- data/lib/fog/vcloud_director/requests/compute/post_clone_vapp_template.rb +52 -0
- data/lib/fog/vcloud_director/requests/compute/post_configure_edge_gateway_services.rb +70 -0
- data/lib/fog/vcloud_director/requests/compute/post_consolidate_vm_vapp.rb +27 -0
- data/lib/fog/vcloud_director/requests/compute/post_consolidate_vm_vapp_template.rb +27 -0
- data/lib/fog/vcloud_director/requests/compute/post_deploy_vapp.rb +51 -0
- data/lib/fog/vcloud_director/requests/compute/post_detach_disk.rb +39 -0
- data/lib/fog/vcloud_director/requests/compute/post_disable_nested_hv.rb +27 -0
- data/lib/fog/vcloud_director/requests/compute/post_disable_vapp_template_download.rb +24 -0
- data/lib/fog/vcloud_director/requests/compute/post_discard_vapp_state.rb +30 -0
- data/lib/fog/vcloud_director/requests/compute/post_eject_cd_rom.rb +39 -0
- data/lib/fog/vcloud_director/requests/compute/post_enable_nested_hv.rb +27 -0
- data/lib/fog/vcloud_director/requests/compute/post_enable_vapp_template_download.rb +24 -0
- data/lib/fog/vcloud_director/requests/compute/post_enter_maintenance_mode.rb +26 -0
- data/lib/fog/vcloud_director/requests/compute/post_exit_maintenance_mode.rb +22 -0
- data/lib/fog/vcloud_director/requests/compute/post_insert_cd_rom.rb +39 -0
- data/lib/fog/vcloud_director/requests/compute/post_install_vmware_tools.rb +27 -0
- data/lib/fog/vcloud_director/requests/compute/post_instantiate_vapp_template.rb +133 -0
- data/lib/fog/vcloud_director/requests/compute/post_login_session.rb +39 -0
- data/lib/fog/vcloud_director/requests/compute/post_power_off_vapp.rb +36 -0
- data/lib/fog/vcloud_director/requests/compute/post_power_on_vapp.rb +36 -0
- data/lib/fog/vcloud_director/requests/compute/post_reboot_vapp.rb +33 -0
- data/lib/fog/vcloud_director/requests/compute/post_remove_all_snapshots.rb +27 -0
- data/lib/fog/vcloud_director/requests/compute/post_reset_vapp.rb +33 -0
- data/lib/fog/vcloud_director/requests/compute/post_revert_snapshot.rb +27 -0
- data/lib/fog/vcloud_director/requests/compute/post_shutdown_vapp.rb +33 -0
- data/lib/fog/vcloud_director/requests/compute/post_suspend_vapp.rb +33 -0
- data/lib/fog/vcloud_director/requests/compute/post_undeploy_vapp.rb +66 -0
- data/lib/fog/vcloud_director/requests/compute/post_update_catalog_item_metadata.rb +52 -0
- data/lib/fog/vcloud_director/requests/compute/post_update_disk_metadata.rb +52 -0
- data/lib/fog/vcloud_director/requests/compute/post_update_media_metadata.rb +52 -0
- data/lib/fog/vcloud_director/requests/compute/post_update_vapp_metadata.rb +52 -0
- data/lib/fog/vcloud_director/requests/compute/post_update_vapp_template_metadata.rb +52 -0
- data/lib/fog/vcloud_director/requests/compute/post_upgrade_hw_version.rb +28 -0
- data/lib/fog/vcloud_director/requests/compute/post_upload_disk.rb +133 -0
- data/lib/fog/vcloud_director/requests/compute/post_upload_media.rb +120 -0
- data/lib/fog/vcloud_director/requests/compute/post_upload_vapp_template.rb +46 -0
- data/lib/fog/vcloud_director/requests/compute/put_catalog_item_metadata_item_metadata.rb +50 -0
- data/lib/fog/vcloud_director/requests/compute/put_cpu.rb +47 -0
- data/lib/fog/vcloud_director/requests/compute/put_disk_metadata_item_metadata.rb +46 -0
- data/lib/fog/vcloud_director/requests/compute/put_disks.rb +39 -0
- data/lib/fog/vcloud_director/requests/compute/put_guest_customization_section_vapp.rb +139 -0
- data/lib/fog/vcloud_director/requests/compute/put_media_metadata_item_metadata.rb +50 -0
- data/lib/fog/vcloud_director/requests/compute/put_memory.rb +47 -0
- data/lib/fog/vcloud_director/requests/compute/put_metadata_value.rb +4 -3
- data/lib/fog/vcloud_director/requests/compute/put_network_connection_system_section_vapp.rb +121 -0
- data/lib/fog/vcloud_director/requests/compute/put_vapp_metadata_item_metadata.rb +50 -0
- data/lib/fog/vcloud_director/requests/compute/put_vapp_template_metadata_item_metadata.rb +50 -0
- data/lib/fog/vcloud_director/requests/compute/put_vm_capabilities.rb +44 -0
- data/lib/fog/vcloud_director.rb +58 -2
- data/lib/fog/version.rb +1 -1
- data/lib/fog/vsphere/compute.rb +41 -15
- data/lib/fog/vsphere/models/compute/datacenter.rb +11 -6
- data/lib/fog/vsphere/models/compute/interface.rb +55 -3
- data/lib/fog/vsphere/models/compute/interfaces.rb +25 -10
- data/lib/fog/vsphere/models/compute/interfacetype.rb +26 -0
- data/lib/fog/vsphere/models/compute/interfacetypes.rb +40 -0
- data/lib/fog/vsphere/models/compute/scsicontroller.rb +19 -0
- data/lib/fog/vsphere/models/compute/server.rb +47 -16
- data/lib/fog/vsphere/models/compute/servertype.rb +39 -0
- data/lib/fog/vsphere/models/compute/servertypes.rb +29 -0
- data/lib/fog/vsphere/models/compute/volume.rb +59 -4
- data/lib/fog/vsphere/models/compute/volumes.rb +22 -7
- data/lib/fog/vsphere/requests/compute/create_vm.rb +46 -13
- data/lib/fog/vsphere/requests/compute/get_datacenter.rb +1 -1
- data/lib/fog/vsphere/requests/compute/get_interface_type.rb +15 -0
- data/lib/fog/vsphere/requests/compute/get_network.rb +2 -2
- data/lib/fog/vsphere/requests/compute/get_server_type.rb +32 -0
- data/lib/fog/vsphere/requests/compute/get_vm_first_scsi_controller.rb +26 -0
- data/lib/fog/vsphere/requests/compute/list_datacenters.rb +22 -3
- data/lib/fog/vsphere/requests/compute/list_interface_types.rb +25 -0
- data/lib/fog/vsphere/requests/compute/list_server_types.rb +55 -0
- data/lib/fog/vsphere/requests/compute/list_vm_volumes.rb +3 -1
- data/lib/fog/vsphere/requests/compute/modify_vm_interface.rb +9 -6
- data/lib/fog/vsphere/requests/compute/modify_vm_volume.rb +26 -0
- data/lib/fog/vsphere/requests/compute/vm_clone.rb +2 -9
- data/lib/fog/vsphere/requests/compute/vm_reconfig_cpus.rb +2 -2
- data/lib/fog/xenserver/requests/compute/create_server.rb +1 -1
- data/lib/tasks/changelog_task.rb +3 -0
- data/lib/tasks/test_task.rb +1 -0
- data/tests/aws/models/compute/server_tests.rb +21 -1
- data/tests/aws/models/elb/model_tests.rb +6 -0
- data/tests/aws/requests/compute/instance_tests.rb +2 -0
- data/tests/aws/requests/compute/internet_gateway_tests.rb +5 -0
- data/tests/aws/requests/compute/network_interface_tests.rb +17 -0
- data/tests/aws/requests/elb/load_balancer_tests.rb +6 -0
- data/tests/aws/requests/iam/group_policy_tests.rb +12 -6
- data/tests/aws/requests/storage/bucket_tests.rb +19 -3
- data/tests/aws/requests/storage/object_tests.rb +1 -0
- data/tests/aws/signed_params_tests.rb +1 -5
- data/tests/aws/storage_tests.rb +7 -0
- data/tests/brightbox/compute/schema.rb +1 -0
- data/tests/brightbox/requests/compute/interface_tests.rb +7 -19
- data/tests/compute/helper.rb +6 -4
- data/tests/core/credential_tests.rb +7 -1
- data/tests/core/parser_tests.rb +1 -1
- data/tests/core/uuid_tests.rb +10 -0
- data/tests/ecloud/compute/models/server_tests.rb +34 -41
- data/tests/helpers/mock_helper.rb +1 -0
- data/tests/hp/block_storage_tests.rb +47 -0
- data/tests/hp/cdn_tests.rb +23 -0
- data/tests/hp/compute_tests.rb +22 -0
- data/tests/hp/models/block_storage_v2/snapshot_tests.rb +22 -0
- data/tests/hp/models/block_storage_v2/snapshots_tests.rb +10 -0
- data/tests/hp/models/block_storage_v2/volume_backup_tests.rb +22 -0
- data/tests/hp/models/block_storage_v2/volume_backups_tests.rb +9 -0
- data/tests/hp/models/block_storage_v2/volume_tests.rb +22 -0
- data/tests/hp/models/block_storage_v2/volumes_tests.rb +5 -0
- data/tests/hp/models/compute_v2/address_tests.rb +23 -0
- data/tests/hp/models/compute_v2/addresses_tests.rb +7 -0
- data/tests/hp/models/compute_v2/availability_zone_tests.rb +13 -0
- data/tests/hp/models/compute_v2/availability_zones_tests.rb +13 -0
- data/tests/hp/models/compute_v2/key_pair_tests.rb +29 -0
- data/tests/hp/models/compute_v2/key_pairs_tests.rb +7 -0
- data/tests/hp/models/compute_v2/metadata_image_tests.rb +60 -0
- data/tests/hp/models/compute_v2/metadata_server_tests.rb +56 -0
- data/tests/hp/models/compute_v2/server_tests.rb +45 -0
- data/tests/hp/models/compute_v2/servers_tests.rb +9 -0
- data/tests/hp/models/compute_v2/volume_attachment_tests.rb +40 -0
- data/tests/hp/models/compute_v2/volume_attachments_tests.rb +17 -0
- data/tests/hp/models/dns/domain_tests.rb +25 -0
- data/tests/hp/models/dns/domains_tests.rb +14 -0
- data/tests/hp/models/dns/record_tests.rb +29 -0
- data/tests/hp/models/dns/records_tests.rb +9 -0
- data/tests/hp/models/lb/algorithms_tests.rb +15 -0
- data/tests/hp/models/lb/load_balancer_node_tests.rb +9 -0
- data/tests/hp/models/lb/load_balancer_nodes_tests.rb +27 -0
- data/tests/hp/models/lb/load_balancer_tests.rb +6 -0
- data/tests/hp/models/lb/load_balancer_virtual_ips_tests.rb +22 -0
- data/tests/hp/models/lb/load_balancers_tests.rb +22 -0
- data/tests/hp/models/lb/protocols_tests.rb +15 -0
- data/tests/hp/models/network/floating_ip_tests.rb +37 -0
- data/tests/hp/models/network/floating_ips_tests.rb +8 -0
- data/tests/hp/models/network/network_tests.rb +25 -0
- data/tests/hp/models/network/networks_tests.rb +15 -0
- data/tests/hp/models/network/port_tests.rb +30 -0
- data/tests/hp/models/network/ports_tests.rb +21 -0
- data/tests/hp/models/network/router_tests.rb +55 -0
- data/tests/hp/models/network/routers_tests.rb +19 -0
- data/tests/hp/models/network/security_group_rule_tests.rb +25 -0
- data/tests/hp/models/network/security_group_rules_tests.rb +23 -0
- data/tests/hp/models/network/security_group_tests.rb +20 -0
- data/tests/hp/models/network/security_groups_tests.rb +20 -0
- data/tests/hp/models/network/subnet_tests.rb +30 -0
- data/tests/hp/models/network/subnets_tests.rb +22 -0
- data/tests/hp/models/storage/directory_tests.rb +70 -0
- data/tests/hp/requests/block_storage_v2/snapshot_tests.rb +69 -0
- data/tests/hp/requests/block_storage_v2/volume_backup_tests.rb +117 -0
- data/tests/hp/requests/block_storage_v2/volume_tests.rb +106 -0
- data/tests/hp/requests/compute_v2/address_tests.rb +80 -0
- data/tests/hp/requests/compute_v2/availability_zone_tests.rb +19 -0
- data/tests/hp/requests/compute_v2/flavor_tests.rb +45 -0
- data/tests/hp/requests/compute_v2/image_tests.rb +86 -0
- data/tests/hp/requests/compute_v2/key_pair_tests.rb +66 -0
- data/tests/hp/requests/compute_v2/metadata_tests.rb +101 -0
- data/tests/hp/requests/compute_v2/persistent_server_tests.rb +67 -0
- data/tests/hp/requests/compute_v2/server_address_tests.rb +46 -0
- data/tests/hp/requests/compute_v2/server_security_group_tests.rb +43 -0
- data/tests/hp/requests/compute_v2/server_tests.rb +113 -0
- data/tests/hp/requests/compute_v2/server_volume_tests.rb +85 -0
- data/tests/hp/requests/dns/domain_tests.rb +72 -0
- data/tests/hp/requests/dns/records_tests.rb +65 -0
- data/tests/hp/requests/lb/algorithms_tests.rb +15 -0
- data/tests/hp/requests/lb/limits_tests.rb +18 -0
- data/tests/hp/requests/lb/load_balancer_nodes_tests.rb +47 -0
- data/tests/hp/requests/lb/load_balancer_tests.rb +56 -0
- data/tests/hp/requests/lb/protocols_tests.rb +15 -0
- data/tests/hp/requests/lb/versions_tests.rb +17 -0
- data/tests/hp/requests/lb/virtual_ips_tests.rb +34 -0
- data/tests/hp/requests/network/floating_ip_tests.rb +70 -0
- data/tests/hp/requests/network/network_tests.rb +57 -0
- data/tests/hp/requests/network/port_tests.rb +71 -0
- data/tests/hp/requests/network/router_tests.rb +108 -0
- data/tests/hp/requests/network/security_group_rule_tests.rb +58 -0
- data/tests/hp/requests/network/security_group_tests.rb +48 -0
- data/tests/hp/requests/network/subnet_tests.rb +71 -0
- data/tests/hp/requests/storage/container_tests.rb +9 -1
- data/tests/hp/requests/storage/object_tests.rb +34 -2
- data/tests/hp/storage_tests.rb +25 -0
- data/tests/local/models/directories_tests.rb +17 -0
- data/tests/openstack/requests/orchestration/stack_tests.rb +6 -1
- data/tests/openstack/requests/storage/large_object_tests.rb +320 -59
- data/tests/openstack/requests/storage/object_tests.rb +77 -4
- data/tests/rackspace/block_storage_tests.rb +1 -1
- data/tests/rackspace/cdn_tests.rb +2 -2
- data/tests/rackspace/compute_tests.rb +1 -6
- data/tests/rackspace/compute_v2_tests.rb +1 -1
- data/tests/rackspace/databases_tests.rb +1 -1
- data/tests/rackspace/dns_tests.rb +1 -1
- data/tests/rackspace/helper.rb +14 -4
- data/tests/rackspace/load_balancer_tests.rb +1 -1
- data/tests/rackspace/models/auto_scale/group_builder_tests.rb +145 -0
- data/tests/rackspace/models/auto_scale/group_tests.rb +36 -0
- data/tests/rackspace/models/auto_scale/{groups.rb → groups_tests.rb} +6 -2
- data/tests/rackspace/models/auto_scale/policies_tests.rb +25 -0
- data/tests/rackspace/models/auto_scale/policy_tests.rb +35 -0
- data/tests/rackspace/models/auto_scale/webhook_tests.rb +42 -0
- data/tests/rackspace/models/auto_scale/webhooks_tests.rb +28 -0
- data/tests/rackspace/models/compute_v2/metadata_tests.rb +1 -1
- data/tests/rackspace/models/compute_v2/server_tests.rb +8 -1
- data/tests/rackspace/models/identity/service_catalog_tests.rb +88 -40
- data/tests/rackspace/models/queues/claim_tests.rb +43 -0
- data/tests/rackspace/models/queues/claims_tests.rb +55 -0
- data/tests/rackspace/models/queues/message_tests.rb +35 -0
- data/tests/rackspace/models/queues/messages_tests.rb +18 -0
- data/tests/rackspace/models/queues/queue_tests.rb +30 -0
- data/tests/rackspace/models/queues/queues_tests.rb +10 -0
- data/tests/rackspace/models/storage/file_tests.rb +48 -6
- data/tests/rackspace/models/storage/files_tests.rb +44 -0
- data/tests/rackspace/queues_tests.rb +118 -0
- data/tests/rackspace/requests/auto_scale/config_tests.rb +61 -15
- data/tests/rackspace/requests/auto_scale/group_tests.rb +16 -4
- data/tests/rackspace/requests/auto_scale/helper.rb +46 -3
- data/tests/rackspace/requests/auto_scale/policy_tests.rb +37 -27
- data/tests/rackspace/requests/auto_scale/webhook_tests.rb +37 -28
- data/tests/rackspace/requests/compute_v2/address_tests.rb +3 -1
- data/tests/rackspace/requests/compute_v2/metadata_tests.rb +4 -2
- data/tests/rackspace/requests/compute_v2/server_tests.rb +3 -6
- data/tests/rackspace/requests/databases/helper.rb +0 -5
- data/tests/rackspace/requests/monitoring/entity_tests.rb +4 -4
- data/tests/rackspace/requests/monitoring/helper.rb +64 -0
- data/tests/rackspace/requests/monitoring/list_tests.rb +14 -2
- data/tests/rackspace/requests/queues/claim_tests.rb +62 -0
- data/tests/rackspace/requests/queues/helper.rb +50 -0
- data/tests/rackspace/requests/queues/messages_tests.rb +60 -0
- data/tests/rackspace/requests/queues/queues_tests.rb +43 -0
- data/tests/rackspace/requests/storage/large_object_tests.rb +8 -6
- data/tests/rackspace/requests/storage/object_tests.rb +12 -1
- data/tests/rackspace/service_tests.rb +0 -1
- data/tests/rackspace/storage_tests.rb +5 -5
- data/tests/vcloud_director/ensure_list_tests.rb +84 -0
- data/tests/vcloud_director/fixtures/test.iso +1 -0
- data/tests/vcloud_director/models/compute/catalog_items_tests.rb +31 -32
- data/tests/vcloud_director/models/compute/catalogs_tests.rb +30 -32
- data/tests/vcloud_director/models/compute/helper.rb +1 -8
- data/tests/vcloud_director/models/compute/media_tests.rb +45 -0
- data/tests/vcloud_director/models/compute/organizations_tests.rb +11 -15
- data/tests/vcloud_director/models/compute/tasks_tests.rb +26 -0
- data/tests/vcloud_director/models/compute/vapp_life_cycle_tests.rb +73 -78
- data/tests/vcloud_director/models/compute/vapp_tests.rb +29 -32
- data/tests/vcloud_director/models/compute/vdcs_tests.rb +31 -35
- data/tests/vcloud_director/models/compute/vms_tests.rb +72 -76
- data/tests/vcloud_director/requests/compute/admin_tests.rb +16 -0
- data/tests/vcloud_director/requests/compute/catalog_tests.rb +42 -0
- data/tests/vcloud_director/requests/compute/disk_tests.rb +178 -0
- data/tests/vcloud_director/requests/compute/edge_gateway_tests.rb +101 -0
- data/tests/vcloud_director/requests/compute/groups_tests.rb +18 -0
- data/tests/vcloud_director/requests/compute/helper.rb +34 -0
- data/tests/vcloud_director/requests/compute/media_tests.rb +195 -0
- data/tests/vcloud_director/requests/compute/network_tests.rb +43 -0
- data/tests/vcloud_director/requests/compute/organization_tests.rb +26 -37
- data/tests/vcloud_director/requests/compute/ovf_descriptor_tests.rb +36 -0
- data/tests/vcloud_director/requests/compute/query_tests.rb +34 -0
- data/tests/vcloud_director/requests/compute/schema_helper.rb +638 -0
- data/tests/vcloud_director/requests/compute/session_tests.rb +2 -17
- data/tests/vcloud_director/requests/compute/supported_systems_tests.rb +11 -0
- data/tests/vcloud_director/requests/compute/task_tests.rb +35 -0
- data/tests/vcloud_director/requests/compute/users_tests.rb +18 -0
- data/tests/vcloud_director/requests/compute/vapp_tests.rb +91 -0
- data/tests/vcloud_director/requests/compute/vdc_storage_profile_tests.rb +27 -0
- data/tests/vcloud_director/requests/compute/vdc_tests.rb +26 -80
- data/tests/vcloud_director/requests/compute/versions_tests.rb +1 -16
- data/tests/vcloud_director/requests/compute/vm_tests.rb +125 -0
- metadata +771 -122
- data/lib/fog/vcloud_director/requests/compute/delete_metadata.rb +0 -20
- data/lib/fog/vcloud_director/requests/compute/get_tasks_list.rb +0 -18
- data/lib/fog/vcloud_director/requests/compute/get_vm_cpu.rb +0 -18
- data/lib/fog/vcloud_director/requests/compute/get_vm_memory.rb +0 -18
- data/lib/fog/vcloud_director/requests/compute/helper.rb +0 -93
- data/lib/fog/vcloud_director/requests/compute/post_task_cancel.rb +0 -25
- data/lib/fog/vcloud_director/requests/compute/post_vapp_undeploy.rb +0 -26
- data/lib/fog/vcloud_director/requests/compute/post_vm_metadata.rb +0 -29
- data/lib/fog/vcloud_director/requests/compute/post_vm_poweroff.rb +0 -18
- data/lib/fog/vcloud_director/requests/compute/post_vm_poweron.rb +0 -18
- data/lib/fog/vcloud_director/requests/compute/put_vm_cpu.rb +0 -34
- data/lib/fog/vcloud_director/requests/compute/put_vm_customization.rb +0 -24
- data/lib/fog/vcloud_director/requests/compute/put_vm_disks.rb +0 -25
- data/lib/fog/vcloud_director/requests/compute/put_vm_memory.rb +0 -34
- data/lib/fog/vcloud_director/requests/compute/put_vm_network.rb +0 -24
- data/tests/rackspace/models/auto_scale/group.rb +0 -19
- data/tests/rackspace/models/auto_scale/policies.rb +0 -23
- data/tests/rackspace/models/auto_scale/policy.rb +0 -29
- data/tests/rackspace/models/auto_scale/webhook.rb +0 -35
- data/tests/rackspace/models/auto_scale/webhooks.rb +0 -28
- data/tests/vcloud_director/models/tools/reduced_vcr_requests.rb +0 -27
@@ -0,0 +1,501 @@
|
|
1
|
+
#Auto Scale (AutoScale)
|
2
|
+
|
3
|
+
This document explains how to get started using auto scale with Fog. It assumes you have read the [Getting Started with Fog and the Rackspace Open Cloud](getting_started.md) document.
|
4
|
+
|
5
|
+
## Basic Concepts
|
6
|
+
|
7
|
+
Auto Scale is a service that enables you to scale your application by adding or removing servers based on monitoring events, a schedule, or arbitrary webhooks.
|
8
|
+
|
9
|
+
Auto Scale functions by linking three services:
|
10
|
+
|
11
|
+
* Monitoring (such as Monitoring as a Service)
|
12
|
+
* Auto Scale
|
13
|
+
* Servers and Load Balancers
|
14
|
+
|
15
|
+
|
16
|
+
## Workflow
|
17
|
+
|
18
|
+
A scaling group is monitored by Rackspace Cloud Monitoring. When Monitoring triggers an alarm for high utilization within the Autoscaling group, a webhook is triggered. The webhook calls the auto scale service, which consults a policy in accordance with the webhook. The policy determines how many additional Cloud Servers should be added or removed in accordance with the alarm.
|
19
|
+
|
20
|
+
Alarms may trigger scaling up or scaling down. Scale-down events always remove the oldest server in the group.
|
21
|
+
|
22
|
+
Cooldowns allow you to ensure that you don't scale up or down too fast. When a scaling policy runs, both the scaling policy cooldown and the group cooldown start. Any additional requests to the group are discarded while the group cooldown is active. Any additional requests to the specific policy are discarded when the policy cooldown is active.
|
23
|
+
|
24
|
+
It is important to remember that Auto Scale does not configure anything within a server. This means that all images should be self-provisioning. It is up to you to make sure that your services are configured to function properly when the server is started. We recommend using something like Chef, Salt, or Puppet.
|
25
|
+
|
26
|
+
|
27
|
+
## Starting irb console
|
28
|
+
|
29
|
+
Start by executing the following command:
|
30
|
+
|
31
|
+
irb
|
32
|
+
|
33
|
+
Once `irb` has launched you need to require the Fog library.
|
34
|
+
|
35
|
+
If using Ruby 1.8.x execute:
|
36
|
+
|
37
|
+
require 'rubygems'
|
38
|
+
require 'fog'
|
39
|
+
|
40
|
+
If using Ruby 1.9.x execute:
|
41
|
+
|
42
|
+
require 'fog'
|
43
|
+
|
44
|
+
## Create Service
|
45
|
+
|
46
|
+
Next, create a connection to auto scale:
|
47
|
+
|
48
|
+
Using a US-based account:
|
49
|
+
|
50
|
+
service = Fog::Rackspace::AutoScale(
|
51
|
+
:rackspace_username => RACKSPACE_USER_NAME, # Your Rackspace Username
|
52
|
+
:rackspace_api_key => RACKSPACE_API, # Your Rackspace API key
|
53
|
+
:rackspace_region => :ord,
|
54
|
+
:connection_options => {} # Optional
|
55
|
+
)
|
56
|
+
|
57
|
+
Using a UK-based account:
|
58
|
+
|
59
|
+
service = Fog::Rackspace::AutoScale(
|
60
|
+
:rackspace_username => RACKSPACE_USER_NAME, # Your Rackspace Username
|
61
|
+
:rackspace_api_key => RACKSPACE_API, # Your Rackspace API key
|
62
|
+
:rackspace_auth_url => Fog::Rackspace::UK_AUTH_ENDPOINT,
|
63
|
+
:rackspace_region => :lon,
|
64
|
+
:connection_options => {} # Optional
|
65
|
+
)
|
66
|
+
|
67
|
+
To learn more about obtaining cloud credentials refer to the [Getting Started with Fog and the Rackspace Open Cloud](getting_started.md) document.
|
68
|
+
|
69
|
+
By default `Fog::Rackspace::AutoScale` will authenticate against the US authentication endpoint. You can specify alternative authentication endpoints using the key `:rackspace_auth_url`. Please refer to [Alternate Authentication Endpoints](http://docs.rackspace.com/auth/api/v2.0/auth-client-devguide/content/Endpoints-d1e180.html) for a list of alternative Rackspace authentication endpoints.
|
70
|
+
|
71
|
+
Alternative regions are specified using the key `:rackspace_region `. A list of regions available for auto scale can be found by executing the following:
|
72
|
+
|
73
|
+
identity_service = Fog::Identity({
|
74
|
+
:provider => 'Rackspace', # Rackspace Fog provider
|
75
|
+
:rackspace_username => RACKSPACE_USER_NAME, # Your Rackspace Username
|
76
|
+
:rackspace_api_key => RACKSPACE_API, # Your Rackspace API key
|
77
|
+
:rackspace_auth_url => Fog::Rackspace::UK_AUTH_ENDPOINT # Not specified for US Cloud
|
78
|
+
})
|
79
|
+
|
80
|
+
identity_service.service_catalog.display_service_regions :autoscale
|
81
|
+
|
82
|
+
Rackspace Private Cloud installations can skip specifying a region and directly specify their custom service endpoints using the key `:rackspace_auto_scale_url`.
|
83
|
+
|
84
|
+
|
85
|
+
**Note**: A`Fog::Rackspace::AutoScale` instance is needed for the desired region.
|
86
|
+
|
87
|
+
### Optional Connection Parameters
|
88
|
+
|
89
|
+
Fog supports passing additional connection parameters to its underlying HTTP library (Excon) using the `:connection_options` parameter.
|
90
|
+
|
91
|
+
<table>
|
92
|
+
<tr>
|
93
|
+
<th>Key</th>
|
94
|
+
<th>Description</th>
|
95
|
+
</tr>
|
96
|
+
<tr>
|
97
|
+
<td>:connect_timeout</td>
|
98
|
+
<td>Connection timeout (default: 60 seconds)</td>
|
99
|
+
</tr>
|
100
|
+
<tr>
|
101
|
+
<td>:read_timeout</td>
|
102
|
+
<td>Read timeout for connection (default: 60 seconds)</td> </tr>
|
103
|
+
<tr>
|
104
|
+
<td>:write_timeout</td>
|
105
|
+
<td>Write timeout for connection (default: 60 seconds)</td>
|
106
|
+
</tr>
|
107
|
+
<tr>
|
108
|
+
<td>:proxy</td>
|
109
|
+
<td>Proxy for HTTP and HTTPS connections</td>
|
110
|
+
</tr>
|
111
|
+
<tr>
|
112
|
+
<td>:ssl_ca_path</td>
|
113
|
+
<td>Path to SSL certificate authorities</td>
|
114
|
+
</tr>
|
115
|
+
<tr>
|
116
|
+
<td>:ssl_ca_file</td>
|
117
|
+
<td>SSL certificate authority file</td>
|
118
|
+
</tr>
|
119
|
+
<tr>
|
120
|
+
<td>:ssl_verify_peer</td>
|
121
|
+
<td>SSL verify peer (default: true)</td>
|
122
|
+
</tr>
|
123
|
+
</table>
|
124
|
+
|
125
|
+
|
126
|
+
## Fog Abstractions
|
127
|
+
|
128
|
+
Fog provides both a **model** and **request** abstraction. The request abstraction provides the most efficient interface and the model abstraction wraps the request abstraction to provide a convenient `ActiveModel`-like interface.
|
129
|
+
|
130
|
+
### Request Layer
|
131
|
+
|
132
|
+
The request abstraction maps directly to the [Auto Scale API](http://docs.rackspace.com//cas/api/v1.0/autoscale-devguide/content/API_Operations.html). It provides the most efficient interface to the Rackspace Open Cloud.
|
133
|
+
|
134
|
+
To see a list of requests supported by the service:
|
135
|
+
|
136
|
+
service.requests
|
137
|
+
|
138
|
+
This returns:
|
139
|
+
|
140
|
+
:list_groups, :create_group, :get_group, :delete_group, :get_group_state, :pause_group_state, :resume_group_state, :get_group_config, :update_group_config, :get_launch_config, :update_launch_config, :list_policies, :create_policy, :get_policy, :update_policy, :delete_policy, :execute_policy, :execute_anonymous_webhook, :get_webhook, :list_webhooks, :create_webhook, :update_webhook, :delete_webhook
|
141
|
+
|
142
|
+
|
143
|
+
#### Example Request
|
144
|
+
|
145
|
+
To request a list of volume types:
|
146
|
+
|
147
|
+
response = service.list_groups
|
148
|
+
|
149
|
+
This returns in the following `Excon::Response`:
|
150
|
+
|
151
|
+
#<Excon::Response:0x007fd3ea78af08 @data={:body=>{"groups_links"=>[], "groups"=>[{"paused"=>false, "desiredCapacity"=>0, "links"=>[{"href"=>"https://ord.autoscale.api.rackspacecloud.com/v1.0/555/groups/b45e6107-26ca-4a93-869d-46bf20005df3/", "rel"=>"self"}], "active"=>[], "pendingCapacity"=>0, "activeCapacity"=>0, "id"=>"b45e6107-26ca-4a93-869d-46bf20005df3", "name"=>"fog-scailing-group"}]}, :headers=>{"Content-Type"=>"application/json", "Via"=>"1.1 Repose (Repose/2.8.2)", "x-response-id"=>"4c2a8f70-a7da-479a-bf69-6882b5b6346e", "Date"=>"Fri, 27 Sep 2013 15:38:10 GMT", "Transfer-Encoding"=>"chunked", "Server"=>"Jetty(8.0.y.z-SNAPSHOT)"}, :status=>200, :remote_ip=>"162.209.41.103"}, @body="{\"groups_links\": [], \"groups\": [{\"paused\": false, \"desiredCapacity\": 0, \"links\": [{\"href\": \"https://ord.autoscale.api.rackspacecloud.com/v1.0/555/groups/b45e6107-26ca-4a93-869d-46bf20005df3/\", \"rel\": \"self\"}], \"active\": [], \"pendingCapacity\": 0, \"activeCapacity\": 0, \"id\": \"b45e6107-26ca-4a93-869d-46bf20005df3\", \"name\": \"fog-scailing-group\"}]}", @headers={"Content-Type"=>"application/json", "Via"=>"1.1 Repose (Repose/2.8.2)", "x-response-id"=>"4c2a8f70-a7da-479a-bf69-6882b5b6346e", "Date"=>"Fri, 27 Sep 2013 15:38:10 GMT", "Transfer-Encoding"=>"chunked", "Server"=>"Jetty(8.0.y.z-SNAPSHOT)"}, @status=200, @remote_ip="162.209.41.103">
|
152
|
+
|
153
|
+
To view the status of the response:
|
154
|
+
|
155
|
+
response.status
|
156
|
+
|
157
|
+
**Note**: Fog is aware of valid HTTP response statuses for each request type. If an unexpected HTTP response status occurs, Fog will raise an exception.
|
158
|
+
|
159
|
+
To view response body:
|
160
|
+
|
161
|
+
response.body
|
162
|
+
|
163
|
+
returns:
|
164
|
+
|
165
|
+
{"groups_links"=>[], "groups"=>[{"paused"=>false, "desiredCapacity"=>0, "links"=>[{"href"=>"https://ord.autoscale.api.rackspacecloud.com/v1.0/555/groups/b45e6107-26ca-4a93-869d-46bf20005df3/", "rel"=>"self"}], "active"=>[], "pendingCapacity"=>0, "activeCapacity"=>0, "id"=>"b45e6107-26ca-4a93-869d-46bf20005df3", "name"=>"fog-scailing-group"}]}
|
166
|
+
|
167
|
+
|
168
|
+
To learn more about auto scale request methods refer to [rdoc](http://rubydoc.info/gems/fog/Fog/Rackspace/AutoScale/Real). To learn more about Excon refer to [Excon GitHub repo](https://github.com/geemus/excon).
|
169
|
+
|
170
|
+
### Model Layer
|
171
|
+
|
172
|
+
Fog models behave in a manner similar to `ActiveModel`. Models will generally respond to `create`, `save`, `persisted?`, `destroy`, `reload` and `attributes` methods. Additionally, fog will automatically create attribute accessors.
|
173
|
+
|
174
|
+
Here is a summary of common model methods:
|
175
|
+
|
176
|
+
<table>
|
177
|
+
<tr>
|
178
|
+
<th>Method</th>
|
179
|
+
<th>Description</th>
|
180
|
+
</tr>
|
181
|
+
<tr>
|
182
|
+
<td>create</td>
|
183
|
+
<td>
|
184
|
+
Accepts hash of attributes and creates object.<br>
|
185
|
+
Note: creation is a non-blocking call and you will be required to wait for a valid state before using resulting object.
|
186
|
+
</td>
|
187
|
+
</tr>
|
188
|
+
<tr>
|
189
|
+
<td>save</td>
|
190
|
+
<td>Saves object.<br>
|
191
|
+
Note: not all objects support updating object.</td>
|
192
|
+
</tr>
|
193
|
+
<tr>
|
194
|
+
<td>persisted?</td>
|
195
|
+
<td>Returns true if the object has been persisted.</td>
|
196
|
+
</tr>
|
197
|
+
<tr>
|
198
|
+
<td>destroy</td>
|
199
|
+
<td>
|
200
|
+
Destroys object.<br>
|
201
|
+
Note: this is a non-blocking call and object deletion might not be instantaneous.
|
202
|
+
</td>
|
203
|
+
<tr>
|
204
|
+
<td>reload</td>
|
205
|
+
<td>Updates object with latest state from service.</td>
|
206
|
+
<tr>
|
207
|
+
<td>ready?</td>
|
208
|
+
<td>Returns true if object is in a ready state and able to perform actions. This method will raise an exception if object is in an error state.</td>
|
209
|
+
</tr>
|
210
|
+
<tr>
|
211
|
+
<td>attributes</td>
|
212
|
+
<td>Returns a hash containing the list of model attributes and values.</td>
|
213
|
+
</tr>
|
214
|
+
<td>identity</td>
|
215
|
+
<td>
|
216
|
+
Returns the identity of the object.<br>
|
217
|
+
Note: This might not always be equal to object.id.
|
218
|
+
</td>
|
219
|
+
</tr>
|
220
|
+
<tr>
|
221
|
+
<td>wait_for</td>
|
222
|
+
<td>This method periodically reloads model and then yields to specified block until block returns true or a timeout occurs.</td>
|
223
|
+
</tr>
|
224
|
+
</table>
|
225
|
+
|
226
|
+
The remainder of this document details the model abstraction.
|
227
|
+
|
228
|
+
## The Scaling Group
|
229
|
+
|
230
|
+
* The **Scaling Group** is the basic unit of automatic scaling. It determines the minimum and maximum number of servers that exist at any time for the group, the cooldown period between scaling events, the configuration for each new server, the load balancer to add these servers to (optional), and any policies that are used for this group.
|
231
|
+
|
232
|
+
### List Scaling Groups
|
233
|
+
|
234
|
+
To retrieve the list of your scaling groups:
|
235
|
+
|
236
|
+
service.groups
|
237
|
+
|
238
|
+
This returns a collection of `Fog::Rackspace::AutoScale::Group` objects:
|
239
|
+
|
240
|
+
<Fog::Rackspace::AutoScale::Groups
|
241
|
+
[
|
242
|
+
<Fog::Rackspace::AutoScale::Group
|
243
|
+
id="b45e6107-26ca-4a93-869d-46bf20005df3",
|
244
|
+
links=[{"href"=>"https://ord.autoscale.api.rackspacecloud.com/v1.0/555/groups/b45e6107-26ca-4a93-869d-46bf20005df3/", "rel"=>"self"}]
|
245
|
+
>
|
246
|
+
]
|
247
|
+
>
|
248
|
+
|
249
|
+
To view the [launch configuration](#launch-configurations) for a group execute the following:
|
250
|
+
|
251
|
+
groups = service.groups
|
252
|
+
group = group.first
|
253
|
+
group.launch_config
|
254
|
+
|
255
|
+
This returns a `Fog::Rackspace::AutoScale::LaunchConfig`:
|
256
|
+
|
257
|
+
<Fog::Rackspace::AutoScale::LaunchConfig
|
258
|
+
group= <Fog::Rackspace::AutoScale::Group
|
259
|
+
id="b45e6107-26ca-4a93-869d-46bf20005df3",
|
260
|
+
links=[{"href"=>"https://ord.autoscale.api.rackspacecloud.com/v1.0/5555/groups/b45e6107-26ca-4a93-869d-46bf20005df3/", "rel"=>"self"}]
|
261
|
+
>,
|
262
|
+
type="launch_server",
|
263
|
+
args={"loadBalancers"=>[{"port"=>8080, "loadBalancerId"=>9099}], "server"=>{"name"=>"autoscale_server", "imageRef"=>"0d589460-f177-4b0f-81c1-8ab8903ac7d8", "flavorRef"=>"2", "OS-DCF =>diskConfig"=>"AUTO", "metadata"=>{"build_config"=>"core", "meta_key_1"=>"meta_value_1", "meta_key_2"=>"meta_value_2"}, "networks"=>[{"uuid"=>"11111111-1111-1111-1111-111111111111"}, {"uuid"=>"00000000-0000-0000-0000-000000000000"}], "personality"=>[{"path"=>"/root/.csivh", "contents"=>"VGhpcyBpcyBhIHRlc3QgZmlsZS4="}]}}
|
264
|
+
>
|
265
|
+
|
266
|
+
### Getting the Current State of a Scaling Group
|
267
|
+
|
268
|
+
It is sometimes helpful to determine what the current state of a scaling group is in terms of whether it is scaling up, scaling down, or stable.
|
269
|
+
|
270
|
+
To see your group's current state execute the following:
|
271
|
+
|
272
|
+
group.state
|
273
|
+
|
274
|
+
This returns the following:
|
275
|
+
|
276
|
+
{"paused"=>false, "desiredCapacity"=>0, "links"=>[{"href"=>"https://ord.autoscale.api.rackspacecloud.com/v1.0/555/groups/b45e6107-26ca-4a93-869d-46bf20005df3/", "rel"=>"self"}], "active"=>[], "pendingCapacity"=>0, "activeCapacity"=>0, "id"=>"b45e6107-26ca-4a93-869d-46bf20005df3", "name"=>"fog-scailing-group"}
|
277
|
+
|
278
|
+
The `active` key holds a list of the IDs of the servers created as part of this scaling group. The `paused` key shows whether or not the scaling group's response to alarms is active or not. There are 3 'capacity'-related keys: `activeCapacity`, `desiredCapacity`, and `pendingCapacity`:
|
279
|
+
|
280
|
+
Key | Represents
|
281
|
+
---- | ----
|
282
|
+
**activeCapacity** | The number of active servers that are part of this scaling group
|
283
|
+
**desiredCapacity** | The target number of servers for this scaling group, based on the combination of configuration settings and monitoring alarm responses
|
284
|
+
**pendingCapacity** | The number of servers which are in the process of being created (when positive) or destroyed (when negative).
|
285
|
+
|
286
|
+
### Pausing a Scaling Group's Policies
|
287
|
+
|
288
|
+
To pause a scaling group's execution:
|
289
|
+
|
290
|
+
group.pause
|
291
|
+
|
292
|
+
There is a corresponding `resume` method to resume execution:
|
293
|
+
|
294
|
+
group.resume
|
295
|
+
|
296
|
+
### Creating a Scaling Group
|
297
|
+
|
298
|
+
There are many options available to you when creating a scaling group. In order to ease the burden, a builder is provided.
|
299
|
+
|
300
|
+
To create a scaling group with the builder you first include the builder in your script:
|
301
|
+
|
302
|
+
require 'fog/rackspace/models/auto_scale/group_builder'
|
303
|
+
|
304
|
+
And then use the builder as follows:
|
305
|
+
|
306
|
+
INTERNET = '00000000-0000-0000-0000-000000000000'
|
307
|
+
SERVICE_NET = '11111111-1111-1111-1111-111111111111'
|
308
|
+
|
309
|
+
attributes = {
|
310
|
+
:server_name => "testgroup",
|
311
|
+
:image => my_image,
|
312
|
+
:flavor => 3,
|
313
|
+
:networks => [INTERNET, SERVICE_NET],
|
314
|
+
:personality => [
|
315
|
+
{
|
316
|
+
"path" => "/root/.csivh",
|
317
|
+
"contents" => "VGhpcyBpcyBhIHRlc3QgZmlsZS4="
|
318
|
+
}
|
319
|
+
],
|
320
|
+
:max_entities => 3,
|
321
|
+
:min_entities => 2,
|
322
|
+
:cooldown => cooldown,
|
323
|
+
:name => "MyScalingGroup",
|
324
|
+
:metadata => { "created_by" => "autoscale sample script" },
|
325
|
+
:load_balancers => {
|
326
|
+
:port => 80,
|
327
|
+
:loadBalancerId => 1234
|
328
|
+
}
|
329
|
+
:launch_config_type => :launch_server
|
330
|
+
}
|
331
|
+
|
332
|
+
group = Fog::Rackspace::AutoScale::GroupBuilder.build(service, attributes)
|
333
|
+
|
334
|
+
This creates the scaling group with the name `MyScalingGroup`, and returns a `Fog::Rackspace::AutoScale::Group` object representing the new group. Since the `:min_entities` is 2, it immediately creates 2 servers for the group, based on the image whose ID is in the variable `my_image`. When they are created, they are then added to the load balancer whose ID is `1234`, and receive requests on port 80.
|
335
|
+
|
336
|
+
Note that the `:server_name` parameter represents a base string to which Autoscale prepends a 10-character prefix to create a unique name for each server. The prefix always begins with 'as' and is followed by 8 random hex digits and a dash (-). For example, if you set the server_name to 'testgroup', and the scaling group creates 3 servers, their names would look like these:
|
337
|
+
|
338
|
+
as5defddd4-testgroup
|
339
|
+
as92e512fe-testgroup
|
340
|
+
asedcf7587-testgroup
|
341
|
+
|
342
|
+
#### Parameters
|
343
|
+
Parameter | Required | Default | Notes
|
344
|
+
---- | ---- | ---- | ----
|
345
|
+
**:name** | yes | |
|
346
|
+
**:cooldown** | yes | | Period in seconds after a scaling event in which further events are ignored
|
347
|
+
**:min_entities** | yes | |
|
348
|
+
**:max_entities** | yes | |
|
349
|
+
**:launch_config_type** | yes | | Only option currently is`:launch_server`
|
350
|
+
**:flavor** | yes | | Flavor to use for each server that is launched. This can be a `Fog::Compute::RackspaceV2::Flavor` or an ID.
|
351
|
+
**:server_name** | yes | | The base name for servers created by Autoscale.
|
352
|
+
**:image** | yes | | This can be a `Fog::Compute::RackspaceV2::Image` or an id. This is the image that all new servers are created from.
|
353
|
+
**:disk_config** | no | MANUAL | Determines if the server's disk is partitioned to the full size of the flavor ('AUTO') or just to the size of the image ('MANUAL').
|
354
|
+
**:server_metadata** | no | | Arbitrary key-value pairs you want to associate with your servers.
|
355
|
+
**:personality** | no | | Small text files that are created on the new servers. _Personality_ is discussed in the [Rackspace Cloud Servers documentation](http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Server_Personality-d1e2543.html)
|
356
|
+
**:networks** | no | | Any array of networks to which you want to attach new servers. See the [Create Servers documentation](http://docs.rackspace.com/servers/api/v2/cs-devguide/content/CreateServers.html) for standard network IDs.
|
357
|
+
**:load_balancers** | no | | Either a hash of {:port, :loadBalancerId} or a `Fog::Rackspace::LoadBalancers::LoadBalancer` object.
|
358
|
+
**scaling_policies** | no | | You can define the scaling policies when you create the group, or add them later.
|
359
|
+
|
360
|
+
### Updating a Scaling Configuration Group
|
361
|
+
|
362
|
+
A group's scaling configuration can be updated via the `Fog::Rackspace::AutoScale::GroupConfig` object. You can retrieve this object by executing the following:
|
363
|
+
|
364
|
+
group_config = group.group_config
|
365
|
+
|
366
|
+
Available options on `group_config` include `:max_entities`, `:name`, `:cooldown`, `:min_entities`, `:metadata`. To update a scaling group, pass one or more of these as keyword arguments. For example, to change the cooldown period to 2 minutes and increase the maximum entities to 16, you call:
|
367
|
+
|
368
|
+
group_config.cooldown = 120
|
369
|
+
group_config.max_entities = 16
|
370
|
+
group_config.save
|
371
|
+
|
372
|
+
**Note**: If you pass any metadata values in this call, it must be the full set of metadata for the Scaling Group, since the underlying API call **overwrites** any existing metadata.
|
373
|
+
|
374
|
+
### Deleting a Scaling Group
|
375
|
+
|
376
|
+
To remove a scaling group, call its `destroy` method:
|
377
|
+
|
378
|
+
group.destroy
|
379
|
+
|
380
|
+
Note: you cannot delete a scaling group that has active servers in it. You must first delete the servers by setting the `min_entities` and `max_entities` to zero:
|
381
|
+
|
382
|
+
group_config = group.group_config
|
383
|
+
group_config.min_entities = 0
|
384
|
+
group_config.max_entities = 0
|
385
|
+
group_config.save
|
386
|
+
|
387
|
+
Once the servers are deleted you can then delete the scaling group.
|
388
|
+
|
389
|
+
## Launch Configurations
|
390
|
+
|
391
|
+
Each scaling group has an associated **launch configuration**. This determines the properties of servers that are created in response to a scaling event.
|
392
|
+
|
393
|
+
The `:server_name` represents a base string to which Autoscale prepends a 10-character prefix. The prefix always begins with 'as' and is followed by 8 random hex digits and a dash (-). For example, if you set the `server_name` to 'testgroup', and the scaling group creates 3 servers, their names would look like these:
|
394
|
+
|
395
|
+
as5defddd4-testgroup
|
396
|
+
as92e512fe-testgroup
|
397
|
+
asedcf7587-testgroup
|
398
|
+
|
399
|
+
To retrieve the launch config:
|
400
|
+
|
401
|
+
launch_config = group.launch_config
|
402
|
+
|
403
|
+
The launch configuration contains two attributes `:type` and `:args`. The only launch type currently available for auto scale is `:launch_server`. The `args` attribute contains a hash with the launch server configuration options as follows:
|
404
|
+
|
405
|
+
{"server"=>{
|
406
|
+
"name"=>"autoscale_server",
|
407
|
+
"imageRef"=>"66448837-1a58-4bd2-a647-9f3272f36263",
|
408
|
+
"flavorRef"=>"2",
|
409
|
+
"networks"=>[{"uuid"=>"00000000-0000-0000-0000-000000000000"}, {"uuid"=>"11111111-1111-1111-1111-111111111111"}],
|
410
|
+
"personality"=>[{"path"=>"/root/.csivh", "contents"=>"VGhpcyBpcyBhIHRlc3QgZmlsZS4="}],
|
411
|
+
"OS-DCF =>diskConfig"=>"MANUAL",
|
412
|
+
"metadata"=>{}}}
|
413
|
+
|
414
|
+
Changes to the args attribute can be saved by executing the `save` method on the `launch_config`. For example if you wanted to change the disk configuration to `AUTO`, you would do the following:
|
415
|
+
|
416
|
+
launch_config.args["server"]["OS-DCF =>diskConfig"] = "AUTO"
|
417
|
+
launch_config.save
|
418
|
+
|
419
|
+
**Note**: If you pass any metadata values in this call, it must be the full set of metadata for the launch configuration, since the underlying API call **overwrites** any existing metadata.
|
420
|
+
|
421
|
+
## Policies
|
422
|
+
|
423
|
+
When an alarm is triggered in Cloud Monitoring, it calls the webhook associated with a particular policy. The policy is designed to update the scaling group to increase or decrease the number of servers in response to the particular alarm.
|
424
|
+
|
425
|
+
To list the policies for a given scaling group use the following:
|
426
|
+
|
427
|
+
policies = group.policies
|
428
|
+
|
429
|
+
### Creating a Policy
|
430
|
+
|
431
|
+
To add a policy to a scaling group use the following:
|
432
|
+
|
433
|
+
group.policies.create :name => 'Scale by one server', :cooldown => 360, :type => 'webhook', :change => 1
|
434
|
+
|
435
|
+
#### Parameters
|
436
|
+
Parameter | Required | Default | Notes
|
437
|
+
---- | ---- | ---- | ----
|
438
|
+
**:name** | yes | |
|
439
|
+
**:type** | yes | | This can be "webhook", "schedule" or "cloud_monitoring"
|
440
|
+
**:cooldown** | yes | | Period in seconds after a policy execution in which further events are ignored. This is separate from the overall cooldown for the scaling group.
|
441
|
+
**:change** | no | | Can be positive or negative, which makes this a scale-up or scale-down policy, respectively. If this value is specified you can not specify `:change_percent`.
|
442
|
+
**:change_percent** | no | | The percentage change to the autoscale group's number of units. If this value is specified you can not specify `:change`.
|
443
|
+
**:args** | no | | This is used to specify schedule parameters. Please refer to [Policy documentation](http://docs-internal-staging.rackspace.com/cas/api/v1.0/autoscale-devguide/content/POST_createPolicies_v1.0__tenantId__groups__groupId__policies_Policies.html) for more information.
|
444
|
+
|
445
|
+
### Updating a Policy
|
446
|
+
|
447
|
+
You may update a policy at any time, passing in any or all of the above parameters to change that value. For example, to change the cooldown to 60 seconds, and the number of servers to remove to 3, call:
|
448
|
+
|
449
|
+
policy.cooldown = 60
|
450
|
+
policy.change = 3
|
451
|
+
policy.save
|
452
|
+
|
453
|
+
### Executing a Policy
|
454
|
+
|
455
|
+
You don't need to wait for an alarm to be triggered in Cloud Monitoring in order to execute a particular policy. If desired, you may do so manually by calling the policy's `execute` method:
|
456
|
+
|
457
|
+
policy.execute
|
458
|
+
|
459
|
+
### Deleting a Policy
|
460
|
+
|
461
|
+
To remove a policy, call its `destroy` method:
|
462
|
+
|
463
|
+
policy.destroy
|
464
|
+
|
465
|
+
## Webhooks
|
466
|
+
|
467
|
+
When an alarm is triggered in Cloud Monitoring, it calls the associated webhook, which in turn causes the policy for that webhook to be executed.
|
468
|
+
|
469
|
+
To list the webhooks for a given policy:
|
470
|
+
|
471
|
+
webhooks = policy.webhooks
|
472
|
+
|
473
|
+
|
474
|
+
### Creating a Webhook
|
475
|
+
|
476
|
+
To add a webhook to a policy:
|
477
|
+
|
478
|
+
webhook = policy.webhooks.create :name => 'my-webhook'
|
479
|
+
|
480
|
+
|
481
|
+
The `:name` parameter is required; the `:metadata` parameter is optional. You can retrieve the webhook by executing:
|
482
|
+
|
483
|
+
webhook.execution_url
|
484
|
+
|
485
|
+
### Updating a Webhook
|
486
|
+
|
487
|
+
You may update a webhook at any time to change either its name or its metadata:
|
488
|
+
|
489
|
+
webhook.name = 'webhook1'
|
490
|
+
webhook.metadata = {
|
491
|
+
:owner => 'webteam'
|
492
|
+
}
|
493
|
+
webhook.save
|
494
|
+
|
495
|
+
**Note**: If you pass any metadata values in this call, it must be the full set of metadata for the Webhook, since the underlying API call **overwrites** any existing metadata.
|
496
|
+
|
497
|
+
### Deleting a webhook
|
498
|
+
|
499
|
+
When you wish to remove a webhook, call its `destroy` method:
|
500
|
+
|
501
|
+
webhook.destroy
|
@@ -138,7 +138,7 @@ To view the status of the response:
|
|
138
138
|
response.status
|
139
139
|
|
140
140
|
**Note**: Fog is aware of valid HTTP response statuses for each request type. If an unexpected HTTP response status occurs, Fog will raise an exception.
|
141
|
-
|
141
|
+
|
142
142
|
To view response body:
|
143
143
|
|
144
144
|
response.body
|
@@ -152,7 +152,7 @@ To learn more about Compute request methods refer to [rdoc](http://rubydoc.info/
|
|
152
152
|
|
153
153
|
### Model Layer
|
154
154
|
|
155
|
-
Fog models behave in a manner similar to `ActiveModel`. Models will generally respond to `create`, `save`, `persisted?`, `destroy`, `reload` and `attributes` methods. Additionally, fog will automatically create attribute accessors.
|
155
|
+
Fog models behave in a manner similar to `ActiveModel`. Models will generally respond to `create`, `save`, `persisted?`, `destroy`, `reload` and `attributes` methods. Additionally, fog will automatically create attribute accessors.
|
156
156
|
|
157
157
|
Here is a summary of common model methods:
|
158
158
|
|
@@ -70,6 +70,7 @@ These services can be explored in further depth in the following documents:
|
|
70
70
|
* [Next Generation Cloud Servers™ (compute_v2)](compute_v2.md)
|
71
71
|
* [Cloud Files™ (storage)](storage.md)
|
72
72
|
* [Cloud Block Storage (block_storage)](block_storage.md)
|
73
|
+
* [Auto Scale (auto_scale)](auto_scale.md)
|
73
74
|
|
74
75
|
**Note**: The compute service provides an interface to the First Geneneration Cloud Servers™ (compute). This service is deprecated. Users are encouraged to use Next Geneneration Cloud Servers™ (compute_v2).
|
75
76
|
|
@@ -193,7 +193,7 @@ To learn more about `Fog::Storage` request methods refer to [rdoc](http://rubydo
|
|
193
193
|
|
194
194
|
### Model Layer
|
195
195
|
|
196
|
-
Fog models behave in a manner similar to `ActiveModel`. Models will generally respond to `create`, `save`, `destroy`, `reload` and `attributes` methods. Additionally, fog will automatically create attribute accessors.
|
196
|
+
Fog models behave in a manner similar to `ActiveModel`. Models will generally respond to `create`, `save`, `destroy`, `reload` and `attributes` methods. Additionally, fog will automatically create attribute accessors.
|
197
197
|
|
198
198
|
Here is a summary of common model methods:
|
199
199
|
|
@@ -0,0 +1,68 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# This example demonstrates adding a poicy to an auto scaling group with the Rackpace Open Cloud
|
4
|
+
|
5
|
+
require 'fog'
|
6
|
+
|
7
|
+
def get_user_input(prompt)
|
8
|
+
print "#{prompt}: "
|
9
|
+
gets.chomp
|
10
|
+
end
|
11
|
+
|
12
|
+
def get_user_input_as_int(prompt)
|
13
|
+
str = get_user_input(prompt)
|
14
|
+
str.to_i
|
15
|
+
end
|
16
|
+
|
17
|
+
# Use username defined in ~/.fog file, if absent prompt for username.
|
18
|
+
# For more details on ~/.fog refer to http://fog.io/about/getting_started.html
|
19
|
+
def rackspace_username
|
20
|
+
Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username")
|
21
|
+
end
|
22
|
+
|
23
|
+
# Use api key defined in ~/.fog file, if absent prompt for api key
|
24
|
+
# For more details on ~/.fog refer to http://fog.io/about/getting_started.html
|
25
|
+
def rackspace_api_key
|
26
|
+
Fog.credentials[:rackspace_api_key] || get_user_input("Enter Rackspace API key")
|
27
|
+
end
|
28
|
+
|
29
|
+
def select_group(groups)
|
30
|
+
abort "\nThere are not any scaling groups in the Chicago region. Try running create_scaling_group.rb\n\n" if groups.empty?
|
31
|
+
|
32
|
+
puts "\nSelect Group For New Policy:\n\n"
|
33
|
+
groups.each_with_index do |group, i|
|
34
|
+
config = group.group_config
|
35
|
+
puts "\t #{i}. #{config.name}"
|
36
|
+
end
|
37
|
+
|
38
|
+
select_str = get_user_input "\nEnter Group Number"
|
39
|
+
groups[select_str.to_i]
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
# create auto scaling service
|
44
|
+
auto_scale_service = Fog::Rackspace::AutoScale.new({
|
45
|
+
:rackspace_username => rackspace_username,
|
46
|
+
:rackspace_api_key => rackspace_api_key,
|
47
|
+
:rackspace_region => :ord # Use Chicago Region
|
48
|
+
})
|
49
|
+
|
50
|
+
|
51
|
+
# retrieve list of scaling groups
|
52
|
+
groups = auto_scale_service.groups
|
53
|
+
|
54
|
+
# prompt group
|
55
|
+
group = select_group(groups)
|
56
|
+
|
57
|
+
# prompt for policy name
|
58
|
+
policy_name = get_user_input "Enter name for policy"
|
59
|
+
|
60
|
+
# prompt for cool down period for policy
|
61
|
+
cooldown = get_user_input_as_int "Enter cool down period in seconds"
|
62
|
+
|
63
|
+
# prompt for change increment
|
64
|
+
change = get_user_input_as_int "Enter change increment"
|
65
|
+
|
66
|
+
group.policies.create :name => policy_name, :cooldown => cooldown, :type => 'webhook', :change => change
|
67
|
+
|
68
|
+
puts "\nPolicy #{policy_name} was successfully added to group"
|
@@ -0,0 +1,74 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# This example demonstrates adding a webhook to an auto scaling group with the Rackpace Open Cloud
|
4
|
+
|
5
|
+
require 'fog'
|
6
|
+
|
7
|
+
def get_user_input(prompt)
|
8
|
+
print "#{prompt}: "
|
9
|
+
gets.chomp
|
10
|
+
end
|
11
|
+
|
12
|
+
# Use username defined in ~/.fog file, if absent prompt for username.
|
13
|
+
# For more details on ~/.fog refer to http://fog.io/about/getting_started.html
|
14
|
+
def rackspace_username
|
15
|
+
Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username")
|
16
|
+
end
|
17
|
+
|
18
|
+
# Use api key defined in ~/.fog file, if absent prompt for api key
|
19
|
+
# For more details on ~/.fog refer to http://fog.io/about/getting_started.html
|
20
|
+
def rackspace_api_key
|
21
|
+
Fog.credentials[:rackspace_api_key] || get_user_input("Enter Rackspace API key")
|
22
|
+
end
|
23
|
+
|
24
|
+
def select_group(groups)
|
25
|
+
abort "\nThere are no groups in the Chicago region. Try running create_scaling_group.rb\n\n" if groups.empty?
|
26
|
+
|
27
|
+
puts "\nSelect Group With Policy:\n\n"
|
28
|
+
groups.each_with_index do |group, i|
|
29
|
+
config = group.group_config
|
30
|
+
puts "\t #{i}. #{config.name}"
|
31
|
+
end
|
32
|
+
|
33
|
+
select_str = get_user_input "\nEnter Group Number"
|
34
|
+
groups[select_str.to_i]
|
35
|
+
end
|
36
|
+
|
37
|
+
def select_policy(policies)
|
38
|
+
abort "\nThere are no policies for this scaling group. Try running add_policy.rb\n\n" if policies.empty?
|
39
|
+
|
40
|
+
puts "\nSelect Policy Triggered By Webhook:\n\n"
|
41
|
+
policies.each_with_index do |policy, i|
|
42
|
+
puts "\t #{i}. #{policy.name}"
|
43
|
+
end
|
44
|
+
|
45
|
+
select_str = get_user_input "\nEnter Policy Number"
|
46
|
+
policies[select_str.to_i]
|
47
|
+
end
|
48
|
+
|
49
|
+
# create auto scaling service
|
50
|
+
auto_scale_service = Fog::Rackspace::AutoScale.new({
|
51
|
+
:rackspace_username => rackspace_username,
|
52
|
+
:rackspace_api_key => rackspace_api_key,
|
53
|
+
:rackspace_region => :ord # Use Chicago Region
|
54
|
+
})
|
55
|
+
|
56
|
+
# retrieve list of scaling groups
|
57
|
+
groups = auto_scale_service.groups
|
58
|
+
|
59
|
+
# prompt for group
|
60
|
+
group = select_group(groups)
|
61
|
+
|
62
|
+
# retrieve list of policies for group
|
63
|
+
policies = group.policies
|
64
|
+
|
65
|
+
# prompt for policy to delete
|
66
|
+
policy = select_policy(policies)
|
67
|
+
|
68
|
+
# prompt for webhook name
|
69
|
+
webhook_name = get_user_input "Enter name for webhook"
|
70
|
+
|
71
|
+
# create webhook
|
72
|
+
webhook = policy.webhooks.create :name => webhook_name
|
73
|
+
|
74
|
+
puts "\nWebhook #{webhook.name} was successfully added - #{webhook.execution_url}"
|