fog 1.25.0 → 1.26.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/CHANGELOG.md +113 -0
- data/Rakefile +4 -1
- data/fog.gemspec +9 -5
- data/lib/fog.rb +2 -0
- data/lib/fog/aws/models/auto_scaling/configuration.rb +1 -0
- data/lib/fog/aws/models/storage/file.rb +5 -3
- data/lib/fog/aws/parsers/sts/assume_role_with_saml.rb +26 -0
- data/lib/fog/aws/requests/auto_scaling/create_launch_configuration.rb +3 -0
- data/lib/fog/aws/requests/auto_scaling/describe_launch_configurations.rb +1 -0
- data/lib/fog/aws/requests/compute/describe_network_acls.rb +1 -2
- data/lib/fog/aws/requests/dns/create_health_check.rb +12 -12
- data/lib/fog/aws/requests/storage/put_bucket_logging.rb +14 -13
- data/lib/fog/aws/requests/sts/assume_role_with_saml.rb +44 -0
- data/lib/fog/aws/signaturev4.rb +3 -3
- data/lib/fog/aws/storage.rb +140 -34
- data/lib/fog/aws/sts.rb +34 -3
- data/lib/fog/bin.rb +1 -1
- data/lib/fog/core/deprecated/connection.rb +2 -2
- data/lib/fog/digitalocean/models/compute/server.rb +27 -2
- data/lib/fog/digitalocean/requests/compute/create_server.rb +2 -0
- data/lib/fog/fogdocker/models/compute/server.rb +4 -0
- data/lib/fog/fogdocker/requests/compute/container_get.rb +1 -0
- data/lib/fog/google/models/storage/files.rb +5 -1
- data/lib/fog/hp/core.rb +1 -0
- data/lib/fog/ninefold/storage.rb +1 -1
- data/lib/fog/opennebula/compute.rb +1 -1
- data/lib/fog/openstack/examples/compute/block_device_mapping_v2.rb +30 -0
- data/lib/fog/openstack/identity.rb +4 -2
- data/lib/fog/openstack/models/compute/server.rb +5 -3
- data/lib/fog/openstack/models/image/images.rb +2 -2
- data/lib/fog/openstack/models/network/floating_ips.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_server.rb +23 -11
- data/lib/fog/openstack/requests/image/list_public_images_detailed.rb +7 -5
- data/lib/fog/openstack/requests/storage/head_containers.rb +1 -1
- data/lib/fog/rackspace.rb +1 -0
- data/lib/fog/rackspace/core.rb +1 -0
- data/lib/fog/rackspace/docs/orchestration.md +356 -0
- data/lib/fog/rackspace/models/orchestration/event.rb +18 -0
- data/lib/fog/rackspace/models/orchestration/events.rb +28 -0
- data/lib/fog/rackspace/models/orchestration/resource.rb +30 -0
- data/lib/fog/rackspace/models/orchestration/resource_schemas.rb +16 -0
- data/lib/fog/rackspace/models/orchestration/resources.rb +35 -0
- data/lib/fog/rackspace/models/orchestration/stack.rb +48 -0
- data/lib/fog/rackspace/models/orchestration/stacks.rb +40 -0
- data/lib/fog/rackspace/models/orchestration/template.rb +13 -0
- data/lib/fog/rackspace/models/orchestration/templates.rb +31 -0
- data/lib/fog/rackspace/orchestration.rb +227 -0
- data/lib/fog/rackspace/requests/orchestration/abandon_stack.rb +15 -0
- data/lib/fog/rackspace/requests/orchestration/build_info.rb +15 -0
- data/lib/fog/rackspace/requests/orchestration/create_stack.rb +16 -0
- data/lib/fog/rackspace/requests/orchestration/delete_stack.rb +15 -0
- data/lib/fog/rackspace/requests/orchestration/get_stack_template.rb +20 -0
- data/lib/fog/rackspace/requests/orchestration/list_resource_events.rb +19 -0
- data/lib/fog/rackspace/requests/orchestration/list_resource_types.rb +22 -0
- data/lib/fog/rackspace/requests/orchestration/list_resources.rb +19 -0
- data/lib/fog/rackspace/requests/orchestration/list_stack_data.rb +22 -0
- data/lib/fog/rackspace/requests/orchestration/list_stack_events.rb +19 -0
- data/lib/fog/rackspace/requests/orchestration/preview_stack.rb +16 -0
- data/lib/fog/rackspace/requests/orchestration/show_event_details.rb +22 -0
- data/lib/fog/rackspace/requests/orchestration/show_resource_data.rb +22 -0
- data/lib/fog/rackspace/requests/orchestration/show_resource_metadata.rb +22 -0
- data/lib/fog/rackspace/requests/orchestration/show_resource_schema.rb +15 -0
- data/lib/fog/rackspace/requests/orchestration/show_resource_template.rb +20 -0
- data/lib/fog/rackspace/requests/orchestration/show_stack_details.rb +22 -0
- data/lib/fog/rackspace/requests/orchestration/update_stack.rb +16 -0
- data/lib/fog/rackspace/requests/orchestration/validate_template.rb +16 -0
- data/lib/fog/version.rb +1 -1
- data/lib/tasks/changelog_task.rb +2 -0
- data/spec/fog/bin/atmos_spec.rb +10 -0
- data/spec/fog/bin/aws_spec.rb +10 -0
- data/spec/fog/bin/baremetalcloud_spec.rb +10 -0
- data/spec/fog/bin/bluebox_spec.rb +10 -0
- data/spec/fog/bin/brightbox_spec.rb +31 -0
- data/spec/fog/bin/clodo_spec.rb +10 -0
- data/spec/fog/bin/cloudsigma_spec.rb +10 -0
- data/spec/fog/bin/cloudstack_spec.rb +10 -0
- data/spec/fog/bin/digitalocean_spec.rb +10 -0
- data/spec/fog/bin/dnsimple_spec.rb +10 -0
- data/spec/fog/bin/dnsmadeeasy_spec.rb +10 -0
- data/spec/fog/bin/dreamhost_spec.rb +10 -0
- data/spec/fog/bin/dynect_spec.rb +10 -0
- data/spec/fog/bin/ecloud_spec.rb +10 -0
- data/spec/fog/bin/fogdocker_spec.rb +10 -0
- data/spec/fog/bin/glesys_spec.rb +10 -0
- data/spec/fog/bin/gogrid_spec.rb +10 -0
- data/spec/fog/bin/google_spec.rb +10 -0
- data/spec/fog/bin/hp_spec.rb +10 -0
- data/spec/fog/bin/ibm_spec.rb +10 -0
- data/spec/fog/bin/internetarchive_spec.rb +10 -0
- data/spec/fog/bin/joyent_spec.rb +10 -0
- data/spec/fog/bin/libvirt_spec.rb +10 -0
- data/spec/fog/bin/linode_spec.rb +10 -0
- data/spec/fog/bin/local_spec.rb +10 -0
- data/spec/fog/bin/ninefold_spec.rb +10 -0
- data/spec/fog/bin/opennebula_spec.rb +10 -0
- data/spec/fog/bin/openstack_spec.rb +10 -0
- data/spec/fog/bin/openvz_spec.rb +10 -0
- data/spec/fog/bin/ovirt_spec.rb +10 -0
- data/spec/fog/bin/profitbricks_spec.rb +10 -0
- data/spec/fog/bin/rackspace_spec.rb +10 -0
- data/spec/fog/bin/rage4_spec.rb +10 -0
- data/spec/fog/bin/riakcs_spec.rb +10 -0
- data/spec/fog/bin/sakuracloud_spec.rb +10 -0
- data/spec/fog/bin/serverlove_spec.rb +10 -0
- data/spec/fog/bin/softlayer_spec.rb +10 -0
- data/spec/fog/bin/stormondemand_spec.rb +10 -0
- data/spec/fog/bin/vcloud_spec.rb +10 -0
- data/spec/fog/bin/vclouddirector_spec.rb +10 -0
- data/spec/fog/bin/vmfusion_spec.rb +10 -0
- data/spec/fog/bin/voxel_spec.rb +10 -0
- data/spec/fog/bin/vsphere_spec.rb +10 -0
- data/spec/fog/bin/xenserver_spec.rb +10 -0
- data/spec/fog/bin/zerigo_spec.rb +10 -0
- data/spec/fog/bin_spec.rb +165 -0
- data/spec/fog/compute_spec.rb +8 -0
- data/spec/helpers/bin.rb +30 -0
- data/tests/aws/requests/sts/assume_role_with_saml_tests.rb +18 -0
- data/tests/compute/helper.rb +0 -23
- data/tests/compute/models/flavors_tests.rb +1 -1
- data/tests/compute/models/server_tests.rb +0 -3
- data/tests/compute/models/servers_tests.rb +0 -3
- data/tests/fogdocker/models/compute/server_tests.rb +2 -1
- data/tests/helpers/mock_helper.rb +0 -6
- data/tests/openstack/requests/compute/helper.rb +8 -3
- data/tests/openstack/requests/compute/server_tests.rb +75 -21
- metadata +184 -491
- data/lib/fog/atmos.rb +0 -1
- data/lib/fog/atmos/core.rb +0 -9
- data/lib/fog/atmos/models/storage/directories.rb +0 -44
- data/lib/fog/atmos/models/storage/directory.rb +0 -48
- data/lib/fog/atmos/models/storage/file.rb +0 -108
- data/lib/fog/atmos/models/storage/files.rb +0 -74
- data/lib/fog/atmos/requests/storage/delete_namespace.rb +0 -17
- data/lib/fog/atmos/requests/storage/get_namespace.rb +0 -23
- data/lib/fog/atmos/requests/storage/head_namespace.rb +0 -18
- data/lib/fog/atmos/requests/storage/post_namespace.rb +0 -18
- data/lib/fog/atmos/requests/storage/put_namespace.rb +0 -18
- data/lib/fog/atmos/storage.rb +0 -184
- data/lib/fog/bin/ecloud.rb +0 -33
- data/lib/fog/bin/stormondemand.rb +0 -29
- data/lib/fog/ecloud.rb +0 -1
- data/lib/fog/ecloud/collection.rb +0 -24
- data/lib/fog/ecloud/compute.rb +0 -824
- data/lib/fog/ecloud/core.rb +0 -31
- data/lib/fog/ecloud/generate_collection.rb +0 -127
- data/lib/fog/ecloud/ipaddr.rb +0 -5
- data/lib/fog/ecloud/mock_data_classes.rb +0 -766
- data/lib/fog/ecloud/model.rb +0 -20
- data/lib/fog/ecloud/models/compute/admin_organization.rb +0 -43
- data/lib/fog/ecloud/models/compute/admin_organizations.rb +0 -21
- data/lib/fog/ecloud/models/compute/api_key.rb +0 -20
- data/lib/fog/ecloud/models/compute/api_keys.rb +0 -26
- data/lib/fog/ecloud/models/compute/association.rb +0 -23
- data/lib/fog/ecloud/models/compute/associations.rb +0 -34
- data/lib/fog/ecloud/models/compute/authentication_level.rb +0 -21
- data/lib/fog/ecloud/models/compute/authentication_levels.rb +0 -26
- data/lib/fog/ecloud/models/compute/backup_internet_service.rb +0 -45
- data/lib/fog/ecloud/models/compute/backup_internet_services.rb +0 -41
- data/lib/fog/ecloud/models/compute/catalog.rb +0 -39
- data/lib/fog/ecloud/models/compute/catalog_configuration.rb +0 -22
- data/lib/fog/ecloud/models/compute/catalog_configurations.rb +0 -26
- data/lib/fog/ecloud/models/compute/catalog_item.rb +0 -24
- data/lib/fog/ecloud/models/compute/compute_pool.rb +0 -70
- data/lib/fog/ecloud/models/compute/compute_pools.rb +0 -33
- data/lib/fog/ecloud/models/compute/cpu_usage_detail.rb +0 -16
- data/lib/fog/ecloud/models/compute/cpu_usage_detail_summary.rb +0 -26
- data/lib/fog/ecloud/models/compute/detached_disk.rb +0 -27
- data/lib/fog/ecloud/models/compute/detached_disks.rb +0 -26
- data/lib/fog/ecloud/models/compute/environment.rb +0 -111
- data/lib/fog/ecloud/models/compute/environments.rb +0 -39
- data/lib/fog/ecloud/models/compute/firewall_acl.rb +0 -27
- data/lib/fog/ecloud/models/compute/firewall_acls.rb +0 -27
- data/lib/fog/ecloud/models/compute/group.rb +0 -41
- data/lib/fog/ecloud/models/compute/groups.rb +0 -38
- data/lib/fog/ecloud/models/compute/guest_process.rb +0 -15
- data/lib/fog/ecloud/models/compute/guest_processes.rb +0 -26
- data/lib/fog/ecloud/models/compute/hardware_configuration.rb +0 -18
- data/lib/fog/ecloud/models/compute/hardware_configurations.rb +0 -26
- data/lib/fog/ecloud/models/compute/internet_service.rb +0 -97
- data/lib/fog/ecloud/models/compute/internet_services.rb +0 -44
- data/lib/fog/ecloud/models/compute/ip_address.rb +0 -39
- data/lib/fog/ecloud/models/compute/ip_addresses.rb +0 -32
- data/lib/fog/ecloud/models/compute/layout.rb +0 -20
- data/lib/fog/ecloud/models/compute/layouts.rb +0 -26
- data/lib/fog/ecloud/models/compute/location.rb +0 -22
- data/lib/fog/ecloud/models/compute/locations.rb +0 -28
- data/lib/fog/ecloud/models/compute/login_banner.rb +0 -16
- data/lib/fog/ecloud/models/compute/login_banners.rb +0 -26
- data/lib/fog/ecloud/models/compute/memory_usage_detail.rb +0 -16
- data/lib/fog/ecloud/models/compute/memory_usage_detail_summary.rb +0 -26
- data/lib/fog/ecloud/models/compute/monitor.rb +0 -46
- data/lib/fog/ecloud/models/compute/monitors.rb +0 -30
- data/lib/fog/ecloud/models/compute/network.rb +0 -46
- data/lib/fog/ecloud/models/compute/networks.rb +0 -32
- data/lib/fog/ecloud/models/compute/node.rb +0 -45
- data/lib/fog/ecloud/models/compute/nodes.rb +0 -42
- data/lib/fog/ecloud/models/compute/operating_system.rb +0 -16
- data/lib/fog/ecloud/models/compute/operating_system_families.rb +0 -26
- data/lib/fog/ecloud/models/compute/operating_system_family.rb +0 -21
- data/lib/fog/ecloud/models/compute/operating_systems.rb +0 -25
- data/lib/fog/ecloud/models/compute/organization.rb +0 -78
- data/lib/fog/ecloud/models/compute/organizations.rb +0 -38
- data/lib/fog/ecloud/models/compute/password_complexity_rule.rb +0 -49
- data/lib/fog/ecloud/models/compute/password_complexity_rules.rb +0 -26
- data/lib/fog/ecloud/models/compute/physical_device.rb +0 -21
- data/lib/fog/ecloud/models/compute/physical_devices.rb +0 -26
- data/lib/fog/ecloud/models/compute/public_ip.rb +0 -26
- data/lib/fog/ecloud/models/compute/public_ips.rb +0 -31
- data/lib/fog/ecloud/models/compute/rnat.rb +0 -27
- data/lib/fog/ecloud/models/compute/rnats.rb +0 -26
- data/lib/fog/ecloud/models/compute/role.rb +0 -23
- data/lib/fog/ecloud/models/compute/roles.rb +0 -36
- data/lib/fog/ecloud/models/compute/row.rb +0 -56
- data/lib/fog/ecloud/models/compute/rows.rb +0 -39
- data/lib/fog/ecloud/models/compute/server.rb +0 -323
- data/lib/fog/ecloud/models/compute/server_configuration_option.rb +0 -16
- data/lib/fog/ecloud/models/compute/server_configuration_options.rb +0 -26
- data/lib/fog/ecloud/models/compute/servers.rb +0 -65
- data/lib/fog/ecloud/models/compute/ssh_key.rb +0 -19
- data/lib/fog/ecloud/models/compute/ssh_keys.rb +0 -26
- data/lib/fog/ecloud/models/compute/storage_usage_detail.rb +0 -16
- data/lib/fog/ecloud/models/compute/storage_usage_detail_summary.rb +0 -26
- data/lib/fog/ecloud/models/compute/support_ticket.rb +0 -28
- data/lib/fog/ecloud/models/compute/support_tickets.rb +0 -26
- data/lib/fog/ecloud/models/compute/tag.rb +0 -13
- data/lib/fog/ecloud/models/compute/tags.rb +0 -26
- data/lib/fog/ecloud/models/compute/task.rb +0 -23
- data/lib/fog/ecloud/models/compute/tasks.rb +0 -29
- data/lib/fog/ecloud/models/compute/template.rb +0 -23
- data/lib/fog/ecloud/models/compute/templates.rb +0 -41
- data/lib/fog/ecloud/models/compute/trusted_network_group.rb +0 -33
- data/lib/fog/ecloud/models/compute/trusted_network_groups.rb +0 -27
- data/lib/fog/ecloud/models/compute/user.rb +0 -35
- data/lib/fog/ecloud/models/compute/users.rb +0 -26
- data/lib/fog/ecloud/models/compute/virtual_machine_assigned_ip.rb +0 -32
- data/lib/fog/ecloud/models/compute/virtual_machine_assigned_ips.rb +0 -26
- data/lib/fog/ecloud/requests/compute/admin_disable_support_access.rb +0 -9
- data/lib/fog/ecloud/requests/compute/admin_edit_authentication_levels.rb +0 -32
- data/lib/fog/ecloud/requests/compute/admin_edit_login_banner.rb +0 -30
- data/lib/fog/ecloud/requests/compute/admin_edit_password_complexity_rules.rb +0 -72
- data/lib/fog/ecloud/requests/compute/admin_enable_support_access.rb +0 -9
- data/lib/fog/ecloud/requests/compute/backup_internet_service_create.rb +0 -47
- data/lib/fog/ecloud/requests/compute/backup_internet_service_delete.rb +0 -9
- data/lib/fog/ecloud/requests/compute/backup_internet_service_edit.rb +0 -47
- data/lib/fog/ecloud/requests/compute/compute_pool_edit.rb +0 -35
- data/lib/fog/ecloud/requests/compute/firewall_acls_create.rb +0 -78
- data/lib/fog/ecloud/requests/compute/firewall_acls_delete.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_admin_organization.rb +0 -23
- data/lib/fog/ecloud/requests/compute/get_api_key.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_api_keys.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_association.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_associations.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_authentication_level.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_authentication_levels.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_backup_internet_service.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_backup_internet_services.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_catalog.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_catalog_configuration.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_catalog_configurations.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_catalog_item.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_compute_pool.rb +0 -21
- data/lib/fog/ecloud/requests/compute/get_compute_pools.rb +0 -31
- data/lib/fog/ecloud/requests/compute/get_cpu_usage_detail.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_cpu_usage_detail_summary.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_detached_disk.rb +0 -21
- data/lib/fog/ecloud/requests/compute/get_detached_disks.rb +0 -31
- data/lib/fog/ecloud/requests/compute/get_environment.rb +0 -31
- data/lib/fog/ecloud/requests/compute/get_environments.rb +0 -0
- data/lib/fog/ecloud/requests/compute/get_firewall_acl.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_firewall_acls.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_group.rb +0 -18
- data/lib/fog/ecloud/requests/compute/get_groups.rb +0 -18
- data/lib/fog/ecloud/requests/compute/get_guest_process.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_guest_processes.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_hardware_configuration.rb +0 -29
- data/lib/fog/ecloud/requests/compute/get_hardware_configurations.rb +0 -14
- data/lib/fog/ecloud/requests/compute/get_internet_service.rb +0 -21
- data/lib/fog/ecloud/requests/compute/get_internet_services.rb +0 -18
- data/lib/fog/ecloud/requests/compute/get_ip_address.rb +0 -20
- data/lib/fog/ecloud/requests/compute/get_layout.rb +0 -18
- data/lib/fog/ecloud/requests/compute/get_layouts.rb +0 -18
- data/lib/fog/ecloud/requests/compute/get_location.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_locations.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_login_banner.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_login_banners.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_memory_usage_detail.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_memory_usage_detail_summary.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_monitor.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_monitors.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_network.rb +0 -21
- data/lib/fog/ecloud/requests/compute/get_network_summary.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_networks.rb +0 -30
- data/lib/fog/ecloud/requests/compute/get_node.rb +0 -21
- data/lib/fog/ecloud/requests/compute/get_nodes.rb +0 -18
- data/lib/fog/ecloud/requests/compute/get_operating_system.rb +0 -24
- data/lib/fog/ecloud/requests/compute/get_operating_system_families.rb +0 -30
- data/lib/fog/ecloud/requests/compute/get_organization.rb +0 -24
- data/lib/fog/ecloud/requests/compute/get_organizations.rb +0 -23
- data/lib/fog/ecloud/requests/compute/get_password_complexity_rule.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_password_complexity_rules.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_physical_device.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_physical_devices.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_process.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_processes.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_public_ip.rb +0 -21
- data/lib/fog/ecloud/requests/compute/get_public_ips.rb +0 -31
- data/lib/fog/ecloud/requests/compute/get_rnat.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_rnats.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_role.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_roles.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_row.rb +0 -18
- data/lib/fog/ecloud/requests/compute/get_rows.rb +0 -12
- data/lib/fog/ecloud/requests/compute/get_server.rb +0 -21
- data/lib/fog/ecloud/requests/compute/get_server_configuration_option.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_server_configuration_options.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_servers.rb +0 -42
- data/lib/fog/ecloud/requests/compute/get_ssh_key.rb +0 -21
- data/lib/fog/ecloud/requests/compute/get_ssh_keys.rb +0 -30
- data/lib/fog/ecloud/requests/compute/get_storage_usage_detail.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_storage_usage_detail_summary.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_support_ticket.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_support_tickets.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_tag.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_tags.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_task.rb +0 -13
- data/lib/fog/ecloud/requests/compute/get_tasks.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_template.rb +0 -21
- data/lib/fog/ecloud/requests/compute/get_templates.rb +0 -48
- data/lib/fog/ecloud/requests/compute/get_trusted_network_group.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_trusted_network_groups.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_user.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_users.rb +0 -9
- data/lib/fog/ecloud/requests/compute/get_virtual_machine_assigned_ips.rb +0 -42
- data/lib/fog/ecloud/requests/compute/groups_create.rb +0 -31
- data/lib/fog/ecloud/requests/compute/groups_delete.rb +0 -26
- data/lib/fog/ecloud/requests/compute/groups_edit.rb +0 -29
- data/lib/fog/ecloud/requests/compute/groups_movedown.rb +0 -9
- data/lib/fog/ecloud/requests/compute/groups_moveup.rb +0 -9
- data/lib/fog/ecloud/requests/compute/internet_service_create.rb +0 -102
- data/lib/fog/ecloud/requests/compute/internet_service_delete.rb +0 -33
- data/lib/fog/ecloud/requests/compute/internet_service_edit.rb +0 -58
- data/lib/fog/ecloud/requests/compute/monitors_create_default.rb +0 -9
- data/lib/fog/ecloud/requests/compute/monitors_create_ecv.rb +0 -40
- data/lib/fog/ecloud/requests/compute/monitors_create_http.rb +0 -44
- data/lib/fog/ecloud/requests/compute/monitors_create_loopback.rb +0 -9
- data/lib/fog/ecloud/requests/compute/monitors_create_ping.rb +0 -35
- data/lib/fog/ecloud/requests/compute/monitors_disable.rb +0 -9
- data/lib/fog/ecloud/requests/compute/monitors_edit_ecv.rb +0 -40
- data/lib/fog/ecloud/requests/compute/monitors_edit_http.rb +0 -44
- data/lib/fog/ecloud/requests/compute/monitors_edit_ping.rb +0 -35
- data/lib/fog/ecloud/requests/compute/monitors_enable.rb +0 -9
- data/lib/fog/ecloud/requests/compute/node_service_create.rb +0 -93
- data/lib/fog/ecloud/requests/compute/node_service_delete.rb +0 -33
- data/lib/fog/ecloud/requests/compute/node_service_edit.rb +0 -39
- data/lib/fog/ecloud/requests/compute/power_off.rb +0 -9
- data/lib/fog/ecloud/requests/compute/power_on.rb +0 -9
- data/lib/fog/ecloud/requests/compute/power_reset.rb +0 -9
- data/lib/fog/ecloud/requests/compute/power_shutdown.rb +0 -9
- data/lib/fog/ecloud/requests/compute/public_ip_activate.rb +0 -9
- data/lib/fog/ecloud/requests/compute/rnat_associations_create_device.rb +0 -32
- data/lib/fog/ecloud/requests/compute/rnat_associations_delete.rb +0 -9
- data/lib/fog/ecloud/requests/compute/rnat_associations_edit_network.rb +0 -31
- data/lib/fog/ecloud/requests/compute/rows_create.rb +0 -29
- data/lib/fog/ecloud/requests/compute/rows_delete.rb +0 -21
- data/lib/fog/ecloud/requests/compute/rows_edit.rb +0 -29
- data/lib/fog/ecloud/requests/compute/rows_movedown.rb +0 -9
- data/lib/fog/ecloud/requests/compute/rows_moveup.rb +0 -9
- data/lib/fog/ecloud/requests/compute/trusted_network_groups_create.rb +0 -51
- data/lib/fog/ecloud/requests/compute/trusted_network_groups_delete.rb +0 -9
- data/lib/fog/ecloud/requests/compute/trusted_network_groups_edit.rb +0 -51
- data/lib/fog/ecloud/requests/compute/virtual_machine_attach_disk.rb +0 -61
- data/lib/fog/ecloud/requests/compute/virtual_machine_copy.rb +0 -116
- data/lib/fog/ecloud/requests/compute/virtual_machine_copy_identical.rb +0 -43
- data/lib/fog/ecloud/requests/compute/virtual_machine_create_from_template.rb +0 -244
- data/lib/fog/ecloud/requests/compute/virtual_machine_delete.rb +0 -46
- data/lib/fog/ecloud/requests/compute/virtual_machine_detach_disk.rb +0 -70
- data/lib/fog/ecloud/requests/compute/virtual_machine_edit.rb +0 -45
- data/lib/fog/ecloud/requests/compute/virtual_machine_edit_assigned_ips.rb +0 -80
- data/lib/fog/ecloud/requests/compute/virtual_machine_edit_hardware_configuration.rb +0 -75
- data/lib/fog/ecloud/requests/compute/virtual_machine_import.rb +0 -179
- data/lib/fog/ecloud/requests/compute/virtual_machine_upload_file.rb +0 -28
- data/lib/fog/storm_on_demand.rb +0 -9
- data/lib/fog/storm_on_demand/README.md +0 -49
- data/lib/fog/storm_on_demand/account.rb +0 -51
- data/lib/fog/storm_on_demand/billing.rb +0 -55
- data/lib/fog/storm_on_demand/compute.rb +0 -105
- data/lib/fog/storm_on_demand/core.rb +0 -18
- data/lib/fog/storm_on_demand/dns.rb +0 -79
- data/lib/fog/storm_on_demand/models/account/token.rb +0 -20
- data/lib/fog/storm_on_demand/models/account/tokens.rb +0 -17
- data/lib/fog/storm_on_demand/models/billing/invoice.rb +0 -25
- data/lib/fog/storm_on_demand/models/billing/invoices.rb +0 -27
- data/lib/fog/storm_on_demand/models/billing/payment.rb +0 -13
- data/lib/fog/storm_on_demand/models/billing/payments.rb +0 -17
- data/lib/fog/storm_on_demand/models/compute/config.rb +0 -37
- data/lib/fog/storm_on_demand/models/compute/configs.rb +0 -22
- data/lib/fog/storm_on_demand/models/compute/image.rb +0 -37
- data/lib/fog/storm_on_demand/models/compute/images.rb +0 -27
- data/lib/fog/storm_on_demand/models/compute/notification.rb +0 -31
- data/lib/fog/storm_on_demand/models/compute/notifications.rb +0 -27
- data/lib/fog/storm_on_demand/models/compute/product.rb +0 -37
- data/lib/fog/storm_on_demand/models/compute/products.rb +0 -25
- data/lib/fog/storm_on_demand/models/compute/server.rb +0 -91
- data/lib/fog/storm_on_demand/models/compute/servers.rb +0 -27
- data/lib/fog/storm_on_demand/models/compute/template.rb +0 -26
- data/lib/fog/storm_on_demand/models/compute/templates.rb +0 -22
- data/lib/fog/storm_on_demand/models/dns/domain.rb +0 -31
- data/lib/fog/storm_on_demand/models/dns/domains.rb +0 -17
- data/lib/fog/storm_on_demand/models/dns/record.rb +0 -61
- data/lib/fog/storm_on_demand/models/dns/records.rb +0 -27
- data/lib/fog/storm_on_demand/models/dns/reverse.rb +0 -13
- data/lib/fog/storm_on_demand/models/dns/reverses.rb +0 -20
- data/lib/fog/storm_on_demand/models/dns/zone.rb +0 -38
- data/lib/fog/storm_on_demand/models/dns/zones.rb +0 -27
- data/lib/fog/storm_on_demand/models/monitoring/bandwidth.rb +0 -20
- data/lib/fog/storm_on_demand/models/monitoring/bandwidths.rb +0 -21
- data/lib/fog/storm_on_demand/models/monitoring/load.rb +0 -20
- data/lib/fog/storm_on_demand/models/monitoring/loads.rb +0 -21
- data/lib/fog/storm_on_demand/models/monitoring/monitor_service.rb +0 -19
- data/lib/fog/storm_on_demand/models/monitoring/monitor_services.rb +0 -30
- data/lib/fog/storm_on_demand/models/network/balancer.rb +0 -56
- data/lib/fog/storm_on_demand/models/network/balancers.rb +0 -40
- data/lib/fog/storm_on_demand/models/network/firewall.rb +0 -18
- data/lib/fog/storm_on_demand/models/network/firewalls.rb +0 -31
- data/lib/fog/storm_on_demand/models/network/network_ip.rb +0 -21
- data/lib/fog/storm_on_demand/models/network/network_ips.rb +0 -46
- data/lib/fog/storm_on_demand/models/network/pool.rb +0 -30
- data/lib/fog/storm_on_demand/models/network/pools.rb +0 -26
- data/lib/fog/storm_on_demand/models/network/private_ip.rb +0 -15
- data/lib/fog/storm_on_demand/models/network/private_ips.rb +0 -36
- data/lib/fog/storm_on_demand/models/network/ruleset.rb +0 -25
- data/lib/fog/storm_on_demand/models/network/rulesets.rb +0 -27
- data/lib/fog/storm_on_demand/models/network/zone.rb +0 -25
- data/lib/fog/storm_on_demand/models/network/zones.rb +0 -22
- data/lib/fog/storm_on_demand/models/storage/cluster.rb +0 -17
- data/lib/fog/storm_on_demand/models/storage/clusters.rb +0 -17
- data/lib/fog/storm_on_demand/models/storage/volume.rb +0 -51
- data/lib/fog/storm_on_demand/models/storage/volumes.rb +0 -27
- data/lib/fog/storm_on_demand/models/support/alert.rb +0 -16
- data/lib/fog/storm_on_demand/models/support/alerts.rb +0 -17
- data/lib/fog/storm_on_demand/models/support/ticket.rb +0 -70
- data/lib/fog/storm_on_demand/models/support/tickets.rb +0 -30
- data/lib/fog/storm_on_demand/models/vpn/vpn.rb +0 -28
- data/lib/fog/storm_on_demand/models/vpn/vpns.rb +0 -26
- data/lib/fog/storm_on_demand/monitoring.rb +0 -61
- data/lib/fog/storm_on_demand/network.rb +0 -107
- data/lib/fog/storm_on_demand/requests/account/create_token.rb +0 -14
- data/lib/fog/storm_on_demand/requests/account/expire_token.rb +0 -14
- data/lib/fog/storm_on_demand/requests/billing/get_invoice.rb +0 -14
- data/lib/fog/storm_on_demand/requests/billing/list_invoices.rb +0 -14
- data/lib/fog/storm_on_demand/requests/billing/make_payment.rb +0 -14
- data/lib/fog/storm_on_demand/requests/billing/next_invoice.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/clone_server.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/create_image.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/create_server.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/current_notifications.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/delete_image.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/delete_server.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/get_config_details.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/get_image_details.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/get_notification.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/get_product.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/get_product_code.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/get_product_price.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/get_product_starting_price.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/get_server.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/get_template_details.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/list_configs.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/list_images.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/list_notifications.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/list_products.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/list_servers.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/list_templates.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/reboot_server.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/resize_server.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/resolve_notification.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/restore_image.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/restore_template.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/server_history.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/server_status.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/shutdown_server.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/start_server.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/update_image.rb +0 -14
- data/lib/fog/storm_on_demand/requests/compute/update_server.rb +0 -14
- data/lib/fog/storm_on_demand/requests/dns/check_zone_delegation.rb +0 -14
- data/lib/fog/storm_on_demand/requests/dns/create_record.rb +0 -14
- data/lib/fog/storm_on_demand/requests/dns/create_record_region.rb +0 -14
- data/lib/fog/storm_on_demand/requests/dns/create_zone.rb +0 -14
- data/lib/fog/storm_on_demand/requests/dns/delete_record.rb +0 -14
- data/lib/fog/storm_on_demand/requests/dns/delete_record_region.rb +0 -14
- data/lib/fog/storm_on_demand/requests/dns/delete_reverse.rb +0 -14
- data/lib/fog/storm_on_demand/requests/dns/delete_zone.rb +0 -14
- data/lib/fog/storm_on_demand/requests/dns/get_record.rb +0 -14
- data/lib/fog/storm_on_demand/requests/dns/get_zone.rb +0 -14
- data/lib/fog/storm_on_demand/requests/dns/list_domains.rb +0 -14
- data/lib/fog/storm_on_demand/requests/dns/list_records.rb +0 -14
- data/lib/fog/storm_on_demand/requests/dns/list_zones.rb +0 -14
- data/lib/fog/storm_on_demand/requests/dns/renew_domain.rb +0 -14
- data/lib/fog/storm_on_demand/requests/dns/update_record.rb +0 -14
- data/lib/fog/storm_on_demand/requests/dns/update_record_region.rb +0 -14
- data/lib/fog/storm_on_demand/requests/dns/update_reverse.rb +0 -14
- data/lib/fog/storm_on_demand/requests/dns/update_zone.rb +0 -14
- data/lib/fog/storm_on_demand/requests/monitoring/get_bandwidth_graph.rb +0 -14
- data/lib/fog/storm_on_demand/requests/monitoring/get_bandwidth_stats.rb +0 -14
- data/lib/fog/storm_on_demand/requests/monitoring/get_load_graph.rb +0 -14
- data/lib/fog/storm_on_demand/requests/monitoring/get_load_stats.rb +0 -14
- data/lib/fog/storm_on_demand/requests/monitoring/get_service.rb +0 -14
- data/lib/fog/storm_on_demand/requests/monitoring/get_service_status.rb +0 -14
- data/lib/fog/storm_on_demand/requests/monitoring/monitoring_ips.rb +0 -14
- data/lib/fog/storm_on_demand/requests/monitoring/update_service.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/add_balancer_node.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/add_balancer_service.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/add_ip_to_server.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/attach_server_to_private_ip.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/check_balancer_available.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/check_server_attached.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/create_balancer.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/create_pool.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/create_ruleset.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/delete_balancer.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/delete_pool.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/detach_server_from_private_ip.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/get_assignments.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/get_balancer_details.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/get_balancer_possible_nodes.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/get_balancer_strategies.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/get_firewall.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/get_firewall_basic_options.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/get_firewall_rules.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/get_ip_details.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/get_pool.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/get_private_ip.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/get_ruleset.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/get_zone.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/list_balancers.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/list_ip_public_accounts.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/list_network_ips.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/list_network_public_ips.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/list_private_ips.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/list_rulesets.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/list_zones.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/remove_balancer_node.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/remove_balancer_service.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/remove_ip_from_server.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/request_new_ips.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/set_default_zone.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/update_balancer.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/update_firewall.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/update_pool.rb +0 -14
- data/lib/fog/storm_on_demand/requests/network/update_ruleset.rb +0 -14
- data/lib/fog/storm_on_demand/requests/storage/attach_volume_to_server.rb +0 -14
- data/lib/fog/storm_on_demand/requests/storage/create_volume.rb +0 -14
- data/lib/fog/storm_on_demand/requests/storage/delete_volume.rb +0 -14
- data/lib/fog/storm_on_demand/requests/storage/detach_volume_from_server.rb +0 -14
- data/lib/fog/storm_on_demand/requests/storage/get_volume.rb +0 -14
- data/lib/fog/storm_on_demand/requests/storage/list_clusters.rb +0 -14
- data/lib/fog/storm_on_demand/requests/storage/list_volumes.rb +0 -14
- data/lib/fog/storm_on_demand/requests/storage/resize_volume.rb +0 -14
- data/lib/fog/storm_on_demand/requests/storage/update_volume.rb +0 -14
- data/lib/fog/storm_on_demand/requests/support/add_feedback.rb +0 -14
- data/lib/fog/storm_on_demand/requests/support/add_transaction_feedback.rb +0 -14
- data/lib/fog/storm_on_demand/requests/support/authenticate.rb +0 -14
- data/lib/fog/storm_on_demand/requests/support/close_ticket.rb +0 -14
- data/lib/fog/storm_on_demand/requests/support/create_ticket.rb +0 -14
- data/lib/fog/storm_on_demand/requests/support/get_active_alert.rb +0 -14
- data/lib/fog/storm_on_demand/requests/support/get_ticket_details.rb +0 -14
- data/lib/fog/storm_on_demand/requests/support/list_ticket_types.rb +0 -14
- data/lib/fog/storm_on_demand/requests/support/list_tickets.rb +0 -14
- data/lib/fog/storm_on_demand/requests/support/reopen_ticket.rb +0 -14
- data/lib/fog/storm_on_demand/requests/support/reply_ticket.rb +0 -14
- data/lib/fog/storm_on_demand/requests/vpn/create_vpn.rb +0 -14
- data/lib/fog/storm_on_demand/requests/vpn/get_vpn.rb +0 -14
- data/lib/fog/storm_on_demand/requests/vpn/list_vpn_users.rb +0 -14
- data/lib/fog/storm_on_demand/requests/vpn/update_vpn.rb +0 -14
- data/lib/fog/storm_on_demand/shared.rb +0 -53
- data/lib/fog/storm_on_demand/storage.rb +0 -63
- data/lib/fog/storm_on_demand/support.rb +0 -61
- data/lib/fog/storm_on_demand/vpn.rb +0 -53
- data/tests/atmos/models/storage/file_update_tests.rb +0 -19
- data/tests/atmos/models/storage/nested_directories_tests.rb +0 -23
- data/tests/ecloud/compute/models/admin_organization_tests.rb +0 -16
- data/tests/ecloud/compute/models/compute_pool_tests.rb +0 -17
- data/tests/ecloud/compute/models/detached_disk_tests.rb +0 -26
- data/tests/ecloud/compute/models/environment_tests.rb +0 -23
- data/tests/ecloud/compute/models/internet_service_tests.rb +0 -28
- data/tests/ecloud/compute/models/ip_address_tests.rb +0 -19
- data/tests/ecloud/compute/models/network_tests.rb +0 -17
- data/tests/ecloud/compute/models/operating_system_families_tests.rb +0 -13
- data/tests/ecloud/compute/models/operating_system_tests.rb +0 -22
- data/tests/ecloud/compute/models/organization_tests.rb +0 -21
- data/tests/ecloud/compute/models/public_ip_tests.rb +0 -19
- data/tests/ecloud/compute/models/server_tests.rb +0 -144
- data/tests/ecloud/compute/models/ssh_key_tests.rb +0 -19
- data/tests/ecloud/compute/models/template_tests.rb +0 -20
- data/tests/storm_on_demand/requests/compute/server_tests.rb +0 -64
data/lib/fog/ecloud/core.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
require 'fog/core'
|
2
|
-
require 'fog/xml'
|
3
|
-
module Fog
|
4
|
-
module Ecloud
|
5
|
-
ECLOUD_OPTIONS = [:ecloud_authentication_method]
|
6
|
-
|
7
|
-
extend Fog::Provider
|
8
|
-
|
9
|
-
service(:compute, 'Compute')
|
10
|
-
|
11
|
-
def self.keep(hash, *keys)
|
12
|
-
{}.tap do |kept|
|
13
|
-
keys.each{|k| kept[k]= hash[k] if hash.key?(k)}
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
def self.slice(hash, *keys)
|
18
|
-
hash.dup.tap do |sliced|
|
19
|
-
keys.each{|k| sliced.delete(k)}
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
def self.ip_address
|
24
|
-
4.times.map{ Fog::Mock.random_numbers(3) }.join(".")
|
25
|
-
end
|
26
|
-
|
27
|
-
def self.mac_address
|
28
|
-
6.times.map{ Fog::Mock.random_numbers(2) }.join(":")
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
@@ -1,127 +0,0 @@
|
|
1
|
-
require 'optparse'
|
2
|
-
|
3
|
-
class String
|
4
|
-
def camelize
|
5
|
-
self.split('_').map {|w| w.capitalize}.join
|
6
|
-
end
|
7
|
-
end
|
8
|
-
|
9
|
-
options = {}
|
10
|
-
OptionParser.new do |opts|
|
11
|
-
opts.banner = "Usage: #{__FILE__} [options]"
|
12
|
-
opts.on("-m", "--model-name NAME", "Model Name") { |v| options[:model] = v }
|
13
|
-
opts.on("-c", "--collection-name NAME", "Collection Name") { |v| options[:collection] = v }
|
14
|
-
opts.on("-M", "--methods a:href,b:href,c:href", Array, "List of methods to be defined and href to the method") { |v| options[:methods] = v.map { |a| a.split(':') } }
|
15
|
-
opts.on("-a", "--attributes name:alias,other_name:other_alias", Array, "List of attributes to be defined") { |v| options[:attributes] = v.map { |a| a.split(':') } }
|
16
|
-
end.parse!
|
17
|
-
|
18
|
-
if options[:methods]
|
19
|
-
methods = options[:methods].map do |m|
|
20
|
-
m = <<METHOD
|
21
|
-
def #{m[0]}
|
22
|
-
@#{m[0]} = Fog::Compute::Ecloud::#{m[0].camelize}.new(:service => service, :href => "#{m[1]}")
|
23
|
-
end
|
24
|
-
METHOD
|
25
|
-
end.join("\n ")
|
26
|
-
end
|
27
|
-
|
28
|
-
if options[:attributes]
|
29
|
-
attributes = options[:attributes].map do |a|
|
30
|
-
a = "attribute :#{a[0]}, :aliases => :#{a[1] || a[0].camelize}"
|
31
|
-
end.join("\n ")
|
32
|
-
end
|
33
|
-
|
34
|
-
collection_file = "#{File.expand_path(File.dirname(__FILE__))}/models/compute/#{options[:collection]}.rb"
|
35
|
-
model_file = "#{File.expand_path(File.dirname(__FILE__))}/models/compute/#{options[:model]}.rb"
|
36
|
-
collection_request_file = "#{File.expand_path(File.dirname(__FILE__))}/requests/compute/get_#{options[:collection]}.rb"
|
37
|
-
model_request_file = "#{File.expand_path(File.dirname(__FILE__))}/requests/compute/get_#{options[:model]}.rb"
|
38
|
-
|
39
|
-
collection = <<COLLECTION
|
40
|
-
require 'fog/ecloud/models/compute/#{options[:model]}'
|
41
|
-
|
42
|
-
module Fog
|
43
|
-
module Compute
|
44
|
-
class Ecloud
|
45
|
-
class #{options[:collection].camelize} < Fog::Ecloud::Collection
|
46
|
-
|
47
|
-
identity :href
|
48
|
-
|
49
|
-
model Fog::Compute::Ecloud::#{options[:model].camelize}
|
50
|
-
|
51
|
-
def all
|
52
|
-
data = service.get_#{options[:collection]}(href).body
|
53
|
-
load(data)
|
54
|
-
end
|
55
|
-
|
56
|
-
def get(uri)
|
57
|
-
if data = service.get_#{options[:model]}(uri)
|
58
|
-
new(data.body)
|
59
|
-
end
|
60
|
-
rescue Fog::Errors::NotFound
|
61
|
-
nil
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
67
|
-
COLLECTION
|
68
|
-
|
69
|
-
model = <<MODEL
|
70
|
-
module Fog
|
71
|
-
module Compute
|
72
|
-
class Ecloud
|
73
|
-
class #{options[:model].camelize} < Fog::Model
|
74
|
-
identity :href
|
75
|
-
|
76
|
-
#{attributes}
|
77
|
-
|
78
|
-
#{methods}
|
79
|
-
def id
|
80
|
-
href.scan(/\\d+/)[0]
|
81
|
-
end
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
86
|
-
MODEL
|
87
|
-
|
88
|
-
collection_request = <<COLLECTION
|
89
|
-
module Fog
|
90
|
-
module Compute
|
91
|
-
class Ecloud
|
92
|
-
|
93
|
-
class Real
|
94
|
-
basic_request :get_#{options[:collection]}
|
95
|
-
end
|
96
|
-
|
97
|
-
class Mock
|
98
|
-
def get_#{options[:collection]}(uri)
|
99
|
-
end
|
100
|
-
end
|
101
|
-
end
|
102
|
-
end
|
103
|
-
end
|
104
|
-
COLLECTION
|
105
|
-
|
106
|
-
model_request = <<MODEL
|
107
|
-
module Fog
|
108
|
-
module Compute
|
109
|
-
class Ecloud
|
110
|
-
|
111
|
-
class Real
|
112
|
-
basic_request :get_#{options[:model]}
|
113
|
-
end
|
114
|
-
|
115
|
-
class Mock
|
116
|
-
def get_#{options[:model]}(uri)
|
117
|
-
end
|
118
|
-
end
|
119
|
-
end
|
120
|
-
end
|
121
|
-
end
|
122
|
-
MODEL
|
123
|
-
|
124
|
-
File.open(collection_file, 'w') { |f| f.write(collection) }
|
125
|
-
File.open(model_file, 'w') { |f| f.write(model) }
|
126
|
-
File.open(collection_request_file, 'w') { |f| f.write(collection_request) }
|
127
|
-
File.open(model_request_file, 'w') { |f| f.write(model_request) }
|
data/lib/fog/ecloud/ipaddr.rb
DELETED
@@ -1,766 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Ecloud
|
3
|
-
module MockDataClasses
|
4
|
-
class Base < Hash
|
5
|
-
def self.base_url=(url)
|
6
|
-
@base_url = url
|
7
|
-
end
|
8
|
-
|
9
|
-
self.base_url = "http://vcloud.example.com"
|
10
|
-
|
11
|
-
def self.base_url
|
12
|
-
@base_url
|
13
|
-
end
|
14
|
-
|
15
|
-
def first
|
16
|
-
raise "Don't do this"
|
17
|
-
end
|
18
|
-
|
19
|
-
def last
|
20
|
-
raise "Don't do this"
|
21
|
-
end
|
22
|
-
|
23
|
-
def initialize(data = {}, parent = nil)
|
24
|
-
@parent = parent
|
25
|
-
|
26
|
-
replace(data)
|
27
|
-
end
|
28
|
-
|
29
|
-
def _parent
|
30
|
-
@parent
|
31
|
-
end
|
32
|
-
|
33
|
-
def base_url
|
34
|
-
Base.base_url
|
35
|
-
end
|
36
|
-
|
37
|
-
def href
|
38
|
-
[base_url, self.class.name.split("::").last, object_id].join("/")
|
39
|
-
end
|
40
|
-
|
41
|
-
def inspect
|
42
|
-
"<#{self.class.name} #{object_id} data=#{super}>"
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
class MockData < Base
|
47
|
-
def versions
|
48
|
-
@versions ||= []
|
49
|
-
end
|
50
|
-
|
51
|
-
def organizations
|
52
|
-
@organizations ||= []
|
53
|
-
end
|
54
|
-
|
55
|
-
def organization_collection_from_href(href)
|
56
|
-
find_href_in(href, all_organizations)
|
57
|
-
end
|
58
|
-
|
59
|
-
def all_organizations
|
60
|
-
organizations.map(&:environments).flatten
|
61
|
-
end
|
62
|
-
|
63
|
-
def organization_from_href(href)
|
64
|
-
find_href_in(href, all_organizations)
|
65
|
-
end
|
66
|
-
|
67
|
-
def all_vdcs
|
68
|
-
organizations.map(&:environments).flatten
|
69
|
-
end
|
70
|
-
|
71
|
-
def vdc_from_href(href)
|
72
|
-
find_href_in(href, all_vdcs)
|
73
|
-
end
|
74
|
-
|
75
|
-
def all_catalogs
|
76
|
-
all_vdcs.map(&:catalog).flatten
|
77
|
-
end
|
78
|
-
|
79
|
-
def catalog_from_href(href)
|
80
|
-
find_href_in(href, all_catalogs)
|
81
|
-
end
|
82
|
-
|
83
|
-
def all_catalog_items
|
84
|
-
all_catalogs.map(&:items).flatten
|
85
|
-
end
|
86
|
-
|
87
|
-
def catalog_item_from_href(href)
|
88
|
-
find_href_in(href, all_catalog_items)
|
89
|
-
end
|
90
|
-
|
91
|
-
def all_virtual_machines
|
92
|
-
all_vdcs.map(&:virtual_machines).flatten
|
93
|
-
end
|
94
|
-
|
95
|
-
def virtual_machine_from_href(href)
|
96
|
-
find_href_prefixed_in(href, all_virtual_machines)
|
97
|
-
end
|
98
|
-
|
99
|
-
def all_networks
|
100
|
-
all_vdcs.map(&:networks).flatten
|
101
|
-
end
|
102
|
-
|
103
|
-
def network_from_href(href)
|
104
|
-
find_href_in(href, all_networks)
|
105
|
-
end
|
106
|
-
|
107
|
-
def all_network_extensions
|
108
|
-
all_networks.map(&:extensions).flatten
|
109
|
-
end
|
110
|
-
|
111
|
-
def network_extension_from_href(href)
|
112
|
-
find_href_in(href, all_network_extensions)
|
113
|
-
end
|
114
|
-
|
115
|
-
def all_vdc_internet_service_collections
|
116
|
-
all_vdcs.map(&:internet_service_collection).flatten
|
117
|
-
end
|
118
|
-
|
119
|
-
def vdc_internet_service_collection_from_href(href)
|
120
|
-
find_href_in(href, all_vdc_internet_service_collections)
|
121
|
-
end
|
122
|
-
|
123
|
-
def all_backup_internet_services
|
124
|
-
all_vdc_internet_service_collections.map(&:backup_internet_services).flatten
|
125
|
-
end
|
126
|
-
|
127
|
-
def backup_internet_service_from_href(href)
|
128
|
-
find_href_in(href, all_backup_internet_services)
|
129
|
-
end
|
130
|
-
|
131
|
-
def all_public_ip_collections
|
132
|
-
all_vdcs.map {|v| v.public_ip_collection }.flatten
|
133
|
-
end
|
134
|
-
|
135
|
-
def public_ip_collection_from_href(href)
|
136
|
-
find_href_in(href, all_public_ip_collections)
|
137
|
-
end
|
138
|
-
|
139
|
-
def all_public_ips
|
140
|
-
all_public_ip_collections.map(&:items).flatten
|
141
|
-
end
|
142
|
-
|
143
|
-
def public_ip_from_href(href)
|
144
|
-
find_href_in(href, all_public_ips)
|
145
|
-
end
|
146
|
-
|
147
|
-
def all_public_ip_internet_service_collections
|
148
|
-
all_public_ips.map(&:internet_service_collection).flatten
|
149
|
-
end
|
150
|
-
|
151
|
-
def public_ip_internet_service_collection_from_href(href)
|
152
|
-
find_href_in(href, all_public_ip_internet_service_collections)
|
153
|
-
end
|
154
|
-
|
155
|
-
def all_public_ip_internet_services
|
156
|
-
all_public_ip_internet_service_collections.map(&:items).flatten
|
157
|
-
end
|
158
|
-
|
159
|
-
def public_ip_internet_service_from_href(href)
|
160
|
-
find_href_in(href, all_public_ip_internet_services)
|
161
|
-
end
|
162
|
-
|
163
|
-
def all_public_ip_internet_service_node_collections
|
164
|
-
all_public_ip_internet_services.map(&:node_collection).flatten
|
165
|
-
end
|
166
|
-
|
167
|
-
def public_ip_internet_service_node_collection_from_href(href)
|
168
|
-
find_href_in(href, all_public_ip_internet_service_node_collections)
|
169
|
-
end
|
170
|
-
|
171
|
-
def all_public_ip_internet_service_nodes
|
172
|
-
all_public_ip_internet_service_node_collections.map(&:items).flatten
|
173
|
-
end
|
174
|
-
|
175
|
-
def public_ip_internet_service_node_from_href(href)
|
176
|
-
find_href_in(href, all_public_ip_internet_service_nodes)
|
177
|
-
end
|
178
|
-
|
179
|
-
def all_network_ip_collections
|
180
|
-
all_networks.map(&:ip_collection)
|
181
|
-
end
|
182
|
-
|
183
|
-
def network_ip_collection_from_href(href)
|
184
|
-
find_href_in(href, all_network_ip_collections)
|
185
|
-
end
|
186
|
-
|
187
|
-
def all_network_ips
|
188
|
-
all_network_ip_collections.map {|c| c.items.values }.flatten
|
189
|
-
end
|
190
|
-
|
191
|
-
def network_ip_from_href(href)
|
192
|
-
find_href_in(href, all_network_ips)
|
193
|
-
end
|
194
|
-
|
195
|
-
private
|
196
|
-
|
197
|
-
def find_href_in(href, objects)
|
198
|
-
objects.find {|o| o.href == href }
|
199
|
-
end
|
200
|
-
|
201
|
-
def find_href_prefixed_in(href, objects)
|
202
|
-
objects.find {|o| href =~ %r{^#{o.href}($|/)} }
|
203
|
-
end
|
204
|
-
end
|
205
|
-
|
206
|
-
class MockVersion < Base
|
207
|
-
def version
|
208
|
-
self[:version]
|
209
|
-
end
|
210
|
-
|
211
|
-
def supported
|
212
|
-
!!self[:supported]
|
213
|
-
end
|
214
|
-
|
215
|
-
def login_url
|
216
|
-
href
|
217
|
-
end
|
218
|
-
end
|
219
|
-
|
220
|
-
class MockOrganization < Base
|
221
|
-
def name
|
222
|
-
self[:name]
|
223
|
-
end
|
224
|
-
|
225
|
-
def environments
|
226
|
-
@vdcs ||= []
|
227
|
-
end
|
228
|
-
end
|
229
|
-
|
230
|
-
class MockVdc < Base
|
231
|
-
def name
|
232
|
-
self[:name]
|
233
|
-
end
|
234
|
-
|
235
|
-
def storage_allocated
|
236
|
-
self[:storage_allocated] || 200
|
237
|
-
end
|
238
|
-
|
239
|
-
def storage_used
|
240
|
-
self[:storage_used] || 105
|
241
|
-
end
|
242
|
-
|
243
|
-
def cpu_allocated
|
244
|
-
self[:cpu_allocated] || 10000
|
245
|
-
end
|
246
|
-
|
247
|
-
def memory_allocated
|
248
|
-
self[:memory_allocated] || 20480
|
249
|
-
end
|
250
|
-
|
251
|
-
def catalog
|
252
|
-
@catalog ||= MockCatalog.new({}, self)
|
253
|
-
end
|
254
|
-
|
255
|
-
def networks
|
256
|
-
@networks ||= []
|
257
|
-
end
|
258
|
-
|
259
|
-
def virtual_machines
|
260
|
-
@virtual_machines ||= []
|
261
|
-
end
|
262
|
-
|
263
|
-
def task_list
|
264
|
-
@task_list ||= MockTaskList.new({}, self)
|
265
|
-
end
|
266
|
-
|
267
|
-
# for TM eCloud, should probably be subclassed
|
268
|
-
def public_ip_collection
|
269
|
-
@public_ip_collection ||= MockPublicIps.new({}, self)
|
270
|
-
end
|
271
|
-
|
272
|
-
def internet_service_collection
|
273
|
-
@internet_service_collection ||= MockVdcInternetServices.new({}, self)
|
274
|
-
end
|
275
|
-
|
276
|
-
def firewall_acls
|
277
|
-
@firewall_acls ||= MockFirewallAcls.new({}, self)
|
278
|
-
end
|
279
|
-
end
|
280
|
-
|
281
|
-
class MockTaskList < Base
|
282
|
-
def name
|
283
|
-
self[:name] || "Tasks List"
|
284
|
-
end
|
285
|
-
end
|
286
|
-
|
287
|
-
class MockCatalog < Base
|
288
|
-
def name
|
289
|
-
self[:name] || "Catalog"
|
290
|
-
end
|
291
|
-
|
292
|
-
def items
|
293
|
-
@items ||= []
|
294
|
-
end
|
295
|
-
end
|
296
|
-
|
297
|
-
class MockCatalogItem < Base
|
298
|
-
def name
|
299
|
-
self[:name]
|
300
|
-
end
|
301
|
-
|
302
|
-
def disks
|
303
|
-
@disks ||= MockVirtualMachineDisks.new(self)
|
304
|
-
end
|
305
|
-
|
306
|
-
def customization
|
307
|
-
@customization ||= MockCatalogItemCustomization.new({}, self)
|
308
|
-
end
|
309
|
-
|
310
|
-
def vapp_template
|
311
|
-
@vapp_template ||= MockCatalogItemVappTemplate.new({ :name => name }, self)
|
312
|
-
end
|
313
|
-
end
|
314
|
-
|
315
|
-
class MockCatalogItemCustomization < Base
|
316
|
-
def name
|
317
|
-
self[:name] || "Customization Options"
|
318
|
-
end
|
319
|
-
end
|
320
|
-
|
321
|
-
class MockCatalogItemVappTemplate < Base
|
322
|
-
def name
|
323
|
-
self[:name]
|
324
|
-
end
|
325
|
-
end
|
326
|
-
|
327
|
-
class MockNetwork < Base
|
328
|
-
def name
|
329
|
-
self[:name] || subnet
|
330
|
-
end
|
331
|
-
|
332
|
-
def subnet
|
333
|
-
self[:subnet]
|
334
|
-
end
|
335
|
-
|
336
|
-
def gateway
|
337
|
-
self[:gateway] || subnet_ips[1]
|
338
|
-
end
|
339
|
-
|
340
|
-
def netmask
|
341
|
-
self[:netmask] || subnet_ipaddr.mask
|
342
|
-
end
|
343
|
-
|
344
|
-
def dns
|
345
|
-
"8.8.8.8"
|
346
|
-
end
|
347
|
-
|
348
|
-
def features
|
349
|
-
[
|
350
|
-
{ :type => :FenceMode, :value => "isolated" }
|
351
|
-
]
|
352
|
-
end
|
353
|
-
|
354
|
-
def ip_collection
|
355
|
-
@ip_collection ||= MockNetworkIps.new({}, self)
|
356
|
-
end
|
357
|
-
|
358
|
-
def extensions
|
359
|
-
@extensions ||= MockNetworkExtensions.new({}, self)
|
360
|
-
end
|
361
|
-
|
362
|
-
def random_ip
|
363
|
-
usable_subnet_ips[rand(usable_subnet_ips.length)]
|
364
|
-
end
|
365
|
-
|
366
|
-
# for TM eCloud. should probably be a subclass
|
367
|
-
def rnat
|
368
|
-
self[:rnat]
|
369
|
-
end
|
370
|
-
|
371
|
-
def usable_subnet_ips
|
372
|
-
subnet_ips[3..-2]
|
373
|
-
end
|
374
|
-
|
375
|
-
def address
|
376
|
-
subnet_ips.first
|
377
|
-
end
|
378
|
-
|
379
|
-
def broadcast
|
380
|
-
subnet_ips.last
|
381
|
-
end
|
382
|
-
|
383
|
-
private
|
384
|
-
|
385
|
-
def subnet_ipaddr
|
386
|
-
@ipaddr ||= IPAddr.new(subnet)
|
387
|
-
end
|
388
|
-
|
389
|
-
def subnet_ips
|
390
|
-
subnet_ipaddr.to_range.to_a.map(&:to_s)
|
391
|
-
end
|
392
|
-
end
|
393
|
-
|
394
|
-
class MockNetworkIps < Base
|
395
|
-
def items
|
396
|
-
@items ||= _parent.usable_subnet_ips.reduce({}) do |out, subnet_ip|
|
397
|
-
out.update(subnet_ip => MockNetworkIp.new({ :ip => subnet_ip }, self))
|
398
|
-
end
|
399
|
-
end
|
400
|
-
|
401
|
-
def ordered_ips
|
402
|
-
items.values.sort_by {|i| i.ip.split(".").map(&:to_i) }
|
403
|
-
end
|
404
|
-
|
405
|
-
def name
|
406
|
-
"IP Addresses"
|
407
|
-
end
|
408
|
-
end
|
409
|
-
|
410
|
-
class MockNetworkIp < Base
|
411
|
-
def name
|
412
|
-
self[:name] || ip
|
413
|
-
end
|
414
|
-
|
415
|
-
def ip
|
416
|
-
self[:ip]
|
417
|
-
end
|
418
|
-
|
419
|
-
def used_by
|
420
|
-
self[:used_by] || _parent._parent._parent.virtual_machines.find {|v| v.ip == ip }
|
421
|
-
end
|
422
|
-
|
423
|
-
def status
|
424
|
-
if used_by
|
425
|
-
"Assigned"
|
426
|
-
else
|
427
|
-
"Available"
|
428
|
-
end
|
429
|
-
end
|
430
|
-
|
431
|
-
def rnat
|
432
|
-
self[:rnat] || _parent._parent.rnat
|
433
|
-
end
|
434
|
-
|
435
|
-
def rnat_set?
|
436
|
-
!!self[:rnat]
|
437
|
-
end
|
438
|
-
end
|
439
|
-
|
440
|
-
class MockNetworkExtensions < Base
|
441
|
-
def name
|
442
|
-
_parent.name
|
443
|
-
end
|
444
|
-
|
445
|
-
def gateway
|
446
|
-
_parent.gateway
|
447
|
-
end
|
448
|
-
|
449
|
-
def broadcast
|
450
|
-
_parent.broadcast
|
451
|
-
end
|
452
|
-
|
453
|
-
def address
|
454
|
-
_parent.address
|
455
|
-
end
|
456
|
-
|
457
|
-
def rnat
|
458
|
-
_parent.rnat
|
459
|
-
end
|
460
|
-
|
461
|
-
def type
|
462
|
-
self[:type] || "DMZ"
|
463
|
-
end
|
464
|
-
|
465
|
-
def vlan
|
466
|
-
object_id.to_s
|
467
|
-
end
|
468
|
-
|
469
|
-
def friendly_name
|
470
|
-
"#{name} (#{type}_#{object_id})"
|
471
|
-
end
|
472
|
-
end
|
473
|
-
|
474
|
-
class MockVirtualMachine < Base
|
475
|
-
def name
|
476
|
-
self[:name]
|
477
|
-
end
|
478
|
-
|
479
|
-
def ip
|
480
|
-
self[:ip]
|
481
|
-
end
|
482
|
-
|
483
|
-
def cpus
|
484
|
-
self[:cpus] || 1
|
485
|
-
end
|
486
|
-
|
487
|
-
def memory
|
488
|
-
self[:memory] || 1024
|
489
|
-
end
|
490
|
-
|
491
|
-
def disks
|
492
|
-
@disks ||= MockVirtualMachineDisks.new(self)
|
493
|
-
end
|
494
|
-
|
495
|
-
def status
|
496
|
-
self[:status] || 2
|
497
|
-
end
|
498
|
-
|
499
|
-
def power_off!
|
500
|
-
self[:status] = 2
|
501
|
-
end
|
502
|
-
|
503
|
-
def power_on!
|
504
|
-
self[:status] = 4
|
505
|
-
end
|
506
|
-
|
507
|
-
def size
|
508
|
-
disks.reduce(0) {|s, d| s + d.vcloud_size }
|
509
|
-
end
|
510
|
-
|
511
|
-
def network_ip
|
512
|
-
if network = _parent.networks.find {|n| n.ip_collection.items[ip] }
|
513
|
-
network.ip_collection.items[ip]
|
514
|
-
end
|
515
|
-
end
|
516
|
-
|
517
|
-
# from fog ecloud server's _compose_vapp_data
|
518
|
-
def to_configure_vapp_hash
|
519
|
-
{
|
520
|
-
:name => name,
|
521
|
-
:cpus => cpus,
|
522
|
-
:memory => memory,
|
523
|
-
:disks => disks.map {|d| { :number => d.address.to_s, :size => d.vcloud_size, :resource => d.vcloud_size.to_s } }
|
524
|
-
}
|
525
|
-
end
|
526
|
-
|
527
|
-
def href(purpose = :base)
|
528
|
-
case purpose
|
529
|
-
when :base
|
530
|
-
super()
|
531
|
-
when :power_on
|
532
|
-
super() + "/power/action/powerOn"
|
533
|
-
when :power_off
|
534
|
-
super() + "/power/action/powerOff"
|
535
|
-
end
|
536
|
-
end
|
537
|
-
end
|
538
|
-
|
539
|
-
class MockVirtualMachineDisks < Array
|
540
|
-
def initialize(parent = nil)
|
541
|
-
@parent = parent
|
542
|
-
end
|
543
|
-
|
544
|
-
def _parent
|
545
|
-
@parent
|
546
|
-
end
|
547
|
-
|
548
|
-
def <<(disk)
|
549
|
-
next_address = 0
|
550
|
-
disk_with_max_address = max {|a, b| a[:address] <=> b[:address] }
|
551
|
-
disk_with_max_address && next_address = disk_with_max_address.address + 1
|
552
|
-
disk[:address] ||= next_address
|
553
|
-
|
554
|
-
super(disk)
|
555
|
-
|
556
|
-
if (addresses = map {|d| d.address }).uniq.size != size
|
557
|
-
raise "Duplicate disk address in: #{addresses.inspect} (#{size})"
|
558
|
-
end
|
559
|
-
|
560
|
-
sort! {|a, b| a.address <=> b.address }
|
561
|
-
self
|
562
|
-
end
|
563
|
-
|
564
|
-
def at_address(address)
|
565
|
-
find {|d| d.address == address }
|
566
|
-
end
|
567
|
-
end
|
568
|
-
|
569
|
-
class MockVirtualMachineDisk < Base
|
570
|
-
def size
|
571
|
-
self[:size].to_i
|
572
|
-
end
|
573
|
-
|
574
|
-
def vcloud_size
|
575
|
-
# kilobytes
|
576
|
-
size * 1024
|
577
|
-
end
|
578
|
-
|
579
|
-
def address
|
580
|
-
self[:address].to_i
|
581
|
-
end
|
582
|
-
end
|
583
|
-
|
584
|
-
# for Terremark eCloud
|
585
|
-
|
586
|
-
class MockVdcInternetServices < Base
|
587
|
-
def href
|
588
|
-
_parent.href + "/internetServices"
|
589
|
-
end
|
590
|
-
|
591
|
-
def name
|
592
|
-
"Internet Services"
|
593
|
-
end
|
594
|
-
|
595
|
-
def items
|
596
|
-
public_ip_internet_services + backup_internet_services
|
597
|
-
end
|
598
|
-
|
599
|
-
def public_ip_internet_services
|
600
|
-
_parent.public_ip_collection.items.reduce([]) do |services, public_ip|
|
601
|
-
services + public_ip.internet_service_collection.items
|
602
|
-
end
|
603
|
-
end
|
604
|
-
|
605
|
-
def backup_internet_services
|
606
|
-
@backup_internet_services ||= []
|
607
|
-
end
|
608
|
-
end
|
609
|
-
|
610
|
-
class MockBackupInternetService < Base
|
611
|
-
def name
|
612
|
-
self[:name] || "Backup Internet Service #{object_id}"
|
613
|
-
end
|
614
|
-
|
615
|
-
def protocol
|
616
|
-
self[:protocol]
|
617
|
-
end
|
618
|
-
|
619
|
-
def port
|
620
|
-
0
|
621
|
-
end
|
622
|
-
|
623
|
-
def enabled
|
624
|
-
self[:enabled].to_s.downcase != "false"
|
625
|
-
end
|
626
|
-
|
627
|
-
def timeout
|
628
|
-
self[:timeout] || 2
|
629
|
-
end
|
630
|
-
|
631
|
-
def description
|
632
|
-
self[:description] || "Description for Backup Service #{name}"
|
633
|
-
end
|
634
|
-
|
635
|
-
def redirect_url
|
636
|
-
nil
|
637
|
-
end
|
638
|
-
|
639
|
-
def node_collection
|
640
|
-
@node_collection ||= MockPublicIpInternetServiceNodes.new({}, self)
|
641
|
-
end
|
642
|
-
end
|
643
|
-
|
644
|
-
class MockFirewallAcls < Base
|
645
|
-
def name
|
646
|
-
"Firewall Access List"
|
647
|
-
end
|
648
|
-
end
|
649
|
-
|
650
|
-
class MockPublicIps < Base
|
651
|
-
def name
|
652
|
-
self[:name] || "Public IPs"
|
653
|
-
end
|
654
|
-
|
655
|
-
def items
|
656
|
-
@items ||= []
|
657
|
-
end
|
658
|
-
end
|
659
|
-
|
660
|
-
class MockPublicIp < Base
|
661
|
-
def name
|
662
|
-
self[:name]
|
663
|
-
end
|
664
|
-
|
665
|
-
def internet_service_collection
|
666
|
-
@internet_service_collection ||= MockPublicIpInternetServices.new({}, self)
|
667
|
-
end
|
668
|
-
end
|
669
|
-
|
670
|
-
class MockPublicIpInternetServices < Base
|
671
|
-
def href
|
672
|
-
_parent.href + "/internetServices"
|
673
|
-
end
|
674
|
-
|
675
|
-
def items
|
676
|
-
@items ||= []
|
677
|
-
end
|
678
|
-
end
|
679
|
-
|
680
|
-
class MockPublicIpInternetService < Base
|
681
|
-
def name
|
682
|
-
self[:name] || "Public IP Service #{object_id}"
|
683
|
-
end
|
684
|
-
|
685
|
-
def description
|
686
|
-
self[:description] || "Description for Public IP Service #{name}"
|
687
|
-
end
|
688
|
-
|
689
|
-
def protocol
|
690
|
-
self[:protocol]
|
691
|
-
end
|
692
|
-
|
693
|
-
def port
|
694
|
-
self[:port]
|
695
|
-
end
|
696
|
-
|
697
|
-
def enabled
|
698
|
-
!!self[:enabled]
|
699
|
-
end
|
700
|
-
|
701
|
-
def redirect_url
|
702
|
-
self[:redirect_url]
|
703
|
-
end
|
704
|
-
|
705
|
-
def timeout
|
706
|
-
self[:timeout] || 2
|
707
|
-
end
|
708
|
-
|
709
|
-
def node_collection
|
710
|
-
@node_collection ||= MockPublicIpInternetServiceNodes.new({}, self)
|
711
|
-
end
|
712
|
-
|
713
|
-
def monitor
|
714
|
-
nil
|
715
|
-
end
|
716
|
-
|
717
|
-
def backup_service
|
718
|
-
self[:backup_service]
|
719
|
-
end
|
720
|
-
end
|
721
|
-
|
722
|
-
class MockPublicIpInternetServiceNodes < Base
|
723
|
-
def href
|
724
|
-
_parent.href + "/nodeServices"
|
725
|
-
end
|
726
|
-
|
727
|
-
def items
|
728
|
-
@items ||= [].tap do |node_array|
|
729
|
-
node_array.instance_variable_set("@default_port", _parent.port)
|
730
|
-
|
731
|
-
def node_array.<<(node)
|
732
|
-
node[:port] ||= @default_port
|
733
|
-
super
|
734
|
-
end
|
735
|
-
end
|
736
|
-
end
|
737
|
-
end
|
738
|
-
|
739
|
-
class MockPublicIpInternetServiceNode < Base
|
740
|
-
def ip_address
|
741
|
-
self[:ip_address]
|
742
|
-
end
|
743
|
-
|
744
|
-
def name
|
745
|
-
self[:name] || "Public IP Service Node #{object_id}"
|
746
|
-
end
|
747
|
-
|
748
|
-
def description
|
749
|
-
self[:description] || "Description for Public IP Service Node #{name}"
|
750
|
-
end
|
751
|
-
|
752
|
-
def port
|
753
|
-
self[:port]
|
754
|
-
end
|
755
|
-
|
756
|
-
def enabled
|
757
|
-
self[:enabled].to_s.downcase != "false"
|
758
|
-
end
|
759
|
-
|
760
|
-
def enabled=(new_value)
|
761
|
-
self[:enabled] = new_value
|
762
|
-
end
|
763
|
-
end
|
764
|
-
end
|
765
|
-
end
|
766
|
-
end
|