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
@@ -0,0 +1,30 @@
|
|
1
|
+
# OpenStack Compute (Nova) Example
|
2
|
+
|
3
|
+
require 'fog'
|
4
|
+
require 'fog/openstack'
|
5
|
+
|
6
|
+
auth_url = "https://example.net/v2.0/tokens"
|
7
|
+
username = 'admin@example.net'
|
8
|
+
password = 'secret'
|
9
|
+
tenant = 'My Compute Tenant' # String
|
10
|
+
|
11
|
+
compute_client ||= ::Fog::Compute.new(:provider => :openstack,
|
12
|
+
:openstack_api_key => password ,
|
13
|
+
:openstack_username => username ,
|
14
|
+
:openstack_auth_url => auth_url ,
|
15
|
+
:openstack_tenant => tenant)
|
16
|
+
|
17
|
+
vm = compute_client.servers.create(:name => name,
|
18
|
+
:flavor_ref => flavor,
|
19
|
+
:block_device_mapping => [
|
20
|
+
{
|
21
|
+
:api_ver => "v2",
|
22
|
+
:device_name => "/dev/vda1",
|
23
|
+
:source_type => "volume",
|
24
|
+
:destination_type => "volume",
|
25
|
+
:delete_on_termination => false,
|
26
|
+
:uuid => cinder_uddi,
|
27
|
+
:boot_index => 0
|
28
|
+
}
|
29
|
+
]
|
30
|
+
)
|
@@ -8,7 +8,7 @@ module Fog
|
|
8
8
|
:openstack_service_type, :openstack_service_name, :openstack_tenant,
|
9
9
|
:openstack_api_key, :openstack_username, :openstack_current_user_id,
|
10
10
|
:current_user, :current_tenant,
|
11
|
-
:openstack_endpoint_type
|
11
|
+
:openstack_endpoint_type, :openstack_region
|
12
12
|
|
13
13
|
model_path 'fog/openstack/models/identity'
|
14
14
|
model :tenant
|
@@ -174,6 +174,7 @@ module Fog
|
|
174
174
|
missing_credentials = Array.new
|
175
175
|
@openstack_api_key = options[:openstack_api_key]
|
176
176
|
@openstack_username = options[:openstack_username]
|
177
|
+
@openstack_region = options[:openstack_region]
|
177
178
|
|
178
179
|
missing_credentials << :openstack_api_key unless @openstack_api_key
|
179
180
|
missing_credentials << :openstack_username unless @openstack_username
|
@@ -260,7 +261,8 @@ module Fog
|
|
260
261
|
:openstack_tenant => @openstack_tenant,
|
261
262
|
:openstack_service_type => @openstack_service_type,
|
262
263
|
:openstack_service_name => @openstack_service_name,
|
263
|
-
:openstack_endpoint_type => @openstack_endpoint_type
|
264
|
+
:openstack_endpoint_type => @openstack_endpoint_type,
|
265
|
+
:openstack_region => @openstack_region
|
264
266
|
}
|
265
267
|
|
266
268
|
credentials = Fog::OpenStack.authenticate_v2(options, @connection_options)
|
@@ -50,7 +50,7 @@ module Fog
|
|
50
50
|
|
51
51
|
attr_reader :password
|
52
52
|
attr_writer :image_ref, :flavor_ref, :nics, :os_scheduler_hints
|
53
|
-
attr_accessor :block_device_mapping
|
53
|
+
attr_accessor :block_device_mapping, :block_device_mapping_v2
|
54
54
|
|
55
55
|
def initialize(attributes={})
|
56
56
|
# Old 'connection' is renamed as service and should be used instead
|
@@ -62,6 +62,7 @@ module Fog
|
|
62
62
|
self.nics = attributes.delete(:nics)
|
63
63
|
self.os_scheduler_hints = attributes.delete(:os_scheduler_hints)
|
64
64
|
self.block_device_mapping = attributes.delete(:block_device_mapping)
|
65
|
+
self.block_device_mapping_v2 = attributes.delete(:block_device_mapping_v2)
|
65
66
|
|
66
67
|
super
|
67
68
|
end
|
@@ -326,7 +327,7 @@ module Fog
|
|
326
327
|
def save
|
327
328
|
raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if persisted?
|
328
329
|
requires :flavor_ref, :name
|
329
|
-
requires_one :image_ref, :block_device_mapping
|
330
|
+
requires_one :image_ref, :block_device_mapping, :block_device_mapping_v2
|
330
331
|
options = {
|
331
332
|
'personality' => personality,
|
332
333
|
'accessIPv4' => accessIPv4,
|
@@ -340,7 +341,8 @@ module Fog
|
|
340
341
|
'max_count' => @max_count,
|
341
342
|
'nics' => @nics,
|
342
343
|
'os:scheduler_hints' => @os_scheduler_hints,
|
343
|
-
'block_device_mapping' => @block_device_mapping
|
344
|
+
'block_device_mapping' => @block_device_mapping,
|
345
|
+
'block_device_mapping_v2' => @block_device_mapping_v2,
|
344
346
|
}
|
345
347
|
options['metadata'] = metadata.to_hash unless @metadata.nil?
|
346
348
|
options = options.reject {|key, value| value.nil?}
|
@@ -11,8 +11,8 @@ module Fog
|
|
11
11
|
load(service.list_public_images_detailed.body['images'])
|
12
12
|
end
|
13
13
|
|
14
|
-
def details
|
15
|
-
load(service.list_public_images_detailed.body['images'])
|
14
|
+
def details(attribute=nil, query=nil)
|
15
|
+
load(service.list_public_images_detailed(attribute, query).body['images'])
|
16
16
|
end
|
17
17
|
|
18
18
|
def find_by_id(id)
|
@@ -20,7 +20,7 @@ module Fog
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def get(floating_network_id)
|
23
|
-
if floating_ip =
|
23
|
+
if floating_ip = service.get_floating_ip(floating_network_id).body['floatingip']
|
24
24
|
new(floating_ip)
|
25
25
|
end
|
26
26
|
rescue Fog::Network::OpenStack::NotFound
|
@@ -57,23 +57,29 @@ module Fog
|
|
57
57
|
data['os:scheduler_hints'] = options['os:scheduler_hints']
|
58
58
|
end
|
59
59
|
|
60
|
-
if options['
|
61
|
-
data['server']['
|
62
|
-
[options['block_device_mapping']].flatten.map do |mapping|
|
60
|
+
if (block_device_mapping = options['block_device_mapping_v2'])
|
61
|
+
data['server']['block_device_mapping_v2'] = [block_device_mapping].flatten.collect do |mapping|
|
63
62
|
{
|
64
|
-
'
|
65
|
-
'volume_id' => mapping[:volume_id],
|
63
|
+
'boot_index' => mapping[:boot_index],
|
66
64
|
'delete_on_termination' => mapping[:delete_on_termination],
|
67
|
-
'
|
65
|
+
'destination_type' => mapping[:destination_type],
|
66
|
+
'device_name' => mapping[:device_name],
|
67
|
+
'source_type' => mapping[:source_type],
|
68
|
+
'uuid' => mapping[:uuid],
|
69
|
+
}
|
70
|
+
end
|
71
|
+
elsif (block_device_mapping = options['block_device_mapping'])
|
72
|
+
data['server']['block_device_mapping'] = [block_device_mapping].flatten.collect do |mapping|
|
73
|
+
{
|
74
|
+
'delete_on_termination' => mapping[:delete_on_termination],
|
75
|
+
'device_name' => mapping[:device_name],
|
76
|
+
'volume_id' => mapping[:volume_id],
|
77
|
+
'volume_size' => mapping[:volume_size],
|
68
78
|
}
|
69
79
|
end
|
70
80
|
end
|
71
81
|
|
72
|
-
path =
|
73
|
-
'os-volumes_boot.json'
|
74
|
-
else
|
75
|
-
'servers.json'
|
76
|
-
end
|
82
|
+
path = block_device_mapping ? 'os-volumes_boot.json' : 'servers.json'
|
77
83
|
|
78
84
|
request(
|
79
85
|
:body => Fog::JSON.encode(data),
|
@@ -142,6 +148,12 @@ module Fog
|
|
142
148
|
}
|
143
149
|
end
|
144
150
|
|
151
|
+
if block_devices = options["block_device_mapping_v2"]
|
152
|
+
block_devices.each { |bd| compute.volumes.get(bd[:uuid]).attach(server_id, bd[:device_name]) }
|
153
|
+
elsif block_device = options["block_device_mapping"]
|
154
|
+
compute.volumes.get(block_device[:volume_id]).attach(server_id, block_device[:device_name])
|
155
|
+
end
|
156
|
+
|
145
157
|
self.data[:last_modified][:servers][server_id] = Time.now
|
146
158
|
self.data[:servers][server_id] = mock_data
|
147
159
|
if security_groups = options['security_groups'] then
|
@@ -3,16 +3,18 @@ module Fog
|
|
3
3
|
class OpenStack
|
4
4
|
class Real
|
5
5
|
def list_public_images_detailed(attribute=nil, query=nil)
|
6
|
+
path = 'images/detail'
|
6
7
|
if attribute
|
7
|
-
|
8
|
+
query = { attribute => URI::encode(query) }
|
8
9
|
else
|
9
|
-
|
10
|
+
query = {}
|
10
11
|
end
|
11
12
|
|
12
13
|
request(
|
13
14
|
:expects => [200, 204],
|
14
15
|
:method => 'GET',
|
15
|
-
:path => path
|
16
|
+
:path => path,
|
17
|
+
:query => query
|
16
18
|
)
|
17
19
|
end
|
18
20
|
end # class Real
|
@@ -23,8 +25,8 @@ module Fog
|
|
23
25
|
response.status = [200, 204][rand(1)]
|
24
26
|
response.body = {'images' => self.data[:images].values}
|
25
27
|
response
|
26
|
-
end # def
|
28
|
+
end # def list_public_images_detailed
|
27
29
|
end # class Mock
|
28
30
|
end # class OpenStack
|
29
|
-
end # module
|
31
|
+
end # module Image
|
30
32
|
end # module Fog
|
data/lib/fog/rackspace.rb
CHANGED
data/lib/fog/rackspace/core.rb
CHANGED
@@ -98,6 +98,7 @@ module Fog
|
|
98
98
|
service(:monitoring, 'Monitoring')
|
99
99
|
service(:queues, 'Queues')
|
100
100
|
service(:networking, 'Networking')
|
101
|
+
service(:orchestration, 'Orchestration')
|
101
102
|
|
102
103
|
def self.authenticate(options, connection_options = {})
|
103
104
|
rackspace_auth_url = options[:rackspace_auth_url]
|
@@ -0,0 +1,356 @@
|
|
1
|
+
# OpenStack Orchestration
|
2
|
+
The mission of the OpenStack Orchestration program is to create a human- and machine-accessible service for managing the entire lifecycle of infrastructure and applications within OpenStack clouds.
|
3
|
+
|
4
|
+
## Heat
|
5
|
+
Heat is the main project in the OpenStack Orchestration program. It implements an orchestration engine to launch multiple composite cloud applications based on templates in the form of text files that can be treated like code. A native Heat template format is evolving, but Heat also endeavours to provide compatibility with the AWS CloudFormation template format, so that many existing CloudFormation templates can be launched on OpenStack. Heat provides both an OpenStack-native ReST API and a CloudFormation-compatible Query API.
|
6
|
+
|
7
|
+
*Why ‘Heat’? It makes the clouds rise!*
|
8
|
+
|
9
|
+
**How it works**
|
10
|
+
|
11
|
+
* A Heat template describes the infrastructure for a cloud application in a text file that is readable and writable by humans, and can be checked into version control, diffed, &c.
|
12
|
+
* Infrastructure resources that can be described include: servers, floating ips, volumes, security groups, users, etc.
|
13
|
+
* Heat also provides an autoscaling service that integrates with Ceilometer, so you can include a scaling group as a resource in a template.
|
14
|
+
* Templates can also specify the relationships between resources (e.g. this volume is connected to this server). This enables Heat to call out to the OpenStack APIs to create all of your infrastructure in the correct order to completely launch your application.
|
15
|
+
* Heat manages the whole lifecycle of the application - when you need to change your infrastructure, simply modify the template and use it to update your existing stack. Heat knows how to make the necessary changes. It will delete all of the resources when you are finished with the application, too.
|
16
|
+
* Heat primarily manages infrastructure, but the templates integrate well with software configuration management tools such as Puppet and Chef. The Heat team is working on providing even better integration between infrastructure and software.
|
17
|
+
|
18
|
+
_Source: [OpenStack Wiki](https://wiki.openstack.org/wiki/Heat)_
|
19
|
+
|
20
|
+
# Rackspace Orchestration (Heat) Client
|
21
|
+
|
22
|
+
[Full Rackspace Orchestration/Heat API Docs](http://docs.rackspace.com/orchestration/api/v1/orchestration-devguide/content/API_Operations_dle7023.html)
|
23
|
+
|
24
|
+
## Orchestration Service
|
25
|
+
Get a handle on the Orchestration service:
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
irb: service = Fog::Rackspace::Orchestration.new({
|
29
|
+
:rackspace_username => username,
|
30
|
+
:rackspace_api_key => api_key,
|
31
|
+
:rackspace_region => :iad #:ord, :dfw, :syd
|
32
|
+
})
|
33
|
+
===> #<Fog::Rackspace::Orchestration::Real:2168274880 ...
|
34
|
+
```
|
35
|
+
We will use this `service` to interact with the Orchestration resources, `stack`, `event`, `resource`, and `template`
|
36
|
+
|
37
|
+
## Stacks
|
38
|
+
|
39
|
+
Get a list of stacks you own:
|
40
|
+
|
41
|
+
```ruby
|
42
|
+
irb: service.stacks
|
43
|
+
===> <Fog::Rackspace::Orchestration::Stacks
|
44
|
+
[]
|
45
|
+
>
|
46
|
+
```
|
47
|
+
|
48
|
+
Create a new `stack` with a [Heat Template (HOT)](http://docs.openstack.org/developer/heat/template_guide/hot_guide.html). Here we are using Rackspace's HOT for [a single redis server]("https://github.com/rackspace-orchestration-templates/redis-single/blob/master/redis-single.yaml"):
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
redis_template = File.read("spec/support/redis_template.yml")
|
52
|
+
===> "heat_template_version: 2013-05-23\n\ndescription: ....
|
53
|
+
|
54
|
+
irb: service.stacks.new.save({
|
55
|
+
:stack_name => "a_redis_stack",
|
56
|
+
:template => redis_template
|
57
|
+
})
|
58
|
+
```
|
59
|
+
|
60
|
+
We get back a JSON blob filled with info about our new stack:
|
61
|
+
|
62
|
+
```ruby
|
63
|
+
===> {"id"=>"73e0f38a-a9fb-4a4e-8196-2b63039ef31f", "links"=>[{"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/73e0f38a-a9fb-4a4e-8196-2b63039ef31f", "rel"=>"self"}]}
|
64
|
+
```
|
65
|
+
|
66
|
+
Now that we have the `id` of our new stack, we can get a reference to it using the stack's `name` and `id`:
|
67
|
+
|
68
|
+
|
69
|
+
```ruby
|
70
|
+
irb: stack = service.stacks.get("a_redis_stack", "73e0f38a-a9fb-4a4e-8196-2b63039ef31f")
|
71
|
+
===> <Fog::Rackspace::Orchestration::Stack
|
72
|
+
id="73e0f38a-a9fb-4a4e-8196-2b63039ef31f",
|
73
|
+
description="This is a Heat template to deploy a standalone redis server on\nRackspace Cloud Servers\n",
|
74
|
+
links=[{"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/73e0f38a-a9fb-4a4e-8196-2b63039ef31f", "rel"=>"self"}],
|
75
|
+
stack_status_reason="Stack CREATE started",
|
76
|
+
stack_name="a_redis_stack",
|
77
|
+
creation_time="2014-11-13T16:21:02Z",
|
78
|
+
updated_time=nil
|
79
|
+
>
|
80
|
+
```
|
81
|
+
A stack knows about related `events`:
|
82
|
+
|
83
|
+
```ruby
|
84
|
+
irb: stack.events
|
85
|
+
===> <Fog::Rackspace::Orchestration::Events
|
86
|
+
[
|
87
|
+
<Fog::Rackspace::Orchestration::Event
|
88
|
+
id="7b1830a3-5d7b-43b2-bc1b-cffbb25c8b3e",
|
89
|
+
resource_name="redis_server_config",
|
90
|
+
event_time="2014-11-13T16:21:45Z",
|
91
|
+
links=[{"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/73e0f38a-a9fb-4a4e-8196-2b63039ef31f/resources/redis_server_config/events/7b1830a3-5d7b-43b2-bc1b-cffbb25c8b3e", "rel"=>"self"}, {"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/73e0f38a-a9fb-4a4e-8196-2b63039ef31f/resources/redis_server_config", "rel"=>"resource"}, {"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/73e0f38a-a9fb-4a4e-8196-2b63039ef31f", "rel"=>"stack"}],
|
92
|
+
logical_resource_id="redis_server_config",
|
93
|
+
resource_status="CREATE_IN_PROGRESS",
|
94
|
+
resource_status_reason="state changed",
|
95
|
+
physical_resource_id=nil
|
96
|
+
>,
|
97
|
+
```
|
98
|
+
A stack knows about related `resources`:
|
99
|
+
|
100
|
+
```ruby
|
101
|
+
irb: stack.resources
|
102
|
+
===> <Fog::Rackspace::Orchestration::Resources
|
103
|
+
[
|
104
|
+
<Fog::Rackspace::Orchestration::Resource
|
105
|
+
id=nil,
|
106
|
+
resource_name="redis_server",
|
107
|
+
description=nil,
|
108
|
+
links=[{"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/73e0f38a-a9fb-4a4e-8196-2b63039ef31f/resources/redis_server", "rel"=>"self"}, {"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/73e0f38a-a9fb-4a4e-8196-2b63039ef31f", "rel"=>"stack"}],
|
109
|
+
logical_resource_id="redis_server",
|
110
|
+
resource_status="CREATE_COMPLETE",
|
111
|
+
updated_time="2014-11-13T16:21:04Z",
|
112
|
+
required_by=["redis_server_config"],
|
113
|
+
resource_status_reason="state changed",
|
114
|
+
resource_type="Rackspace::Cloud::Server"
|
115
|
+
>,
|
116
|
+
```
|
117
|
+
|
118
|
+
You can list, limit, sort stacks based on certain keywords:
|
119
|
+
|
120
|
+
** Available keywords:**
|
121
|
+
|
122
|
+
* status
|
123
|
+
* name
|
124
|
+
* limit
|
125
|
+
* marker
|
126
|
+
* sort_keys
|
127
|
+
* sort_dir
|
128
|
+
|
129
|
+
```ruby
|
130
|
+
irb: stacks = service.stacks.all(sort_key: "stack_name", sort_dir: "asc")
|
131
|
+
===> <Fog::Rackspace::Orchestration::Stacks
|
132
|
+
[
|
133
|
+
<Fog::Rackspace::Orchestration::Stack
|
134
|
+
id="73e0f38a-a9fb-4a4e-8196-2b63039ef31f",
|
135
|
+
description="This is a Heat template to deploy a standalone redis server on\nRackspace Cloud Servers\n",
|
136
|
+
links=[{"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/73e0f38a-a9fb-4a4e-8196-2b63039ef31f", "rel"=>"self"}],
|
137
|
+
stack_status_reason="Stack CREATE started",
|
138
|
+
stack_name="a_redis_stack",
|
139
|
+
creation_time="2014-11-13T16:21:02Z",
|
140
|
+
updated_time=nil
|
141
|
+
>
|
142
|
+
]
|
143
|
+
>
|
144
|
+
```
|
145
|
+
You can get a stack's `template`
|
146
|
+
|
147
|
+
```ruby
|
148
|
+
irb: stack.template
|
149
|
+
===> <Fog::Rackspace::Orchestration::Template
|
150
|
+
description="This is a Heat template to deploy a standalone redis server on\nRackspace Cloud Servers\n",
|
151
|
+
heat_template_version="2013-05-23",
|
152
|
+
....
|
153
|
+
```
|
154
|
+
You can abandon a stack -- essentially, it will delete the stack, but keep the resources around for potential further use:
|
155
|
+
|
156
|
+
```ruby
|
157
|
+
irb: stack.abandon
|
158
|
+
===> #<Excon::Response:0x00000104d6b870 @data={:body=>{"status"=>"IN_PROGRESS", "name"=>"a_redis_stack", "stack_user_project_id"=>"930035", "environment"=>{"parameters"=>{}, "resource_registry"=>{"resources"=>{}}}, "template"=>{"parameter_groups"=>[{"parameters"=>["flavor", "image"], "label"=>"Server Settings"}, {"parameters"=>["redis_port"], "label"=>"Redis Settings"}, {"parameters"=>["redis_version", "redis_hostname", "kitchen", "chef_version"], "label"=>"rax-dev-params"}], "heat_template_version"=>"2013-05-23", "description"=>"This is a Heat te
|
159
|
+
```
|
160
|
+
|
161
|
+
You can preview a stack:
|
162
|
+
|
163
|
+
```ruby
|
164
|
+
irb: service.stacks.preview({
|
165
|
+
:stack_name => "a_redis_template",
|
166
|
+
:template => redis_template
|
167
|
+
})
|
168
|
+
===> <Fog::Rackspace::Orchestration::Stack
|
169
|
+
id="None",
|
170
|
+
description="This is a Heat template to deploy a standalone redis server on\nRackspace Cloud Servers\n",
|
171
|
+
links=[{"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_template/None", "rel"=>"self"}],
|
172
|
+
stack_status_reason=nil,
|
173
|
+
stack_name="a_redis_template",
|
174
|
+
creation_time="2014-11-13T16:33:50Z",
|
175
|
+
updated_time=nil
|
176
|
+
>
|
177
|
+
```
|
178
|
+
|
179
|
+
Of course, you can just delete a stack. This deletes associated `resources` (as opposed to `abandon`):
|
180
|
+
|
181
|
+
```ruby
|
182
|
+
irb: stack.delete
|
183
|
+
===> #<Excon::Response:0x0000010198b000 @data={:body=>"", :headers=>{"Server"=>"nginx/1.2.1", "Date"=>"Thu, 13 Nov 2014 16:28:38 GMT", "Content-Type"=>"text/html; charset=UTF-8", "Connection"=>"keep-alive", "Via"=>"1.0 Repose (Repose/6.0.2)"}, :status=>204, :reason_phrase=>"No Content", :remote_ip=>"23.253.147.138", :local_port=>54721, :local_address=>"192.168.1.65"}, @body="", @headers={"Server"=>"nginx/1.2.1", "Date"=>"Thu, 13 Nov 2014 16:28:38 GMT", "Content-Type"=>"text/html; charset=UTF-8", "Connection"=>"keep-alive", "Via"=>"1.0 Repose (Repose/6.0.2)"}, @status=204, @remote_ip="23.253.147.138", @local_port=54721, @local_address="192.168.1.65">
|
184
|
+
```
|
185
|
+
|
186
|
+
Reload any object by calling `reload` on it:
|
187
|
+
|
188
|
+
```ruby
|
189
|
+
irb: stacks.reload
|
190
|
+
===> <Fog::Rackspace::Orchestration::Stacks
|
191
|
+
[]
|
192
|
+
>
|
193
|
+
```
|
194
|
+
You can get build information:
|
195
|
+
|
196
|
+
```ruby
|
197
|
+
irb: service.stacks.build_info
|
198
|
+
===> {"engine"=>{"revision"=>"2014.k1-20141027-1178"}, "fusion-api"=>{"revision"=>"j1-20140915-10d9ee4-98"}, "api"=>{"revision"=>"2014.k1-20141027-1178"}}
|
199
|
+
```
|
200
|
+
|
201
|
+
## Events
|
202
|
+
|
203
|
+
`Events` are indexable and can be scoped by `stack`:
|
204
|
+
|
205
|
+
```ruby
|
206
|
+
irb: event = stack.events.first
|
207
|
+
===> <Fog::Rackspace::Orchestration::Event
|
208
|
+
id="7b1830a3-5d7b-43b2-bc1b-cffbb25c8b3e",
|
209
|
+
resource_name="redis_server_config",
|
210
|
+
event_time="2014-11-13T16:21:45Z",
|
211
|
+
links=[{"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/73e0f38a-a9fb-4a4e-8196-2b63039ef31f/resources/redis_server_config/events/7b1830a3-5d7b-43b2-bc1b-cffbb25c8b3e", "rel"=>"self"}, {"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/73e0f38a-a9fb-4a4e-8196-2b63039ef31f/resources/redis_server_config", "rel"=>"resource"}, {"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/73e0f38a-a9fb-4a4e-8196-2b63039ef31f", "rel"=>"stack"}],
|
212
|
+
logical_resource_id="redis_server_config",
|
213
|
+
resource_status="CREATE_IN_PROGRESS",
|
214
|
+
resource_status_reason="state changed",
|
215
|
+
physical_resource_id=nil
|
216
|
+
>
|
217
|
+
```
|
218
|
+
|
219
|
+
`Events` can be sorted, limited, etc by passing an hash like so:
|
220
|
+
`service.events.all(stack, limit: 1)`
|
221
|
+
|
222
|
+
** Available keys: **
|
223
|
+
|
224
|
+
* resource_action
|
225
|
+
* resource_status
|
226
|
+
* resource_name
|
227
|
+
* resource_type
|
228
|
+
* limit
|
229
|
+
* marker
|
230
|
+
* sort_keys
|
231
|
+
* sort_dir
|
232
|
+
|
233
|
+
They are getable:
|
234
|
+
|
235
|
+
```ruby
|
236
|
+
irb: event = service.events.get(stack, resource, event_id)
|
237
|
+
===> <Fog::Rackspace::Orchestration::Event
|
238
|
+
id="7b1830a3-5d7b-43b2-bc1b-cffbb25c8b3e",
|
239
|
+
resource_name="redis_server_config",
|
240
|
+
event_time="2014-11-13T16:21:45Z",
|
241
|
+
links=[{"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/73e0f38a-a9fb-4a4e-8196-2b63039ef31f/resources/redis_server_config/events/7b1830a3-5d7b-43b2-bc1b-cffbb25c8b3e", "rel"=>"self"}, {"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/73e0f38a-a9fb-4a4e-8196-2b63039ef31f/resources/redis_server_config", "rel"=>"resource"}, {"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/73e0f38a-a9fb-4a4e-8196-2b63039ef31f", "rel"=>"stack"}],
|
242
|
+
logical_resource_id="redis_server_config",
|
243
|
+
resource_status="CREATE_IN_PROGRESS",
|
244
|
+
resource_status_reason="state changed",
|
245
|
+
physical_resource_id=nil
|
246
|
+
>
|
247
|
+
```
|
248
|
+
|
249
|
+
An `event` knows about its associated `stack`:
|
250
|
+
|
251
|
+
```ruby
|
252
|
+
irb: event.stack
|
253
|
+
===> <Fog::Rackspace::Orchestration::Stack
|
254
|
+
id="73e0f38a-a9fb-4a4e-8196-2b63039ef31f",
|
255
|
+
description="This is a Heat template to deploy a standalone redis server on\nRackspace Cloud Servers\n",
|
256
|
+
links=[{"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/73e0f38a-a9fb-4a4e-8196-2b63039ef31f", "rel"=>"self"}],
|
257
|
+
stack_status_reason="Stack CREATE completed successfully",
|
258
|
+
stack_name="a_redis_stack",
|
259
|
+
creation_time="2014-11-13T16:21:02Z",
|
260
|
+
updated_time=nil
|
261
|
+
>
|
262
|
+
```
|
263
|
+
|
264
|
+
You can list, limit, sort events based on certain keywords:
|
265
|
+
|
266
|
+
```ruby
|
267
|
+
irb: events = stack.events.all(stack, sort_key: "resource_name", sort_dir: "desc", limit: 3)
|
268
|
+
===> <Fog::Rackspace::Orchestration::Events
|
269
|
+
[
|
270
|
+
<Fog::Rackspace::Orchestration::Event
|
271
|
+
id="9cdae7d7-f44e-4dbb-bc0b-61ea6da9cf81",
|
272
|
+
resource_name="redis_server_config",
|
273
|
+
event_time="2014-11-13T16:24:07Z",
|
274
|
+
....
|
275
|
+
```
|
276
|
+
|
277
|
+
An `event` has an associated `resource`:
|
278
|
+
|
279
|
+
```ruby
|
280
|
+
irb: resource = event.resource
|
281
|
+
===> <Fog::Rackspace::Orchestration::Resource
|
282
|
+
id=nil,
|
283
|
+
resource_name="redis_server_config",
|
284
|
+
description="",
|
285
|
+
links=[{"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/73e0f38a-a9fb-4a4e-8196-2b63039ef31f/resources/redis_server_config", "rel"=>"self"}, {"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/73e0f38a-a9fb-4a4e-8196-2b63039ef31f", "rel"=>"stack"}],
|
286
|
+
logical_resource_id="redis_server_config",
|
287
|
+
resource_status="CREATE_COMPLETE",
|
288
|
+
updated_time="2014-11-13T16:21:45Z",
|
289
|
+
required_by=[],
|
290
|
+
resource_status_reason="state changed",
|
291
|
+
resource_type="OS::Heat::ChefSolo"
|
292
|
+
>
|
293
|
+
```
|
294
|
+
|
295
|
+
## Resource
|
296
|
+
|
297
|
+
`resources` are indexable:
|
298
|
+
|
299
|
+
```ruby
|
300
|
+
irb: service.resources.all(stack, {nested_depth: 1})
|
301
|
+
===> <Fog::Rackspace::Orchestration::Resources
|
302
|
+
[
|
303
|
+
<Fog::Rackspace::Orchestration::Resource
|
304
|
+
id=nil,
|
305
|
+
resource_name="redis_server",
|
306
|
+
description=nil,
|
307
|
+
links=[{"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/ee648a3b-14a3-4df8-aa58-620a9d67e3e5/resources/redis_server", "rel"=>"self"}, {"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/ee648a3b-14a3-4df8-aa58-620a9d67e3e5", "rel"=>"stack"}],
|
308
|
+
logical_resource_id="redis_server",
|
309
|
+
resource_status="CREATE_COMPLETE",
|
310
|
+
updated_time="2014-11-13T16:32:30Z",
|
311
|
+
required_by=["redis_server_config"],
|
312
|
+
resource_status_reason="state changed",
|
313
|
+
resource_type="Rackspace::Cloud::Server"
|
314
|
+
>,
|
315
|
+
...
|
316
|
+
```
|
317
|
+
|
318
|
+
A `resource` knows about its associated `stack`:
|
319
|
+
|
320
|
+
```ruby
|
321
|
+
irb: resource.stack
|
322
|
+
===> <Fog::Rackspace::Orchestration::Stack
|
323
|
+
id="73e0f38a-a9fb-4a4e-8196-2b63039ef31f",
|
324
|
+
description="This is a Heat template to deploy a standalone redis server on\nRackspace Cloud Servers\n",
|
325
|
+
links=[{"href"=>"https://iad.orchestration.api.rackspacecloud.com/v1/930035/stacks/a_redis_stack/73e0f38a-a9fb-4a4e-8196-2b63039ef31f", "rel"=>"self"}],
|
326
|
+
stack_status_reason="Stack CREATE completed successfully",
|
327
|
+
stack_name="a_redis_stack",
|
328
|
+
creation_time="2014-11-13T16:21:02Z",
|
329
|
+
updated_time=nil
|
330
|
+
>
|
331
|
+
```
|
332
|
+
|
333
|
+
Resource metadata is visible:
|
334
|
+
|
335
|
+
```ruby
|
336
|
+
irb: resource.metadata
|
337
|
+
===> {}
|
338
|
+
```
|
339
|
+
|
340
|
+
A `resource's` template is visible (if one exists)
|
341
|
+
|
342
|
+
```ruby
|
343
|
+
irb: resource.template
|
344
|
+
===> nil
|
345
|
+
```
|
346
|
+
|
347
|
+
## Validation
|
348
|
+
You can validate a Heat template (HOT) before using it:
|
349
|
+
|
350
|
+
```ruby
|
351
|
+
irb: service.templates.validate({:template => redis_template})
|
352
|
+
===> <Fog::Rackspace::Orchestration::Template
|
353
|
+
description="This is a Heat template to deploy a standalone redis server on\nRackspace Cloud Servers\n",
|
354
|
+
heat_template_version=nil,
|
355
|
+
...
|
356
|
+
```
|