brightbox-cli 0.14.1 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +7 -0
- data/bin/brightbox-firewall-policies +14 -0
- data/bin/brightbox-firewall-rules +14 -0
- data/bin/brightbox-groups +14 -0
- data/lib/brightbox-cli/api.rb +2 -1
- data/lib/brightbox-cli/cloud_ips.rb +2 -2
- data/lib/brightbox-cli/command_generator.rb +3 -0
- data/lib/brightbox-cli/commands/cloudips-update.rb +2 -2
- data/lib/brightbox-cli/commands/config-client-list.rb +1 -1
- data/lib/brightbox-cli/commands/firewall-policies-apply.rb +31 -0
- data/lib/brightbox-cli/commands/firewall-policies-create.rb +39 -0
- data/lib/brightbox-cli/commands/firewall-policies-destroy.rb +24 -0
- data/lib/brightbox-cli/commands/firewall-policies-list.rb +17 -0
- data/lib/brightbox-cli/commands/firewall-policies-remove.rb +31 -0
- data/lib/brightbox-cli/commands/firewall-policies-show.rb +19 -0
- data/lib/brightbox-cli/commands/firewall-rules-create.rb +51 -0
- data/lib/brightbox-cli/commands/firewall-rules-destroy.rb +24 -0
- data/lib/brightbox-cli/commands/firewall-rules-list.rb +19 -0
- data/lib/brightbox-cli/commands/firewall-rules-show.rb +22 -0
- data/lib/brightbox-cli/commands/groups-add-server.rb +23 -0
- data/lib/brightbox-cli/commands/groups-create.rb +22 -0
- data/lib/brightbox-cli/commands/groups-destroy.rb +23 -0
- data/lib/brightbox-cli/commands/groups-list.rb +16 -0
- data/lib/brightbox-cli/commands/groups-move_servers.rb +39 -0
- data/lib/brightbox-cli/commands/groups-remove-servers.rb +35 -0
- data/lib/brightbox-cli/commands/groups-show.rb +14 -0
- data/lib/brightbox-cli/commands/groups-update.rb +38 -0
- data/lib/brightbox-cli/commands/images-register.rb +11 -3
- data/lib/brightbox-cli/commands/images-update.rb +4 -0
- data/lib/brightbox-cli/commands/servers-create.rb +19 -8
- data/lib/brightbox-cli/commands/servers-list.rb +0 -3
- data/lib/brightbox-cli/commands/servers-show.rb +3 -39
- data/lib/brightbox-cli/commands/servers-stop.rb +1 -1
- data/lib/brightbox-cli/detailed_server.rb +43 -0
- data/lib/brightbox-cli/detailed_server_group.rb +13 -0
- data/lib/brightbox-cli/firewall_policy.rb +32 -0
- data/lib/brightbox-cli/firewall_rule.rb +39 -0
- data/lib/brightbox-cli/firewall_rules.rb +26 -0
- data/lib/brightbox-cli/images.rb +2 -1
- data/lib/brightbox-cli/server_groups.rb +64 -0
- data/lib/brightbox-cli/servers.rb +5 -13
- data/lib/brightbox-cli/vendor/fog/Rakefile +17 -2
- data/lib/brightbox-cli/vendor/fog/changelog.txt +434 -0
- data/lib/brightbox-cli/vendor/fog/docs/_layouts/default.html +12 -12
- data/lib/brightbox-cli/vendor/fog/docs/about/getting_started.markdown +2 -2
- data/lib/brightbox-cli/vendor/fog/docs/dns/index.markdown +3 -3
- data/lib/brightbox-cli/vendor/fog/docs/index.markdown +1 -1
- data/lib/brightbox-cli/vendor/fog/docs/public/css/fog.css +14 -1
- data/lib/brightbox-cli/vendor/fog/docs/public/images/engineyard.png +0 -0
- data/lib/brightbox-cli/vendor/fog/docs/public/images/fog.png +0 -0
- data/lib/brightbox-cli/vendor/fog/fog.gemspec +4 -4
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/cloud_watch.rb +14 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/compute.rb +50 -19
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/elasticache.rb +127 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/cloud_watch/alarm.rb +12 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/cloud_watch/alarm_data.rb +39 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/cloud_watch/alarm_datum.rb +66 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/cloud_watch/alarm_histories.rb +18 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/cloud_watch/alarm_history.rb +16 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/cloud_watch/alarms.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/compute/servers.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elasticache/cluster.rb +69 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elasticache/clusters.rb +31 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elasticache/parameter_group.rb +32 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elasticache/parameter_groups.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elasticache/security_group.rb +52 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/models/elasticache/security_groups.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/delete_alarms.rb +26 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/describe_alarm_history.rb +40 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/describe_alarms.rb +73 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/describe_alarms_for_metric.rb +71 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/disable_alarm_actions.rb +26 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/enable_alarm_actions.rb +26 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/get_metric_statistics.rb +1 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/put_metric_alarm.rb +26 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/cloud_watch/set_alarm_state.rb +26 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/compute/spot_instance_requests.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/{aws → dns}/change_resource_record_sets.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/{aws → dns}/create_hosted_zone.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/{aws → dns}/delete_hosted_zone.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/{aws → dns}/get_change.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/{aws → dns}/get_hosted_zone.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/{aws → dns}/list_hosted_zones.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/{aws → dns}/list_resource_record_sets.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/authorize_cache_security_group_ingress.rb +26 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/base.rb +34 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/cache_cluster_parser.rb +79 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/describe_cache_clusters.rb +27 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/describe_cache_parameters.rb +22 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/describe_engine_default_parameters.rb +22 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/describe_parameter_groups.rb +27 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/describe_security_groups.rb +27 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/engine_defaults_parser.rb +59 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/event_list.rb +38 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/modify_parameter_group.rb +27 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/parameter_group_parser.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/reset_parameter_group.rb +27 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/security_group_parser.rb +40 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/single_cache_cluster.rb +22 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/single_parameter_group.rb +22 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/elasticache/single_security_group.rb +34 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_watch/delete_alarms.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_watch/describe_alarm_history.rb +33 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_watch/describe_alarms.rb +38 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb +39 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_watch/disable_alarm_actions.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_watch/enable_alarm_actions.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_watch/put_metric_alarm.rb +84 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/cloud_watch/set_alarm_state.rb +31 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/create_security_group.rb +5 -4
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/create_snapshot.rb +2 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/create_tags.rb +5 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/create_volume.rb +0 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/delete_tags.rb +2 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_images.rb +5 -8
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_instances.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_snapshots.rb +3 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/describe_volumes.rb +3 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/modify_image_attribute.rb +32 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/purchase_reserved_instances_offering.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/register_image.rb +0 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/compute/run_instances.rb +1 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/authorize_cache_security_group_ingress.rb +36 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/create_cache_cluster.rb +62 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/create_cache_parameter_group.rb +37 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/create_cache_security_group.rb +33 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/delete_cache_cluster.rb +32 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/delete_cache_parameter_group.rb +31 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/delete_cache_security_group.rb +31 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/describe_cache_clusters.rb +39 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb +34 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/describe_cache_parameters.rb +36 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/describe_cache_security_groups.rb +34 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/describe_engine_default_parameters.rb +35 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/describe_events.rb +46 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/modify_cache_cluster.rb +70 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/modify_cache_parameter_group.rb +45 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/reboot_cache_cluster.rb +44 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/reset_cache_parameter_group.rb +46 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elasticache/revoke_cache_security_group_ingress.rb +37 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/create_load_balancer.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/create_load_balancer_listeners.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/describe_instance_health.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/get_server_certificate.rb +5 -7
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/list_server_certificates.rb +3 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/iam/upload_server_certificate.rb +3 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/change_message_visibility.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/create_queue.rb +35 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/delete_message.rb +29 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/delete_queue.rb +24 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/get_queue_attributes.rb +22 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/list_queues.rb +15 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/receive_message.rb +55 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/send_message.rb +39 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/sqs/set_queue_attributes.rb +19 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/copy_object.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_object_acl.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/hash_to_acl.rb +2 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/sqs.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws/storage.rb +2 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/aws.rb +17 -14
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/aws.rb +4 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin/openstack.rb +31 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/bin.rb +1 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/bluebox/models/compute/server.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bluebox/requests/compute/create_template.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/bluebox.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/compute.rb +5 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/account.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/firewall_policies.rb +29 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/firewall_policy.rb +65 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/firewall_rule.rb +54 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/firewall_rules.rb +24 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/image.rb +2 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/server.rb +27 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/models/compute/server_group.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox/requests/compute/remove_firewall_policy.rb +14 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/brightbox.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/compute/models/server.rb +1 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/compute.rb +3 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/core/attributes.rb +5 -5
- data/lib/brightbox-cli/vendor/fog/lib/fog/core/credentials.rb +5 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/core/errors.rb +4 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/core/provider.rb +9 -4
- data/lib/brightbox-cli/vendor/fog/lib/fog/dnsimple.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/dnsmadeeasy.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/dynect.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud/compute.rb +1 -5
- data/lib/brightbox-cli/vendor/fog/lib/fog/ecloud.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/glesys/compute.rb +20 -4
- data/lib/brightbox-cli/vendor/fog/lib/fog/glesys/models/compute/templates.rb +0 -6
- data/lib/brightbox-cli/vendor/fog/lib/fog/glesys.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/go_grid.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/google.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/server.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/uri.rb +7 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/libvirt.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode/models/compute/server.rb +10 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode/{models/dns/linode → requests/dns}/domain_create.rb +3 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode/{models/dns/linode → requests/dns}/domain_delete.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode/{models/dns/linode → requests/dns}/domain_list.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode/{models/dns/linode → requests/dns}/domain_resource_create.rb +8 -8
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode/{models/dns/linode → requests/dns}/domain_resource_delete.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode/{models/dns/linode → requests/dns}/domain_resource_list.rb +8 -8
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode/{models/dns/linode → requests/dns}/domain_resource_update.rb +9 -9
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode/{models/dns/linode → requests/dns}/domain_update.rb +5 -5
- data/lib/brightbox-cli/vendor/fog/lib/fog/linode.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/local/models/storage/directories.rb +33 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/local/models/storage/directory.rb +57 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/local/models/storage/file.rb +113 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/local/models/storage/files.rb +87 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/local/storage.rb +71 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/local.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/new_servers.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/ninefold/compute.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/ninefold/models/compute/server.rb +2 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/ninefold.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/compute.rb +198 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/compute/flavor.rb +20 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/compute/flavors.rb +28 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/compute/image.rb +57 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/compute/images.rb +33 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/compute/meta.rb +29 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/compute/metadata.rb +69 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/compute/server.rb +195 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/compute/servers.rb +36 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/models/meta_parent.rb +33 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/change_password_server.rb +24 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/confirm_resized_server.rb +24 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/create_image.rb +49 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/create_server.rb +75 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/delete_image.rb +40 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/delete_meta.rb +28 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/delete_server.rb +38 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/get_flavor_details.rb +43 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/get_image_details.rb +33 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/get_meta.rb +29 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/get_server_details.rb +32 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_addresses.rb +32 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_flavors.rb +38 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_flavors_detail.rb +38 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_images.rb +33 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_images_detail.rb +39 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_metadata.rb +28 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_private_addresses.rb +32 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_public_addresses.rb +32 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_servers.rb +33 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/list_servers_detail.rb +39 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/reboot_server.rb +24 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/rebuild_server.rb +31 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/resize_server.rb +24 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/revert_resized_server.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/server_action.rb +18 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/set_metadata.rb +45 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/update_meta.rb +45 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/update_metadata.rb +46 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack/requests/compute/update_server.rb +35 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/openstack.rb +113 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/providers.rb +1 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/dns.rb +25 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/dns/callback.rb +3 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/rackspace.rb +5 -5
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/{parsers/dns/slicehost → requests/dns}/create_record.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/{parsers/dns/slicehost → requests/dns}/create_zone.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/{parsers/dns/slicehost → requests/dns}/delete_record.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/{parsers/dns/slicehost → requests/dns}/delete_zone.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/{parsers/dns/slicehost → requests/dns}/get_record.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/{parsers/dns/slicehost → requests/dns}/get_records.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/{parsers/dns/slicehost → requests/dns}/get_zone.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost/{parsers/dns/slicehost → requests/dns}/get_zones.rb +0 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/slicehost.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/storm_on_demand.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/vcloud.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/virtual_box.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/vmfusion/models/compute/servers.rb +6 -6
- data/lib/brightbox-cli/vendor/fog/lib/fog/vmfusion.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/voxel.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere/compute.rb +0 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/vsphere.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/dns.rb +14 -3
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/models/dns/record.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/models/dns/records.rb +5 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/models/dns/zones.rb +2 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/count_hosts.rb +20 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/count_zones.rb +12 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/create_host.rb +67 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/create_zone.rb +44 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/delete_host.rb +19 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/delete_zone.rb +17 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/find_hosts.rb +22 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/get_host.rb +18 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/get_zone.rb +19 -2
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/get_zone_stats.rb +23 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/list_hosts.rb +20 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/list_zones.rb +15 -0
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/update_host.rb +20 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/update_zone.rb +20 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog/zerigo.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/lib/fog.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/tests/aws/models/cloud_watch/alarm_data_tests.rb +40 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/models/cloud_watch/alarm_history_tests.rb +20 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/models/compute/server_tests.rb +2 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/models/elasticache/cluster_tests.rb +30 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/models/elasticache/parameter_groups_tests.rb +17 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/models/elasticache/security_groups_tests.rb +52 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/models/elb/model_tests.rb +2 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/cloud_watch/list_metrics_test.rb +5 -5
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/compute/image_tests.rb +33 -2
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/compute/tag_tests.rb +40 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/elasticache/cache_cluster_tests.rb +137 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/elasticache/describe_events.rb +17 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/elasticache/helper.rb +68 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/elasticache/parameter_group_tests.rb +105 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/elasticache/security_group_tests.rb +107 -0
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/iam/server_certificate_tests.rb +39 -18
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/simpledb/attributes_tests.rb +18 -18
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/simpledb/domain_tests.rb +7 -7
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/sqs/message_tests.rb +1 -7
- data/lib/brightbox-cli/vendor/fog/tests/aws/requests/sqs/queue_tests.rb +0 -5
- data/lib/brightbox-cli/vendor/fog/tests/brightbox/requests/compute/load_balancer_tests.rb +1 -0
- data/lib/brightbox-cli/vendor/fog/tests/compute/models/flavors_tests.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/tests/core/attribute_tests.rb +29 -0
- data/lib/brightbox-cli/vendor/fog/tests/core/credential_tests.rb +2 -0
- data/lib/brightbox-cli/vendor/fog/tests/helper.rb +1 -1
- data/lib/brightbox-cli/vendor/fog/tests/helpers/collection_helper.rb +5 -0
- data/lib/brightbox-cli/vendor/fog/tests/helpers/compute/server_helper.rb +1 -0
- data/lib/brightbox-cli/vendor/fog/tests/helpers/formats_helper.rb +16 -8
- data/lib/brightbox-cli/vendor/fog/tests/helpers/formats_helper_tests.rb +8 -0
- data/lib/brightbox-cli/vendor/fog/tests/helpers/mock_helper.rb +6 -2
- data/lib/brightbox-cli/vendor/fog/tests/linode/requests/compute/linodeplans_tests.rb +2 -1
- data/lib/brightbox-cli/vendor/fog/tests/ninefold/requests/compute/helper.rb +14 -17
- data/lib/brightbox-cli/vendor/fog/tests/openstack/requests/compute/flavor_tests.rb +35 -0
- data/lib/brightbox-cli/vendor/fog/tests/openstack/requests/compute/helper.rb +17 -0
- data/lib/brightbox-cli/vendor/fog/tests/openstack/requests/compute/image_tests.rb +59 -0
- data/lib/brightbox-cli/vendor/fog/tests/openstack/requests/compute/server_tests.rb +142 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/dns/dns_tests.rb +21 -21
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/dns/helper.rb +17 -9
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/dns/records_tests.rb +16 -16
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{access_list_tests.rb → load_balancers/access_list_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{algorithm_tests.rb → load_balancers/algorithm_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{connection_logging_tests.rb → load_balancers/connection_logging_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{connection_throttling_tests.rb → load_balancers/connection_throttling_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{helper.rb → load_balancers/helper.rb} +12 -1
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{load_balancer_tests.rb → load_balancers/load_balancer_tests.rb} +1 -1
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{load_balancer_usage_tests.rb → load_balancers/load_balancer_usage_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{monitor_tests.rb → load_balancers/monitor_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{node_tests.rb → load_balancers/node_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{protocol_tests.rb → load_balancers/protocol_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{session_persistence_tests.rb → load_balancers/session_persistence_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{usage_tests.rb → load_balancers/usage_tests.rb} +0 -0
- data/lib/brightbox-cli/vendor/fog/tests/rackspace/requests/{virtual_ip_tests.rb → load_balancers/virtual_ip_tests.rb} +2 -2
- data/lib/brightbox-cli/vendor/fog/tests/vsphere/requests/compute/vm_clone_tests.rb +2 -1
- data/lib/brightbox-cli/version.rb +1 -1
- data/lib/brightbox_cli.rb +16 -10
- data/spec/cloud_ips_spec.rb +17 -0
- data/spec/firewall_policy_spec.rb +78 -0
- data/spec/firewall_rule_spec.rb +74 -0
- data/spec/fixtures/vcr_cassettes/apply_firewall_policy.yml +137 -0
- data/spec/fixtures/vcr_cassettes/create_firewall_policy.yml +104 -0
- data/spec/fixtures/vcr_cassettes/destroy_firewall_policy.yml +137 -0
- data/spec/fixtures/vcr_cassettes/firewall_rule.yml +36 -0
- data/spec/fixtures/vcr_cassettes/firewall_rule_create.yml +36 -0
- data/spec/fixtures/vcr_cassettes/firewall_rule_destroy.yml +69 -0
- data/spec/fixtures/vcr_cassettes/firewall_rule_list.yml +36 -0
- data/spec/fixtures/vcr_cassettes/firewall_rule_show.yml +36 -0
- data/spec/fixtures/vcr_cassettes/list_cloud_ip.yml +36 -0
- data/spec/fixtures/vcr_cassettes/list_firewall_policy.yml +36 -0
- data/spec/fixtures/vcr_cassettes/list_server_groups.yml +36 -0
- data/spec/fixtures/vcr_cassettes/server_destroy.yml +71 -0
- data/spec/fixtures/vcr_cassettes/server_show.yml +141 -0
- data/spec/fixtures/vcr_cassettes/server_shutdown.yml +104 -0
- data/spec/fixtures/vcr_cassettes/server_start.yml +137 -0
- data/spec/fixtures/vcr_cassettes/server_stop.yml +104 -0
- data/spec/fixtures/vcr_cassettes/show_firewall_policy.yml +36 -0
- data/spec/server_group_spec.rb +15 -0
- data/spec/servers_spec.rb +75 -0
- data/spec/spec_helper.rb +0 -3
- data/tools/bash_completion_script +269 -122
- metadata +224 -41
@@ -13,11 +13,10 @@ module Fog
|
|
13
13
|
Fog::SCP.new(public_ip_address, username, scp_options).upload(local_path, remote_path, upload_options)
|
14
14
|
end
|
15
15
|
|
16
|
-
def ssh(commands)
|
16
|
+
def ssh(commands, options={})
|
17
17
|
require 'net/ssh'
|
18
18
|
requires :public_ip_address, :username
|
19
19
|
|
20
|
-
options = {}
|
21
20
|
options[:key_data] = [private_key] if private_key
|
22
21
|
Fog::SSH.new(public_ip_address, username, options).run(commands)
|
23
22
|
end
|
@@ -38,6 +38,9 @@ module Fog
|
|
38
38
|
when :ninefold
|
39
39
|
require 'fog/ninefold/compute'
|
40
40
|
Fog::Compute::Ninefold.new(attributes)
|
41
|
+
when :openstack
|
42
|
+
require 'fog/openstack/compute'
|
43
|
+
Fog::Compute::OpenStack.new(attributes)
|
41
44
|
when :rackspace
|
42
45
|
require 'fog/rackspace/compute'
|
43
46
|
Fog::Compute::Rackspace.new(attributes)
|
@@ -25,9 +25,9 @@ module Fog
|
|
25
25
|
class_eval <<-EOS, __FILE__, __LINE__
|
26
26
|
def #{name}=(new_#{name})
|
27
27
|
attributes[:#{name}] = case new_#{name}
|
28
|
-
when 'true'
|
28
|
+
when true,'true'
|
29
29
|
true
|
30
|
-
when 'false'
|
30
|
+
when false,'false'
|
31
31
|
false
|
32
32
|
end
|
33
33
|
end
|
@@ -71,8 +71,8 @@ module Fog
|
|
71
71
|
class_eval <<-EOS, __FILE__, __LINE__
|
72
72
|
def #{name}=(new_data)
|
73
73
|
if new_data.is_a?(Hash)
|
74
|
-
if new_data.has_key?(
|
75
|
-
attributes[:#{name}] = new_data[
|
74
|
+
if new_data.has_key?(:'#{squash}')
|
75
|
+
attributes[:#{name}] = new_data[:'#{squash}']
|
76
76
|
elsif new_data.has_key?("#{squash}")
|
77
77
|
attributes[:#{name}] = new_data["#{squash}"]
|
78
78
|
else
|
@@ -142,7 +142,7 @@ module Fog
|
|
142
142
|
unless self.class.ignored_attributes.include?(key)
|
143
143
|
if aliased_key = self.class.aliases[key]
|
144
144
|
send("#{aliased_key}=", value)
|
145
|
-
elsif (
|
145
|
+
elsif self.respond_to?("#{key}=",true)
|
146
146
|
send("#{key}=", value)
|
147
147
|
else
|
148
148
|
attributes[key] = value
|
@@ -45,6 +45,11 @@ module Fog
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
+
# @return [Hash] The newly assigned credentials
|
49
|
+
def self.credentials=(new_credentials)
|
50
|
+
@credentials = new_credentials
|
51
|
+
end
|
52
|
+
|
48
53
|
def self.symbolize_credentials(args)
|
49
54
|
if args.is_a? Hash
|
50
55
|
Hash[ *args.collect do |key, value|
|
@@ -48,6 +48,10 @@ An alternate file may be used by placing its path in the FOG_RC environment vari
|
|
48
48
|
:new_servers_username:
|
49
49
|
:public_key_path:
|
50
50
|
:private_key_path:
|
51
|
+
:openstack_api_key:
|
52
|
+
:openstack_username:
|
53
|
+
:openstack_auth_url:
|
54
|
+
:openstack_tenant:
|
51
55
|
:rackspace_api_key:
|
52
56
|
:rackspace_username:
|
53
57
|
:rackspace_servicenet:
|
@@ -10,15 +10,20 @@ module Fog
|
|
10
10
|
Fog.providers << base.to_s.split('::').last
|
11
11
|
end
|
12
12
|
|
13
|
-
def
|
13
|
+
def [](service_key)
|
14
|
+
eval(@services_registry[service_key]).new
|
15
|
+
end
|
16
|
+
|
17
|
+
def service(new_service, path, constant_string)
|
14
18
|
Fog.services[new_service] ||= []
|
15
|
-
Fog.services[new_service]
|
16
|
-
|
19
|
+
Fog.services[new_service] |= [self.to_s.split('::').last.downcase.to_sym]
|
20
|
+
@services_registry ||= {}
|
21
|
+
@services_registry[new_service] = [self.to_s, constant_string].join('::')
|
17
22
|
require File.join('fog', path)
|
18
23
|
end
|
19
24
|
|
20
25
|
def services
|
21
|
-
@
|
26
|
+
@services_registry.keys
|
22
27
|
end
|
23
28
|
|
24
29
|
end
|
@@ -18,11 +18,7 @@ module Fog
|
|
18
18
|
|
19
19
|
def check_href!(opts = {})
|
20
20
|
unless href
|
21
|
-
if opts.is_a?(String)
|
22
|
-
t = Hash.new
|
23
|
-
t[:parent] = opts
|
24
|
-
opts = t
|
25
|
-
end
|
21
|
+
opts = { :parent => opts } if opts.is_a?(String)
|
26
22
|
msg = ":href missing, call with a :href pointing to #{if opts[:message]
|
27
23
|
opts[:message]
|
28
24
|
elsif opts[:parent]
|
@@ -36,12 +36,28 @@ module Fog
|
|
36
36
|
|
37
37
|
class Mock
|
38
38
|
|
39
|
-
def initialize(options)
|
40
|
-
Fog
|
39
|
+
def initialize(options={})
|
40
|
+
@api_url = options[:glesys_api_url] || Fog.credentials[:glesys_api_url] || API_URL
|
41
|
+
@glesys_username = options[:glesys_username] || Fog.credentials[:glesys_api_key]
|
42
|
+
@glesys_api_key = options[:glesys_api_key] || Fog.credentials[:glesys_api_key]
|
43
|
+
@connection_options = options[:connection_options] || {}
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.data
|
47
|
+
@data ||= {
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.reset
|
52
|
+
@data = nil
|
53
|
+
end
|
54
|
+
|
55
|
+
def data
|
56
|
+
self.class.data
|
41
57
|
end
|
42
58
|
|
43
|
-
def
|
44
|
-
|
59
|
+
def reset_data
|
60
|
+
self.class.reset
|
45
61
|
end
|
46
62
|
|
47
63
|
end
|
@@ -9,12 +9,6 @@ module Fog
|
|
9
9
|
|
10
10
|
model Fog::Glesys::Compute::Template
|
11
11
|
|
12
|
-
#attribute :platform
|
13
|
-
#attribute :name
|
14
|
-
#attribute :os
|
15
|
-
#attribute :min_mem_size
|
16
|
-
#attribute :min_disk_size
|
17
|
-
|
18
12
|
def all
|
19
13
|
openvz = connection.template_list.body['response']['templates']['OpenVZ']
|
20
14
|
xen = connection.template_list.body['response']['templates']['Xen']
|
@@ -279,7 +279,7 @@ module Fog
|
|
279
279
|
# Aug 24 17:34:41 juno arpwatch: new station 10.247.4.137 52:54:00:88:5a:0a eth0.4
|
280
280
|
# Aug 24 17:37:19 juno arpwatch: changed ethernet address 10.247.4.137 52:54:00:27:33:00 (52:54:00:88:5a:0a) eth0.4
|
281
281
|
# Check if another ip_command string was provided
|
282
|
-
ip_command_global=@connection.ip_command.nil? ? 'grep $mac /var/log/arpwatch.log|sed -e "s/new station//"|sed -e "s/changed ethernet address//g" |tail -1 |cut -d ":" -f 4-| cut -d " " -f 3' : @connection.ip_command
|
282
|
+
ip_command_global=@connection.ip_command.nil? ? 'grep $mac /var/log/arpwatch.log|sed -e "s/new station//"|sed -e "s/changed ethernet address//g" |sed -e "s/reused old ethernet //" |tail -1 |cut -d ":" -f 4-| cut -d " " -f 3' : @connection.ip_command
|
283
283
|
ip_command_local=options[:ip_command].nil? ? ip_command_global : options[:ip_command]
|
284
284
|
|
285
285
|
ip_command="mac=#{mac}; "+ip_command_local
|
@@ -126,9 +126,13 @@ module Fog
|
|
126
126
|
# http://libvirt.org/remote.html
|
127
127
|
private
|
128
128
|
def value(name)
|
129
|
-
|
130
|
-
|
131
|
-
|
129
|
+
unless @parsed_uri.query.nil?
|
130
|
+
params=CGI.parse(@parsed_uri.query)
|
131
|
+
if params.has_key?(name)
|
132
|
+
return params[name].first
|
133
|
+
else
|
134
|
+
return nil
|
135
|
+
end
|
132
136
|
else
|
133
137
|
return nil
|
134
138
|
end
|
@@ -5,14 +5,24 @@ module Fog
|
|
5
5
|
class Linode
|
6
6
|
class Server < Fog::Compute::Server
|
7
7
|
attr_reader :stack_script
|
8
|
+
attr_accessor :private_key, :username
|
8
9
|
identity :id
|
9
10
|
attribute :name
|
10
11
|
attribute :status
|
11
12
|
|
13
|
+
def initialize(attributes={})
|
14
|
+
super
|
15
|
+
self.username = 'root'
|
16
|
+
end
|
17
|
+
|
12
18
|
def ips
|
13
19
|
Fog::Compute::Linode::Ips.new :server => self, :connection => connection
|
14
20
|
end
|
15
21
|
|
22
|
+
def public_ip_address
|
23
|
+
ips.find{|ip| ip.ip !~ /^192/}.ip
|
24
|
+
end
|
25
|
+
|
16
26
|
def disks
|
17
27
|
Fog::Compute::Linode::Disks.new :server => self, :connection => connection
|
18
28
|
end
|
data/lib/brightbox-cli/vendor/fog/lib/fog/linode/{models/dns/linode → requests/dns}/domain_create.rb
RENAMED
@@ -8,7 +8,7 @@ module Fog
|
|
8
8
|
# ==== Parameters
|
9
9
|
# * domain<~String>: The zone's name. Note, if master zone, SOA_email is required and if slave
|
10
10
|
# master_ips is/are required
|
11
|
-
# * type<~String>: master or slave
|
11
|
+
# * type<~String>: master or slave
|
12
12
|
# * options<~Hash>
|
13
13
|
# * description<~String> Currently undisplayed
|
14
14
|
# * SOA_email<~String> Required when type=master
|
@@ -16,8 +16,8 @@ module Fog
|
|
16
16
|
# * retry_sec<~Integer> numeric, default: '0'
|
17
17
|
# * expire_sec<~Integer> numeric, default: '0'
|
18
18
|
# * ttl_sec<~String> numeric, default: '0'
|
19
|
-
# * status<~Integer> 0, 1, or 2 (disabled, active, edit mode), default: 1
|
20
|
-
# * master_ips<~String> When type=slave, the zone's master DNS servers list, semicolon separated
|
19
|
+
# * status<~Integer> 0, 1, or 2 (disabled, active, edit mode), default: 1
|
20
|
+
# * master_ips<~String> When type=slave, the zone's master DNS servers list, semicolon separated
|
21
21
|
#
|
22
22
|
# ==== Returns
|
23
23
|
# * response<~Excon::Response>:
|
data/lib/brightbox-cli/vendor/fog/lib/fog/linode/{models/dns/linode → requests/dns}/domain_delete.rb
RENAMED
File without changes
|
@@ -7,18 +7,18 @@ module Fog
|
|
7
7
|
#
|
8
8
|
# ==== Parameters
|
9
9
|
# * domain_id<~Integer>: limit the list to the domain ID specified
|
10
|
-
# * type<~String>: One of: NS, MX, A, AAAA, CNAME, TXT, or SRV
|
10
|
+
# * type<~String>: One of: NS, MX, A, AAAA, CNAME, TXT, or SRV
|
11
11
|
# * options<~Hash>
|
12
|
-
# * name<~String>: The hostname or FQDN. When Type=MX the subdomain to delegate to the
|
12
|
+
# * name<~String>: The hostname or FQDN. When Type=MX the subdomain to delegate to the
|
13
13
|
# Target MX server
|
14
14
|
# * target<~String> When Type=MX the hostname. When Type=CNAME the target of the alias.
|
15
|
-
# When Type=TXT the value of the record. When Type=A or AAAA the token
|
16
|
-
# of '[remote_addr]' will be substituted with the IP address of the request.
|
17
|
-
# * priority<~Integer>: priority for MX and SRV records, 0-255 - default: 10
|
15
|
+
# When Type=TXT the value of the record. When Type=A or AAAA the token
|
16
|
+
# of '[remote_addr]' will be substituted with the IP address of the request.
|
17
|
+
# * priority<~Integer>: priority for MX and SRV records, 0-255 - default: 10
|
18
18
|
# * weight<~Integer>: default: 5
|
19
|
-
# * port<~Integer>: default: 80
|
20
|
-
# * protocol<~String>: The protocol to append to an SRV record. Ignored on other record
|
21
|
-
# types. default: udp
|
19
|
+
# * port<~Integer>: default: 80
|
20
|
+
# * protocol<~String>: The protocol to append to an SRV record. Ignored on other record
|
21
|
+
# types. default: udp
|
22
22
|
# * ttl_sec<~Integer>: note, Linode will round the input to set values (300, 3600, 7200, etc)
|
23
23
|
# ==== Returns
|
24
24
|
# * response<~Excon::Response>:
|
File without changes
|
@@ -13,18 +13,18 @@ module Fog
|
|
13
13
|
# * response<~Excon::Response>:
|
14
14
|
# * body<~Array>:
|
15
15
|
# * DATA<~Array>
|
16
|
-
# * 'PROTOCOL'<~String>: for SRV records. default is UDP
|
17
|
-
# * 'TTL_SEC'<~Interger>:
|
16
|
+
# * 'PROTOCOL'<~String>: for SRV records. default is UDP
|
17
|
+
# * 'TTL_SEC'<~Interger>:
|
18
18
|
# * 'PRIORITY'<~Interger>: for MX and SRV records
|
19
|
-
# * 'TYPE'<~String>: One of: NS, MX, A, AAAA, CNAME, TXT, or SRV
|
20
|
-
# * 'TARGET'<~String>: When Type=MX the hostname. When Type=CNAME the target of the alias.
|
21
|
-
# When Type=TXT the value of the record. When Type=A or AAAA the token
|
19
|
+
# * 'TYPE'<~String>: One of: NS, MX, A, AAAA, CNAME, TXT, or SRV
|
20
|
+
# * 'TARGET'<~String>: When Type=MX the hostname. When Type=CNAME the target of the alias.
|
21
|
+
# When Type=TXT the value of the record. When Type=A or AAAA the token
|
22
22
|
# of '[remote_addr]' will be substituted with the IP address of the request.
|
23
|
-
# * 'WEIGHT'<~Interger>:
|
23
|
+
# * 'WEIGHT'<~Interger>:
|
24
24
|
# * 'RESOURCEID'<~Interger>: ID of the resource record
|
25
|
-
# * 'PORT'<~Interger>:
|
25
|
+
# * 'PORT'<~Interger>:
|
26
26
|
# * 'DOMAINID'<~Interger>: ID of the domain that this record belongs to
|
27
|
-
# * 'NAME'<~Interger>: The hostname or FQDN. When Type=MX, the subdomain to delegate to
|
27
|
+
# * 'NAME'<~Interger>: The hostname or FQDN. When Type=MX, the subdomain to delegate to
|
28
28
|
def domain_resource_list(domain_id, resource_id = nil)
|
29
29
|
query = { :api_action => 'domain.resource.list', :domainID => domain_id }
|
30
30
|
if resource_id
|
@@ -9,17 +9,17 @@ module Fog
|
|
9
9
|
# * domain_id<~Integer>: limit the list to the domain ID specified
|
10
10
|
# * resource_id<~Integer>: id of resouce to delete
|
11
11
|
# * options<~Hash>
|
12
|
-
# * type<~String>: One of: NS, MX, A, AAAA, CNAME, TXT, or SRV
|
13
|
-
# * name<~String>: The hostname or FQDN. When Type=MX the subdomain to delegate to the
|
12
|
+
# * type<~String>: One of: NS, MX, A, AAAA, CNAME, TXT, or SRV
|
13
|
+
# * name<~String>: The hostname or FQDN. When Type=MX the subdomain to delegate to the
|
14
14
|
# Target MX server
|
15
|
-
# * target<~String> When Type=MX the hostname. When Type=CNAME the target of the alias.
|
16
|
-
# When Type=TXT the value of the record. When Type=A or AAAA the token
|
17
|
-
# of '[remote_addr]' will be substituted with the IP address of the request.
|
18
|
-
# * priority<~Integer>: priority for MX and SRV records, 0-255 - default: 10
|
15
|
+
# * target<~String> When Type=MX the hostname. When Type=CNAME the target of the alias.
|
16
|
+
# When Type=TXT the value of the record. When Type=A or AAAA the token
|
17
|
+
# of '[remote_addr]' will be substituted with the IP address of the request.
|
18
|
+
# * priority<~Integer>: priority for MX and SRV records, 0-255 - default: 10
|
19
19
|
# * weight<~Integer>: default: 5
|
20
|
-
# * port<~Integer>: default: 80
|
21
|
-
# * protocol<~String>: The protocol to append to an SRV record. Ignored on other record
|
22
|
-
# types. default: udp
|
20
|
+
# * port<~Integer>: default: 80
|
21
|
+
# * protocol<~String>: The protocol to append to an SRV record. Ignored on other record
|
22
|
+
# types. default: udp
|
23
23
|
# * ttl_sec<~Integer>: note, Linode will round the input to set values (300, 3600, 7200, etc)
|
24
24
|
# ==== Returns
|
25
25
|
# * response<~Excon::Response>:
|
data/lib/brightbox-cli/vendor/fog/lib/fog/linode/{models/dns/linode → requests/dns}/domain_update.rb
RENAMED
@@ -8,16 +8,16 @@ module Fog
|
|
8
8
|
# ==== Parameters
|
9
9
|
# * domain_id<~Integer>: The ID to identify the zone
|
10
10
|
# * options<~Hash>
|
11
|
-
# * domain<~String>: The zone's name.
|
12
|
-
# * type<~String>: master or slave
|
11
|
+
# * domain<~String>: The zone's name.
|
12
|
+
# * type<~String>: master or slave
|
13
13
|
# * description<~String> Currently undisplayed
|
14
14
|
# * SOA_email<~String> Required when type=master
|
15
15
|
# * refresh_sec<~Integer> numeric, default: '0'
|
16
16
|
# * retry_sec<~Integer> numeric, default: '0'
|
17
17
|
# * expire_sec<~Integer> numeric, default: '0'
|
18
18
|
# * ttl_sec<~String> numeric, default: '0'
|
19
|
-
# * status<~Integer> 0, 1, or 2 (disabled, active, edit mode), default: 1
|
20
|
-
# * master_ips<~String> When type=slave, the zone's master DNS servers list, semicolon separated
|
19
|
+
# * status<~Integer> 0, 1, or 2 (disabled, active, edit mode), default: 1
|
20
|
+
# * master_ips<~String> When type=slave, the zone's master DNS servers list, semicolon separated
|
21
21
|
#
|
22
22
|
# ==== Returns
|
23
23
|
# * response<~Excon::Response>:
|
@@ -25,7 +25,7 @@ module Fog
|
|
25
25
|
# * DATA<~Hash>:
|
26
26
|
# * 'DomainID'<~Integer>: domain ID
|
27
27
|
def domain_update(domain_id, options = {})
|
28
|
-
|
28
|
+
|
29
29
|
request(
|
30
30
|
:expects => 200,
|
31
31
|
:method => 'GET',
|
@@ -3,8 +3,8 @@ require(File.expand_path(File.join(File.dirname(__FILE__), 'core')))
|
|
3
3
|
module Fog
|
4
4
|
module Linode
|
5
5
|
extend Fog::Provider
|
6
|
-
service(:compute, 'linode/compute')
|
7
|
-
service(:dns, 'linode/dns')
|
6
|
+
service(:compute, 'linode/compute', 'Compute')
|
7
|
+
service(:dns, 'linode/dns', 'DNS')
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
require 'fog/local/models/storage/directory'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Storage
|
6
|
+
class Local
|
7
|
+
|
8
|
+
class Directories < Fog::Collection
|
9
|
+
|
10
|
+
model Fog::Storage::Local::Directory
|
11
|
+
|
12
|
+
def all
|
13
|
+
data = Dir.entries(connection.local_root).select do |entry|
|
14
|
+
entry[0...1] != '.' && ::File.directory?(connection.path_to(entry))
|
15
|
+
end.map do |entry|
|
16
|
+
{:key => entry}
|
17
|
+
end
|
18
|
+
load(data)
|
19
|
+
end
|
20
|
+
|
21
|
+
def get(key)
|
22
|
+
if ::File.directory?(connection.path_to(key))
|
23
|
+
new(:key => key)
|
24
|
+
else
|
25
|
+
nil
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
require 'fog/local/models/storage/files'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Storage
|
6
|
+
class Local
|
7
|
+
|
8
|
+
class Directory < Fog::Model
|
9
|
+
|
10
|
+
identity :key
|
11
|
+
|
12
|
+
def destroy
|
13
|
+
requires :key
|
14
|
+
|
15
|
+
if ::File.directory?(path)
|
16
|
+
Dir.rmdir(path)
|
17
|
+
true
|
18
|
+
else
|
19
|
+
false
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def files
|
24
|
+
@files ||= begin
|
25
|
+
Fog::Storage::Local::Files.new(
|
26
|
+
:directory => self,
|
27
|
+
:connection => connection
|
28
|
+
)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def public=(new_public)
|
33
|
+
new_public
|
34
|
+
end
|
35
|
+
|
36
|
+
def public_url
|
37
|
+
nil
|
38
|
+
end
|
39
|
+
|
40
|
+
def save
|
41
|
+
requires :key
|
42
|
+
|
43
|
+
Dir.mkdir(path)
|
44
|
+
true
|
45
|
+
end
|
46
|
+
|
47
|
+
private
|
48
|
+
|
49
|
+
def path
|
50
|
+
connection.path_to(key)
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|