fog-maestrodev 1.15.0.20130829165835 → 1.15.0.20130927082724
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/README.md +1 -0
- data/fog.gemspec +5 -2
- data/lib/fog.rb +1 -0
- data/lib/fog/atmos/models/storage/file.rb +2 -1
- data/lib/fog/aws.rb +4 -1
- data/lib/fog/aws/data_pipeline.rb +3 -0
- data/lib/fog/aws/elasticache.rb +2 -0
- data/lib/fog/aws/models/auto_scaling/group.rb +12 -12
- data/lib/fog/aws/models/compute/subnet.rb +3 -1
- data/lib/fog/aws/models/elasticache/cluster.rb +3 -1
- data/lib/fog/aws/parsers/redshift/cluster.rb +29 -0
- data/lib/fog/aws/parsers/redshift/cluster_parser.rb +144 -0
- data/lib/fog/aws/parsers/redshift/cluster_security_group_parser.rb +50 -0
- data/lib/fog/aws/parsers/redshift/cluster_snapshot.rb +32 -0
- data/lib/fog/aws/parsers/redshift/cluster_snapshot_parser.rb +66 -0
- data/lib/fog/aws/parsers/redshift/cluster_subnet_group_parser.rb +51 -0
- data/lib/fog/aws/parsers/redshift/create_cluster_parameter_group.rb +30 -0
- data/lib/fog/aws/parsers/redshift/create_cluster_security_group.rb +31 -0
- data/lib/fog/aws/parsers/redshift/describe_cluster_parameter_groups.rb +41 -0
- data/lib/fog/aws/parsers/redshift/describe_cluster_parameters.rb +48 -0
- data/lib/fog/aws/parsers/redshift/describe_cluster_security_groups.rb +38 -0
- data/lib/fog/aws/parsers/redshift/describe_cluster_snapshots.rb +38 -0
- data/lib/fog/aws/parsers/redshift/describe_cluster_subnet_groups.rb +58 -0
- data/lib/fog/aws/parsers/redshift/describe_cluster_versions.rb +53 -0
- data/lib/fog/aws/parsers/redshift/describe_clusters.rb +30 -0
- data/lib/fog/aws/parsers/redshift/describe_default_cluster_parameters.rb +49 -0
- data/lib/fog/aws/parsers/redshift/describe_events.rb +44 -0
- data/lib/fog/aws/parsers/redshift/describe_orderable_cluster_options.rb +54 -0
- data/lib/fog/aws/parsers/redshift/describe_reserved_node_offerings.rb +64 -0
- data/lib/fog/aws/parsers/redshift/describe_reserved_nodes.rb +71 -0
- data/lib/fog/aws/parsers/redshift/describe_resize.rb +60 -0
- data/lib/fog/aws/parsers/redshift/purchase_reserved_node_offering.rb +58 -0
- data/lib/fog/aws/parsers/redshift/revoke_cluster_security_group_ingress.rb +31 -0
- data/lib/fog/aws/parsers/redshift/update_cluster_parameter_group_parser.rb +29 -0
- data/lib/fog/aws/parsers/sts/get_session_token.rb +1 -3
- data/lib/fog/aws/redshift.rb +126 -0
- data/lib/fog/aws/requests/compute/run_instances.rb +2 -0
- data/lib/fog/aws/requests/data_pipeline/delete_pipeline.rb +2 -3
- data/lib/fog/aws/requests/data_pipeline/describe_objects.rb +41 -0
- data/lib/fog/aws/requests/data_pipeline/get_pipeline_definition.rb +37 -0
- data/lib/fog/aws/requests/data_pipeline/query_objects.rb +41 -0
- data/lib/fog/aws/requests/elasticache/authorize_cache_security_group_ingress.rb +27 -2
- data/lib/fog/aws/requests/elasticache/create_cache_security_group.rb +23 -2
- data/lib/fog/aws/requests/elasticache/delete_cache_security_group.rb +10 -1
- data/lib/fog/aws/requests/elasticache/describe_cache_security_groups.rb +36 -2
- data/lib/fog/aws/requests/redshift/authorize_cluster_security_group_ingress.rb +56 -0
- data/lib/fog/aws/requests/redshift/authorize_snapshot_access.rb +43 -0
- data/lib/fog/aws/requests/redshift/copy_cluster_snapshot.rb +48 -0
- data/lib/fog/aws/requests/redshift/create_cluster.rb +151 -0
- data/lib/fog/aws/requests/redshift/create_cluster_parameter_group.rb +54 -0
- data/lib/fog/aws/requests/redshift/create_cluster_security_group.rb +42 -0
- data/lib/fog/aws/requests/redshift/create_cluster_snapshot.rb +44 -0
- data/lib/fog/aws/requests/redshift/create_cluster_subnet_group.rb +50 -0
- data/lib/fog/aws/requests/redshift/delete_cluster.rb +51 -0
- data/lib/fog/aws/requests/redshift/delete_cluster_parameter_group.rb +34 -0
- data/lib/fog/aws/requests/redshift/delete_cluster_security_group.rb +33 -0
- data/lib/fog/aws/requests/redshift/delete_cluster_snapshot.rb +44 -0
- data/lib/fog/aws/requests/redshift/delete_cluster_subnet_group.rb +38 -0
- data/lib/fog/aws/requests/redshift/describe_cluster_parameter_groups.rb +48 -0
- data/lib/fog/aws/requests/redshift/describe_cluster_parameters.rb +55 -0
- data/lib/fog/aws/requests/redshift/describe_cluster_security_groups.rb +50 -0
- data/lib/fog/aws/requests/redshift/describe_cluster_snapshots.rb +73 -0
- data/lib/fog/aws/requests/redshift/describe_cluster_subnet_groups.rb +47 -0
- data/lib/fog/aws/requests/redshift/describe_cluster_versions.rb +54 -0
- data/lib/fog/aws/requests/redshift/describe_clusters.rb +49 -0
- data/lib/fog/aws/requests/redshift/describe_default_cluster_parameters.rb +49 -0
- data/lib/fog/aws/requests/redshift/describe_events.rb +80 -0
- data/lib/fog/aws/requests/redshift/describe_orderable_cluster_options.rb +55 -0
- data/lib/fog/aws/requests/redshift/describe_reserved_node_offerings.rb +48 -0
- data/lib/fog/aws/requests/redshift/describe_reserved_nodes.rb +48 -0
- data/lib/fog/aws/requests/redshift/describe_resize.rb +39 -0
- data/lib/fog/aws/requests/redshift/modify_cluster.rb +111 -0
- data/lib/fog/aws/requests/redshift/modify_cluster_parameter_group.rb +44 -0
- data/lib/fog/aws/requests/redshift/modify_cluster_subnet_group.rb +50 -0
- data/lib/fog/aws/requests/redshift/purchase_reserved_node_offering.rb +41 -0
- data/lib/fog/aws/requests/redshift/reboot_cluster.rb +37 -0
- data/lib/fog/aws/requests/redshift/reset_cluster_parameter_group.rb +57 -0
- data/lib/fog/aws/requests/redshift/restore_from_cluster_snapshot.rb +77 -0
- data/lib/fog/aws/requests/redshift/revoke_cluster_security_group_ingress.rb +56 -0
- data/lib/fog/aws/requests/redshift/revoke_snapshot_access.rb +44 -0
- data/lib/fog/aws/requests/sts/get_federation_token.rb +42 -0
- data/lib/fog/bin.rb +1 -0
- data/lib/fog/bin/aws.rb +4 -0
- data/lib/fog/bin/openstack.rb +5 -0
- data/lib/fog/bin/rackspace.rb +4 -0
- data/lib/fog/bin/vcloud_director.rb +30 -0
- data/lib/fog/brightbox/requests/compute/update_server.rb +1 -0
- data/lib/fog/cloudsigma/compute.rb +5 -0
- data/lib/fog/cloudsigma/models/fwpolicies.rb +21 -0
- data/lib/fog/cloudsigma/models/fwpolicy.rb +21 -0
- data/lib/fog/cloudsigma/models/rule.rb +21 -0
- data/lib/fog/cloudsigma/requests/list_fwpolicies.rb +18 -0
- data/lib/fog/compute.rb +7 -4
- data/lib/fog/core.rb +1 -0
- data/lib/fog/core/errors.rb +3 -0
- data/lib/fog/dynect/dns.rb +3 -1
- data/lib/fog/dynect/models/dns/records.rb +32 -20
- data/lib/fog/dynect/requests/dns/get_all_records.rb +56 -0
- data/lib/fog/dynect/requests/dns/get_node_list.rb +1 -1
- data/lib/fog/dynect/requests/dns/put_record.rb +76 -0
- data/lib/fog/google/models/compute/flavors.rb +2 -2
- data/lib/fog/google/requests/compute/get_machine_type.rb +7 -2
- data/lib/fog/joyent/compute.rb +1 -1
- data/lib/fog/linode/models/compute/server.rb +1 -1
- data/lib/fog/local/models/storage/directories.rb +1 -1
- data/lib/fog/openstack.rb +1 -0
- data/lib/fog/openstack/models/compute/images.rb +10 -2
- data/lib/fog/openstack/models/compute/server.rb +2 -0
- data/lib/fog/openstack/models/orchestration/stack.rb +52 -0
- data/lib/fog/openstack/models/orchestration/stacks.rb +21 -0
- data/lib/fog/openstack/orchestration.rb +227 -0
- data/lib/fog/openstack/requests/compute/create_server.rb +36 -25
- data/lib/fog/openstack/requests/compute/list_images_detail.rb +4 -3
- data/lib/fog/openstack/requests/orchestration/create_stack.rb +55 -0
- data/lib/fog/openstack/requests/orchestration/delete_stack.rb +36 -0
- data/lib/fog/openstack/requests/orchestration/list_stacks.rb +48 -0
- data/lib/fog/openstack/requests/orchestration/update_stack.rb +41 -0
- data/lib/fog/openstack/requests/storage/get_object.rb +7 -7
- data/lib/fog/openstack/storage.rb +2 -2
- data/lib/fog/orchestration.rb +25 -0
- data/lib/fog/rackspace.rb +1 -0
- data/lib/fog/rackspace/auto_scale.rb +132 -0
- data/lib/fog/rackspace/block_storage.rb +2 -2
- data/lib/fog/rackspace/cdn.rb +23 -23
- data/lib/fog/rackspace/compute.rb +2 -2
- data/lib/fog/rackspace/compute_v2.rb +2 -2
- data/lib/fog/rackspace/databases.rb +2 -2
- data/lib/fog/rackspace/dns.rb +14 -16
- data/lib/fog/rackspace/examples/compute_v2/create_network.rb +81 -0
- data/lib/fog/rackspace/examples/compute_v2/delete_network.rb +78 -0
- data/lib/fog/rackspace/load_balancers.rb +2 -2
- data/lib/fog/rackspace/mock_data.rb +69 -4
- data/lib/fog/rackspace/models/auto_scale/group.rb +207 -0
- data/lib/fog/rackspace/models/auto_scale/group_config.rb +60 -0
- data/lib/fog/rackspace/models/auto_scale/groups.rb +46 -0
- data/lib/fog/rackspace/models/auto_scale/launch_config.rb +44 -0
- data/lib/fog/rackspace/models/auto_scale/policies.rb +65 -0
- data/lib/fog/rackspace/models/auto_scale/policy.rb +206 -0
- data/lib/fog/rackspace/models/auto_scale/webhook.rb +105 -0
- data/lib/fog/rackspace/models/auto_scale/webhooks.rb +64 -0
- data/lib/fog/rackspace/models/block_storage/volume.rb +2 -1
- data/lib/fog/rackspace/models/monitoring/notification.rb +42 -0
- data/lib/fog/rackspace/models/monitoring/notifications.rb +30 -0
- data/lib/fog/rackspace/monitoring.rb +21 -14
- data/lib/fog/rackspace/requests/auto_scale/create_group.rb +61 -0
- data/lib/fog/rackspace/requests/auto_scale/create_policy.rb +45 -0
- data/lib/fog/rackspace/requests/auto_scale/create_webhook.rb +57 -0
- data/lib/fog/rackspace/requests/auto_scale/delete_group.rb +23 -0
- data/lib/fog/rackspace/requests/auto_scale/delete_policy.rb +31 -0
- data/lib/fog/rackspace/requests/auto_scale/delete_webhook.rb +34 -0
- data/lib/fog/rackspace/requests/auto_scale/execute_anonymous_webhook.rb +22 -0
- data/lib/fog/rackspace/requests/auto_scale/execute_policy.rb +22 -0
- data/lib/fog/rackspace/requests/auto_scale/get_group.rb +29 -0
- data/lib/fog/rackspace/requests/auto_scale/get_group_config.rb +30 -0
- data/lib/fog/rackspace/requests/auto_scale/get_group_state.rb +62 -0
- data/lib/fog/rackspace/requests/auto_scale/get_launch_config.rb +30 -0
- data/lib/fog/rackspace/requests/auto_scale/get_policy.rb +35 -0
- data/lib/fog/rackspace/requests/auto_scale/get_webhook.rb +39 -0
- data/lib/fog/rackspace/requests/auto_scale/list_groups.rb +35 -0
- data/lib/fog/rackspace/requests/auto_scale/list_policies.rb +23 -0
- data/lib/fog/rackspace/requests/auto_scale/list_webhooks.rb +33 -0
- data/lib/fog/rackspace/requests/auto_scale/pause_group_state.rb +23 -0
- data/lib/fog/rackspace/requests/auto_scale/resume_group_state.rb +23 -0
- data/lib/fog/rackspace/requests/auto_scale/update_group_config.rb +39 -0
- data/lib/fog/rackspace/requests/auto_scale/update_launch_config.rb +36 -0
- data/lib/fog/rackspace/requests/auto_scale/update_policy.rb +33 -0
- data/lib/fog/rackspace/requests/auto_scale/update_webhook.rb +44 -0
- data/lib/fog/rackspace/requests/compute_v2/delete_server.rb +2 -2
- data/lib/fog/rackspace/requests/load_balancers/create_load_balancer.rb +5 -6
- data/lib/fog/rackspace/requests/load_balancers/delete_load_balancer.rb +10 -0
- data/lib/fog/rackspace/requests/load_balancers/get_load_balancer.rb +30 -0
- data/lib/fog/rackspace/requests/monitoring/create_agent_token.rb +31 -0
- data/lib/fog/rackspace/requests/monitoring/create_alarm.rb +32 -0
- data/lib/fog/rackspace/requests/monitoring/create_check.rb +31 -0
- data/lib/fog/rackspace/requests/monitoring/create_entity.rb +32 -0
- data/lib/fog/rackspace/requests/monitoring/create_notification.rb +18 -0
- data/lib/fog/rackspace/requests/monitoring/delete_agent_token.rb +32 -0
- data/lib/fog/rackspace/requests/monitoring/delete_alarm.rb +27 -0
- data/lib/fog/rackspace/requests/monitoring/delete_check.rb +26 -0
- data/lib/fog/rackspace/requests/monitoring/delete_entity.rb +27 -0
- data/lib/fog/rackspace/requests/monitoring/delete_notification.rb +16 -0
- data/lib/fog/rackspace/requests/monitoring/get_agent_token.rb +33 -0
- data/lib/fog/rackspace/requests/monitoring/get_alarm.rb +38 -0
- data/lib/fog/rackspace/requests/monitoring/get_check.rb +41 -0
- data/lib/fog/rackspace/requests/monitoring/get_entity.rb +30 -21
- data/lib/fog/rackspace/requests/monitoring/get_notification.rb +50 -0
- data/lib/fog/rackspace/requests/monitoring/list_agent_tokens.rb +39 -0
- data/lib/fog/rackspace/requests/monitoring/list_alarms.rb +50 -0
- data/lib/fog/rackspace/requests/monitoring/list_check_types.rb +72 -0
- data/lib/fog/rackspace/requests/monitoring/list_checks.rb +54 -0
- data/lib/fog/rackspace/requests/monitoring/list_data_points.rb +37 -0
- data/lib/fog/rackspace/requests/monitoring/list_entities.rb +53 -0
- data/lib/fog/rackspace/requests/monitoring/list_metrics.rb +65 -0
- data/lib/fog/rackspace/requests/monitoring/list_notification_plans.rb +55 -0
- data/lib/fog/rackspace/requests/monitoring/list_notifications.rb +67 -0
- data/lib/fog/rackspace/requests/monitoring/list_overview.rb +97 -1
- data/lib/fog/rackspace/requests/monitoring/update_alarm.rb +33 -2
- data/lib/fog/rackspace/requests/monitoring/update_check.rb +32 -2
- data/lib/fog/rackspace/requests/monitoring/update_entity.rb +33 -2
- data/lib/fog/rackspace/requests/monitoring/update_notification.rb +17 -0
- data/lib/fog/rackspace/requests/storage/get_object.rb +7 -9
- data/lib/fog/rackspace/service.rb +16 -8
- data/lib/fog/rackspace/storage.rb +2 -2
- data/lib/fog/vcloud_director.rb +11 -0
- data/lib/fog/vcloud_director/README.md +967 -0
- data/lib/fog/vcloud_director/compute.rb +398 -0
- data/lib/fog/vcloud_director/generators/compute/customization.rb +100 -0
- data/lib/fog/vcloud_director/generators/compute/disks.rb +175 -0
- data/lib/fog/vcloud_director/generators/compute/metadata.rb +105 -0
- data/lib/fog/vcloud_director/generators/compute/vm_network.rb +122 -0
- data/lib/fog/vcloud_director/models/compute/catalog.rb +25 -0
- data/lib/fog/vcloud_director/models/compute/catalog_item.rb +25 -0
- data/lib/fog/vcloud_director/models/compute/catalog_items.rb +32 -0
- data/lib/fog/vcloud_director/models/compute/catalogs.rb +32 -0
- data/lib/fog/vcloud_director/models/compute/disk.rb +51 -0
- data/lib/fog/vcloud_director/models/compute/disks.rb +40 -0
- data/lib/fog/vcloud_director/models/compute/network.rb +26 -0
- data/lib/fog/vcloud_director/models/compute/networks.rb +31 -0
- data/lib/fog/vcloud_director/models/compute/organization.rb +41 -0
- data/lib/fog/vcloud_director/models/compute/organizations.rb +30 -0
- data/lib/fog/vcloud_director/models/compute/tag.rb +36 -0
- data/lib/fog/vcloud_director/models/compute/tags.rb +51 -0
- data/lib/fog/vcloud_director/models/compute/task.rb +58 -0
- data/lib/fog/vcloud_director/models/compute/tasks.rb +31 -0
- data/lib/fog/vcloud_director/models/compute/vapp.rb +56 -0
- data/lib/fog/vcloud_director/models/compute/vapps.rb +34 -0
- data/lib/fog/vcloud_director/models/compute/vdc.rb +33 -0
- data/lib/fog/vcloud_director/models/compute/vdcs.rb +32 -0
- data/lib/fog/vcloud_director/models/compute/vm.rb +99 -0
- data/lib/fog/vcloud_director/models/compute/vm_customization.rb +40 -0
- data/lib/fog/vcloud_director/models/compute/vm_customizations.rb +16 -0
- data/lib/fog/vcloud_director/models/compute/vm_network.rb +30 -0
- data/lib/fog/vcloud_director/models/compute/vm_networks.rb +21 -0
- data/lib/fog/vcloud_director/models/compute/vms.rb +41 -0
- data/lib/fog/vcloud_director/parsers/compute/disks.rb +57 -0
- data/lib/fog/vcloud_director/parsers/compute/metadata.rb +66 -0
- data/lib/fog/vcloud_director/parsers/compute/network.rb +108 -0
- data/lib/fog/vcloud_director/parsers/compute/vm.rb +82 -0
- data/lib/fog/vcloud_director/parsers/compute/vm_customization.rb +56 -0
- data/lib/fog/vcloud_director/parsers/compute/vm_network.rb +111 -0
- data/lib/fog/vcloud_director/parsers/compute/vms.rb +96 -0
- data/lib/fog/vcloud_director/parsers/compute/vms_by_metadata.rb +41 -0
- data/lib/fog/vcloud_director/requests/compute/delete_metadata.rb +20 -0
- data/lib/fog/vcloud_director/requests/compute/delete_vapp.rb +20 -0
- data/lib/fog/vcloud_director/requests/compute/get_catalog.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/get_catalog_item.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/get_current_session.rb +75 -0
- data/lib/fog/vcloud_director/requests/compute/get_href.rb +19 -0
- data/lib/fog/vcloud_director/requests/compute/get_metadata.rb +20 -0
- data/lib/fog/vcloud_director/requests/compute/get_network.rb +21 -0
- data/lib/fog/vcloud_director/requests/compute/get_organization.rb +72 -0
- data/lib/fog/vcloud_director/requests/compute/get_organizations.rb +37 -0
- data/lib/fog/vcloud_director/requests/compute/get_request.rb +17 -0
- data/lib/fog/vcloud_director/requests/compute/get_supported_versions.rb +1160 -0
- data/lib/fog/vcloud_director/requests/compute/get_task.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/get_tasks_list.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/get_vapp.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/get_vapp_template.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/get_vdc.rb +154 -0
- data/lib/fog/vcloud_director/requests/compute/get_vm.rb +20 -0
- data/lib/fog/vcloud_director/requests/compute/get_vm_cpu.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/get_vm_customization.rb +20 -0
- data/lib/fog/vcloud_director/requests/compute/get_vm_disks.rb +20 -0
- data/lib/fog/vcloud_director/requests/compute/get_vm_memory.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/get_vm_network.rb +20 -0
- data/lib/fog/vcloud_director/requests/compute/get_vms.rb +20 -0
- data/lib/fog/vcloud_director/requests/compute/get_vms_by_metadata.rb +20 -0
- data/lib/fog/vcloud_director/requests/compute/helper.rb +93 -0
- data/lib/fog/vcloud_director/requests/compute/instantiate_vapp_template.rb +124 -0
- data/lib/fog/vcloud_director/requests/compute/post_task_cancel.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/post_vapp_undeploy.rb +26 -0
- data/lib/fog/vcloud_director/requests/compute/post_vm_metadata.rb +29 -0
- data/lib/fog/vcloud_director/requests/compute/post_vm_poweroff.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/post_vm_poweron.rb +18 -0
- data/lib/fog/vcloud_director/requests/compute/put_metadata_value.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/put_vm_cpu.rb +34 -0
- data/lib/fog/vcloud_director/requests/compute/put_vm_customization.rb +24 -0
- data/lib/fog/vcloud_director/requests/compute/put_vm_disks.rb +25 -0
- data/lib/fog/vcloud_director/requests/compute/put_vm_memory.rb +34 -0
- data/lib/fog/vcloud_director/requests/compute/put_vm_network.rb +24 -0
- data/tests/aws/models/auto_scaling/groups_test.rb +5 -0
- data/tests/aws/models/compute/subnet_tests.rb +1 -1
- data/tests/aws/models/compute/subnets_tests.rb +1 -1
- data/tests/aws/requests/data_pipeline/helper.rb +38 -8
- data/tests/aws/requests/data_pipeline/pipeline_tests.rb +25 -1
- data/tests/aws/requests/elasticache/security_group_tests.rb +3 -2
- data/tests/aws/requests/redshift/cluster_parameter_group_tests.rb +77 -0
- data/tests/aws/requests/redshift/cluster_security_group_tests.rb +44 -0
- data/tests/aws/requests/redshift/cluster_snapshot_tests.rb +75 -0
- data/tests/aws/requests/redshift/cluster_tests.rb +82 -0
- data/tests/aws/requests/sts/get_federation_token_tests.rb +0 -1
- data/tests/aws/signed_params_tests.rb +12 -0
- data/tests/brightbox/compute/helper.rb +1 -0
- data/tests/brightbox/compute/schema.rb +696 -0
- data/tests/brightbox/requests/compute/account_tests.rb +7 -7
- data/tests/brightbox/requests/compute/api_client_tests.rb +6 -6
- data/tests/brightbox/requests/compute/application_test.rb +6 -6
- data/tests/brightbox/requests/compute/cloud_ip_tests.rb +7 -7
- data/tests/brightbox/requests/compute/firewall_policy_tests.rb +5 -5
- data/tests/brightbox/requests/compute/firewall_rule_tests.rb +4 -4
- data/tests/brightbox/requests/compute/helper.rb +0 -688
- data/tests/brightbox/requests/compute/image_tests.rb +2 -2
- data/tests/brightbox/requests/compute/interface_tests.rb +1 -1
- data/tests/brightbox/requests/compute/load_balancer_tests.rb +9 -9
- data/tests/brightbox/requests/compute/server_group_tests.rb +8 -8
- data/tests/brightbox/requests/compute/server_tests.rb +13 -10
- data/tests/brightbox/requests/compute/server_type_tests.rb +2 -2
- data/tests/brightbox/requests/compute/user_tests.rb +3 -3
- data/tests/brightbox/requests/compute/zone_tests.rb +2 -2
- data/tests/compute/helper.rb +3 -2
- data/tests/dynect/requests/dns/dns_tests.rb +29 -0
- data/tests/helpers/mock_helper.rb +3 -0
- data/tests/openstack/requests/compute/server_tests.rb +30 -0
- data/tests/openstack/requests/orchestration/stack_tests.rb +30 -0
- data/tests/rackspace/auto_scale_tests.rb +84 -0
- data/tests/rackspace/models/auto_scale/group.rb +19 -0
- data/tests/rackspace/models/auto_scale/groups.rb +13 -0
- data/tests/rackspace/models/auto_scale/policies.rb +23 -0
- data/tests/rackspace/models/auto_scale/policy.rb +29 -0
- data/tests/rackspace/models/auto_scale/webhook.rb +35 -0
- data/tests/rackspace/models/auto_scale/webhooks.rb +28 -0
- data/tests/rackspace/models/monitoring/notification_tests.rb +19 -0
- data/tests/rackspace/models/monitoring/notifications_tests.rb +10 -0
- data/tests/rackspace/requests/auto_scale/config_tests.rb +51 -0
- data/tests/rackspace/requests/auto_scale/group_tests.rb +38 -0
- data/tests/rackspace/requests/auto_scale/helper.rb +181 -0
- data/tests/rackspace/requests/auto_scale/policy_tests.rb +61 -0
- data/tests/rackspace/requests/auto_scale/webhook_tests.rb +49 -0
- data/tests/rackspace/requests/compute_v2/address_tests.rb +1 -1
- data/tests/rackspace/requests/monitoring/agent_tests.rb +0 -1
- data/tests/rackspace/requests/monitoring/alarm_tests.rb +3 -3
- data/tests/rackspace/requests/monitoring/check_tests.rb +0 -1
- data/tests/rackspace/requests/monitoring/entity_tests.rb +3 -12
- data/tests/rackspace/requests/monitoring/list_tests.rb +18 -6
- data/tests/rackspace/requests/monitoring/notification_tests.rb +46 -0
- data/tests/vcloud_director/models/compute/catalog_items_tests.rb +42 -0
- data/tests/vcloud_director/models/compute/catalogs_tests.rb +42 -0
- data/tests/vcloud_director/models/compute/helper.rb +67 -0
- data/tests/vcloud_director/models/compute/organizations_tests.rb +22 -0
- data/tests/vcloud_director/models/compute/vapp_life_cycle_tests.rb +98 -0
- data/tests/vcloud_director/models/compute/vapp_tests.rb +42 -0
- data/tests/vcloud_director/models/compute/vdcs_tests.rb +45 -0
- data/tests/vcloud_director/models/compute/vms_tests.rb +89 -0
- data/tests/vcloud_director/models/tools/reduced_vcr_requests.rb +27 -0
- data/tests/vcloud_director/requests/compute/organization_tests.rb +48 -0
- data/tests/vcloud_director/requests/compute/session_tests.rb +29 -0
- data/tests/vcloud_director/requests/compute/vdc_tests.rb +90 -0
- data/tests/vcloud_director/requests/compute/versions_tests.rb +28 -0
- metadata +342 -43
@@ -7,12 +7,20 @@ module Fog
|
|
7
7
|
|
8
8
|
class Images < Fog::Collection
|
9
9
|
|
10
|
+
attribute :filters
|
11
|
+
|
10
12
|
model Fog::Compute::OpenStack::Image
|
11
13
|
|
12
14
|
attribute :server
|
13
15
|
|
14
|
-
def
|
15
|
-
|
16
|
+
def initialize(attributes)
|
17
|
+
self.filters ||= {}
|
18
|
+
super
|
19
|
+
end
|
20
|
+
|
21
|
+
def all(filters = filters)
|
22
|
+
self.filters = filters
|
23
|
+
data = service.list_images_detail(filters).body['images']
|
16
24
|
images = load(data)
|
17
25
|
if server
|
18
26
|
self.replace(self.select {|image| image.server_id == server.id})
|
@@ -31,6 +31,7 @@ module Fog
|
|
31
31
|
attribute :user_id
|
32
32
|
attribute :key_name
|
33
33
|
attribute :fault
|
34
|
+
attribute :config_drive
|
34
35
|
attribute :os_dcf_disk_config, :aliases => 'OS-DCF:diskConfig'
|
35
36
|
attribute :os_ext_srv_attr_host, :aliases => 'OS-EXT-SRV-ATTR:host'
|
36
37
|
attribute :os_ext_srv_attr_hypervisor_hostname, :aliases => 'OS-EXT-SRV-ATTR:hypervisor_hostname'
|
@@ -280,6 +281,7 @@ module Fog
|
|
280
281
|
'availability_zone' => availability_zone,
|
281
282
|
'user_data' => user_data_encoded,
|
282
283
|
'key_name' => key_name,
|
284
|
+
'config_drive' => config_drive,
|
283
285
|
'security_groups' => @security_groups,
|
284
286
|
'min_count' => @min_count,
|
285
287
|
'max_count' => @max_count,
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Orchestration
|
5
|
+
class OpenStack
|
6
|
+
class Stack < Fog::Model
|
7
|
+
identity :id
|
8
|
+
|
9
|
+
attribute :stack_name
|
10
|
+
attribute :stack_status
|
11
|
+
attribute :stack_status_reason
|
12
|
+
attribute :creation_time
|
13
|
+
attribute :updated_time
|
14
|
+
attribute :id
|
15
|
+
|
16
|
+
attribute :template_url
|
17
|
+
attribute :template
|
18
|
+
attribute :parameters
|
19
|
+
attribute :timeout_in_minutes
|
20
|
+
|
21
|
+
def initialize(attributes)
|
22
|
+
# Old 'connection' is renamed as service and should be used instead
|
23
|
+
prepare_service_value(attributes)
|
24
|
+
super
|
25
|
+
end
|
26
|
+
|
27
|
+
def save
|
28
|
+
requires :stack_name
|
29
|
+
identity ? update : create
|
30
|
+
end
|
31
|
+
|
32
|
+
def create
|
33
|
+
requires :stack_name
|
34
|
+
service.create_stack(stack_name, self.attributes)
|
35
|
+
self
|
36
|
+
end
|
37
|
+
|
38
|
+
def update
|
39
|
+
requires :stack_name
|
40
|
+
service.update_stack(stack_name, self.attributes)
|
41
|
+
self
|
42
|
+
end
|
43
|
+
|
44
|
+
def destroy
|
45
|
+
requires :id
|
46
|
+
service.delete_stack(self.stack_name, self.id)
|
47
|
+
true
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
require 'fog/openstack/models/orchestration/stack'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Orchestration
|
6
|
+
class OpenStack
|
7
|
+
class Stacks < Fog::Collection
|
8
|
+
model Fog::Orchestration::OpenStack::Stack
|
9
|
+
|
10
|
+
def all
|
11
|
+
load(service.list_stacks.body['stacks'])
|
12
|
+
end
|
13
|
+
|
14
|
+
def find_by_id(id)
|
15
|
+
self.find {|stack| stack.id == id}
|
16
|
+
end
|
17
|
+
alias_method :get, :find_by_id
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,227 @@
|
|
1
|
+
require 'fog/aws/cloud_formation'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Orchestration
|
5
|
+
class OpenStack < Fog::Service
|
6
|
+
requires :openstack_auth_url
|
7
|
+
recognizes :openstack_auth_token, :openstack_management_url,
|
8
|
+
:persistent, :openstack_service_type, :openstack_service_name,
|
9
|
+
:openstack_tenant,
|
10
|
+
:openstack_api_key, :openstack_username, :openstack_identity_endpoint,
|
11
|
+
:current_user, :current_tenant, :openstack_region,
|
12
|
+
:openstack_endpoint_type
|
13
|
+
|
14
|
+
model_path 'fog/openstack/models/orchestration'
|
15
|
+
model :stack
|
16
|
+
collection :stacks
|
17
|
+
|
18
|
+
request_path 'fog/openstack/requests/orchestration'
|
19
|
+
request :create_stack
|
20
|
+
request :update_stack
|
21
|
+
request :delete_stack
|
22
|
+
request :list_stacks
|
23
|
+
|
24
|
+
class Mock
|
25
|
+
attr_reader :auth_token
|
26
|
+
attr_reader :auth_token_expiration
|
27
|
+
attr_reader :current_user
|
28
|
+
attr_reader :current_tenant
|
29
|
+
|
30
|
+
def self.data
|
31
|
+
@data ||= Hash.new do |hash, key|
|
32
|
+
hash[key] = {
|
33
|
+
:stacks => {}
|
34
|
+
}
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.reset
|
39
|
+
@data = nil
|
40
|
+
end
|
41
|
+
|
42
|
+
def initialize(options={})
|
43
|
+
@openstack_username = options[:openstack_username]
|
44
|
+
@openstack_auth_uri = URI.parse(options[:openstack_auth_url])
|
45
|
+
|
46
|
+
@current_tenant = options[:openstack_tenant]
|
47
|
+
|
48
|
+
@auth_token = Fog::Mock.random_base64(64)
|
49
|
+
@auth_token_expiration = (Time.now.utc + 86400).iso8601
|
50
|
+
|
51
|
+
management_url = URI.parse(options[:openstack_auth_url])
|
52
|
+
management_url.port = 8774
|
53
|
+
management_url.path = '/v1'
|
54
|
+
@openstack_management_url = management_url.to_s
|
55
|
+
|
56
|
+
identity_public_endpoint = URI.parse(options[:openstack_auth_url])
|
57
|
+
identity_public_endpoint.port = 5000
|
58
|
+
@openstack_identity_public_endpoint = identity_public_endpoint.to_s
|
59
|
+
end
|
60
|
+
|
61
|
+
def data
|
62
|
+
self.class.data["#{@openstack_username}-#{@current_tenant}"]
|
63
|
+
end
|
64
|
+
|
65
|
+
def reset_data
|
66
|
+
self.class.data.delete("#{@openstack_username}-#{@current_tenant}")
|
67
|
+
end
|
68
|
+
|
69
|
+
def credentials
|
70
|
+
{ :provider => 'openstack',
|
71
|
+
:openstack_auth_url => @openstack_auth_uri.to_s,
|
72
|
+
:openstack_auth_token => @auth_token,
|
73
|
+
:openstack_management_url => @openstack_management_url,
|
74
|
+
:openstack_identity_endpoint => @openstack_identity_public_endpoint }
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
class Real
|
79
|
+
attr_reader :auth_token
|
80
|
+
attr_reader :auth_token_expiration
|
81
|
+
attr_reader :current_user
|
82
|
+
attr_reader :current_tenant
|
83
|
+
|
84
|
+
def initialize(options={})
|
85
|
+
@openstack_auth_token = options[:openstack_auth_token]
|
86
|
+
@auth_token = options[:openstack_auth_token]
|
87
|
+
@openstack_identity_public_endpoint = options[:openstack_identity_endpoint]
|
88
|
+
|
89
|
+
unless @auth_token
|
90
|
+
missing_credentials = Array.new
|
91
|
+
@openstack_api_key = options[:openstack_api_key]
|
92
|
+
@openstack_username = options[:openstack_username]
|
93
|
+
|
94
|
+
missing_credentials << :openstack_api_key unless @openstack_api_key
|
95
|
+
missing_credentials << :openstack_username unless @openstack_username
|
96
|
+
raise ArgumentError, "Missing required arguments: #{missing_credentials.join(', ')}" unless missing_credentials.empty?
|
97
|
+
end
|
98
|
+
|
99
|
+
@openstack_tenant = options[:openstack_tenant]
|
100
|
+
@openstack_auth_uri = URI.parse(options[:openstack_auth_url])
|
101
|
+
@openstack_management_url = options[:openstack_management_url]
|
102
|
+
@openstack_must_reauthenticate = false
|
103
|
+
@openstack_service_type = options[:openstack_service_type] || ['orchestration']
|
104
|
+
@openstack_service_name = options[:openstack_service_name]
|
105
|
+
@openstack_identity_service_type = options[:openstack_identity_service_type] || 'identity'
|
106
|
+
@openstack_endpoint_type = options[:openstack_endpoint_type] || 'publicURL'
|
107
|
+
@openstack_region = options[:openstack_region]
|
108
|
+
|
109
|
+
@connection_options = options[:connection_options] || {}
|
110
|
+
|
111
|
+
@current_user = options[:current_user]
|
112
|
+
@current_tenant = options[:current_tenant]
|
113
|
+
|
114
|
+
authenticate
|
115
|
+
|
116
|
+
@persistent = options[:persistent] || false
|
117
|
+
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}", @persistent, @connection_options)
|
118
|
+
end
|
119
|
+
|
120
|
+
def credentials
|
121
|
+
{ :provider => 'openstack',
|
122
|
+
:openstack_auth_url => @openstack_auth_uri.to_s,
|
123
|
+
:openstack_auth_token => @auth_token,
|
124
|
+
:openstack_management_url => @openstack_management_url,
|
125
|
+
:openstack_identity_endpoint => @openstack_identity_public_endpoint,
|
126
|
+
:openstack_region => @openstack_region,
|
127
|
+
:current_user => @current_user,
|
128
|
+
:current_tenant => @current_tenant }
|
129
|
+
end
|
130
|
+
|
131
|
+
def reload
|
132
|
+
@connection.reset
|
133
|
+
end
|
134
|
+
|
135
|
+
def request(params)
|
136
|
+
begin
|
137
|
+
response = @connection.request(params.merge({
|
138
|
+
:headers => {
|
139
|
+
'Content-Type' => 'application/json',
|
140
|
+
'Accept' => 'application/json',
|
141
|
+
'X-Auth-Token' => @auth_token
|
142
|
+
}.merge!(params[:headers] || {}),
|
143
|
+
:host => @host,
|
144
|
+
:path => "#{@path}/#{@tenant_id}/#{params[:path]}",
|
145
|
+
:query => params[:query]
|
146
|
+
}))
|
147
|
+
rescue Excon::Errors::Unauthorized => error
|
148
|
+
if error.response.body != 'Bad username or password' # token expiration
|
149
|
+
@openstack_must_reauthenticate = true
|
150
|
+
authenticate
|
151
|
+
retry
|
152
|
+
else # Bad Credentials
|
153
|
+
raise error
|
154
|
+
end
|
155
|
+
rescue Excon::Errors::HTTPStatusError => error
|
156
|
+
raise case error
|
157
|
+
when Excon::Errors::NotFound
|
158
|
+
Fog::Compute::OpenStack::NotFound.slurp(error)
|
159
|
+
else
|
160
|
+
error
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
if response.status == 200 && !response.body.empty?
|
165
|
+
response.body = Fog::JSON.decode(response.body)
|
166
|
+
end
|
167
|
+
|
168
|
+
response
|
169
|
+
end
|
170
|
+
|
171
|
+
private
|
172
|
+
|
173
|
+
def authenticate
|
174
|
+
if !@openstack_management_url || @openstack_must_reauthenticate
|
175
|
+
options = {
|
176
|
+
:openstack_api_key => @openstack_api_key,
|
177
|
+
:openstack_username => @openstack_username,
|
178
|
+
:openstack_auth_token => @auth_token,
|
179
|
+
:openstack_auth_uri => @openstack_auth_uri,
|
180
|
+
:openstack_region => @openstack_region,
|
181
|
+
:openstack_tenant => @openstack_tenant,
|
182
|
+
:openstack_service_type => @openstack_service_type,
|
183
|
+
:openstack_service_name => @openstack_service_name,
|
184
|
+
:openstack_identity_service_type => @openstack_identity_service_type,
|
185
|
+
:openstack_endpoint_type => @openstack_endpoint_type
|
186
|
+
}
|
187
|
+
|
188
|
+
if @openstack_auth_uri.path =~ /\/v2.0\//
|
189
|
+
|
190
|
+
credentials = Fog::OpenStack.authenticate_v2(options, @connection_options)
|
191
|
+
else
|
192
|
+
credentials = Fog::OpenStack.authenticate_v1(options, @connection_options)
|
193
|
+
end
|
194
|
+
|
195
|
+
@current_user = credentials[:user]
|
196
|
+
@current_tenant = credentials[:tenant]
|
197
|
+
|
198
|
+
@openstack_must_reauthenticate = false
|
199
|
+
@auth_token = credentials[:token]
|
200
|
+
@auth_token_expiration = credentials[:expires]
|
201
|
+
@openstack_management_url = credentials[:server_management_url]
|
202
|
+
@openstack_identity_public_endpoint = credentials[:identity_public_endpoint]
|
203
|
+
end
|
204
|
+
|
205
|
+
uri = URI.parse(@openstack_management_url)
|
206
|
+
@host = uri.host
|
207
|
+
@path, @tenant_id = uri.path.scan(/(\/.*)\/(.*)/).flatten
|
208
|
+
|
209
|
+
@path.sub!(/\/$/, '')
|
210
|
+
|
211
|
+
@port = uri.port
|
212
|
+
@scheme = uri.scheme
|
213
|
+
|
214
|
+
# Not all implementations have identity service in the catalog
|
215
|
+
if @openstack_identity_public_endpoint || @openstack_management_url
|
216
|
+
@identity_connection = Fog::Connection.new(
|
217
|
+
@openstack_identity_public_endpoint || @openstack_management_url,
|
218
|
+
false, @connection_options)
|
219
|
+
end
|
220
|
+
|
221
|
+
true
|
222
|
+
end
|
223
|
+
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
@@ -13,7 +13,10 @@ module Fog
|
|
13
13
|
}
|
14
14
|
|
15
15
|
vanilla_options = ['metadata', 'accessIPv4', 'accessIPv6',
|
16
|
-
'availability_zone', 'user_data', 'key_name',
|
16
|
+
'availability_zone', 'user_data', 'key_name',
|
17
|
+
'adminPass', 'config_drive', 'min_count', 'max_count',
|
18
|
+
'return_reservation_id'
|
19
|
+
]
|
17
20
|
vanilla_options.select{|o| options[o]}.each do |key|
|
18
21
|
data['server'][key] = options[key]
|
19
22
|
end
|
@@ -107,32 +110,37 @@ module Fog
|
|
107
110
|
|
108
111
|
|
109
112
|
mock_data = {
|
110
|
-
'addresses'
|
111
|
-
'flavor'
|
112
|
-
'id'
|
113
|
-
'image'
|
114
|
-
'links'
|
115
|
-
'hostId'
|
116
|
-
'metadata'
|
117
|
-
'name'
|
118
|
-
'accessIPv4'
|
119
|
-
'accessIPv6'
|
120
|
-
'progress'
|
121
|
-
'status'
|
122
|
-
'created'
|
123
|
-
'updated'
|
124
|
-
'user_id'
|
113
|
+
'addresses' => {},
|
114
|
+
'flavor' => {"id" => flavor_ref, "links"=>[{"href"=>"http://nova1:8774/admin/flavors/1", "rel"=>"bookmark"}]},
|
115
|
+
'id' => server_id,
|
116
|
+
'image' => {"id" => image_ref, "links"=>[{"href"=>"http://nova1:8774/admin/images/#{image_ref}", "rel"=>"bookmark"}]},
|
117
|
+
'links' => [{"href"=>"http://nova1:8774/v1.1/admin/servers/5", "rel"=>"self"}, {"href"=>"http://nova1:8774/admin/servers/5", "rel"=>"bookmark"}],
|
118
|
+
'hostId' => "123456789ABCDEF01234567890ABCDEF",
|
119
|
+
'metadata' => options['metadata'] || {},
|
120
|
+
'name' => name || "server_#{rand(999)}",
|
121
|
+
'accessIPv4' => options['accessIPv4'] || "",
|
122
|
+
'accessIPv6' => options['accessIPv6'] || "",
|
123
|
+
'progress' => 0,
|
124
|
+
'status' => 'BUILD',
|
125
|
+
'created' => '2012-09-27T00:04:18Z',
|
126
|
+
'updated' => '2012-09-27T00:04:27Z',
|
127
|
+
'user_id' => @openstack_username,
|
128
|
+
'config_drive' => options['config_drive'] || '',
|
125
129
|
}
|
126
130
|
|
127
|
-
response_data = {
|
128
|
-
|
129
|
-
'
|
130
|
-
|
131
|
-
|
131
|
+
response_data = {}
|
132
|
+
if options['return_reservation_id'] == 'True' then
|
133
|
+
response_data = { 'reservation_id' => "r-#{Fog::Mock.random_numbers(6).to_s}" }
|
134
|
+
else
|
135
|
+
response_data = {
|
136
|
+
'adminPass' => 'password',
|
137
|
+
'id' => server_id,
|
138
|
+
'links' => mock_data['links'],
|
139
|
+
}
|
140
|
+
end
|
132
141
|
|
133
142
|
self.data[:last_modified][:servers][server_id] = Time.now
|
134
143
|
self.data[:servers][server_id] = mock_data
|
135
|
-
|
136
144
|
if security_groups = options['security_groups'] then
|
137
145
|
groups = Array(options['security_groups']).map do |sg|
|
138
146
|
if sg.is_a?(Fog::Compute::OpenStack::SecurityGroup) then
|
@@ -148,10 +156,13 @@ module Fog
|
|
148
156
|
|
149
157
|
self.data[:last_modified][:servers][server_id] = Time.now
|
150
158
|
self.data[:servers][server_id] = mock_data
|
151
|
-
|
159
|
+
if options['return_reservation_id'] == 'True' then
|
160
|
+
response.body = response_data
|
161
|
+
else
|
162
|
+
response.body = { 'server' => response_data }
|
163
|
+
end
|
152
164
|
response
|
153
|
-
end
|
154
|
-
|
165
|
+
end
|
155
166
|
end
|
156
167
|
end
|
157
168
|
end
|
@@ -3,11 +3,12 @@ module Fog
|
|
3
3
|
class OpenStack
|
4
4
|
class Real
|
5
5
|
|
6
|
-
def list_images_detail
|
6
|
+
def list_images_detail(filters = {})
|
7
7
|
request(
|
8
8
|
:expects => [200, 203],
|
9
9
|
:method => 'GET',
|
10
|
-
:path => 'images/detail.json'
|
10
|
+
:path => 'images/detail.json',
|
11
|
+
:query => filters
|
11
12
|
)
|
12
13
|
end
|
13
14
|
|
@@ -15,7 +16,7 @@ module Fog
|
|
15
16
|
|
16
17
|
class Mock
|
17
18
|
|
18
|
-
def list_images_detail
|
19
|
+
def list_images_detail(filters = {})
|
19
20
|
response = Excon::Response.new
|
20
21
|
|
21
22
|
images = self.data[:images].values
|