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
@@ -0,0 +1,61 @@
|
|
1
|
+
Shindo.tests('Fog::Rackspace::AutoScale | policy_tests', ['rackspace', 'rackspace_autoscale']) do
|
2
|
+
|
3
|
+
pending if Fog.mocking?
|
4
|
+
service = Fog::Rackspace::AutoScale.new :rackspace_region => :ord
|
5
|
+
|
6
|
+
@group_id = service.create_group(LAUNCH_CONFIG_OPTIONS, GROUP_CONFIG_OPTIONS, POLICIES_OPTIONS).body['group']['id']
|
7
|
+
|
8
|
+
tests('success') do
|
9
|
+
tests('#list policies').formats(POLICIES_FORMAT) do
|
10
|
+
service.list_policies(@group_id).body['policies']
|
11
|
+
end
|
12
|
+
tests('#create policy').formats(201) do
|
13
|
+
response = service.create_policy(@group_id, POLICY_OPTIONS)
|
14
|
+
@policy_id = response.body['policies'][0]['id']
|
15
|
+
response.data[:status]
|
16
|
+
end
|
17
|
+
|
18
|
+
tests('#get policy').formats(POLICY_FORMAT) do
|
19
|
+
response = service.get_policy(@group_id, @policy_id)
|
20
|
+
response.body['policy']
|
21
|
+
end
|
22
|
+
|
23
|
+
tests('#update policy').formats(204) do
|
24
|
+
response = service.update_policy(@group_id, @policy_id, {
|
25
|
+
'name' => 'foo',
|
26
|
+
'changePercent' => 1,
|
27
|
+
'type' => 'webhook',
|
28
|
+
'cooldown' => 100
|
29
|
+
})
|
30
|
+
response.data[:status]
|
31
|
+
end
|
32
|
+
|
33
|
+
tests('#delete policy').formats(204) do
|
34
|
+
response = service.delete_policy(@group_id, @policy_id)
|
35
|
+
response.data[:status]
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
tests('failure') do
|
40
|
+
tests('#create policy').raises(Fog::Rackspace::AutoScale::BadRequest) do
|
41
|
+
service.create_policy(@group_id, {})
|
42
|
+
end
|
43
|
+
|
44
|
+
tests('#get policy').raises(Fog::Rackspace::AutoScale::NotFound) do
|
45
|
+
service.get_policy(@group_id, 123)
|
46
|
+
end
|
47
|
+
|
48
|
+
tests('#update policy').raises(Fog::Rackspace::AutoScale::BadRequest) do
|
49
|
+
service.update_policy(@group_id, 123, {})
|
50
|
+
end
|
51
|
+
|
52
|
+
tests('#execute policy').raises(Fog::Rackspace::AutoScale::NotFound) do
|
53
|
+
service.execute_policy(@group_id, 123)
|
54
|
+
end
|
55
|
+
|
56
|
+
tests('#delete policy').raises(Fog::Rackspace::AutoScale::NotFound) do
|
57
|
+
service.delete_policy(@group_id, 123)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
Shindo.tests('Fog::Rackspace::AutoScale | webhook_tests', ['rackspace', 'rackspace_autoscale']) do
|
2
|
+
pending if Fog.mocking?
|
3
|
+
service = Fog::Rackspace::AutoScale.new :rackspace_region => :ord
|
4
|
+
|
5
|
+
@group_id = service.create_group(LAUNCH_CONFIG_OPTIONS, GROUP_CONFIG_OPTIONS, POLICIES_OPTIONS).body['group']['id']
|
6
|
+
@policy_id = service.create_policy(@group_id, POLICY_OPTIONS).body['policies'][0]['id']
|
7
|
+
|
8
|
+
tests('success') do
|
9
|
+
tests('#create webhook').formats(201) do
|
10
|
+
response = service.create_webhook(@group_id, @policy_id, WEBHOOK_OPTIONS)
|
11
|
+
@webhook_id = response.body['webhooks'][0]['id']
|
12
|
+
response.data[:status]
|
13
|
+
end
|
14
|
+
|
15
|
+
tests('#view webhook').formats(WEBHOOK_FORMAT) do
|
16
|
+
response = service.get_webhook(@group_id, @policy_id, @webhook_id)
|
17
|
+
response.body['webhook']
|
18
|
+
end
|
19
|
+
|
20
|
+
tests('#update webhook').formats(204) do
|
21
|
+
response = service.update_webhook(@group_id, @policy_id, @webhook_id, {'name' => 'new', 'metadata' => {}} )
|
22
|
+
response.data[:status]
|
23
|
+
end
|
24
|
+
|
25
|
+
tests('#delete webhook').formats(204) do
|
26
|
+
response = service.delete_webhook(@group_id, @policy_id, @webhook_id)
|
27
|
+
response.data[:status]
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
tests('failure') do
|
32
|
+
tests('#create webhook').raises(Fog::Rackspace::AutoScale::BadRequest) do
|
33
|
+
service.create_webhook(@group_id, @policy_id, {})
|
34
|
+
end
|
35
|
+
|
36
|
+
tests('#view webhook').raises(Fog::Rackspace::AutoScale::NotFound) do
|
37
|
+
service.get_webhook(@group_id, @policy_id, 123)
|
38
|
+
end
|
39
|
+
|
40
|
+
tests('#update webhook').raises(Fog::Rackspace::AutoScale::BadRequest) do
|
41
|
+
service.update_webhook(@group_id, @policy_id, @webhook_id, {})
|
42
|
+
end
|
43
|
+
|
44
|
+
tests('#delete webhook').raises(Fog::Rackspace::AutoScale::NotFound) do
|
45
|
+
service.delete_webhook(@group_id, @policy_id, 123)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
@@ -14,7 +14,7 @@ Shindo.tests('Fog::Compute::RackspaceV2 | address requests', ['rackspace']) do
|
|
14
14
|
address_format = { "addresses"=> {
|
15
15
|
"private" => [{"addr" => String, "version" => Integer}],
|
16
16
|
"public" => [{"addr" => String, "version" => Integer }, {"addr"=> String, "version" => Integer}]}
|
17
|
-
|
17
|
+
}
|
18
18
|
|
19
19
|
begin
|
20
20
|
tests("#list_addresses(#{@server_id})").formats(address_format) do
|
@@ -1,5 +1,5 @@
|
|
1
1
|
Shindo.tests('Fog::Rackspace::Monitoring | alarm_tests', ['rackspace','rackspace_monitoring']) do
|
2
|
-
|
2
|
+
|
3
3
|
|
4
4
|
account = Fog::Rackspace::Monitoring.new
|
5
5
|
entity_id = account.create_entity(:label => "Foo").data[:headers]["X-Object-ID"]
|
@@ -50,6 +50,6 @@ Shindo.tests('Fog::Rackspace::Monitoring | alarm_tests', ['rackspace','rackspace
|
|
50
50
|
account.delete_alarm(-1,-1)
|
51
51
|
end
|
52
52
|
end
|
53
|
-
account.delete_check(entity_id,check_id)
|
54
|
-
account.delete_entity(entity_id)
|
53
|
+
account.delete_check(entity_id,check_id) unless Fog.mocking?
|
54
|
+
account.delete_entity(entity_id) unless Fog.mocking?
|
55
55
|
end
|
@@ -3,42 +3,33 @@ Shindo.tests('Fog::Rackspace::Monitoring | entity_tests', ['rackspace','rackspac
|
|
3
3
|
entity_id = nil
|
4
4
|
tests('success') do
|
5
5
|
tests('#create new entity').formats(DATA_FORMAT) do
|
6
|
-
pending if Fog.mocking?
|
7
6
|
response = account.create_entity(:label => "Foo").data
|
8
7
|
entity_id = response[:headers]["X-Object-ID"]
|
9
8
|
response
|
10
9
|
end
|
11
10
|
tests('#get entity').formats(LIST_HEADERS_FORMAT) do
|
12
|
-
account.get_entity(entity_id).data[:headers]
|
11
|
+
account.get_entity(:entity_id => "fooid").data[:headers]
|
13
12
|
end
|
14
13
|
tests('#update entity').formats(DATA_FORMAT) do
|
15
|
-
|
16
|
-
|
17
|
-
options = { :testing => "Bar"}
|
14
|
+
options = { :metadata => {:testing => "Bar" }}
|
18
15
|
account.update_entity(entity_id,options).data
|
19
16
|
end
|
20
17
|
tests('#delete entity').formats(DELETE_DATA_FORMAT) do
|
21
|
-
pending if Fog.mocking?
|
22
18
|
account.delete_entity(entity_id).data
|
23
19
|
end
|
24
20
|
end
|
25
21
|
tests('failure') do
|
26
22
|
tests('#create new entity(-1)').raises(Fog::Rackspace::Monitoring::BadRequest) do
|
27
|
-
pending if Fog.mocking?
|
28
23
|
account.create_entity(:label => "")
|
29
24
|
end
|
30
25
|
tests('#get entity(-1)').raises(Fog::Rackspace::Monitoring::NotFound) do
|
31
|
-
pending if Fog.mocking?
|
32
|
-
|
33
26
|
account.get_entity(-1)
|
34
27
|
end
|
35
28
|
tests('#update invalid entity(-1)').raises(Fog::Rackspace::Monitoring::NotFound) do
|
36
|
-
|
37
|
-
options = { :testing => "Bar" }
|
29
|
+
options = { :metadata => {:testing => "Bar" }}
|
38
30
|
response = account.update_entity(-1,options)
|
39
31
|
end
|
40
32
|
tests('#delete entity(-1)').raises(Fog::Rackspace::Monitoring::NotFound) do
|
41
|
-
pending if Fog.mocking?
|
42
33
|
account.delete_entity(-1)
|
43
34
|
end
|
44
35
|
end
|
@@ -1,14 +1,19 @@
|
|
1
1
|
Shindo.tests('Fog::Rackspace::Monitoring | list_tests', ['rackspace','rackspace_monitoring']) do
|
2
|
-
pending if Fog.mocking?
|
3
2
|
|
4
3
|
account = Fog::Rackspace::Monitoring.new
|
5
|
-
|
6
|
-
|
4
|
+
if Fog.mocking?
|
5
|
+
entity_id = "peoigne93"
|
6
|
+
check_id = "2090wgn93"
|
7
|
+
else
|
8
|
+
entity_id = account.create_entity(:label => "Foo").data[:headers]["X-Object-ID"]
|
9
|
+
check_id = account.create_check(entity_id,CHECK_CREATE_OPTIONS).data[:headers]["X-Object-ID"]
|
10
|
+
end
|
11
|
+
|
7
12
|
metric_name = "idle_percent_average"
|
8
13
|
now = Time.now.to_i
|
9
14
|
SLEEP_TIME= 2
|
10
15
|
sleep(SLEEP_TIME) unless Fog.mocking?
|
11
|
-
|
16
|
+
|
12
17
|
tests('success') do
|
13
18
|
tests('#get list of checks').formats(LIST_HEADERS_FORMAT) do
|
14
19
|
account.list_checks(entity_id).data[:headers]
|
@@ -28,6 +33,9 @@ Shindo.tests('Fog::Rackspace::Monitoring | list_tests', ['rackspace','rackspace_
|
|
28
33
|
tests('#list notification plans').formats(LIST_HEADERS_FORMAT) do
|
29
34
|
account.list_notification_plans().data[:headers]
|
30
35
|
end
|
36
|
+
tests('#list notifications').formats(LIST_HEADERS_FORMAT) do
|
37
|
+
account.list_notifications().data[:headers]
|
38
|
+
end
|
31
39
|
tests('#get list of data points').formats(LIST_HEADERS_FORMAT) do
|
32
40
|
options = {
|
33
41
|
:points => 1,
|
@@ -45,6 +53,10 @@ Shindo.tests('Fog::Rackspace::Monitoring | list_tests', ['rackspace','rackspace_
|
|
45
53
|
account.list_check_types(-1)
|
46
54
|
end
|
47
55
|
# This test has been put on hold due to a bug that incorrectly returns 200 OK to this request
|
56
|
+
# tests('#fail to list notifications').raises(ArgumentError) do
|
57
|
+
# account.list_notifications(-1)
|
58
|
+
# end
|
59
|
+
# This test has been put on hold due to a bug that incorrectly returns 200 OK to this request
|
48
60
|
#tests('#fail to list metrics').raises(Fog::Rackspace::Monitoring::NotFound) do
|
49
61
|
#account.list_metrics(-1,-1)
|
50
62
|
#end
|
@@ -55,6 +67,6 @@ Shindo.tests('Fog::Rackspace::Monitoring | list_tests', ['rackspace','rackspace_
|
|
55
67
|
account.list_data_points(-1,-1,-1,-1).data
|
56
68
|
end
|
57
69
|
end
|
58
|
-
account.delete_check(entity_id,check_id)
|
59
|
-
account.delete_entity(entity_id)
|
70
|
+
account.delete_check(entity_id,check_id) unless Fog.mocking?
|
71
|
+
account.delete_entity(entity_id) unless Fog.mocking?
|
60
72
|
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
Shindo.tests('Fog::Rackspace::Monitoring | notification_tests', ['rackspace','rackspace_monitoring']) do
|
2
|
+
account = Fog::Rackspace::Monitoring.new
|
3
|
+
notification_id = nil
|
4
|
+
tests('success') do
|
5
|
+
tests('#create new notification').formats(DATA_FORMAT) do
|
6
|
+
pending if Fog.mocking?
|
7
|
+
response = account.create_notification(:label => "Foo", :type => "email", :details => {:address => "test@test.com"}).data
|
8
|
+
|
9
|
+
notification_id = response[:headers]["X-Object-ID"]
|
10
|
+
response
|
11
|
+
end
|
12
|
+
tests('#get notification').formats(LIST_HEADERS_FORMAT) do
|
13
|
+
account.get_notification(notification_id).data[:headers]
|
14
|
+
end
|
15
|
+
tests('#update notification').formats(DATA_FORMAT) do
|
16
|
+
pending if Fog.mocking?
|
17
|
+
|
18
|
+
options = {:testing => "Bar"}
|
19
|
+
account.update_notification(notification_id,options).data
|
20
|
+
end
|
21
|
+
tests('#delete notification').formats(DELETE_DATA_FORMAT) do
|
22
|
+
pending if Fog.mocking?
|
23
|
+
account.delete_notification(notification_id).data
|
24
|
+
end
|
25
|
+
end
|
26
|
+
tests('failure') do
|
27
|
+
tests('#create new notification(-1)').raises(Fog::Rackspace::Monitoring::BadRequest) do
|
28
|
+
pending if Fog.mocking?
|
29
|
+
account.create_notification(:label => "")
|
30
|
+
end
|
31
|
+
tests('#get notification(-1)').raises(Fog::Rackspace::Monitoring::NotFound) do
|
32
|
+
pending if Fog.mocking?
|
33
|
+
|
34
|
+
account.get_notification(-1)
|
35
|
+
end
|
36
|
+
tests('#update invalid notification(-1)').raises(Fog::Rackspace::Monitoring::NotFound) do
|
37
|
+
pending if Fog.mocking?
|
38
|
+
options = { :testing => "Bar" }
|
39
|
+
response = account.update_notification(-1,options)
|
40
|
+
end
|
41
|
+
tests('#delete notification(-1)').raises(Fog::Rackspace::Monitoring::NotFound) do
|
42
|
+
pending if Fog.mocking?
|
43
|
+
account.delete_notification(-1)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
|
2
|
+
|
3
|
+
VCR.use_cassette(File.basename(__FILE__)) do
|
4
|
+
|
5
|
+
Shindo.tests("Compute::VcloudDirector | catalog_items", ['vclouddirector', 'all']) do
|
6
|
+
pending if Fog.mocking?
|
7
|
+
tests("#There is more than one catalog").returns(true){ catalog.catalog_items.size >= 1 }
|
8
|
+
|
9
|
+
catalog_items = catalog.catalog_items
|
10
|
+
catalog_item = catalog_items.first
|
11
|
+
|
12
|
+
tests("Compute::VcloudDirector | catalog_item") do
|
13
|
+
tests("#id").returns(String){ catalog_item.id.class }
|
14
|
+
tests("#name").returns(String){ catalog_item.name.class }
|
15
|
+
tests("#href").returns(String){ catalog_item.href.class }
|
16
|
+
tests("#type").returns("application/vnd.vmware.vcloud.catalogItem+xml"){ catalog_item.type }
|
17
|
+
end
|
18
|
+
|
19
|
+
tests("Compute::VcloudDirector | catalog_item", ['lazy load attrs']) do
|
20
|
+
catalog_item.lazy_load_attrs.each do |lazy_attr|
|
21
|
+
tests("##{lazy_attr} is not loaded yet").returns(NonLoaded) { catalog_item.attributes[lazy_attr] }
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
tests("Compute::VcloudDirector | catalog_item", ['load on demand']) do
|
26
|
+
tests("#description is not loaded yet").returns(NonLoaded) { catalog_item.attributes[:description] }
|
27
|
+
tests("#description is loaded on demand").returns(String) { catalog_item.description.class }
|
28
|
+
tests("#description is now loaded").returns(true) { catalog_item.attributes[:description] != NonLoaded }
|
29
|
+
end
|
30
|
+
|
31
|
+
tests("Compute::VcloudDirector | catalog_item", ['lazy load attrs']) do
|
32
|
+
catalog.lazy_load_attrs.each do |lazy_attr|
|
33
|
+
tests("##{lazy_attr} is now loaded").returns(true) { catalog_item.attributes[lazy_attr] != NonLoaded }
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
tests("Compute::VcloudDirector | catalog_item", ['get']) do
|
38
|
+
tests("#get_by_name").returns(catalog_item.name) { catalog_items.get_by_name(catalog_item.name).name }
|
39
|
+
tests("#get").returns(catalog_item.id) { catalog_items.get(catalog_item.id).id }
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
|
2
|
+
|
3
|
+
VCR.use_cassette(File.basename(__FILE__)) do
|
4
|
+
|
5
|
+
Shindo.tests("Compute::VcloudDirector | catalogs", ['vclouddirector', 'all']) do
|
6
|
+
pending if Fog.mocking?
|
7
|
+
tests("#There is one or more catalog").returns(true){ organization.catalogs.size >= 1 }
|
8
|
+
|
9
|
+
catalogs = organization.catalogs
|
10
|
+
catalog = catalogs.first
|
11
|
+
|
12
|
+
tests("Compute::VcloudDirector | catalog") do
|
13
|
+
tests("#id").returns(String){ catalog.id.class }
|
14
|
+
tests("#name").returns(String){ catalog.name.class }
|
15
|
+
tests("#href").returns(String){ catalog.href.class }
|
16
|
+
tests("#type").returns("application/vnd.vmware.vcloud.catalog+xml"){ catalog.type }
|
17
|
+
end
|
18
|
+
|
19
|
+
tests("Compute::VcloudDirector | catalog", ['lazy load attrs']) do
|
20
|
+
catalog.lazy_load_attrs.each do |lazy_attr|
|
21
|
+
tests("##{lazy_attr} is not loaded yet").returns(NonLoaded) { catalog.attributes[lazy_attr] }
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
tests("Compute::VcloudDirector | catalog", ['load on demand']) do
|
26
|
+
tests("#description is not loaded yet").returns(NonLoaded) { catalog.attributes[:description] }
|
27
|
+
tests("#description is loaded on demand").returns(String) { catalog.description.class }
|
28
|
+
tests("#description is now loaded").returns(true) { catalog.attributes[:description] != NonLoaded }
|
29
|
+
end
|
30
|
+
|
31
|
+
tests("Compute::VcloudDirector | catalog", ['lazy load attrs']) do
|
32
|
+
catalog.lazy_load_attrs.each do |lazy_attr|
|
33
|
+
tests("##{lazy_attr} is now loaded").returns(true) { catalog.attributes[lazy_attr] != NonLoaded }
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
tests("Compute::VcloudDirector | catalog", ['get']) do
|
38
|
+
tests("#get_by_name").returns(catalog.name) { catalogs.get_by_name(catalog.name).name }
|
39
|
+
tests("#get").returns(catalog.id) { catalogs.get(catalog.id).id }
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
require 'vcr'
|
2
|
+
require 'fog/vcloud_director/compute'
|
3
|
+
|
4
|
+
VCR.configure do |c|
|
5
|
+
c.cassette_library_dir = 'tests/vcloud_director/vcr_cassettes'
|
6
|
+
c.hook_into :webmock
|
7
|
+
c.allow_http_connections_when_no_cassette = true
|
8
|
+
end
|
9
|
+
|
10
|
+
def boolean?(item)
|
11
|
+
[TrueClass, FalseClass].include?(item.class)
|
12
|
+
end
|
13
|
+
|
14
|
+
def vcloud_director
|
15
|
+
@vcloud_director ||= Fog::Compute::VcloudDirector.new(
|
16
|
+
:connection_options => {
|
17
|
+
:ssl_verify_peer => false,
|
18
|
+
:connect_timeout => 200,
|
19
|
+
:read_timeout => 200
|
20
|
+
}
|
21
|
+
)
|
22
|
+
end
|
23
|
+
|
24
|
+
def organizations
|
25
|
+
@organizations ||= vcloud_director.organizations
|
26
|
+
end
|
27
|
+
|
28
|
+
def organization
|
29
|
+
organizations.first
|
30
|
+
end
|
31
|
+
|
32
|
+
def catalogs
|
33
|
+
@catalogs ||= organization.catalogs
|
34
|
+
end
|
35
|
+
|
36
|
+
def catalog
|
37
|
+
catalogs.first
|
38
|
+
end
|
39
|
+
|
40
|
+
def vdcs
|
41
|
+
@vdcs ||= organization.vdcs
|
42
|
+
end
|
43
|
+
|
44
|
+
def vdc
|
45
|
+
vdcs.first
|
46
|
+
end
|
47
|
+
|
48
|
+
def vapps
|
49
|
+
@vapps ||= vdc.vapps
|
50
|
+
end
|
51
|
+
|
52
|
+
def vapp
|
53
|
+
vapps.detect {|vapp| vapp.vms.size >= 1 }
|
54
|
+
end
|
55
|
+
|
56
|
+
def the_network
|
57
|
+
@network ||= organization.networks.get_by_name(NETWORK_NAME)
|
58
|
+
end
|
59
|
+
|
60
|
+
def the_catalog
|
61
|
+
@catalog ||= organization.catalogs.get_by_name(CATALOG_NAME)
|
62
|
+
end
|
63
|
+
|
64
|
+
def the_catalog_item
|
65
|
+
return nil unless the_catalog
|
66
|
+
@catalog_item ||= the_catalog.catalog_items.get_by_name(CATALOG_ITEM_NAME)
|
67
|
+
end
|