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,175 @@
|
|
1
|
+
# This is the data structure it accepts, this is the output of get_vm_disks
|
2
|
+
#
|
3
|
+
# {"disks=>
|
4
|
+
# [{:address=>0,
|
5
|
+
# :description=>"SCSI Controller",
|
6
|
+
# :name=>"SCSI Controller 0",
|
7
|
+
# :id=>2,
|
8
|
+
# :resource_sub_type=>"VirtualSCSI",
|
9
|
+
# :resource_type=>6},
|
10
|
+
# {:address_on_parent=>0,
|
11
|
+
# :description=>"Hard disk",
|
12
|
+
# :name=>"Hard disk 1",
|
13
|
+
# :id=>2000,
|
14
|
+
# :parent=>2,
|
15
|
+
# :resource_type=>17,
|
16
|
+
# :capacity=>16384,
|
17
|
+
# :bus_sub_type=>"VirtualSCSI",
|
18
|
+
# :bus_type=>6},
|
19
|
+
# {:address=>0,
|
20
|
+
# :description=>"IDE Controller",
|
21
|
+
# :name=>"IDE Controller 0",
|
22
|
+
# :id=>3,
|
23
|
+
# :resource_type=>5}]}
|
24
|
+
#
|
25
|
+
# This is what it generates
|
26
|
+
#
|
27
|
+
# <vcloud:RasdItemsList xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
|
28
|
+
# xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"
|
29
|
+
# type="application/vnd.vmware.vcloud.rasdItemsList+xml"
|
30
|
+
# >
|
31
|
+
# <vcloud:Item>
|
32
|
+
# <rasd:Address>0</rasd:Address>
|
33
|
+
# <rasd:Description>SCSI Controller</rasd:Description>
|
34
|
+
# <rasd:ElementName>SCSI Controller 0</rasd:ElementName>
|
35
|
+
# <rasd:InstanceID>2</rasd:InstanceID>
|
36
|
+
# <rasd:ResourceSubType>VirtualSCSI</rasd:ResourceSubType>
|
37
|
+
# <rasd:ResourceType>6</rasd:ResourceType>
|
38
|
+
# </vcloud:Item><vcloud:Item>
|
39
|
+
# <rasd:AddressOnParent>0</rasd:AddressOnParent>
|
40
|
+
# <rasd:Description>Hard disk</rasd:Description>
|
41
|
+
# <rasd:ElementName>Hard disk 1</rasd:ElementName>
|
42
|
+
# <rasd:HostResource vcloud:capacity="16384" vcloud:busSubType="VirtualSCSI" vcloud:busType="6"></rasd:HostResource>
|
43
|
+
# <rasd:InstanceID>2000</rasd:InstanceID>
|
44
|
+
# <rasd:Parent>2</rasd:Parent>
|
45
|
+
# <rasd:ResourceType>17</rasd:ResourceType>
|
46
|
+
# </vcloud:Item><vcloud:Item>
|
47
|
+
# <rasd:Address>0</rasd:Address>
|
48
|
+
# <rasd:Description>IDE Controller</rasd:Description>
|
49
|
+
# <rasd:ElementName>IDE Controller 0</rasd:ElementName>
|
50
|
+
# <rasd:InstanceID>3</rasd:InstanceID>
|
51
|
+
# <rasd:ResourceType>5</rasd:ResourceType>
|
52
|
+
# </vcloud:Item></vcloud:RasdItemsList>
|
53
|
+
#
|
54
|
+
module Fog
|
55
|
+
module Generators
|
56
|
+
module Compute
|
57
|
+
module VcloudDirector
|
58
|
+
|
59
|
+
class Disks
|
60
|
+
|
61
|
+
def initialize(items=[])
|
62
|
+
@items = items[:disks]
|
63
|
+
end
|
64
|
+
|
65
|
+
def modify_hard_disk_size(disk_number, new_size)
|
66
|
+
found = false
|
67
|
+
@items.each do |item|
|
68
|
+
if item[:resource_type] == 17
|
69
|
+
if item[:name] == "Hard disk #{disk_number}"
|
70
|
+
found = true
|
71
|
+
raise "Hard disk size can't be reduced" if item[:capacity].to_i > new_size.to_i
|
72
|
+
item[:capacity] = new_size
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
raise "Hard disk #{disk_number} not found" unless found
|
77
|
+
true
|
78
|
+
end
|
79
|
+
|
80
|
+
def add_hard_disk(size)
|
81
|
+
new_hard_disk = last_hard_disk.dup
|
82
|
+
new_hard_disk[:capacity] = size
|
83
|
+
new_hard_disk[:name] = increase_hard_disk_name(new_hard_disk[:name])
|
84
|
+
new_hard_disk[:address_on_parent] += 1
|
85
|
+
new_hard_disk[:id] += 1
|
86
|
+
@items << new_hard_disk
|
87
|
+
end
|
88
|
+
|
89
|
+
def delete_hard_disk(disk_number)
|
90
|
+
@items.delete_if {|item| item[:resource_type] == 17 && item[:name] =~ /#{disk_number}$/ }
|
91
|
+
end
|
92
|
+
|
93
|
+
def disks
|
94
|
+
{ :disks => @items }
|
95
|
+
end
|
96
|
+
|
97
|
+
def generate_xml
|
98
|
+
output = ""
|
99
|
+
output << header
|
100
|
+
@items.each do |item|
|
101
|
+
output << case item[:resource_type]
|
102
|
+
when 6
|
103
|
+
scsi_controller(item)
|
104
|
+
when 17
|
105
|
+
hard_disk_item(item)
|
106
|
+
when 5
|
107
|
+
ide_controller_item(item)
|
108
|
+
end
|
109
|
+
end
|
110
|
+
output << tail
|
111
|
+
output
|
112
|
+
end
|
113
|
+
|
114
|
+
def header
|
115
|
+
'<vcloud:RasdItemsList xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
|
116
|
+
xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"
|
117
|
+
type="application/vnd.vmware.vcloud.rasdItemsList+xml">'
|
118
|
+
end
|
119
|
+
|
120
|
+
def tail
|
121
|
+
'</vcloud:RasdItemsList>'
|
122
|
+
end
|
123
|
+
|
124
|
+
def hard_disk_item(opts={})
|
125
|
+
"<vcloud:Item>
|
126
|
+
<rasd:AddressOnParent>#{opts[:address_on_parent]}</rasd:AddressOnParent>
|
127
|
+
<rasd:Description>#{opts[:description]}</rasd:Description>
|
128
|
+
<rasd:ElementName>#{opts[:name]}</rasd:ElementName>
|
129
|
+
<rasd:HostResource vcloud:capacity=\"#{opts[:capacity]}\" vcloud:busSubType=\"#{opts[:bus_sub_type]}\" vcloud:busType=\"#{opts[:bus_type]}\"></rasd:HostResource>
|
130
|
+
<rasd:InstanceID>#{opts[:id]}</rasd:InstanceID>
|
131
|
+
<rasd:Parent>#{opts[:parent]}</rasd:Parent>
|
132
|
+
<rasd:ResourceType>17</rasd:ResourceType>
|
133
|
+
</vcloud:Item>"
|
134
|
+
end
|
135
|
+
|
136
|
+
def ide_controller_item(opts={})
|
137
|
+
"<vcloud:Item>
|
138
|
+
<rasd:Address>#{opts[:address]}</rasd:Address>
|
139
|
+
<rasd:Description>#{opts[:description]}</rasd:Description>
|
140
|
+
<rasd:ElementName>#{opts[:name]}</rasd:ElementName>
|
141
|
+
<rasd:InstanceID>#{opts[:id]}</rasd:InstanceID>
|
142
|
+
<rasd:ResourceType>5</rasd:ResourceType>
|
143
|
+
</vcloud:Item>"
|
144
|
+
end
|
145
|
+
|
146
|
+
def scsi_controller(opts={})
|
147
|
+
"<vcloud:Item>
|
148
|
+
<rasd:Address>#{opts[:address]}</rasd:Address>
|
149
|
+
<rasd:Description>#{opts[:description]}</rasd:Description>
|
150
|
+
<rasd:ElementName>#{opts[:name]}</rasd:ElementName>
|
151
|
+
<rasd:InstanceID>#{opts[:id]}</rasd:InstanceID>
|
152
|
+
<rasd:ResourceSubType>#{opts[:resource_sub_type]}</rasd:ResourceSubType>
|
153
|
+
<rasd:ResourceType>6</rasd:ResourceType>
|
154
|
+
</vcloud:Item>"
|
155
|
+
end
|
156
|
+
|
157
|
+
# helpers
|
158
|
+
|
159
|
+
def last_hard_disk
|
160
|
+
hard_disks = @items.select{|item| item[:resource_type] == 17}
|
161
|
+
names = hard_disks.map{|item| item[:name] }
|
162
|
+
only_numbers = names.map{|b| b.scan(/\d+/).first.to_i} # extract numbers
|
163
|
+
last_number = only_numbers.sort.last # get the last number
|
164
|
+
hard_disks.detect{|hard_disk| hard_disk[:name] =~ /#{last_number}$/ }
|
165
|
+
end
|
166
|
+
|
167
|
+
def increase_hard_disk_name(hard_disk_name)
|
168
|
+
hard_disk_name.gsub(/(\d+)$/) { $1.to_i + 1 }
|
169
|
+
end
|
170
|
+
|
171
|
+
end
|
172
|
+
end
|
173
|
+
end
|
174
|
+
end
|
175
|
+
end
|
@@ -0,0 +1,105 @@
|
|
1
|
+
#
|
2
|
+
#
|
3
|
+
# {:metadata=>{"buenas si"=>"no tanto ya", "hola"=>"adios"},
|
4
|
+
# :type=>"application/vnd.vmware.vcloud.metadata+xml",
|
5
|
+
# :href=>
|
6
|
+
# "https://example.com/api/vApp/vm-18545e82-d919-4071-ae7e-d1300d9d8112/metadata",
|
7
|
+
# :id=>"vm-18545e82-d919-4071-ae7e-d1300d9d8112"}
|
8
|
+
#
|
9
|
+
# <Metadata xmlns="http://www.vmware.com/vcloud/v1.5" type="application/vnd.vmware.vcloud.metadata+xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://10.194.1.65/api/v1.5/schema/master.xsd">
|
10
|
+
# <MetadataEntry>
|
11
|
+
# <Key>buenas si</Key>
|
12
|
+
# <Value>no tanto ya</Value>
|
13
|
+
# </MetadataEntry>
|
14
|
+
# <MetadataEntry">
|
15
|
+
# <Key>hola</Key>
|
16
|
+
# <Value>adios</Value>
|
17
|
+
# </MetadataEntry>
|
18
|
+
# </Metadata>
|
19
|
+
|
20
|
+
module Fog
|
21
|
+
module Generators
|
22
|
+
module Compute
|
23
|
+
module VcloudDirector
|
24
|
+
|
25
|
+
class MetadataBase
|
26
|
+
|
27
|
+
attr_reader :attrs
|
28
|
+
|
29
|
+
def initialize(attrs={})
|
30
|
+
@attrs = attrs
|
31
|
+
end
|
32
|
+
|
33
|
+
def generate_xml
|
34
|
+
output = ""
|
35
|
+
output << header
|
36
|
+
attrs[:metadata].each_pair do |k,v|
|
37
|
+
output << metadata_entry(k,v)
|
38
|
+
end
|
39
|
+
output << tail
|
40
|
+
output
|
41
|
+
end
|
42
|
+
|
43
|
+
def add_item(k,v)
|
44
|
+
@attrs[:metadata].merge!(Hash[k,v])
|
45
|
+
end
|
46
|
+
|
47
|
+
# 1.5
|
48
|
+
def header
|
49
|
+
'<Metadata xmlns="http://www.vmware.com/vcloud/v1.5"
|
50
|
+
type="application/vnd.vmware.vcloud.metadata+xml"
|
51
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
52
|
+
xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://10.194.1.65/api/v1.5/schema/master.xsd">
|
53
|
+
'
|
54
|
+
end
|
55
|
+
|
56
|
+
def metadata_entry
|
57
|
+
raise "This is an abstract class. Use the appropriate subclass"
|
58
|
+
end
|
59
|
+
|
60
|
+
# 5.1
|
61
|
+
#def header
|
62
|
+
# '<Metadata xmlns="http://www.vmware.com/vcloud/v1.5"
|
63
|
+
# xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
64
|
+
# type="application/vnd.vmware.vcloud.metadata+xml"
|
65
|
+
# href="https://devlab.mdsol.com/api/vApp/vm-345c3619-edcd-4a8c-a8b9-c69ace3f89d1/metadata"
|
66
|
+
# xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://10.194.1.65/api/v1.5/schema/master.xsd">'
|
67
|
+
#end
|
68
|
+
|
69
|
+
def tail
|
70
|
+
'</Metadata>'
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
class MetadataV51 < MetadataBase
|
76
|
+
def metadata_entry(key,value)
|
77
|
+
body = <<EOF
|
78
|
+
<MetadataEntry
|
79
|
+
type="application/vnd.vmware.vcloud.metadata.value+xml">
|
80
|
+
<Key>#{key}</Key>
|
81
|
+
<TypedValue
|
82
|
+
xsi:type="MetadataStringValue">
|
83
|
+
<Value>#{value}</Value>
|
84
|
+
</TypedValue>
|
85
|
+
</MetadataEntry>
|
86
|
+
EOF
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
90
|
+
|
91
|
+
class MetadataV15 < MetadataBase
|
92
|
+
def metadata_entry(key,value)
|
93
|
+
body = <<EOF
|
94
|
+
<MetadataEntry>
|
95
|
+
<Key>#{key}</Key>
|
96
|
+
<Value>#{value}</Value>
|
97
|
+
</MetadataEntry>
|
98
|
+
EOF
|
99
|
+
end
|
100
|
+
end
|
101
|
+
#
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
@@ -0,0 +1,122 @@
|
|
1
|
+
# This is the data structure it accepts, this is the output of get_vm_network
|
2
|
+
#
|
3
|
+
# {:type=>"application/vnd.vmware.vcloud.networkConnectionSection+xml",
|
4
|
+
# :href=>
|
5
|
+
# "https://example.com/api/vApp/vm-8b74d95a-ee91-4f46-88d8-fc92be0dbaae/networkConnectionSection/",
|
6
|
+
# :id=>"vm-8b74d95a-ee91-4f46-88d8-fc92be0dbaae",
|
7
|
+
# :primary_network_connection_index=>0,
|
8
|
+
# :network=>"DevOps - Dev Network Connection",
|
9
|
+
# :needs_customization=>true,
|
10
|
+
# :network_connection_index=>0,
|
11
|
+
# :ip_address=>"10.192.0.130",
|
12
|
+
# :is_connected=>true,
|
13
|
+
# :mac_address=>"00:50:56:01:00:8d",
|
14
|
+
# :ip_address_allocation_mode=>"POOL"}
|
15
|
+
#
|
16
|
+
#
|
17
|
+
# This is what it generates
|
18
|
+
#
|
19
|
+
# <NetworkConnectionSection xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" type="application/vnd.vmware.vcloud.networkConnectionSection+xml" href="https://example.com/api/vApp/vm-8b74d95a-ee91-4f46-88d8-fc92be0dbaae/networkConnectionSection/" ovf:required="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.dmtf.org/ovf/envelope/1 http://schemas.dmtf.org/ovf/envelope/1/dsp8023_1.1.0.xsd http://www.vmware.com/vcloud/v1.5 http://10.194.1.65/api/v1.5/schema/master.xsd">
|
20
|
+
# <ovf:Info>Specifies the available VM network connections</ovf:Info>
|
21
|
+
# <PrimaryNetworkConnectionIndex>0</PrimaryNetworkConnectionIndex>
|
22
|
+
# <NetworkConnection network="DevOps - Dev Network Connection" needsCustomization="true">
|
23
|
+
# <NetworkConnectionIndex>0</NetworkConnectionIndex>
|
24
|
+
# <IpAddress>10.192.0.130</IpAddress>
|
25
|
+
# <IsConnected>true</IsConnected>
|
26
|
+
# <MACAddress>00:50:56:01:00:8d</MACAddress>
|
27
|
+
# <IpAddressAllocationMode>POOL</IpAddressAllocationMode>
|
28
|
+
# </NetworkConnection>
|
29
|
+
# <Link rel="edit" type="application/vnd.vmware.vcloud.networkConnectionSection+xml" href="https://example.com/api/vApp/vm-8b74d95a-ee91-4f46-88d8-fc92be0dbaae/networkConnectionSection/"/>
|
30
|
+
# </NetworkConnectionSection>
|
31
|
+
#
|
32
|
+
module Fog
|
33
|
+
module Generators
|
34
|
+
module Compute
|
35
|
+
module VcloudDirector
|
36
|
+
|
37
|
+
class VmNetwork
|
38
|
+
|
39
|
+
attr_reader :attrs
|
40
|
+
|
41
|
+
def initialize(attrs={})
|
42
|
+
@attrs = attrs
|
43
|
+
end
|
44
|
+
|
45
|
+
def generate_xml
|
46
|
+
output = ""
|
47
|
+
output << header
|
48
|
+
output << body(@attrs)
|
49
|
+
output << tail
|
50
|
+
output
|
51
|
+
end
|
52
|
+
|
53
|
+
def network
|
54
|
+
@attrs[:network]
|
55
|
+
end
|
56
|
+
|
57
|
+
def network=(new_network_name)
|
58
|
+
@attrs[:network] = new_network_name
|
59
|
+
end
|
60
|
+
|
61
|
+
def ip_address
|
62
|
+
@attrs[:ip_address]
|
63
|
+
end
|
64
|
+
|
65
|
+
def ip_address=(new_ip_address)
|
66
|
+
@attrs[:ip_address] = new_ip_address
|
67
|
+
end
|
68
|
+
|
69
|
+
def is_connected
|
70
|
+
@attrs[:is_connected]
|
71
|
+
end
|
72
|
+
|
73
|
+
def is_connected=(new_is_connected)
|
74
|
+
@attrs[:is_connected] = new_is_connected
|
75
|
+
end
|
76
|
+
|
77
|
+
def ip_address_allocation_mode
|
78
|
+
@attrs[:ip_address_allocation_mode]
|
79
|
+
end
|
80
|
+
|
81
|
+
def ip_address_allocation_mode=(new_ip_address_allocation_mode)
|
82
|
+
@attrs[:ip_address_allocation_mode] = new_ip_address_allocation_mode
|
83
|
+
end
|
84
|
+
|
85
|
+
def header
|
86
|
+
'<NetworkConnectionSection xmlns="http://www.vmware.com/vcloud/v1.5"
|
87
|
+
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
|
88
|
+
type="application/vnd.vmware.vcloud.networkConnectionSection+xml"
|
89
|
+
ovf:required="false"
|
90
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
91
|
+
xsi:schemaLocation="http://schemas.dmtf.org/ovf/envelope/1
|
92
|
+
http://schemas.dmtf.org/ovf/envelope/1/dsp8023_1.1.0.xsd
|
93
|
+
http://www.vmware.com/vcloud/v1.5 http://10.194.1.65/api/v1.5/schema/master.xsd">'
|
94
|
+
|
95
|
+
end
|
96
|
+
|
97
|
+
def body(opts={})
|
98
|
+
body = <<EOF
|
99
|
+
<ovf:Info>#{opts[:info]}</ovf:Info>
|
100
|
+
<PrimaryNetworkConnectionIndex>#{opts[:primary_network_connection_index]}</PrimaryNetworkConnectionIndex>
|
101
|
+
<NetworkConnection
|
102
|
+
network="#{opts[:network]}"
|
103
|
+
needsCustomization="#{opts[:needs_customization]}">
|
104
|
+
<NetworkConnectionIndex>#{opts[:network_connection_index]}</NetworkConnectionIndex>
|
105
|
+
<IpAddress>#{opts[:ip_address]}</IpAddress>
|
106
|
+
<IsConnected>#{opts[:is_connected]}</IsConnected>
|
107
|
+
<MACAddress>#{opts[:mac_address]}</MACAddress>
|
108
|
+
<IpAddressAllocationMode>#{opts[:ip_address_allocation_mode]}</IpAddressAllocationMode>
|
109
|
+
</NetworkConnection>
|
110
|
+
EOF
|
111
|
+
end
|
112
|
+
|
113
|
+
def tail
|
114
|
+
'</NetworkConnectionSection>'
|
115
|
+
end
|
116
|
+
|
117
|
+
end
|
118
|
+
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class VcloudDirector
|
6
|
+
|
7
|
+
class Catalog < Model
|
8
|
+
|
9
|
+
identity :id
|
10
|
+
|
11
|
+
attribute :name
|
12
|
+
attribute :type
|
13
|
+
attribute :href
|
14
|
+
attribute :description, :aliases => :Description
|
15
|
+
attribute :is_published, :aliases => :IsPublished, :type => :boolean
|
16
|
+
|
17
|
+
def catalog_items
|
18
|
+
requires :id
|
19
|
+
service.catalog_items(:catalog => self)
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class VcloudDirector
|
6
|
+
|
7
|
+
class CatalogItem < Model
|
8
|
+
|
9
|
+
identity :id
|
10
|
+
|
11
|
+
attribute :name
|
12
|
+
attribute :type
|
13
|
+
attribute :href
|
14
|
+
attribute :description, :aliases => :Description
|
15
|
+
attribute :vapp_template_id
|
16
|
+
|
17
|
+
def instantiate(vapp_name, options={})
|
18
|
+
response = service.instantiate_vapp_template(vapp_name, vapp_template_id, options)
|
19
|
+
service.process_task(response.body[:Tasks][:Task])
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|