poolparty 1.3.15 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +2 -87
- data/Rakefile +85 -45
- data/VERSION.yml +2 -2
- data/bin/cloud +6 -10
- data/bin/cloud-bootstrap +2 -4
- data/bin/cloud-compile +1 -7
- data/bin/cloud-configure +1 -9
- data/bin/cloud-console +3 -6
- data/bin/cloud-contract +3 -7
- data/bin/cloud-list +4 -3
- data/bin/cloud-reboot +25 -0
- data/bin/cloud-show +13 -5
- data/bin/cloud-start +1 -26
- data/bin/cloud-terminate +3 -3
- data/examples/README.md +57 -0
- data/examples/chef_cloud/chef-repo/README +3 -0
- data/examples/chef_cloud/chef-repo/Rakefile +35 -0
- data/examples/chef_cloud/chef-repo/certificates/README +1 -0
- data/examples/chef_cloud/chef-repo/config/client.rb.example +22 -0
- data/examples/chef_cloud/chef-repo/config/rake.rb +60 -0
- data/examples/chef_cloud/chef-repo/config/server.rb.example +33 -0
- data/examples/chef_cloud/chef-repo/config/solo.rb.example +9 -0
- data/examples/chef_cloud/chef-repo/cookbooks/README +1 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/README.rdoc +68 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/attributes/apache.rb +74 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/definitions/apache_conf.rb +25 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/definitions/apache_module.rb +43 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/definitions/apache_site.rb +40 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/definitions/web_app.rb +49 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/files/default/apache2_module_conf_generate.pl +41 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/metadata.json +508 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/metadata.rb +191 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/default.rb +191 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/god_monitor.rb +33 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_alias.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_auth_basic.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_auth_digest.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_authn_file.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_authnz_ldap.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_authz_default.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_authz_groupfile.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_authz_host.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_authz_user.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_autoindex.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_cgi.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_dav.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_dav_svn.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_deflate.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_dir.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_env.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_expires.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_fcgid.rb +46 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_headers.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_ldap.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_log_config.rb +24 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_mime.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_negotiation.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_php5.rb +32 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_proxy.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_proxy_ajp.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_proxy_balancer.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_proxy_connect.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_proxy_http.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_python.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_rails.rb +43 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_rewrite.rb +20 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_setenvif.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_ssl.rb +42 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/recipes/mod_status.rb +22 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/a2enmod.erb +37 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/apache2.conf.erb +230 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/apache2.god.erb +19 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/charset.erb +6 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/default-site.erb +57 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/README +2 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/alias.conf.erb +24 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/autoindex.conf.erb +101 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/deflate.conf.erb +3 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/dir.conf.erb +5 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/fcgid.conf.erb +10 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/mime.conf.erb +191 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/negotiation.conf.erb +18 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/proxy.conf.erb +19 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/setenvif.conf.erb +28 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/ssl.conf.erb +72 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/mods/status.conf.erb +16 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apache2/templates/default/security.erb +50 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apt/files/default/apt-cacher +9 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apt/files/default/apt-cacher.conf +144 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apt/files/default/apt-proxy-v2.conf +50 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apt/metadata.json +51 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apt/metadata.rb +11 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apt/recipes/cacher.rb +42 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apt/recipes/default.rb +31 -0
- data/examples/chef_cloud/chef-repo/cookbooks/apt/recipes/proxy.rb +34 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/README.rdoc +165 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/attributes/bootstrap.rb +49 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/metadata.json +57 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/metadata.rb +10 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/recipes/client.rb +94 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/recipes/default.rb +18 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/recipes/server.rb +120 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/templates/default/client.rb.erb +30 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/templates/default/server.rb.erb +32 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/templates/default/sv-chef-client-log-run.erb +2 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/templates/default/sv-chef-client-run.erb +4 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/templates/default/sv-chef-indexer-log-run.erb +2 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/templates/default/sv-chef-indexer-run.erb +4 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/templates/default/sv-chef-server-log-run.erb +2 -0
- data/examples/chef_cloud/chef-repo/cookbooks/bootstrap/templates/default/sv-chef-server-run.erb +4 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/README.rdoc +221 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/attributes/chef.rb +60 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/metadata.json +231 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/metadata.rb +87 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/recipes/client.rb +76 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/recipes/server.rb +75 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/recipes/server_proxy.rb +59 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/templates/default/chef_server.conf.erb +49 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/templates/default/client.rb.erb +30 -0
- data/examples/chef_cloud/chef-repo/cookbooks/chef/templates/default/server.rb.erb +32 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ec2/attributes/ec2_metadata.rb +44 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ec2/attributes/ec2_recipe_options.rb +30 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ec2/metadata.rb +9 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ec2/recipes/default.rb +19 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/README.rdoc +8 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/attributes/default.rb +14 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/metadata.rb +12 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/recipes/default.rb +141 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/recipes/gmetad.rb +44 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/recipes/monitor_sshd.rb +14 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/recipes/monitor_watson.rb +14 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/recipes/web.rb +17 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/templates/default/bin/gmetad.erb +38 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/templates/default/bin/gmond.erb +38 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/templates/default/bin/monitors/sshd_ganglia.sh.erb +13 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/templates/default/bin/monitors/watson_channels.sh.erb +13 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/templates/default/ganglia-web-conf.php.erb +191 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/templates/default/gmetad.conf.erb +117 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/templates/default/gmond.conf.erb +426 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ganglia/templates/default/jaunty.sources.list.erb +6 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ntp/attributes/ntp.rb +11 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ntp/metadata.json +97 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ntp/metadata.rb +31 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ntp/recipes/default.rb +41 -0
- data/examples/chef_cloud/chef-repo/cookbooks/ntp/templates/default/ntp.conf.erb +21 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/README.rdoc +55 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/attributes/rsyslog.rb +24 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/files/default/rsyslog.default +9 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/files/ubuntu-8.04/rsyslog.default +13 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/files/ubuntu-9.10/rsyslog.default +9 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/metadata.json +88 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/metadata.rb +29 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/recipes/client.rb +40 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/recipes/default.rb +61 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/recipes/server.rb +48 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/templates/default/remote.conf.erb +6 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/templates/default/rsyslog.conf.erb +121 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/templates/default/server.conf.erb +58 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/templates/ubuntu-9.10/50-default.conf.erb +69 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/templates/ubuntu-9.10/remote.conf.erb +6 -0
- data/examples/chef_cloud/chef-repo/cookbooks/rsyslog/templates/ubuntu-9.10/server.conf.erb +58 -0
- data/examples/chef_cloud/chef-repo/cookbooks/runit/attributes/sv_bin.rb +27 -0
- data/examples/chef_cloud/chef-repo/cookbooks/runit/definitions/runit_service.rb +75 -0
- data/examples/chef_cloud/chef-repo/cookbooks/runit/files/ubuntu-6.10/runsvdir +6 -0
- data/examples/chef_cloud/chef-repo/cookbooks/runit/files/ubuntu-7.04/runsvdir +7 -0
- data/examples/chef_cloud/chef-repo/cookbooks/runit/files/ubuntu-7.10/runsvdir +7 -0
- data/examples/chef_cloud/chef-repo/cookbooks/runit/files/ubuntu-8.04/runsvdir +7 -0
- data/examples/chef_cloud/chef-repo/cookbooks/runit/metadata.json +85 -0
- data/examples/chef_cloud/chef-repo/cookbooks/runit/metadata.rb +30 -0
- data/examples/chef_cloud/chef-repo/cookbooks/runit/recipes/default.rb +46 -0
- data/examples/chef_cloud/chef-repo/roles/README +1 -0
- data/examples/chef_cloud/chef-repo/roles/chef-upgrade.rb +14 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/README +1 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/README.rdoc +9 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/attributes/collectd.rb +3 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/files/ubuntu/collectd.default +17 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/metadata.rb +6 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/recipes/default.rb +62 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/templates/default/collectd.conf.erb +107 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/templates/default/collection.conf.erb +2 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/collectd/templates/default/collection3.conf.erb +4 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/hosts/attributes/hosts.rb +1 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/hosts/metadata.rb +4 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/hosts/recipes/default.rb +3 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/hosts/templates/default/hosts.erb +18 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/sysadmin/recipes/default.rb +22 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/ubuntu/metadata.json +42 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/ubuntu/metadata.rb +7 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/ubuntu/recipes/default.rb +31 -0
- data/examples/chef_cloud/chef-repo/site-cookbooks/ubuntu/templates/default/sources.list.erb +16 -0
- data/examples/chef_cloud/sample +2 -0
- data/examples/chef_cloud.rb +24 -0
- data/examples/ec2_infrastructure_only.rb +80 -0
- data/examples/simple.rb +22 -10
- data/lib/cloud_providers/cloud_provider.rb +43 -63
- data/lib/cloud_providers/connections.rb +29 -11
- data/lib/cloud_providers/default/base.rb +4 -0
- data/lib/cloud_providers/ec2/ec2.rb +258 -143
- data/lib/cloud_providers/ec2/ec2_instance.rb +87 -82
- data/lib/cloud_providers/ec2/helpers/authorize.rb +33 -0
- data/lib/cloud_providers/ec2/helpers/ec2_helper.rb +30 -0
- data/lib/cloud_providers/ec2/helpers/elastic_auto_scaler.rb +300 -0
- data/lib/cloud_providers/ec2/helpers/elastic_block_store.rb +9 -0
- data/lib/cloud_providers/ec2/helpers/elastic_ip.rb +33 -0
- data/lib/cloud_providers/ec2/helpers/elastic_load_balancer.rb +200 -0
- data/lib/cloud_providers/ec2/helpers/revoke.rb +24 -0
- data/lib/cloud_providers/ec2/helpers/security_group.rb +98 -0
- data/lib/cloud_providers/remote_instance.rb +139 -0
- data/lib/cloud_providers.rb +4 -4
- data/lib/core/array.rb +0 -37
- data/lib/core/hash.rb +11 -37
- data/lib/core/object.rb +5 -86
- data/lib/core/string.rb +1 -103
- data/lib/keypair.rb +22 -11
- data/lib/poolparty/base.rb +15 -216
- data/lib/poolparty/chef_attribute.rb +36 -0
- data/lib/poolparty/cloud.rb +222 -260
- data/lib/poolparty/pool.rb +18 -171
- data/lib/poolparty.rb +6 -25
- data/test/fixtures/clouds/simple_cloud.rb +4 -6
- data/test/fixtures/ec2/ec2-describe-instances_response_body.xml +2 -2
- data/test/fixtures/ec2/elb-describe-load-balancers.xml +75 -0
- data/test/fixtures/resources/fake_plugin.rb +5 -0
- data/test/lib/core/array_test.rb +1 -34
- data/test/lib/core/hash_test.rb +12 -20
- data/test/lib/core/object_test.rb +6 -34
- data/test/lib/core/string_test.rb +2 -35
- data/test/lib/core/symbol_test.rb +0 -4
- data/test/lib/poolparty/cloud_test.rb +14 -133
- data/test/lib/poolparty/keypair_test.rb +1 -3
- data/test/lib/poolparty/pool_test.rb +5 -19
- data/test/test_methods.rb +6 -11
- data/vendor/gems/amazon-ec2/ChangeLog +289 -0
- data/vendor/gems/amazon-ec2/LICENSE +66 -0
- data/vendor/gems/amazon-ec2/README.rdoc +356 -0
- data/vendor/gems/amazon-ec2/README_dev.rdoc +12 -0
- data/vendor/gems/amazon-ec2/Rakefile +101 -0
- data/vendor/gems/amazon-ec2/VERSION +1 -0
- data/vendor/gems/amazon-ec2/amazon-ec2.gemspec +134 -0
- data/vendor/gems/amazon-ec2/bin/ec2-gem-example.rb +137 -0
- data/vendor/gems/amazon-ec2/bin/ec2-gem-profile.rb +10 -0
- data/vendor/gems/amazon-ec2/bin/ec2sh +62 -0
- data/vendor/gems/amazon-ec2/bin/setup.rb +28 -0
- data/vendor/gems/amazon-ec2/deps.rip +1 -0
- data/vendor/gems/amazon-ec2/lib/AWS/Autoscaling/autoscaling.rb +283 -0
- data/vendor/gems/amazon-ec2/lib/AWS/Autoscaling.rb +70 -0
- data/vendor/gems/amazon-ec2/lib/AWS/Cloudwatch/monitoring.rb +80 -0
- data/vendor/gems/amazon-ec2/lib/AWS/Cloudwatch.rb +32 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/availability_zones.rb +21 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/console.rb +23 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/elastic_ips.rb +81 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/image_attributes.rb +133 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/images.rb +101 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/instances.rb +212 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/keypairs.rb +61 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/products.rb +21 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/security_groups.rb +183 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/snapshots.rb +59 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2/volumes.rb +115 -0
- data/vendor/gems/amazon-ec2/lib/AWS/EC2.rb +33 -0
- data/vendor/gems/amazon-ec2/lib/AWS/ELB/load_balancers.rb +205 -0
- data/vendor/gems/amazon-ec2/lib/AWS/ELB.rb +71 -0
- data/vendor/gems/amazon-ec2/lib/AWS/exceptions.rb +122 -0
- data/vendor/gems/amazon-ec2/lib/AWS/responses.rb +21 -0
- data/vendor/gems/amazon-ec2/lib/AWS.rb +294 -0
- data/vendor/gems/amazon-ec2/perftools/ec2prof +0 -0
- data/vendor/gems/amazon-ec2/perftools/ec2prof-results.dot +193 -0
- data/vendor/gems/amazon-ec2/perftools/ec2prof-results.txt +126 -0
- data/vendor/gems/amazon-ec2/perftools/ec2prof.symbols +129 -0
- data/vendor/gems/amazon-ec2/test/test_Autoscaling_groups.rb +336 -0
- data/vendor/gems/amazon-ec2/test/test_EC2.rb +68 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_availability_zones.rb +49 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_console.rb +54 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_elastic_ips.rb +144 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_image_attributes.rb +238 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_images.rb +197 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_instances.rb +429 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_keypairs.rb +123 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_products.rb +48 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_responses.rb +53 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_s3_xmlsimple.rb +80 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_security_groups.rb +205 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_snapshots.rb +83 -0
- data/vendor/gems/amazon-ec2/test/test_EC2_volumes.rb +142 -0
- data/vendor/gems/amazon-ec2/test/test_ELB_load_balancers.rb +239 -0
- data/vendor/gems/amazon-ec2/test/test_helper.rb +23 -0
- data/vendor/gems/amazon-ec2/wsdl/2007-08-29.ec2.wsdl +1269 -0
- data/vendor/gems/amazon-ec2/wsdl/2008-02-01.ec2.wsdl +1614 -0
- data/vendor/gems/amazon-ec2/wsdl/2008-05-05.ec2.wsdl +2052 -0
- data/vendor/gems/amazon-ec2/wsdl/2008-12-01.ec2.wsdl +2354 -0
- data/vendor/gems/searchable_paths/README.rdoc +18 -0
- data/vendor/gems/searchable_paths/Rakefile +56 -0
- data/vendor/gems/searchable_paths/lib/searchable_paths.rb +81 -0
- data/vendor/gems/searchable_paths/test/searchable_paths_test.rb +74 -0
- data/vendor/gems/searchable_paths/test/test_helper.rb +16 -0
- metadata +269 -886
- data/bin/cloud-misc +0 -34
- data/bin/cloud-osxcopy +0 -26
- data/bin/cloud-setup +0 -36
- data/bin/cloud-thrift +0 -91
- data/bin/cloud-verify +0 -40
- data/examples/basic.rb +0 -30
- data/examples/custom_bootstrap.sh +0 -7
- data/examples/deploy.rb +0 -5
- data/examples/eucalyptus.rb +0 -63
- data/examples/eucalyptus_test_run.sh +0 -31
- data/examples/monitored_cloud.rb +0 -22
- data/examples/ssh_garden.rb +0 -21
- data/examples/thrift/erlang/Emakefile +0 -5
- data/examples/thrift/erlang/Makefile +0 -26
- data/examples/thrift/erlang/deps/thrift/COPYING +0 -24
- data/examples/thrift/erlang/deps/thrift/LICENSE +0 -24
- data/examples/thrift/erlang/deps/thrift/Makefile +0 -18
- data/examples/thrift/erlang/deps/thrift/README +0 -31
- data/examples/thrift/erlang/deps/thrift/build/beamver +0 -59
- data/examples/thrift/erlang/deps/thrift/build/buildtargets.mk +0 -14
- data/examples/thrift/erlang/deps/thrift/build/colors.mk +0 -24
- data/examples/thrift/erlang/deps/thrift/build/docs.mk +0 -12
- data/examples/thrift/erlang/deps/thrift/build/mime.types +0 -98
- data/examples/thrift/erlang/deps/thrift/build/otp.mk +0 -146
- data/examples/thrift/erlang/deps/thrift/build/otp_subdir.mk +0 -85
- data/examples/thrift/erlang/deps/thrift/build/raw_test.mk +0 -29
- data/examples/thrift/erlang/deps/thrift/ebin/thrift.app +0 -44
- data/examples/thrift/erlang/deps/thrift/ebin/thrift.appup +0 -1
- data/examples/thrift/erlang/deps/thrift/include/thrift_constants.hrl +0 -40
- data/examples/thrift/erlang/deps/thrift/include/thrift_protocol.hrl +0 -12
- data/examples/thrift/erlang/deps/thrift/src/Makefile +0 -116
- data/examples/thrift/erlang/deps/thrift/src/test_handler.erl +0 -7
- data/examples/thrift/erlang/deps/thrift/src/test_service.erl +0 -10
- data/examples/thrift/erlang/deps/thrift/src/thrift.app.src +0 -44
- data/examples/thrift/erlang/deps/thrift/src/thrift.appup.src +0 -1
- data/examples/thrift/erlang/deps/thrift/src/thrift_app.erl +0 -55
- data/examples/thrift/erlang/deps/thrift/src/thrift_base64_transport.erl +0 -45
- data/examples/thrift/erlang/deps/thrift/src/thrift_binary_protocol.erl +0 -318
- data/examples/thrift/erlang/deps/thrift/src/thrift_buffered_transport.erl +0 -168
- data/examples/thrift/erlang/deps/thrift/src/thrift_client.erl +0 -328
- data/examples/thrift/erlang/deps/thrift/src/thrift_disk_log_transport.erl +0 -106
- data/examples/thrift/erlang/deps/thrift/src/thrift_file_transport.erl +0 -69
- data/examples/thrift/erlang/deps/thrift/src/thrift_framed_transport.erl +0 -196
- data/examples/thrift/erlang/deps/thrift/src/thrift_http_transport.erl +0 -169
- data/examples/thrift/erlang/deps/thrift/src/thrift_processor.erl +0 -174
- data/examples/thrift/erlang/deps/thrift/src/thrift_protocol.erl +0 -326
- data/examples/thrift/erlang/deps/thrift/src/thrift_server.erl +0 -171
- data/examples/thrift/erlang/deps/thrift/src/thrift_service.erl +0 -6
- data/examples/thrift/erlang/deps/thrift/src/thrift_socket_server.erl +0 -245
- data/examples/thrift/erlang/deps/thrift/src/thrift_socket_transport.erl +0 -100
- data/examples/thrift/erlang/deps/thrift/src/thrift_sup.erl +0 -53
- data/examples/thrift/erlang/deps/thrift/src/thrift_transport.erl +0 -38
- data/examples/thrift/erlang/deps/thrift/vsn.mk +0 -1
- data/examples/thrift/erlang/include/commandInterface_thrift.hrl +0 -5
- data/examples/thrift/erlang/include/poolparty_constants.hrl +0 -9
- data/examples/thrift/erlang/include/poolparty_types.hrl +0 -8
- data/examples/thrift/erlang/src/commandInterface_thrift.erl +0 -29
- data/examples/thrift/erlang/src/poolparty_types.erl +0 -30
- data/examples/thrift/erlang/src/thrift_example.erl +0 -32
- data/examples/thrift/thrift_example.py +0 -28
- data/examples/thrift/thrift_example.rb +0 -40
- data/examples/vmware.rb +0 -28
- data/lib/cloud_providers/cloud_provider_instance.rb +0 -288
- data/lib/cloud_providers/ec2/ec2_helpers.rb +0 -100
- data/lib/cloud_providers/ec2/ec2_response.rb +0 -79
- data/lib/cloud_providers/ssh/ssh.rb +0 -68
- data/lib/cloud_providers/ssh/ssh_instance.rb +0 -41
- data/lib/cloud_providers/vmware/vmware.rb +0 -130
- data/lib/cloud_providers/vmware/vmware_instance.rb +0 -56
- data/lib/core/file.rb +0 -12
- data/lib/core/integer.rb +0 -11
- data/lib/core/module.rb +0 -14
- data/lib/core/proc.rb +0 -55
- data/lib/core/time.rb +0 -62
- data/lib/dependency_resolver.rb +0 -11
- data/lib/dependency_resolvers/base.rb +0 -115
- data/lib/dependency_resolvers/chef/resources/chef_attributes_file.rb +0 -51
- data/lib/dependency_resolvers/chef/resources/chef_recipe.rb +0 -51
- data/lib/dependency_resolvers/chef/resources/http_request.rb +0 -39
- data/lib/dependency_resolvers/chef/resources/remote_directory.rb +0 -54
- data/lib/dependency_resolvers/chef/resources/remote_file.rb +0 -69
- data/lib/dependency_resolvers/chef/resources/route.rb +0 -52
- data/lib/dependency_resolvers/chef/resources/script.rb +0 -62
- data/lib/dependency_resolvers/chef.rb +0 -239
- data/lib/dependency_resolvers/proxy_object.rb +0 -98
- data/lib/mixins/askable.rb +0 -163
- data/lib/mixins/callbacks.rb +0 -56
- data/lib/mixins/delayed.rb +0 -65
- data/lib/mixins/pinger.rb +0 -31
- data/lib/mixins/printing.rb +0 -35
- data/lib/mixins/searchable_paths.rb +0 -87
- data/lib/poolparty/default.rb +0 -33
- data/lib/poolparty/dsl_base.rb +0 -36
- data/lib/poolparty/installer.rb +0 -111
- data/lib/poolparty/installers/ec2.rb +0 -88
- data/lib/poolparty/installers/vmware.rb +0 -161
- data/lib/poolparty/monitor.rb +0 -83
- data/lib/poolparty/plugin.rb +0 -8
- data/lib/poolparty/plugins/apache.rb +0 -228
- data/lib/poolparty/plugins/apache2/apache2.conf.erb +0 -630
- data/lib/poolparty/plugins/apache2/base.conf.erb +0 -171
- data/lib/poolparty/plugins/apache2/browser_fixes.conf.erb +0 -26
- data/lib/poolparty/plugins/apache2/default-site.conf.erb +0 -41
- data/lib/poolparty/plugins/apache2/mime-minimal.conf.erb +0 -15
- data/lib/poolparty/plugins/apache2/passenger_site.rb +0 -83
- data/lib/poolparty/plugins/apache2/php5.rb +0 -41
- data/lib/poolparty/plugins/apache2/virtual_host.rb +0 -59
- data/lib/poolparty/plugins/collectd/templates/collectd.conf.erb +0 -369
- data/lib/poolparty/plugins/collectd.rb +0 -24
- data/lib/poolparty/plugins/git/git_repository.rb +0 -83
- data/lib/poolparty/plugins/git.rb +0 -20
- data/lib/poolparty/plugins/hermes.rb +0 -102
- data/lib/poolparty/plugins/rails/app.rb +0 -29
- data/lib/poolparty/plugins/rails.rb +0 -25
- data/lib/poolparty/pool_party_log.rb +0 -47
- data/lib/poolparty/resource.rb +0 -296
- data/lib/poolparty/resources/conditional.rb +0 -65
- data/lib/poolparty/resources/cron.rb +0 -64
- data/lib/poolparty/resources/directory.rb +0 -54
- data/lib/poolparty/resources/exec.rb +0 -61
- data/lib/poolparty/resources/file.rb +0 -87
- data/lib/poolparty/resources/gem_package.rb +0 -55
- data/lib/poolparty/resources/group.rb +0 -46
- data/lib/poolparty/resources/line.rb +0 -67
- data/lib/poolparty/resources/link.rb +0 -50
- data/lib/poolparty/resources/mount.rb +0 -57
- data/lib/poolparty/resources/package.rb +0 -55
- data/lib/poolparty/resources/service.rb +0 -58
- data/lib/poolparty/resources/user.rb +0 -63
- data/lib/poolparty/resources/variable.rb +0 -61
- data/lib/proto/command_interface_handler.rb +0 -66
- data/lib/proto/command_query_handler.rb +0 -19
- data/lib/proto/gen-erl/commandInterface_thrift.erl +0 -29
- data/lib/proto/gen-erl/commandInterface_thrift.hrl +0 -5
- data/lib/proto/gen-erl/poolparty_constants.hrl +0 -9
- data/lib/proto/gen-erl/poolparty_types.erl +0 -30
- data/lib/proto/gen-erl/poolparty_types.hrl +0 -8
- data/lib/proto/gen-py/cloudthrift/CommandInterface-remote +0 -79
- data/lib/proto/gen-py/cloudthrift/CommandInterface.py +0 -251
- data/lib/proto/gen-py/cloudthrift/CommandInterface.pyc +0 -0
- data/lib/proto/gen-py/cloudthrift/__init__.py +0 -1
- data/lib/proto/gen-py/cloudthrift/__init__.pyc +0 -0
- data/lib/proto/gen-py/cloudthrift/constants.py +0 -9
- data/lib/proto/gen-py/cloudthrift/constants.pyc +0 -0
- data/lib/proto/gen-py/cloudthrift/ttypes.py +0 -160
- data/lib/proto/gen-py/cloudthrift/ttypes.pyc +0 -0
- data/lib/proto/gen-py/thrift/TSCons.py +0 -33
- data/lib/proto/gen-py/thrift/Thrift.py +0 -123
- data/lib/proto/gen-py/thrift/Thrift.pyc +0 -0
- data/lib/proto/gen-py/thrift/__init__.py +0 -20
- data/lib/proto/gen-py/thrift/__init__.pyc +0 -0
- data/lib/proto/gen-py/thrift/protocol/TBinaryProtocol.py +0 -259
- data/lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyc +0 -0
- data/lib/proto/gen-py/thrift/protocol/TProtocol.py +0 -205
- data/lib/proto/gen-py/thrift/protocol/TProtocol.pyc +0 -0
- data/lib/proto/gen-py/thrift/protocol/__init__.py +0 -20
- data/lib/proto/gen-py/thrift/protocol/__init__.pyc +0 -0
- data/lib/proto/gen-py/thrift/protocol/fastbinary.c +0 -1203
- data/lib/proto/gen-py/thrift/server/THttpServer.py +0 -63
- data/lib/proto/gen-py/thrift/server/TNonblockingServer.py +0 -309
- data/lib/proto/gen-py/thrift/server/TServer.py +0 -270
- data/lib/proto/gen-py/thrift/server/__init__.py +0 -20
- data/lib/proto/gen-py/thrift/transport/THttpClient.py +0 -100
- data/lib/proto/gen-py/thrift/transport/TSocket.py +0 -149
- data/lib/proto/gen-py/thrift/transport/TSocket.pyc +0 -0
- data/lib/proto/gen-py/thrift/transport/TTransport.py +0 -326
- data/lib/proto/gen-py/thrift/transport/TTransport.pyc +0 -0
- data/lib/proto/gen-py/thrift/transport/TTwisted.py +0 -181
- data/lib/proto/gen-py/thrift/transport/__init__.py +0 -20
- data/lib/proto/gen-py/thrift/transport/__init__.pyc +0 -0
- data/lib/proto/gen-rb/command_interface.rb +0 -84
- data/lib/proto/gen-rb/poolparty_constants.rb +0 -10
- data/lib/proto/gen-rb/poolparty_types.rb +0 -45
- data/lib/proto/poolparty.thrift +0 -18
- data/lib/provision/bootstrap_scripts/build_centos.sh +0 -72
- data/lib/provision/bootstrap_scripts/build_ubuntu.sh +0 -76
- data/lib/provision/bootstrap_scripts/determine_os.sh +0 -21
- data/lib/provision/bootstrapper.rb +0 -44
- data/lib/provision/configure_scripts/configure_centos.erb +0 -7
- data/lib/provision/configure_scripts/configure_ubuntu.erb +0 -7
- data/tasks/development.rake +0 -91
- data/tasks/poolparty.rake +0 -118
- data/tasks/test.rake +0 -40
- data/test/fixtures/clouds/fake_clouds.rb +0 -9
- data/test/lib/cloud_providers/cloud_provider_instance_test.rb +0 -68
- data/test/lib/cloud_providers/cloud_provider_test.rb +0 -25
- data/test/lib/cloud_providers/connections_test.rb +0 -71
- data/test/lib/cloud_providers/ec2/ec2_helpers_test.rb +0 -29
- data/test/lib/cloud_providers/ec2/ec2_instance_test.rb +0 -68
- data/test/lib/cloud_providers/ec2/ec2_response_test.rb +0 -41
- data/test/lib/cloud_providers/ec2/ec2_test.rb +0 -120
- data/test/lib/cloud_providers/ssh/ssh_test.rb +0 -61
- data/test/lib/cloud_providers/vmware/vmware_test.rb +0 -46
- data/test/lib/core/integer_test.rb +0 -19
- data/test/lib/core/module_test.rb +0 -38
- data/test/lib/core/proc_test.rb +0 -26
- data/test/lib/core/time_test.rb +0 -51
- data/test/lib/dependency_resolvers/base_test.rb +0 -42
- data/test/lib/dependency_resolvers/chef/resources/chef_recipe_test.rb +0 -21
- data/test/lib/dependency_resolvers/chef/resources/http_request_test.rb +0 -29
- data/test/lib/dependency_resolvers/chef/resources/remote_directory_test.rb +0 -45
- data/test/lib/dependency_resolvers/chef/resources/remote_file_test.rb +0 -36
- data/test/lib/dependency_resolvers/chef/resources/route_test.rb +0 -37
- data/test/lib/dependency_resolvers/chef/resources/script_test.rb +0 -49
- data/test/lib/dependency_resolvers/chef_test.rb +0 -136
- data/test/lib/dependency_resolvers/proxy_object_test.rb +0 -75
- data/test/lib/mixins/callbacks_test.rb +0 -48
- data/test/lib/mixins/delayed_test.rb +0 -50
- data/test/lib/mixins/searchable_paths_test.rb +0 -83
- data/test/lib/poolparty/base_test.rb +0 -47
- data/test/lib/poolparty/default_test.rb +0 -17
- data/test/lib/poolparty/dsl_base_test.rb +0 -30
- data/test/lib/poolparty/installers/vmware_installer_test.rb +0 -16
- data/test/lib/poolparty/monitor_test.rb +0 -57
- data/test/lib/poolparty/plugins/apache2/php5_test.rb +0 -26
- data/test/lib/poolparty/plugins/apache2/virtual_host_test.rb +0 -28
- data/test/lib/poolparty/plugins/apache_test.rb +0 -35
- data/test/lib/poolparty/pool_party_log_test.rb +0 -17
- data/test/lib/poolparty/resource_test.rb +0 -162
- data/test/lib/poolparty/resources/conditional_test.rb +0 -50
- data/test/lib/poolparty/resources/cron_test.rb +0 -31
- data/test/lib/poolparty/resources/directory_test.rb +0 -21
- data/test/lib/poolparty/resources/exec_test.rb +0 -62
- data/test/lib/poolparty/resources/file_test.rb +0 -38
- data/test/lib/poolparty/resources/group_test.rb +0 -21
- data/test/lib/poolparty/resources/line_test.rb +0 -20
- data/test/lib/poolparty/resources/link_test.rb +0 -27
- data/test/lib/poolparty/resources/mount_test.rb +0 -32
- data/test/lib/poolparty/resources/package_test.rb +0 -28
- data/test/lib/poolparty/resources/service_test.rb +0 -31
- data/test/lib/poolparty/resources/user_test.rb +0 -33
- data/test/lib/poolparty/resources/variable_test.rb +0 -43
- data/test/lib/proto/command_query_handler_test.rb +0 -11
- data/test/lib/provision/base_test.rb +0 -16
- data/test/lib/provision/bootstrapper_test.rb +0 -19
- data/vendor/chef/apache2/README.rdoc +0 -59
- data/vendor/chef/apache2/attributes/apache.rb +0 -72
- data/vendor/chef/apache2/definitions/apache_module.rb +0 -36
- data/vendor/chef/apache2/definitions/apache_site.rb +0 -36
- data/vendor/chef/apache2/definitions/web_app.rb +0 -45
- data/vendor/chef/apache2/files/default/apache2_module_conf_generate.pl +0 -41
- data/vendor/chef/apache2/recipes/default.rb +0 -132
- data/vendor/chef/apache2/recipes/mod_alias.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_auth_basic.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_auth_digest.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_authn_file.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_authnz_ldap.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_authz_default.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_authz_groupfile.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_authz_host.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_authz_user.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_autoindex.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_cgi.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_dav.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_dav_svn.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_deflate.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_dir.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_env.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_expires.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_fcgid.rb +0 -35
- data/vendor/chef/apache2/recipes/mod_headers.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_ldap.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_log_config.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_mime.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_negotiation.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_php5.rb +0 -27
- data/vendor/chef/apache2/recipes/mod_proxy.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_proxy_http.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_python.rb +0 -22
- data/vendor/chef/apache2/recipes/mod_rewrite.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_setenvif.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_ssl.rb +0 -20
- data/vendor/chef/apache2/recipes/mod_status.rb +0 -20
- data/vendor/chef/apache2/templates/default/a2enmod.erb +0 -37
- data/vendor/chef/apache2/templates/default/apache2.conf.erb +0 -630
- data/vendor/chef/apache2/templates/default/default-site.erb +0 -45
- data/vendor/chef/chef-deploy/LICENSE +0 -201
- data/vendor/chef/chef-deploy/README.rdoc +0 -24
- data/vendor/chef/chef-deploy/Rakefile +0 -57
- data/vendor/chef/chef-deploy/TODO +0 -4
- data/vendor/chef/chef-deploy/lib/chef-deploy/cached_deploy.rb +0 -230
- data/vendor/chef/chef-deploy/lib/chef-deploy/git.rb +0 -132
- data/vendor/chef/chef-deploy/lib/chef-deploy/subversion.rb +0 -98
- data/vendor/chef/chef-deploy/lib/chef-deploy.rb +0 -183
- data/vendor/gems/colors/README.rdoc +0 -52
- data/vendor/gems/colors/Rakefile +0 -56
- data/vendor/gems/colors/VERSION.yml +0 -4
- data/vendor/gems/colors/colors.gemspec +0 -29
- data/vendor/gems/colors/lib/colors.rb +0 -45
- data/vendor/gems/colors/test/colors_test.rb +0 -26
- data/vendor/gems/colors/test/test_helper.rb +0 -10
- data/vendor/gems/context/History.txt +0 -10
- data/vendor/gems/context/License.txt +0 -20
- data/vendor/gems/context/Manifest.txt +0 -26
- data/vendor/gems/context/README.rdoc +0 -158
- data/vendor/gems/context/Rakefile +0 -4
- data/vendor/gems/context/config/hoe.rb +0 -73
- data/vendor/gems/context/config/requirements.rb +0 -15
- data/vendor/gems/context/context.gemspec +0 -44
- data/vendor/gems/context/countloc.rb +0 -65
- data/vendor/gems/context/coverage/-Library-Ruby-Gems-1_8-gems-rcov-0_8_1_2_0-lib-rcov_rb.html +0 -1598
- data/vendor/gems/context/coverage/index.html +0 -441
- data/vendor/gems/context/coverage/lib-context-context_rb.html +0 -669
- data/vendor/gems/context/coverage/lib-context-core_ext-string_rb.html +0 -627
- data/vendor/gems/context/coverage/lib-context-lifecycle_rb.html +0 -683
- data/vendor/gems/context/coverage/lib-context-shared_behavior_rb.html +0 -708
- data/vendor/gems/context/coverage/lib-context-suite_rb.html +0 -649
- data/vendor/gems/context/coverage/lib-context-test_rb.html +0 -637
- data/vendor/gems/context/coverage/lib-context-version_rb.html +0 -619
- data/vendor/gems/context/coverage/lib-context_rb.html +0 -623
- data/vendor/gems/context/lib/context/context.rb +0 -64
- data/vendor/gems/context/lib/context/core_ext/rails_hacks.rb +0 -10
- data/vendor/gems/context/lib/context/core_ext/string.rb +0 -17
- data/vendor/gems/context/lib/context/lifecycle.rb +0 -103
- data/vendor/gems/context/lib/context/shared_behavior.rb +0 -98
- data/vendor/gems/context/lib/context/suite.rb +0 -39
- data/vendor/gems/context/lib/context/test.rb +0 -37
- data/vendor/gems/context/lib/context/version.rb +0 -9
- data/vendor/gems/context/lib/context.rb +0 -19
- data/vendor/gems/context/setup.rb +0 -1585
- data/vendor/gems/context/tasks/deployment.rake +0 -34
- data/vendor/gems/context/tasks/environment.rake +0 -7
- data/vendor/gems/context/test/test_context.rb +0 -57
- data/vendor/gems/context/test/test_core_ext.rb +0 -21
- data/vendor/gems/context/test/test_helper.rb +0 -2
- data/vendor/gems/context/test/test_lifecycle.rb +0 -224
- data/vendor/gems/context/test/test_nested_lifecycle.rb +0 -44
- data/vendor/gems/context/test/test_shared.rb +0 -116
- data/vendor/gems/context/test/test_test.rb +0 -23
- data/vendor/gems/daemons/LICENSE +0 -29
- data/vendor/gems/daemons/README +0 -223
- data/vendor/gems/daemons/Rakefile +0 -84
- data/vendor/gems/daemons/Releases +0 -126
- data/vendor/gems/daemons/TODO +0 -6
- data/vendor/gems/daemons/examples/call/call.rb +0 -56
- data/vendor/gems/daemons/examples/call/call_monitor.rb +0 -55
- data/vendor/gems/daemons/examples/daemonize/daemonize.rb +0 -20
- data/vendor/gems/daemons/examples/run/ctrl_crash.rb +0 -17
- data/vendor/gems/daemons/examples/run/ctrl_exec.rb +0 -16
- data/vendor/gems/daemons/examples/run/ctrl_exit.rb +0 -15
- data/vendor/gems/daemons/examples/run/ctrl_keep_pid_files.rb +0 -17
- data/vendor/gems/daemons/examples/run/ctrl_monitor.rb +0 -16
- data/vendor/gems/daemons/examples/run/ctrl_multiple.rb +0 -16
- data/vendor/gems/daemons/examples/run/ctrl_normal.rb +0 -12
- data/vendor/gems/daemons/examples/run/ctrl_ontop.rb +0 -16
- data/vendor/gems/daemons/examples/run/ctrl_optionparser.rb +0 -43
- data/vendor/gems/daemons/examples/run/ctrl_proc.rb +0 -25
- data/vendor/gems/daemons/examples/run/ctrl_proc.rb.output +0 -101
- data/vendor/gems/daemons/examples/run/ctrl_proc_multiple.rb +0 -22
- data/vendor/gems/daemons/examples/run/ctrl_proc_multiple.rb.output +0 -2
- data/vendor/gems/daemons/examples/run/ctrl_proc_simple.rb +0 -17
- data/vendor/gems/daemons/examples/run/myserver.rb +0 -12
- data/vendor/gems/daemons/examples/run/myserver_crashing.rb +0 -14
- data/vendor/gems/daemons/examples/run/myserver_crashing.rb.output +0 -30
- data/vendor/gems/daemons/examples/run/myserver_exiting.rb +0 -8
- data/vendor/gems/daemons/lib/daemons/application.rb +0 -372
- data/vendor/gems/daemons/lib/daemons/application_group.rb +0 -152
- data/vendor/gems/daemons/lib/daemons/cmdline.rb +0 -117
- data/vendor/gems/daemons/lib/daemons/controller.rb +0 -134
- data/vendor/gems/daemons/lib/daemons/daemonize.rb +0 -263
- data/vendor/gems/daemons/lib/daemons/exceptions.rb +0 -28
- data/vendor/gems/daemons/lib/daemons/monitor.rb +0 -127
- data/vendor/gems/daemons/lib/daemons/pid.rb +0 -101
- data/vendor/gems/daemons/lib/daemons/pidfile.rb +0 -111
- data/vendor/gems/daemons/lib/daemons/pidmem.rb +0 -10
- data/vendor/gems/daemons/lib/daemons.rb +0 -283
- data/vendor/gems/daemons/setup.rb +0 -1360
- data/vendor/gems/fakeweb/CHANGELOG +0 -163
- data/vendor/gems/fakeweb/LICENSE.txt +0 -281
- data/vendor/gems/fakeweb/README.rdoc +0 -193
- data/vendor/gems/fakeweb/Rakefile +0 -76
- data/vendor/gems/fakeweb/fakeweb.gemspec +0 -21
- data/vendor/gems/fakeweb/lib/fake_web/ext/net_http.rb +0 -71
- data/vendor/gems/fakeweb/lib/fake_web/registry.rb +0 -103
- data/vendor/gems/fakeweb/lib/fake_web/responder.rb +0 -113
- data/vendor/gems/fakeweb/lib/fake_web/response.rb +0 -10
- data/vendor/gems/fakeweb/lib/fake_web/stub_socket.rb +0 -15
- data/vendor/gems/fakeweb/lib/fake_web/utility.rb +0 -22
- data/vendor/gems/fakeweb/lib/fake_web.rb +0 -172
- data/vendor/gems/fakeweb/lib/fakeweb.rb +0 -2
- data/vendor/gems/fakeweb/test/fixtures/google_response_from_curl +0 -12
- data/vendor/gems/fakeweb/test/fixtures/google_response_with_transfer_encoding +0 -17
- data/vendor/gems/fakeweb/test/fixtures/google_response_without_transfer_encoding +0 -11
- data/vendor/gems/fakeweb/test/fixtures/test_example.txt +0 -1
- data/vendor/gems/fakeweb/test/fixtures/test_txt_file +0 -3
- data/vendor/gems/fakeweb/test/test_allow_net_connect.rb +0 -85
- data/vendor/gems/fakeweb/test/test_deprecations.rb +0 -54
- data/vendor/gems/fakeweb/test/test_fake_authentication.rb +0 -92
- data/vendor/gems/fakeweb/test/test_fake_web.rb +0 -518
- data/vendor/gems/fakeweb/test/test_fake_web_open_uri.rb +0 -58
- data/vendor/gems/fakeweb/test/test_helper.rb +0 -74
- data/vendor/gems/fakeweb/test/test_missing_open_uri.rb +0 -25
- data/vendor/gems/fakeweb/test/test_precedence.rb +0 -51
- data/vendor/gems/fakeweb/test/test_query_string.rb +0 -45
- data/vendor/gems/fakeweb/test/test_regexes.rb +0 -103
- data/vendor/gems/fakeweb/test/test_response_headers.rb +0 -73
- data/vendor/gems/fakeweb/test/test_trailing_slashes.rb +0 -53
- data/vendor/gems/fakeweb/test/test_utility.rb +0 -70
- data/vendor/gems/gratr/Grater.xcf +0 -0
- data/vendor/gems/gratr/README +0 -335
- data/vendor/gems/gratr/Rakefile +0 -220
- data/vendor/gems/gratr/examples/graph_self.rb +0 -54
- data/vendor/gems/gratr/examples/module_graph.jpg +0 -0
- data/vendor/gems/gratr/examples/module_graph.rb +0 -12
- data/vendor/gems/gratr/examples/self_graph.dot +0 -117
- data/vendor/gems/gratr/examples/self_graph.jpg +0 -0
- data/vendor/gems/gratr/examples/visualize.dot +0 -58
- data/vendor/gems/gratr/examples/visualize.jpg +0 -0
- data/vendor/gems/gratr/examples/visualize.rb +0 -11
- data/vendor/gems/gratr/install.rb +0 -49
- data/vendor/gems/gratr/lib/gratr/adjacency_graph.rb +0 -230
- data/vendor/gems/gratr/lib/gratr/base.rb +0 -34
- data/vendor/gems/gratr/lib/gratr/biconnected.rb +0 -116
- data/vendor/gems/gratr/lib/gratr/chinese_postman.rb +0 -123
- data/vendor/gems/gratr/lib/gratr/common.rb +0 -73
- data/vendor/gems/gratr/lib/gratr/comparability.rb +0 -92
- data/vendor/gems/gratr/lib/gratr/digraph.rb +0 -115
- data/vendor/gems/gratr/lib/gratr/digraph_distance.rb +0 -185
- data/vendor/gems/gratr/lib/gratr/dot.rb +0 -95
- data/vendor/gems/gratr/lib/gratr/edge.rb +0 -145
- data/vendor/gems/gratr/lib/gratr/graph.rb +0 -315
- data/vendor/gems/gratr/lib/gratr/graph_api.rb +0 -82
- data/vendor/gems/gratr/lib/gratr/import.rb +0 -44
- data/vendor/gems/gratr/lib/gratr/labels.rb +0 -103
- data/vendor/gems/gratr/lib/gratr/maximum_flow.rb +0 -107
- data/vendor/gems/gratr/lib/gratr/rdot.rb +0 -332
- data/vendor/gems/gratr/lib/gratr/search.rb +0 -422
- data/vendor/gems/gratr/lib/gratr/strong_components.rb +0 -127
- data/vendor/gems/gratr/lib/gratr/undirected_graph.rb +0 -153
- data/vendor/gems/gratr/lib/gratr.rb +0 -42
- data/vendor/gems/gratr/lib/priority-queue/benchmark/dijkstra.rb +0 -171
- data/vendor/gems/gratr/lib/priority-queue/compare_comments.rb +0 -49
- data/vendor/gems/gratr/lib/priority-queue/ext/priority_queue/CPriorityQueue/extconf.rb +0 -2
- data/vendor/gems/gratr/lib/priority-queue/lib/priority_queue/c_priority_queue.rb +0 -1
- data/vendor/gems/gratr/lib/priority-queue/lib/priority_queue/poor_priority_queue.rb +0 -46
- data/vendor/gems/gratr/lib/priority-queue/lib/priority_queue/ruby_priority_queue.rb +0 -525
- data/vendor/gems/gratr/lib/priority-queue/lib/priority_queue.rb +0 -14
- data/vendor/gems/gratr/lib/priority-queue/setup.rb +0 -1551
- data/vendor/gems/gratr/lib/priority-queue/test/priority_queue_test.rb +0 -371
- data/vendor/gems/gratr/tests/TestBiconnected.rb +0 -53
- data/vendor/gems/gratr/tests/TestChinesePostman.rb +0 -53
- data/vendor/gems/gratr/tests/TestComplement.rb +0 -54
- data/vendor/gems/gratr/tests/TestDigraph.rb +0 -333
- data/vendor/gems/gratr/tests/TestDigraphDistance.rb +0 -138
- data/vendor/gems/gratr/tests/TestDot.rb +0 -75
- data/vendor/gems/gratr/tests/TestEdge.rb +0 -171
- data/vendor/gems/gratr/tests/TestInspection.rb +0 -57
- data/vendor/gems/gratr/tests/TestMultiEdge.rb +0 -57
- data/vendor/gems/gratr/tests/TestNeighborhood.rb +0 -64
- data/vendor/gems/gratr/tests/TestProperties.rb +0 -160
- data/vendor/gems/gratr/tests/TestSearch.rb +0 -277
- data/vendor/gems/gratr/tests/TestStrongComponents.rb +0 -85
- data/vendor/gems/gratr/tests/TestTriagulated.rb +0 -137
- data/vendor/gems/gratr/tests/TestUndirectedGraph.rb +0 -219
- data/vendor/gems/net-ssh/CHANGELOG.rdoc +0 -127
- data/vendor/gems/net-ssh/Manifest +0 -104
- data/vendor/gems/net-ssh/README.rdoc +0 -110
- data/vendor/gems/net-ssh/Rakefile +0 -26
- data/vendor/gems/net-ssh/THANKS.rdoc +0 -16
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/agent.rb +0 -176
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/constants.rb +0 -18
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/key_manager.rb +0 -193
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/methods/abstract.rb +0 -60
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/methods/hostbased.rb +0 -71
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/methods/keyboard_interactive.rb +0 -66
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/methods/password.rb +0 -39
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/methods/publickey.rb +0 -92
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/pageant.rb +0 -183
- data/vendor/gems/net-ssh/lib/net/ssh/authentication/session.rb +0 -134
- data/vendor/gems/net-ssh/lib/net/ssh/buffer.rb +0 -340
- data/vendor/gems/net-ssh/lib/net/ssh/buffered_io.rb +0 -149
- data/vendor/gems/net-ssh/lib/net/ssh/config.rb +0 -181
- data/vendor/gems/net-ssh/lib/net/ssh/connection/channel.rb +0 -625
- data/vendor/gems/net-ssh/lib/net/ssh/connection/constants.rb +0 -33
- data/vendor/gems/net-ssh/lib/net/ssh/connection/session.rb +0 -596
- data/vendor/gems/net-ssh/lib/net/ssh/connection/term.rb +0 -178
- data/vendor/gems/net-ssh/lib/net/ssh/errors.rb +0 -85
- data/vendor/gems/net-ssh/lib/net/ssh/key_factory.rb +0 -102
- data/vendor/gems/net-ssh/lib/net/ssh/known_hosts.rb +0 -129
- data/vendor/gems/net-ssh/lib/net/ssh/loggable.rb +0 -61
- data/vendor/gems/net-ssh/lib/net/ssh/packet.rb +0 -102
- data/vendor/gems/net-ssh/lib/net/ssh/prompt.rb +0 -93
- data/vendor/gems/net-ssh/lib/net/ssh/proxy/errors.rb +0 -14
- data/vendor/gems/net-ssh/lib/net/ssh/proxy/http.rb +0 -94
- data/vendor/gems/net-ssh/lib/net/ssh/proxy/socks4.rb +0 -70
- data/vendor/gems/net-ssh/lib/net/ssh/proxy/socks5.rb +0 -129
- data/vendor/gems/net-ssh/lib/net/ssh/ruby_compat.rb +0 -7
- data/vendor/gems/net-ssh/lib/net/ssh/service/forward.rb +0 -267
- data/vendor/gems/net-ssh/lib/net/ssh/test/channel.rb +0 -129
- data/vendor/gems/net-ssh/lib/net/ssh/test/extensions.rb +0 -152
- data/vendor/gems/net-ssh/lib/net/ssh/test/kex.rb +0 -44
- data/vendor/gems/net-ssh/lib/net/ssh/test/local_packet.rb +0 -51
- data/vendor/gems/net-ssh/lib/net/ssh/test/packet.rb +0 -81
- data/vendor/gems/net-ssh/lib/net/ssh/test/remote_packet.rb +0 -38
- data/vendor/gems/net-ssh/lib/net/ssh/test/script.rb +0 -157
- data/vendor/gems/net-ssh/lib/net/ssh/test/socket.rb +0 -59
- data/vendor/gems/net-ssh/lib/net/ssh/test.rb +0 -89
- data/vendor/gems/net-ssh/lib/net/ssh/transport/algorithms.rb +0 -384
- data/vendor/gems/net-ssh/lib/net/ssh/transport/cipher_factory.rb +0 -80
- data/vendor/gems/net-ssh/lib/net/ssh/transport/constants.rb +0 -30
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac/abstract.rb +0 -78
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac/md5.rb +0 -12
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac/md5_96.rb +0 -11
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac/none.rb +0 -15
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac/sha1.rb +0 -13
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac/sha1_96.rb +0 -11
- data/vendor/gems/net-ssh/lib/net/ssh/transport/hmac.rb +0 -31
- data/vendor/gems/net-ssh/lib/net/ssh/transport/identity_cipher.rb +0 -55
- data/vendor/gems/net-ssh/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb +0 -208
- data/vendor/gems/net-ssh/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb +0 -77
- data/vendor/gems/net-ssh/lib/net/ssh/transport/kex.rb +0 -13
- data/vendor/gems/net-ssh/lib/net/ssh/transport/openssl.rb +0 -128
- data/vendor/gems/net-ssh/lib/net/ssh/transport/packet_stream.rb +0 -230
- data/vendor/gems/net-ssh/lib/net/ssh/transport/server_version.rb +0 -60
- data/vendor/gems/net-ssh/lib/net/ssh/transport/session.rb +0 -276
- data/vendor/gems/net-ssh/lib/net/ssh/transport/state.rb +0 -201
- data/vendor/gems/net-ssh/lib/net/ssh/verifiers/lenient.rb +0 -30
- data/vendor/gems/net-ssh/lib/net/ssh/verifiers/null.rb +0 -12
- data/vendor/gems/net-ssh/lib/net/ssh/verifiers/strict.rb +0 -53
- data/vendor/gems/net-ssh/lib/net/ssh/version.rb +0 -62
- data/vendor/gems/net-ssh/lib/net/ssh.rb +0 -215
- data/vendor/gems/net-ssh/net-ssh.gemspec +0 -33
- data/vendor/gems/net-ssh/setup.rb +0 -1585
- data/vendor/gems/net-ssh/test/authentication/methods/common.rb +0 -28
- data/vendor/gems/net-ssh/test/authentication/methods/test_abstract.rb +0 -51
- data/vendor/gems/net-ssh/test/authentication/methods/test_hostbased.rb +0 -114
- data/vendor/gems/net-ssh/test/authentication/methods/test_keyboard_interactive.rb +0 -98
- data/vendor/gems/net-ssh/test/authentication/methods/test_password.rb +0 -50
- data/vendor/gems/net-ssh/test/authentication/methods/test_publickey.rb +0 -127
- data/vendor/gems/net-ssh/test/authentication/test_agent.rb +0 -205
- data/vendor/gems/net-ssh/test/authentication/test_key_manager.rb +0 -105
- data/vendor/gems/net-ssh/test/authentication/test_session.rb +0 -93
- data/vendor/gems/net-ssh/test/common.rb +0 -106
- data/vendor/gems/net-ssh/test/configs/eqsign +0 -3
- data/vendor/gems/net-ssh/test/configs/exact_match +0 -8
- data/vendor/gems/net-ssh/test/configs/wild_cards +0 -14
- data/vendor/gems/net-ssh/test/connection/test_channel.rb +0 -452
- data/vendor/gems/net-ssh/test/connection/test_session.rb +0 -488
- data/vendor/gems/net-ssh/test/test_all.rb +0 -6
- data/vendor/gems/net-ssh/test/test_buffer.rb +0 -336
- data/vendor/gems/net-ssh/test/test_buffered_io.rb +0 -63
- data/vendor/gems/net-ssh/test/test_config.rb +0 -84
- data/vendor/gems/net-ssh/test/test_key_factory.rb +0 -67
- data/vendor/gems/net-ssh/test/transport/hmac/test_md5.rb +0 -39
- data/vendor/gems/net-ssh/test/transport/hmac/test_md5_96.rb +0 -25
- data/vendor/gems/net-ssh/test/transport/hmac/test_none.rb +0 -34
- data/vendor/gems/net-ssh/test/transport/hmac/test_sha1.rb +0 -34
- data/vendor/gems/net-ssh/test/transport/hmac/test_sha1_96.rb +0 -25
- data/vendor/gems/net-ssh/test/transport/kex/test_diffie_hellman_group1_sha1.rb +0 -146
- data/vendor/gems/net-ssh/test/transport/kex/test_diffie_hellman_group_exchange_sha1.rb +0 -92
- data/vendor/gems/net-ssh/test/transport/test_algorithms.rb +0 -302
- data/vendor/gems/net-ssh/test/transport/test_cipher_factory.rb +0 -171
- data/vendor/gems/net-ssh/test/transport/test_hmac.rb +0 -34
- data/vendor/gems/net-ssh/test/transport/test_identity_cipher.rb +0 -40
- data/vendor/gems/net-ssh/test/transport/test_packet_stream.rb +0 -435
- data/vendor/gems/net-ssh/test/transport/test_server_version.rb +0 -57
- data/vendor/gems/net-ssh/test/transport/test_session.rb +0 -315
- data/vendor/gems/net-ssh/test/transport/test_state.rb +0 -173
- data/vendor/gems/parenting/History.txt +0 -4
- data/vendor/gems/parenting/Manifest.txt +0 -14
- data/vendor/gems/parenting/PostInstall.txt +0 -2
- data/vendor/gems/parenting/README.rdoc +0 -47
- data/vendor/gems/parenting/Rakefile +0 -44
- data/vendor/gems/parenting/lib/parenting/parenting.rb +0 -77
- data/vendor/gems/parenting/lib/parenting.rb +0 -10
- data/vendor/gems/parenting/parenting.gemspec +0 -39
- data/vendor/gems/parenting/script/console +0 -10
- data/vendor/gems/parenting/script/destroy +0 -14
- data/vendor/gems/parenting/script/generate +0 -14
- data/vendor/gems/parenting/test/file_to_eval.rb +0 -9
- data/vendor/gems/parenting/test/test_helper.rb +0 -5
- data/vendor/gems/parenting/test/test_parenting.rb +0 -117
- data/vendor/gems/right_aws/History.txt +0 -246
- data/vendor/gems/right_aws/Manifest.txt +0 -34
- data/vendor/gems/right_aws/README.txt +0 -166
- data/vendor/gems/right_aws/Rakefile +0 -112
- data/vendor/gems/right_aws/lib/acf/right_acf_interface.rb +0 -379
- data/vendor/gems/right_aws/lib/awsbase/benchmark_fix.rb +0 -39
- data/vendor/gems/right_aws/lib/awsbase/right_awsbase.rb +0 -797
- data/vendor/gems/right_aws/lib/awsbase/support.rb +0 -111
- data/vendor/gems/right_aws/lib/ec2/right_ec2.rb +0 -1737
- data/vendor/gems/right_aws/lib/right_aws.rb +0 -69
- data/vendor/gems/right_aws/lib/s3/right_s3.rb +0 -1094
- data/vendor/gems/right_aws/lib/s3/right_s3_interface.rb +0 -1175
- data/vendor/gems/right_aws/lib/sdb/active_sdb.rb +0 -930
- data/vendor/gems/right_aws/lib/sdb/right_sdb_interface.rb +0 -698
- data/vendor/gems/right_aws/lib/sqs/right_sqs.rb +0 -388
- data/vendor/gems/right_aws/lib/sqs/right_sqs_gen2.rb +0 -286
- data/vendor/gems/right_aws/lib/sqs/right_sqs_gen2_interface.rb +0 -444
- data/vendor/gems/right_aws/lib/sqs/right_sqs_interface.rb +0 -596
- data/vendor/gems/right_aws/test/acf/test_helper.rb +0 -2
- data/vendor/gems/right_aws/test/acf/test_right_acf.rb +0 -146
- data/vendor/gems/right_aws/test/ec2/test_helper.rb +0 -2
- data/vendor/gems/right_aws/test/ec2/test_right_ec2.rb +0 -108
- data/vendor/gems/right_aws/test/http_connection.rb +0 -87
- data/vendor/gems/right_aws/test/s3/test_helper.rb +0 -2
- data/vendor/gems/right_aws/test/s3/test_right_s3.rb +0 -419
- data/vendor/gems/right_aws/test/s3/test_right_s3_stubbed.rb +0 -95
- data/vendor/gems/right_aws/test/sdb/test_active_sdb.rb +0 -299
- data/vendor/gems/right_aws/test/sdb/test_helper.rb +0 -3
- data/vendor/gems/right_aws/test/sdb/test_right_sdb.rb +0 -247
- data/vendor/gems/right_aws/test/sqs/test_helper.rb +0 -2
- data/vendor/gems/right_aws/test/sqs/test_right_sqs.rb +0 -291
- data/vendor/gems/right_aws/test/sqs/test_right_sqs_gen2.rb +0 -209
- data/vendor/gems/right_aws/test/test_credentials.rb +0 -37
- data/vendor/gems/right_aws/test/ts_right_aws.rb +0 -14
- data/vendor/gems/right_http_connection/History.txt +0 -59
- data/vendor/gems/right_http_connection/Manifest.txt +0 -7
- data/vendor/gems/right_http_connection/README.txt +0 -54
- data/vendor/gems/right_http_connection/Rakefile +0 -103
- data/vendor/gems/right_http_connection/lib/net_fix.rb +0 -160
- data/vendor/gems/right_http_connection/lib/right_http_connection.rb +0 -442
- data/vendor/gems/right_http_connection/right_http_connection.gemspec +0 -31
- data/vendor/gems/right_http_connection/setup.rb +0 -1585
- data/vendor/gems/shoulda/CONTRIBUTION_GUIDELINES.rdoc +0 -10
- data/vendor/gems/shoulda/MIT-LICENSE +0 -22
- data/vendor/gems/shoulda/README.rdoc +0 -171
- data/vendor/gems/shoulda/Rakefile +0 -72
- data/vendor/gems/shoulda/bin/convert_to_should_syntax +0 -42
- data/vendor/gems/shoulda/init.rb +0 -1
- data/vendor/gems/shoulda/lib/shoulda/action_controller/macros.rb +0 -240
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/assign_to_matcher.rb +0 -109
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/filter_param_matcher.rb +0 -57
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/render_with_layout_matcher.rb +0 -81
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/respond_with_content_type_matcher.rb +0 -74
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/respond_with_matcher.rb +0 -81
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/route_matcher.rb +0 -93
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/set_session_matcher.rb +0 -87
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb +0 -85
- data/vendor/gems/shoulda/lib/shoulda/action_controller/matchers.rb +0 -37
- data/vendor/gems/shoulda/lib/shoulda/action_controller.rb +0 -26
- data/vendor/gems/shoulda/lib/shoulda/action_mailer/assertions.rb +0 -38
- data/vendor/gems/shoulda/lib/shoulda/action_mailer.rb +0 -10
- data/vendor/gems/shoulda/lib/shoulda/action_view/macros.rb +0 -61
- data/vendor/gems/shoulda/lib/shoulda/action_view.rb +0 -10
- data/vendor/gems/shoulda/lib/shoulda/active_record/assertions.rb +0 -69
- data/vendor/gems/shoulda/lib/shoulda/active_record/helpers.rb +0 -27
- data/vendor/gems/shoulda/lib/shoulda/active_record/macros.rb +0 -512
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/allow_mass_assignment_of_matcher.rb +0 -83
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/allow_value_matcher.rb +0 -102
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/association_matcher.rb +0 -226
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/ensure_inclusion_of_matcher.rb +0 -87
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/ensure_length_of_matcher.rb +0 -141
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/have_db_column_matcher.rb +0 -169
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/have_db_index_matcher.rb +0 -112
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/have_named_scope_matcher.rb +0 -128
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/have_readonly_attribute_matcher.rb +0 -59
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/validate_acceptance_of_matcher.rb +0 -41
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/validate_format_of_matcher.rb +0 -67
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/validate_numericality_of_matcher.rb +0 -39
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/validate_presence_of_matcher.rb +0 -60
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/validate_uniqueness_of_matcher.rb +0 -148
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers/validation_matcher.rb +0 -57
- data/vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb +0 -43
- data/vendor/gems/shoulda/lib/shoulda/active_record.rb +0 -16
- data/vendor/gems/shoulda/lib/shoulda/assertions.rb +0 -71
- data/vendor/gems/shoulda/lib/shoulda/autoload_macros.rb +0 -46
- data/vendor/gems/shoulda/lib/shoulda/context.rb +0 -402
- data/vendor/gems/shoulda/lib/shoulda/helpers.rb +0 -8
- data/vendor/gems/shoulda/lib/shoulda/macros.rb +0 -133
- data/vendor/gems/shoulda/lib/shoulda/private_helpers.rb +0 -13
- data/vendor/gems/shoulda/lib/shoulda/proc_extensions.rb +0 -14
- data/vendor/gems/shoulda/lib/shoulda/rails.rb +0 -13
- data/vendor/gems/shoulda/lib/shoulda/rspec.rb +0 -11
- data/vendor/gems/shoulda/lib/shoulda/tasks/list_tests.rake +0 -29
- data/vendor/gems/shoulda/lib/shoulda/tasks/yaml_to_shoulda.rake +0 -28
- data/vendor/gems/shoulda/lib/shoulda/tasks.rb +0 -3
- data/vendor/gems/shoulda/lib/shoulda/test_unit.rb +0 -22
- data/vendor/gems/shoulda/lib/shoulda.rb +0 -9
- data/vendor/gems/shoulda/rails/init.rb +0 -7
- data/vendor/gems/shoulda/shoulda.gemspec +0 -31
- data/vendor/gems/shoulda/tasks/shoulda.rake +0 -1
- data/vendor/gems/shoulda/test/README +0 -36
- data/vendor/gems/shoulda/test/fail_macros.rb +0 -39
- data/vendor/gems/shoulda/test/fixtures/addresses.yml +0 -3
- data/vendor/gems/shoulda/test/fixtures/friendships.yml +0 -0
- data/vendor/gems/shoulda/test/fixtures/posts.yml +0 -5
- data/vendor/gems/shoulda/test/fixtures/products.yml +0 -0
- data/vendor/gems/shoulda/test/fixtures/taggings.yml +0 -0
- data/vendor/gems/shoulda/test/fixtures/tags.yml +0 -9
- data/vendor/gems/shoulda/test/fixtures/users.yml +0 -6
- data/vendor/gems/shoulda/test/functional/posts_controller_test.rb +0 -121
- data/vendor/gems/shoulda/test/functional/users_controller_test.rb +0 -19
- data/vendor/gems/shoulda/test/matchers/active_record/allow_mass_assignment_of_matcher_test.rb +0 -68
- data/vendor/gems/shoulda/test/matchers/active_record/allow_value_matcher_test.rb +0 -64
- data/vendor/gems/shoulda/test/matchers/active_record/association_matcher_test.rb +0 -263
- data/vendor/gems/shoulda/test/matchers/active_record/ensure_inclusion_of_matcher_test.rb +0 -80
- data/vendor/gems/shoulda/test/matchers/active_record/ensure_length_of_matcher_test.rb +0 -158
- data/vendor/gems/shoulda/test/matchers/active_record/have_db_column_matcher_test.rb +0 -169
- data/vendor/gems/shoulda/test/matchers/active_record/have_db_index_matcher_test.rb +0 -91
- data/vendor/gems/shoulda/test/matchers/active_record/have_named_scope_matcher_test.rb +0 -65
- data/vendor/gems/shoulda/test/matchers/active_record/have_readonly_attributes_matcher_test.rb +0 -29
- data/vendor/gems/shoulda/test/matchers/active_record/validate_acceptance_of_matcher_test.rb +0 -44
- data/vendor/gems/shoulda/test/matchers/active_record/validate_format_of_matcher_test.rb +0 -39
- data/vendor/gems/shoulda/test/matchers/active_record/validate_numericality_of_matcher_test.rb +0 -52
- data/vendor/gems/shoulda/test/matchers/active_record/validate_presence_of_matcher_test.rb +0 -86
- data/vendor/gems/shoulda/test/matchers/active_record/validate_uniqueness_of_matcher_test.rb +0 -147
- data/vendor/gems/shoulda/test/matchers/controller/assign_to_matcher_test.rb +0 -35
- data/vendor/gems/shoulda/test/matchers/controller/filter_param_matcher_test.rb +0 -32
- data/vendor/gems/shoulda/test/matchers/controller/render_with_layout_matcher_test.rb +0 -33
- data/vendor/gems/shoulda/test/matchers/controller/respond_with_content_type_matcher_test.rb +0 -32
- data/vendor/gems/shoulda/test/matchers/controller/respond_with_matcher_test.rb +0 -106
- data/vendor/gems/shoulda/test/matchers/controller/route_matcher_test.rb +0 -58
- data/vendor/gems/shoulda/test/matchers/controller/set_session_matcher_test.rb +0 -38
- data/vendor/gems/shoulda/test/matchers/controller/set_the_flash_matcher.rb +0 -41
- data/vendor/gems/shoulda/test/model_builder.rb +0 -106
- data/vendor/gems/shoulda/test/other/autoload_macro_test.rb +0 -18
- data/vendor/gems/shoulda/test/other/context_test.rb +0 -189
- data/vendor/gems/shoulda/test/other/convert_to_should_syntax_test.rb +0 -63
- data/vendor/gems/shoulda/test/other/helpers_test.rb +0 -340
- data/vendor/gems/shoulda/test/other/private_helpers_test.rb +0 -32
- data/vendor/gems/shoulda/test/other/should_test.rb +0 -271
- data/vendor/gems/shoulda/test/rails_root/app/controllers/application_controller.rb +0 -25
- data/vendor/gems/shoulda/test/rails_root/app/controllers/posts_controller.rb +0 -87
- data/vendor/gems/shoulda/test/rails_root/app/controllers/users_controller.rb +0 -84
- data/vendor/gems/shoulda/test/rails_root/app/helpers/application_helper.rb +0 -3
- data/vendor/gems/shoulda/test/rails_root/app/helpers/posts_helper.rb +0 -2
- data/vendor/gems/shoulda/test/rails_root/app/helpers/users_helper.rb +0 -2
- data/vendor/gems/shoulda/test/rails_root/app/models/address.rb +0 -7
- data/vendor/gems/shoulda/test/rails_root/app/models/flea.rb +0 -3
- data/vendor/gems/shoulda/test/rails_root/app/models/friendship.rb +0 -4
- data/vendor/gems/shoulda/test/rails_root/app/models/pets/cat.rb +0 -7
- data/vendor/gems/shoulda/test/rails_root/app/models/pets/dog.rb +0 -10
- data/vendor/gems/shoulda/test/rails_root/app/models/post.rb +0 -12
- data/vendor/gems/shoulda/test/rails_root/app/models/product.rb +0 -12
- data/vendor/gems/shoulda/test/rails_root/app/models/profile.rb +0 -2
- data/vendor/gems/shoulda/test/rails_root/app/models/registration.rb +0 -2
- data/vendor/gems/shoulda/test/rails_root/app/models/tag.rb +0 -8
- data/vendor/gems/shoulda/test/rails_root/app/models/tagging.rb +0 -4
- data/vendor/gems/shoulda/test/rails_root/app/models/treat.rb +0 -3
- data/vendor/gems/shoulda/test/rails_root/app/models/user.rb +0 -32
- data/vendor/gems/shoulda/test/rails_root/app/views/layouts/posts.rhtml +0 -19
- data/vendor/gems/shoulda/test/rails_root/app/views/layouts/users.rhtml +0 -17
- data/vendor/gems/shoulda/test/rails_root/app/views/layouts/wide.html.erb +0 -1
- data/vendor/gems/shoulda/test/rails_root/app/views/posts/edit.rhtml +0 -27
- data/vendor/gems/shoulda/test/rails_root/app/views/posts/index.rhtml +0 -25
- data/vendor/gems/shoulda/test/rails_root/app/views/posts/new.rhtml +0 -26
- data/vendor/gems/shoulda/test/rails_root/app/views/posts/show.rhtml +0 -18
- data/vendor/gems/shoulda/test/rails_root/app/views/users/edit.rhtml +0 -22
- data/vendor/gems/shoulda/test/rails_root/app/views/users/index.rhtml +0 -22
- data/vendor/gems/shoulda/test/rails_root/app/views/users/new.rhtml +0 -21
- data/vendor/gems/shoulda/test/rails_root/app/views/users/show.rhtml +0 -13
- data/vendor/gems/shoulda/test/rails_root/config/boot.rb +0 -110
- data/vendor/gems/shoulda/test/rails_root/config/database.yml +0 -4
- data/vendor/gems/shoulda/test/rails_root/config/environment.rb +0 -18
- data/vendor/gems/shoulda/test/rails_root/config/environments/test.rb +0 -0
- data/vendor/gems/shoulda/test/rails_root/config/initializers/new_rails_defaults.rb +0 -15
- data/vendor/gems/shoulda/test/rails_root/config/initializers/shoulda.rb +0 -8
- data/vendor/gems/shoulda/test/rails_root/config/routes.rb +0 -6
- data/vendor/gems/shoulda/test/rails_root/db/migrate/001_create_users.rb +0 -19
- data/vendor/gems/shoulda/test/rails_root/db/migrate/002_create_posts.rb +0 -13
- data/vendor/gems/shoulda/test/rails_root/db/migrate/003_create_taggings.rb +0 -12
- data/vendor/gems/shoulda/test/rails_root/db/migrate/004_create_tags.rb +0 -11
- data/vendor/gems/shoulda/test/rails_root/db/migrate/005_create_dogs.rb +0 -12
- data/vendor/gems/shoulda/test/rails_root/db/migrate/006_create_addresses.rb +0 -14
- data/vendor/gems/shoulda/test/rails_root/db/migrate/007_create_fleas.rb +0 -11
- data/vendor/gems/shoulda/test/rails_root/db/migrate/008_create_dogs_fleas.rb +0 -12
- data/vendor/gems/shoulda/test/rails_root/db/migrate/009_create_products.rb +0 -17
- data/vendor/gems/shoulda/test/rails_root/db/migrate/010_create_friendships.rb +0 -14
- data/vendor/gems/shoulda/test/rails_root/db/migrate/011_create_treats.rb +0 -12
- data/vendor/gems/shoulda/test/rails_root/db/migrate/20090506203502_create_profiles.rb +0 -12
- data/vendor/gems/shoulda/test/rails_root/db/migrate/20090506203536_create_registrations.rb +0 -14
- data/vendor/gems/shoulda/test/rails_root/db/migrate/20090513104502_create_cats.rb +0 -12
- data/vendor/gems/shoulda/test/rails_root/db/schema.rb +0 -0
- data/vendor/gems/shoulda/test/rails_root/public/404.html +0 -30
- data/vendor/gems/shoulda/test/rails_root/public/422.html +0 -30
- data/vendor/gems/shoulda/test/rails_root/public/500.html +0 -30
- data/vendor/gems/shoulda/test/rails_root/script/console +0 -3
- data/vendor/gems/shoulda/test/rails_root/script/generate +0 -3
- data/vendor/gems/shoulda/test/rails_root/test/shoulda_macros/custom_macro.rb +0 -6
- data/vendor/gems/shoulda/test/rails_root/vendor/gems/gem_with_macro-0.0.1/shoulda_macros/gem_macro.rb +0 -6
- data/vendor/gems/shoulda/test/rails_root/vendor/plugins/plugin_with_macro/shoulda_macros/plugin_macro.rb +0 -6
- data/vendor/gems/shoulda/test/rspec_test.rb +0 -207
- data/vendor/gems/shoulda/test/test_helper.rb +0 -28
- data/vendor/gems/shoulda/test/unit/address_test.rb +0 -10
- data/vendor/gems/shoulda/test/unit/cat_test.rb +0 -7
- data/vendor/gems/shoulda/test/unit/dog_test.rb +0 -9
- data/vendor/gems/shoulda/test/unit/flea_test.rb +0 -6
- data/vendor/gems/shoulda/test/unit/friendship_test.rb +0 -6
- data/vendor/gems/shoulda/test/unit/post_test.rb +0 -19
- data/vendor/gems/shoulda/test/unit/product_test.rb +0 -23
- data/vendor/gems/shoulda/test/unit/tag_test.rb +0 -15
- data/vendor/gems/shoulda/test/unit/tagging_test.rb +0 -6
- data/vendor/gems/shoulda/test/unit/user_test.rb +0 -80
- data/vendor/gems/thrift/CHANGELOG +0 -1
- data/vendor/gems/thrift/Makefile.am +0 -47
- data/vendor/gems/thrift/Manifest +0 -81
- data/vendor/gems/thrift/README +0 -43
- data/vendor/gems/thrift/Rakefile +0 -104
- data/vendor/gems/thrift/benchmark/Benchmark.thrift +0 -24
- data/vendor/gems/thrift/benchmark/benchmark.rb +0 -271
- data/vendor/gems/thrift/benchmark/client.rb +0 -74
- data/vendor/gems/thrift/benchmark/server.rb +0 -82
- data/vendor/gems/thrift/benchmark/thin_server.rb +0 -44
- data/vendor/gems/thrift/ext/binary_protocol_accelerated.c +0 -474
- data/vendor/gems/thrift/ext/binary_protocol_accelerated.h +0 -20
- data/vendor/gems/thrift/ext/compact_protocol.c +0 -665
- data/vendor/gems/thrift/ext/compact_protocol.h +0 -20
- data/vendor/gems/thrift/ext/constants.h +0 -95
- data/vendor/gems/thrift/ext/extconf.rb +0 -26
- data/vendor/gems/thrift/ext/macros.h +0 -41
- data/vendor/gems/thrift/ext/memory_buffer.c +0 -76
- data/vendor/gems/thrift/ext/memory_buffer.h +0 -20
- data/vendor/gems/thrift/ext/protocol.c +0 -185
- data/vendor/gems/thrift/ext/protocol.h +0 -20
- data/vendor/gems/thrift/ext/struct.c +0 -606
- data/vendor/gems/thrift/ext/struct.h +0 -67
- data/vendor/gems/thrift/ext/thrift_native.c +0 -194
- data/vendor/gems/thrift/lib/thrift/client.rb +0 -62
- data/vendor/gems/thrift/lib/thrift/core_ext/fixnum.rb +0 -29
- data/vendor/gems/thrift/lib/thrift/core_ext.rb +0 -23
- data/vendor/gems/thrift/lib/thrift/exceptions.rb +0 -82
- data/vendor/gems/thrift/lib/thrift/processor.rb +0 -57
- data/vendor/gems/thrift/lib/thrift/protocol/base_protocol.rb +0 -290
- data/vendor/gems/thrift/lib/thrift/protocol/binary_protocol.rb +0 -225
- data/vendor/gems/thrift/lib/thrift/protocol/binary_protocol_accelerated.rb +0 -35
- data/vendor/gems/thrift/lib/thrift/protocol/compact_protocol.rb +0 -422
- data/vendor/gems/thrift/lib/thrift/serializer/deserializer.rb +0 -33
- data/vendor/gems/thrift/lib/thrift/serializer/serializer.rb +0 -34
- data/vendor/gems/thrift/lib/thrift/server/base_server.rb +0 -31
- data/vendor/gems/thrift/lib/thrift/server/mongrel_http_server.rb +0 -58
- data/vendor/gems/thrift/lib/thrift/server/nonblocking_server.rb +0 -296
- data/vendor/gems/thrift/lib/thrift/server/simple_server.rb +0 -43
- data/vendor/gems/thrift/lib/thrift/server/thread_pool_server.rb +0 -75
- data/vendor/gems/thrift/lib/thrift/server/threaded_server.rb +0 -47
- data/vendor/gems/thrift/lib/thrift/struct.rb +0 -298
- data/vendor/gems/thrift/lib/thrift/thrift_native.rb +0 -24
- data/vendor/gems/thrift/lib/thrift/transport/base_server_transport.rb +0 -37
- data/vendor/gems/thrift/lib/thrift/transport/base_transport.rb +0 -70
- data/vendor/gems/thrift/lib/thrift/transport/buffered_transport.rb +0 -77
- data/vendor/gems/thrift/lib/thrift/transport/framed_transport.rb +0 -90
- data/vendor/gems/thrift/lib/thrift/transport/http_client_transport.rb +0 -45
- data/vendor/gems/thrift/lib/thrift/transport/io_stream_transport.rb +0 -39
- data/vendor/gems/thrift/lib/thrift/transport/memory_buffer_transport.rb +0 -96
- data/vendor/gems/thrift/lib/thrift/transport/server_socket.rb +0 -63
- data/vendor/gems/thrift/lib/thrift/transport/socket.rb +0 -136
- data/vendor/gems/thrift/lib/thrift/transport/unix_server_socket.rb +0 -60
- data/vendor/gems/thrift/lib/thrift/transport/unix_socket.rb +0 -40
- data/vendor/gems/thrift/lib/thrift/types.rb +0 -101
- data/vendor/gems/thrift/lib/thrift.rb +0 -59
- data/vendor/gems/thrift/script/proto_benchmark.rb +0 -121
- data/vendor/gems/thrift/script/read_struct.rb +0 -43
- data/vendor/gems/thrift/script/write_struct.rb +0 -30
- data/vendor/gems/thrift/setup.rb +0 -1585
- data/vendor/gems/thrift/spec/ThriftSpec.thrift +0 -84
- data/vendor/gems/thrift/spec/base_protocol_spec.rb +0 -160
- data/vendor/gems/thrift/spec/base_transport_spec.rb +0 -351
- data/vendor/gems/thrift/spec/binary_protocol_accelerated_spec.rb +0 -41
- data/vendor/gems/thrift/spec/binary_protocol_spec.rb +0 -63
- data/vendor/gems/thrift/spec/binary_protocol_spec_shared.rb +0 -375
- data/vendor/gems/thrift/spec/client_spec.rb +0 -100
- data/vendor/gems/thrift/spec/compact_protocol_spec.rb +0 -117
- data/vendor/gems/thrift/spec/exception_spec.rb +0 -142
- data/vendor/gems/thrift/spec/http_client_spec.rb +0 -49
- data/vendor/gems/thrift/spec/mongrel_http_server_spec.rb +0 -117
- data/vendor/gems/thrift/spec/nonblocking_server_spec.rb +0 -265
- data/vendor/gems/thrift/spec/processor_spec.rb +0 -83
- data/vendor/gems/thrift/spec/serializer_spec.rb +0 -69
- data/vendor/gems/thrift/spec/server_socket_spec.rb +0 -80
- data/vendor/gems/thrift/spec/server_spec.rb +0 -160
- data/vendor/gems/thrift/spec/socket_spec.rb +0 -61
- data/vendor/gems/thrift/spec/socket_spec_shared.rb +0 -104
- data/vendor/gems/thrift/spec/spec_helper.rb +0 -60
- data/vendor/gems/thrift/spec/struct_spec.rb +0 -252
- data/vendor/gems/thrift/spec/types_spec.rb +0 -116
- data/vendor/gems/thrift/spec/unix_socket_spec.rb +0 -108
- /data/{vendor/chef → examples/chef_cloud/chef-repo/cookbooks}/apache2/templates/default/a2dismod.erb +0 -0
- /data/{vendor/chef → examples/chef_cloud/chef-repo/cookbooks}/apache2/templates/default/a2dissite.erb +0 -0
- /data/{vendor/chef → examples/chef_cloud/chef-repo/cookbooks}/apache2/templates/default/a2ensite.erb +0 -0
- /data/{vendor/chef → examples/chef_cloud/chef-repo/cookbooks}/apache2/templates/default/port_apache.erb +0 -0
- /data/{vendor/chef → examples/chef_cloud/chef-repo/cookbooks}/apache2/templates/default/ports.conf.erb +0 -0
- /data/{vendor/chef → examples/chef_cloud/chef-repo/cookbooks}/apache2/templates/default/web_app.conf.erb +0 -0
- /data/{lib/proto/gen-py/__init__.py → examples/chef_cloud/chef-repo/cookbooks/chef/recipes/default.rb} +0 -0
- /data/{vendor/gems/context/PostInstall.txt → lib/cloud_providers/default/helpers/base_helper.rb} +0 -0
- /data/vendor/gems/{colors → searchable_paths}/LICENSE +0 -0
|
@@ -1,1737 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Copyright (c) 2007-2008 RightScale Inc
|
|
3
|
-
#
|
|
4
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
|
5
|
-
# a copy of this software and associated documentation files (the
|
|
6
|
-
# "Software"), to deal in the Software without restriction, including
|
|
7
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
|
8
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
|
9
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
|
10
|
-
# the following conditions:
|
|
11
|
-
#
|
|
12
|
-
# The above copyright notice and this permission notice shall be
|
|
13
|
-
# included in all copies or substantial portions of the Software.
|
|
14
|
-
#
|
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
16
|
-
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
17
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
18
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
19
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
20
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
21
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
22
|
-
#
|
|
23
|
-
|
|
24
|
-
module RightAws
|
|
25
|
-
|
|
26
|
-
# = RightAWS::EC2 -- RightScale Amazon EC2 interface
|
|
27
|
-
# The RightAws::EC2 class provides a complete interface to Amazon's
|
|
28
|
-
# Elastic Compute Cloud service, as well as the associated EBS (Elastic Block
|
|
29
|
-
# Store).
|
|
30
|
-
# For explanations of the semantics
|
|
31
|
-
# of each call, please refer to Amazon's documentation at
|
|
32
|
-
# http://developer.amazonwebservices.com/connect/kbcategory.jspa?categoryID=87
|
|
33
|
-
#
|
|
34
|
-
# Examples:
|
|
35
|
-
#
|
|
36
|
-
# Create an EC2 interface handle:
|
|
37
|
-
#
|
|
38
|
-
# @ec2 = RightAws::Ec2.new(aws_access_key_id,
|
|
39
|
-
# aws_secret_access_key)
|
|
40
|
-
# Create a new SSH key pair:
|
|
41
|
-
# @key = 'right_ec2_awesome_test_key'
|
|
42
|
-
# new_key = @ec2.create_key_pair(@key)
|
|
43
|
-
# keys = @ec2.describe_key_pairs
|
|
44
|
-
#
|
|
45
|
-
# Create a security group:
|
|
46
|
-
# @group = 'right_ec2_awesome_test_security_group'
|
|
47
|
-
# @ec2.create_security_group(@group,'My awesome test group')
|
|
48
|
-
# group = @ec2.describe_security_groups([@group])[0]
|
|
49
|
-
#
|
|
50
|
-
# Configure a security group:
|
|
51
|
-
# @ec2.authorize_security_group_named_ingress(@group, account_number, 'default')
|
|
52
|
-
# @ec2.authorize_security_group_IP_ingress(@group, 80,80,'udp','192.168.1.0/8')
|
|
53
|
-
#
|
|
54
|
-
# Describe the available images:
|
|
55
|
-
# images = @ec2.describe_images
|
|
56
|
-
#
|
|
57
|
-
# Launch an instance:
|
|
58
|
-
# ec2.run_instances('ami-9a9e7bf3', 1, 1, ['default'], @key, 'SomeImportantUserData', 'public')
|
|
59
|
-
#
|
|
60
|
-
#
|
|
61
|
-
# Describe running instances:
|
|
62
|
-
# @ec2.describe_instances
|
|
63
|
-
#
|
|
64
|
-
# Error handling: all operations raise an RightAws::AwsError in case
|
|
65
|
-
# of problems. Note that transient errors are automatically retried.
|
|
66
|
-
|
|
67
|
-
class Ec2 < RightAwsBase
|
|
68
|
-
include RightAwsBaseInterface
|
|
69
|
-
|
|
70
|
-
# Amazon EC2 API version being used
|
|
71
|
-
API_VERSION = "2008-12-01"
|
|
72
|
-
DEFAULT_HOST = "ec2.amazonaws.com"
|
|
73
|
-
DEFAULT_PATH = '/'
|
|
74
|
-
DEFAULT_PROTOCOL = 'https'
|
|
75
|
-
DEFAULT_PORT = 443
|
|
76
|
-
|
|
77
|
-
# Default addressing type (public=NAT, direct=no-NAT) used when launching instances.
|
|
78
|
-
DEFAULT_ADDRESSING_TYPE = 'public'
|
|
79
|
-
DNS_ADDRESSING_SET = ['public','direct']
|
|
80
|
-
|
|
81
|
-
# Amazon EC2 Instance Types : http://www.amazon.com/b?ie=UTF8&node=370375011
|
|
82
|
-
# Default EC2 instance type (platform)
|
|
83
|
-
DEFAULT_INSTANCE_TYPE = 'm1.small'
|
|
84
|
-
INSTANCE_TYPES = ['m1.small','c1.medium','m1.large','m1.xlarge','c1.xlarge']
|
|
85
|
-
|
|
86
|
-
@@bench = AwsBenchmarkingBlock.new
|
|
87
|
-
def self.bench_xml
|
|
88
|
-
@@bench.xml
|
|
89
|
-
end
|
|
90
|
-
def self.bench_ec2
|
|
91
|
-
@@bench.service
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
# Current API version (sometimes we have to check it outside the GEM).
|
|
95
|
-
@@api = ENV['EC2_API_VERSION'] || API_VERSION
|
|
96
|
-
def self.api
|
|
97
|
-
@@api
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
# Create a new handle to an EC2 account. All handles share the same per process or per thread
|
|
101
|
-
# HTTP connection to Amazon EC2. Each handle is for a specific account. The params have the
|
|
102
|
-
# following options:
|
|
103
|
-
# * <tt>:endpoint_url</tt> a fully qualified url to Amazon API endpoint (this overwrites: :server, :port, :service, :protocol and :region). Example: 'https://eu-west-1.ec2.amazonaws.com/'
|
|
104
|
-
# * <tt>:server</tt>: EC2 service host, default: DEFAULT_HOST
|
|
105
|
-
# * <tt>:region</tt>: EC2 region (North America by default)
|
|
106
|
-
# * <tt>:port</tt>: EC2 service port, default: DEFAULT_PORT
|
|
107
|
-
# * <tt>:protocol</tt>: 'http' or 'https', default: DEFAULT_PROTOCOL
|
|
108
|
-
# * <tt>:multi_thread</tt>: true=HTTP connection per thread, false=per process
|
|
109
|
-
# * <tt>:logger</tt>: for log messages, default: RAILS_DEFAULT_LOGGER else STDOUT
|
|
110
|
-
# * <tt>:signature_version</tt>: The signature version : '0' or '1'(default)
|
|
111
|
-
# * <tt>:cache</tt>: true/false: caching for: ec2_describe_images, describe_instances,
|
|
112
|
-
# describe_images_by_owner, describe_images_by_executable_by, describe_availability_zones,
|
|
113
|
-
# describe_security_groups, describe_key_pairs, describe_addresses,
|
|
114
|
-
# describe_volumes, describe_snapshots methods, default: false.
|
|
115
|
-
#
|
|
116
|
-
def initialize(aws_access_key_id=nil, aws_secret_access_key=nil, params={})
|
|
117
|
-
init({ :name => 'EC2',
|
|
118
|
-
:default_host => ENV['EC2_URL'] ? URI.parse(ENV['EC2_URL']).host : DEFAULT_HOST,
|
|
119
|
-
:default_port => ENV['EC2_URL'] ? URI.parse(ENV['EC2_URL']).port : DEFAULT_PORT,
|
|
120
|
-
:default_service => ENV['EC2_URL'] ? URI.parse(ENV['EC2_URL']).path : DEFAULT_PATH,
|
|
121
|
-
:default_protocol => ENV['EC2_URL'] ? URI.parse(ENV['EC2_URL']).scheme : DEFAULT_PROTOCOL },
|
|
122
|
-
aws_access_key_id || ENV['AWS_ACCESS_KEY_ID'] ,
|
|
123
|
-
aws_secret_access_key|| ENV['AWS_SECRET_ACCESS_KEY'],
|
|
124
|
-
params)
|
|
125
|
-
# EC2 doesn't really define any transient errors to retry, and in fact,
|
|
126
|
-
# when they return a 503 it is usually for 'request limit exceeded' which
|
|
127
|
-
# we most certainly should not retry. So let's pare down the list of
|
|
128
|
-
# retryable errors to InternalError only (see RightAwsBase for the default
|
|
129
|
-
# list)
|
|
130
|
-
amazon_problems = ['InternalError']
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
def generate_request(action, params={}) #:nodoc:
|
|
135
|
-
service_hash = {"Action" => action,
|
|
136
|
-
"AWSAccessKeyId" => @aws_access_key_id,
|
|
137
|
-
"Version" => @@api }
|
|
138
|
-
service_hash.update(params)
|
|
139
|
-
service_params = signed_service_params(@aws_secret_access_key, service_hash, :get, @params[:server], @params[:service])
|
|
140
|
-
|
|
141
|
-
# use POST method if the length of the query string is too large
|
|
142
|
-
if service_params.size > 2000
|
|
143
|
-
if signature_version == '2'
|
|
144
|
-
# resign the request because HTTP verb is included into signature
|
|
145
|
-
service_params = signed_service_params(@aws_secret_access_key, service_hash, :post, @params[:server], @params[:service])
|
|
146
|
-
end
|
|
147
|
-
request = Net::HTTP::Post.new(service)
|
|
148
|
-
request.body = service_params
|
|
149
|
-
request['Content-Type'] = 'application/x-www-form-urlencoded'
|
|
150
|
-
else
|
|
151
|
-
request = Net::HTTP::Get.new("#{@params[:service]}?#{service_params}")
|
|
152
|
-
end
|
|
153
|
-
# prepare output hash
|
|
154
|
-
{ :request => request,
|
|
155
|
-
:server => @params[:server],
|
|
156
|
-
:port => @params[:port],
|
|
157
|
-
:protocol => @params[:protocol] }
|
|
158
|
-
end
|
|
159
|
-
|
|
160
|
-
# Sends request to Amazon and parses the response
|
|
161
|
-
# Raises AwsError if any banana happened
|
|
162
|
-
def request_info(request, parser) #:nodoc:
|
|
163
|
-
thread = @params[:multi_thread] ? Thread.current : Thread.main
|
|
164
|
-
thread[:ec2_connection] ||= Rightscale::HttpConnection.new(:exception => AwsError, :logger => @logger)
|
|
165
|
-
request_info_impl(thread[:ec2_connection], @@bench, request, parser)
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
def hash_params(prefix, list) #:nodoc:
|
|
169
|
-
groups = {}
|
|
170
|
-
list.each_index{|i| groups.update("#{prefix}.#{i+1}"=>list[i])} if list
|
|
171
|
-
return groups
|
|
172
|
-
end
|
|
173
|
-
|
|
174
|
-
#-----------------------------------------------------------------
|
|
175
|
-
# Images
|
|
176
|
-
#-----------------------------------------------------------------
|
|
177
|
-
|
|
178
|
-
# params:
|
|
179
|
-
# { 'ImageId' => ['id1', ..., 'idN'],
|
|
180
|
-
# 'Owner' => ['self', ..., 'userN'],
|
|
181
|
-
# 'ExecutableBy' => ['self', 'all', ..., 'userN']
|
|
182
|
-
# }
|
|
183
|
-
def ec2_describe_images(params={}, image_type=nil, cache_for=nil) #:nodoc:
|
|
184
|
-
request_hash = {}
|
|
185
|
-
params.each do |list_by, list|
|
|
186
|
-
request_hash.merge! hash_params(list_by, list.to_a)
|
|
187
|
-
end
|
|
188
|
-
request_hash['ImageType'] = image_type if image_type
|
|
189
|
-
link = generate_request("DescribeImages", request_hash)
|
|
190
|
-
request_cache_or_info cache_for, link, QEc2DescribeImagesParser, @@bench, cache_for
|
|
191
|
-
rescue Exception
|
|
192
|
-
on_exception
|
|
193
|
-
end
|
|
194
|
-
|
|
195
|
-
# Retrieve a list of images. Returns array of hashes describing the images or an exception:
|
|
196
|
-
# +image_type+ = 'machine' || 'kernel' || 'ramdisk'
|
|
197
|
-
#
|
|
198
|
-
# ec2.describe_images #=>
|
|
199
|
-
# [{:aws_owner => "522821470517",
|
|
200
|
-
# :aws_id => "ami-e4b6538d",
|
|
201
|
-
# :aws_state => "available",
|
|
202
|
-
# :aws_location => "marcins_cool_public_images/ubuntu-6.10.manifest.xml",
|
|
203
|
-
# :aws_is_public => true,
|
|
204
|
-
# :aws_architecture => "i386",
|
|
205
|
-
# :aws_image_type => "machine"},
|
|
206
|
-
# {...},
|
|
207
|
-
# {...} ]
|
|
208
|
-
#
|
|
209
|
-
# If +list+ param is set, then retrieve information about the listed images only:
|
|
210
|
-
#
|
|
211
|
-
# ec2.describe_images(['ami-e4b6538d']) #=>
|
|
212
|
-
# [{:aws_owner => "522821470517",
|
|
213
|
-
# :aws_id => "ami-e4b6538d",
|
|
214
|
-
# :aws_state => "available",
|
|
215
|
-
# :aws_location => "marcins_cool_public_images/ubuntu-6.10.manifest.xml",
|
|
216
|
-
# :aws_is_public => true,
|
|
217
|
-
# :aws_architecture => "i386",
|
|
218
|
-
# :aws_image_type => "machine"}]
|
|
219
|
-
#
|
|
220
|
-
def describe_images(list=[], image_type=nil)
|
|
221
|
-
list = list.to_a
|
|
222
|
-
cache_for = list.empty? && !image_type ? :describe_images : nil
|
|
223
|
-
ec2_describe_images({ 'ImageId' => list }, image_type, cache_for)
|
|
224
|
-
end
|
|
225
|
-
|
|
226
|
-
#
|
|
227
|
-
# Example:
|
|
228
|
-
#
|
|
229
|
-
# ec2.describe_images_by_owner('522821470517')
|
|
230
|
-
# ec2.describe_images_by_owner('self')
|
|
231
|
-
#
|
|
232
|
-
def describe_images_by_owner(list=['self'], image_type=nil)
|
|
233
|
-
list = list.to_a
|
|
234
|
-
cache_for = list==['self'] && !image_type ? :describe_images_by_owner : nil
|
|
235
|
-
ec2_describe_images({ 'Owner' => list }, image_type, cache_for)
|
|
236
|
-
end
|
|
237
|
-
|
|
238
|
-
#
|
|
239
|
-
# Example:
|
|
240
|
-
#
|
|
241
|
-
# ec2.describe_images_by_executable_by('522821470517')
|
|
242
|
-
# ec2.describe_images_by_executable_by('self')
|
|
243
|
-
# ec2.describe_images_by_executable_by('all')
|
|
244
|
-
#
|
|
245
|
-
def describe_images_by_executable_by(list=['self'], image_type=nil)
|
|
246
|
-
list = list.to_a
|
|
247
|
-
cache_for = list==['self'] && !image_type ? :describe_images_by_executable_by : nil
|
|
248
|
-
ec2_describe_images({ 'ExecutableBy' => list }, image_type, cache_for)
|
|
249
|
-
end
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
# Register new image at Amazon.
|
|
253
|
-
# Returns new image id or an exception.
|
|
254
|
-
#
|
|
255
|
-
# ec2.register_image('bucket/key/manifest') #=> 'ami-e444444d'
|
|
256
|
-
#
|
|
257
|
-
def register_image(image_location)
|
|
258
|
-
link = generate_request("RegisterImage",
|
|
259
|
-
'ImageLocation' => image_location.to_s)
|
|
260
|
-
request_info(link, QEc2RegisterImageParser.new(:logger => @logger))
|
|
261
|
-
rescue Exception
|
|
262
|
-
on_exception
|
|
263
|
-
end
|
|
264
|
-
|
|
265
|
-
# Deregister image at Amazon. Returns +true+ or an exception.
|
|
266
|
-
#
|
|
267
|
-
# ec2.deregister_image('ami-e444444d') #=> true
|
|
268
|
-
#
|
|
269
|
-
def deregister_image(image_id)
|
|
270
|
-
link = generate_request("DeregisterImage",
|
|
271
|
-
'ImageId' => image_id.to_s)
|
|
272
|
-
request_info(link, RightBoolResponseParser.new(:logger => @logger))
|
|
273
|
-
rescue Exception
|
|
274
|
-
on_exception
|
|
275
|
-
end
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
# Describe image attributes. Currently 'launchPermission', 'productCodes', 'kernel', 'ramdisk' and 'blockDeviceMapping' are supported.
|
|
279
|
-
#
|
|
280
|
-
# ec2.describe_image_attribute('ami-e444444d') #=> {:groups=>["all"], :users=>["000000000777"]}
|
|
281
|
-
#
|
|
282
|
-
def describe_image_attribute(image_id, attribute='launchPermission')
|
|
283
|
-
link = generate_request("DescribeImageAttribute",
|
|
284
|
-
'ImageId' => image_id,
|
|
285
|
-
'Attribute' => attribute)
|
|
286
|
-
request_info(link, QEc2DescribeImageAttributeParser.new(:logger => @logger))
|
|
287
|
-
rescue Exception
|
|
288
|
-
on_exception
|
|
289
|
-
end
|
|
290
|
-
|
|
291
|
-
# Reset image attribute. Currently, only 'launchPermission' is supported. Returns +true+ or an exception.
|
|
292
|
-
#
|
|
293
|
-
# ec2.reset_image_attribute('ami-e444444d') #=> true
|
|
294
|
-
#
|
|
295
|
-
def reset_image_attribute(image_id, attribute='launchPermission')
|
|
296
|
-
link = generate_request("ResetImageAttribute",
|
|
297
|
-
'ImageId' => image_id,
|
|
298
|
-
'Attribute' => attribute)
|
|
299
|
-
request_info(link, RightBoolResponseParser.new(:logger => @logger))
|
|
300
|
-
rescue Exception
|
|
301
|
-
on_exception
|
|
302
|
-
end
|
|
303
|
-
|
|
304
|
-
# Modify an image's attributes. It is recommended that you use
|
|
305
|
-
# modify_image_launch_perm_add_users, modify_image_launch_perm_remove_users, etc.
|
|
306
|
-
# instead of modify_image_attribute because the signature of
|
|
307
|
-
# modify_image_attribute may change with EC2 service changes.
|
|
308
|
-
#
|
|
309
|
-
# attribute : currently, only 'launchPermission' is supported.
|
|
310
|
-
# operation_type : currently, only 'add' & 'remove' are supported.
|
|
311
|
-
# vars:
|
|
312
|
-
# :user_group : currently, only 'all' is supported.
|
|
313
|
-
# :user_id
|
|
314
|
-
# :product_code
|
|
315
|
-
def modify_image_attribute(image_id, attribute, operation_type = nil, vars = {})
|
|
316
|
-
params = {'ImageId' => image_id,
|
|
317
|
-
'Attribute' => attribute}
|
|
318
|
-
params['OperationType'] = operation_type if operation_type
|
|
319
|
-
params.update(hash_params('UserId', vars[:user_id].to_a)) if vars[:user_id]
|
|
320
|
-
params.update(hash_params('UserGroup', vars[:user_group].to_a)) if vars[:user_group]
|
|
321
|
-
params.update(hash_params('ProductCode', vars[:product_code])) if vars[:product_code]
|
|
322
|
-
link = generate_request("ModifyImageAttribute", params)
|
|
323
|
-
request_info(link, RightBoolResponseParser.new(:logger => @logger))
|
|
324
|
-
rescue Exception
|
|
325
|
-
on_exception
|
|
326
|
-
end
|
|
327
|
-
|
|
328
|
-
# Grant image launch permissions to users.
|
|
329
|
-
# Parameter +userId+ is a list of user AWS account ids.
|
|
330
|
-
# Returns +true+ or an exception.
|
|
331
|
-
#
|
|
332
|
-
# ec2.modify_image_launch_perm_add_users('ami-e444444d',['000000000777','000000000778']) #=> true
|
|
333
|
-
def modify_image_launch_perm_add_users(image_id, user_id=[])
|
|
334
|
-
modify_image_attribute(image_id, 'launchPermission', 'add', :user_id => user_id.to_a)
|
|
335
|
-
end
|
|
336
|
-
|
|
337
|
-
# Revokes image launch permissions for users. +userId+ is a list of users AWS accounts ids. Returns +true+ or an exception.
|
|
338
|
-
#
|
|
339
|
-
# ec2.modify_image_launch_perm_remove_users('ami-e444444d',['000000000777','000000000778']) #=> true
|
|
340
|
-
#
|
|
341
|
-
def modify_image_launch_perm_remove_users(image_id, user_id=[])
|
|
342
|
-
modify_image_attribute(image_id, 'launchPermission', 'remove', :user_id => user_id.to_a)
|
|
343
|
-
end
|
|
344
|
-
|
|
345
|
-
# Add image launch permissions for users groups (currently only 'all' is supported, which gives public launch permissions).
|
|
346
|
-
# Returns +true+ or an exception.
|
|
347
|
-
#
|
|
348
|
-
# ec2.modify_image_launch_perm_add_groups('ami-e444444d') #=> true
|
|
349
|
-
#
|
|
350
|
-
def modify_image_launch_perm_add_groups(image_id, user_group=['all'])
|
|
351
|
-
modify_image_attribute(image_id, 'launchPermission', 'add', :user_group => user_group.to_a)
|
|
352
|
-
end
|
|
353
|
-
|
|
354
|
-
# Remove image launch permissions for users groups (currently only 'all' is supported, which gives public launch permissions).
|
|
355
|
-
#
|
|
356
|
-
# ec2.modify_image_launch_perm_remove_groups('ami-e444444d') #=> true
|
|
357
|
-
#
|
|
358
|
-
def modify_image_launch_perm_remove_groups(image_id, user_group=['all'])
|
|
359
|
-
modify_image_attribute(image_id, 'launchPermission', 'remove', :user_group => user_group.to_a)
|
|
360
|
-
end
|
|
361
|
-
|
|
362
|
-
# Add product code to image
|
|
363
|
-
#
|
|
364
|
-
# ec2.modify_image_product_code('ami-e444444d','0ABCDEF') #=> true
|
|
365
|
-
#
|
|
366
|
-
def modify_image_product_code(image_id, product_code=[])
|
|
367
|
-
modify_image_attribute(image_id, 'productCodes', nil, :product_code => product_code.to_a)
|
|
368
|
-
end
|
|
369
|
-
|
|
370
|
-
#-----------------------------------------------------------------
|
|
371
|
-
# Instances
|
|
372
|
-
#-----------------------------------------------------------------
|
|
373
|
-
|
|
374
|
-
def get_desc_instances(instances) # :nodoc:
|
|
375
|
-
result = []
|
|
376
|
-
instances.each do |reservation|
|
|
377
|
-
reservation[:instances_set].each do |instance|
|
|
378
|
-
# Parse and remove timestamp from the reason string. The timestamp is of
|
|
379
|
-
# the request, not when EC2 took action, thus confusing & useless...
|
|
380
|
-
instance[:aws_reason] = instance[:aws_reason].sub(/\(\d[^)]*GMT\) */, '')
|
|
381
|
-
instance[:aws_owner] = reservation[:aws_owner]
|
|
382
|
-
instance[:aws_reservation_id] = reservation[:aws_reservation_id]
|
|
383
|
-
instance[:aws_groups] = reservation[:aws_groups]
|
|
384
|
-
result << instance
|
|
385
|
-
end
|
|
386
|
-
end
|
|
387
|
-
result
|
|
388
|
-
rescue Exception
|
|
389
|
-
on_exception
|
|
390
|
-
end
|
|
391
|
-
|
|
392
|
-
# Retrieve information about EC2 instances. If +list+ is omitted then returns the
|
|
393
|
-
# list of all instances.
|
|
394
|
-
#
|
|
395
|
-
# ec2.describe_instances #=>
|
|
396
|
-
# [{:aws_image_id => "ami-e444444d",
|
|
397
|
-
# :aws_reason => "",
|
|
398
|
-
# :aws_state_code => "16",
|
|
399
|
-
# :aws_owner => "000000000888",
|
|
400
|
-
# :aws_instance_id => "i-123f1234",
|
|
401
|
-
# :aws_reservation_id => "r-aabbccdd",
|
|
402
|
-
# :aws_state => "running",
|
|
403
|
-
# :dns_name => "domU-12-34-67-89-01-C9.usma2.compute.amazonaws.com",
|
|
404
|
-
# :ssh_key_name => "staging",
|
|
405
|
-
# :aws_groups => ["default"],
|
|
406
|
-
# :private_dns_name => "domU-12-34-67-89-01-C9.usma2.compute.amazonaws.com",
|
|
407
|
-
# :aws_instance_type => "m1.small",
|
|
408
|
-
# :aws_launch_time => "2008-1-1T00:00:00.000Z"},
|
|
409
|
-
# :aws_availability_zone => "us-east-1b",
|
|
410
|
-
# :aws_kernel_id => "aki-ba3adfd3",
|
|
411
|
-
# :aws_ramdisk_id => "ari-badbad00",
|
|
412
|
-
# ..., {...}]
|
|
413
|
-
#
|
|
414
|
-
def describe_instances(list=[])
|
|
415
|
-
link = generate_request("DescribeInstances", hash_params('InstanceId',list.to_a))
|
|
416
|
-
request_cache_or_info(:describe_instances, link, QEc2DescribeInstancesParser, @@bench, list.blank?) do |parser|
|
|
417
|
-
get_desc_instances(parser.result)
|
|
418
|
-
end
|
|
419
|
-
rescue Exception
|
|
420
|
-
on_exception
|
|
421
|
-
end
|
|
422
|
-
|
|
423
|
-
# Return the product code attached to instance or +nil+ otherwise.
|
|
424
|
-
#
|
|
425
|
-
# ec2.confirm_product_instance('ami-e444444d','12345678') #=> nil
|
|
426
|
-
# ec2.confirm_product_instance('ami-e444444d','00001111') #=> "000000000888"
|
|
427
|
-
#
|
|
428
|
-
def confirm_product_instance(instance, product_code)
|
|
429
|
-
link = generate_request("ConfirmProductInstance", { 'ProductCode' => product_code,
|
|
430
|
-
'InstanceId' => instance })
|
|
431
|
-
request_info(link, QEc2ConfirmProductInstanceParser.new(:logger => @logger))
|
|
432
|
-
end
|
|
433
|
-
|
|
434
|
-
# Launch new EC2 instances. Returns a list of launched instances or an exception.
|
|
435
|
-
#
|
|
436
|
-
# ec2.run_instances('ami-e444444d',1,1,['my_awesome_group'],'my_awesome_key', 'Woohoo!!!', 'public') #=>
|
|
437
|
-
# [{:aws_image_id => "ami-e444444d",
|
|
438
|
-
# :aws_reason => "",
|
|
439
|
-
# :aws_state_code => "0",
|
|
440
|
-
# :aws_owner => "000000000888",
|
|
441
|
-
# :aws_instance_id => "i-123f1234",
|
|
442
|
-
# :aws_reservation_id => "r-aabbccdd",
|
|
443
|
-
# :aws_state => "pending",
|
|
444
|
-
# :dns_name => "",
|
|
445
|
-
# :ssh_key_name => "my_awesome_key",
|
|
446
|
-
# :aws_groups => ["my_awesome_group"],
|
|
447
|
-
# :private_dns_name => "",
|
|
448
|
-
# :aws_instance_type => "m1.small",
|
|
449
|
-
# :aws_launch_time => "2008-1-1T00:00:00.000Z"
|
|
450
|
-
# :aws_ramdisk_id => "ari-8605e0ef"
|
|
451
|
-
# :aws_kernel_id => "aki-9905e0f0",
|
|
452
|
-
# :ami_launch_index => "0",
|
|
453
|
-
# :aws_availability_zone => "us-east-1b"
|
|
454
|
-
# }]
|
|
455
|
-
#
|
|
456
|
-
def run_instances(image_id, min_count, max_count, group_ids, key_name, user_data='',
|
|
457
|
-
addressing_type = nil, instance_type = nil,
|
|
458
|
-
kernel_id = nil, ramdisk_id = nil, availability_zone = nil,
|
|
459
|
-
block_device_mappings = nil)
|
|
460
|
-
launch_instances(image_id, { :min_count => min_count,
|
|
461
|
-
:max_count => max_count,
|
|
462
|
-
:user_data => user_data,
|
|
463
|
-
:group_ids => group_ids,
|
|
464
|
-
:key_name => key_name,
|
|
465
|
-
:instance_type => instance_type,
|
|
466
|
-
:addressing_type => addressing_type,
|
|
467
|
-
:kernel_id => kernel_id,
|
|
468
|
-
:ramdisk_id => ramdisk_id,
|
|
469
|
-
:availability_zone => availability_zone,
|
|
470
|
-
:block_device_mappings => block_device_mappings
|
|
471
|
-
})
|
|
472
|
-
end
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
# Launch new EC2 instances. Returns a list of launched instances or an exception.
|
|
476
|
-
#
|
|
477
|
-
# +lparams+ keys (default values in parenthesis):
|
|
478
|
-
# :min_count fixnum, (1)
|
|
479
|
-
# :max_count fixnum, (1)
|
|
480
|
-
# :group_ids array or string ([] == 'default')
|
|
481
|
-
# :instance_type string (DEFAULT_INSTACE_TYPE)
|
|
482
|
-
# :addressing_type string (DEFAULT_ADDRESSING_TYPE
|
|
483
|
-
# :key_name string
|
|
484
|
-
# :kernel_id string
|
|
485
|
-
# :ramdisk_id string
|
|
486
|
-
# :availability_zone string
|
|
487
|
-
# :block_device_mappings string
|
|
488
|
-
# :user_data string
|
|
489
|
-
#
|
|
490
|
-
# ec2.launch_instances('ami-e444444d', :group_ids => 'my_awesome_group',
|
|
491
|
-
# :user_data => "Woohoo!!!",
|
|
492
|
-
# :addressing_type => "public",
|
|
493
|
-
# :key_name => "my_awesome_key",
|
|
494
|
-
# :availability_zone => "us-east-1c") #=>
|
|
495
|
-
# [{:aws_image_id => "ami-e444444d",
|
|
496
|
-
# :aws_reason => "",
|
|
497
|
-
# :aws_state_code => "0",
|
|
498
|
-
# :aws_owner => "000000000888",
|
|
499
|
-
# :aws_instance_id => "i-123f1234",
|
|
500
|
-
# :aws_reservation_id => "r-aabbccdd",
|
|
501
|
-
# :aws_state => "pending",
|
|
502
|
-
# :dns_name => "",
|
|
503
|
-
# :ssh_key_name => "my_awesome_key",
|
|
504
|
-
# :aws_groups => ["my_awesome_group"],
|
|
505
|
-
# :private_dns_name => "",
|
|
506
|
-
# :aws_instance_type => "m1.small",
|
|
507
|
-
# :aws_launch_time => "2008-1-1T00:00:00.000Z",
|
|
508
|
-
# :aws_ramdisk_id => "ari-8605e0ef"
|
|
509
|
-
# :aws_kernel_id => "aki-9905e0f0",
|
|
510
|
-
# :ami_launch_index => "0",
|
|
511
|
-
# :aws_availability_zone => "us-east-1c"
|
|
512
|
-
# }]
|
|
513
|
-
#
|
|
514
|
-
def launch_instances(image_id, lparams={})
|
|
515
|
-
@logger.info("Launching instance of image #{image_id} for #{@aws_access_key_id}, " +
|
|
516
|
-
"key: #{lparams[:key_name]}, groups: #{(lparams[:group_ids]).to_a.join(',')}")
|
|
517
|
-
# careful: keyName and securityGroups may be nil
|
|
518
|
-
params = hash_params('SecurityGroup', lparams[:group_ids].to_a)
|
|
519
|
-
params.update( {'ImageId' => image_id,
|
|
520
|
-
'MinCount' => (lparams[:min_count] || 1).to_s,
|
|
521
|
-
'MaxCount' => (lparams[:max_count] || 1).to_s,
|
|
522
|
-
'AddressingType' => lparams[:addressing_type] || DEFAULT_ADDRESSING_TYPE,
|
|
523
|
-
'InstanceType' => lparams[:instance_type] || DEFAULT_INSTANCE_TYPE })
|
|
524
|
-
# optional params
|
|
525
|
-
params['KeyName'] = lparams[:key_name] unless lparams[:key_name].blank?
|
|
526
|
-
params['KernelId'] = lparams[:kernel_id] unless lparams[:kernel_id].blank?
|
|
527
|
-
params['RamdiskId'] = lparams[:ramdisk_id] unless lparams[:ramdisk_id].blank?
|
|
528
|
-
params['Placement.AvailabilityZone'] = lparams[:availability_zone] unless lparams[:availability_zone].blank?
|
|
529
|
-
params['BlockDeviceMappings'] = lparams[:block_device_mappings] unless lparams[:block_device_mappings].blank?
|
|
530
|
-
unless lparams[:user_data].blank?
|
|
531
|
-
lparams[:user_data].strip!
|
|
532
|
-
# Do not use CGI::escape(encode64(...)) as it is done in Amazons EC2 library.
|
|
533
|
-
# Amazon 169.254.169.254 does not like escaped symbols!
|
|
534
|
-
# And it doesn't like "\n" inside of encoded string! Grrr....
|
|
535
|
-
# Otherwise, some of UserData symbols will be lost...
|
|
536
|
-
params['UserData'] = Base64.encode64(lparams[:user_data]).delete("\n").strip unless lparams[:user_data].blank?
|
|
537
|
-
end
|
|
538
|
-
link = generate_request("RunInstances", params)
|
|
539
|
-
#debugger
|
|
540
|
-
instances = request_info(link, QEc2DescribeInstancesParser.new(:logger => @logger))
|
|
541
|
-
get_desc_instances(instances)
|
|
542
|
-
rescue Exception
|
|
543
|
-
on_exception
|
|
544
|
-
end
|
|
545
|
-
|
|
546
|
-
# Terminates EC2 instances. Returns a list of termination params or an exception.
|
|
547
|
-
#
|
|
548
|
-
# ec2.terminate_instances(['i-f222222d','i-f222222e']) #=>
|
|
549
|
-
# [{:aws_shutdown_state => "shutting-down",
|
|
550
|
-
# :aws_instance_id => "i-f222222d",
|
|
551
|
-
# :aws_shutdown_state_code => 32,
|
|
552
|
-
# :aws_prev_state => "running",
|
|
553
|
-
# :aws_prev_state_code => 16},
|
|
554
|
-
# {:aws_shutdown_state => "shutting-down",
|
|
555
|
-
# :aws_instance_id => "i-f222222e",
|
|
556
|
-
# :aws_shutdown_state_code => 32,
|
|
557
|
-
# :aws_prev_state => "running",
|
|
558
|
-
# :aws_prev_state_code => 16}]
|
|
559
|
-
#
|
|
560
|
-
def terminate_instances(list=[])
|
|
561
|
-
link = generate_request("TerminateInstances", hash_params('InstanceId',list.to_a))
|
|
562
|
-
request_info(link, QEc2TerminateInstancesParser.new(:logger => @logger))
|
|
563
|
-
rescue Exception
|
|
564
|
-
on_exception
|
|
565
|
-
end
|
|
566
|
-
|
|
567
|
-
# Retreive EC2 instance OS logs. Returns a hash of data or an exception.
|
|
568
|
-
#
|
|
569
|
-
# ec2.get_console_output('i-f222222d') =>
|
|
570
|
-
# {:aws_instance_id => 'i-f222222d',
|
|
571
|
-
# :aws_timestamp => "2007-05-23T14:36:07.000-07:00",
|
|
572
|
-
# :timestamp => Wed May 23 21:36:07 UTC 2007, # Time instance
|
|
573
|
-
# :aws_output => "Linux version 2.6.16-xenU (builder@patchbat.amazonsa) (gcc version 4.0.1 20050727 ..."
|
|
574
|
-
def get_console_output(instance_id)
|
|
575
|
-
link = generate_request("GetConsoleOutput", { 'InstanceId.1' => instance_id })
|
|
576
|
-
request_info(link, QEc2GetConsoleOutputParser.new(:logger => @logger))
|
|
577
|
-
rescue Exception
|
|
578
|
-
on_exception
|
|
579
|
-
end
|
|
580
|
-
|
|
581
|
-
# Reboot an EC2 instance. Returns +true+ or an exception.
|
|
582
|
-
#
|
|
583
|
-
# ec2.reboot_instances(['i-f222222d','i-f222222e']) #=> true
|
|
584
|
-
#
|
|
585
|
-
def reboot_instances(list)
|
|
586
|
-
link = generate_request("RebootInstances", hash_params('InstanceId', list.to_a))
|
|
587
|
-
request_info(link, RightBoolResponseParser.new(:logger => @logger))
|
|
588
|
-
rescue Exception
|
|
589
|
-
on_exception
|
|
590
|
-
end
|
|
591
|
-
|
|
592
|
-
#-----------------------------------------------------------------
|
|
593
|
-
# Instances: Windows addons
|
|
594
|
-
#-----------------------------------------------------------------
|
|
595
|
-
|
|
596
|
-
# Get initial Windows Server setup password from an instance console output.
|
|
597
|
-
#
|
|
598
|
-
# my_awesome_key = ec2.create_key_pair('my_awesome_key') #=>
|
|
599
|
-
# {:aws_key_name => "my_awesome_key",
|
|
600
|
-
# :aws_fingerprint => "01:02:03:f4:25:e6:97:e8:9b:02:1a:26:32:4e:58:6b:7a:8c:9f:03",
|
|
601
|
-
# :aws_material => "-----BEGIN RSA PRIVATE KEY-----\nMIIEpQIBAAK...Q8MDrCbuQ=\n-----END RSA PRIVATE KEY-----"}
|
|
602
|
-
#
|
|
603
|
-
# my_awesome_instance = ec2.run_instances('ami-a000000a',1,1,['my_awesome_group'],'my_awesome_key', 'WindowsInstance!!!') #=>
|
|
604
|
-
# [{:aws_image_id => "ami-a000000a",
|
|
605
|
-
# :aws_instance_id => "i-12345678",
|
|
606
|
-
# ...
|
|
607
|
-
# :aws_availability_zone => "us-east-1b"
|
|
608
|
-
# }]
|
|
609
|
-
#
|
|
610
|
-
# # wait until instance enters 'operational' state and get it's initial password
|
|
611
|
-
#
|
|
612
|
-
# puts ec2.get_initial_password(my_awesome_instance[:aws_instance_id], my_awesome_key[:aws_material]) #=> "MhjWcgZuY6"
|
|
613
|
-
#
|
|
614
|
-
def get_initial_password(instance_id, private_key)
|
|
615
|
-
console_output = get_console_output(instance_id)
|
|
616
|
-
crypted_password = console_output[:aws_output][%r{<Password>(.+)</Password>}m] && $1
|
|
617
|
-
unless crypted_password
|
|
618
|
-
raise AwsError.new("Initial password was not found in console output for #{instance_id}")
|
|
619
|
-
else
|
|
620
|
-
OpenSSL::PKey::RSA.new(private_key).private_decrypt(Base64.decode64(crypted_password))
|
|
621
|
-
end
|
|
622
|
-
rescue Exception
|
|
623
|
-
on_exception
|
|
624
|
-
end
|
|
625
|
-
|
|
626
|
-
# Bundle a Windows image.
|
|
627
|
-
# Internally, it queues the bundling task and shuts down the instance.
|
|
628
|
-
# It then takes a snapshot of the Windows volume bundles it, and uploads it to
|
|
629
|
-
# S3. After bundling completes, Rightaws::Ec2#register_image may be used to
|
|
630
|
-
# register the new Windows AMI for subsequent launches.
|
|
631
|
-
#
|
|
632
|
-
# ec2.bundle_instance('i-e3e24e8a', 'my-awesome-bucket', 'my-win-image-1') #=>
|
|
633
|
-
# [{:aws_update_time => "2008-10-16T13:58:25.000Z",
|
|
634
|
-
# :s3_bucket => "kd-win-1",
|
|
635
|
-
# :s3_prefix => "win2pr",
|
|
636
|
-
# :aws_state => "pending",
|
|
637
|
-
# :aws_id => "bun-26a7424f",
|
|
638
|
-
# :aws_instance_id => "i-878a25ee",
|
|
639
|
-
# :aws_start_time => "2008-10-16T13:58:02.000Z"}]
|
|
640
|
-
#
|
|
641
|
-
def bundle_instance(instance_id, s3_bucket, s3_prefix,
|
|
642
|
-
s3_owner_aws_access_key_id=nil, s3_owner_aws_secret_access_key=nil,
|
|
643
|
-
s3_expires = S3Interface::DEFAULT_EXPIRES_AFTER,
|
|
644
|
-
s3_upload_policy='ec2-bundle-read')
|
|
645
|
-
# S3 access and signatures
|
|
646
|
-
s3_owner_aws_access_key_id ||= @aws_access_key_id
|
|
647
|
-
s3_owner_aws_secret_access_key ||= @aws_secret_access_key
|
|
648
|
-
s3_expires = Time.now.utc + s3_expires if s3_expires.is_a?(Fixnum) && (s3_expires < S3Interface::ONE_YEAR_IN_SECONDS)
|
|
649
|
-
# policy
|
|
650
|
-
policy = { 'expiration' => s3_expires.strftime('%Y-%m-%dT%H:%M:%SZ'),
|
|
651
|
-
'conditions' => [ { 'bucket' => s3_bucket },
|
|
652
|
-
{ 'acl' => s3_upload_policy },
|
|
653
|
-
[ 'starts-with', '$key', s3_prefix ] ] }.to_json
|
|
654
|
-
policy64 = Base64.encode64(policy).gsub("\n","")
|
|
655
|
-
signed_policy64 = AwsUtils.sign(s3_owner_aws_secret_access_key, policy64)
|
|
656
|
-
# fill request params
|
|
657
|
-
params = { 'InstanceId' => instance_id,
|
|
658
|
-
'Storage.S3.AWSAccessKeyId' => s3_owner_aws_access_key_id,
|
|
659
|
-
'Storage.S3.UploadPolicy' => policy64,
|
|
660
|
-
'Storage.S3.UploadPolicySignature' => signed_policy64,
|
|
661
|
-
'Storage.S3.Bucket' => s3_bucket,
|
|
662
|
-
'Storage.S3.Prefix' => s3_prefix,
|
|
663
|
-
}
|
|
664
|
-
link = generate_request("BundleInstance", params)
|
|
665
|
-
request_info(link, QEc2BundleInstanceParser.new)
|
|
666
|
-
rescue Exception
|
|
667
|
-
on_exception
|
|
668
|
-
end
|
|
669
|
-
|
|
670
|
-
# Describe the status of the Windows AMI bundlings.
|
|
671
|
-
# If +list+ is omitted the returns the whole list of tasks.
|
|
672
|
-
#
|
|
673
|
-
# ec2.describe_bundle_tasks(['bun-4fa74226']) #=>
|
|
674
|
-
# [{:s3_bucket => "my-awesome-bucket"
|
|
675
|
-
# :aws_id => "bun-0fa70206",
|
|
676
|
-
# :s3_prefix => "win1pr",
|
|
677
|
-
# :aws_start_time => "2008-10-14T16:27:57.000Z",
|
|
678
|
-
# :aws_update_time => "2008-10-14T16:37:10.000Z",
|
|
679
|
-
# :aws_error_code => "Client.S3Error",
|
|
680
|
-
# :aws_error_message =>
|
|
681
|
-
# "AccessDenied(403)- Invalid according to Policy: Policy Condition failed: [\"eq\", \"$acl\", \"aws-exec-read\"]",
|
|
682
|
-
# :aws_state => "failed",
|
|
683
|
-
# :aws_instance_id => "i-e3e24e8a"}]
|
|
684
|
-
#
|
|
685
|
-
def describe_bundle_tasks(list=[])
|
|
686
|
-
link = generate_request("DescribeBundleTasks", hash_params('BundleId', list.to_a))
|
|
687
|
-
request_info(link, QEc2DescribeBundleTasksParser.new)
|
|
688
|
-
rescue Exception
|
|
689
|
-
on_exception
|
|
690
|
-
end
|
|
691
|
-
|
|
692
|
-
# Cancel an in‐progress or pending bundle task by id.
|
|
693
|
-
#
|
|
694
|
-
# ec2.cancel_bundle_task('bun-73a7421a') #=>
|
|
695
|
-
# [{:s3_bucket => "my-awesome-bucket"
|
|
696
|
-
# :aws_id => "bun-0fa70206",
|
|
697
|
-
# :s3_prefix => "win02",
|
|
698
|
-
# :aws_start_time => "2008-10-14T13:00:29.000Z",
|
|
699
|
-
# :aws_error_message => "User has requested bundling operation cancellation",
|
|
700
|
-
# :aws_state => "failed",
|
|
701
|
-
# :aws_update_time => "2008-10-14T13:01:31.000Z",
|
|
702
|
-
# :aws_error_code => "Client.Cancelled",
|
|
703
|
-
# :aws_instance_id => "i-e3e24e8a"}
|
|
704
|
-
#
|
|
705
|
-
def cancel_bundle_task(bundle_id)
|
|
706
|
-
link = generate_request("CancelBundleTask", { 'BundleId' => bundle_id })
|
|
707
|
-
request_info(link, QEc2BundleInstanceParser.new)
|
|
708
|
-
rescue Exception
|
|
709
|
-
on_exception
|
|
710
|
-
end
|
|
711
|
-
|
|
712
|
-
#-----------------------------------------------------------------
|
|
713
|
-
# Security groups
|
|
714
|
-
#-----------------------------------------------------------------
|
|
715
|
-
|
|
716
|
-
# Retrieve Security Group information. If +list+ is omitted the returns the whole list of groups.
|
|
717
|
-
#
|
|
718
|
-
# ec2.describe_security_groups #=>
|
|
719
|
-
# [{:aws_group_name => "default-1",
|
|
720
|
-
# :aws_owner => "000000000888",
|
|
721
|
-
# :aws_description => "Default allowing SSH, HTTP, and HTTPS ingress",
|
|
722
|
-
# :aws_perms =>
|
|
723
|
-
# [{:owner => "000000000888", :group => "default"},
|
|
724
|
-
# {:owner => "000000000888", :group => "default-1"},
|
|
725
|
-
# {:to_port => "-1", :protocol => "icmp", :from_port => "-1", :cidr_ips => "0.0.0.0/0"},
|
|
726
|
-
# {:to_port => "22", :protocol => "tcp", :from_port => "22", :cidr_ips => "0.0.0.0/0"},
|
|
727
|
-
# {:to_port => "80", :protocol => "tcp", :from_port => "80", :cidr_ips => "0.0.0.0/0"},
|
|
728
|
-
# {:to_port => "443", :protocol => "tcp", :from_port => "443", :cidr_ips => "0.0.0.0/0"}]},
|
|
729
|
-
# ..., {...}]
|
|
730
|
-
#
|
|
731
|
-
def describe_security_groups(list=[])
|
|
732
|
-
link = generate_request("DescribeSecurityGroups", hash_params('GroupName',list.to_a))
|
|
733
|
-
request_cache_or_info( :describe_security_groups, link, QEc2DescribeSecurityGroupsParser, @@bench, list.blank?) do |parser|
|
|
734
|
-
result = []
|
|
735
|
-
parser.result.each do |item|
|
|
736
|
-
perms = []
|
|
737
|
-
item.ipPermissions.each do |perm|
|
|
738
|
-
perm.groups.each do |ngroup|
|
|
739
|
-
perms << {:group => ngroup.groupName,
|
|
740
|
-
:owner => ngroup.userId}
|
|
741
|
-
end
|
|
742
|
-
perm.ipRanges.each do |cidr_ip|
|
|
743
|
-
perms << {:from_port => perm.fromPort,
|
|
744
|
-
:to_port => perm.toPort,
|
|
745
|
-
:protocol => perm.ipProtocol,
|
|
746
|
-
:cidr_ips => cidr_ip}
|
|
747
|
-
end
|
|
748
|
-
end
|
|
749
|
-
|
|
750
|
-
# delete duplication
|
|
751
|
-
perms.each_index do |i|
|
|
752
|
-
(0...i).each do |j|
|
|
753
|
-
if perms[i] == perms[j] then perms[i] = nil; break; end
|
|
754
|
-
end
|
|
755
|
-
end
|
|
756
|
-
perms.compact!
|
|
757
|
-
|
|
758
|
-
result << {:aws_owner => item.ownerId,
|
|
759
|
-
:aws_group_name => item.groupName,
|
|
760
|
-
:aws_description => item.groupDescription,
|
|
761
|
-
:aws_perms => perms}
|
|
762
|
-
|
|
763
|
-
end
|
|
764
|
-
result
|
|
765
|
-
end
|
|
766
|
-
rescue Exception
|
|
767
|
-
on_exception
|
|
768
|
-
end
|
|
769
|
-
|
|
770
|
-
# Create new Security Group. Returns +true+ or an exception.
|
|
771
|
-
#
|
|
772
|
-
# ec2.create_security_group('default-1',"Default allowing SSH, HTTP, and HTTPS ingress") #=> true
|
|
773
|
-
#
|
|
774
|
-
def create_security_group(name, description)
|
|
775
|
-
# EC2 doesn't like an empty description...
|
|
776
|
-
description = " " if description.blank?
|
|
777
|
-
link = generate_request("CreateSecurityGroup",
|
|
778
|
-
'GroupName' => name.to_s,
|
|
779
|
-
'GroupDescription' => description.to_s)
|
|
780
|
-
request_info(link, RightBoolResponseParser.new(:logger => @logger))
|
|
781
|
-
rescue Exception
|
|
782
|
-
on_exception
|
|
783
|
-
end
|
|
784
|
-
|
|
785
|
-
# Remove Security Group. Returns +true+ or an exception.
|
|
786
|
-
#
|
|
787
|
-
# ec2.delete_security_group('default-1') #=> true
|
|
788
|
-
#
|
|
789
|
-
def delete_security_group(name)
|
|
790
|
-
link = generate_request("DeleteSecurityGroup",
|
|
791
|
-
'GroupName' => name.to_s)
|
|
792
|
-
request_info(link, RightBoolResponseParser.new(:logger => @logger))
|
|
793
|
-
rescue Exception
|
|
794
|
-
on_exception
|
|
795
|
-
end
|
|
796
|
-
|
|
797
|
-
# Authorize named ingress for security group. Allows instances that are member of someone
|
|
798
|
-
# else's security group to open connections to instances in my group.
|
|
799
|
-
#
|
|
800
|
-
# ec2.authorize_security_group_named_ingress('my_awesome_group', '7011-0219-8268', 'their_group_name') #=> true
|
|
801
|
-
#
|
|
802
|
-
def authorize_security_group_named_ingress(name, owner, group)
|
|
803
|
-
link = generate_request("AuthorizeSecurityGroupIngress",
|
|
804
|
-
'GroupName' => name.to_s,
|
|
805
|
-
'SourceSecurityGroupName' => group.to_s,
|
|
806
|
-
'SourceSecurityGroupOwnerId' => owner.to_s.gsub(/-/,''))
|
|
807
|
-
request_info(link, RightBoolResponseParser.new(:logger => @logger))
|
|
808
|
-
rescue Exception
|
|
809
|
-
on_exception
|
|
810
|
-
end
|
|
811
|
-
|
|
812
|
-
# Revoke named ingress for security group.
|
|
813
|
-
#
|
|
814
|
-
# ec2.revoke_security_group_named_ingress('my_awesome_group', aws_user_id, 'another_group_name') #=> true
|
|
815
|
-
#
|
|
816
|
-
def revoke_security_group_named_ingress(name, owner, group)
|
|
817
|
-
link = generate_request("RevokeSecurityGroupIngress",
|
|
818
|
-
'GroupName' => name.to_s,
|
|
819
|
-
'SourceSecurityGroupName' => group.to_s,
|
|
820
|
-
'SourceSecurityGroupOwnerId' => owner.to_s.gsub(/-/,''))
|
|
821
|
-
request_info(link, RightBoolResponseParser.new(:logger => @logger))
|
|
822
|
-
rescue Exception
|
|
823
|
-
on_exception
|
|
824
|
-
end
|
|
825
|
-
|
|
826
|
-
# Add permission to a security group. Returns +true+ or an exception. +protocol+ is one of :'tcp'|'udp'|'icmp'.
|
|
827
|
-
#
|
|
828
|
-
# ec2.authorize_security_group_IP_ingress('my_awesome_group', 80, 82, 'udp', '192.168.1.0/8') #=> true
|
|
829
|
-
# ec2.authorize_security_group_IP_ingress('my_awesome_group', -1, -1, 'icmp') #=> true
|
|
830
|
-
#
|
|
831
|
-
def authorize_security_group_IP_ingress(name, from_port, to_port, protocol='tcp', cidr_ip='0.0.0.0/0')
|
|
832
|
-
link = generate_request("AuthorizeSecurityGroupIngress",
|
|
833
|
-
'GroupName' => name.to_s,
|
|
834
|
-
'IpProtocol' => protocol.to_s,
|
|
835
|
-
'FromPort' => from_port.to_s,
|
|
836
|
-
'ToPort' => to_port.to_s,
|
|
837
|
-
'CidrIp' => cidr_ip.to_s)
|
|
838
|
-
request_info(link, RightBoolResponseParser.new(:logger => @logger))
|
|
839
|
-
rescue Exception
|
|
840
|
-
on_exception
|
|
841
|
-
end
|
|
842
|
-
|
|
843
|
-
# Remove permission from a security group. Returns +true+ or an exception. +protocol+ is one of :'tcp'|'udp'|'icmp' ('tcp' is default).
|
|
844
|
-
#
|
|
845
|
-
# ec2.revoke_security_group_IP_ingress('my_awesome_group', 80, 82, 'udp', '192.168.1.0/8') #=> true
|
|
846
|
-
#
|
|
847
|
-
def revoke_security_group_IP_ingress(name, from_port, to_port, protocol='tcp', cidr_ip='0.0.0.0/0')
|
|
848
|
-
link = generate_request("RevokeSecurityGroupIngress",
|
|
849
|
-
'GroupName' => name.to_s,
|
|
850
|
-
'IpProtocol' => protocol.to_s,
|
|
851
|
-
'FromPort' => from_port.to_s,
|
|
852
|
-
'ToPort' => to_port.to_s,
|
|
853
|
-
'CidrIp' => cidr_ip.to_s)
|
|
854
|
-
request_info(link, RightBoolResponseParser.new(:logger => @logger))
|
|
855
|
-
rescue Exception
|
|
856
|
-
on_exception
|
|
857
|
-
end
|
|
858
|
-
|
|
859
|
-
#-----------------------------------------------------------------
|
|
860
|
-
# Keys
|
|
861
|
-
#-----------------------------------------------------------------
|
|
862
|
-
|
|
863
|
-
# Retrieve a list of SSH keys. Returns an array of keys or an exception. Each key is
|
|
864
|
-
# represented as a two-element hash.
|
|
865
|
-
#
|
|
866
|
-
# ec2.describe_key_pairs #=>
|
|
867
|
-
# [{:aws_fingerprint=> "01:02:03:f4:25:e6:97:e8:9b:02:1a:26:32:4e:58:6b:7a:8c:9f:03", :aws_key_name=>"key-1"},
|
|
868
|
-
# {:aws_fingerprint=> "1e:29:30:47:58:6d:7b:8c:9f:08:11:20:3c:44:52:69:74:80:97:08", :aws_key_name=>"key-2"},
|
|
869
|
-
# ..., {...} ]
|
|
870
|
-
#
|
|
871
|
-
def describe_key_pairs(list=[])
|
|
872
|
-
link = generate_request("DescribeKeyPairs", hash_params('KeyName',list.to_a))
|
|
873
|
-
request_cache_or_info :describe_key_pairs, link, QEc2DescribeKeyPairParser, @@bench, list.blank?
|
|
874
|
-
rescue Exception
|
|
875
|
-
on_exception
|
|
876
|
-
end
|
|
877
|
-
|
|
878
|
-
# Create new SSH key. Returns a hash of the key's data or an exception.
|
|
879
|
-
#
|
|
880
|
-
# ec2.create_key_pair('my_awesome_key') #=>
|
|
881
|
-
# {:aws_key_name => "my_awesome_key",
|
|
882
|
-
# :aws_fingerprint => "01:02:03:f4:25:e6:97:e8:9b:02:1a:26:32:4e:58:6b:7a:8c:9f:03",
|
|
883
|
-
# :aws_material => "-----BEGIN RSA PRIVATE KEY-----\nMIIEpQIBAAK...Q8MDrCbuQ=\n-----END RSA PRIVATE KEY-----"}
|
|
884
|
-
#
|
|
885
|
-
def create_key_pair(name)
|
|
886
|
-
link = generate_request("CreateKeyPair",
|
|
887
|
-
'KeyName' => name.to_s)
|
|
888
|
-
request_info(link, QEc2CreateKeyPairParser.new(:logger => @logger))
|
|
889
|
-
rescue Exception
|
|
890
|
-
on_exception
|
|
891
|
-
end
|
|
892
|
-
|
|
893
|
-
# Delete a key pair. Returns +true+ or an exception.
|
|
894
|
-
#
|
|
895
|
-
# ec2.delete_key_pair('my_awesome_key') #=> true
|
|
896
|
-
#
|
|
897
|
-
def delete_key_pair(name)
|
|
898
|
-
link = generate_request("DeleteKeyPair",
|
|
899
|
-
'KeyName' => name.to_s)
|
|
900
|
-
request_info(link, RightBoolResponseParser.new(:logger => @logger))
|
|
901
|
-
rescue Exception
|
|
902
|
-
on_exception
|
|
903
|
-
end
|
|
904
|
-
|
|
905
|
-
#-----------------------------------------------------------------
|
|
906
|
-
# Elastic IPs
|
|
907
|
-
#-----------------------------------------------------------------
|
|
908
|
-
|
|
909
|
-
# Acquire a new elastic IP address for use with your account.
|
|
910
|
-
# Returns allocated IP address or an exception.
|
|
911
|
-
#
|
|
912
|
-
# ec2.allocate_address #=> '75.101.154.140'
|
|
913
|
-
#
|
|
914
|
-
def allocate_address
|
|
915
|
-
link = generate_request("AllocateAddress")
|
|
916
|
-
request_info(link, QEc2AllocateAddressParser.new(:logger => @logger))
|
|
917
|
-
rescue Exception
|
|
918
|
-
on_exception
|
|
919
|
-
end
|
|
920
|
-
|
|
921
|
-
# Associate an elastic IP address with an instance.
|
|
922
|
-
# Returns +true+ or an exception.
|
|
923
|
-
#
|
|
924
|
-
# ec2.associate_address('i-d630cbbf', '75.101.154.140') #=> true
|
|
925
|
-
#
|
|
926
|
-
def associate_address(instance_id, public_ip)
|
|
927
|
-
link = generate_request("AssociateAddress",
|
|
928
|
-
"InstanceId" => instance_id.to_s,
|
|
929
|
-
"PublicIp" => public_ip.to_s)
|
|
930
|
-
request_info(link, RightBoolResponseParser.new(:logger => @logger))
|
|
931
|
-
rescue Exception
|
|
932
|
-
on_exception
|
|
933
|
-
end
|
|
934
|
-
|
|
935
|
-
# List elastic IP addresses assigned to your account.
|
|
936
|
-
# Returns an array of 2 keys (:instance_id and :public_ip) hashes:
|
|
937
|
-
#
|
|
938
|
-
# ec2.describe_addresses #=> [{:instance_id=>"i-d630cbbf", :public_ip=>"75.101.154.140"},
|
|
939
|
-
# {:instance_id=>nil, :public_ip=>"75.101.154.141"}]
|
|
940
|
-
#
|
|
941
|
-
# ec2.describe_addresses('75.101.154.140') #=> [{:instance_id=>"i-d630cbbf", :public_ip=>"75.101.154.140"}]
|
|
942
|
-
#
|
|
943
|
-
def describe_addresses(list=[])
|
|
944
|
-
link = generate_request("DescribeAddresses",
|
|
945
|
-
hash_params('PublicIp',list.to_a))
|
|
946
|
-
request_cache_or_info :describe_addresses, link, QEc2DescribeAddressesParser, @@bench, list.blank?
|
|
947
|
-
rescue Exception
|
|
948
|
-
on_exception
|
|
949
|
-
end
|
|
950
|
-
|
|
951
|
-
# Disassociate the specified elastic IP address from the instance to which it is assigned.
|
|
952
|
-
# Returns +true+ or an exception.
|
|
953
|
-
#
|
|
954
|
-
# ec2.disassociate_address('75.101.154.140') #=> true
|
|
955
|
-
#
|
|
956
|
-
def disassociate_address(public_ip)
|
|
957
|
-
link = generate_request("DisassociateAddress",
|
|
958
|
-
"PublicIp" => public_ip.to_s)
|
|
959
|
-
request_info(link, RightBoolResponseParser.new(:logger => @logger))
|
|
960
|
-
rescue Exception
|
|
961
|
-
on_exception
|
|
962
|
-
end
|
|
963
|
-
|
|
964
|
-
# Release an elastic IP address associated with your account.
|
|
965
|
-
# Returns +true+ or an exception.
|
|
966
|
-
#
|
|
967
|
-
# ec2.release_address('75.101.154.140') #=> true
|
|
968
|
-
#
|
|
969
|
-
def release_address(public_ip)
|
|
970
|
-
link = generate_request("ReleaseAddress",
|
|
971
|
-
"PublicIp" => public_ip.to_s)
|
|
972
|
-
request_info(link, RightBoolResponseParser.new(:logger => @logger))
|
|
973
|
-
rescue Exception
|
|
974
|
-
on_exception
|
|
975
|
-
end
|
|
976
|
-
|
|
977
|
-
#-----------------------------------------------------------------
|
|
978
|
-
# Availability zones
|
|
979
|
-
#-----------------------------------------------------------------
|
|
980
|
-
|
|
981
|
-
# Describes availability zones that are currently available to the account and their states.
|
|
982
|
-
# Returns an array of 2 keys (:zone_name and :zone_state) hashes:
|
|
983
|
-
#
|
|
984
|
-
# ec2.describe_availability_zones #=> [{:region_name=>"us-east-1",
|
|
985
|
-
# :zone_name=>"us-east-1a",
|
|
986
|
-
# :zone_state=>"available"}, ... ]
|
|
987
|
-
#
|
|
988
|
-
# ec2.describe_availability_zones('us-east-1c') #=> [{:region_name=>"us-east-1",
|
|
989
|
-
# :zone_state=>"available",
|
|
990
|
-
# :zone_name=>"us-east-1c"}]
|
|
991
|
-
#
|
|
992
|
-
def describe_availability_zones(list=[])
|
|
993
|
-
link = generate_request("DescribeAvailabilityZones",
|
|
994
|
-
hash_params('ZoneName',list.to_a))
|
|
995
|
-
request_cache_or_info :describe_availability_zones, link, QEc2DescribeAvailabilityZonesParser, @@bench, list.blank?
|
|
996
|
-
rescue Exception
|
|
997
|
-
on_exception
|
|
998
|
-
end
|
|
999
|
-
|
|
1000
|
-
#-----------------------------------------------------------------
|
|
1001
|
-
# Regions
|
|
1002
|
-
#-----------------------------------------------------------------
|
|
1003
|
-
|
|
1004
|
-
# Describe regions.
|
|
1005
|
-
#
|
|
1006
|
-
# ec2.describe_regions #=> ["eu-west-1", "us-east-1"]
|
|
1007
|
-
#
|
|
1008
|
-
def describe_regions(list=[])
|
|
1009
|
-
link = generate_request("DescribeRegions",
|
|
1010
|
-
hash_params('RegionName',list.to_a))
|
|
1011
|
-
request_cache_or_info :describe_regions, link, QEc2DescribeRegionsParser, @@bench, list.blank?
|
|
1012
|
-
rescue Exception
|
|
1013
|
-
on_exception
|
|
1014
|
-
end
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
#-----------------------------------------------------------------
|
|
1018
|
-
# EBS: Volumes
|
|
1019
|
-
#-----------------------------------------------------------------
|
|
1020
|
-
|
|
1021
|
-
# Describe all EBS volumes.
|
|
1022
|
-
#
|
|
1023
|
-
# ec2.describe_volumes #=>
|
|
1024
|
-
# [{:aws_size => 94,
|
|
1025
|
-
# :aws_device => "/dev/sdc",
|
|
1026
|
-
# :aws_attachment_status => "attached",
|
|
1027
|
-
# :zone => "merlot",
|
|
1028
|
-
# :snapshot_id => nil,
|
|
1029
|
-
# :aws_attached_at => Wed Jun 18 08:19:28 UTC 2008,
|
|
1030
|
-
# :aws_status => "in-use",
|
|
1031
|
-
# :aws_id => "vol-60957009",
|
|
1032
|
-
# :aws_created_at => Wed Jun 18 08:19:20s UTC 2008,
|
|
1033
|
-
# :aws_instance_id => "i-c014c0a9"},
|
|
1034
|
-
# {:aws_size => 1,
|
|
1035
|
-
# :zone => "merlot",
|
|
1036
|
-
# :snapshot_id => nil,
|
|
1037
|
-
# :aws_status => "available",
|
|
1038
|
-
# :aws_id => "vol-58957031",
|
|
1039
|
-
# :aws_created_at => Wed Jun 18 08:19:21 UTC 2008,}, ... ]
|
|
1040
|
-
#
|
|
1041
|
-
def describe_volumes(list=[])
|
|
1042
|
-
link = generate_request("DescribeVolumes",
|
|
1043
|
-
hash_params('VolumeId',list.to_a))
|
|
1044
|
-
request_cache_or_info :describe_volumes, link, QEc2DescribeVolumesParser, @@bench, list.blank?
|
|
1045
|
-
rescue Exception
|
|
1046
|
-
on_exception
|
|
1047
|
-
end
|
|
1048
|
-
|
|
1049
|
-
# Create new EBS volume based on previously created snapshot.
|
|
1050
|
-
# +Size+ in Gigabytes.
|
|
1051
|
-
#
|
|
1052
|
-
# ec2.create_volume('snap-000000', 10, zone) #=>
|
|
1053
|
-
# {:snapshot_id => "snap-e21df98b",
|
|
1054
|
-
# :aws_status => "creating",
|
|
1055
|
-
# :aws_id => "vol-fc9f7a95",
|
|
1056
|
-
# :zone => "merlot",
|
|
1057
|
-
# :aws_created_at => Tue Jun 24 18:13:32 UTC 2008,
|
|
1058
|
-
# :aws_size => 94}
|
|
1059
|
-
#
|
|
1060
|
-
def create_volume(snapshot_id, size, zone)
|
|
1061
|
-
link = generate_request("CreateVolume",
|
|
1062
|
-
"SnapshotId" => snapshot_id.to_s,
|
|
1063
|
-
"Size" => size.to_s,
|
|
1064
|
-
"AvailabilityZone" => zone.to_s )
|
|
1065
|
-
request_info(link, QEc2CreateVolumeParser.new(:logger => @logger))
|
|
1066
|
-
rescue Exception
|
|
1067
|
-
on_exception
|
|
1068
|
-
end
|
|
1069
|
-
|
|
1070
|
-
# Delete the specified EBS volume.
|
|
1071
|
-
# This does not deletes any snapshots created from this volume.
|
|
1072
|
-
#
|
|
1073
|
-
# ec2.delete_volume('vol-b48a6fdd') #=> true
|
|
1074
|
-
#
|
|
1075
|
-
def delete_volume(volume_id)
|
|
1076
|
-
link = generate_request("DeleteVolume",
|
|
1077
|
-
"VolumeId" => volume_id.to_s)
|
|
1078
|
-
request_info(link, RightBoolResponseParser.new(:logger => @logger))
|
|
1079
|
-
rescue Exception
|
|
1080
|
-
on_exception
|
|
1081
|
-
end
|
|
1082
|
-
|
|
1083
|
-
# Attach the specified EBS volume to a specified instance, exposing the
|
|
1084
|
-
# volume using the specified device name.
|
|
1085
|
-
#
|
|
1086
|
-
# ec2.attach_volume('vol-898a6fe0', 'i-7c905415', '/dev/sdh') #=>
|
|
1087
|
-
# { :aws_instance_id => "i-7c905415",
|
|
1088
|
-
# :aws_device => "/dev/sdh",
|
|
1089
|
-
# :aws_status => "attaching",
|
|
1090
|
-
# :aws_attached_at => "2008-03-28T14:14:39.000Z",
|
|
1091
|
-
# :aws_id => "vol-898a6fe0" }
|
|
1092
|
-
#
|
|
1093
|
-
def attach_volume(volume_id, instance_id, device)
|
|
1094
|
-
link = generate_request("AttachVolume",
|
|
1095
|
-
"VolumeId" => volume_id.to_s,
|
|
1096
|
-
"InstanceId" => instance_id.to_s,
|
|
1097
|
-
"Device" => device.to_s)
|
|
1098
|
-
request_info(link, QEc2AttachAndDetachVolumeParser.new(:logger => @logger))
|
|
1099
|
-
rescue Exception
|
|
1100
|
-
on_exception
|
|
1101
|
-
end
|
|
1102
|
-
|
|
1103
|
-
# Detach the specified EBS volume from the instance to which it is attached.
|
|
1104
|
-
#
|
|
1105
|
-
# ec2.detach_volume('vol-898a6fe0') #=>
|
|
1106
|
-
# { :aws_instance_id => "i-7c905415",
|
|
1107
|
-
# :aws_device => "/dev/sdh",
|
|
1108
|
-
# :aws_status => "detaching",
|
|
1109
|
-
# :aws_attached_at => "2008-03-28T14:38:34.000Z",
|
|
1110
|
-
# :aws_id => "vol-898a6fe0"}
|
|
1111
|
-
#
|
|
1112
|
-
def detach_volume(volume_id, instance_id=nil, device=nil, force=nil)
|
|
1113
|
-
hash = { "VolumeId" => volume_id.to_s }
|
|
1114
|
-
hash["InstanceId"] = instance_id.to_s unless instance_id.blank?
|
|
1115
|
-
hash["Device"] = device.to_s unless device.blank?
|
|
1116
|
-
hash["Force"] = 'true' if force
|
|
1117
|
-
#
|
|
1118
|
-
link = generate_request("DetachVolume", hash)
|
|
1119
|
-
request_info(link, QEc2AttachAndDetachVolumeParser.new(:logger => @logger))
|
|
1120
|
-
rescue Exception
|
|
1121
|
-
on_exception
|
|
1122
|
-
end
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
#-----------------------------------------------------------------
|
|
1126
|
-
# EBS: Snapshots
|
|
1127
|
-
#-----------------------------------------------------------------
|
|
1128
|
-
|
|
1129
|
-
# Describe all EBS snapshots.
|
|
1130
|
-
#
|
|
1131
|
-
# ec2.describe_snapshots #=>
|
|
1132
|
-
# [ { :aws_progress => "100%",
|
|
1133
|
-
# :aws_status => "completed",
|
|
1134
|
-
# :aws_id => "snap-72a5401b",
|
|
1135
|
-
# :aws_volume_id => "vol-5582673c",
|
|
1136
|
-
# :aws_started_at => "2008-02-23T02:50:48.000Z"},
|
|
1137
|
-
# { :aws_progress => "100%",
|
|
1138
|
-
# :aws_status => "completed",
|
|
1139
|
-
# :aws_id => "snap-75a5401c",
|
|
1140
|
-
# :aws_volume_id => "vol-5582673c",
|
|
1141
|
-
# :aws_started_at => "2008-02-23T16:23:19.000Z" },...]
|
|
1142
|
-
#
|
|
1143
|
-
def describe_snapshots(list=[])
|
|
1144
|
-
link = generate_request("DescribeSnapshots",
|
|
1145
|
-
hash_params('SnapshotId',list.to_a))
|
|
1146
|
-
request_cache_or_info :describe_snapshots, link, QEc2DescribeSnapshotsParser, @@bench, list.blank?
|
|
1147
|
-
rescue Exception
|
|
1148
|
-
on_exception
|
|
1149
|
-
end
|
|
1150
|
-
|
|
1151
|
-
# Create a snapshot of specified volume.
|
|
1152
|
-
#
|
|
1153
|
-
# ec2.create_snapshot('vol-898a6fe0') #=>
|
|
1154
|
-
# {:aws_volume_id => "vol-fd9f7a94",
|
|
1155
|
-
# :aws_started_at => Tue Jun 24 18:40:40 UTC 2008,
|
|
1156
|
-
# :aws_progress => "",
|
|
1157
|
-
# :aws_status => "pending",
|
|
1158
|
-
# :aws_id => "snap-d56783bc"}
|
|
1159
|
-
#
|
|
1160
|
-
def create_snapshot(volume_id)
|
|
1161
|
-
link = generate_request("CreateSnapshot",
|
|
1162
|
-
"VolumeId" => volume_id.to_s)
|
|
1163
|
-
request_info(link, QEc2CreateSnapshotParser.new(:logger => @logger))
|
|
1164
|
-
rescue Exception
|
|
1165
|
-
on_exception
|
|
1166
|
-
end
|
|
1167
|
-
|
|
1168
|
-
# Create a snapshot of specified volume, but with the normal retry algorithms disabled.
|
|
1169
|
-
# This method will return immediately upon error. The user can specify connect and read timeouts (in s)
|
|
1170
|
-
# for the connection to AWS. If the user does not specify timeouts, try_create_snapshot uses the default values
|
|
1171
|
-
# in Rightscale::HttpConnection.
|
|
1172
|
-
#
|
|
1173
|
-
# ec2.try_create_snapshot('vol-898a6fe0') #=>
|
|
1174
|
-
# {:aws_volume_id => "vol-fd9f7a94",
|
|
1175
|
-
# :aws_started_at => Tue Jun 24 18:40:40 UTC 2008,
|
|
1176
|
-
# :aws_progress => "",
|
|
1177
|
-
# :aws_status => "pending",
|
|
1178
|
-
# :aws_id => "snap-d56783bc"}
|
|
1179
|
-
#
|
|
1180
|
-
def try_create_snapshot(volume_id, connect_timeout = nil, read_timeout = nil)
|
|
1181
|
-
# For safety in the ensure block...we don't want to restore values
|
|
1182
|
-
# if we never read them in the first place
|
|
1183
|
-
orig_reiteration_time = nil
|
|
1184
|
-
orig_http_params = nil
|
|
1185
|
-
|
|
1186
|
-
orig_reiteration_time = RightAws::AWSErrorHandler::reiteration_time
|
|
1187
|
-
RightAws::AWSErrorHandler::reiteration_time = 0
|
|
1188
|
-
|
|
1189
|
-
orig_http_params = Rightscale::HttpConnection::params()
|
|
1190
|
-
new_http_params = orig_http_params.dup
|
|
1191
|
-
new_http_params[:http_connection_retry_count] = 0
|
|
1192
|
-
new_http_params[:http_connection_open_timeout] = connect_timeout if !connect_timeout.nil?
|
|
1193
|
-
new_http_params[:http_connection_read_timeout] = read_timeout if !read_timeout.nil?
|
|
1194
|
-
Rightscale::HttpConnection::params = new_http_params
|
|
1195
|
-
|
|
1196
|
-
link = generate_request("CreateSnapshot",
|
|
1197
|
-
"VolumeId" => volume_id.to_s)
|
|
1198
|
-
request_info(link, QEc2CreateSnapshotParser.new(:logger => @logger))
|
|
1199
|
-
|
|
1200
|
-
rescue Exception
|
|
1201
|
-
on_exception
|
|
1202
|
-
ensure
|
|
1203
|
-
RightAws::AWSErrorHandler::reiteration_time = orig_reiteration_time if orig_reiteration_time
|
|
1204
|
-
Rightscale::HttpConnection::params = orig_http_params if orig_http_params
|
|
1205
|
-
end
|
|
1206
|
-
|
|
1207
|
-
# Delete the specified snapshot.
|
|
1208
|
-
#
|
|
1209
|
-
# ec2.delete_snapshot('snap-55a5403c') #=> true
|
|
1210
|
-
#
|
|
1211
|
-
def delete_snapshot(snapshot_id)
|
|
1212
|
-
link = generate_request("DeleteSnapshot",
|
|
1213
|
-
"SnapshotId" => snapshot_id.to_s)
|
|
1214
|
-
request_info(link, RightBoolResponseParser.new(:logger => @logger))
|
|
1215
|
-
rescue Exception
|
|
1216
|
-
on_exception
|
|
1217
|
-
end
|
|
1218
|
-
|
|
1219
|
-
#-----------------------------------------------------------------
|
|
1220
|
-
# PARSERS: Boolean Response Parser
|
|
1221
|
-
#-----------------------------------------------------------------
|
|
1222
|
-
|
|
1223
|
-
class RightBoolResponseParser < RightAWSParser #:nodoc:
|
|
1224
|
-
def tagend(name)
|
|
1225
|
-
@result = @text=='true' ? true : false if name == 'return'
|
|
1226
|
-
end
|
|
1227
|
-
end
|
|
1228
|
-
|
|
1229
|
-
#-----------------------------------------------------------------
|
|
1230
|
-
# PARSERS: Key Pair
|
|
1231
|
-
#-----------------------------------------------------------------
|
|
1232
|
-
|
|
1233
|
-
class QEc2DescribeKeyPairParser < RightAWSParser #:nodoc:
|
|
1234
|
-
def tagstart(name, attributes)
|
|
1235
|
-
@item = {} if name == 'item'
|
|
1236
|
-
end
|
|
1237
|
-
def tagend(name)
|
|
1238
|
-
case name
|
|
1239
|
-
when 'keyName' then @item[:aws_key_name] = @text
|
|
1240
|
-
when 'keyFingerprint' then @item[:aws_fingerprint] = @text
|
|
1241
|
-
when 'item' then @result << @item
|
|
1242
|
-
end
|
|
1243
|
-
end
|
|
1244
|
-
def reset
|
|
1245
|
-
@result = [];
|
|
1246
|
-
end
|
|
1247
|
-
end
|
|
1248
|
-
|
|
1249
|
-
class QEc2CreateKeyPairParser < RightAWSParser #:nodoc:
|
|
1250
|
-
def tagstart(name, attributes)
|
|
1251
|
-
@result = {} if name == 'CreateKeyPairResponse'
|
|
1252
|
-
end
|
|
1253
|
-
def tagend(name)
|
|
1254
|
-
case name
|
|
1255
|
-
when 'keyName' then @result[:aws_key_name] = @text
|
|
1256
|
-
when 'keyFingerprint' then @result[:aws_fingerprint] = @text
|
|
1257
|
-
when 'keyMaterial' then @result[:aws_material] = @text
|
|
1258
|
-
end
|
|
1259
|
-
end
|
|
1260
|
-
end
|
|
1261
|
-
|
|
1262
|
-
#-----------------------------------------------------------------
|
|
1263
|
-
# PARSERS: Security Groups
|
|
1264
|
-
#-----------------------------------------------------------------
|
|
1265
|
-
|
|
1266
|
-
class QEc2UserIdGroupPairType #:nodoc:
|
|
1267
|
-
attr_accessor :userId
|
|
1268
|
-
attr_accessor :groupName
|
|
1269
|
-
end
|
|
1270
|
-
|
|
1271
|
-
class QEc2IpPermissionType #:nodoc:
|
|
1272
|
-
attr_accessor :ipProtocol
|
|
1273
|
-
attr_accessor :fromPort
|
|
1274
|
-
attr_accessor :toPort
|
|
1275
|
-
attr_accessor :groups
|
|
1276
|
-
attr_accessor :ipRanges
|
|
1277
|
-
end
|
|
1278
|
-
|
|
1279
|
-
class QEc2SecurityGroupItemType #:nodoc:
|
|
1280
|
-
attr_accessor :groupName
|
|
1281
|
-
attr_accessor :groupDescription
|
|
1282
|
-
attr_accessor :ownerId
|
|
1283
|
-
attr_accessor :ipPermissions
|
|
1284
|
-
end
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
class QEc2DescribeSecurityGroupsParser < RightAWSParser #:nodoc:
|
|
1288
|
-
def tagstart(name, attributes)
|
|
1289
|
-
case name
|
|
1290
|
-
when 'item'
|
|
1291
|
-
if @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo'
|
|
1292
|
-
@group = QEc2SecurityGroupItemType.new
|
|
1293
|
-
@group.ipPermissions = []
|
|
1294
|
-
elsif @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo/item/ipPermissions'
|
|
1295
|
-
@perm = QEc2IpPermissionType.new
|
|
1296
|
-
@perm.ipRanges = []
|
|
1297
|
-
@perm.groups = []
|
|
1298
|
-
elsif @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo/item/ipPermissions/item/groups'
|
|
1299
|
-
@sgroup = QEc2UserIdGroupPairType.new
|
|
1300
|
-
end
|
|
1301
|
-
end
|
|
1302
|
-
end
|
|
1303
|
-
def tagend(name)
|
|
1304
|
-
case name
|
|
1305
|
-
when 'ownerId' then @group.ownerId = @text
|
|
1306
|
-
when 'groupDescription' then @group.groupDescription = @text
|
|
1307
|
-
when 'groupName'
|
|
1308
|
-
if @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo/item'
|
|
1309
|
-
@group.groupName = @text
|
|
1310
|
-
elsif @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo/item/ipPermissions/item/groups/item'
|
|
1311
|
-
@sgroup.groupName = @text
|
|
1312
|
-
end
|
|
1313
|
-
when 'ipProtocol' then @perm.ipProtocol = @text
|
|
1314
|
-
when 'fromPort' then @perm.fromPort = @text
|
|
1315
|
-
when 'toPort' then @perm.toPort = @text
|
|
1316
|
-
when 'userId' then @sgroup.userId = @text
|
|
1317
|
-
when 'cidrIp' then @perm.ipRanges << @text
|
|
1318
|
-
when 'item'
|
|
1319
|
-
if @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo/item/ipPermissions/item/groups'
|
|
1320
|
-
@perm.groups << @sgroup
|
|
1321
|
-
elsif @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo/item/ipPermissions'
|
|
1322
|
-
@group.ipPermissions << @perm
|
|
1323
|
-
elsif @xmlpath=='DescribeSecurityGroupsResponse/securityGroupInfo'
|
|
1324
|
-
@result << @group
|
|
1325
|
-
end
|
|
1326
|
-
end
|
|
1327
|
-
end
|
|
1328
|
-
def reset
|
|
1329
|
-
@result = []
|
|
1330
|
-
end
|
|
1331
|
-
end
|
|
1332
|
-
|
|
1333
|
-
#-----------------------------------------------------------------
|
|
1334
|
-
# PARSERS: Images
|
|
1335
|
-
#-----------------------------------------------------------------
|
|
1336
|
-
|
|
1337
|
-
class QEc2DescribeImagesParser < RightAWSParser #:nodoc:
|
|
1338
|
-
def tagstart(name, attributes)
|
|
1339
|
-
if name == 'item' && @xmlpath[%r{.*/imagesSet$}]
|
|
1340
|
-
@image = {}
|
|
1341
|
-
end
|
|
1342
|
-
end
|
|
1343
|
-
def tagend(name)
|
|
1344
|
-
case name
|
|
1345
|
-
when 'imageId' then @image[:aws_id] = @text
|
|
1346
|
-
when 'imageLocation' then @image[:aws_location] = @text
|
|
1347
|
-
when 'imageState' then @image[:aws_state] = @text
|
|
1348
|
-
when 'imageOwnerId' then @image[:aws_owner] = @text
|
|
1349
|
-
when 'isPublic' then @image[:aws_is_public]= @text == 'true' ? true : false
|
|
1350
|
-
when 'productCode' then (@image[:aws_product_codes] ||= []) << @text
|
|
1351
|
-
when 'architecture' then @image[:aws_architecture] = @text
|
|
1352
|
-
when 'imageType' then @image[:aws_image_type] = @text
|
|
1353
|
-
when 'kernelId' then @image[:aws_kernel_id] = @text
|
|
1354
|
-
when 'ramdiskId' then @image[:aws_ramdisk_id] = @text
|
|
1355
|
-
when 'item' then @result << @image if @xmlpath[%r{.*/imagesSet$}]
|
|
1356
|
-
end
|
|
1357
|
-
end
|
|
1358
|
-
def reset
|
|
1359
|
-
@result = []
|
|
1360
|
-
end
|
|
1361
|
-
end
|
|
1362
|
-
|
|
1363
|
-
class QEc2RegisterImageParser < RightAWSParser #:nodoc:
|
|
1364
|
-
def tagend(name)
|
|
1365
|
-
@result = @text if name == 'imageId'
|
|
1366
|
-
end
|
|
1367
|
-
end
|
|
1368
|
-
|
|
1369
|
-
#-----------------------------------------------------------------
|
|
1370
|
-
# PARSERS: Image Attribute
|
|
1371
|
-
#-----------------------------------------------------------------
|
|
1372
|
-
|
|
1373
|
-
class QEc2DescribeImageAttributeParser < RightAWSParser #:nodoc:
|
|
1374
|
-
def tagstart(name, attributes)
|
|
1375
|
-
case name
|
|
1376
|
-
when 'launchPermission'
|
|
1377
|
-
@result[:groups] = []
|
|
1378
|
-
@result[:users] = []
|
|
1379
|
-
when 'productCodes'
|
|
1380
|
-
@result[:aws_product_codes] = []
|
|
1381
|
-
end
|
|
1382
|
-
end
|
|
1383
|
-
def tagend(name)
|
|
1384
|
-
# right now only 'launchPermission' is supported by Amazon.
|
|
1385
|
-
# But nobody know what will they xml later as attribute. That is why we
|
|
1386
|
-
# check for 'group' and 'userId' inside of 'launchPermission/item'
|
|
1387
|
-
case name
|
|
1388
|
-
when 'imageId' then @result[:aws_id] = @text
|
|
1389
|
-
when 'group' then @result[:groups] << @text if @xmlpath == 'DescribeImageAttributeResponse/launchPermission/item'
|
|
1390
|
-
when 'userId' then @result[:users] << @text if @xmlpath == 'DescribeImageAttributeResponse/launchPermission/item'
|
|
1391
|
-
when 'productCode' then @result[:aws_product_codes] << @text
|
|
1392
|
-
when 'kernel' then @result[:aws_kernel] = @text
|
|
1393
|
-
when 'ramdisk' then @result[:aws_ramdisk] = @text
|
|
1394
|
-
when 'blockDeviceMapping' then @result[:block_device_mapping] = @text
|
|
1395
|
-
end
|
|
1396
|
-
end
|
|
1397
|
-
def reset
|
|
1398
|
-
@result = {}
|
|
1399
|
-
end
|
|
1400
|
-
end
|
|
1401
|
-
|
|
1402
|
-
#-----------------------------------------------------------------
|
|
1403
|
-
# PARSERS: Instances
|
|
1404
|
-
#-----------------------------------------------------------------
|
|
1405
|
-
|
|
1406
|
-
class QEc2DescribeInstancesParser < RightAWSParser #:nodoc:
|
|
1407
|
-
def tagstart(name, attributes)
|
|
1408
|
-
# DescribeInstances property
|
|
1409
|
-
if (name == 'item' && @xmlpath == 'DescribeInstancesResponse/reservationSet') ||
|
|
1410
|
-
# RunInstances property
|
|
1411
|
-
(name == 'RunInstancesResponse')
|
|
1412
|
-
@reservation = { :aws_groups => [],
|
|
1413
|
-
:instances_set => [] }
|
|
1414
|
-
|
|
1415
|
-
elsif (name == 'item') &&
|
|
1416
|
-
# DescribeInstances property
|
|
1417
|
-
( @xmlpath=='DescribeInstancesResponse/reservationSet/item/instancesSet' ||
|
|
1418
|
-
# RunInstances property
|
|
1419
|
-
@xmlpath=='RunInstancesResponse/instancesSet' )
|
|
1420
|
-
# the optional params (sometimes are missing and we dont want them to be nil)
|
|
1421
|
-
@instance = { :aws_reason => '',
|
|
1422
|
-
:dns_name => '',
|
|
1423
|
-
:private_dns_name => '',
|
|
1424
|
-
:ami_launch_index => '',
|
|
1425
|
-
:ssh_key_name => '',
|
|
1426
|
-
:aws_state => '',
|
|
1427
|
-
:aws_product_codes => [] }
|
|
1428
|
-
end
|
|
1429
|
-
end
|
|
1430
|
-
def tagend(name)
|
|
1431
|
-
case name
|
|
1432
|
-
# reservation
|
|
1433
|
-
when 'reservationId' then @reservation[:aws_reservation_id] = @text
|
|
1434
|
-
when 'ownerId' then @reservation[:aws_owner] = @text
|
|
1435
|
-
when 'groupId' then @reservation[:aws_groups] << @text
|
|
1436
|
-
# instance
|
|
1437
|
-
when 'instanceId' then @instance[:aws_instance_id] = @text
|
|
1438
|
-
when 'imageId' then @instance[:aws_image_id] = @text
|
|
1439
|
-
when 'dnsName' then @instance[:dns_name] = @text
|
|
1440
|
-
when 'privateDnsName' then @instance[:private_dns_name] = @text
|
|
1441
|
-
when 'reason' then @instance[:aws_reason] = @text
|
|
1442
|
-
when 'keyName' then @instance[:ssh_key_name] = @text
|
|
1443
|
-
when 'amiLaunchIndex' then @instance[:ami_launch_index] = @text
|
|
1444
|
-
when 'code' then @instance[:aws_state_code] = @text
|
|
1445
|
-
when 'name' then @instance[:aws_state] = @text
|
|
1446
|
-
when 'productCode' then @instance[:aws_product_codes] << @text
|
|
1447
|
-
when 'instanceType' then @instance[:aws_instance_type] = @text
|
|
1448
|
-
when 'launchTime' then @instance[:aws_launch_time] = @text
|
|
1449
|
-
when 'kernelId' then @instance[:aws_kernel_id] = @text
|
|
1450
|
-
when 'ramdiskId' then @instance[:aws_ramdisk_id] = @text
|
|
1451
|
-
when 'platform' then @instance[:aws_platform] = @text
|
|
1452
|
-
when 'availabilityZone' then @instance[:aws_availability_zone] = @text
|
|
1453
|
-
when 'item'
|
|
1454
|
-
if @xmlpath == 'DescribeInstancesResponse/reservationSet/item/instancesSet' || # DescribeInstances property
|
|
1455
|
-
@xmlpath == 'RunInstancesResponse/instancesSet' # RunInstances property
|
|
1456
|
-
@reservation[:instances_set] << @instance
|
|
1457
|
-
elsif @xmlpath=='DescribeInstancesResponse/reservationSet' # DescribeInstances property
|
|
1458
|
-
@result << @reservation
|
|
1459
|
-
end
|
|
1460
|
-
when 'RunInstancesResponse' then @result << @reservation # RunInstances property
|
|
1461
|
-
end
|
|
1462
|
-
end
|
|
1463
|
-
def reset
|
|
1464
|
-
@result = []
|
|
1465
|
-
end
|
|
1466
|
-
end
|
|
1467
|
-
|
|
1468
|
-
class QEc2ConfirmProductInstanceParser < RightAWSParser #:nodoc:
|
|
1469
|
-
def tagend(name)
|
|
1470
|
-
@result = @text if name == 'ownerId'
|
|
1471
|
-
end
|
|
1472
|
-
end
|
|
1473
|
-
|
|
1474
|
-
class QEc2TerminateInstancesParser < RightAWSParser #:nodoc:
|
|
1475
|
-
def tagstart(name, attributes)
|
|
1476
|
-
@instance = {} if name == 'item'
|
|
1477
|
-
end
|
|
1478
|
-
def tagend(name)
|
|
1479
|
-
case name
|
|
1480
|
-
when 'instanceId' then @instance[:aws_instance_id] = @text
|
|
1481
|
-
when 'code'
|
|
1482
|
-
if @xmlpath == 'TerminateInstancesResponse/instancesSet/item/shutdownState'
|
|
1483
|
-
@instance[:aws_shutdown_state_code] = @text.to_i
|
|
1484
|
-
else @instance[:aws_prev_state_code] = @text.to_i end
|
|
1485
|
-
when 'name'
|
|
1486
|
-
if @xmlpath == 'TerminateInstancesResponse/instancesSet/item/shutdownState'
|
|
1487
|
-
@instance[:aws_shutdown_state] = @text
|
|
1488
|
-
else @instance[:aws_prev_state] = @text end
|
|
1489
|
-
when 'item' then @result << @instance
|
|
1490
|
-
end
|
|
1491
|
-
end
|
|
1492
|
-
def reset
|
|
1493
|
-
@result = []
|
|
1494
|
-
end
|
|
1495
|
-
end
|
|
1496
|
-
|
|
1497
|
-
#-----------------------------------------------------------------
|
|
1498
|
-
# PARSERS: Console
|
|
1499
|
-
#-----------------------------------------------------------------
|
|
1500
|
-
|
|
1501
|
-
class QEc2GetConsoleOutputParser < RightAWSParser #:nodoc:
|
|
1502
|
-
def tagend(name)
|
|
1503
|
-
case name
|
|
1504
|
-
when 'instanceId' then @result[:aws_instance_id] = @text
|
|
1505
|
-
when 'timestamp' then @result[:aws_timestamp] = @text
|
|
1506
|
-
@result[:timestamp] = (Time.parse(@text)).utc
|
|
1507
|
-
when 'output' then @result[:aws_output] = Base64.decode64(@text)
|
|
1508
|
-
end
|
|
1509
|
-
end
|
|
1510
|
-
def reset
|
|
1511
|
-
@result = {}
|
|
1512
|
-
end
|
|
1513
|
-
end
|
|
1514
|
-
|
|
1515
|
-
#-----------------------------------------------------------------
|
|
1516
|
-
# Instances: Wondows related part
|
|
1517
|
-
#-----------------------------------------------------------------
|
|
1518
|
-
class QEc2DescribeBundleTasksParser < RightAWSParser #:nodoc:
|
|
1519
|
-
def tagstart(name, attributes)
|
|
1520
|
-
@bundle = {} if name == 'item'
|
|
1521
|
-
end
|
|
1522
|
-
def tagend(name)
|
|
1523
|
-
case name
|
|
1524
|
-
# when 'requestId' then @bundle[:request_id] = @text
|
|
1525
|
-
when 'instanceId' then @bundle[:aws_instance_id] = @text
|
|
1526
|
-
when 'bundleId' then @bundle[:aws_id] = @text
|
|
1527
|
-
when 'bucket' then @bundle[:s3_bucket] = @text
|
|
1528
|
-
when 'prefix' then @bundle[:s3_prefix] = @text
|
|
1529
|
-
when 'startTime' then @bundle[:aws_start_time] = @text
|
|
1530
|
-
when 'updateTime' then @bundle[:aws_update_time] = @text
|
|
1531
|
-
when 'state' then @bundle[:aws_state] = @text
|
|
1532
|
-
when 'progress' then @bundle[:aws_progress] = @text
|
|
1533
|
-
when 'code' then @bundle[:aws_error_code] = @text
|
|
1534
|
-
when 'message' then @bundle[:aws_error_message] = @text
|
|
1535
|
-
when 'item' then @result << @bundle
|
|
1536
|
-
end
|
|
1537
|
-
end
|
|
1538
|
-
def reset
|
|
1539
|
-
@result = []
|
|
1540
|
-
end
|
|
1541
|
-
end
|
|
1542
|
-
|
|
1543
|
-
class QEc2BundleInstanceParser < RightAWSParser #:nodoc:
|
|
1544
|
-
def tagend(name)
|
|
1545
|
-
case name
|
|
1546
|
-
# when 'requestId' then @result[:request_id] = @text
|
|
1547
|
-
when 'instanceId' then @result[:aws_instance_id] = @text
|
|
1548
|
-
when 'bundleId' then @result[:aws_id] = @text
|
|
1549
|
-
when 'bucket' then @result[:s3_bucket] = @text
|
|
1550
|
-
when 'prefix' then @result[:s3_prefix] = @text
|
|
1551
|
-
when 'startTime' then @result[:aws_start_time] = @text
|
|
1552
|
-
when 'updateTime' then @result[:aws_update_time] = @text
|
|
1553
|
-
when 'state' then @result[:aws_state] = @text
|
|
1554
|
-
when 'progress' then @result[:aws_progress] = @text
|
|
1555
|
-
when 'code' then @result[:aws_error_code] = @text
|
|
1556
|
-
when 'message' then @result[:aws_error_message] = @text
|
|
1557
|
-
end
|
|
1558
|
-
end
|
|
1559
|
-
def reset
|
|
1560
|
-
@result = {}
|
|
1561
|
-
end
|
|
1562
|
-
end
|
|
1563
|
-
|
|
1564
|
-
#-----------------------------------------------------------------
|
|
1565
|
-
# PARSERS: Elastic IPs
|
|
1566
|
-
#-----------------------------------------------------------------
|
|
1567
|
-
|
|
1568
|
-
class QEc2AllocateAddressParser < RightAWSParser #:nodoc:
|
|
1569
|
-
def tagend(name)
|
|
1570
|
-
@result = @text if name == 'publicIp'
|
|
1571
|
-
end
|
|
1572
|
-
end
|
|
1573
|
-
|
|
1574
|
-
class QEc2DescribeAddressesParser < RightAWSParser #:nodoc:
|
|
1575
|
-
def tagstart(name, attributes)
|
|
1576
|
-
@address = {} if name == 'item'
|
|
1577
|
-
end
|
|
1578
|
-
def tagend(name)
|
|
1579
|
-
case name
|
|
1580
|
-
when 'instanceId' then @address[:instance_id] = @text.blank? ? nil : @text
|
|
1581
|
-
when 'publicIp' then @address[:public_ip] = @text
|
|
1582
|
-
when 'item' then @result << @address
|
|
1583
|
-
end
|
|
1584
|
-
end
|
|
1585
|
-
def reset
|
|
1586
|
-
@result = []
|
|
1587
|
-
end
|
|
1588
|
-
end
|
|
1589
|
-
|
|
1590
|
-
#-----------------------------------------------------------------
|
|
1591
|
-
# PARSERS: AvailabilityZones
|
|
1592
|
-
#-----------------------------------------------------------------
|
|
1593
|
-
|
|
1594
|
-
class QEc2DescribeAvailabilityZonesParser < RightAWSParser #:nodoc:
|
|
1595
|
-
def tagstart(name, attributes)
|
|
1596
|
-
@zone = {} if name == 'item'
|
|
1597
|
-
end
|
|
1598
|
-
def tagend(name)
|
|
1599
|
-
case name
|
|
1600
|
-
when 'regionName' then @zone[:region_name] = @text
|
|
1601
|
-
when 'zoneName' then @zone[:zone_name] = @text
|
|
1602
|
-
when 'zoneState' then @zone[:zone_state] = @text
|
|
1603
|
-
when 'item' then @result << @zone
|
|
1604
|
-
end
|
|
1605
|
-
end
|
|
1606
|
-
def reset
|
|
1607
|
-
@result = []
|
|
1608
|
-
end
|
|
1609
|
-
end
|
|
1610
|
-
|
|
1611
|
-
#-----------------------------------------------------------------
|
|
1612
|
-
# PARSERS: Regions
|
|
1613
|
-
#-----------------------------------------------------------------
|
|
1614
|
-
|
|
1615
|
-
class QEc2DescribeRegionsParser < RightAWSParser #:nodoc:
|
|
1616
|
-
def tagend(name)
|
|
1617
|
-
@result << @text if name == 'regionName'
|
|
1618
|
-
end
|
|
1619
|
-
def reset
|
|
1620
|
-
@result = []
|
|
1621
|
-
end
|
|
1622
|
-
end
|
|
1623
|
-
|
|
1624
|
-
#-----------------------------------------------------------------
|
|
1625
|
-
# PARSERS: EBS - Volumes
|
|
1626
|
-
#-----------------------------------------------------------------
|
|
1627
|
-
|
|
1628
|
-
class QEc2CreateVolumeParser < RightAWSParser #:nodoc:
|
|
1629
|
-
def tagend(name)
|
|
1630
|
-
case name
|
|
1631
|
-
when 'volumeId' then @result[:aws_id] = @text
|
|
1632
|
-
when 'status' then @result[:aws_status] = @text
|
|
1633
|
-
when 'createTime' then @result[:aws_created_at] = Time.parse(@text)
|
|
1634
|
-
when 'size' then @result[:aws_size] = @text.to_i ###
|
|
1635
|
-
when 'snapshotId' then @result[:snapshot_id] = @text.blank? ? nil : @text ###
|
|
1636
|
-
when 'availabilityZone' then @result[:zone] = @text ###
|
|
1637
|
-
end
|
|
1638
|
-
end
|
|
1639
|
-
def reset
|
|
1640
|
-
@result = {}
|
|
1641
|
-
end
|
|
1642
|
-
end
|
|
1643
|
-
|
|
1644
|
-
class QEc2AttachAndDetachVolumeParser < RightAWSParser #:nodoc:
|
|
1645
|
-
def tagend(name)
|
|
1646
|
-
case name
|
|
1647
|
-
when 'volumeId' then @result[:aws_id] = @text
|
|
1648
|
-
when 'instanceId' then @result[:aws_instance_id] = @text
|
|
1649
|
-
when 'device' then @result[:aws_device] = @text
|
|
1650
|
-
when 'status' then @result[:aws_attachment_status] = @text
|
|
1651
|
-
when 'attachTime' then @result[:aws_attached_at] = Time.parse(@text)
|
|
1652
|
-
end
|
|
1653
|
-
end
|
|
1654
|
-
def reset
|
|
1655
|
-
@result = {}
|
|
1656
|
-
end
|
|
1657
|
-
end
|
|
1658
|
-
|
|
1659
|
-
class QEc2DescribeVolumesParser < RightAWSParser #:nodoc:
|
|
1660
|
-
def tagstart(name, attributes)
|
|
1661
|
-
case name
|
|
1662
|
-
when 'item'
|
|
1663
|
-
case @xmlpath
|
|
1664
|
-
when 'DescribeVolumesResponse/volumeSet' then @volume = {}
|
|
1665
|
-
end
|
|
1666
|
-
end
|
|
1667
|
-
end
|
|
1668
|
-
def tagend(name)
|
|
1669
|
-
case name
|
|
1670
|
-
when 'volumeId'
|
|
1671
|
-
case @xmlpath
|
|
1672
|
-
when 'DescribeVolumesResponse/volumeSet/item' then @volume[:aws_id] = @text
|
|
1673
|
-
end
|
|
1674
|
-
when 'status'
|
|
1675
|
-
case @xmlpath
|
|
1676
|
-
when 'DescribeVolumesResponse/volumeSet/item' then @volume[:aws_status] = @text
|
|
1677
|
-
when 'DescribeVolumesResponse/volumeSet/item/attachmentSet/item' then @volume[:aws_attachment_status] = @text
|
|
1678
|
-
end
|
|
1679
|
-
when 'size' then @volume[:aws_size] = @text.to_i
|
|
1680
|
-
when 'createTime' then @volume[:aws_created_at] = Time.parse(@text)
|
|
1681
|
-
when 'instanceId' then @volume[:aws_instance_id] = @text
|
|
1682
|
-
when 'device' then @volume[:aws_device] = @text
|
|
1683
|
-
when 'attachTime' then @volume[:aws_attached_at] = Time.parse(@text)
|
|
1684
|
-
when 'snapshotId' then @volume[:snapshot_id] = @text.blank? ? nil : @text
|
|
1685
|
-
when 'availabilityZone' then @volume[:zone] = @text
|
|
1686
|
-
when 'item'
|
|
1687
|
-
case @xmlpath
|
|
1688
|
-
when 'DescribeVolumesResponse/volumeSet' then @result << @volume
|
|
1689
|
-
end
|
|
1690
|
-
end
|
|
1691
|
-
end
|
|
1692
|
-
def reset
|
|
1693
|
-
@result = []
|
|
1694
|
-
end
|
|
1695
|
-
end
|
|
1696
|
-
|
|
1697
|
-
#-----------------------------------------------------------------
|
|
1698
|
-
# PARSERS: EBS - Snapshots
|
|
1699
|
-
#-----------------------------------------------------------------
|
|
1700
|
-
|
|
1701
|
-
class QEc2DescribeSnapshotsParser < RightAWSParser #:nodoc:
|
|
1702
|
-
def tagstart(name, attributes)
|
|
1703
|
-
@snapshot = {} if name == 'item'
|
|
1704
|
-
end
|
|
1705
|
-
def tagend(name)
|
|
1706
|
-
case name
|
|
1707
|
-
when 'volumeId' then @snapshot[:aws_volume_id] = @text
|
|
1708
|
-
when 'snapshotId' then @snapshot[:aws_id] = @text
|
|
1709
|
-
when 'status' then @snapshot[:aws_status] = @text
|
|
1710
|
-
when 'startTime' then @snapshot[:aws_started_at] = Time.parse(@text)
|
|
1711
|
-
when 'progress' then @snapshot[:aws_progress] = @text
|
|
1712
|
-
when 'item' then @result << @snapshot
|
|
1713
|
-
end
|
|
1714
|
-
end
|
|
1715
|
-
def reset
|
|
1716
|
-
@result = []
|
|
1717
|
-
end
|
|
1718
|
-
end
|
|
1719
|
-
|
|
1720
|
-
class QEc2CreateSnapshotParser < RightAWSParser #:nodoc:
|
|
1721
|
-
def tagend(name)
|
|
1722
|
-
case name
|
|
1723
|
-
when 'volumeId' then @result[:aws_volume_id] = @text
|
|
1724
|
-
when 'snapshotId' then @result[:aws_id] = @text
|
|
1725
|
-
when 'status' then @result[:aws_status] = @text
|
|
1726
|
-
when 'startTime' then @result[:aws_started_at] = Time.parse(@text)
|
|
1727
|
-
when 'progress' then @result[:aws_progress] = @text
|
|
1728
|
-
end
|
|
1729
|
-
end
|
|
1730
|
-
def reset
|
|
1731
|
-
@result = {}
|
|
1732
|
-
end
|
|
1733
|
-
end
|
|
1734
|
-
|
|
1735
|
-
end
|
|
1736
|
-
|
|
1737
|
-
end
|