cifrado 0.1
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/.gitignore +18 -0
- data/CHANGELOG.md +44 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +247 -0
- data/RELEASE.md +10 -0
- data/Rakefile +21 -0
- data/TODO.md +6 -0
- data/bin/cifrado +7 -0
- data/cifrado.gemspec +31 -0
- data/gem-public_cert.pem +20 -0
- data/lib/cifrado.rb +48 -0
- data/lib/cifrado/cli.rb +140 -0
- data/lib/cifrado/cli/cinema.rb +81 -0
- data/lib/cifrado/cli/delete.rb +36 -0
- data/lib/cifrado/cli/download.rb +54 -0
- data/lib/cifrado/cli/jukebox.rb +94 -0
- data/lib/cifrado/cli/list.rb +64 -0
- data/lib/cifrado/cli/post.rb +10 -0
- data/lib/cifrado/cli/progressbar.rb +86 -0
- data/lib/cifrado/cli/saio.rb +11 -0
- data/lib/cifrado/cli/saio/base.rb +20 -0
- data/lib/cifrado/cli/saio/bootstrap.rb +118 -0
- data/lib/cifrado/cli/saio/destroy.rb +16 -0
- data/lib/cifrado/cli/saio/scripts/saio.sh.erb +445 -0
- data/lib/cifrado/cli/set_acl.rb +10 -0
- data/lib/cifrado/cli/setup.rb +64 -0
- data/lib/cifrado/cli/stat.rb +41 -0
- data/lib/cifrado/cli/upload.rb +269 -0
- data/lib/cifrado/config.rb +18 -0
- data/lib/cifrado/core_ext/ruby18_base64.rb +15 -0
- data/lib/cifrado/crypto_services.rb +218 -0
- data/lib/cifrado/file_splitter.rb +67 -0
- data/lib/cifrado/rate_limit.rb +23 -0
- data/lib/cifrado/streaming_downloader.rb +49 -0
- data/lib/cifrado/streaming_uploader.rb +57 -0
- data/lib/cifrado/swift_client.rb +313 -0
- data/lib/cifrado/utils.rb +59 -0
- data/lib/cifrado/version.rb +3 -0
- data/tests/cli/list_tests.rb +28 -0
- data/tests/cli/upload_multi_tests.rb +94 -0
- data/tests/cli/upload_tests.rb +167 -0
- data/tests/cli_tests.rb +2 -0
- data/tests/crypto_services_tests.rb +145 -0
- data/tests/file_splitter_tests.rb +61 -0
- data/tests/helper.rb +117 -0
- data/tests/swift_client/create_directory.rb +14 -0
- data/tests/swift_client/download_tests.rb +208 -0
- data/tests/swift_client/file_available.rb +25 -0
- data/tests/swift_client/head_tests.rb +34 -0
- data/tests/swift_client/match_tests.rb +29 -0
- data/tests/swift_client/upload_tests.rb +70 -0
- data/tests/swift_client_tests.rb +29 -0
- data/tests/utils_tests.rb +33 -0
- data/vendor/fog/.document +3 -0
- data/vendor/fog/.gitignore +23 -0
- data/vendor/fog/.irbrc +82 -0
- data/vendor/fog/.travis.yml +21 -0
- data/vendor/fog/README.cifrado +3 -0
- data/vendor/fog/README.md +156 -0
- data/vendor/fog/RELEASE.md +39 -0
- data/vendor/fog/changelog.txt +4156 -0
- data/vendor/fog/fog.gemspec +70 -0
- data/vendor/fog/lib/fog.rb +17 -0
- data/vendor/fog/lib/fog/cdn.rb +30 -0
- data/vendor/fog/lib/fog/compute.rb +127 -0
- data/vendor/fog/lib/fog/compute/models/server.rb +73 -0
- data/vendor/fog/lib/fog/core.rb +38 -0
- data/vendor/fog/lib/fog/core/attributes.rb +221 -0
- data/vendor/fog/lib/fog/core/collection.rb +145 -0
- data/vendor/fog/lib/fog/core/connection.rb +36 -0
- data/vendor/fog/lib/fog/core/credentials.rb +65 -0
- data/vendor/fog/lib/fog/core/current_machine.rb +34 -0
- data/vendor/fog/lib/fog/core/deprecated_connection_accessors.rb +41 -0
- data/vendor/fog/lib/fog/core/deprecation.rb +23 -0
- data/vendor/fog/lib/fog/core/errors.rb +108 -0
- data/vendor/fog/lib/fog/core/hmac.rb +48 -0
- data/vendor/fog/lib/fog/core/json.rb +34 -0
- data/vendor/fog/lib/fog/core/logger.rb +45 -0
- data/vendor/fog/lib/fog/core/mock.rb +92 -0
- data/vendor/fog/lib/fog/core/model.rb +79 -0
- data/vendor/fog/lib/fog/core/parser.rb +116 -0
- data/vendor/fog/lib/fog/core/provider.rb +35 -0
- data/vendor/fog/lib/fog/core/scp.rb +96 -0
- data/vendor/fog/lib/fog/core/service.rb +223 -0
- data/vendor/fog/lib/fog/core/ssh.rb +137 -0
- data/vendor/fog/lib/fog/core/time.rb +32 -0
- data/vendor/fog/lib/fog/core/timeout.rb +11 -0
- data/vendor/fog/lib/fog/core/wait_for.rb +15 -0
- data/vendor/fog/lib/fog/digitalocean.rb +9 -0
- data/vendor/fog/lib/fog/digitalocean/compute.rb +100 -0
- data/vendor/fog/lib/fog/digitalocean/examples/getting_started.md +106 -0
- data/vendor/fog/lib/fog/digitalocean/models/compute/flavor.rb +14 -0
- data/vendor/fog/lib/fog/digitalocean/models/compute/flavors.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/models/compute/image.rb +15 -0
- data/vendor/fog/lib/fog/digitalocean/models/compute/images.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/models/compute/region.rb +14 -0
- data/vendor/fog/lib/fog/digitalocean/models/compute/regions.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/models/compute/server.rb +150 -0
- data/vendor/fog/lib/fog/digitalocean/models/compute/servers.rb +27 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/create_server.rb +49 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/create_ssh_key.rb +26 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/destroy_server.rb +28 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/get_server_details.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/list_flavors.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/list_images.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/list_regions.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/list_servers.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/list_ssh_keys.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/power_cycle_server.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/power_off_server.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/power_on_server.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/reboot_server.rb +25 -0
- data/vendor/fog/lib/fog/digitalocean/requests/compute/shutdown_server.rb +25 -0
- data/vendor/fog/lib/fog/dns.rb +59 -0
- data/vendor/fog/lib/fog/identity.rb +27 -0
- data/vendor/fog/lib/fog/image.rb +24 -0
- data/vendor/fog/lib/fog/local.rb +11 -0
- data/vendor/fog/lib/fog/local/models/storage/directories.rb +33 -0
- data/vendor/fog/lib/fog/local/models/storage/directory.rb +57 -0
- data/vendor/fog/lib/fog/local/models/storage/file.rb +131 -0
- data/vendor/fog/lib/fog/local/models/storage/files.rb +87 -0
- data/vendor/fog/lib/fog/local/storage.rb +103 -0
- data/vendor/fog/lib/fog/network.rb +26 -0
- data/vendor/fog/lib/fog/openstack.rb +214 -0
- data/vendor/fog/lib/fog/openstack/README.identity.md +69 -0
- data/vendor/fog/lib/fog/openstack/compute.rb +423 -0
- data/vendor/fog/lib/fog/openstack/identity.rb +299 -0
- data/vendor/fog/lib/fog/openstack/image.rb +217 -0
- data/vendor/fog/lib/fog/openstack/models/compute/address.rb +71 -0
- data/vendor/fog/lib/fog/openstack/models/compute/addresses.rb +33 -0
- data/vendor/fog/lib/fog/openstack/models/compute/flavor.rb +45 -0
- data/vendor/fog/lib/fog/openstack/models/compute/flavors.rb +28 -0
- data/vendor/fog/lib/fog/openstack/models/compute/host.rb +29 -0
- data/vendor/fog/lib/fog/openstack/models/compute/hosts.rb +32 -0
- data/vendor/fog/lib/fog/openstack/models/compute/image.rb +58 -0
- data/vendor/fog/lib/fog/openstack/models/compute/images.rb +33 -0
- data/vendor/fog/lib/fog/openstack/models/compute/key_pair.rb +60 -0
- data/vendor/fog/lib/fog/openstack/models/compute/key_pairs.rb +31 -0
- data/vendor/fog/lib/fog/openstack/models/compute/metadata.rb +68 -0
- data/vendor/fog/lib/fog/openstack/models/compute/metadatum.rb +29 -0
- data/vendor/fog/lib/fog/openstack/models/compute/network.rb +13 -0
- data/vendor/fog/lib/fog/openstack/models/compute/networks.rb +29 -0
- data/vendor/fog/lib/fog/openstack/models/compute/security_group.rb +44 -0
- data/vendor/fog/lib/fog/openstack/models/compute/security_groups.rb +27 -0
- data/vendor/fog/lib/fog/openstack/models/compute/server.rb +278 -0
- data/vendor/fog/lib/fog/openstack/models/compute/servers.rb +44 -0
- data/vendor/fog/lib/fog/openstack/models/compute/snapshot.rb +44 -0
- data/vendor/fog/lib/fog/openstack/models/compute/snapshots.rb +26 -0
- data/vendor/fog/lib/fog/openstack/models/compute/tenant.rb +24 -0
- data/vendor/fog/lib/fog/openstack/models/compute/tenants.rb +24 -0
- data/vendor/fog/lib/fog/openstack/models/compute/volume.rb +59 -0
- data/vendor/fog/lib/fog/openstack/models/compute/volumes.rb +26 -0
- data/vendor/fog/lib/fog/openstack/models/identity/ec2_credential.rb +44 -0
- data/vendor/fog/lib/fog/openstack/models/identity/ec2_credentials.rb +53 -0
- data/vendor/fog/lib/fog/openstack/models/identity/role.rb +50 -0
- data/vendor/fog/lib/fog/openstack/models/identity/roles.rb +21 -0
- data/vendor/fog/lib/fog/openstack/models/identity/tenant.rb +62 -0
- data/vendor/fog/lib/fog/openstack/models/identity/tenants.rb +29 -0
- data/vendor/fog/lib/fog/openstack/models/identity/user.rb +70 -0
- data/vendor/fog/lib/fog/openstack/models/identity/users.rb +32 -0
- data/vendor/fog/lib/fog/openstack/models/image/image.rb +91 -0
- data/vendor/fog/lib/fog/openstack/models/image/images.rb +60 -0
- data/vendor/fog/lib/fog/openstack/models/meta_parent.rb +33 -0
- data/vendor/fog/lib/fog/openstack/models/network/floating_ip.rb +52 -0
- data/vendor/fog/lib/fog/openstack/models/network/floating_ips.rb +34 -0
- data/vendor/fog/lib/fog/openstack/models/network/network.rb +47 -0
- data/vendor/fog/lib/fog/openstack/models/network/networks.rb +34 -0
- data/vendor/fog/lib/fog/openstack/models/network/port.rb +53 -0
- data/vendor/fog/lib/fog/openstack/models/network/ports.rb +34 -0
- data/vendor/fog/lib/fog/openstack/models/network/subnet.rb +56 -0
- data/vendor/fog/lib/fog/openstack/models/network/subnets.rb +34 -0
- data/vendor/fog/lib/fog/openstack/models/storage/directories.rb +39 -0
- data/vendor/fog/lib/fog/openstack/models/storage/directory.rb +50 -0
- data/vendor/fog/lib/fog/openstack/models/storage/file.rb +152 -0
- data/vendor/fog/lib/fog/openstack/models/storage/files.rb +94 -0
- data/vendor/fog/lib/fog/openstack/models/volume/volume.rb +47 -0
- data/vendor/fog/lib/fog/openstack/models/volume/volumes.rb +27 -0
- data/vendor/fog/lib/fog/openstack/network.rb +247 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/add_fixed_ip.rb +29 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/allocate_address.rb +42 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/associate_address.rb +27 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/attach_volume.rb +38 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/boot_from_snapshot.rb +41 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/change_server_password.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/confirm_resize_server.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/create_flavor.rb +85 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/create_image.rb +49 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/create_key_pair.rb +49 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/create_security_group.rb +52 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/create_security_group_rule.rb +59 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/create_server.rb +131 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/create_volume.rb +54 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/create_volume_snapshot.rb +47 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/delete_flavor.rb +28 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/delete_image.rb +40 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/delete_key_pair.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/delete_metadata.rb +28 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/delete_security_group.rb +33 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/delete_security_group_rule.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/delete_server.rb +38 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/delete_snapshot.rb +26 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/delete_volume.rb +26 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/detach_volume.rb +26 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/disassociate_address.rb +27 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_address.rb +41 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_console_output.rb +28 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_flavor_details.rb +43 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_host_details.rb +74 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_image_details.rb +33 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_limits.rb +93 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_metadata.rb +29 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_quota.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_quota_defaults.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_security_group.rb +49 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_server_details.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_server_volumes.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_snapshot_details.rb +39 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_usage.rb +53 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_vnc_console.rb +40 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/get_volume_details.rb +42 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_address_pools.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_addresses.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_all_addresses.rb +64 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_flavors.rb +38 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_flavors_detail.rb +38 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_hosts.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_images.rb +33 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_images_detail.rb +39 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_key_pairs.rb +39 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_metadata.rb +28 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_private_addresses.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_public_addresses.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_security_groups.rb +50 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_servers.rb +37 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_servers_detail.rb +44 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_snapshots.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_tenants.rb +45 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_usages.rb +43 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/list_volumes.rb +51 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/live_migrate_server.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/migrate_server.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/pause_server.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/reboot_server.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/rebuild_server.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/release_address.rb +34 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/remove_fixed_ip.rb +29 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/rescue_server.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/reset_server_state.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/resize_server.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/resume_server.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/revert_resize_server.rb +30 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/server_action.rb +18 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/server_actions.rb +27 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/server_diagnostics.rb +25 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/set_metadata.rb +45 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/set_tenant.rb +21 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/suspend_server.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/unpause_server.rb +24 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/update_metadata.rb +46 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/update_quota.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/compute/update_server.rb +35 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/add_user_to_tenant.rb +34 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/check_token.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/create_ec2_credential.rb +58 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/create_role.rb +37 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/create_tenant.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/create_user.rb +47 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/create_user_role.rb +26 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/delete_ec2_credential.rb +44 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/delete_role.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/delete_tenant.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/delete_user.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/delete_user_role.rb +26 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/get_ec2_credential.rb +49 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/get_role.rb +28 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/get_tenant.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/get_tenants_by_id.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/get_tenants_by_name.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/get_user_by_id.rb +34 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/get_user_by_name.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/list_ec2_credentials.rb +44 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/list_endpoints_for_token.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/list_roles.rb +36 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/list_roles_for_user_on_tenant.rb +30 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/list_tenants.rb +45 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/list_user_global_roles.rb +22 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/list_users.rb +34 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/remove_user_from_tenant.rb +20 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/set_tenant.rb +21 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/update_tenant.rb +28 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/update_user.rb +36 -0
- data/vendor/fog/lib/fog/openstack/requests/identity/validate_token.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/image/add_member_to_image.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/image/create_image.rb +79 -0
- data/vendor/fog/lib/fog/openstack/requests/image/delete_image.rb +25 -0
- data/vendor/fog/lib/fog/openstack/requests/image/get_image.rb +45 -0
- data/vendor/fog/lib/fog/openstack/requests/image/get_image_by_id.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/image/get_image_members.rb +29 -0
- data/vendor/fog/lib/fog/openstack/requests/image/get_shared_images.rb +29 -0
- data/vendor/fog/lib/fog/openstack/requests/image/list_public_images.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/image/list_public_images_detailed.rb +31 -0
- data/vendor/fog/lib/fog/openstack/requests/image/remove_member_from_image.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/image/set_tenant.rb +21 -0
- data/vendor/fog/lib/fog/openstack/requests/image/update_image.rb +70 -0
- data/vendor/fog/lib/fog/openstack/requests/image/update_image_members.rb +37 -0
- data/vendor/fog/lib/fog/openstack/requests/network/associate_floating_ip.rb +49 -0
- data/vendor/fog/lib/fog/openstack/requests/network/create_floating_ip.rb +50 -0
- data/vendor/fog/lib/fog/openstack/requests/network/create_network.rb +44 -0
- data/vendor/fog/lib/fog/openstack/requests/network/create_port.rb +52 -0
- data/vendor/fog/lib/fog/openstack/requests/network/create_subnet.rb +56 -0
- data/vendor/fog/lib/fog/openstack/requests/network/delete_floating_ip.rb +30 -0
- data/vendor/fog/lib/fog/openstack/requests/network/delete_network.rb +30 -0
- data/vendor/fog/lib/fog/openstack/requests/network/delete_port.rb +30 -0
- data/vendor/fog/lib/fog/openstack/requests/network/delete_subnet.rb +30 -0
- data/vendor/fog/lib/fog/openstack/requests/network/disassociate_floating_ip.rb +49 -0
- data/vendor/fog/lib/fog/openstack/requests/network/get_floating_ip.rb +42 -0
- data/vendor/fog/lib/fog/openstack/requests/network/get_network.rb +42 -0
- data/vendor/fog/lib/fog/openstack/requests/network/get_port.rb +48 -0
- data/vendor/fog/lib/fog/openstack/requests/network/get_subnet.rb +49 -0
- data/vendor/fog/lib/fog/openstack/requests/network/list_floating_ips.rb +27 -0
- data/vendor/fog/lib/fog/openstack/requests/network/list_networks.rb +27 -0
- data/vendor/fog/lib/fog/openstack/requests/network/list_ports.rb +27 -0
- data/vendor/fog/lib/fog/openstack/requests/network/list_subnets.rb +27 -0
- data/vendor/fog/lib/fog/openstack/requests/network/set_tenant.rb +21 -0
- data/vendor/fog/lib/fog/openstack/requests/network/update_network.rb +41 -0
- data/vendor/fog/lib/fog/openstack/requests/network/update_port.rb +44 -0
- data/vendor/fog/lib/fog/openstack/requests/network/update_subnet.rb +44 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/copy_object.rb +27 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/delete_container.rb +22 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/delete_object.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/get_container.rb +44 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/get_containers.rb +33 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/get_object.rb +29 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/get_object_https_url.rb +51 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/head_container.rb +28 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/head_containers.rb +25 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/head_object.rb +23 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/post_set_meta_temp_url_key.rb +37 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/put_container.rb +22 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/put_object.rb +30 -0
- data/vendor/fog/lib/fog/openstack/requests/storage/put_object_manifest.rb +25 -0
- data/vendor/fog/lib/fog/openstack/requests/volume/create_volume.rb +54 -0
- data/vendor/fog/lib/fog/openstack/requests/volume/create_volume_snapshot.rb +47 -0
- data/vendor/fog/lib/fog/openstack/requests/volume/delete_snapshot.rb +26 -0
- data/vendor/fog/lib/fog/openstack/requests/volume/delete_volume.rb +26 -0
- data/vendor/fog/lib/fog/openstack/requests/volume/get_snapshot_details.rb +39 -0
- data/vendor/fog/lib/fog/openstack/requests/volume/get_volume_details.rb +42 -0
- data/vendor/fog/lib/fog/openstack/requests/volume/list_snapshots.rb +32 -0
- data/vendor/fog/lib/fog/openstack/requests/volume/list_volumes.rb +55 -0
- data/vendor/fog/lib/fog/openstack/requests/volume/set_tenant.rb +21 -0
- data/vendor/fog/lib/fog/openstack/storage.rb +162 -0
- data/vendor/fog/lib/fog/openstack/volume.rb +219 -0
- data/vendor/fog/lib/fog/providers.rb +2 -0
- data/vendor/fog/lib/fog/schema/data_validator.rb +154 -0
- data/vendor/fog/lib/fog/storage.rb +97 -0
- data/vendor/fog/lib/fog/version.rb +3 -0
- data/vendor/fog/lib/fog/volume.rb +25 -0
- metadata +576 -0
- metadata.gz.sig +0 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
require 'fog/openstack/models/identity/tenant'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Identity
|
6
|
+
class OpenStack
|
7
|
+
class Tenants < Fog::Collection
|
8
|
+
model Fog::Identity::OpenStack::Tenant
|
9
|
+
|
10
|
+
def all
|
11
|
+
load(service.list_tenants.body['tenants'])
|
12
|
+
end
|
13
|
+
|
14
|
+
def find_by_id(id)
|
15
|
+
cached_tenant = self.find {|tenant| tenant.id == id}
|
16
|
+
return cached_tenant if cached_tenant
|
17
|
+
tenant_hash = service.get_tenant(id).body['tenant']
|
18
|
+
Fog::Identity::OpenStack::Tenant.new(
|
19
|
+
tenant_hash.merge(:service => service))
|
20
|
+
end
|
21
|
+
|
22
|
+
def destroy(id)
|
23
|
+
tenant = self.find_by_id(id)
|
24
|
+
tenant.destroy
|
25
|
+
end
|
26
|
+
end # class Tenants
|
27
|
+
end # class OpenStack
|
28
|
+
end # module Compute
|
29
|
+
end # module Fog
|
@@ -0,0 +1,70 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Identity
|
5
|
+
class OpenStack
|
6
|
+
class User < Fog::Model
|
7
|
+
identity :id
|
8
|
+
|
9
|
+
attribute :email
|
10
|
+
attribute :enabled
|
11
|
+
attribute :name
|
12
|
+
attribute :tenant_id, :aliases => 'tenantId'
|
13
|
+
attribute :password
|
14
|
+
|
15
|
+
attr_accessor :email, :name, :tenant_id, :enabled, :password
|
16
|
+
|
17
|
+
def initialize(attributes)
|
18
|
+
# Old 'connection' is renamed as service and should be used instead
|
19
|
+
prepare_service_value(attributes)
|
20
|
+
super
|
21
|
+
end
|
22
|
+
|
23
|
+
def ec2_credentials
|
24
|
+
requires :id
|
25
|
+
service.ec2_credentials(:user => self)
|
26
|
+
end
|
27
|
+
|
28
|
+
def save
|
29
|
+
raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if persisted?
|
30
|
+
requires :name, :tenant_id, :password
|
31
|
+
enabled = true if enabled.nil?
|
32
|
+
data = service.create_user(name, password, email, tenant_id, enabled)
|
33
|
+
merge_attributes(data.body['user'])
|
34
|
+
true
|
35
|
+
end
|
36
|
+
|
37
|
+
def update(options = {})
|
38
|
+
requires :id
|
39
|
+
options.merge('id' => id)
|
40
|
+
response = service.update_user(id, options)
|
41
|
+
true
|
42
|
+
end
|
43
|
+
|
44
|
+
def update_password(password)
|
45
|
+
update({'password' => password, 'url' => "/users/#{id}/OS-KSADM/password"})
|
46
|
+
end
|
47
|
+
|
48
|
+
def update_tenant(tenant)
|
49
|
+
tenant = tenant.id if tenant.class != String
|
50
|
+
update({:tenantId => tenant, 'url' => "/users/#{id}/OS-KSADM/tenant"})
|
51
|
+
end
|
52
|
+
|
53
|
+
def update_enabled(enabled)
|
54
|
+
update({:enabled => enabled, 'url' => "/users/#{id}/OS-KSADM/enabled"})
|
55
|
+
end
|
56
|
+
|
57
|
+
def destroy
|
58
|
+
requires :id
|
59
|
+
service.delete_user(id)
|
60
|
+
true
|
61
|
+
end
|
62
|
+
|
63
|
+
def roles(tenant_id = self.tenant_id)
|
64
|
+
service.list_roles_for_user_on_tenant(tenant_id, self.id).body['roles']
|
65
|
+
end
|
66
|
+
end # class User
|
67
|
+
end # class OpenStack
|
68
|
+
end # module Identity
|
69
|
+
end # module Fog
|
70
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
require 'fog/openstack/models/identity/user'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Identity
|
6
|
+
class OpenStack
|
7
|
+
class Users < Fog::Collection
|
8
|
+
model Fog::Identity::OpenStack::User
|
9
|
+
|
10
|
+
attribute :tenant_id
|
11
|
+
|
12
|
+
def all
|
13
|
+
load(service.list_users(tenant_id).body['users'])
|
14
|
+
end
|
15
|
+
|
16
|
+
def find_by_id(id)
|
17
|
+
self.find {|user| user.id == id} ||
|
18
|
+
Fog::Identity::OpenStack::User.new(
|
19
|
+
service.get_user_by_id(id).body['user'].merge(
|
20
|
+
'service' => service
|
21
|
+
)
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
def destroy(id)
|
26
|
+
user = self.find_by_id(id)
|
27
|
+
user.destroy
|
28
|
+
end
|
29
|
+
end # class Users
|
30
|
+
end # class OpenStack
|
31
|
+
end # module Identity
|
32
|
+
end # module Fog
|
@@ -0,0 +1,91 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Image
|
5
|
+
class OpenStack
|
6
|
+
|
7
|
+
class Image < Fog::Model
|
8
|
+
|
9
|
+
identity :id
|
10
|
+
|
11
|
+
attribute :name
|
12
|
+
attribute :size
|
13
|
+
attribute :disk_format
|
14
|
+
attribute :container_format
|
15
|
+
attribute :id
|
16
|
+
attribute :checksum
|
17
|
+
|
18
|
+
#detailed
|
19
|
+
attribute :min_disk
|
20
|
+
attribute :created_at
|
21
|
+
attribute :deleted_at
|
22
|
+
attribute :updated_at
|
23
|
+
attribute :deleted
|
24
|
+
attribute :protected
|
25
|
+
attribute :is_public
|
26
|
+
attribute :status
|
27
|
+
attribute :min_ram
|
28
|
+
attribute :owner
|
29
|
+
attribute :properties
|
30
|
+
attribute :location
|
31
|
+
attribute :copy_from
|
32
|
+
|
33
|
+
|
34
|
+
def initialize(attributes)
|
35
|
+
# Old 'connection' is renamed as service and should be used instead
|
36
|
+
prepare_service_value(attributes)
|
37
|
+
super
|
38
|
+
end
|
39
|
+
|
40
|
+
def save
|
41
|
+
requires :name
|
42
|
+
identity ? update : create
|
43
|
+
end
|
44
|
+
|
45
|
+
def create
|
46
|
+
requires :name
|
47
|
+
merge_attributes(service.create_image(self.attributes).body['image'])
|
48
|
+
self
|
49
|
+
end
|
50
|
+
|
51
|
+
def update
|
52
|
+
requires :name
|
53
|
+
merge_attributes(service.update_image(self.attributes).body['image'])
|
54
|
+
self
|
55
|
+
end
|
56
|
+
|
57
|
+
def destroy
|
58
|
+
requires :id
|
59
|
+
service.delete_image(self.id)
|
60
|
+
true
|
61
|
+
end
|
62
|
+
|
63
|
+
def add_member(member_id)
|
64
|
+
requires :id
|
65
|
+
service.add_member_to_image(self.id, member_id)
|
66
|
+
end
|
67
|
+
|
68
|
+
def remove_member(member_id)
|
69
|
+
requires :id
|
70
|
+
service.remove_member_from_image(self.id, member_id)
|
71
|
+
end
|
72
|
+
|
73
|
+
def update_members(members)
|
74
|
+
requires :id
|
75
|
+
service.update_image_members(self.id, members)
|
76
|
+
end
|
77
|
+
|
78
|
+
def members
|
79
|
+
requires :id
|
80
|
+
service.get_image_members(self.id).body['members']
|
81
|
+
end
|
82
|
+
|
83
|
+
def metadata
|
84
|
+
requires :id
|
85
|
+
service.get_image(self.id).headers
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
require 'fog/openstack/models/image/image'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Image
|
6
|
+
class OpenStack
|
7
|
+
class Images < Fog::Collection
|
8
|
+
model Fog::Image::OpenStack::Image
|
9
|
+
|
10
|
+
def all
|
11
|
+
load(service.list_public_images_detailed.body['images'])
|
12
|
+
end
|
13
|
+
|
14
|
+
def details
|
15
|
+
load(service.list_public_images_detailed.body['images'])
|
16
|
+
end
|
17
|
+
|
18
|
+
def find_by_id(id)
|
19
|
+
self.find {|image| image.id == id}
|
20
|
+
end
|
21
|
+
|
22
|
+
def public
|
23
|
+
images = load(service.list_public_images_detailed.body['images'])
|
24
|
+
images.delete_if{|image| image.is_public == false}
|
25
|
+
end
|
26
|
+
|
27
|
+
def private
|
28
|
+
images = load(service.list_public_images_detailed.body['images'])
|
29
|
+
images.delete_if{|image| image.is_public}
|
30
|
+
end
|
31
|
+
|
32
|
+
def destroy(id)
|
33
|
+
image = self.find_by_id(id)
|
34
|
+
image.destroy
|
35
|
+
end
|
36
|
+
|
37
|
+
def method_missing(method_sym, *arguments, &block)
|
38
|
+
if method_sym.to_s =~ /^find_by_(.*)$/
|
39
|
+
load(service.list_public_images_detailed($1 ,arguments.first).body['images'])
|
40
|
+
else
|
41
|
+
super
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def find_by_size_min(size)
|
46
|
+
find_attribute(__method__, size)
|
47
|
+
end
|
48
|
+
|
49
|
+
def find_by_size_max(size)
|
50
|
+
find_attribute(__method__, size)
|
51
|
+
end
|
52
|
+
|
53
|
+
def find_attribute(attribute,value)
|
54
|
+
attribute = attribute.to_s.gsub("find_by_", "")
|
55
|
+
load(service.list_public_images_detailed(attribute , value).body['images'])
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class OpenStack
|
4
|
+
module MetaParent
|
5
|
+
|
6
|
+
def parent
|
7
|
+
@parent
|
8
|
+
end
|
9
|
+
|
10
|
+
def parent=(new_parent)
|
11
|
+
@parent = new_parent
|
12
|
+
end
|
13
|
+
|
14
|
+
def collection_name
|
15
|
+
if @parent.class == Fog::Compute::OpenStack::Image
|
16
|
+
return "images"
|
17
|
+
elsif @parent.class == Fog::Compute::OpenStack::Server
|
18
|
+
return "servers"
|
19
|
+
else
|
20
|
+
raise "Metadata is not supported for this model type."
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def metas_to_hash(metas)
|
25
|
+
hash = {}
|
26
|
+
metas.each { |meta| hash.store(meta.key, meta.value) }
|
27
|
+
hash
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Network
|
5
|
+
class OpenStack
|
6
|
+
class FloatingIp < Fog::Model
|
7
|
+
identity :id
|
8
|
+
|
9
|
+
attribute :floating_network_id
|
10
|
+
attribute :port_id
|
11
|
+
attribute :tenant_id
|
12
|
+
attribute :fixed_ip_address
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
def initialize(attributes)
|
21
|
+
@connection = attributes[:connection]
|
22
|
+
super
|
23
|
+
end
|
24
|
+
|
25
|
+
def save
|
26
|
+
requires :floating_network_id
|
27
|
+
identity ? update : create
|
28
|
+
end
|
29
|
+
|
30
|
+
def create
|
31
|
+
requires :floating_network_id
|
32
|
+
merge_attributes(connection.create_floating_ip(self.floating_network_id,
|
33
|
+
|
34
|
+
|
35
|
+
self.attributes).body['floating_ip'])
|
36
|
+
self
|
37
|
+
end
|
38
|
+
|
39
|
+
def update
|
40
|
+
self
|
41
|
+
end
|
42
|
+
|
43
|
+
def destroy
|
44
|
+
requires :id
|
45
|
+
connection.delete_floating_ip(self.id)
|
46
|
+
true
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
require 'fog/openstack/models/network/floating_ip'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Network
|
6
|
+
class OpenStack
|
7
|
+
class FloatingIps < Fog::Collection
|
8
|
+
|
9
|
+
attribute :filters
|
10
|
+
|
11
|
+
model Fog::Network::OpenStack::FloatingIp
|
12
|
+
|
13
|
+
def initialize(attributes)
|
14
|
+
self.filters ||= {}
|
15
|
+
super
|
16
|
+
end
|
17
|
+
|
18
|
+
def all(filters = filters)
|
19
|
+
self.filters = filters
|
20
|
+
load(connection.list_floating_ips(filters).body['floating_ips'])
|
21
|
+
end
|
22
|
+
|
23
|
+
def get(floating_network_id)
|
24
|
+
if floating_ip = connection.get_floating_ip(floating_network_id).body['floating_ip']
|
25
|
+
new(floating_ip)
|
26
|
+
end
|
27
|
+
rescue Fog::Network::OpenStack::NotFound
|
28
|
+
nil
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Network
|
5
|
+
class OpenStack
|
6
|
+
class Network < Fog::Model
|
7
|
+
identity :id
|
8
|
+
|
9
|
+
attribute :name
|
10
|
+
attribute :subnets
|
11
|
+
attribute :shared
|
12
|
+
attribute :status
|
13
|
+
attribute :admin_state_up
|
14
|
+
attribute :tenant_id
|
15
|
+
|
16
|
+
def initialize(attributes)
|
17
|
+
# Old 'connection' is renamed as service and should be used instead
|
18
|
+
prepare_service_value(attributes)
|
19
|
+
super
|
20
|
+
end
|
21
|
+
|
22
|
+
def save
|
23
|
+
identity ? update : create
|
24
|
+
end
|
25
|
+
|
26
|
+
def create
|
27
|
+
merge_attributes(service.create_network(self.attributes).body['network'])
|
28
|
+
self
|
29
|
+
end
|
30
|
+
|
31
|
+
def update
|
32
|
+
requires :id
|
33
|
+
merge_attributes(service.update_network(self.id,
|
34
|
+
self.attributes).body['network'])
|
35
|
+
self
|
36
|
+
end
|
37
|
+
|
38
|
+
def destroy
|
39
|
+
requires :id
|
40
|
+
service.delete_network(self.id)
|
41
|
+
true
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|