fog-openstack 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +30 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/CONTRIBUTING.md +18 -0
- data/Gemfile +4 -0
- data/LICENSE.md +20 -0
- data/README.md +41 -0
- data/Rakefile +8 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/fog-openstack.gemspec +33 -0
- data/lib/fog/openstack.rb +508 -0
- data/lib/fog/openstack/CHANGELOG.md +47 -0
- data/lib/fog/openstack/baremetal.rb +308 -0
- data/lib/fog/openstack/common.rb +46 -0
- data/lib/fog/openstack/compute.rb +397 -0
- data/lib/fog/openstack/core.rb +114 -0
- data/lib/fog/openstack/docs/compute.md +681 -0
- data/lib/fog/openstack/docs/getting_started.md +81 -0
- data/lib/fog/openstack/docs/orchestration.md +318 -0
- data/lib/fog/openstack/docs/planning.md +270 -0
- data/lib/fog/openstack/docs/storage.md +453 -0
- data/lib/fog/openstack/errors.rb +42 -0
- data/lib/fog/openstack/examples/compute/basics.rb +50 -0
- data/lib/fog/openstack/examples/compute/block_device_mapping_v2.rb +32 -0
- data/lib/fog/openstack/examples/identity/basics.rb +68 -0
- data/lib/fog/openstack/examples/image/upload-test-image.rb +77 -0
- data/lib/fog/openstack/examples/network/network_subnets_routers.rb +62 -0
- data/lib/fog/openstack/examples/planning/basics.rb +53 -0
- data/lib/fog/openstack/examples/storage/set-account-quota.rb +66 -0
- data/lib/fog/openstack/identity.rb +27 -0
- data/lib/fog/openstack/identity_v2.rb +203 -0
- data/lib/fog/openstack/identity_v3.rb +181 -0
- data/lib/fog/openstack/image.rb +22 -0
- data/lib/fog/openstack/image_v1.rb +148 -0
- data/lib/fog/openstack/image_v2.rb +142 -0
- data/lib/fog/openstack/metering.rb +145 -0
- data/lib/fog/openstack/models/baremetal/chassis.rb +49 -0
- data/lib/fog/openstack/models/baremetal/chassis_collection.rb +44 -0
- data/lib/fog/openstack/models/baremetal/driver.rb +24 -0
- data/lib/fog/openstack/models/baremetal/drivers.rb +21 -0
- data/lib/fog/openstack/models/baremetal/node.rb +96 -0
- data/lib/fog/openstack/models/baremetal/nodes.rb +44 -0
- data/lib/fog/openstack/models/baremetal/port.rb +50 -0
- data/lib/fog/openstack/models/baremetal/ports.rb +44 -0
- data/lib/fog/openstack/models/collection.rb +45 -0
- data/lib/fog/openstack/models/compute/address.rb +67 -0
- data/lib/fog/openstack/models/compute/addresses.rb +28 -0
- data/lib/fog/openstack/models/compute/aggregate.rb +58 -0
- data/lib/fog/openstack/models/compute/aggregates.rb +26 -0
- data/lib/fog/openstack/models/compute/availability_zone.rb +14 -0
- data/lib/fog/openstack/models/compute/availability_zones.rb +22 -0
- data/lib/fog/openstack/models/compute/flavor.rb +52 -0
- data/lib/fog/openstack/models/compute/flavors.rb +29 -0
- data/lib/fog/openstack/models/compute/host.rb +28 -0
- data/lib/fog/openstack/models/compute/hosts.rb +28 -0
- data/lib/fog/openstack/models/compute/image.rb +48 -0
- data/lib/fog/openstack/models/compute/images.rb +38 -0
- data/lib/fog/openstack/models/compute/key_pair.rb +56 -0
- data/lib/fog/openstack/models/compute/key_pairs.rb +29 -0
- data/lib/fog/openstack/models/compute/metadata.rb +65 -0
- data/lib/fog/openstack/models/compute/metadatum.rb +27 -0
- data/lib/fog/openstack/models/compute/network.rb +13 -0
- data/lib/fog/openstack/models/compute/networks.rb +30 -0
- data/lib/fog/openstack/models/compute/security_group.rb +57 -0
- data/lib/fog/openstack/models/compute/security_group_rule.rb +32 -0
- data/lib/fog/openstack/models/compute/security_group_rules.rb +21 -0
- data/lib/fog/openstack/models/compute/security_groups.rb +24 -0
- data/lib/fog/openstack/models/compute/server.rb +410 -0
- data/lib/fog/openstack/models/compute/servers.rb +59 -0
- data/lib/fog/openstack/models/compute/service.rb +42 -0
- data/lib/fog/openstack/models/compute/services.rb +23 -0
- data/lib/fog/openstack/models/compute/snapshot.rb +32 -0
- data/lib/fog/openstack/models/compute/snapshots.rb +37 -0
- data/lib/fog/openstack/models/compute/tenant.rb +24 -0
- data/lib/fog/openstack/models/compute/tenants.rb +25 -0
- data/lib/fog/openstack/models/compute/volume.rb +52 -0
- data/lib/fog/openstack/models/compute/volumes.rb +37 -0
- data/lib/fog/openstack/models/identity_v2/ec2_credential.rb +39 -0
- data/lib/fog/openstack/models/identity_v2/ec2_credentials.rb +56 -0
- data/lib/fog/openstack/models/identity_v2/role.rb +52 -0
- data/lib/fog/openstack/models/identity_v2/roles.rb +22 -0
- data/lib/fog/openstack/models/identity_v2/tenant.rb +60 -0
- data/lib/fog/openstack/models/identity_v2/tenants.rb +31 -0
- data/lib/fog/openstack/models/identity_v2/user.rb +69 -0
- data/lib/fog/openstack/models/identity_v2/users.rb +45 -0
- data/lib/fog/openstack/models/identity_v3/domain.rb +49 -0
- data/lib/fog/openstack/models/identity_v3/domains.rb +50 -0
- data/lib/fog/openstack/models/identity_v3/endpoint.rb +46 -0
- data/lib/fog/openstack/models/identity_v3/endpoints.rb +26 -0
- data/lib/fog/openstack/models/identity_v3/group.rb +92 -0
- data/lib/fog/openstack/models/identity_v3/groups.rb +31 -0
- data/lib/fog/openstack/models/identity_v3/os_credential.rb +73 -0
- data/lib/fog/openstack/models/identity_v3/os_credentials.rb +31 -0
- data/lib/fog/openstack/models/identity_v3/policies.rb +31 -0
- data/lib/fog/openstack/models/identity_v3/policy.rb +42 -0
- data/lib/fog/openstack/models/identity_v3/project.rb +106 -0
- data/lib/fog/openstack/models/identity_v3/projects.rb +57 -0
- data/lib/fog/openstack/models/identity_v3/role.rb +40 -0
- data/lib/fog/openstack/models/identity_v3/role_assignment.rb +22 -0
- data/lib/fog/openstack/models/identity_v3/role_assignments.rb +25 -0
- data/lib/fog/openstack/models/identity_v3/roles.rb +39 -0
- data/lib/fog/openstack/models/identity_v3/service.rb +47 -0
- data/lib/fog/openstack/models/identity_v3/services.rb +31 -0
- data/lib/fog/openstack/models/identity_v3/token.rb +26 -0
- data/lib/fog/openstack/models/identity_v3/tokens.rb +41 -0
- data/lib/fog/openstack/models/identity_v3/user.rb +81 -0
- data/lib/fog/openstack/models/identity_v3/users.rb +35 -0
- data/lib/fog/openstack/models/image_v1/image.rb +78 -0
- data/lib/fog/openstack/models/image_v1/images.rb +70 -0
- data/lib/fog/openstack/models/image_v2/image.rb +149 -0
- data/lib/fog/openstack/models/image_v2/images.rb +67 -0
- data/lib/fog/openstack/models/meta_parent.rb +31 -0
- data/lib/fog/openstack/models/metering/meter.rb +0 -0
- data/lib/fog/openstack/models/metering/meters.rb +0 -0
- data/lib/fog/openstack/models/metering/resource.rb +15 -0
- data/lib/fog/openstack/models/metering/resources.rb +23 -0
- data/lib/fog/openstack/models/model.rb +44 -0
- data/lib/fog/openstack/models/network/floating_ip.rb +40 -0
- data/lib/fog/openstack/models/network/floating_ips.rb +32 -0
- data/lib/fog/openstack/models/network/lb_health_monitor.rb +57 -0
- data/lib/fog/openstack/models/network/lb_health_monitors.rb +32 -0
- data/lib/fog/openstack/models/network/lb_member.rb +42 -0
- data/lib/fog/openstack/models/network/lb_members.rb +32 -0
- data/lib/fog/openstack/models/network/lb_pool.rb +67 -0
- data/lib/fog/openstack/models/network/lb_pools.rb +32 -0
- data/lib/fog/openstack/models/network/lb_vip.rb +48 -0
- data/lib/fog/openstack/models/network/lb_vips.rb +32 -0
- data/lib/fog/openstack/models/network/network.rb +43 -0
- data/lib/fog/openstack/models/network/networks.rb +32 -0
- data/lib/fog/openstack/models/network/port.rb +42 -0
- data/lib/fog/openstack/models/network/ports.rb +32 -0
- data/lib/fog/openstack/models/network/router.rb +61 -0
- data/lib/fog/openstack/models/network/routers.rb +32 -0
- data/lib/fog/openstack/models/network/security_group.rb +32 -0
- data/lib/fog/openstack/models/network/security_group_rule.rb +33 -0
- data/lib/fog/openstack/models/network/security_group_rules.rb +32 -0
- data/lib/fog/openstack/models/network/security_groups.rb +32 -0
- data/lib/fog/openstack/models/network/subnet.rb +44 -0
- data/lib/fog/openstack/models/network/subnets.rb +32 -0
- data/lib/fog/openstack/models/orchestration/event.rb +20 -0
- data/lib/fog/openstack/models/orchestration/events.rb +31 -0
- data/lib/fog/openstack/models/orchestration/resource.rb +32 -0
- data/lib/fog/openstack/models/orchestration/resource_schemas.rb +17 -0
- data/lib/fog/openstack/models/orchestration/resources.rb +36 -0
- data/lib/fog/openstack/models/orchestration/stack.rb +120 -0
- data/lib/fog/openstack/models/orchestration/stacks.rb +64 -0
- data/lib/fog/openstack/models/orchestration/template.rb +15 -0
- data/lib/fog/openstack/models/orchestration/templates.rb +45 -0
- data/lib/fog/openstack/models/planning/plan.rb +70 -0
- data/lib/fog/openstack/models/planning/plans.rb +31 -0
- data/lib/fog/openstack/models/planning/role.rb +23 -0
- data/lib/fog/openstack/models/planning/roles.rb +16 -0
- data/lib/fog/openstack/models/storage/directories.rb +36 -0
- data/lib/fog/openstack/models/storage/directory.rb +50 -0
- data/lib/fog/openstack/models/storage/file.rb +185 -0
- data/lib/fog/openstack/models/storage/files.rb +101 -0
- data/lib/fog/openstack/models/volume/availability_zone.rb +10 -0
- data/lib/fog/openstack/models/volume/availability_zones.rb +14 -0
- data/lib/fog/openstack/models/volume/transfer.rb +28 -0
- data/lib/fog/openstack/models/volume/transfers.rb +35 -0
- data/lib/fog/openstack/models/volume/volume.rb +36 -0
- data/lib/fog/openstack/models/volume/volume_type.rb +36 -0
- data/lib/fog/openstack/models/volume/volume_types.rb +22 -0
- data/lib/fog/openstack/models/volume/volumes.rb +35 -0
- data/lib/fog/openstack/models/volume_v1/availability_zone.rb +15 -0
- data/lib/fog/openstack/models/volume_v1/availability_zones.rb +16 -0
- data/lib/fog/openstack/models/volume_v1/transfer.rb +18 -0
- data/lib/fog/openstack/models/volume_v1/transfers.rb +16 -0
- data/lib/fog/openstack/models/volume_v1/volume.rb +26 -0
- data/lib/fog/openstack/models/volume_v1/volume_type.rb +16 -0
- data/lib/fog/openstack/models/volume_v1/volume_types.rb +16 -0
- data/lib/fog/openstack/models/volume_v1/volumes.rb +16 -0
- data/lib/fog/openstack/models/volume_v2/availability_zone.rb +15 -0
- data/lib/fog/openstack/models/volume_v2/availability_zones.rb +16 -0
- data/lib/fog/openstack/models/volume_v2/transfer.rb +19 -0
- data/lib/fog/openstack/models/volume_v2/transfers.rb +16 -0
- data/lib/fog/openstack/models/volume_v2/volume.rb +27 -0
- data/lib/fog/openstack/models/volume_v2/volume_type.rb +16 -0
- data/lib/fog/openstack/models/volume_v2/volume_types.rb +16 -0
- data/lib/fog/openstack/models/volume_v2/volumes.rb +16 -0
- data/lib/fog/openstack/network.rb +293 -0
- data/lib/fog/openstack/orchestration.rb +192 -0
- data/lib/fog/openstack/planning.rb +174 -0
- data/lib/fog/openstack/requests/baremetal/create_chassis.rb +44 -0
- data/lib/fog/openstack/requests/baremetal/create_node.rb +54 -0
- data/lib/fog/openstack/requests/baremetal/create_port.rb +46 -0
- data/lib/fog/openstack/requests/baremetal/delete_chassis.rb +25 -0
- data/lib/fog/openstack/requests/baremetal/delete_node.rb +25 -0
- data/lib/fog/openstack/requests/baremetal/delete_port.rb +25 -0
- data/lib/fog/openstack/requests/baremetal/get_chassis.rb +24 -0
- data/lib/fog/openstack/requests/baremetal/get_driver.rb +24 -0
- data/lib/fog/openstack/requests/baremetal/get_driver_properties.rb +40 -0
- data/lib/fog/openstack/requests/baremetal/get_node.rb +24 -0
- data/lib/fog/openstack/requests/baremetal/get_port.rb +24 -0
- data/lib/fog/openstack/requests/baremetal/list_chassis.rb +42 -0
- data/lib/fog/openstack/requests/baremetal/list_chassis_detailed.rb +25 -0
- data/lib/fog/openstack/requests/baremetal/list_drivers.rb +25 -0
- data/lib/fog/openstack/requests/baremetal/list_nodes.rb +34 -0
- data/lib/fog/openstack/requests/baremetal/list_nodes_detailed.rb +25 -0
- data/lib/fog/openstack/requests/baremetal/list_ports.rb +42 -0
- data/lib/fog/openstack/requests/baremetal/list_ports_detailed.rb +25 -0
- data/lib/fog/openstack/requests/baremetal/patch_chassis.rb +42 -0
- data/lib/fog/openstack/requests/baremetal/patch_node.rb +41 -0
- data/lib/fog/openstack/requests/baremetal/patch_port.rb +41 -0
- data/lib/fog/openstack/requests/baremetal/set_node_maintenance.rb +30 -0
- data/lib/fog/openstack/requests/baremetal/set_node_power_state.rb +35 -0
- data/lib/fog/openstack/requests/baremetal/set_node_provision_state.rb +38 -0
- data/lib/fog/openstack/requests/baremetal/unset_node_maintenance.rb +30 -0
- data/lib/fog/openstack/requests/compute/add_aggregate_host.rb +30 -0
- data/lib/fog/openstack/requests/compute/add_fixed_ip.rb +29 -0
- data/lib/fog/openstack/requests/compute/add_flavor_access.rb +31 -0
- data/lib/fog/openstack/requests/compute/add_security_group.rb +20 -0
- data/lib/fog/openstack/requests/compute/allocate_address.rb +39 -0
- data/lib/fog/openstack/requests/compute/associate_address.rb +30 -0
- data/lib/fog/openstack/requests/compute/attach_volume.rb +38 -0
- data/lib/fog/openstack/requests/compute/boot_from_snapshot.rb +41 -0
- data/lib/fog/openstack/requests/compute/change_server_password.rb +20 -0
- data/lib/fog/openstack/requests/compute/confirm_resize_server.rb +20 -0
- data/lib/fog/openstack/requests/compute/create_aggregate.rb +42 -0
- data/lib/fog/openstack/requests/compute/create_flavor.rb +85 -0
- data/lib/fog/openstack/requests/compute/create_flavor_metadata.rb +38 -0
- data/lib/fog/openstack/requests/compute/create_image.rb +44 -0
- data/lib/fog/openstack/requests/compute/create_key_pair.rb +46 -0
- data/lib/fog/openstack/requests/compute/create_security_group.rb +50 -0
- data/lib/fog/openstack/requests/compute/create_security_group_rule.rb +57 -0
- data/lib/fog/openstack/requests/compute/create_server.rb +185 -0
- data/lib/fog/openstack/requests/compute/create_volume.rb +51 -0
- data/lib/fog/openstack/requests/compute/create_volume_snapshot.rb +51 -0
- data/lib/fog/openstack/requests/compute/delete_aggregate.rb +28 -0
- data/lib/fog/openstack/requests/compute/delete_flavor.rb +28 -0
- data/lib/fog/openstack/requests/compute/delete_image.rb +35 -0
- data/lib/fog/openstack/requests/compute/delete_key_pair.rb +29 -0
- data/lib/fog/openstack/requests/compute/delete_meta.rb +35 -0
- data/lib/fog/openstack/requests/compute/delete_metadata.rb +23 -0
- data/lib/fog/openstack/requests/compute/delete_security_group.rb +31 -0
- data/lib/fog/openstack/requests/compute/delete_security_group_rule.rb +31 -0
- data/lib/fog/openstack/requests/compute/delete_server.rb +34 -0
- data/lib/fog/openstack/requests/compute/delete_service.rb +32 -0
- data/lib/fog/openstack/requests/compute/delete_snapshot.rb +28 -0
- data/lib/fog/openstack/requests/compute/delete_volume.rb +28 -0
- data/lib/fog/openstack/requests/compute/detach_volume.rb +28 -0
- data/lib/fog/openstack/requests/compute/disable_service.rb +37 -0
- data/lib/fog/openstack/requests/compute/disable_service_log_reason.rb +38 -0
- data/lib/fog/openstack/requests/compute/disassociate_address.rb +25 -0
- data/lib/fog/openstack/requests/compute/enable_service.rb +38 -0
- data/lib/fog/openstack/requests/compute/evacuate_server.rb +26 -0
- data/lib/fog/openstack/requests/compute/get_address.rb +38 -0
- data/lib/fog/openstack/requests/compute/get_aggregate.rb +26 -0
- data/lib/fog/openstack/requests/compute/get_console_output.rb +24 -0
- data/lib/fog/openstack/requests/compute/get_flavor_details.rb +39 -0
- data/lib/fog/openstack/requests/compute/get_flavor_metadata.rb +27 -0
- data/lib/fog/openstack/requests/compute/get_host_details.rb +66 -0
- data/lib/fog/openstack/requests/compute/get_hypervisor_statistics.rb +39 -0
- data/lib/fog/openstack/requests/compute/get_image_details.rb +28 -0
- data/lib/fog/openstack/requests/compute/get_limits.rb +89 -0
- data/lib/fog/openstack/requests/compute/get_metadata.rb +24 -0
- data/lib/fog/openstack/requests/compute/get_quota.rb +26 -0
- data/lib/fog/openstack/requests/compute/get_quota_defaults.rb +26 -0
- data/lib/fog/openstack/requests/compute/get_security_group.rb +37 -0
- data/lib/fog/openstack/requests/compute/get_security_group_rule.rb +38 -0
- data/lib/fog/openstack/requests/compute/get_server_details.rb +28 -0
- data/lib/fog/openstack/requests/compute/get_server_password.rb +28 -0
- data/lib/fog/openstack/requests/compute/get_server_volumes.rb +27 -0
- data/lib/fog/openstack/requests/compute/get_snapshot_details.rb +29 -0
- data/lib/fog/openstack/requests/compute/get_usage.rb +51 -0
- data/lib/fog/openstack/requests/compute/get_vnc_console.rb +40 -0
- data/lib/fog/openstack/requests/compute/get_volume_details.rb +28 -0
- data/lib/fog/openstack/requests/compute/list_address_pools.rb +28 -0
- data/lib/fog/openstack/requests/compute/list_addresses.rb +28 -0
- data/lib/fog/openstack/requests/compute/list_aggregates.rb +36 -0
- data/lib/fog/openstack/requests/compute/list_all_addresses.rb +62 -0
- data/lib/fog/openstack/requests/compute/list_flavors.rb +35 -0
- data/lib/fog/openstack/requests/compute/list_flavors_detail.rb +35 -0
- data/lib/fog/openstack/requests/compute/list_hosts.rb +28 -0
- data/lib/fog/openstack/requests/compute/list_images.rb +29 -0
- data/lib/fog/openstack/requests/compute/list_images_detail.rb +36 -0
- data/lib/fog/openstack/requests/compute/list_key_pairs.rb +38 -0
- data/lib/fog/openstack/requests/compute/list_metadata.rb +24 -0
- data/lib/fog/openstack/requests/compute/list_private_addresses.rb +28 -0
- data/lib/fog/openstack/requests/compute/list_public_addresses.rb +28 -0
- data/lib/fog/openstack/requests/compute/list_security_groups.rb +69 -0
- data/lib/fog/openstack/requests/compute/list_servers.rb +36 -0
- data/lib/fog/openstack/requests/compute/list_servers_detail.rb +43 -0
- data/lib/fog/openstack/requests/compute/list_services.rb +66 -0
- data/lib/fog/openstack/requests/compute/list_snapshots.rb +40 -0
- data/lib/fog/openstack/requests/compute/list_snapshots_detail.rb +26 -0
- data/lib/fog/openstack/requests/compute/list_tenants.rb +45 -0
- data/lib/fog/openstack/requests/compute/list_tenants_with_flavor_access.rb +26 -0
- data/lib/fog/openstack/requests/compute/list_usages.rb +41 -0
- data/lib/fog/openstack/requests/compute/list_volumes.rb +39 -0
- data/lib/fog/openstack/requests/compute/list_volumes_detail.rb +25 -0
- data/lib/fog/openstack/requests/compute/list_zones.rb +33 -0
- data/lib/fog/openstack/requests/compute/list_zones_detailed.rb +55 -0
- data/lib/fog/openstack/requests/compute/live_migrate_server.rb +26 -0
- data/lib/fog/openstack/requests/compute/migrate_server.rb +20 -0
- data/lib/fog/openstack/requests/compute/pause_server.rb +24 -0
- data/lib/fog/openstack/requests/compute/reboot_server.rb +20 -0
- data/lib/fog/openstack/requests/compute/rebuild_server.rb +34 -0
- data/lib/fog/openstack/requests/compute/release_address.rb +29 -0
- data/lib/fog/openstack/requests/compute/remove_aggregate_host.rb +30 -0
- data/lib/fog/openstack/requests/compute/remove_fixed_ip.rb +29 -0
- data/lib/fog/openstack/requests/compute/remove_flavor_access.rb +31 -0
- data/lib/fog/openstack/requests/compute/remove_security_group.rb +20 -0
- data/lib/fog/openstack/requests/compute/rescue_server.rb +24 -0
- data/lib/fog/openstack/requests/compute/reset_server_state.rb +20 -0
- data/lib/fog/openstack/requests/compute/resize_server.rb +20 -0
- data/lib/fog/openstack/requests/compute/resume_server.rb +24 -0
- data/lib/fog/openstack/requests/compute/revert_resize_server.rb +26 -0
- data/lib/fog/openstack/requests/compute/server_action.rb +16 -0
- data/lib/fog/openstack/requests/compute/server_actions.rb +38 -0
- data/lib/fog/openstack/requests/compute/server_diagnostics.rb +25 -0
- data/lib/fog/openstack/requests/compute/set_metadata.rb +37 -0
- data/lib/fog/openstack/requests/compute/set_tenant.rb +19 -0
- data/lib/fog/openstack/requests/compute/shelve_offload_server.rb +24 -0
- data/lib/fog/openstack/requests/compute/shelve_server.rb +24 -0
- data/lib/fog/openstack/requests/compute/start_server.rb +24 -0
- data/lib/fog/openstack/requests/compute/stop_server.rb +24 -0
- data/lib/fog/openstack/requests/compute/suspend_server.rb +24 -0
- data/lib/fog/openstack/requests/compute/unpause_server.rb +24 -0
- data/lib/fog/openstack/requests/compute/unshelve_server.rb +24 -0
- data/lib/fog/openstack/requests/compute/update_aggregate.rb +37 -0
- data/lib/fog/openstack/requests/compute/update_aggregate_metadata.rb +30 -0
- data/lib/fog/openstack/requests/compute/update_meta.rb +38 -0
- data/lib/fog/openstack/requests/compute/update_metadata.rb +38 -0
- data/lib/fog/openstack/requests/compute/update_quota.rb +28 -0
- data/lib/fog/openstack/requests/compute/update_server.rb +31 -0
- data/lib/fog/openstack/requests/identity_v2/add_user_to_tenant.rb +36 -0
- data/lib/fog/openstack/requests/identity_v2/check_token.rb +22 -0
- data/lib/fog/openstack/requests/identity_v2/create_ec2_credential.rb +59 -0
- data/lib/fog/openstack/requests/identity_v2/create_role.rb +38 -0
- data/lib/fog/openstack/requests/identity_v2/create_tenant.rb +34 -0
- data/lib/fog/openstack/requests/identity_v2/create_user.rb +45 -0
- data/lib/fog/openstack/requests/identity_v2/create_user_role.rb +26 -0
- data/lib/fog/openstack/requests/identity_v2/delete_ec2_credential.rb +43 -0
- data/lib/fog/openstack/requests/identity_v2/delete_role.rb +30 -0
- data/lib/fog/openstack/requests/identity_v2/delete_tenant.rb +33 -0
- data/lib/fog/openstack/requests/identity_v2/delete_user.rb +30 -0
- data/lib/fog/openstack/requests/identity_v2/delete_user_role.rb +25 -0
- data/lib/fog/openstack/requests/identity_v2/get_ec2_credential.rb +50 -0
- data/lib/fog/openstack/requests/identity_v2/get_role.rb +30 -0
- data/lib/fog/openstack/requests/identity_v2/get_tenant.rb +33 -0
- data/lib/fog/openstack/requests/identity_v2/get_tenants_by_id.rb +20 -0
- data/lib/fog/openstack/requests/identity_v2/get_tenants_by_name.rb +20 -0
- data/lib/fog/openstack/requests/identity_v2/get_user_by_id.rb +34 -0
- data/lib/fog/openstack/requests/identity_v2/get_user_by_name.rb +29 -0
- data/lib/fog/openstack/requests/identity_v2/list_ec2_credentials.rb +61 -0
- data/lib/fog/openstack/requests/identity_v2/list_endpoints_for_token.rb +20 -0
- data/lib/fog/openstack/requests/identity_v2/list_roles.rb +34 -0
- data/lib/fog/openstack/requests/identity_v2/list_roles_for_user_on_tenant.rb +32 -0
- data/lib/fog/openstack/requests/identity_v2/list_tenants.rb +53 -0
- data/lib/fog/openstack/requests/identity_v2/list_user_global_roles.rb +20 -0
- data/lib/fog/openstack/requests/identity_v2/list_users.rb +47 -0
- data/lib/fog/openstack/requests/identity_v2/remove_user_from_tenant.rb +22 -0
- data/lib/fog/openstack/requests/identity_v2/set_tenant.rb +21 -0
- data/lib/fog/openstack/requests/identity_v2/update_tenant.rb +30 -0
- data/lib/fog/openstack/requests/identity_v2/update_user.rb +34 -0
- data/lib/fog/openstack/requests/identity_v2/validate_token.rb +22 -0
- data/lib/fog/openstack/requests/identity_v3/add_user_to_group.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/auth_domains.rb +24 -0
- data/lib/fog/openstack/requests/identity_v3/auth_projects.rb +24 -0
- data/lib/fog/openstack/requests/identity_v3/check_domain_group_role.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/check_domain_user_role.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/check_project_group_role.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/check_project_user_role.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/create_domain.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/create_endpoint.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/create_group.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/create_os_credential.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/create_policy.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/create_project.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/create_role.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/create_service.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/create_user.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/delete_domain.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/delete_endpoint.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/delete_group.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/delete_os_credential.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/delete_policy.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/delete_project.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/delete_role.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/delete_service.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/delete_user.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/get_domain.rb +23 -0
- data/lib/fog/openstack/requests/identity_v3/get_endpoint.rb +23 -0
- data/lib/fog/openstack/requests/identity_v3/get_group.rb +23 -0
- data/lib/fog/openstack/requests/identity_v3/get_os_credential.rb +23 -0
- data/lib/fog/openstack/requests/identity_v3/get_policy.rb +23 -0
- data/lib/fog/openstack/requests/identity_v3/get_project.rb +23 -0
- data/lib/fog/openstack/requests/identity_v3/get_role.rb +23 -0
- data/lib/fog/openstack/requests/identity_v3/get_service.rb +23 -0
- data/lib/fog/openstack/requests/identity_v3/get_user.rb +23 -0
- data/lib/fog/openstack/requests/identity_v3/grant_domain_group_role.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/grant_domain_user_role.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/grant_project_group_role.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/grant_project_user_role.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/group_user_check.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/list_domain_group_roles.rb +23 -0
- data/lib/fog/openstack/requests/identity_v3/list_domain_user_roles.rb +23 -0
- data/lib/fog/openstack/requests/identity_v3/list_domains.rb +24 -0
- data/lib/fog/openstack/requests/identity_v3/list_endpoints.rb +24 -0
- data/lib/fog/openstack/requests/identity_v3/list_group_users.rb +24 -0
- data/lib/fog/openstack/requests/identity_v3/list_groups.rb +32 -0
- data/lib/fog/openstack/requests/identity_v3/list_os_credentials.rb +24 -0
- data/lib/fog/openstack/requests/identity_v3/list_policies.rb +24 -0
- data/lib/fog/openstack/requests/identity_v3/list_project_group_roles.rb +23 -0
- data/lib/fog/openstack/requests/identity_v3/list_project_user_roles.rb +23 -0
- data/lib/fog/openstack/requests/identity_v3/list_projects.rb +31 -0
- data/lib/fog/openstack/requests/identity_v3/list_role_assignments.rb +39 -0
- data/lib/fog/openstack/requests/identity_v3/list_roles.rb +24 -0
- data/lib/fog/openstack/requests/identity_v3/list_services.rb +24 -0
- data/lib/fog/openstack/requests/identity_v3/list_user_groups.rb +23 -0
- data/lib/fog/openstack/requests/identity_v3/list_user_projects.rb +23 -0
- data/lib/fog/openstack/requests/identity_v3/list_users.rb +24 -0
- data/lib/fog/openstack/requests/identity_v3/remove_user_from_group.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/revoke_domain_group_role.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/revoke_domain_user_role.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/revoke_project_group_role.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/revoke_project_user_role.rb +20 -0
- data/lib/fog/openstack/requests/identity_v3/token_authenticate.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/token_check.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/token_revoke.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/token_validate.rb +22 -0
- data/lib/fog/openstack/requests/identity_v3/update_domain.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/update_endpoint.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/update_group.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/update_os_credential.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/update_policy.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/update_project.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/update_role.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/update_service.rb +21 -0
- data/lib/fog/openstack/requests/identity_v3/update_user.rb +21 -0
- data/lib/fog/openstack/requests/image_v1/add_member_to_image.rb +25 -0
- data/lib/fog/openstack/requests/image_v1/create_image.rb +78 -0
- data/lib/fog/openstack/requests/image_v1/delete_image.rb +25 -0
- data/lib/fog/openstack/requests/image_v1/get_image.rb +47 -0
- data/lib/fog/openstack/requests/image_v1/get_image_by_id.rb +34 -0
- data/lib/fog/openstack/requests/image_v1/get_image_members.rb +31 -0
- data/lib/fog/openstack/requests/image_v1/get_shared_images.rb +31 -0
- data/lib/fog/openstack/requests/image_v1/list_public_images.rb +35 -0
- data/lib/fog/openstack/requests/image_v1/list_public_images_detailed.rb +37 -0
- data/lib/fog/openstack/requests/image_v1/remove_member_from_image.rb +25 -0
- data/lib/fog/openstack/requests/image_v1/set_tenant.rb +21 -0
- data/lib/fog/openstack/requests/image_v1/update_image.rb +66 -0
- data/lib/fog/openstack/requests/image_v1/update_image_members.rb +39 -0
- data/lib/fog/openstack/requests/image_v2/add_member_to_image.rb +26 -0
- data/lib/fog/openstack/requests/image_v2/add_tag_to_image.rb +25 -0
- data/lib/fog/openstack/requests/image_v2/create_image.rb +54 -0
- data/lib/fog/openstack/requests/image_v2/deactivate_image.rb +25 -0
- data/lib/fog/openstack/requests/image_v2/delete_image.rb +25 -0
- data/lib/fog/openstack/requests/image_v2/download_image.rb +29 -0
- data/lib/fog/openstack/requests/image_v2/get_image.rb +47 -0
- data/lib/fog/openstack/requests/image_v2/get_image_by_id.rb +34 -0
- data/lib/fog/openstack/requests/image_v2/get_image_members.rb +31 -0
- data/lib/fog/openstack/requests/image_v2/get_member_details.rb +33 -0
- data/lib/fog/openstack/requests/image_v2/get_shared_images.rb +31 -0
- data/lib/fog/openstack/requests/image_v2/list_images.rb +35 -0
- data/lib/fog/openstack/requests/image_v2/reactivate_image.rb +25 -0
- data/lib/fog/openstack/requests/image_v2/remove_member_from_image.rb +25 -0
- data/lib/fog/openstack/requests/image_v2/remove_tag_from_image.rb +25 -0
- data/lib/fog/openstack/requests/image_v2/set_tenant.rb +21 -0
- data/lib/fog/openstack/requests/image_v2/update_image.rb +49 -0
- data/lib/fog/openstack/requests/image_v2/update_image_member.rb +34 -0
- data/lib/fog/openstack/requests/image_v2/upload_image.rb +30 -0
- data/lib/fog/openstack/requests/metering/get_resource.rb +28 -0
- data/lib/fog/openstack/requests/metering/get_samples.rb +50 -0
- data/lib/fog/openstack/requests/metering/get_statistics.rb +51 -0
- data/lib/fog/openstack/requests/metering/list_meters.rb +45 -0
- data/lib/fog/openstack/requests/metering/list_resources.rb +28 -0
- data/lib/fog/openstack/requests/network/add_router_interface.rb +54 -0
- data/lib/fog/openstack/requests/network/associate_floating_ip.rb +47 -0
- data/lib/fog/openstack/requests/network/associate_lb_health_monitor.rb +37 -0
- data/lib/fog/openstack/requests/network/create_floating_ip.rb +45 -0
- data/lib/fog/openstack/requests/network/create_lb_health_monitor.rb +54 -0
- data/lib/fog/openstack/requests/network/create_lb_member.rb +51 -0
- data/lib/fog/openstack/requests/network/create_lb_pool.rb +58 -0
- data/lib/fog/openstack/requests/network/create_lb_vip.rb +58 -0
- data/lib/fog/openstack/requests/network/create_network.rb +97 -0
- data/lib/fog/openstack/requests/network/create_port.rb +53 -0
- data/lib/fog/openstack/requests/network/create_router.rb +76 -0
- data/lib/fog/openstack/requests/network/create_security_group.rb +94 -0
- data/lib/fog/openstack/requests/network/create_security_group_rule.rb +79 -0
- data/lib/fog/openstack/requests/network/create_subnet.rb +54 -0
- data/lib/fog/openstack/requests/network/delete_floating_ip.rb +28 -0
- data/lib/fog/openstack/requests/network/delete_lb_health_monitor.rb +28 -0
- data/lib/fog/openstack/requests/network/delete_lb_member.rb +28 -0
- data/lib/fog/openstack/requests/network/delete_lb_pool.rb +28 -0
- data/lib/fog/openstack/requests/network/delete_lb_vip.rb +28 -0
- data/lib/fog/openstack/requests/network/delete_network.rb +28 -0
- data/lib/fog/openstack/requests/network/delete_port.rb +28 -0
- data/lib/fog/openstack/requests/network/delete_quota.rb +23 -0
- data/lib/fog/openstack/requests/network/delete_router.rb +28 -0
- data/lib/fog/openstack/requests/network/delete_security_group.rb +32 -0
- data/lib/fog/openstack/requests/network/delete_security_group_rule.rb +32 -0
- data/lib/fog/openstack/requests/network/delete_subnet.rb +28 -0
- data/lib/fog/openstack/requests/network/disassociate_floating_ip.rb +47 -0
- data/lib/fog/openstack/requests/network/disassociate_lb_health_monitor.rb +29 -0
- data/lib/fog/openstack/requests/network/get_floating_ip.rb +39 -0
- data/lib/fog/openstack/requests/network/get_lb_health_monitor.rb +28 -0
- data/lib/fog/openstack/requests/network/get_lb_member.rb +28 -0
- data/lib/fog/openstack/requests/network/get_lb_pool.rb +28 -0
- data/lib/fog/openstack/requests/network/get_lb_pool_stats.rb +33 -0
- data/lib/fog/openstack/requests/network/get_lb_vip.rb +28 -0
- data/lib/fog/openstack/requests/network/get_network.rb +40 -0
- data/lib/fog/openstack/requests/network/get_port.rb +51 -0
- data/lib/fog/openstack/requests/network/get_quota.rb +26 -0
- data/lib/fog/openstack/requests/network/get_quotas.rb +26 -0
- data/lib/fog/openstack/requests/network/get_router.rb +30 -0
- data/lib/fog/openstack/requests/network/get_security_group.rb +52 -0
- data/lib/fog/openstack/requests/network/get_security_group_rule.rb +47 -0
- data/lib/fog/openstack/requests/network/get_subnet.rb +47 -0
- data/lib/fog/openstack/requests/network/list_floating_ips.rb +25 -0
- data/lib/fog/openstack/requests/network/list_lb_health_monitors.rb +25 -0
- data/lib/fog/openstack/requests/network/list_lb_members.rb +25 -0
- data/lib/fog/openstack/requests/network/list_lb_pools.rb +25 -0
- data/lib/fog/openstack/requests/network/list_lb_vips.rb +25 -0
- data/lib/fog/openstack/requests/network/list_networks.rb +25 -0
- data/lib/fog/openstack/requests/network/list_ports.rb +25 -0
- data/lib/fog/openstack/requests/network/list_routers.rb +25 -0
- data/lib/fog/openstack/requests/network/list_security_group_rules.rb +48 -0
- data/lib/fog/openstack/requests/network/list_security_groups.rb +53 -0
- data/lib/fog/openstack/requests/network/list_subnets.rb +25 -0
- data/lib/fog/openstack/requests/network/remove_router_interface.rb +34 -0
- data/lib/fog/openstack/requests/network/set_tenant.rb +20 -0
- data/lib/fog/openstack/requests/network/update_lb_health_monitor.rb +43 -0
- data/lib/fog/openstack/requests/network/update_lb_member.rb +39 -0
- data/lib/fog/openstack/requests/network/update_lb_pool.rb +40 -0
- data/lib/fog/openstack/requests/network/update_lb_vip.rb +42 -0
- data/lib/fog/openstack/requests/network/update_network.rb +39 -0
- data/lib/fog/openstack/requests/network/update_port.rb +43 -0
- data/lib/fog/openstack/requests/network/update_quota.rb +27 -0
- data/lib/fog/openstack/requests/network/update_router.rb +69 -0
- data/lib/fog/openstack/requests/network/update_subnet.rb +43 -0
- data/lib/fog/openstack/requests/orchestration/abandon_stack.rb +15 -0
- data/lib/fog/openstack/requests/orchestration/build_info.rb +15 -0
- data/lib/fog/openstack/requests/orchestration/create_stack.rb +75 -0
- data/lib/fog/openstack/requests/orchestration/delete_stack.rb +58 -0
- data/lib/fog/openstack/requests/orchestration/get_stack_template.rb +20 -0
- data/lib/fog/openstack/requests/orchestration/list_events.rb +46 -0
- data/lib/fog/openstack/requests/orchestration/list_resource_events.rb +28 -0
- data/lib/fog/openstack/requests/orchestration/list_resource_types.rb +27 -0
- data/lib/fog/openstack/requests/orchestration/list_resources.rb +46 -0
- data/lib/fog/openstack/requests/orchestration/list_stack_data.rb +27 -0
- data/lib/fog/openstack/requests/orchestration/list_stack_data_detailed.rb +49 -0
- data/lib/fog/openstack/requests/orchestration/list_stack_events.rb +27 -0
- data/lib/fog/openstack/requests/orchestration/patch_stack.rb +37 -0
- data/lib/fog/openstack/requests/orchestration/preview_stack.rb +16 -0
- data/lib/fog/openstack/requests/orchestration/show_event_details.rb +26 -0
- data/lib/fog/openstack/requests/orchestration/show_resource_data.rb +26 -0
- data/lib/fog/openstack/requests/orchestration/show_resource_metadata.rb +26 -0
- data/lib/fog/openstack/requests/orchestration/show_resource_schema.rb +15 -0
- data/lib/fog/openstack/requests/orchestration/show_resource_template.rb +20 -0
- data/lib/fog/openstack/requests/orchestration/show_stack_details.rb +26 -0
- data/lib/fog/openstack/requests/orchestration/update_stack.rb +66 -0
- data/lib/fog/openstack/requests/orchestration/validate_template.rb +16 -0
- data/lib/fog/openstack/requests/planning/add_role_to_plan.rb +40 -0
- data/lib/fog/openstack/requests/planning/create_plan.rb +33 -0
- data/lib/fog/openstack/requests/planning/delete_plan.rb +23 -0
- data/lib/fog/openstack/requests/planning/get_plan.rb +58 -0
- data/lib/fog/openstack/requests/planning/get_plan_templates.rb +28 -0
- data/lib/fog/openstack/requests/planning/list_plans.rb +61 -0
- data/lib/fog/openstack/requests/planning/list_roles.rb +32 -0
- data/lib/fog/openstack/requests/planning/patch_plan.rb +51 -0
- data/lib/fog/openstack/requests/planning/remove_role_from_plan.rb +32 -0
- data/lib/fog/openstack/requests/storage/copy_object.rb +25 -0
- data/lib/fog/openstack/requests/storage/delete_container.rb +20 -0
- data/lib/fog/openstack/requests/storage/delete_multiple_objects.rb +65 -0
- data/lib/fog/openstack/requests/storage/delete_object.rb +21 -0
- data/lib/fog/openstack/requests/storage/delete_static_large_object.rb +41 -0
- data/lib/fog/openstack/requests/storage/get_container.rb +42 -0
- data/lib/fog/openstack/requests/storage/get_containers.rb +31 -0
- data/lib/fog/openstack/requests/storage/get_object.rb +27 -0
- data/lib/fog/openstack/requests/storage/get_object_http_url.rb +21 -0
- data/lib/fog/openstack/requests/storage/get_object_https_url.rb +81 -0
- data/lib/fog/openstack/requests/storage/head_container.rb +26 -0
- data/lib/fog/openstack/requests/storage/head_containers.rb +23 -0
- data/lib/fog/openstack/requests/storage/head_object.rb +21 -0
- data/lib/fog/openstack/requests/storage/post_set_meta_temp_url_key.rb +33 -0
- data/lib/fog/openstack/requests/storage/public_url.rb +28 -0
- data/lib/fog/openstack/requests/storage/put_container.rb +24 -0
- data/lib/fog/openstack/requests/storage/put_dynamic_obj_manifest.rb +41 -0
- data/lib/fog/openstack/requests/storage/put_object.rb +41 -0
- data/lib/fog/openstack/requests/storage/put_object_manifest.rb +14 -0
- data/lib/fog/openstack/requests/storage/put_static_obj_manifest.rb +55 -0
- data/lib/fog/openstack/requests/volume/accept_transfer.rb +22 -0
- data/lib/fog/openstack/requests/volume/create_transfer.rb +25 -0
- data/lib/fog/openstack/requests/volume/create_volume.rb +22 -0
- data/lib/fog/openstack/requests/volume/create_volume_snapshot.rb +26 -0
- data/lib/fog/openstack/requests/volume/create_volume_type.rb +41 -0
- data/lib/fog/openstack/requests/volume/delete_snapshot.rb +23 -0
- data/lib/fog/openstack/requests/volume/delete_transfer.rb +15 -0
- data/lib/fog/openstack/requests/volume/delete_volume.rb +23 -0
- data/lib/fog/openstack/requests/volume/delete_volume_type.rb +23 -0
- data/lib/fog/openstack/requests/volume/extend_volume.rb +25 -0
- data/lib/fog/openstack/requests/volume/get_quota.rb +26 -0
- data/lib/fog/openstack/requests/volume/get_quota_defaults.rb +26 -0
- data/lib/fog/openstack/requests/volume/get_quota_usage.rb +44 -0
- data/lib/fog/openstack/requests/volume/get_snapshot_details.rb +15 -0
- data/lib/fog/openstack/requests/volume/get_transfer_details.rb +17 -0
- data/lib/fog/openstack/requests/volume/get_volume_details.rb +16 -0
- data/lib/fog/openstack/requests/volume/get_volume_type_details.rb +32 -0
- data/lib/fog/openstack/requests/volume/list_snapshots.rb +41 -0
- data/lib/fog/openstack/requests/volume/list_snapshots_detailed.rb +27 -0
- data/lib/fog/openstack/requests/volume/list_transfers.rb +18 -0
- data/lib/fog/openstack/requests/volume/list_transfers_detailed.rb +18 -0
- data/lib/fog/openstack/requests/volume/list_volume_types.rb +41 -0
- data/lib/fog/openstack/requests/volume/list_volumes.rb +30 -0
- data/lib/fog/openstack/requests/volume/list_volumes_detailed.rb +16 -0
- data/lib/fog/openstack/requests/volume/list_zones.rb +32 -0
- data/lib/fog/openstack/requests/volume/set_tenant.rb +19 -0
- data/lib/fog/openstack/requests/volume/update_quota.rb +28 -0
- data/lib/fog/openstack/requests/volume/update_volume_type.rb +41 -0
- data/lib/fog/openstack/requests/volume_v1/accept_transfer.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/create_transfer.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/create_volume.rb +49 -0
- data/lib/fog/openstack/requests/volume_v1/create_volume_snapshot.rb +44 -0
- data/lib/fog/openstack/requests/volume_v1/create_volume_type.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/delete_snapshot.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/delete_transfer.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/delete_volume.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/delete_volume_type.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/extend_volume.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/get_quota.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/get_quota_defaults.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/get_quota_usage.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/get_snapshot_details.rb +32 -0
- data/lib/fog/openstack/requests/volume_v1/get_transfer_details.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/get_volume_details.rb +35 -0
- data/lib/fog/openstack/requests/volume_v1/get_volume_type_details.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/list_snapshots.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/list_snapshots_detailed.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/list_transfers.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/list_transfers_detailed.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/list_volume_types.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/list_volumes.rb +46 -0
- data/lib/fog/openstack/requests/volume_v1/list_volumes_detailed.rb +46 -0
- data/lib/fog/openstack/requests/volume_v1/list_zones.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/real.rb +11 -0
- data/lib/fog/openstack/requests/volume_v1/real_mock.rb +14 -0
- data/lib/fog/openstack/requests/volume_v1/set_tenant.rb +2 -0
- data/lib/fog/openstack/requests/volume_v1/update_quota.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/accept_transfer.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/create_transfer.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/create_volume.rb +49 -0
- data/lib/fog/openstack/requests/volume_v2/create_volume_snapshot.rb +43 -0
- data/lib/fog/openstack/requests/volume_v2/create_volume_type.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/delete_snapshot.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/delete_transfer.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/delete_volume.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/delete_volume_type.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/extend_volume.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/get_quota.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/get_quota_defaults.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/get_quota_usage.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/get_snapshot_details.rb +32 -0
- data/lib/fog/openstack/requests/volume_v2/get_transfer_details.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/get_volume_details.rb +35 -0
- data/lib/fog/openstack/requests/volume_v2/get_volume_type_details.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/list_snapshots.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/list_snapshots_detailed.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/list_transfers.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/list_transfers_detailed.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/list_volume_types.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/list_volumes.rb +46 -0
- data/lib/fog/openstack/requests/volume_v2/list_volumes_detailed.rb +46 -0
- data/lib/fog/openstack/requests/volume_v2/list_zones.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/real.rb +11 -0
- data/lib/fog/openstack/requests/volume_v2/real_mock.rb +14 -0
- data/lib/fog/openstack/requests/volume_v2/set_tenant.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/update_quota.rb +2 -0
- data/lib/fog/openstack/requests/volume_v2/update_volume_type.rb +2 -0
- data/lib/fog/openstack/storage.rb +181 -0
- data/lib/fog/openstack/version.rb +5 -0
- data/lib/fog/openstack/volume.rb +31 -0
- data/lib/fog/openstack/volume_v1.rb +163 -0
- data/lib/fog/openstack/volume_v2.rb +164 -0
- data/tests/helper.rb +21 -0
- data/tests/helpers/collection_helper.rb +97 -0
- data/tests/helpers/compute/flavors_helper.rb +32 -0
- data/tests/helpers/compute/server_helper.rb +25 -0
- data/tests/helpers/compute/servers_helper.rb +10 -0
- data/tests/helpers/formats_helper.rb +98 -0
- data/tests/helpers/formats_helper_tests.rb +110 -0
- data/tests/helpers/mock_helper.rb +17 -0
- data/tests/helpers/model_helper.rb +31 -0
- data/tests/helpers/responds_to_helper.rb +11 -0
- data/tests/helpers/schema_validator_tests.rb +107 -0
- data/tests/helpers/succeeds_helper.rb +9 -0
- data/tests/openstack/authenticate_tests.rb +200 -0
- data/tests/openstack/models/compute/images_tests.rb +13 -0
- data/tests/openstack/models/compute/security_group_tests.rb +54 -0
- data/tests/openstack/models/compute/server_tests.rb +220 -0
- data/tests/openstack/models/identity/ec2_credential_tests.rb +41 -0
- data/tests/openstack/models/identity/ec2_credentials_tests.rb +58 -0
- data/tests/openstack/models/identity/role_tests.rb +26 -0
- data/tests/openstack/models/identity/roles_tests.rb +20 -0
- data/tests/openstack/models/identity/tenant_tests.rb +30 -0
- data/tests/openstack/models/identity/tenants_tests.rb +26 -0
- data/tests/openstack/models/identity/user_tests.rb +46 -0
- data/tests/openstack/models/identity/users_tests.rb +42 -0
- data/tests/openstack/models/image/image_tests.rb +36 -0
- data/tests/openstack/models/image/images_tests.rb +19 -0
- data/tests/openstack/models/network/floating_ip_tests.rb +22 -0
- data/tests/openstack/models/network/floating_ips_tests.rb +19 -0
- data/tests/openstack/models/network/lb_health_monitor_tests.rb +52 -0
- data/tests/openstack/models/network/lb_health_monitors_tests.rb +21 -0
- data/tests/openstack/models/network/lb_member_tests.rb +28 -0
- data/tests/openstack/models/network/lb_members_tests.rb +21 -0
- data/tests/openstack/models/network/lb_pool_tests.rb +53 -0
- data/tests/openstack/models/network/lb_pools_tests.rb +20 -0
- data/tests/openstack/models/network/lb_vip_tests.rb +39 -0
- data/tests/openstack/models/network/lb_vips_tests.rb +21 -0
- data/tests/openstack/models/network/network_tests.rb +61 -0
- data/tests/openstack/models/network/networks_tests.rb +21 -0
- data/tests/openstack/models/network/port_tests.rb +28 -0
- data/tests/openstack/models/network/ports_tests.rb +25 -0
- data/tests/openstack/models/network/router_tests.rb +39 -0
- data/tests/openstack/models/network/routers_tests.rb +21 -0
- data/tests/openstack/models/network/security_group_rule_tests.rb +27 -0
- data/tests/openstack/models/network/security_group_rules_tests.rb +25 -0
- data/tests/openstack/models/network/security_group_tests.rb +17 -0
- data/tests/openstack/models/network/security_groups_tests.rb +16 -0
- data/tests/openstack/models/network/subnet_tests.rb +30 -0
- data/tests/openstack/models/network/subnets_tests.rb +27 -0
- data/tests/openstack/models/planning/.gitkeep +0 -0
- data/tests/openstack/models/planning/plan_tests.rb +51 -0
- data/tests/openstack/models/planning/plans_tests.rb +18 -0
- data/tests/openstack/models/planning/role_tests.rb +14 -0
- data/tests/openstack/models/storage/file_tests.rb +251 -0
- data/tests/openstack/requests/baremetal/chassis_tests.rb +48 -0
- data/tests/openstack/requests/baremetal/driver_tests.rb +40 -0
- data/tests/openstack/requests/baremetal/node_tests.rb +83 -0
- data/tests/openstack/requests/baremetal/port_tests.rb +56 -0
- data/tests/openstack/requests/compute/address_tests.rb +58 -0
- data/tests/openstack/requests/compute/aggregate_tests.rb +59 -0
- data/tests/openstack/requests/compute/availability_zone_tests.rb +18 -0
- data/tests/openstack/requests/compute/flavor_tests.rb +95 -0
- data/tests/openstack/requests/compute/helper.rb +41 -0
- data/tests/openstack/requests/compute/image_tests.rb +58 -0
- data/tests/openstack/requests/compute/keypair_tests.rb +30 -0
- data/tests/openstack/requests/compute/limit_tests.rb +59 -0
- data/tests/openstack/requests/compute/quota_tests.rb +60 -0
- data/tests/openstack/requests/compute/security_group_tests.rb +61 -0
- data/tests/openstack/requests/compute/server_tests.rb +289 -0
- data/tests/openstack/requests/compute/service_tests.rb +33 -0
- data/tests/openstack/requests/compute/tenant_tests.rb +19 -0
- data/tests/openstack/requests/compute/volume_tests.rb +38 -0
- data/tests/openstack/requests/identity/ec2_credentials_tests.rb +44 -0
- data/tests/openstack/requests/identity/helper.rb +13 -0
- data/tests/openstack/requests/identity/role_tests.rb +45 -0
- data/tests/openstack/requests/identity/tenant_tests.rb +56 -0
- data/tests/openstack/requests/identity/user_tests.rb +41 -0
- data/tests/openstack/requests/image/image_tests.rb +134 -0
- data/tests/openstack/requests/metering/meter_tests.rb +52 -0
- data/tests/openstack/requests/metering/resource_tests.rb +19 -0
- data/tests/openstack/requests/network/lb_health_monitor_tests.rb +93 -0
- data/tests/openstack/requests/network/lb_member_tests.rb +60 -0
- data/tests/openstack/requests/network/lb_pool_tests.rb +80 -0
- data/tests/openstack/requests/network/lb_vip_tests.rb +71 -0
- data/tests/openstack/requests/network/network_tests.rb +107 -0
- data/tests/openstack/requests/network/port_tests.rb +66 -0
- data/tests/openstack/requests/network/quota_tests.rb +65 -0
- data/tests/openstack/requests/network/router_tests.rb +73 -0
- data/tests/openstack/requests/network/security_group_rule_tests.rb +58 -0
- data/tests/openstack/requests/network/security_group_tests.rb +43 -0
- data/tests/openstack/requests/network/subnet_tests.rb +66 -0
- data/tests/openstack/requests/orchestration/stack_tests.rb +64 -0
- data/tests/openstack/requests/planning/.gitkeep +0 -0
- data/tests/openstack/requests/planning/plan_tests.rb +65 -0
- data/tests/openstack/requests/planning/role_tests.rb +16 -0
- data/tests/openstack/requests/storage/container_tests.rb +64 -0
- data/tests/openstack/requests/storage/large_object_tests.rb +372 -0
- data/tests/openstack/requests/storage/object_tests.rb +208 -0
- data/tests/openstack/requests/volume/availability_zone_tests.rb +13 -0
- data/tests/openstack/requests/volume/quota_tests.rb +50 -0
- data/tests/openstack/requests/volume/volume_type_tests.rb +32 -0
- data/tests/openstack/storage_tests.rb +18 -0
- data/tests/openstack/version_tests.rb +55 -0
- data/tests/openstack/volume_tests.rb +18 -0
- metadata +967 -0
@@ -0,0 +1,47 @@
|
|
1
|
+
# 1.10.1 2013/04/04
|
2
|
+
|
3
|
+
## Storage
|
4
|
+
|
5
|
+
* Added storage (Swift) example to set account quotas:
|
6
|
+
|
7
|
+
https://github.com/fog/fog/blob/master/lib/fog/openstack/examples/storage/set-account-quota.rb
|
8
|
+
|
9
|
+
* Added account impersonation to the storage service
|
10
|
+
|
11
|
+
Now it's possible to use an admin account with a reseller
|
12
|
+
role to impersonate other accounts and set account metadata
|
13
|
+
headers. See the account quotas example included in this release
|
14
|
+
|
15
|
+
## Network
|
16
|
+
|
17
|
+
* create_network request updated
|
18
|
+
|
19
|
+
Implements provider extensions when creating networks.
|
20
|
+
|
21
|
+
See http://docs.openstack.org/trunk/openstack-network/admin/content/provider_attributes.html
|
22
|
+
|
23
|
+
* Network Router support (Quantum)
|
24
|
+
|
25
|
+
Added router model/collection and related requests.
|
26
|
+
|
27
|
+
* New network service example
|
28
|
+
|
29
|
+
See https://github.com/fog/fog/blob/master/lib/fog/openstack/examples/network/network_subnets_routers.rb
|
30
|
+
|
31
|
+
* :openstack_endpoint_type parameter was added to the network service
|
32
|
+
|
33
|
+
## Image
|
34
|
+
|
35
|
+
* Added basic image service example (Glance)
|
36
|
+
|
37
|
+
Download CirrOS 0.3.0 image from launchpad (~6.5MB) to /tmp
|
38
|
+
and upload it to Glance.
|
39
|
+
|
40
|
+
See https://github.com/fog/fog/blob/master/lib/fog/openstack/examples/image/upload-test-image.rb
|
41
|
+
|
42
|
+
* Check for glance version (fog only supports v1)
|
43
|
+
|
44
|
+
## Compute
|
45
|
+
|
46
|
+
* create_server and the Server model where updated to allow booting a VM
|
47
|
+
with NICs (net_id, port_id, fixed_ip).
|
@@ -0,0 +1,308 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Baremetal
|
5
|
+
class OpenStack < Fog::Service
|
6
|
+
SUPPORTED_VERSIONS = /(.)*/
|
7
|
+
|
8
|
+
requires :openstack_auth_url
|
9
|
+
recognizes :openstack_auth_token, :openstack_management_url,
|
10
|
+
:persistent, :openstack_service_type, :openstack_service_name,
|
11
|
+
:openstack_tenant, :openstack_tenant_id,
|
12
|
+
:openstack_api_key, :openstack_username, :openstack_identity_endpoint,
|
13
|
+
:current_user, :current_tenant, :openstack_region,
|
14
|
+
:openstack_endpoint_type,
|
15
|
+
:openstack_project_name, :openstack_project_id,
|
16
|
+
:openstack_project_domain, :openstack_user_domain, :openstack_domain_name,
|
17
|
+
:openstack_project_domain_id, :openstack_user_domain_id, :openstack_domain_id
|
18
|
+
|
19
|
+
## MODELS
|
20
|
+
#
|
21
|
+
model_path 'fog/openstack/models/baremetal'
|
22
|
+
model :chassis
|
23
|
+
collection :chassis_collection
|
24
|
+
model :driver
|
25
|
+
collection :drivers
|
26
|
+
model :node
|
27
|
+
collection :nodes
|
28
|
+
model :port
|
29
|
+
collection :ports
|
30
|
+
|
31
|
+
## REQUESTS
|
32
|
+
#
|
33
|
+
request_path 'fog/openstack/requests/baremetal'
|
34
|
+
|
35
|
+
# Node requests
|
36
|
+
request :create_node
|
37
|
+
request :delete_node
|
38
|
+
request :get_node
|
39
|
+
request :list_nodes
|
40
|
+
request :list_nodes_detailed
|
41
|
+
request :patch_node
|
42
|
+
request :set_node_power_state
|
43
|
+
request :set_node_provision_state
|
44
|
+
request :set_node_maintenance
|
45
|
+
request :unset_node_maintenance
|
46
|
+
|
47
|
+
# Chassis requests
|
48
|
+
request :create_chassis
|
49
|
+
request :delete_chassis
|
50
|
+
request :get_chassis
|
51
|
+
request :list_chassis
|
52
|
+
request :list_chassis_detailed
|
53
|
+
request :patch_chassis
|
54
|
+
|
55
|
+
# Driver requests
|
56
|
+
request :get_driver
|
57
|
+
request :get_driver_properties
|
58
|
+
request :list_drivers
|
59
|
+
|
60
|
+
# Port requests
|
61
|
+
request :create_port
|
62
|
+
request :delete_port
|
63
|
+
request :get_port
|
64
|
+
request :list_ports
|
65
|
+
request :list_ports_detailed
|
66
|
+
request :patch_port
|
67
|
+
|
68
|
+
## TODO not implemented API requests:
|
69
|
+
## Chassis
|
70
|
+
# request :list_chassis_nodes
|
71
|
+
# request :list_chassis_nodes_details
|
72
|
+
|
73
|
+
## Node requests
|
74
|
+
# request :validate_node
|
75
|
+
# request :get_boot_device
|
76
|
+
# request :set_boot_device
|
77
|
+
# request :list_supported_boot_devices
|
78
|
+
# request :list_node_states
|
79
|
+
# request :get_console_info
|
80
|
+
# request :change_console_state
|
81
|
+
# request :get_vendor_passthru_methods
|
82
|
+
|
83
|
+
## Driver requests
|
84
|
+
# request :get_vendor_passthru_methods
|
85
|
+
|
86
|
+
class Mock
|
87
|
+
def self.data
|
88
|
+
@data ||= Hash.new do |hash, key|
|
89
|
+
chassis_uuid = Fog::UUID.uuid
|
90
|
+
instance_uuid = Fog::UUID.uuid
|
91
|
+
node_uuid = Fog::UUID.uuid
|
92
|
+
|
93
|
+
hash[key] = {
|
94
|
+
:chassis_collection => [
|
95
|
+
{
|
96
|
+
"created_at" => "2000-01-01T12:00:00",
|
97
|
+
"description" => "Sample chassis",
|
98
|
+
"extra" => {},
|
99
|
+
"links" => [
|
100
|
+
{
|
101
|
+
"href" => "http://localhost:6385/v1/chassis/eaaca217-e7d8-47b4-bb41-3f99f20eed89",
|
102
|
+
"rel" => "self"
|
103
|
+
},
|
104
|
+
{
|
105
|
+
"href" => "http://localhost:6385/chassis/eaaca217-e7d8-47b4-bb41-3f99f20eed89",
|
106
|
+
"rel" => "bookmark"
|
107
|
+
}
|
108
|
+
],
|
109
|
+
"nodes" => [
|
110
|
+
{
|
111
|
+
"href" => "http://localhost:6385/v1/chassis/eaaca217-e7d8-47b4-bb41-3f99f20eed89/nodes",
|
112
|
+
"rel" => "self"
|
113
|
+
},
|
114
|
+
{
|
115
|
+
"href" => "http://localhost:6385/chassis/eaaca217-e7d8-47b4-bb41-3f99f20eed89/nodes",
|
116
|
+
"rel" => "bookmark"
|
117
|
+
}
|
118
|
+
],
|
119
|
+
"updated_at" => "2000-01-01T12:00:00",
|
120
|
+
"uuid" => chassis_uuid
|
121
|
+
}
|
122
|
+
],
|
123
|
+
:drivers => [
|
124
|
+
{
|
125
|
+
"hosts" => [
|
126
|
+
"fake-host"
|
127
|
+
],
|
128
|
+
"name" => "sample-driver"
|
129
|
+
}
|
130
|
+
],
|
131
|
+
:nodes => [{
|
132
|
+
"chassis_uuid" => chassis_uuid,
|
133
|
+
"console_enabled" => false,
|
134
|
+
"created_at" => "2000-01-01T12:00:00",
|
135
|
+
"driver" => "sample-driver",
|
136
|
+
"driver_info" => {},
|
137
|
+
"extra" => {},
|
138
|
+
"instance_info" => {},
|
139
|
+
"instance_uuid" => instance_uuid,
|
140
|
+
"last_error" => nil,
|
141
|
+
"links" => [
|
142
|
+
{
|
143
|
+
"href" => "http://localhost:6385/v1/nodes/1be26c0b-03f2-4d2e-ae87-c02d7f33c123",
|
144
|
+
"rel" => "self"
|
145
|
+
},
|
146
|
+
{
|
147
|
+
"href" => "http://localhost:6385/nodes/1be26c0b-03f2-4d2e-ae87-c02d7f33c123",
|
148
|
+
"rel" => "bookmark"
|
149
|
+
}
|
150
|
+
],
|
151
|
+
"maintenance" => false,
|
152
|
+
"maintenance_reason" => nil,
|
153
|
+
"ports" => [
|
154
|
+
{
|
155
|
+
"href" => "http://localhost:6385/v1/nodes/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/ports",
|
156
|
+
"rel" => "self"
|
157
|
+
},
|
158
|
+
{
|
159
|
+
"href" => "http://localhost:6385/nodes/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/ports",
|
160
|
+
"rel" => "bookmark"
|
161
|
+
}
|
162
|
+
],
|
163
|
+
"power_state" => "power on",
|
164
|
+
"properties" => {
|
165
|
+
"cpus" => "1",
|
166
|
+
"local_gb" => "10",
|
167
|
+
"memory_mb" => "1024"
|
168
|
+
},
|
169
|
+
"provision_state" => "active",
|
170
|
+
"provision_updated_at" => "2000-01-01T12:00:00",
|
171
|
+
"reservation" => nil,
|
172
|
+
"target_power_state" => nil,
|
173
|
+
"target_provision_state" => nil,
|
174
|
+
"updated_at" => "2000-01-01T12:00:00",
|
175
|
+
"uuid" => node_uuid
|
176
|
+
}],
|
177
|
+
:ports => [{
|
178
|
+
"address" => "fe:54:00:77:07:d9",
|
179
|
+
"created_at" => "2014-12-23T19:35:30.734116",
|
180
|
+
"extra" => {
|
181
|
+
"foo" => "bar"
|
182
|
+
},
|
183
|
+
"links" => [
|
184
|
+
{
|
185
|
+
"href" => "http://localhost:6385/v1/ports/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
|
186
|
+
"rel" => "self"
|
187
|
+
},
|
188
|
+
{
|
189
|
+
"href" => "http://localhost:6385/ports/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
|
190
|
+
"rel" => "bookmark"
|
191
|
+
}
|
192
|
+
],
|
193
|
+
"node_uuid" => "7ae81bb3-dec3-4289-8d6c-da80bd8001ae",
|
194
|
+
"updated_at" => "2014-12-23T19:35:30.734119",
|
195
|
+
"uuid" => "27e3153e-d5bf-4b7e-b517-fb518e17f34c"
|
196
|
+
}]
|
197
|
+
}
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
def self.reset
|
202
|
+
@data = nil
|
203
|
+
end
|
204
|
+
|
205
|
+
def initialize(options={})
|
206
|
+
@openstack_username = options[:openstack_username]
|
207
|
+
@openstack_tenant = options[:openstack_tenant]
|
208
|
+
@openstack_auth_uri = URI.parse(options[:openstack_auth_url])
|
209
|
+
|
210
|
+
@auth_token = Fog::Mock.random_base64(64)
|
211
|
+
@auth_token_expiration = (Time.now.utc + 86400).iso8601
|
212
|
+
|
213
|
+
management_url = URI.parse(options[:openstack_auth_url])
|
214
|
+
management_url.port = 9292
|
215
|
+
management_url.path = '/v1'
|
216
|
+
@openstack_management_url = management_url.to_s
|
217
|
+
|
218
|
+
@data ||= { :users => {} }
|
219
|
+
unless @data[:users].find {|u| u['name'] == options[:openstack_username]}
|
220
|
+
id = Fog::Mock.random_numbers(6).to_s
|
221
|
+
@data[:users][id] = {
|
222
|
+
'id' => id,
|
223
|
+
'name' => options[:openstack_username],
|
224
|
+
'email' => "#{options[:openstack_username]}@mock.com",
|
225
|
+
'tenantId' => Fog::Mock.random_numbers(6).to_s,
|
226
|
+
'enabled' => true
|
227
|
+
}
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
def data
|
232
|
+
self.class.data[@openstack_username]
|
233
|
+
end
|
234
|
+
|
235
|
+
def reset_data
|
236
|
+
self.class.data.delete(@openstack_username)
|
237
|
+
end
|
238
|
+
|
239
|
+
def credentials
|
240
|
+
{ :provider => 'openstack',
|
241
|
+
:openstack_auth_url => @openstack_auth_uri.to_s,
|
242
|
+
:openstack_auth_token => @auth_token,
|
243
|
+
:openstack_region => @openstack_region,
|
244
|
+
:openstack_management_url => @openstack_management_url }
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
class Real
|
249
|
+
include Fog::OpenStack::Core
|
250
|
+
|
251
|
+
def initialize(options={})
|
252
|
+
initialize_identity options
|
253
|
+
|
254
|
+
@openstack_service_type = options[:openstack_service_type] || ['baremetal']
|
255
|
+
@openstack_service_name = options[:openstack_service_name]
|
256
|
+
|
257
|
+
@connection_options = options[:connection_options] || {}
|
258
|
+
|
259
|
+
authenticate
|
260
|
+
|
261
|
+
unless @path.match(SUPPORTED_VERSIONS)
|
262
|
+
@path = "/" + Fog::OpenStack.get_supported_version(SUPPORTED_VERSIONS,
|
263
|
+
@openstack_management_uri,
|
264
|
+
@auth_token,
|
265
|
+
@connection_options)
|
266
|
+
end
|
267
|
+
|
268
|
+
@persistent = options[:persistent] || false
|
269
|
+
@connection = Fog::Core::Connection.new("#{@scheme}://#{@host}:#{@port}", @persistent, @connection_options)
|
270
|
+
end
|
271
|
+
|
272
|
+
def request(params)
|
273
|
+
begin
|
274
|
+
response = @connection.request(params.merge({
|
275
|
+
:headers => {
|
276
|
+
'Content-Type' => 'application/json',
|
277
|
+
'X-Auth-Token' => @auth_token
|
278
|
+
}.merge!(params[:headers] || {}),
|
279
|
+
:path => "#{@path}/#{params[:path]}"#,
|
280
|
+
}))
|
281
|
+
rescue Excon::Errors::Unauthorized => error
|
282
|
+
if error.response.body != 'Bad username or password' # token expiration
|
283
|
+
@openstack_must_reauthenticate = true
|
284
|
+
authenticate
|
285
|
+
retry
|
286
|
+
else # bad credentials
|
287
|
+
raise error
|
288
|
+
end
|
289
|
+
rescue Excon::Errors::HTTPStatusError => error
|
290
|
+
raise case error
|
291
|
+
when Excon::Errors::NotFound
|
292
|
+
Fog::Compute::OpenStack::NotFound.slurp(error)
|
293
|
+
else
|
294
|
+
error
|
295
|
+
end
|
296
|
+
end
|
297
|
+
unless response.body.empty?
|
298
|
+
response.body = Fog::JSON.decode(response.body)
|
299
|
+
end
|
300
|
+
response
|
301
|
+
end
|
302
|
+
|
303
|
+
private
|
304
|
+
|
305
|
+
end
|
306
|
+
end
|
307
|
+
end
|
308
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module OpenStack
|
5
|
+
module Common
|
6
|
+
attr_reader :unscoped_token
|
7
|
+
|
8
|
+
include Fog::OpenStack::Core
|
9
|
+
|
10
|
+
def request(params)
|
11
|
+
retried = false
|
12
|
+
begin
|
13
|
+
std_headers = {
|
14
|
+
'Content-Type' => 'application/json',
|
15
|
+
'Accept' => 'application/json',
|
16
|
+
'X-Auth-Token' => @auth_token
|
17
|
+
}
|
18
|
+
param_headers = params.fetch(:headers, {})
|
19
|
+
|
20
|
+
response = @connection.request(params.merge({
|
21
|
+
:headers => std_headers.merge(param_headers),
|
22
|
+
:path => "#{@path}/#{params[:path]}"
|
23
|
+
}))
|
24
|
+
rescue Excon::Errors::Unauthorized => error
|
25
|
+
raise if retried
|
26
|
+
retried = true
|
27
|
+
|
28
|
+
@openstack_must_reauthenticate = true
|
29
|
+
authenticate
|
30
|
+
retry
|
31
|
+
rescue Excon::Errors::HTTPStatusError => error
|
32
|
+
raise case error
|
33
|
+
when Excon::Errors::NotFound
|
34
|
+
self.class.not_found_class.slurp(error)
|
35
|
+
else
|
36
|
+
error
|
37
|
+
end
|
38
|
+
end
|
39
|
+
unless response.body.empty?
|
40
|
+
response.body = Fog::JSON.decode(response.body) unless params[:raw_body]
|
41
|
+
end
|
42
|
+
response
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,397 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class OpenStack < Fog::Service
|
6
|
+
requires :openstack_auth_url
|
7
|
+
recognizes :openstack_auth_token, :openstack_management_url,
|
8
|
+
:persistent, :openstack_service_type, :openstack_service_name,
|
9
|
+
:openstack_tenant, :openstack_tenant_id,
|
10
|
+
:openstack_api_key, :openstack_username, :openstack_identity_endpoint,
|
11
|
+
:current_user, :current_tenant, :openstack_region,
|
12
|
+
:openstack_endpoint_type,
|
13
|
+
:openstack_project_name, :openstack_project_id,
|
14
|
+
:openstack_project_domain, :openstack_user_domain, :openstack_domain_name,
|
15
|
+
:openstack_project_domain_id, :openstack_user_domain_id, :openstack_domain_id,
|
16
|
+
:openstack_identity_prefix
|
17
|
+
|
18
|
+
## MODELS
|
19
|
+
#
|
20
|
+
model_path 'fog/openstack/models/compute'
|
21
|
+
model :aggregate
|
22
|
+
collection :aggregates
|
23
|
+
model :availability_zone
|
24
|
+
collection :availability_zones
|
25
|
+
model :server
|
26
|
+
collection :servers
|
27
|
+
model :service
|
28
|
+
collection :services
|
29
|
+
model :image
|
30
|
+
collection :images
|
31
|
+
model :flavor
|
32
|
+
collection :flavors
|
33
|
+
model :metadatum
|
34
|
+
collection :metadata
|
35
|
+
model :address
|
36
|
+
collection :addresses
|
37
|
+
model :security_group
|
38
|
+
collection :security_groups
|
39
|
+
model :security_group_rule
|
40
|
+
collection :security_group_rules
|
41
|
+
model :key_pair
|
42
|
+
collection :key_pairs
|
43
|
+
model :tenant
|
44
|
+
collection :tenants
|
45
|
+
model :volume
|
46
|
+
collection :volumes
|
47
|
+
model :network
|
48
|
+
collection :networks
|
49
|
+
model :snapshot
|
50
|
+
collection :snapshots
|
51
|
+
model :host
|
52
|
+
collection :hosts
|
53
|
+
|
54
|
+
## REQUESTS
|
55
|
+
#
|
56
|
+
request_path 'fog/openstack/requests/compute'
|
57
|
+
|
58
|
+
# Aggregate CRUD
|
59
|
+
request :list_aggregates
|
60
|
+
request :create_aggregate
|
61
|
+
request :update_aggregate
|
62
|
+
request :get_aggregate
|
63
|
+
request :update_aggregate
|
64
|
+
request :update_aggregate_metadata
|
65
|
+
request :add_aggregate_host
|
66
|
+
request :remove_aggregate_host
|
67
|
+
request :delete_aggregate
|
68
|
+
|
69
|
+
# Server CRUD
|
70
|
+
request :list_servers
|
71
|
+
request :list_servers_detail
|
72
|
+
request :create_server
|
73
|
+
request :get_server_details
|
74
|
+
request :get_server_password
|
75
|
+
request :update_server
|
76
|
+
request :delete_server
|
77
|
+
|
78
|
+
# Server Actions
|
79
|
+
request :server_actions
|
80
|
+
request :server_action
|
81
|
+
request :reboot_server
|
82
|
+
request :rebuild_server
|
83
|
+
request :resize_server
|
84
|
+
request :confirm_resize_server
|
85
|
+
request :revert_resize_server
|
86
|
+
request :pause_server
|
87
|
+
request :unpause_server
|
88
|
+
request :suspend_server
|
89
|
+
request :resume_server
|
90
|
+
request :start_server
|
91
|
+
request :stop_server
|
92
|
+
request :rescue_server
|
93
|
+
request :change_server_password
|
94
|
+
request :add_fixed_ip
|
95
|
+
request :remove_fixed_ip
|
96
|
+
request :server_diagnostics
|
97
|
+
request :boot_from_snapshot
|
98
|
+
request :reset_server_state
|
99
|
+
request :add_security_group
|
100
|
+
request :remove_security_group
|
101
|
+
request :shelve_server
|
102
|
+
request :unshelve_server
|
103
|
+
request :shelve_offload_server
|
104
|
+
|
105
|
+
# Server Extenstions
|
106
|
+
request :get_console_output
|
107
|
+
request :get_vnc_console
|
108
|
+
request :live_migrate_server
|
109
|
+
request :migrate_server
|
110
|
+
request :evacuate_server
|
111
|
+
|
112
|
+
# Service CRUD
|
113
|
+
request :list_services
|
114
|
+
request :enable_service
|
115
|
+
request :disable_service
|
116
|
+
request :disable_service_log_reason
|
117
|
+
request :delete_service
|
118
|
+
|
119
|
+
# Image CRUD
|
120
|
+
request :list_images
|
121
|
+
request :list_images_detail
|
122
|
+
request :create_image
|
123
|
+
request :get_image_details
|
124
|
+
request :delete_image
|
125
|
+
|
126
|
+
# Flavor CRUD
|
127
|
+
request :list_flavors
|
128
|
+
request :list_flavors_detail
|
129
|
+
request :get_flavor_details
|
130
|
+
request :create_flavor
|
131
|
+
request :delete_flavor
|
132
|
+
|
133
|
+
# Flavor Actions
|
134
|
+
request :get_flavor_metadata
|
135
|
+
request :create_flavor_metadata
|
136
|
+
|
137
|
+
# Flavor Access
|
138
|
+
request :add_flavor_access
|
139
|
+
request :remove_flavor_access
|
140
|
+
request :list_tenants_with_flavor_access
|
141
|
+
|
142
|
+
# Hypervisor
|
143
|
+
request :get_hypervisor_statistics
|
144
|
+
|
145
|
+
# Metadata
|
146
|
+
request :list_metadata
|
147
|
+
request :get_metadata
|
148
|
+
request :set_metadata
|
149
|
+
request :update_metadata
|
150
|
+
request :delete_metadata
|
151
|
+
|
152
|
+
# Metadatam
|
153
|
+
request :delete_meta
|
154
|
+
request :update_meta
|
155
|
+
|
156
|
+
# Address
|
157
|
+
request :list_addresses
|
158
|
+
request :list_address_pools
|
159
|
+
request :list_all_addresses
|
160
|
+
request :list_private_addresses
|
161
|
+
request :list_public_addresses
|
162
|
+
request :get_address
|
163
|
+
request :allocate_address
|
164
|
+
request :associate_address
|
165
|
+
request :release_address
|
166
|
+
request :disassociate_address
|
167
|
+
|
168
|
+
# Security Group
|
169
|
+
request :list_security_groups
|
170
|
+
request :get_security_group
|
171
|
+
request :create_security_group
|
172
|
+
request :create_security_group_rule
|
173
|
+
request :delete_security_group
|
174
|
+
request :delete_security_group_rule
|
175
|
+
request :get_security_group_rule
|
176
|
+
|
177
|
+
# Key Pair
|
178
|
+
request :list_key_pairs
|
179
|
+
request :create_key_pair
|
180
|
+
request :delete_key_pair
|
181
|
+
|
182
|
+
# Tenant
|
183
|
+
request :list_tenants
|
184
|
+
request :set_tenant
|
185
|
+
request :get_limits
|
186
|
+
|
187
|
+
# Volume
|
188
|
+
request :list_volumes
|
189
|
+
request :list_volumes_detail
|
190
|
+
request :create_volume
|
191
|
+
request :get_volume_details
|
192
|
+
request :delete_volume
|
193
|
+
request :attach_volume
|
194
|
+
request :detach_volume
|
195
|
+
request :get_server_volumes
|
196
|
+
|
197
|
+
# Snapshot
|
198
|
+
request :create_volume_snapshot
|
199
|
+
request :list_snapshots
|
200
|
+
request :list_snapshots_detail
|
201
|
+
request :get_snapshot_details
|
202
|
+
request :delete_snapshot
|
203
|
+
|
204
|
+
# Usage
|
205
|
+
request :list_usages
|
206
|
+
request :get_usage
|
207
|
+
|
208
|
+
# Quota
|
209
|
+
request :get_quota
|
210
|
+
request :get_quota_defaults
|
211
|
+
request :update_quota
|
212
|
+
|
213
|
+
# Hosts
|
214
|
+
request :list_hosts
|
215
|
+
request :get_host_details
|
216
|
+
|
217
|
+
# Zones
|
218
|
+
request :list_zones
|
219
|
+
request :list_zones_detailed
|
220
|
+
|
221
|
+
class Mock
|
222
|
+
attr_reader :auth_token
|
223
|
+
attr_reader :auth_token_expiration
|
224
|
+
attr_reader :current_user
|
225
|
+
attr_reader :current_tenant
|
226
|
+
|
227
|
+
def self.data
|
228
|
+
@data ||= Hash.new do |hash, key|
|
229
|
+
hash[key] = {
|
230
|
+
:last_modified => {
|
231
|
+
:images => {},
|
232
|
+
:servers => {},
|
233
|
+
:key_pairs => {},
|
234
|
+
:security_groups => {},
|
235
|
+
:addresses => {}
|
236
|
+
},
|
237
|
+
:aggregates => [{
|
238
|
+
"availability_zone" => "nova",
|
239
|
+
"created_at" => "2012-11-16T06:22:23.032493",
|
240
|
+
"deleted" => false,
|
241
|
+
"deleted_at" => nil,
|
242
|
+
"id" => 1,
|
243
|
+
"name" => "name",
|
244
|
+
"updated_at" => nil
|
245
|
+
}],
|
246
|
+
:images => {
|
247
|
+
"0e09fbd6-43c5-448a-83e9-0d3d05f9747e" => {
|
248
|
+
"id"=>"0e09fbd6-43c5-448a-83e9-0d3d05f9747e",
|
249
|
+
"name"=>"cirros-0.3.0-x86_64-blank",
|
250
|
+
'progress' => 100,
|
251
|
+
'status' => "ACTIVE",
|
252
|
+
'updated' => "",
|
253
|
+
'minRam' => 0,
|
254
|
+
'minDisk' => 0,
|
255
|
+
'metadata' => {},
|
256
|
+
'links' => [{"href"=>"http://nova1:8774/v1.1/admin/images/1", "rel"=>"self"}, {"href"=>"http://nova1:8774/admin/images/2", "rel"=>"bookmark"}]
|
257
|
+
}
|
258
|
+
},
|
259
|
+
:servers => {},
|
260
|
+
:key_pairs => {},
|
261
|
+
:security_groups => {
|
262
|
+
'0' => {
|
263
|
+
"id" => 0,
|
264
|
+
"tenant_id" => Fog::Mock.random_hex(8),
|
265
|
+
"name" => "default",
|
266
|
+
"description" => "default",
|
267
|
+
"rules" => [
|
268
|
+
{ "id" => 0,
|
269
|
+
"parent_group_id" => 0,
|
270
|
+
"from_port" => 68,
|
271
|
+
"to_port" => 68,
|
272
|
+
"ip_protocol" => "udp",
|
273
|
+
"ip_range" => { "cidr" => "0.0.0.0/0" },
|
274
|
+
"group" => {}, },
|
275
|
+
],
|
276
|
+
},
|
277
|
+
},
|
278
|
+
:server_security_group_map => {},
|
279
|
+
:addresses => {},
|
280
|
+
:quota => {
|
281
|
+
'security_group_rules' => 20,
|
282
|
+
'security_groups' => 10,
|
283
|
+
'injected_file_content_bytes' => 10240,
|
284
|
+
'injected_file_path_bytes' => 256,
|
285
|
+
'injected_files' => 5,
|
286
|
+
'metadata_items' => 128,
|
287
|
+
'floating_ips' => 10,
|
288
|
+
'instances' => 10,
|
289
|
+
'key_pairs' => 10,
|
290
|
+
'gigabytes' => 5000,
|
291
|
+
'volumes' => 10,
|
292
|
+
'cores' => 20,
|
293
|
+
'ram' => 51200
|
294
|
+
},
|
295
|
+
:volumes => {},
|
296
|
+
:snapshots => {}
|
297
|
+
}
|
298
|
+
end
|
299
|
+
end
|
300
|
+
|
301
|
+
def self.reset
|
302
|
+
@data = nil
|
303
|
+
end
|
304
|
+
|
305
|
+
include Fog::OpenStack::Core
|
306
|
+
|
307
|
+
def initialize(options={})
|
308
|
+
@auth_token = Fog::Mock.random_base64(64)
|
309
|
+
@auth_token_expiration = (Time.now.utc + 86400).iso8601
|
310
|
+
|
311
|
+
initialize_identity options
|
312
|
+
|
313
|
+
management_url = URI.parse(options[:openstack_auth_url])
|
314
|
+
management_url.port = 8774
|
315
|
+
management_url.path = '/v1.1/1'
|
316
|
+
@openstack_management_url = management_url.to_s
|
317
|
+
|
318
|
+
identity_public_endpoint = URI.parse(options[:openstack_auth_url])
|
319
|
+
identity_public_endpoint.port = 5000
|
320
|
+
@openstack_identity_public_endpoint = identity_public_endpoint.to_s
|
321
|
+
end
|
322
|
+
|
323
|
+
def data
|
324
|
+
self.class.data["#{@openstack_username}-#{@current_tenant}"]
|
325
|
+
end
|
326
|
+
|
327
|
+
def reset_data
|
328
|
+
self.class.data.delete("#{@openstack_username}-#{@current_tenant}")
|
329
|
+
end
|
330
|
+
|
331
|
+
end
|
332
|
+
|
333
|
+
class Real
|
334
|
+
include Fog::OpenStack::Core
|
335
|
+
|
336
|
+
def initialize(options={})
|
337
|
+
initialize_identity options
|
338
|
+
|
339
|
+
@openstack_identity_service_type = options[:openstack_identity_service_type] || 'identity'
|
340
|
+
|
341
|
+
@openstack_service_type = options[:openstack_service_type] || ['nova', 'compute']
|
342
|
+
@openstack_service_name = options[:openstack_service_name]
|
343
|
+
|
344
|
+
@connection_options = options[:connection_options] || {}
|
345
|
+
|
346
|
+
authenticate
|
347
|
+
|
348
|
+
unless @path.match(/1\.1|v2/)
|
349
|
+
raise Fog::OpenStack::Errors::ServiceUnavailable.new(
|
350
|
+
"OpenStack compute binding only supports version 2 (a.k.a. 1.1)")
|
351
|
+
end
|
352
|
+
|
353
|
+
@persistent = options[:persistent] || false
|
354
|
+
@connection = Fog::Core::Connection.new("#{@scheme}://#{@host}:#{@port}", @persistent, @connection_options)
|
355
|
+
end
|
356
|
+
|
357
|
+
def request(params)
|
358
|
+
begin
|
359
|
+
response = @connection.request(params.merge({
|
360
|
+
:headers => {
|
361
|
+
'Content-Type' => 'application/json',
|
362
|
+
'Accept' => 'application/json',
|
363
|
+
'X-Auth-Token' => @auth_token
|
364
|
+
}.merge!(params[:headers] || {}),
|
365
|
+
:path => "#{@path}/#{params[:path]}",
|
366
|
+
:query => params[:query]
|
367
|
+
}))
|
368
|
+
rescue Excon::Errors::Unauthorized => error
|
369
|
+
if error.response.body != 'Bad username or password' # token expiration
|
370
|
+
@openstack_must_reauthenticate = true
|
371
|
+
authenticate
|
372
|
+
retry
|
373
|
+
else # Bad Credentials
|
374
|
+
raise error
|
375
|
+
end
|
376
|
+
rescue Excon::Errors::HTTPStatusError => error
|
377
|
+
raise case error
|
378
|
+
when Excon::Errors::NotFound
|
379
|
+
Fog::Compute::OpenStack::NotFound.slurp(error)
|
380
|
+
else
|
381
|
+
error
|
382
|
+
end
|
383
|
+
end
|
384
|
+
|
385
|
+
if !response.body.empty? and response.get_header('Content-Type') == 'application/json'
|
386
|
+
response.body = Fog::JSON.decode(response.body)
|
387
|
+
end
|
388
|
+
|
389
|
+
response
|
390
|
+
end
|
391
|
+
|
392
|
+
private
|
393
|
+
|
394
|
+
end
|
395
|
+
end
|
396
|
+
end
|
397
|
+
end
|