ey-pro-cli 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +35 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +94 -0
- data/README.md +1 -0
- data/bin/ey-pro +5 -0
- data/ey-pro-cli.gemspec +40 -0
- data/lib/ey_pro_cli.rb +100 -0
- data/lib/ey_pro_cli/version.rb +3 -0
- data/lib/vendor/core/ey-core.rb +58 -0
- data/lib/vendor/core/ey-core/associations.rb +155 -0
- data/lib/vendor/core/ey-core/cli.rb +107 -0
- data/lib/vendor/core/ey-core/client.rb +764 -0
- data/lib/vendor/core/ey-core/collection.rb +131 -0
- data/lib/vendor/core/ey-core/collections/account_cancellations.rb +6 -0
- data/lib/vendor/core/ey-core/collections/account_referrals.rb +10 -0
- data/lib/vendor/core/ey-core/collections/accounts.rb +8 -0
- data/lib/vendor/core/ey-core/collections/addon_attachments.rb +17 -0
- data/lib/vendor/core/ey-core/collections/addons.rb +16 -0
- data/lib/vendor/core/ey-core/collections/addresses.rb +9 -0
- data/lib/vendor/core/ey-core/collections/alerts.rb +9 -0
- data/lib/vendor/core/ey-core/collections/application_archives.rb +9 -0
- data/lib/vendor/core/ey-core/collections/application_deployments.rb +9 -0
- data/lib/vendor/core/ey-core/collections/applications.rb +9 -0
- data/lib/vendor/core/ey-core/collections/backup_files.rb +9 -0
- data/lib/vendor/core/ey-core/collections/backups.rb +9 -0
- data/lib/vendor/core/ey-core/collections/cluster_components.rb +9 -0
- data/lib/vendor/core/ey-core/collections/cluster_updates.rb +9 -0
- data/lib/vendor/core/ey-core/collections/clusters.rb +9 -0
- data/lib/vendor/core/ey-core/collections/component_actions.rb +9 -0
- data/lib/vendor/core/ey-core/collections/components.rb +9 -0
- data/lib/vendor/core/ey-core/collections/connectors.rb +9 -0
- data/lib/vendor/core/ey-core/collections/contacts.rb +9 -0
- data/lib/vendor/core/ey-core/collections/costs.rb +8 -0
- data/lib/vendor/core/ey-core/collections/database_plan_usages.rb +7 -0
- data/lib/vendor/core/ey-core/collections/database_server_revisions.rb +7 -0
- data/lib/vendor/core/ey-core/collections/database_server_snapshots.rb +17 -0
- data/lib/vendor/core/ey-core/collections/database_server_usages.rb +7 -0
- data/lib/vendor/core/ey-core/collections/database_servers.rb +9 -0
- data/lib/vendor/core/ey-core/collections/database_services.rb +9 -0
- data/lib/vendor/core/ey-core/collections/environment_plan_usages.rb +7 -0
- data/lib/vendor/core/ey-core/collections/environments.rb +15 -0
- data/lib/vendor/core/ey-core/collections/features.rb +9 -0
- data/lib/vendor/core/ey-core/collections/firewall_rules.rb +9 -0
- data/lib/vendor/core/ey-core/collections/firewalls.rb +9 -0
- data/lib/vendor/core/ey-core/collections/gems.rb +6 -0
- data/lib/vendor/core/ey-core/collections/keypair_deployments.rb +9 -0
- data/lib/vendor/core/ey-core/collections/keypairs.rb +9 -0
- data/lib/vendor/core/ey-core/collections/legacy_alerts.rb +9 -0
- data/lib/vendor/core/ey-core/collections/load_balancer_nodes.rb +9 -0
- data/lib/vendor/core/ey-core/collections/load_balancer_services.rb +9 -0
- data/lib/vendor/core/ey-core/collections/load_balancers.rb +16 -0
- data/lib/vendor/core/ey-core/collections/logical_databases.rb +16 -0
- data/lib/vendor/core/ey-core/collections/logs.rb +9 -0
- data/lib/vendor/core/ey-core/collections/memberships.rb +9 -0
- data/lib/vendor/core/ey-core/collections/messages.rb +9 -0
- data/lib/vendor/core/ey-core/collections/plan_usages.rb +7 -0
- data/lib/vendor/core/ey-core/collections/provider_locations.rb +13 -0
- data/lib/vendor/core/ey-core/collections/providers.rb +15 -0
- data/lib/vendor/core/ey-core/collections/requests.rb +10 -0
- data/lib/vendor/core/ey-core/collections/server_events.rb +9 -0
- data/lib/vendor/core/ey-core/collections/server_usages.rb +7 -0
- data/lib/vendor/core/ey-core/collections/servers.rb +9 -0
- data/lib/vendor/core/ey-core/collections/slot_components.rb +9 -0
- data/lib/vendor/core/ey-core/collections/slots.rb +30 -0
- data/lib/vendor/core/ey-core/collections/ssl_certificates.rb +9 -0
- data/lib/vendor/core/ey-core/collections/storage_users.rb +10 -0
- data/lib/vendor/core/ey-core/collections/storages.rb +9 -0
- data/lib/vendor/core/ey-core/collections/tasks.rb +9 -0
- data/lib/vendor/core/ey-core/collections/tokens.rb +8 -0
- data/lib/vendor/core/ey-core/collections/untracked_servers.rb +9 -0
- data/lib/vendor/core/ey-core/collections/users.rb +12 -0
- data/lib/vendor/core/ey-core/collections/volumes.rb +9 -0
- data/lib/vendor/core/ey-core/logger.rb +31 -0
- data/lib/vendor/core/ey-core/memory_cache.rb +17 -0
- data/lib/vendor/core/ey-core/mock/helper.rb +102 -0
- data/lib/vendor/core/ey-core/mock/params.rb +31 -0
- data/lib/vendor/core/ey-core/mock/resources.rb +120 -0
- data/lib/vendor/core/ey-core/mock/searching.rb +111 -0
- data/lib/vendor/core/ey-core/mock/util.rb +19 -0
- data/lib/vendor/core/ey-core/model.rb +39 -0
- data/lib/vendor/core/ey-core/models/account.rb +63 -0
- data/lib/vendor/core/ey-core/models/account_cancellation.rb +6 -0
- data/lib/vendor/core/ey-core/models/account_referral.rb +8 -0
- data/lib/vendor/core/ey-core/models/account_trial.rb +15 -0
- data/lib/vendor/core/ey-core/models/addon.rb +45 -0
- data/lib/vendor/core/ey-core/models/addon_attachment.rb +36 -0
- data/lib/vendor/core/ey-core/models/address.rb +46 -0
- data/lib/vendor/core/ey-core/models/alert.rb +88 -0
- data/lib/vendor/core/ey-core/models/application.rb +32 -0
- data/lib/vendor/core/ey-core/models/application_archive.rb +67 -0
- data/lib/vendor/core/ey-core/models/application_deployment.rb +18 -0
- data/lib/vendor/core/ey-core/models/backup.rb +36 -0
- data/lib/vendor/core/ey-core/models/backup_file.rb +52 -0
- data/lib/vendor/core/ey-core/models/billing.rb +27 -0
- data/lib/vendor/core/ey-core/models/cluster.rb +80 -0
- data/lib/vendor/core/ey-core/models/cluster_component.rb +62 -0
- data/lib/vendor/core/ey-core/models/cluster_update.rb +32 -0
- data/lib/vendor/core/ey-core/models/component.rb +11 -0
- data/lib/vendor/core/ey-core/models/component_action.rb +29 -0
- data/lib/vendor/core/ey-core/models/connector.rb +34 -0
- data/lib/vendor/core/ey-core/models/contact.rb +14 -0
- data/lib/vendor/core/ey-core/models/cost.rb +16 -0
- data/lib/vendor/core/ey-core/models/database_plan_usage.rb +10 -0
- data/lib/vendor/core/ey-core/models/database_server.rb +56 -0
- data/lib/vendor/core/ey-core/models/database_server_revision.rb +10 -0
- data/lib/vendor/core/ey-core/models/database_server_snapshot.rb +16 -0
- data/lib/vendor/core/ey-core/models/database_server_usage.rb +15 -0
- data/lib/vendor/core/ey-core/models/database_service.rb +53 -0
- data/lib/vendor/core/ey-core/models/environment.rb +68 -0
- data/lib/vendor/core/ey-core/models/environment_plan_usage.rb +10 -0
- data/lib/vendor/core/ey-core/models/feature.rb +33 -0
- data/lib/vendor/core/ey-core/models/firewall.rb +45 -0
- data/lib/vendor/core/ey-core/models/firewall_rule.rb +41 -0
- data/lib/vendor/core/ey-core/models/gem.rb +5 -0
- data/lib/vendor/core/ey-core/models/keypair.rb +38 -0
- data/lib/vendor/core/ey-core/models/keypair_deployment.rb +26 -0
- data/lib/vendor/core/ey-core/models/legacy_alert.rb +12 -0
- data/lib/vendor/core/ey-core/models/load_balancer.rb +43 -0
- data/lib/vendor/core/ey-core/models/load_balancer_node.rb +17 -0
- data/lib/vendor/core/ey-core/models/load_balancer_service.rb +22 -0
- data/lib/vendor/core/ey-core/models/log.rb +33 -0
- data/lib/vendor/core/ey-core/models/logical_database.rb +40 -0
- data/lib/vendor/core/ey-core/models/membership.rb +42 -0
- data/lib/vendor/core/ey-core/models/message.rb +27 -0
- data/lib/vendor/core/ey-core/models/metadata.rb +15 -0
- data/lib/vendor/core/ey-core/models/plan_usage.rb +14 -0
- data/lib/vendor/core/ey-core/models/provider.rb +59 -0
- data/lib/vendor/core/ey-core/models/provider_location.rb +11 -0
- data/lib/vendor/core/ey-core/models/request.rb +89 -0
- data/lib/vendor/core/ey-core/models/server.rb +69 -0
- data/lib/vendor/core/ey-core/models/server_event.rb +11 -0
- data/lib/vendor/core/ey-core/models/server_usage.rb +13 -0
- data/lib/vendor/core/ey-core/models/slot.rb +64 -0
- data/lib/vendor/core/ey-core/models/slot_component.rb +28 -0
- data/lib/vendor/core/ey-core/models/ssl_certificate.rb +44 -0
- data/lib/vendor/core/ey-core/models/storage.rb +38 -0
- data/lib/vendor/core/ey-core/models/storage_user.rb +44 -0
- data/lib/vendor/core/ey-core/models/task.rb +35 -0
- data/lib/vendor/core/ey-core/models/token.rb +20 -0
- data/lib/vendor/core/ey-core/models/untracked_server.rb +45 -0
- data/lib/vendor/core/ey-core/models/user.rb +35 -0
- data/lib/vendor/core/ey-core/models/volume.rb +20 -0
- data/lib/vendor/core/ey-core/request_failure.rb +11 -0
- data/lib/vendor/core/ey-core/requests/attach_address.rb +53 -0
- data/lib/vendor/core/ey-core/requests/authorized_channel.rb +22 -0
- data/lib/vendor/core/ey-core/requests/bootstrap_logical_database.rb +80 -0
- data/lib/vendor/core/ey-core/requests/cancel_account.rb +33 -0
- data/lib/vendor/core/ey-core/requests/create_account.rb +33 -0
- data/lib/vendor/core/ey-core/requests/create_addon.rb +35 -0
- data/lib/vendor/core/ey-core/requests/create_address.rb +53 -0
- data/lib/vendor/core/ey-core/requests/create_alert.rb +60 -0
- data/lib/vendor/core/ey-core/requests/create_application.rb +55 -0
- data/lib/vendor/core/ey-core/requests/create_application_archive.rb +44 -0
- data/lib/vendor/core/ey-core/requests/create_backup.rb +46 -0
- data/lib/vendor/core/ey-core/requests/create_backup_file.rb +52 -0
- data/lib/vendor/core/ey-core/requests/create_cluster.rb +98 -0
- data/lib/vendor/core/ey-core/requests/create_cluster_component.rb +57 -0
- data/lib/vendor/core/ey-core/requests/create_cluster_update.rb +208 -0
- data/lib/vendor/core/ey-core/requests/create_connector.rb +46 -0
- data/lib/vendor/core/ey-core/requests/create_database_server.rb +72 -0
- data/lib/vendor/core/ey-core/requests/create_database_service.rb +57 -0
- data/lib/vendor/core/ey-core/requests/create_environment.rb +57 -0
- data/lib/vendor/core/ey-core/requests/create_firewall.rb +62 -0
- data/lib/vendor/core/ey-core/requests/create_firewall_rule.rb +60 -0
- data/lib/vendor/core/ey-core/requests/create_keypair.rb +42 -0
- data/lib/vendor/core/ey-core/requests/create_keypair_deployment.rb +36 -0
- data/lib/vendor/core/ey-core/requests/create_load_balancer.rb +62 -0
- data/lib/vendor/core/ey-core/requests/create_log.rb +53 -0
- data/lib/vendor/core/ey-core/requests/create_logical_database.rb +56 -0
- data/lib/vendor/core/ey-core/requests/create_membership.rb +33 -0
- data/lib/vendor/core/ey-core/requests/create_message.rb +35 -0
- data/lib/vendor/core/ey-core/requests/create_provider.rb +90 -0
- data/lib/vendor/core/ey-core/requests/create_slots.rb +100 -0
- data/lib/vendor/core/ey-core/requests/create_ssl_certificate.rb +83 -0
- data/lib/vendor/core/ey-core/requests/create_storage.rb +64 -0
- data/lib/vendor/core/ey-core/requests/create_storage_user.rb +64 -0
- data/lib/vendor/core/ey-core/requests/create_task.rb +55 -0
- data/lib/vendor/core/ey-core/requests/create_token.rb +24 -0
- data/lib/vendor/core/ey-core/requests/create_untracked_server.rb +39 -0
- data/lib/vendor/core/ey-core/requests/create_user.rb +48 -0
- data/lib/vendor/core/ey-core/requests/destroy_addon.rb +24 -0
- data/lib/vendor/core/ey-core/requests/destroy_cluster.rb +30 -0
- data/lib/vendor/core/ey-core/requests/destroy_database_server.rb +41 -0
- data/lib/vendor/core/ey-core/requests/destroy_database_service.rb +57 -0
- data/lib/vendor/core/ey-core/requests/destroy_environment.rb +43 -0
- data/lib/vendor/core/ey-core/requests/destroy_firewall.rb +41 -0
- data/lib/vendor/core/ey-core/requests/destroy_firewall_rule.rb +41 -0
- data/lib/vendor/core/ey-core/requests/destroy_load_balancer.rb +30 -0
- data/lib/vendor/core/ey-core/requests/destroy_logical_database.rb +41 -0
- data/lib/vendor/core/ey-core/requests/destroy_provider.rb +34 -0
- data/lib/vendor/core/ey-core/requests/destroy_server.rb +46 -0
- data/lib/vendor/core/ey-core/requests/destroy_ssl_certificate.rb +28 -0
- data/lib/vendor/core/ey-core/requests/destroy_storage.rb +33 -0
- data/lib/vendor/core/ey-core/requests/destroy_storage_user.rb +38 -0
- data/lib/vendor/core/ey-core/requests/destroy_user.rb +29 -0
- data/lib/vendor/core/ey-core/requests/detach_address.rb +48 -0
- data/lib/vendor/core/ey-core/requests/disable_feature.rb +30 -0
- data/lib/vendor/core/ey-core/requests/discover_database_server.rb +66 -0
- data/lib/vendor/core/ey-core/requests/discover_database_server_snapshots.rb +69 -0
- data/lib/vendor/core/ey-core/requests/discover_provider_location.rb +57 -0
- data/lib/vendor/core/ey-core/requests/download_file.rb +25 -0
- data/lib/vendor/core/ey-core/requests/enable_feature.rb +35 -0
- data/lib/vendor/core/ey-core/requests/finish_backup.rb +26 -0
- data/lib/vendor/core/ey-core/requests/get_account.rb +29 -0
- data/lib/vendor/core/ey-core/requests/get_account_cancellation.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_account_referrals.rb +28 -0
- data/lib/vendor/core/ey-core/requests/get_account_trial.rb +31 -0
- data/lib/vendor/core/ey-core/requests/get_accounts.rb +42 -0
- data/lib/vendor/core/ey-core/requests/get_addon.rb +25 -0
- data/lib/vendor/core/ey-core/requests/get_addon_attachment.rb +33 -0
- data/lib/vendor/core/ey-core/requests/get_addon_attachments.rb +42 -0
- data/lib/vendor/core/ey-core/requests/get_addons.rb +24 -0
- data/lib/vendor/core/ey-core/requests/get_address.rb +25 -0
- data/lib/vendor/core/ey-core/requests/get_addresses.rb +27 -0
- data/lib/vendor/core/ey-core/requests/get_alert.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_alerting_environments.rb +37 -0
- data/lib/vendor/core/ey-core/requests/get_alerts.rb +40 -0
- data/lib/vendor/core/ey-core/requests/get_application.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_application_archive.rb +32 -0
- data/lib/vendor/core/ey-core/requests/get_application_archives.rb +29 -0
- data/lib/vendor/core/ey-core/requests/get_application_deployment.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_application_deployments.rb +28 -0
- data/lib/vendor/core/ey-core/requests/get_applications.rb +28 -0
- data/lib/vendor/core/ey-core/requests/get_backup.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_backup_file.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_backup_files.rb +28 -0
- data/lib/vendor/core/ey-core/requests/get_backups.rb +27 -0
- data/lib/vendor/core/ey-core/requests/get_billing.rb +24 -0
- data/lib/vendor/core/ey-core/requests/get_cluster.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_cluster_component.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_cluster_components.rb +28 -0
- data/lib/vendor/core/ey-core/requests/get_cluster_update.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_cluster_updates.rb +26 -0
- data/lib/vendor/core/ey-core/requests/get_clusters.rb +35 -0
- data/lib/vendor/core/ey-core/requests/get_component.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_component_action.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_component_actions.rb +29 -0
- data/lib/vendor/core/ey-core/requests/get_components.rb +29 -0
- data/lib/vendor/core/ey-core/requests/get_connector.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_connectors.rb +37 -0
- data/lib/vendor/core/ey-core/requests/get_contacts.rb +34 -0
- data/lib/vendor/core/ey-core/requests/get_costs.rb +25 -0
- data/lib/vendor/core/ey-core/requests/get_current_user.rb +19 -0
- data/lib/vendor/core/ey-core/requests/get_database_plan_usages.rb +24 -0
- data/lib/vendor/core/ey-core/requests/get_database_server.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_database_server_revisions.rb +27 -0
- data/lib/vendor/core/ey-core/requests/get_database_server_snapshot.rb +20 -0
- data/lib/vendor/core/ey-core/requests/get_database_server_snapshots.rb +34 -0
- data/lib/vendor/core/ey-core/requests/get_database_server_usages.rb +24 -0
- data/lib/vendor/core/ey-core/requests/get_database_servers.rb +30 -0
- data/lib/vendor/core/ey-core/requests/get_database_servers_firewalls.rb +30 -0
- data/lib/vendor/core/ey-core/requests/get_database_service.rb +20 -0
- data/lib/vendor/core/ey-core/requests/get_database_services.rb +55 -0
- data/lib/vendor/core/ey-core/requests/get_environment.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_environment_database_services.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_environment_logical_databases.rb +20 -0
- data/lib/vendor/core/ey-core/requests/get_environment_plan_usages.rb +24 -0
- data/lib/vendor/core/ey-core/requests/get_environments.rb +29 -0
- data/lib/vendor/core/ey-core/requests/get_feature.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_features.rb +28 -0
- data/lib/vendor/core/ey-core/requests/get_firewall.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_firewall_rule.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_firewall_rules.rb +29 -0
- data/lib/vendor/core/ey-core/requests/get_firewalls.rb +45 -0
- data/lib/vendor/core/ey-core/requests/get_gem.rb +24 -0
- data/lib/vendor/core/ey-core/requests/get_keypair.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_keypair_deployment.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_keypair_deployments.rb +29 -0
- data/lib/vendor/core/ey-core/requests/get_keypairs.rb +34 -0
- data/lib/vendor/core/ey-core/requests/get_legacy_alert.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_legacy_alerts.rb +29 -0
- data/lib/vendor/core/ey-core/requests/get_load_balancer.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_load_balancer_node.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_load_balancer_nodes.rb +30 -0
- data/lib/vendor/core/ey-core/requests/get_load_balancer_service.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_load_balancer_services.rb +30 -0
- data/lib/vendor/core/ey-core/requests/get_load_balancers.rb +29 -0
- data/lib/vendor/core/ey-core/requests/get_log.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_logical_database.rb +23 -0
- data/lib/vendor/core/ey-core/requests/get_logical_databases.rb +43 -0
- data/lib/vendor/core/ey-core/requests/get_logs.rb +37 -0
- data/lib/vendor/core/ey-core/requests/get_membership.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_message.rb +28 -0
- data/lib/vendor/core/ey-core/requests/get_messages.rb +27 -0
- data/lib/vendor/core/ey-core/requests/get_metadata.rb +26 -0
- data/lib/vendor/core/ey-core/requests/get_operational_contact.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_operational_contacts.rb +20 -0
- data/lib/vendor/core/ey-core/requests/get_plan_usages.rb +24 -0
- data/lib/vendor/core/ey-core/requests/get_possible_provider_locations.rb +19 -0
- data/lib/vendor/core/ey-core/requests/get_provider.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_provider_location.rb +29 -0
- data/lib/vendor/core/ey-core/requests/get_provider_locations.rb +28 -0
- data/lib/vendor/core/ey-core/requests/get_providers.rb +28 -0
- data/lib/vendor/core/ey-core/requests/get_request.rb +71 -0
- data/lib/vendor/core/ey-core/requests/get_requests.rb +29 -0
- data/lib/vendor/core/ey-core/requests/get_server.rb +34 -0
- data/lib/vendor/core/ey-core/requests/get_server_event.rb +20 -0
- data/lib/vendor/core/ey-core/requests/get_server_events.rb +28 -0
- data/lib/vendor/core/ey-core/requests/get_server_usages.rb +24 -0
- data/lib/vendor/core/ey-core/requests/get_servers.rb +25 -0
- data/lib/vendor/core/ey-core/requests/get_slot.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_slot_component.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_slot_components.rb +36 -0
- data/lib/vendor/core/ey-core/requests/get_slots.rb +28 -0
- data/lib/vendor/core/ey-core/requests/get_ssl_certificate.rb +23 -0
- data/lib/vendor/core/ey-core/requests/get_ssl_certificates.rb +28 -0
- data/lib/vendor/core/ey-core/requests/get_storage.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_storage_user.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_storage_users.rb +28 -0
- data/lib/vendor/core/ey-core/requests/get_storages.rb +28 -0
- data/lib/vendor/core/ey-core/requests/get_task.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_tasks.rb +28 -0
- data/lib/vendor/core/ey-core/requests/get_untracked_server.rb +18 -0
- data/lib/vendor/core/ey-core/requests/get_untracked_servers.rb +24 -0
- data/lib/vendor/core/ey-core/requests/get_user.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_users.rb +42 -0
- data/lib/vendor/core/ey-core/requests/get_volume.rb +21 -0
- data/lib/vendor/core/ey-core/requests/get_volumes.rb +28 -0
- data/lib/vendor/core/ey-core/requests/reboot_server.rb +39 -0
- data/lib/vendor/core/ey-core/requests/request_callback.rb +24 -0
- data/lib/vendor/core/ey-core/requests/run_cluster_application_action.rb +28 -0
- data/lib/vendor/core/ey-core/requests/run_cluster_component_action.rb +181 -0
- data/lib/vendor/core/ey-core/requests/run_environment_application_action.rb +29 -0
- data/lib/vendor/core/ey-core/requests/signup.rb +60 -0
- data/lib/vendor/core/ey-core/requests/update_addon.rb +28 -0
- data/lib/vendor/core/ey-core/requests/update_addon_attachment.rb +63 -0
- data/lib/vendor/core/ey-core/requests/update_alert.rb +32 -0
- data/lib/vendor/core/ey-core/requests/update_application_archive.rb +23 -0
- data/lib/vendor/core/ey-core/requests/update_billing.rb +26 -0
- data/lib/vendor/core/ey-core/requests/update_cluster.rb +33 -0
- data/lib/vendor/core/ey-core/requests/update_cluster_component.rb +29 -0
- data/lib/vendor/core/ey-core/requests/update_connector.rb +32 -0
- data/lib/vendor/core/ey-core/requests/update_membership.rb +29 -0
- data/lib/vendor/core/ey-core/requests/update_server.rb +29 -0
- data/lib/vendor/core/ey-core/requests/update_slot.rb +37 -0
- data/lib/vendor/core/ey-core/requests/update_slot_component.rb +29 -0
- data/lib/vendor/core/ey-core/requests/update_ssl_certificate.rb +25 -0
- data/lib/vendor/core/ey-core/requests/update_untracked_server.rb +24 -0
- data/lib/vendor/core/ey-core/requests/upload_file.rb +44 -0
- data/lib/vendor/core/ey-core/response.rb +55 -0
- data/lib/vendor/core/ey-core/response_cache.rb +29 -0
- data/lib/vendor/core/ey-core/subscribable.rb +49 -0
- data/lib/vendor/core/ey-core/token_authentication.rb +13 -0
- data/lib/vendor/core/ey-core/version.rb +5 -0
- metadata +577 -0
@@ -0,0 +1,57 @@
|
|
1
|
+
class Ey::Core::Client
|
2
|
+
class Real
|
3
|
+
def create_cluster_component(params={})
|
4
|
+
cluster_id = params["cluster"]
|
5
|
+
component_id = params["component"]
|
6
|
+
url = params.delete("url")
|
7
|
+
|
8
|
+
request(
|
9
|
+
:method => :post,
|
10
|
+
:path => "/clusters/#{cluster_id}/components/#{component_id}",
|
11
|
+
:url => url,
|
12
|
+
:body => params,
|
13
|
+
)
|
14
|
+
end
|
15
|
+
end # Real
|
16
|
+
|
17
|
+
class Mock
|
18
|
+
def create_cluster_component(params={})
|
19
|
+
url_params = params["url"] && path_params(params.delete("url"))
|
20
|
+
|
21
|
+
cluster_id = url_params && url_params["clusters"]
|
22
|
+
cluster_id ||= params.delete("cluster")
|
23
|
+
find(:clusters, cluster_id)
|
24
|
+
|
25
|
+
component_id = url_params && url_params["components"]
|
26
|
+
component_id ||= params.delete("component")
|
27
|
+
find(:components, component_id)
|
28
|
+
|
29
|
+
resource_id = self.uuid
|
30
|
+
|
31
|
+
resource = params["cluster_component"]
|
32
|
+
|
33
|
+
configuration = resource["configuration"] = normalize_hash(resource["configuration"] || {})
|
34
|
+
|
35
|
+
if application_id = configuration["application"]
|
36
|
+
find(:applications, application_id)
|
37
|
+
resource.merge!("application" => url_for("/applications/#{application_id}"))
|
38
|
+
end
|
39
|
+
|
40
|
+
resource.merge!(
|
41
|
+
"id" => resource_id,
|
42
|
+
"component" => url_for("/components/#{component_id}"),
|
43
|
+
"cluster" => url_for("/clusters/#{cluster_id}"),
|
44
|
+
"connectors" => url_for("/cluster-components/#{resource_id}/connectors"),
|
45
|
+
"tasks" => url_for("/cluster-components/#{resource_id}/tasks"),
|
46
|
+
"keypairs" => url_for("/cluster-components/#{resource_id}/keypairs"),
|
47
|
+
)
|
48
|
+
|
49
|
+
self.data[:cluster_components][resource_id] = resource
|
50
|
+
|
51
|
+
response(
|
52
|
+
:body => {"cluster_component" => resource},
|
53
|
+
:status => 201,
|
54
|
+
)
|
55
|
+
end
|
56
|
+
end # Mock
|
57
|
+
end # Ey::Core::Client
|
@@ -0,0 +1,208 @@
|
|
1
|
+
class Ey::Core::Client
|
2
|
+
class Real
|
3
|
+
def create_cluster_update(params={})
|
4
|
+
cluster_id = params.delete("cluster")
|
5
|
+
url = params.delete("url")
|
6
|
+
|
7
|
+
request(
|
8
|
+
:body => params,
|
9
|
+
:method => :post,
|
10
|
+
:path => "/clusters/#{cluster_id}/updates",
|
11
|
+
:url => url,
|
12
|
+
)
|
13
|
+
end
|
14
|
+
end # Real
|
15
|
+
|
16
|
+
class Mock
|
17
|
+
def create_cluster_update(params={})
|
18
|
+
extract_url_params!(params)
|
19
|
+
|
20
|
+
request_id = self.uuid
|
21
|
+
|
22
|
+
cluster_id = resource_identity(params["cluster"])
|
23
|
+
cluster_url = url_for("/clusters/#{cluster_id}")
|
24
|
+
|
25
|
+
cluster = find(:clusters, cluster_id)
|
26
|
+
provider_url = cluster["provider"]
|
27
|
+
provider = find(:providers, provider_url)
|
28
|
+
location = cluster["location"]["id"]
|
29
|
+
|
30
|
+
block_device_map = [
|
31
|
+
{
|
32
|
+
"mount" => "/",
|
33
|
+
"file_system" => "ext4",
|
34
|
+
"device" => "/dev/sda",
|
35
|
+
"size" => 100,
|
36
|
+
"delete_on_termination" => true,
|
37
|
+
"volume_type" => "gp2",
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"mount" => "/mnt",
|
41
|
+
"file_system" => "ext4",
|
42
|
+
"device" => "/dev/sdo",
|
43
|
+
"delete_on_termination" => true,
|
44
|
+
"size" => 100,
|
45
|
+
"volume_type" => "gp2",
|
46
|
+
},
|
47
|
+
{
|
48
|
+
"mount" => nil,
|
49
|
+
"file_system" => "swap",
|
50
|
+
"device" => "/dev/sdp",
|
51
|
+
"delete_on_termination" => true,
|
52
|
+
"size" => 8,
|
53
|
+
"volume_type" => "gp2",
|
54
|
+
},
|
55
|
+
{ "device" => "/dev/sdb", "name" => "ephemeral0", },
|
56
|
+
]
|
57
|
+
|
58
|
+
procedure = lambda do |_|
|
59
|
+
# TODO: dependencies?
|
60
|
+
|
61
|
+
unless provider["type"] == "azure"
|
62
|
+
firewalls = cluster["configuration"]["firewalls"] rescue []
|
63
|
+
|
64
|
+
# create new firewalls
|
65
|
+
existing_firewalls = self.data[:cluster_firewalls].inject([]) { |r, (c_id, f_id)| c_id == cluster_id ? r << self.data[:firewalls][f_id] : r }
|
66
|
+
new_firewalls = firewalls.reject { |f| existing_firewalls.find {|ef| ef["name"] == f["name"] } }
|
67
|
+
|
68
|
+
new_firewalls.each do |firewall|
|
69
|
+
request = create_firewall({
|
70
|
+
"provider" => provider_url,
|
71
|
+
"cluster" => cluster,
|
72
|
+
"firewall" => {
|
73
|
+
"name" => firewall["name"],
|
74
|
+
},
|
75
|
+
})
|
76
|
+
get_request("id" => request.body["request"]["id"])
|
77
|
+
end
|
78
|
+
|
79
|
+
# create new firewall rules
|
80
|
+
firewalls.each do |firewall|
|
81
|
+
firewall_id = search(self.data[:firewalls], "name" => firewall["name"]).keys.first
|
82
|
+
|
83
|
+
existing_rules = search(self.data[:firewalls], "firewall" => url_for("/firewalls/#{firewall_id}")).values
|
84
|
+
new_rules = firewall["rules"].reject {|r| existing_rules.detect {|er| er.port_range == r["port_range"] && er.source == r["source"] } }
|
85
|
+
|
86
|
+
new_rules.each do |rule|
|
87
|
+
request = create_firewall_rule({
|
88
|
+
"firewall" => firewall_id,
|
89
|
+
"firewall_rule" => rule,
|
90
|
+
})
|
91
|
+
get_request("id" => request.body["request"]["id"])
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
# deprovision servers for retired slots
|
97
|
+
slots = self.data[:slots].values.select{|s|
|
98
|
+
next unless s["cluster"] == cluster_url
|
99
|
+
if s["retired_at"]
|
100
|
+
s["deleted_at"] = Time.now.to_s
|
101
|
+
|
102
|
+
if server_id = resource_identity(s["server"])
|
103
|
+
self.data[:servers][server_id]["deleted_at"] = Time.now.to_s
|
104
|
+
end
|
105
|
+
end
|
106
|
+
s["deleted_at"].nil?
|
107
|
+
}
|
108
|
+
|
109
|
+
# provision new servers for empty slots
|
110
|
+
slots.select{|s| s["server"].nil?}.each do |slot|
|
111
|
+
server_id = self.serial_id
|
112
|
+
provisioned_id = self.uuid[0..6]
|
113
|
+
|
114
|
+
# create server
|
115
|
+
self.data[:servers][server_id] = {
|
116
|
+
"alerts" => url_for("/servers/#{server_id}/alerts"),
|
117
|
+
"cluster" => url_for("/clusters/#{cluster["id"]}"),
|
118
|
+
"created_at" => Time.now.to_s,
|
119
|
+
"deprovisioned_at" => Time.now.to_s,
|
120
|
+
"devices" => block_device_map,
|
121
|
+
"enabled" => true,
|
122
|
+
"environment" => cluster["environment"],
|
123
|
+
"events" => url_for("/servers/#{server_id}/events"),
|
124
|
+
"firewalls" => url_for("/servers/#{server_id}/firewalls"),
|
125
|
+
"flavor" => { "id" => slot["flavor"] },
|
126
|
+
"id" => server_id,
|
127
|
+
"location" => location,
|
128
|
+
"logs" => url_for("/servers/#{server_id}/logs"),
|
129
|
+
"name" => slot["name"],
|
130
|
+
"private_hostname" => "#{provisioned_id}.private.example.org",
|
131
|
+
"provider" => provider_url,
|
132
|
+
"provisioned_at" => Time.now.to_s,
|
133
|
+
"provisioned_id" => provisioned_id,
|
134
|
+
"public_hostname" => "#{provisioned_id}.public.example.org",
|
135
|
+
"public_key" => mock_ssh_key[:fingerprint],
|
136
|
+
"slot" => url_for("/slots/#{slot["id"]}"),
|
137
|
+
"ssh_port" => 22,
|
138
|
+
"state" => "running",
|
139
|
+
"token" => SecureRandom.hex(16),
|
140
|
+
"updated_at" => Time.now.to_s,
|
141
|
+
"volumes" => url_for("/servers/#{server_id}/volumes"),
|
142
|
+
}
|
143
|
+
|
144
|
+
slot["server"] = url_for("/slots/#{slot["id"]}/server")
|
145
|
+
|
146
|
+
# create volumes
|
147
|
+
if volumes = slot["configuration"] && slot["configuration"]["volumes"]
|
148
|
+
volumes.each do |volume|
|
149
|
+
volume_id = self.serial_id
|
150
|
+
self.data[:volumes][volume_id] = volume.merge({
|
151
|
+
"id" => volume_id,
|
152
|
+
"location" => location,
|
153
|
+
"provider" => provider_url,
|
154
|
+
"provisioned_id" => "vol-#{SecureRandom.hex(4)}",
|
155
|
+
"server" => url_for("/servers/#{server_id}"),
|
156
|
+
})
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
# chef log for every server
|
162
|
+
slots.each do |slot|
|
163
|
+
log = create_log("log" => {
|
164
|
+
"filename" => "command.txt",
|
165
|
+
"server" => slot["server"],
|
166
|
+
}).body["log"]
|
167
|
+
|
168
|
+
# hax to support searching cluster & cluster update logs
|
169
|
+
self.data[:logs][log["id"]].merge!({
|
170
|
+
"_cluster" => slot["cluster"],
|
171
|
+
"_cluster_update" => url_for("/cluster-updates/#{request_id}"),
|
172
|
+
})
|
173
|
+
end
|
174
|
+
|
175
|
+
url_for("/cluster-updates/#{request_id}")
|
176
|
+
end
|
177
|
+
|
178
|
+
cluster_update = {
|
179
|
+
"finished_at" => nil,
|
180
|
+
"id" => request_id,
|
181
|
+
"started_at" => Time.now.to_s,
|
182
|
+
"successful" => "true",
|
183
|
+
"cluster" => cluster_url,
|
184
|
+
"logs" => url_for("/cluster-updates/#{request_id}/logs"),
|
185
|
+
"stage" => "activate",
|
186
|
+
}
|
187
|
+
|
188
|
+
request = cluster_update.merge(
|
189
|
+
"resource" => [:cluster_updates, request_id, procedure],
|
190
|
+
"type" => "cluster_update",
|
191
|
+
)
|
192
|
+
|
193
|
+
self.data[:requests][request_id] = request
|
194
|
+
self.data[:cluster_updates][request_id] = cluster_update
|
195
|
+
|
196
|
+
response_hash = request.dup
|
197
|
+
response_hash.delete("resource")
|
198
|
+
|
199
|
+
response(
|
200
|
+
:body => {"request" => response_hash},
|
201
|
+
:status => 201,
|
202
|
+
:headers => {
|
203
|
+
"Content-Type" => "application/json; charset=utf8"
|
204
|
+
}
|
205
|
+
)
|
206
|
+
end
|
207
|
+
end # Mock
|
208
|
+
end # Ey::Core::Client
|
@@ -0,0 +1,46 @@
|
|
1
|
+
class Ey::Core::Client
|
2
|
+
class Real
|
3
|
+
def create_connector(params={})
|
4
|
+
url = params.delete("url")
|
5
|
+
|
6
|
+
request(
|
7
|
+
:method => :post,
|
8
|
+
:path => "/connectors",
|
9
|
+
:body => params,
|
10
|
+
:url => url,
|
11
|
+
)
|
12
|
+
end
|
13
|
+
end # Real
|
14
|
+
|
15
|
+
class Mock
|
16
|
+
def create_connector(params={})
|
17
|
+
resource_id = self.uuid
|
18
|
+
|
19
|
+
resource = params["connector"].dup
|
20
|
+
destination_id = resource.delete("destination")
|
21
|
+
source_id = resource.delete("source")
|
22
|
+
|
23
|
+
resource["configuration"] = normalize_hash(resource["configuration"] || {})
|
24
|
+
|
25
|
+
key, source = find([:cluster_components, :logical_databases], source_id)
|
26
|
+
dest = find(:cluster_components, destination_id)
|
27
|
+
|
28
|
+
environment_url = find(:clusters, dest["cluster"])["environment"] if dest.has_key?("cluster")
|
29
|
+
environment_url = find(:clusters, source["cluster"])["environment"] unless environment_url
|
30
|
+
|
31
|
+
resource.merge!(
|
32
|
+
"source" => url_for("/#{key}/#{source_id}"),
|
33
|
+
"destination" => url_for("/cluster-components/#{destination_id}"),
|
34
|
+
"id" => resource_id,
|
35
|
+
"_environment" => environment_url,
|
36
|
+
)
|
37
|
+
|
38
|
+
self.data[:connectors][resource_id] = resource
|
39
|
+
|
40
|
+
response(
|
41
|
+
:body => {"connector" => resource},
|
42
|
+
:status => 201,
|
43
|
+
)
|
44
|
+
end
|
45
|
+
end # Mock
|
46
|
+
end # Ey::Core::Client
|
@@ -0,0 +1,72 @@
|
|
1
|
+
class Ey::Core::Client
|
2
|
+
class Real
|
3
|
+
def create_database_server(params={})
|
4
|
+
request(
|
5
|
+
:method => :post,
|
6
|
+
:path => "/database-servers",
|
7
|
+
:url => params.delete("url"),
|
8
|
+
:body => params,
|
9
|
+
)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
class Mock
|
14
|
+
def create_database_server(_params={})
|
15
|
+
params = Cistern::Hash.stringify_keys(_params)
|
16
|
+
|
17
|
+
require_parameters(params, "provider")
|
18
|
+
require_parameters(params["database_server"], "replication_source")
|
19
|
+
|
20
|
+
request_id = self.uuid
|
21
|
+
resource_id = self.uuid
|
22
|
+
|
23
|
+
provider_id = resource_identity(params["provider"])
|
24
|
+
find(:providers, provider_id)
|
25
|
+
|
26
|
+
replication_source_id = resource_identity(params["database_server"]["replication_source"])
|
27
|
+
replication_source = find(:database_servers, replication_source_id)
|
28
|
+
|
29
|
+
resource = {
|
30
|
+
"id" => resource_id,
|
31
|
+
"resource_url" => url_for("/database-servers/#{resource_id}"),
|
32
|
+
"provisioned_id" => "replica-#{SecureRandom.hex(3)}",
|
33
|
+
"engine" => replication_source["engine"],
|
34
|
+
"version" => replication_source["version"],
|
35
|
+
"storage" => replication_source["storage"],
|
36
|
+
"modifiers" => replication_source["modifiers"],
|
37
|
+
"endpoint" => replication_source["endpoint"],
|
38
|
+
"flavor" => replication_source["flavor"],
|
39
|
+
"location" => replication_source["location"],
|
40
|
+
"deleted_at" => nil,
|
41
|
+
"database_service" => replication_source["database_service"],
|
42
|
+
"replication_source" => url_for("/database-servers/#{replication_source_id}"),
|
43
|
+
"alerts" => url_for("/database-servers/#{resource_id}/alerts"),
|
44
|
+
"firewalls" => url_for("/database-servers/#{resource_id}/firewalls"),
|
45
|
+
"provider" => url_for("/providers/#{provider_id}"),
|
46
|
+
"messages" => url_for("/database-servers/#{resource_id}/messages"),
|
47
|
+
"snapshots" => url_for("/database-servers/#{resource_id}/snapshots"),
|
48
|
+
"revisions" => url_for("/database-servers/#{resource_id}/revisions"),
|
49
|
+
}
|
50
|
+
|
51
|
+
request = {
|
52
|
+
"id" => request_id,
|
53
|
+
"type" => "provision_database_server",
|
54
|
+
"successful" => "true",
|
55
|
+
"started_at" => Time.now,
|
56
|
+
"finished_at" => nil,
|
57
|
+
"resource_url" => url_for("/database-servers/#{resource_id}"),
|
58
|
+
"resource" => [:database_servers, resource_id, resource],
|
59
|
+
}
|
60
|
+
|
61
|
+
self.data[:requests][request_id] = request
|
62
|
+
|
63
|
+
response_hash = request.dup
|
64
|
+
response_hash.delete("resource")
|
65
|
+
|
66
|
+
response(
|
67
|
+
:body => {"request" => response_hash},
|
68
|
+
:status => 201,
|
69
|
+
)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
class Ey::Core::Client
|
2
|
+
class Real
|
3
|
+
def create_database_service(params={})
|
4
|
+
request(
|
5
|
+
:method => :post,
|
6
|
+
:path => "/database-services",
|
7
|
+
:url => params.delete("url"),
|
8
|
+
:body => params,
|
9
|
+
)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
class Mock
|
14
|
+
def create_database_service(_params={})
|
15
|
+
params = Cistern::Hash.stringify_keys(_params)
|
16
|
+
|
17
|
+
require_parameters(params, "provider")
|
18
|
+
provider_id = resource_identity(params["provider"])
|
19
|
+
find(:providers, provider_id)
|
20
|
+
|
21
|
+
require_parameters(params["database_service"], "name")
|
22
|
+
request_id = self.uuid
|
23
|
+
resource_id = self.serial_id
|
24
|
+
|
25
|
+
database_service = params["database_service"].dup
|
26
|
+
database_service["id"] = resource_id
|
27
|
+
database_server = params["database_server"].dup
|
28
|
+
database_server["storage"] ||= 50
|
29
|
+
|
30
|
+
request_block = create_database_service_resource(
|
31
|
+
"database_service" => database_service,
|
32
|
+
"database_server" => database_server,
|
33
|
+
"provider_id" => provider_id,
|
34
|
+
)
|
35
|
+
|
36
|
+
request = {
|
37
|
+
"id" => request_id,
|
38
|
+
"type" => "provision_database_service",
|
39
|
+
"successful" => "true",
|
40
|
+
"started_at" => Time.now,
|
41
|
+
"finished_at" => nil,
|
42
|
+
"resource_url" => database_service["resource_url"],
|
43
|
+
"resource" => [:database_services, request_id, request_block],
|
44
|
+
}
|
45
|
+
|
46
|
+
self.data[:requests][request_id] = request
|
47
|
+
|
48
|
+
response_hash = request.dup
|
49
|
+
response_hash.delete("resource")
|
50
|
+
|
51
|
+
response(
|
52
|
+
:body => {"request" => response_hash},
|
53
|
+
:status => 201,
|
54
|
+
)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
class Ey::Core::Client
|
2
|
+
class Real
|
3
|
+
def create_environment(params={})
|
4
|
+
account_id = params["account"]
|
5
|
+
url = params.delete("url")
|
6
|
+
|
7
|
+
request(
|
8
|
+
:body => params,
|
9
|
+
:method => :post,
|
10
|
+
:path => "/accounts/#{account_id}/environments",
|
11
|
+
:url => url,
|
12
|
+
)
|
13
|
+
end
|
14
|
+
end # Real
|
15
|
+
|
16
|
+
class Mock
|
17
|
+
def create_environment(params={})
|
18
|
+
resource_id = self.serial_id
|
19
|
+
url = params.delete("url")
|
20
|
+
|
21
|
+
if project_id = params["project"] || url && path_params(url)["projects"]
|
22
|
+
account_id = resource_identity(find(:projects, project_id)["account"])
|
23
|
+
end
|
24
|
+
account_id ||= params["account"] || url && path_params(url)["accounts"]
|
25
|
+
|
26
|
+
find(:accounts, account_id)
|
27
|
+
|
28
|
+
resource = params["environment"].dup
|
29
|
+
|
30
|
+
internal_key = mock_ssh_key
|
31
|
+
|
32
|
+
resource.merge!(
|
33
|
+
"account" => url_for("/accounts/#{account_id}"),
|
34
|
+
"applications" => url_for("/environments/#{resource_id}/applications"),
|
35
|
+
"classic" => false,
|
36
|
+
"clusters" => url_for("/environments/#{resource_id}/clusters"),
|
37
|
+
"created_at" => Time.now,
|
38
|
+
"database_services_url" => url_for("/environments/#{resource_id}/database-services"),
|
39
|
+
"id" => resource_id,
|
40
|
+
"internal_private_key" => internal_key[:private_key],
|
41
|
+
"internal_public_key" => internal_key[:public_key],
|
42
|
+
"keypairs" => url_for("/environments/#{resource_id}/keypairs"),
|
43
|
+
"logical_databases_url" => url_for("/environments/#{resource_id}/logical-databases"),
|
44
|
+
"project" => project_id && url_for("/projects/#{project_id}"),
|
45
|
+
"servers" => url_for("/environments/#{resource_id}/servers"),
|
46
|
+
"updated_at" => Time.now,
|
47
|
+
)
|
48
|
+
|
49
|
+
self.data[:environments][resource_id] = resource
|
50
|
+
|
51
|
+
response(
|
52
|
+
:body => {"environment" => resource},
|
53
|
+
:status => 201,
|
54
|
+
)
|
55
|
+
end
|
56
|
+
end # Mock
|
57
|
+
end # Ey::Core::Client
|