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,18 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class VcloudDirector
|
4
|
+
class Real
|
5
|
+
|
6
|
+
def get_task(task_id)
|
7
|
+
request(
|
8
|
+
:expects => 200,
|
9
|
+
:method => 'GET',
|
10
|
+
:parser => Fog::ToHashDocument.new,
|
11
|
+
:path => "task/#{task_id}"
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class VcloudDirector
|
4
|
+
class Real
|
5
|
+
|
6
|
+
def get_tasks_list(tasks_list_id)
|
7
|
+
request(
|
8
|
+
:expects => 200,
|
9
|
+
:method => 'GET',
|
10
|
+
:parser => Fog::ToHashDocument.new,
|
11
|
+
:path => "tasksList/#{tasks_list_id}"
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class VcloudDirector
|
4
|
+
class Real
|
5
|
+
|
6
|
+
def get_vapp(vapp_id)
|
7
|
+
request(
|
8
|
+
:expects => 200,
|
9
|
+
:method => 'GET',
|
10
|
+
:parser => Fog::ToHashDocument.new,
|
11
|
+
:path => "vApp/#{vapp_id}"
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class VcloudDirector
|
4
|
+
class Real
|
5
|
+
|
6
|
+
def get_vapp_template(vapp_template_id)
|
7
|
+
request(
|
8
|
+
:expects => 200,
|
9
|
+
:method => 'GET',
|
10
|
+
:parser => Fog::ToHashDocument.new,
|
11
|
+
:path => "vAppTemplate/#{vapp_template_id}"
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,154 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class VcloudDirector
|
4
|
+
class Real
|
5
|
+
def get_vdc(vdc_id)
|
6
|
+
request(
|
7
|
+
:expects => 200,
|
8
|
+
:method => 'GET',
|
9
|
+
:parser => Fog::ToHashDocument.new,
|
10
|
+
:path => "vdc/#{vdc_id}"
|
11
|
+
)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class Mock
|
16
|
+
def get_vdc(vdc_id)
|
17
|
+
vdc = data[:vdc]
|
18
|
+
raise Excon::Errors::NotFound unless vdc_id == vdc[:uuid]
|
19
|
+
|
20
|
+
body =
|
21
|
+
{:xmlns=>xmlns,
|
22
|
+
:xmlns_xsi=>xmlns_xsi,
|
23
|
+
:status=>"1",
|
24
|
+
:name=>vdc[:name],
|
25
|
+
:id=>"urn:vcloud:vdc:#{vdc[:uuid]}",
|
26
|
+
:type=>"application/vnd.vmware.vcloud.vdc+xml",
|
27
|
+
:href=>make_href("vdc/#{vdc[:uuid]}"),
|
28
|
+
:xsi_schemaLocation=>xsi_schema_location,
|
29
|
+
:Link=>
|
30
|
+
[{:rel=>"up",
|
31
|
+
:type=>"application/vnd.vmware.vcloud.org+xml",
|
32
|
+
:href=>make_href("org/#{data[:org][:uuid]}")},
|
33
|
+
{:rel=>"down",
|
34
|
+
:type=>"application/vnd.vmware.vcloud.metadata+xml",
|
35
|
+
:href=>make_href("vdc/#{vdc[:uuid]}/metadata")},
|
36
|
+
{:rel=>"add",
|
37
|
+
:type=>"application/vnd.vmware.vcloud.uploadVAppTemplateParams+xml",
|
38
|
+
:href=>
|
39
|
+
make_href("vdc/#{vdc[:uuid]}/action/uploadVAppTemplate")},
|
40
|
+
{:rel=>"add",
|
41
|
+
:type=>"application/vnd.vmware.vcloud.media+xml",
|
42
|
+
:href=>make_href("vdc/#{vdc[:uuid]}/media")},
|
43
|
+
{:rel=>"add",
|
44
|
+
:type=>
|
45
|
+
"application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml",
|
46
|
+
:href=>
|
47
|
+
make_href("vdc/#{vdc[:uuid]}/action/instantiateVAppTemplate")},
|
48
|
+
{:rel=>"add",
|
49
|
+
:type=>"application/vnd.vmware.vcloud.cloneVAppParams+xml",
|
50
|
+
:href=>make_href("vdc/#{vdc[:uuid]}/action/cloneVApp")},
|
51
|
+
{:rel=>"add",
|
52
|
+
:type=>"application/vnd.vmware.vcloud.cloneVAppTemplateParams+xml",
|
53
|
+
:href=>
|
54
|
+
make_href("vdc/#{vdc[:uuid]}/action/cloneVAppTemplate")},
|
55
|
+
{:rel=>"add",
|
56
|
+
:type=>"application/vnd.vmware.vcloud.cloneMediaParams+xml",
|
57
|
+
:href=>make_href("vdc/#{vdc[:uuid]}/action/cloneMedia")},
|
58
|
+
{:rel=>"add",
|
59
|
+
:type=>"application/vnd.vmware.vcloud.captureVAppParams+xml",
|
60
|
+
:href=>make_href("vdc/#{vdc[:uuid]}/action/captureVApp")},
|
61
|
+
{:rel=>"add",
|
62
|
+
:type=>"application/vnd.vmware.vcloud.composeVAppParams+xml",
|
63
|
+
:href=>make_href("vdc/#{vdc[:uuid]}/action/composeVApp")},
|
64
|
+
{:rel=>"add",
|
65
|
+
:type=>"application/vnd.vmware.vcloud.diskCreateParams+xml",
|
66
|
+
:href=>make_href("vdc/#{vdc[:uuid]}/disk")},
|
67
|
+
{:rel=>"edgeGateways",
|
68
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
69
|
+
:href=>make_href("admin/vdc/#{vdc[:uuid]}/edgeGateways")},
|
70
|
+
{:rel=>"add",
|
71
|
+
:type=>"application/vnd.vmware.vcloud.orgVdcNetwork+xml",
|
72
|
+
:href=>make_href("admin/vdc/#{vdc[:uuid]}/networks")},
|
73
|
+
{:rel=>"orgVdcNetworks",
|
74
|
+
:type=>"application/vnd.vmware.vcloud.query.records+xml",
|
75
|
+
:href=>make_href("admin/vdc/#{vdc[:uuid]}/networks")}],
|
76
|
+
:Description=>vdc[:description]||'',
|
77
|
+
:AllocationModel=>"AllocationVApp",
|
78
|
+
:ComputeCapacity=>
|
79
|
+
{:Cpu=>
|
80
|
+
{:Units=>"MHz",
|
81
|
+
:Allocated=>"0",
|
82
|
+
:Limit=>"0",
|
83
|
+
:Reserved=>"0",
|
84
|
+
:Used=>"0",
|
85
|
+
:Overhead=>"0"},
|
86
|
+
:Memory=>
|
87
|
+
{:Units=>"MB",
|
88
|
+
:Allocated=>"0",
|
89
|
+
:Limit=>"0",
|
90
|
+
:Reserved=>"0",
|
91
|
+
:Used=>"0",
|
92
|
+
:Overhead=>"0"}},
|
93
|
+
:ResourceEntities => {},
|
94
|
+
:AvailableNetworks => {},
|
95
|
+
:Capabilities=>
|
96
|
+
{:SupportedHardwareVersions=>
|
97
|
+
{:SupportedHardwareVersion=>"vmx-08"}},
|
98
|
+
:NicQuota=>"0",
|
99
|
+
:NetworkQuota=>"20",
|
100
|
+
:UsedNetworkCount=>"0",
|
101
|
+
:VmQuota=>"100",
|
102
|
+
:IsEnabled=>"true"}
|
103
|
+
|
104
|
+
# Emulating Fog::ToHashDocument:
|
105
|
+
if data[:networks].size == 1
|
106
|
+
body[:AvailableNetworks][:Network] =
|
107
|
+
[{:type=>"application/vnd.vmware.vcloud.network+xml",
|
108
|
+
:name=>data[:networks].first[:name],
|
109
|
+
:href=>make_href("network/#{data[:networks].first[:name]}")}]
|
110
|
+
else
|
111
|
+
body[:AvailableNetworks][:Network] = data[:networks].map do |network|
|
112
|
+
{:type=>"application/vnd.vmware.vcloud.network+xml",
|
113
|
+
:name=>network[:name],
|
114
|
+
:href=>make_href("network/#{network[:name]}")}
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
# Emulating Fog::ToHashDocument:
|
119
|
+
if data[:catalog_items].size == 1
|
120
|
+
item_type = data[:catalog_items].first[:type]
|
121
|
+
body[:ResourceEntities][:ResourceEntity] =
|
122
|
+
{:type=>"application/vnd.vmware.vcloud.#{item_type}+xml",
|
123
|
+
:name=>data[:catalog_items].first[:name],
|
124
|
+
:href=>
|
125
|
+
make_href("#{item_type}/#{item_type}-#{data[:catalog_items].first[:uuid]}")}
|
126
|
+
else
|
127
|
+
body[:ResourceEntities][:ResourceEntity] = data[:catalog_items].map do |catalog_item|
|
128
|
+
item_type = catalog_item[:type]
|
129
|
+
{:type=>"application/vnd.vmware.vcloud.#{item_type}+xml",
|
130
|
+
:name=>catalog_item[:name],
|
131
|
+
:href=>
|
132
|
+
make_href("#{item_type}/#{item_type}-#{catalog_item[:uuid]}")}
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
if api_version.to_f >= 5.1
|
137
|
+
# TODO
|
138
|
+
#body[:VdcStorageProfiles] =
|
139
|
+
# {:VdcStorageProfile=>
|
140
|
+
# [{:type=>"application/vnd.vmware.vcloud.vdcStorageProfile+xml",
|
141
|
+
# :name=>profile[:name],
|
142
|
+
# :href=>make_href("vdcStorageProfile/#{profile[:uuid]}")}]}
|
143
|
+
end
|
144
|
+
|
145
|
+
Excon::Response.new(
|
146
|
+
:body => body,
|
147
|
+
:headers => {'Content-Type' => "#{body[:type]};version=#{api_version}"},
|
148
|
+
:status => 200
|
149
|
+
)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class VcloudDirector
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/vcloud_director/parsers/compute/vm'
|
7
|
+
|
8
|
+
def get_vm(vm_id)
|
9
|
+
request(
|
10
|
+
:expects => 200,
|
11
|
+
:method => 'GET',
|
12
|
+
:parser => Fog::Parsers::Compute::VcloudDirector::Vm.new,
|
13
|
+
:path => "vApp/#{vm_id}"
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class VcloudDirector
|
4
|
+
class Real
|
5
|
+
|
6
|
+
def get_vm_cpu(vm_id)
|
7
|
+
request(
|
8
|
+
:expects => 200,
|
9
|
+
:method => 'GET',
|
10
|
+
:parser => Fog::ToHashDocument.new,
|
11
|
+
:path => "vApp/#{vm_id}/virtualHardwareSection/cpu"
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class VcloudDirector
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/vcloud_director/parsers/compute/vm_customization'
|
7
|
+
|
8
|
+
def get_vm_customization(vm_id)
|
9
|
+
request(
|
10
|
+
:expects => 200,
|
11
|
+
:method => 'GET',
|
12
|
+
:parser => Fog::Parsers::Compute::VcloudDirector::VmCustomization.new,
|
13
|
+
:path => "vApp/#{vm_id}/guestCustomizationSection"
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class VcloudDirector
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/vcloud_director/parsers/compute/disks'
|
7
|
+
|
8
|
+
def get_vm_disks(vm_id)
|
9
|
+
request(
|
10
|
+
:expects => 200,
|
11
|
+
:method => 'GET',
|
12
|
+
:parser => Fog::Parsers::Compute::VcloudDirector::Disks.new,
|
13
|
+
:path => "vApp/#{vm_id}/virtualHardwareSection/disks"
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class VcloudDirector
|
4
|
+
class Real
|
5
|
+
|
6
|
+
def get_vm_memory(vm_id)
|
7
|
+
request(
|
8
|
+
:expects => 200,
|
9
|
+
:method => 'GET',
|
10
|
+
:parser => Fog::ToHashDocument.new,
|
11
|
+
:path => "vApp/#{vm_id}/virtualHardwareSection/memory"
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class VcloudDirector
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/vcloud_director/parsers/compute/vm_network'
|
7
|
+
|
8
|
+
def get_vm_network(vm_id)
|
9
|
+
request(
|
10
|
+
:expects => 200,
|
11
|
+
:method => 'GET',
|
12
|
+
:parser => Fog::Parsers::Compute::VcloudDirector::VmNetwork.new,
|
13
|
+
:path => "vApp/#{vm_id}/networkConnectionSection/"
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class VcloudDirector
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/vcloud_director/parsers/compute/vms'
|
7
|
+
|
8
|
+
def get_vms(vapp_id)
|
9
|
+
request(
|
10
|
+
:expects => 200,
|
11
|
+
:method => 'GET',
|
12
|
+
:parser => Fog::Parsers::Compute::VcloudDirector::Vms.new,
|
13
|
+
:path => "vApp/#{vapp_id}"
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class VcloudDirector
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/vcloud_director/parsers/compute/vms_by_metadata'
|
7
|
+
|
8
|
+
def get_vms_by_metadata(key,value)
|
9
|
+
request(
|
10
|
+
:expects => 200,
|
11
|
+
:method => 'GET',
|
12
|
+
:parser => Fog::Parsers::Compute::VcloudDirector::VmsByMetadata.new,
|
13
|
+
:path => "vms/query?format=records&filter=metadata:#{key}==STRING:#{value}"
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
module Helper
|
4
|
+
|
5
|
+
def catalog_item_end_point(catalog_item_id = nil)
|
6
|
+
end_point + ( catalog_item_id ? "catalogItem/#{catalog_item_id}" : "catalogItem" )
|
7
|
+
end
|
8
|
+
|
9
|
+
def network_end_point(network_id = nil)
|
10
|
+
end_point + ( network_id ? "network/#{network_id}" : "network" )
|
11
|
+
end
|
12
|
+
|
13
|
+
def vapp_template_end_point(vapp_template_id = nil)
|
14
|
+
end_point + ( vapp_template_id ? "vAppTemplate/#{vapp_template_id}" : "vAppTemplate" )
|
15
|
+
end
|
16
|
+
|
17
|
+
def vdc_end_point(vdc_id = nil)
|
18
|
+
end_point + ( vdc_id ? "vdc/#{vdc_id}" : "vdc" )
|
19
|
+
end
|
20
|
+
|
21
|
+
def endpoint
|
22
|
+
end_point
|
23
|
+
end
|
24
|
+
|
25
|
+
# A single organization can have multiple Org vDCs.
|
26
|
+
def default_vdc_id
|
27
|
+
if default_organization_id
|
28
|
+
@default_vdc_id ||= begin
|
29
|
+
vdcs = default_organization_body[:Link].select {|link|
|
30
|
+
link[:type] == 'application/vnd.vmware.vcloud.vdc+xml'
|
31
|
+
}
|
32
|
+
if vdcs.length == 1
|
33
|
+
vdcs.first[:href].split('/').last
|
34
|
+
else
|
35
|
+
nil
|
36
|
+
end
|
37
|
+
end
|
38
|
+
else
|
39
|
+
nil
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# A single organization can have multiple Org vDCs.
|
44
|
+
def default_vdc_body
|
45
|
+
return nil unless default_vdc_id
|
46
|
+
@default_vdc_body ||= begin
|
47
|
+
response = get_vdc(default_vdc_id)
|
48
|
+
return nil unless response.respond_to? 'data'
|
49
|
+
response.data[:body]
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def default_network_name
|
54
|
+
return nil unless default_vdc_body
|
55
|
+
return nil unless network = default_vdc_body[:AvailableNetworks][:Network]
|
56
|
+
network["name"]
|
57
|
+
end
|
58
|
+
|
59
|
+
def default_network_id
|
60
|
+
return nil unless default_vdc_body
|
61
|
+
return nil unless network = default_vdc_body[:AvailableNetworks][:Network]
|
62
|
+
network[:href].split('/').last
|
63
|
+
end
|
64
|
+
|
65
|
+
def default_network_name
|
66
|
+
if default_vdc_id
|
67
|
+
@default_network_name ||= begin
|
68
|
+
network = default_vdc_body[:AvailableNetworks][:Network]
|
69
|
+
network[:name]
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
def default_organization_id
|
75
|
+
@default_organization_id ||= begin
|
76
|
+
org = get_organizations.body[:Org]
|
77
|
+
return nil unless org[:href]
|
78
|
+
org[:href].split('/').last
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
def default_organization_body
|
83
|
+
return nil unless default_organization_id
|
84
|
+
@default_organization_body ||= begin
|
85
|
+
response = get_organization(default_organization_id)
|
86
|
+
return nil unless response.respond_to? 'body'
|
87
|
+
response.body
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|