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,32 @@
|
|
1
|
+
require 'time'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
class Time < ::Time
|
5
|
+
|
6
|
+
DAYS = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
|
7
|
+
MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
8
|
+
|
9
|
+
def self.now
|
10
|
+
at((::Time.now - offset).to_i)
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.now=(new_now)
|
14
|
+
old_now = ::Time.now
|
15
|
+
@offset = old_now - new_now
|
16
|
+
new_now
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.offset
|
20
|
+
@offset ||= 0
|
21
|
+
end
|
22
|
+
|
23
|
+
def to_date_header
|
24
|
+
self.utc.strftime("#{DAYS[self.utc.wday]}, %d #{MONTHS[self.utc.month - 1]} %Y %H:%M:%S +0000")
|
25
|
+
end
|
26
|
+
|
27
|
+
def to_iso8601_basic
|
28
|
+
self.utc.strftime('%Y%m%dT%H%M%SZ')
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Fog
|
2
|
+
def self.wait_for(timeout=Fog.timeout, interval=1, &block)
|
3
|
+
duration = 0
|
4
|
+
start = Time.now
|
5
|
+
until yield || duration > timeout
|
6
|
+
sleep(interval.to_f)
|
7
|
+
duration = Time.now - start
|
8
|
+
end
|
9
|
+
if duration > timeout
|
10
|
+
raise Errors::TimeoutError.new("The specified wait_for timeout (#{timeout} seconds) was exceeded")
|
11
|
+
else
|
12
|
+
{ :duration => duration }
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
require 'fog/digitalocean'
|
2
|
+
require 'fog/compute'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Compute
|
6
|
+
class DigitalOcean < Fog::Service
|
7
|
+
|
8
|
+
requires :digitalocean_api_key
|
9
|
+
requires :digitalocean_client_id
|
10
|
+
|
11
|
+
recognizes :digitalocean_api_url
|
12
|
+
|
13
|
+
model_path 'fog/digitalocean/models/compute'
|
14
|
+
model :server
|
15
|
+
collection :servers
|
16
|
+
model :flavor
|
17
|
+
collection :flavors
|
18
|
+
model :image
|
19
|
+
collection :images
|
20
|
+
model :region
|
21
|
+
collection :regions
|
22
|
+
|
23
|
+
request_path 'fog/digitalocean/requests/compute'
|
24
|
+
request :list_servers
|
25
|
+
request :list_images
|
26
|
+
request :list_regions
|
27
|
+
request :list_flavors
|
28
|
+
request :get_server_details
|
29
|
+
request :create_server
|
30
|
+
request :destroy_server
|
31
|
+
request :reboot_server
|
32
|
+
request :power_cycle_server
|
33
|
+
request :power_off_server
|
34
|
+
request :power_on_server
|
35
|
+
request :shutdown_server
|
36
|
+
request :list_ssh_keys
|
37
|
+
request :create_ssh_key
|
38
|
+
|
39
|
+
# request :digitalocean_resize
|
40
|
+
|
41
|
+
class Mock
|
42
|
+
|
43
|
+
def self.data
|
44
|
+
@data ||= Hash.new do |hash, key|
|
45
|
+
hash[key] = {}
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.reset
|
50
|
+
@data = nil
|
51
|
+
end
|
52
|
+
|
53
|
+
def initialize(options={})
|
54
|
+
@digitalocean_api_key = options[:digitalocean_api_key]
|
55
|
+
end
|
56
|
+
|
57
|
+
def data
|
58
|
+
self.class.data[@digitalocean_api_key]
|
59
|
+
end
|
60
|
+
|
61
|
+
def reset_data
|
62
|
+
self.class.data.delete(@digitalocean_api_key)
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
66
|
+
|
67
|
+
class Real
|
68
|
+
|
69
|
+
def initialize(options={})
|
70
|
+
@digitalocean_api_key = options[:digitalocean_api_key]
|
71
|
+
@digitalocean_client_id = options[:digitalocean_client_id]
|
72
|
+
@digitalocean_api_url = options[:digitalocean_api_url] || \
|
73
|
+
"https://api.digitalocean.com"
|
74
|
+
@connection = Fog::Connection.new(@digitalocean_api_url)
|
75
|
+
end
|
76
|
+
|
77
|
+
def reload
|
78
|
+
@connection.reset
|
79
|
+
end
|
80
|
+
|
81
|
+
def request(params)
|
82
|
+
params[:query] ||= {}
|
83
|
+
params[:query].merge!(:api_key => @digitalocean_api_key)
|
84
|
+
params[:query].merge!(:client_id => @digitalocean_client_id)
|
85
|
+
|
86
|
+
response = @connection.request(params)
|
87
|
+
|
88
|
+
unless response.body.empty?
|
89
|
+
response.body = Fog::JSON.decode(response.body)
|
90
|
+
if response.body['status'] != 'OK'
|
91
|
+
raise Fog::Errors::Error.new
|
92
|
+
end
|
93
|
+
end
|
94
|
+
response
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
# Getting started: the compute service
|
2
|
+
|
3
|
+
You'll need a DigitalOcean account and API key to use this provider.
|
4
|
+
|
5
|
+
Get one from http://www.digitalocean.com.
|
6
|
+
|
7
|
+
To generate the API key, login to the DigitalOcean web panel and go to
|
8
|
+
'My Settings -> API Access -> Generate a new API key'.
|
9
|
+
|
10
|
+
Write down the Client Key and API Key, you'll need both to use the service.
|
11
|
+
|
12
|
+
|
13
|
+
## Connecting, retrieving and managing server objects
|
14
|
+
|
15
|
+
Before we start, I guess it will be useful to the reader to know
|
16
|
+
that Fog servers are 'droplets' in DigitalOcean's parlance.
|
17
|
+
'Server' is the Fog way to name VMs, and we have
|
18
|
+
respected that in the DigitalOcean's Fog provider.
|
19
|
+
|
20
|
+
First, create a connection to the host:
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
require 'fog'
|
24
|
+
|
25
|
+
do = Fog::Compute.new({
|
26
|
+
:provider => 'DigitalOcean',
|
27
|
+
:digitalocean_api_key => 'poiuweoruwoeiuroiwuer', # your API key here
|
28
|
+
:digitalocean_client_id => 'lkjasoidfuoiu' # your client key here
|
29
|
+
})
|
30
|
+
```
|
31
|
+
|
32
|
+
## Listing servers
|
33
|
+
|
34
|
+
Listing servers and attributes:
|
35
|
+
|
36
|
+
```ruby
|
37
|
+
docean.servers.each do |server|
|
38
|
+
# remember, servers are droplets
|
39
|
+
server.id
|
40
|
+
server.name
|
41
|
+
server.status
|
42
|
+
server.backups_enabled
|
43
|
+
server.image_id
|
44
|
+
server.flavor_id # server 'size' in DigitalOcean's API parlance
|
45
|
+
server.region_id
|
46
|
+
end
|
47
|
+
```
|
48
|
+
|
49
|
+
## Server creation and life-cycle management
|
50
|
+
|
51
|
+
Creating a new server (droplet):
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
server = docean.servers.create :name => 'foobar',
|
55
|
+
# use the first image listed
|
56
|
+
:image_id => docean.images.first.id,
|
57
|
+
# use the first flavor listed
|
58
|
+
:flavor_id => docean.flavors.first.id,
|
59
|
+
# use the first region listed
|
60
|
+
:region_id => docean.regions.first.id
|
61
|
+
```
|
62
|
+
|
63
|
+
The server is automatically started after that.
|
64
|
+
|
65
|
+
We didn't pay attention when choosing the flavor, image and region used
|
66
|
+
but you can easily list them too, and then decide:
|
67
|
+
|
68
|
+
```ruby
|
69
|
+
docean.images.each do |image|
|
70
|
+
image.id
|
71
|
+
image.name
|
72
|
+
image.distribution
|
73
|
+
end
|
74
|
+
|
75
|
+
docean.flavors.each do |flavor|
|
76
|
+
flavor.id
|
77
|
+
flavor.name
|
78
|
+
end
|
79
|
+
|
80
|
+
docean.regions.each do |region|
|
81
|
+
region.id
|
82
|
+
region.name
|
83
|
+
end
|
84
|
+
|
85
|
+
```
|
86
|
+
|
87
|
+
Rebooting a server:
|
88
|
+
|
89
|
+
```ruby
|
90
|
+
server = docean.servers.first
|
91
|
+
server.reboot
|
92
|
+
```
|
93
|
+
|
94
|
+
Power cycle a server:
|
95
|
+
|
96
|
+
```ruby
|
97
|
+
server.power_cycle
|
98
|
+
```
|
99
|
+
|
100
|
+
Destroying the server:
|
101
|
+
|
102
|
+
```ruby
|
103
|
+
server.destroy
|
104
|
+
```
|
105
|
+
|
106
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
require 'fog/digitalocean/models/compute/flavor'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Compute
|
6
|
+
class DigitalOcean
|
7
|
+
|
8
|
+
class Flavors < Fog::Collection
|
9
|
+
model Fog::Compute::DigitalOcean::Flavor
|
10
|
+
|
11
|
+
def all
|
12
|
+
load service.list_flavors.body['sizes']
|
13
|
+
end
|
14
|
+
|
15
|
+
def get(id)
|
16
|
+
all.find { |f| f.id == id }
|
17
|
+
rescue Fog::Errors::NotFound
|
18
|
+
nil
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
require 'fog/digitalocean/models/compute/image'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Compute
|
6
|
+
class DigitalOcean
|
7
|
+
|
8
|
+
class Images < Fog::Collection
|
9
|
+
model Fog::Compute::DigitalOcean::Image
|
10
|
+
|
11
|
+
def all
|
12
|
+
load service.list_images.body['images']
|
13
|
+
end
|
14
|
+
|
15
|
+
def get(id)
|
16
|
+
all.find { |f| f.id == id }
|
17
|
+
rescue Fog::Errors::NotFound
|
18
|
+
nil
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
require 'fog/digitalocean/models/compute/region'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Compute
|
6
|
+
class DigitalOcean
|
7
|
+
|
8
|
+
class Regions < Fog::Collection
|
9
|
+
model Fog::Compute::DigitalOcean::Region
|
10
|
+
|
11
|
+
def all
|
12
|
+
load service.list_regions.body['regions']
|
13
|
+
end
|
14
|
+
|
15
|
+
def get(id)
|
16
|
+
all.find { |f| f.id == id }
|
17
|
+
rescue Fog::Errors::NotFound
|
18
|
+
nil
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,150 @@
|
|
1
|
+
require 'fog/compute/models/server'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class DigitalOcean
|
6
|
+
|
7
|
+
# A DigitalOcean Droplet
|
8
|
+
#
|
9
|
+
class Server < Fog::Compute::Server
|
10
|
+
|
11
|
+
identity :id
|
12
|
+
attribute :name
|
13
|
+
attribute :status
|
14
|
+
attribute :image_id
|
15
|
+
attribute :region_id
|
16
|
+
attribute :flavor_id, :aliases => :size_id
|
17
|
+
# Not documented in their API, but
|
18
|
+
# available nevertheless
|
19
|
+
attribute :ip_address
|
20
|
+
attribute :backups_active
|
21
|
+
|
22
|
+
# Reboot the server (soft reboot).
|
23
|
+
#
|
24
|
+
# The preferred method of rebooting a server.
|
25
|
+
def reboot
|
26
|
+
requires :id
|
27
|
+
service.reboot_server self.id
|
28
|
+
end
|
29
|
+
|
30
|
+
# Reboot the server (hard reboot).
|
31
|
+
#
|
32
|
+
# Powers the server off and then powers it on again.
|
33
|
+
def power_cycle
|
34
|
+
requires :id
|
35
|
+
service.power_cycle_server self.id
|
36
|
+
end
|
37
|
+
|
38
|
+
# Shutdown the server
|
39
|
+
#
|
40
|
+
# Sends a shutdown signal to the operating system.
|
41
|
+
# The server consumes resources while powered off
|
42
|
+
# so you are still charged.
|
43
|
+
#
|
44
|
+
# @see https://www.digitalocean.com/community/questions/am-i-charged-while-my-droplet-is-in-a-powered-off-state
|
45
|
+
def shutdown
|
46
|
+
requires :id
|
47
|
+
service.shutdown_server self.id
|
48
|
+
end
|
49
|
+
|
50
|
+
# Power off the server
|
51
|
+
#
|
52
|
+
# Works as a power switch.
|
53
|
+
# The server consumes resources while powered off
|
54
|
+
# so you are still charged.
|
55
|
+
#
|
56
|
+
# @see https://www.digitalocean.com/community/questions/am-i-charged-while-my-droplet-is-in-a-powered-off-state
|
57
|
+
def stop
|
58
|
+
requires :id
|
59
|
+
service.power_off_server self.id
|
60
|
+
end
|
61
|
+
|
62
|
+
# Power on the server.
|
63
|
+
#
|
64
|
+
# The server consumes resources while powered on
|
65
|
+
# so you will be charged.
|
66
|
+
#
|
67
|
+
# Each time a server is spun up, even if for a few seconds,
|
68
|
+
# it is charged for an hour.
|
69
|
+
#
|
70
|
+
def start
|
71
|
+
requires :id
|
72
|
+
service.power_on_server self.id
|
73
|
+
end
|
74
|
+
|
75
|
+
# Creates the server (not to be called directly).
|
76
|
+
#
|
77
|
+
# Usually called by Fog::Collection#create
|
78
|
+
#
|
79
|
+
# do = Fog::Compute.new({
|
80
|
+
# :provider => 'DigitalOcean',
|
81
|
+
# :digitalocean_api_key => 'key-here', # your API key here
|
82
|
+
# :digitalocean_client_id => 'client-id-here' # your client key here
|
83
|
+
# })
|
84
|
+
# do.servers.create :name => 'foobar',
|
85
|
+
# :image_id => image_id_here,
|
86
|
+
# :flavor_id => flavor_id_here,
|
87
|
+
# :region_id => region_id_here
|
88
|
+
#
|
89
|
+
# @return [Boolean]
|
90
|
+
def save
|
91
|
+
raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if persisted?
|
92
|
+
requires :name, :flavor_id, :image_id, :region_id
|
93
|
+
|
94
|
+
options = {}
|
95
|
+
if attributes[:ssh_key_ids]
|
96
|
+
options[:ssh_key_ids] = attributes[:ssh_key_ids]
|
97
|
+
end
|
98
|
+
data = service.create_server name,
|
99
|
+
flavor_id,
|
100
|
+
image_id,
|
101
|
+
region_id,
|
102
|
+
options
|
103
|
+
merge_attributes(data.body['droplet'])
|
104
|
+
true
|
105
|
+
end
|
106
|
+
|
107
|
+
# Destroy the server, freeing up the resources.
|
108
|
+
#
|
109
|
+
# DigitalOcean will stop charging you for the resources
|
110
|
+
# the server was using.
|
111
|
+
#
|
112
|
+
# Once the server has been destroyed, there's no way
|
113
|
+
# to recover it so the data is irrecoverably lost.
|
114
|
+
#
|
115
|
+
# IMPORTANT: As of 2013/01/31, you should wait some time to
|
116
|
+
# destroy the server after creating it. If you try to destroy
|
117
|
+
# the server too fast, the destroy event may be lost and the
|
118
|
+
# server will remain running and consuming resources, so
|
119
|
+
# DigitalOcean will keep charging you.
|
120
|
+
# Double checked this with DigitalOcean staff and confirmed
|
121
|
+
# that it's the way it works right now.
|
122
|
+
#
|
123
|
+
# Double check the server has been destroyed!
|
124
|
+
def destroy
|
125
|
+
requires :id
|
126
|
+
service.destroy_server id
|
127
|
+
end
|
128
|
+
|
129
|
+
# Checks whether the server status is 'active'.
|
130
|
+
#
|
131
|
+
# The server transitions from 'new' to 'active' sixty to ninety
|
132
|
+
# seconds after creating it (time varies and may take more
|
133
|
+
# than 90 secs).
|
134
|
+
#
|
135
|
+
# @return [Boolean]
|
136
|
+
def ready?
|
137
|
+
status == 'active'
|
138
|
+
end
|
139
|
+
|
140
|
+
# DigitalOcean API does not support updating server state
|
141
|
+
def update
|
142
|
+
msg = 'DigitalOcean servers do not support updates'
|
143
|
+
raise NotImplementedError.new(msg)
|
144
|
+
end
|
145
|
+
|
146
|
+
end
|
147
|
+
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|