mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
9f1eba6662
1455 changed files with 9068 additions and 5998 deletions
40
.travis.yml
40
.travis.yml
|
@ -1,43 +1,27 @@
|
|||
language: ruby
|
||||
|
||||
gemfile:
|
||||
- Gemfile
|
||||
- Gemfile.1.8.7
|
||||
|
||||
rvm:
|
||||
- 1.8.7
|
||||
- 1.9.2
|
||||
- 1.9.3
|
||||
- 2.0.0
|
||||
- 2.1.0
|
||||
- jruby-18mode
|
||||
- jruby-19mode
|
||||
- jruby-head
|
||||
|
||||
script: bundle exec rake travis
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- rvm: 2.1.0
|
||||
gemfile: Gemfile
|
||||
env: COVERAGE=true
|
||||
exclude:
|
||||
- rvm: 1.8.7
|
||||
gemfile: Gemfile
|
||||
- rvm: 1.9.2
|
||||
gemfile: Gemfile.1.8.7
|
||||
- rvm: 1.9.3
|
||||
gemfile: Gemfile.1.8.7
|
||||
- rvm: 2.0.0
|
||||
gemfile: Gemfile.1.8.7
|
||||
- rvm: 2.1.0
|
||||
gemfile: Gemfile.1.8.7
|
||||
- rvm: jruby-18mode
|
||||
gemfile: Gemfile
|
||||
- rvm: 2.0.0
|
||||
gemfile: Gemfile
|
||||
- rvm: 2.1.0
|
||||
gemfile: Gemfile
|
||||
- rvm: 2.1.1
|
||||
gemfile: Gemfile
|
||||
env: COVERAGE=true
|
||||
- rvm: jruby-18mode
|
||||
gemfile: Gemfile.1.8.7
|
||||
- rvm: jruby-19mode
|
||||
gemfile: Gemfile.1.8.7
|
||||
gemfile: Gemfile
|
||||
- rvm: jruby-head
|
||||
gemfile: Gemfile.1.8.7
|
||||
gemfile: Gemfile
|
||||
|
||||
allow_failures:
|
||||
- rvm: jruby-head
|
||||
|
|
|
@ -3,8 +3,10 @@
|
|||
* Adam Bozanich <adam.boz@gmail.com>
|
||||
* Adam Greene <adam@sweetspotdiabetes.com>
|
||||
* Adam Heinz <amh@metricwise.net>
|
||||
* Adam Stegman and Zach Robinson <pair+astegman+zrobinson@pivotallabs.com>
|
||||
* Adam Tanner <adam@adamtanner.org>
|
||||
* Adam Tucker <adam.j.tucker@gmail.com>
|
||||
* Adan Saenz <asaenz@momentumsi.com>
|
||||
* Ahmed Al Hafoudh <alhafoudh@freevision.sk>
|
||||
* Akira Matsuda <ronnie@dio.jp>
|
||||
* Akshay Joshi <me@akshayjoshi.com>
|
||||
|
@ -32,6 +34,7 @@
|
|||
* Alvin Garcia <agarcia@exist.com>
|
||||
* Amitava <amitava.bs@gmail.com>
|
||||
* Amos Benari <abenari@redhat.com>
|
||||
* Amy Sutedja <asutedja@biaprotect.com>
|
||||
* Amy Woodward <aswoodward@gmail.com>
|
||||
* Andre Meij <andre@socialreferral.com>
|
||||
* Andreas Gerauer <helle@fraggaz.de>
|
||||
|
@ -59,6 +62,7 @@
|
|||
* Artem Veremey <artem@veremey.net>
|
||||
* Arthur Gunawan <acgun3@gmail.com>
|
||||
* Arvid Andersson <arvid@winstondesign.se>
|
||||
* Ash Wilson <ash.wilson@rackspace.com>
|
||||
* Athir Nuaimi <anuaimi@devfoundry.com>
|
||||
* Avrohom Katz <iambpentameter@gmail.com>
|
||||
* BK Box <bk@theboxes.org>
|
||||
|
@ -66,6 +70,8 @@
|
|||
* Ben Bleything <ben@bleything.net>
|
||||
* Ben Burkert <ben@benburkert.com>
|
||||
* Ben Butler-Cole <ben@bridesmere.com>
|
||||
* Ben Chadwick <bchadwick@mdsol.com>
|
||||
* Ben Hundley <ben.hundley@gmail.com>
|
||||
* Ben Turley <ben@scan.me>
|
||||
* Benjamin Manns <benmanns@gmail.com>
|
||||
* Benton Roberts <benton@bentonroberts.com>
|
||||
|
@ -80,13 +86,16 @@
|
|||
* Brad Gignac <brad.gignac@rackspace.com>
|
||||
* Brad Heller <brad@cloudability.com>
|
||||
* Bradley Schaefer <bradley.schaefer@gmail.com>
|
||||
* Brandon Dunne <bdunne@redhat.com>
|
||||
* Brendan Fosberry <brendan.fosberry@rackspace.com>
|
||||
* Brian D. Burns <iosctr@gmail.com>
|
||||
* Brian Dorry <bdorry@Brian-Dorrys-MacBook-Pro.local>
|
||||
* Brian Hartsock <brian.hartsock@gmail.com>
|
||||
* Brian Hartsock <brian.hartsock@rackspace.com>
|
||||
* Brian Nelson <bnelson@sugarcrm.com>
|
||||
* Brian Palmer <brianp@instructure.com>
|
||||
* Brice Figureau <brice-puppet@daysofwonder.com>
|
||||
* Bruno Enten <bruno@enten-itc.ch>
|
||||
* Bulat Shakirzyanov <mallluhuct@gmail.com>
|
||||
* Caius Durling <dev@caius.name>
|
||||
* Caleb Tennis <caleb.tennis@gmail.com>
|
||||
|
@ -107,6 +116,7 @@
|
|||
* Chris Chiodo <chris@viximo.com>
|
||||
* Chris Frederick <chris@maginatics.com>
|
||||
* Chris Hasenpflug <github@chris.hasenpflug.us>
|
||||
* Chris Howe <howech@infochimps.com>
|
||||
* Chris Mague <github@mague.com>
|
||||
* Chris Roberts <chrisroberts.code@gmail.com>
|
||||
* Chris Wuest <chris.wuest@rackspace.com>
|
||||
|
@ -137,6 +147,7 @@
|
|||
* Daniel Schweighoefer <daniel@netsteward.net>
|
||||
* Danny Garcia <dannygarcia.me@gmail.com>
|
||||
* Darrin Eden <darrin.eden@gmail.com>
|
||||
* Dave Donahue <dave@12spokes.com>
|
||||
* Dave Myron <therealdave.myron@gmail.com>
|
||||
* Dave Ungerer <daveungerer@gmail.com>
|
||||
* David <davidxz@x0-air.gateway.2wire.net>
|
||||
|
@ -155,6 +166,7 @@
|
|||
* Dominic Cleal <dcleal@redhat.com>
|
||||
* DoubleMalt <christoph@web.crofting.com>
|
||||
* Doug Henderson <dhenderson@maestrodev.com>
|
||||
* Doug Henderson <dougforpres@gmail.com>
|
||||
* Doug McInnes <doug@dougmcinnes.com>
|
||||
* Dr Nic Williams <drnicwilliams@gmail.com>
|
||||
* Dusty Jones <dusty@teamsnap.com>
|
||||
|
@ -172,6 +184,7 @@
|
|||
* Eric Boehs <ericboehs@gmail.com>
|
||||
* Eric Chernuka <ericchernuka@gmail.com>
|
||||
* Eric Hankins <ehankins@rednovalabs.com>
|
||||
* Eric Herot <eric.github@herot.com>
|
||||
* Eric Hodel <drbrain@segment7.net>
|
||||
* Eric Lindvall <eric@5stops.com>
|
||||
* Eric Stonfer <ericstonfer@yahoo.com>
|
||||
|
@ -198,6 +211,7 @@
|
|||
* Gabriel Rosendorf <gabriel.rosendorf@weather.com>
|
||||
* Garima Singh <igarimasingh@gmail.com>
|
||||
* Garret Alfert <alfert@wevelop.de>
|
||||
* Gaurish Sharma <contact@gaurishsharma.com>
|
||||
* Gavin Sandie <beach@vicecity.co.uk>
|
||||
* Gavin Sandie <g.sandie@digital-science.com>
|
||||
* Geoff Pado <geoffpado@gmail.com>
|
||||
|
@ -244,6 +258,7 @@
|
|||
* Jason Hansen & Josh Lane <jhansen@engineyard.com>
|
||||
* Jason Montleon <jmontleo@redhat.com>
|
||||
* Jason Roelofs <jameskilton@gmail.com>
|
||||
* Jason Smith <jsmith@gold-sonata.com>
|
||||
* Jay Faulkner <jay.faulkner@rackspace.com>
|
||||
* Jay Perry <jperry@brightcove.com>
|
||||
* Jeff McCune <jeff@puppetlabs.com>
|
||||
|
@ -261,6 +276,7 @@
|
|||
* Joe Yates <joe.g.yates@gmail.com>
|
||||
* John Dyer <john@krumpt.com>
|
||||
* John E. Vincent <lusis.org+github.com@gmail.com>
|
||||
* John F. Douthat <johndouthat@gmail.com>
|
||||
* John Feminella <johnf@fluxcrux.com>
|
||||
* John Ferlito <johnf@inodes.org>
|
||||
* John Hawthorn <john.hawthorn@gmail.com>
|
||||
|
@ -277,6 +293,7 @@
|
|||
* Jon-Erik Schneiderhan <jschneiderhan@gmail.com>
|
||||
* Jonas Pfenniger <jonas@pfenniger.name>
|
||||
* Jonas Pfenniger <zimbatm@zimbatm.com>
|
||||
* Jonathon Scanes <me@jscanes.com>
|
||||
* Joonas Reynders <joonas.reynders@iki.fi>
|
||||
* Jose Diaz-Gonzalez <josegonzalez@users.noreply.github.com>
|
||||
* Jose Luis Salas <josacar@gmail.com>
|
||||
|
@ -287,14 +304,17 @@
|
|||
* Josh Kearney <josh@jk0.org>
|
||||
* Josh Lane & Ines Sombra <jlane@engineyard.com>
|
||||
* Josh Lane & Jason Hansen <jlane@engineyard.com>
|
||||
* Josh Lane <jlane@engineyard.com>
|
||||
* Josh Lane <lane.joshlane@gmail.com>
|
||||
* Josh Lane <me@joshualane.com>
|
||||
* Josh Pasqualetto <josh.pasqualetto@sonian.net>
|
||||
* Josh Yotty <jyotty@bluebox.net>
|
||||
* Joshua Gross <joshua@surfeasy.com>
|
||||
* Joshua Krall <joshuakrall@pobox.com>
|
||||
* Joshua Napoli <jnapoli@swipely-napoli.home>
|
||||
* Joshua Napoli <jnapoli@swipely-napoli.local>
|
||||
* Joshua Nichols <josh@technicalpickles.com>
|
||||
* Joshua Schairbaum <joshua.schairbaum@gmail.com>
|
||||
* Julian Fischer <fischer@enterprise-rails.de>
|
||||
* Julian Weber <jweber@anynines.com>
|
||||
* Julian Weber <jweber@avarteq.de>
|
||||
|
@ -302,6 +322,7 @@
|
|||
* Juris Galang <jurisgalang@gmail.com>
|
||||
* Justin Barry <justin.d.barry@gmail.com>
|
||||
* Justin Clayton <justin.clayton@gettyimages.com>
|
||||
* KATOH Yasufumi <karma@jazz.email.ne.jp>
|
||||
* Kaloyan Kanev <kaloyan.kanev@cloudsigma.com>
|
||||
* Karan Misra <karan@erodov.com>
|
||||
* Karl Freeman <karlfreeman@gmail.com>
|
||||
|
@ -353,6 +374,7 @@
|
|||
* Mark Phillips <mark.phillips2@bskyb.com>
|
||||
* Mark Rushakoff <mark.rushakoff@gmail.com>
|
||||
* Mark Turner <mark@amerine.net>
|
||||
* Marshall Yount <marshall@yountlabs.com>
|
||||
* Martin Emde <martin.emde@gmail.com>
|
||||
* Martin Englund <martin@englund.nu>
|
||||
* Martin Matuska <martin@matuska.org>
|
||||
|
@ -402,6 +424,7 @@
|
|||
* Nat Welch <nat@natwelch.com>
|
||||
* Nathan Sullivan <nsullivan@kixeye.com>
|
||||
* Nathan Sutton <nate@zencoder.com>
|
||||
* Nathan Williams <nwilliams@bluebox.net>
|
||||
* Neill Turner <neillwturner@gmail.com>
|
||||
* Nelvin Driz <NelvinDriz@live.com>
|
||||
* Nelvin Driz <iam@nelv.in>
|
||||
|
@ -444,7 +467,10 @@
|
|||
* Pedro Perez <pedro@bvox.net>
|
||||
* Peter Bonnell <peter@circuitllc.com>
|
||||
* Peter C. Norton <pn@knewton.com>
|
||||
* Peter Drake <peter.drake@acquia.com>
|
||||
* Peter M. Goldstein <peter.m.goldstein@gmail.com>
|
||||
* Peter Meier <peter.meier@immerda.ch>
|
||||
* Peter Vawser <peter@catapult-elearning.com>
|
||||
* Peter Weldon <peter.weldon@null.net>
|
||||
* Peter Weldon <peter@lautus.net>
|
||||
* Phil Cohen <github@phlippers.net>
|
||||
|
@ -456,6 +482,7 @@
|
|||
* Pierre Carrier <pierre@gcarrier.fr>
|
||||
* Pieter van de Bruggen <pieter@puppetlabs.com>
|
||||
* Pieter van de Bruggen <pvande@gmail.com>
|
||||
* Piotr Kedziora <piotr.kedziora27@gmail.com>
|
||||
* Postmodern <postmodern.mod3@gmail.com>
|
||||
* Prashant Nadarajan <prashant.nadarajan@gmail.com>
|
||||
* Pratik Naik <pratiknaik@gmail.com>
|
||||
|
@ -483,11 +510,16 @@
|
|||
* Sam Kottler <shk@redhat.com>
|
||||
* Sam Merritt <spam@andcheese.org>
|
||||
* Sami Samhuri <sami@samhuri.net>
|
||||
* Sammy Larbi <sam@codeodor.com>
|
||||
* Samuel Merritt <spam@andcheese.org>
|
||||
* Sarah Vessels <sarah.vessels@cirrusmio.com>
|
||||
* Sascha Korth <sascha.korth@zweitag.de>
|
||||
* Scott Gonyea <me@aitrus.org>
|
||||
* Sean Caffery <sean.caffery@c3businesssolutions.com>
|
||||
* Sean Handley <sean.handley@gmail.com>
|
||||
* Sean Handley <sean.handley@melbourne.co.uk>
|
||||
* Sean Handley <sean@Seans-MacBook-Air.local>
|
||||
* Sean Handley <seanhandley@users.noreply.github.com>
|
||||
* Sean Hart <boardnutz@blacklight.net>
|
||||
* Sean Hart <sean.hart@gree.co.jp>
|
||||
* Sean Porter <portertech@gmail.com>
|
||||
|
@ -497,11 +529,13 @@
|
|||
* Shai Rosenfeld & Jacob Burkhart <srosenfeld@engineyard.com>
|
||||
* Shai Rosenfeld <shaiguitar@gmail.com>
|
||||
* Shai Rosenfeld <srosenfeld@engineyard.com>
|
||||
* Shaun Davis <davissp14@gmail.com>
|
||||
* Shawn Catanzarite <me@shawncatz.com>
|
||||
* Shay Bergmann <shayb@panaya.com>
|
||||
* Simon Gate <simon@smgt.me>
|
||||
* Simon Josi <me@yokto.net>
|
||||
* Simon Rozet <simon@rozet.name>
|
||||
* Simone Carletti <weppos@weppos.net>
|
||||
* Sjoerd Andringa <sjoerd.andringa@me.com>
|
||||
* Sneha Somwanshi <sneha.vishwas-somwanshi@digital.cabinet-office.gov.uk>
|
||||
* Spencer Dillard <dillards@amazon.com>
|
||||
|
@ -513,6 +547,7 @@
|
|||
* Stephen von Takach <steve@advancedcontrol.com.au>
|
||||
* Steve Agalloco <steve.agalloco@gmail.com>
|
||||
* Steve Frank <lardcanoe@gmail.com>
|
||||
* Steve Meyfroidt <steve.meyfroidt@gmail.com>
|
||||
* Steve Smith <github@scsworld.co.uk>
|
||||
* Steven Danna <steve@opscode.com>
|
||||
* Stuart Eccles <stuart@madebymany.co.uk>
|
||||
|
@ -591,6 +626,7 @@
|
|||
* bmiller <bmiller@handson.com>
|
||||
* bonkydog <bonkydog@bonkydog.com>
|
||||
* brookemckim <brooke.mckim@gmail.com>
|
||||
* bugagazavr <kirik910@gmail.com>
|
||||
* ccloes <chad_cloes@intuit.com>
|
||||
* coliver <coliver@datapipe.com>
|
||||
* crazed <cr4z3d@gmail.com>
|
||||
|
@ -625,6 +661,7 @@
|
|||
* jschneiderhan <jon-erik.schneiderhan@meyouhealth.com>
|
||||
* kanetann <kanetann@gmail.com>
|
||||
* kbockmanrs <kevin@rightscale.com>
|
||||
* kfafel <keith.fafel@gmail.com>
|
||||
* leehuffman <lhuffman@bluebox.net>
|
||||
* lostboy <paul.crabtree@gmail.com>
|
||||
* marios <marios@marios.(none)>
|
||||
|
@ -634,6 +671,7 @@
|
|||
* mlincoln <mlincoln@thoughtworks.com>
|
||||
* mriley <wdperson@hotmail.com>
|
||||
* msa <marios@marios.(none)>
|
||||
* neillturner <neillwturner@gmail.com>
|
||||
* nightshade427 <nightshade427@gmail.com>
|
||||
* phiggins <pete@peterhiggins.org>
|
||||
* phillc <spyyderz@gmail.com>
|
||||
|
@ -648,6 +686,7 @@
|
|||
* thattommyhall <thattommyhall@gmail.com>
|
||||
* tipt0e <topo-2@charter.net>
|
||||
* torake.fransson <torake.fransson@klarna.com>
|
||||
* unknown <bturner_2@pibuk-lp71.pibenchmark.com>
|
||||
* vkhatri <vir.khatri@gmail.com>
|
||||
* watsonian <watsonian@gmail.com>
|
||||
* wenlock <edward.raigosa@gmail.com>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2009-2013 [CONTRIBUTORS.md](https://github.com/fog/fog/blob/master/CONTRIBUTORS.md)
|
||||
Copyright (c) 2009-2014 [CONTRIBUTORS.md](https://github.com/fog/fog/blob/master/CONTRIBUTORS.md)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
|
|
8
Rakefile
8
Rakefile
|
@ -1,4 +1,5 @@
|
|||
require 'bundler/setup'
|
||||
require 'rake/testtask'
|
||||
require 'date'
|
||||
require 'rubygems'
|
||||
require 'rubygems/package_task'
|
||||
|
@ -47,10 +48,11 @@ end
|
|||
|
||||
GEM_NAME = "#{name}"
|
||||
task :default => :test
|
||||
task :travis => ['test:travis', 'coveralls_push_workaround']
|
||||
task :travis => ['test', 'test:travis', 'coveralls_push_workaround']
|
||||
|
||||
require "tasks/test_task"
|
||||
Fog::Rake::TestTask.new
|
||||
Rake::TestTask.new do |t|
|
||||
t.pattern = File.join("**", "test", "**", "*_test.rb")
|
||||
end
|
||||
|
||||
namespace :test do
|
||||
mock = 'true' || ENV['FOG_MOCK']
|
||||
|
|
312
changelog.txt
312
changelog.txt
|
@ -1,3 +1,315 @@
|
|||
1.20.0 02/07/2014 76846bb4bd2d94ec169757f6f4125dc173359140
|
||||
==========================================================
|
||||
|
||||
Stats! { 'collaborators' => 54, 'downloads' => 4366478, 'forks' => 1074, 'open_issues' => 166, 'watchers' => 2904 }
|
||||
|
||||
MVP! Ash Wilson
|
||||
|
||||
[AWS|EC2]
|
||||
request_spot_instances.rb requires that date parameters be iso8601. thanks Frederick Cheung
|
||||
fix sporadically failing network_acl_tests.rb. thanks Frederick Cheung
|
||||
|
||||
[Brightbox]
|
||||
Sort schema collections. thanks Paul Thornthwaite
|
||||
Add CloudIp#destination_id. thanks Paul Thornthwaite
|
||||
Add support for Cloud SQL service. thanks Paul Thornthwaite
|
||||
Remove old #destroy request. thanks Paul Thornthwaite
|
||||
|
||||
[OpenStack|Network]
|
||||
Add CRUD for SecurityGroup and SecurityGroupRules. thanks Brandon Dunne
|
||||
Display subnets as a child of Network. thanks Brandon Dunne
|
||||
Add security_groups and security_group_rules hashes to the base Mock data. thanks Brandon Dunne
|
||||
Add tests for security_groups and security_group_rules methods. thanks Brandon Dunne
|
||||
|
||||
[aws]
|
||||
align hashrockets, remove whitespace. thanks Eric Stonfer
|
||||
mock block device mapping on run_instances. thanks Josh Lane
|
||||
mock setup block device deleteOnTermination. thanks Josh Lane
|
||||
|
||||
[aws|elb]
|
||||
Mimic create_load_balancer mock. thanks Jose Luis Salas
|
||||
compact possible nil. thanks geemus
|
||||
|
||||
[aws|fog]
|
||||
Don't pass :host to Excon request. thanks Jason Smith
|
||||
|
||||
[aws|iam]
|
||||
Mock delete_server_certificate raises NotFound appropriately. thanks Dan Peterson
|
||||
UploadServerCertificate parser respects CertificateBody and CertificateChain. thanks Dan Peterson
|
||||
|
||||
[core]
|
||||
Adds `ssh_ip_address=` so users can override the ssh address per issue #2584. thanks Kyle Rames
|
||||
updating Server models to use ssh_ip_address rather than public_ip_address. thanks Kyle Rames
|
||||
updating ssh_ip_address to take a block in order to defer address specification to execution time. thanks Kyle Rames
|
||||
|
||||
[digital ocean|compute]
|
||||
pass '1' instead of true for scrub. thanks geemus
|
||||
|
||||
[digitalocean|compute]
|
||||
add created_at timestamp as attribute of server. thanks Dave Donahue
|
||||
additional test coverage and some maintenance. thanks Dave Donahue
|
||||
allow bootstrapping with keys rather than paths. thanks Dave Donahue
|
||||
sync with latest master for new fog_test_server_attributes. thanks Dave Donahue
|
||||
fix merge conflict in fog_test_server_attributes. thanks Dave Donahue
|
||||
|
||||
[google]
|
||||
Handle 500 errors from GCE. thanks Carlos Sanchez
|
||||
Excon::Errors::NotFound never reaches the models. thanks Carlos Sanchez
|
||||
Disk.ready? should not reload the data. thanks Carlos Sanchez
|
||||
Expose Google API client, compute and api_url for easier debugging. thanks Carlos Sanchez
|
||||
|
||||
[google|compute]
|
||||
Readme update. thanks Nat Welch
|
||||
Remove RHEL from Global Project list. thanks Nat Welch
|
||||
|
||||
[hp|compute_v2]
|
||||
added security group support. thanks Kyle Rames
|
||||
|
||||
[libvirt]
|
||||
fix readme gem reference. thanks geemus
|
||||
|
||||
[libvirt|compute]
|
||||
Allow volumes to have backing volumes. thanks Dominic Cleal
|
||||
|
||||
[misc]
|
||||
Use endpoint, port, and path_style options in AWS storage Mock. thanks Adam Stegman and Zach Robinson
|
||||
Added Openstack compute support for add_security_group and remove_security_group. thanks Adan Saenz
|
||||
Fixed method names for Mock objects for add/remove_security_group. thanks Adan Saenz
|
||||
Add support for AWS VPC Network ACLs. thanks Alex Coomans
|
||||
Fix subnet mocking, related to #2510. thanks Alex Coomans
|
||||
Fix DhcpOption#associate. thanks Alex Coomans
|
||||
reject unnecessary methods creation and clean up remove_method. thanks Alexander Lomov
|
||||
make test output more verbose if provider service is unavailable. thanks Alexander Lomov
|
||||
mock tests doesn't have to rely on provider availability. thanks Alexander Lomov
|
||||
fix get_bucket_acl request method in Google Cloud Storage. thanks Alexander Lomov
|
||||
fix put_bucket_acl request for Google Cloud Storage service. thanks Alexander Lomov
|
||||
remove unnecessary duplication in put_bucket_acl request in Google storage. thanks Alexander Lomov
|
||||
add put_object_acl request to Google Cloud Storage service. thanks Alexander Lomov
|
||||
Removed host from SQS connection request arguments. thanks Amy Sutedja
|
||||
Revert "[aws|sqs] remove host/port from request". thanks Amy Sutedja
|
||||
Create a realistic, but fake, service catalog. thanks Ash Wilson
|
||||
The fake service catalog matches format. thanks Ash Wilson
|
||||
DRY up some of that service catalog generation. thanks Ash Wilson
|
||||
Handle failed logins. thanks Ash Wilson
|
||||
Rackspace identity_tests now pass in mocking mode. thanks Ash Wilson
|
||||
Mock the #get_containers Storage call. thanks Ash Wilson
|
||||
Mock the #head_container Storage call. thanks Ash Wilson
|
||||
Mock the #put_container Storage request. thanks Ash Wilson
|
||||
Don't count the :meta entry as an object. thanks Ash Wilson
|
||||
Another pair of tests that already work with mocks. thanks Ash Wilson
|
||||
Some speculative mocking of #get_container. thanks Ash Wilson
|
||||
Refactor to use some utility classes. thanks Ash Wilson
|
||||
Already took care of these three. thanks Ash Wilson
|
||||
Don't call methods on a non-enabled CDN. thanks Ash Wilson
|
||||
Mock delete_object and put_object. thanks Ash Wilson
|
||||
Mock get_object. thanks Ash Wilson
|
||||
Mock HEAD request for objects. thanks Ash Wilson
|
||||
Refactor into Fog::Storage::Rackspace::Common. thanks Ash Wilson
|
||||
Support "chunking" in #put_object. thanks Ash Wilson
|
||||
Implement bulk deletion. thanks Ash Wilson
|
||||
Test failure cases for mocks, too. thanks Ash Wilson
|
||||
Mock #post_set_meta_temp_url_key with a no-op. thanks Ash Wilson
|
||||
Eliminate a ton of redundancy. thanks Ash Wilson
|
||||
Large object tests now pass in mock mode. thanks Ash Wilson
|
||||
Account tests now pass. thanks Ash Wilson
|
||||
directories_tests now pass with mocks. thanks Ash Wilson
|
||||
First half of directory_tests now pass. thanks Ash Wilson
|
||||
The rest of the directory_tests now pass too. thanks Ash Wilson
|
||||
file_tests now all pass under mocking. thanks Ash Wilson
|
||||
files_tests already works with the mocks. Huzzah!. thanks Ash Wilson
|
||||
storage_tests now all pass under mocking, too. thanks Ash Wilson
|
||||
Refactoring: #each_part in MockObject. thanks Ash Wilson
|
||||
Documentation for the storage mock utility classes. thanks Ash Wilson
|
||||
Split a multiline statement with trailing .'s. thanks Ash Wilson
|
||||
Parenthesize method parameters. thanks Ash Wilson
|
||||
Create the mock Queues service. thanks Ash Wilson
|
||||
Enable Queues service tests for mocking. thanks Ash Wilson
|
||||
Enable Cloud Queues request tests. thanks Ash Wilson
|
||||
Mock the create_queue call. thanks Ash Wilson
|
||||
Mock the list_queues call. thanks Ash Wilson
|
||||
Mock the delete_queue call. thanks Ash Wilson
|
||||
Mock the get_queue call. thanks Ash Wilson
|
||||
No need to map! here, we're modifying the hashes. thanks Ash Wilson
|
||||
Mock the queue_stats request. thanks Ash Wilson
|
||||
Handle a corner case in the create_queue mock. thanks Ash Wilson
|
||||
On to the messages_tests. thanks Ash Wilson
|
||||
Mock the create_message call. thanks Ash Wilson
|
||||
get_message and list_messages mocks. thanks Ash Wilson
|
||||
Initial support for mocking delete_message. thanks Ash Wilson
|
||||
Enable claim_tests in mocking mode. thanks Ash Wilson
|
||||
Mock the create_claim request. thanks Ash Wilson
|
||||
create_claim returns a 204 for empty claims. thanks Ash Wilson
|
||||
Mock the get_claim request. thanks Ash Wilson
|
||||
Mock the update_claim request. thanks Ash Wilson
|
||||
Mock the delete_claim request. thanks Ash Wilson
|
||||
Refactor out some common error checking. thanks Ash Wilson
|
||||
Actually compute #claimed and #free. thanks Ash Wilson
|
||||
Similar refactoring for accessing MockClaims. thanks Ash Wilson
|
||||
Some documentation. thanks Ash Wilson
|
||||
Completely untested ageoff code. thanks Ash Wilson
|
||||
Enable model tests for Claims. thanks Ash Wilson
|
||||
Enable the claims_tests in mocking mode. thanks Ash Wilson
|
||||
Enable the message_tests in mocking mode. thanks Ash Wilson
|
||||
Enable the messages_tests in mocking mode. thanks Ash Wilson
|
||||
Enable the queue_tests in mocking mode. thanks Ash Wilson
|
||||
Er, *actually* enable the messages_tests for mocks. thanks Ash Wilson
|
||||
Enable the queues_tests in mocking mode. thanks Ash Wilson
|
||||
Refactor PATH_BASE into a constant. thanks Ash Wilson
|
||||
Er, actually enable queues_tests, too. thanks Ash Wilson
|
||||
Yep, just did that. thanks Ash Wilson
|
||||
Make the delete_message mock consistent. thanks Ash Wilson
|
||||
Only extend the TTL of a MockMessage. thanks Ash Wilson
|
||||
Don't use `&:to_h` style enumerations. thanks Ash Wilson
|
||||
I guess there isn't really a better place. thanks Ash Wilson
|
||||
Include the oldest and newest message in stats. thanks Ash Wilson
|
||||
Missed a chance to use queue.claim!. thanks Ash Wilson
|
||||
Replace the JSON round-trip with #stringify. thanks Ash Wilson
|
||||
A hack to fix the Claim#messages= hack on 1.8.7. thanks Ash Wilson
|
||||
Use case-insensitive header access for Location. thanks Ash Wilson
|
||||
Fix case sensitivity of the Content-type header. thanks Ash Wilson
|
||||
extended IOPS support. thanks Ben Chadwick
|
||||
add Iops to snapshot model. thanks Ben Chadwick
|
||||
adding new HVM-based instance types to AWS in lib/fog/aws/models/compute/flavors.rb. thanks Ben Hundley
|
||||
White space cleanup. thanks Brandon Dunne
|
||||
use current region for subnet checks when creating DB and Cache subnet groups. thanks Brian Nelson
|
||||
add aws storage multipart upload mocks. thanks Brian Palmer
|
||||
enable the relevant tests for multipart mocks. thanks Brian Palmer
|
||||
Write logger output to stderr to conform to convention. thanks Bruno Enten
|
||||
[google][compute] Update to API v1. thanks Carlos Sanchez
|
||||
Update rubygems to fix travis in ruby 1.8. thanks Carlos Sanchez
|
||||
Fix typos that make ruby 1.8 break. thanks Carlos Sanchez
|
||||
Changed openstack server model to build security group objects without generating deprication warning messages. thanks Chris Howe
|
||||
[google][compute] Add support for blank disks (i.e. remove code that required only image or snapshot based disks to be created). thanks Doug Henderson
|
||||
Fixes for AWS Mocking. thanks Doug Henderson
|
||||
Implemented Replace Route. thanks Eric Herot
|
||||
Add replace_route failure tests. thanks Eric Herot
|
||||
Undo date change. thanks Eric Herot
|
||||
Add a test for passing a nonexisiting route table and an exisiting internet gateway to replace_route failures section. thanks Eric Herot
|
||||
Switch to hashed parameters method for handling replace_route arguments. thanks Eric Herot
|
||||
Remove commented code. thanks Eric Herot
|
||||
making destination_cidr_block a required parameter for replace_route. thanks Eric Herot
|
||||
Switch to or-equals for DestinationCidrBlock and instanceOwnerId. thanks Eric Herot
|
||||
Moved #compact to a sesparate line to make it a little more obvious. thanks Evan Light
|
||||
Servers with a password locked root user have a nil @password. thanks Evan Light
|
||||
Issues a deprecation warning if the Rackspace Fog user is relying on region to be provided by default. thanks Evan Light
|
||||
Closes #2469. thanks Evan Light
|
||||
Ported fog rackspace storage docs for OpenStack. thanks Evan Light
|
||||
Oops. Missed a couple of deletions of CDN stuff. thanks Evan Light
|
||||
No, we don't want people hitting up Rackspace specifically about OpenStack docs. It's a joint effort!. thanks Evan Light
|
||||
Adds getting started guide for OpenStack fog. thanks Evan Light
|
||||
Added Ruby-specific code blocks. thanks Evan Light
|
||||
Formating fixes. thanks Evan Light
|
||||
Fixed another formating error. thanks Evan Light
|
||||
Fixes #2586. thanks Evan Light
|
||||
Check if security group is nil, fixes #2507. thanks Gaurish Sharma
|
||||
Update Flavours.rb with new M3 Instance Types. thanks Gaurish Sharma
|
||||
Fixing defect with handling of multiple <item> elements in reponse to describe-reservations. thanks Joe Kinsella
|
||||
Fix typo puplic -> public. thanks John F. Douthat
|
||||
Tests and fixes for Elasticache VPC subnet groups. thanks Jon Topper
|
||||
Rackspace/examples; cloudfiles directory is set to public, therefore file is accessible. thanks Jonathon Scanes
|
||||
DNSimple get_domain also accepts domain name. thanks Jose Luis Salas
|
||||
rm rspec dependency. thanks Joseph Anthony Pasquale Holsten
|
||||
adding Rage4 module file. thanks Joshua Gross
|
||||
all request types support by the rage4 api without mocks or tests. thanks Joshua Gross
|
||||
setting up testing library to start writing tests. thanks Joshua Gross
|
||||
Wrote shindo tests for all supported requests. Resulted in a lot of debuggin of request methods. As well update zone/record models to work in simple cases. thanks Joshua Gross
|
||||
using proper hash syntax for ruby 1.8.7. thanks Joshua Gross
|
||||
when a zone doesn't exist return nil for rage4. thanks Joshua Gross
|
||||
previous change was for records, duplicating nil return for zones now. thanks Joshua Gross
|
||||
changing handling of zone returns after testing that data was different on errors and success. thanks Joshua Gross
|
||||
adding domain alias to record to match zerigo api in rage4. thanks Joshua Gross
|
||||
quick syntax fix for an attribute alias. thanks Joshua Gross
|
||||
making a reader for domain to duplicate name attribute. thanks Joshua Gross
|
||||
adding more attributes to rage4 records. thanks Joshua Gross
|
||||
updating documentation for list records in rage4. thanks Joshua Gross
|
||||
fixing a typo in rage4 record. thanks Joshua Gross
|
||||
minor fixes for record and domain destroying. thanks Joshua Gross
|
||||
fixing rage4 structure as to recent fog chagnes. thanks Joshua Gross
|
||||
fixing service creation in rage4. thanks Joshua Gross
|
||||
Pass params necessary to upload key pairs. thanks Joshua Schairbaum
|
||||
Fix logic bug in data structure creation. thanks Joshua Schairbaum
|
||||
Revert "[hp|compute_v2] added security group support". thanks Kyle Rames
|
||||
normalize requires syntax. thanks Lance Ivy
|
||||
ensure that each service requires its provider. thanks Lance Ivy
|
||||
openstack orchestration no longer depends on cloud formation. thanks Lance Ivy
|
||||
ensure that all services require their provider. thanks Lance Ivy
|
||||
create core for each provider. keep load hook for provider. thanks Lance Ivy
|
||||
extend load time benchmarks for new load targets. thanks Lance Ivy
|
||||
don't require service when registering it. thanks Lance Ivy
|
||||
add benchmark scripts to load each provider and service independently. thanks Lance Ivy
|
||||
support rackspace storage delete_at and delete_after headers. thanks Marshall Yount
|
||||
fixed misspelling. thanks Matheus Mina
|
||||
refactor DataPipeline format conversion, allowing for arrays of refs. thanks Matt Gillooly
|
||||
make disassociate_address mock idempotent, by not requiring instance data. thanks Michael Hale
|
||||
ignore more Ruby version manager files. thanks Mike Fiedler
|
||||
drop dependency on deprecated ruby-hmac gem, fixes #2034. thanks Mike Fiedler
|
||||
Always scrub data when deleting a server from DO. thanks Nat Welch
|
||||
Hardcode some responses to tests. thanks Nat Welch
|
||||
Cleanup some whitespace in the Google dir. thanks Nat Welch
|
||||
fix error - invalid excon request keys: :host. thanks Nathan Williams
|
||||
Make Coveralls opt-in. thanks Paul Thornthwaite
|
||||
Reduce size of Travis matrix. thanks Paul Thornthwaite
|
||||
Revert to original .travis.yml and include one case. thanks Paul Thornthwaite
|
||||
Record and Zone put requests are idempotent. thanks Peter Drake
|
||||
Add Ruby 2.1.0 to the test matrix. thanks Peter M. Goldstein
|
||||
Fixed error when accessing files via atmos where keys contain spaces. thanks Peter Vawser
|
||||
There is a bug here or maybe i'm using the gem wrong... Edit you should merge the ACLs after merging the meta_has if not The new permission will be overwritten by the old one. If Before you had a directory with : X-Container-Read: .r:*,.rlistings. thanks Piotr Kedziora
|
||||
Add support for Rackspace's Extract Archive API call See http://docs.rackspace.com/files/api/v1/cf-devguide/content/Extract_Archive-d1e2338.html for documentation on the API call. thanks Sammy Larbi
|
||||
Set the Content-Type of extract_archive requests to '' The documentation for extract archive (http://docs.rackspace.com/files/api/v1/cf-devguide/content/Extract_Archive-d1e2338.html) says if a Content-Type is sent, every object in the archive will have its Content-Type set to that value. However, if a blank Content-Type is sent, CloudFiles will determine it based on each individual file. Since we don't want every file to be interpreted as an archive (which would happen if we let Fog determine the Content-Type), we set it explicitly to a blank string. thanks Sammy Larbi
|
||||
Use @ in comment for YARD docs. thanks Sammy Larbi
|
||||
Update Nokogiri version. thanks Sascha Korth
|
||||
Fix version. thanks Sascha Korth
|
||||
Undo last nokogiri version setting. thanks Sascha Korth
|
||||
Remove duplicates. thanks Sean Handley
|
||||
Formatting flavor data and updating documentation to include i2 instances. thanks Shaun Davis
|
||||
Renaming ebs_optimized -> ebs_optimized_available. thanks Shaun Davis
|
||||
Removing unnecessary comments. thanks Shaun Davis
|
||||
Display number of instance store volumes per instance flavor. thanks Shaun Davis
|
||||
Switch to DNSimple versioned API. thanks Simone Carletti
|
||||
Cleanup documentation and resource representations. thanks Simone Carletti
|
||||
Remove :host key in SQS request method to eliminate excon error. thanks Steve Meyfroidt
|
||||
get non capitalized content-type. thanks bugagazavr
|
||||
fix MVP exclude list. thanks geemus
|
||||
add CONTRIBUTORS, assign copyright. thanks geemus
|
||||
fix link in license. thanks geemus
|
||||
update contributors/license files. thanks geemus
|
||||
Update network parser to add private ips to array Previously the network parser would overwrite the private ip addresses if there were more than one. These are now added to an array. thanks joe
|
||||
Update documentation of return values. thanks joe
|
||||
[google][compute] Add rhel-cloud to project search list. thanks kbockmanrs
|
||||
Implement Rackspace Monitoring Agent Host information. thanks kfafel
|
||||
minor fix for get_filesystems_info. thanks kfafel
|
||||
fix mock output hash. thanks kfafel
|
||||
tighten up agent info mocks. thanks kfafel
|
||||
Implement agent_info tests; better mocks. thanks kfafel
|
||||
Cleaned up agent_tests. thanks kfafel
|
||||
add missing get_agent and list_agents. thanks kfafel
|
||||
addresses and settags. thanks neillturner
|
||||
delete snapshots and address requests for google. thanks unknown
|
||||
fix a couple of bugs. thanks unknown
|
||||
add attach and detach disk. thanks unknown
|
||||
|
||||
[openstack]
|
||||
image.update_image_members expects are incorrect #2627. thanks radekg
|
||||
Fix for OpenStack flavor id calculation. thanks radekg
|
||||
|
||||
[openstack|compute]
|
||||
Allow to use Symbol when specifying the hash of NICs. thanks KATOH Yasufumi
|
||||
Adding docs for OpenStack Compute. thanks Kyle Rames
|
||||
|
||||
[rackspace|compute]
|
||||
updating Rackspace compute docs. thanks Kyle Rames
|
||||
|
||||
[rackspace|compute_v2]
|
||||
updates key_pair model to pass additional attributes onto compute service. (You can now pass public and private keys via the model). thanks Kyle Rames
|
||||
added key_name and modified key_pair= to take KeyPair objects as well as strings in order to be more compatible with other fog providers. thanks Kyle Rames
|
||||
|
||||
[storm_on_demand]
|
||||
don't pass host to request. thanks Josh Blancett
|
||||
|
||||
[vcloud_director]
|
||||
fix typo as per #2621. thanks Mike Pountney
|
||||
|
||||
|
||||
1.19.0 12/19/2013 15180fd7c0993f7fe6cfdc861a4db7ada14825ad
|
||||
==========================================================
|
||||
|
||||
|
|
31
fog.gemspec
31
fog.gemspec
|
@ -6,8 +6,8 @@ Gem::Specification.new do |s|
|
|||
## If your rubyforge_project name is different, then edit it and comment out
|
||||
## the sub! line in the Rakefile
|
||||
s.name = 'fog'
|
||||
s.version = '1.19.0'
|
||||
s.date = '2013-12-19'
|
||||
s.version = '1.20.0'
|
||||
s.date = '2014-03-14'
|
||||
s.rubyforge_project = 'fog'
|
||||
|
||||
## Make sure your summary is short. The description may be as long
|
||||
|
@ -41,30 +41,31 @@ Gem::Specification.new do |s|
|
|||
|
||||
## List your runtime dependencies here. Runtime dependencies are those
|
||||
## that are needed for an end user to actually USE your code.
|
||||
s.add_dependency('builder')
|
||||
s.add_dependency('excon', '~>0.31.0')
|
||||
s.add_dependency('formatador', '~>0.2.0')
|
||||
s.add_dependency('multi_json', '~>1.0')
|
||||
s.add_dependency('mime-types')
|
||||
s.add_dependency('net-scp', '~>1.1')
|
||||
s.add_dependency('net-ssh', '>=2.1.3')
|
||||
s.add_dependency('nokogiri', '>=1.5.11')
|
||||
s.add_dependency("fog-core", "~> 1.21", ">= 1.21.1")
|
||||
s.add_dependency("fog-json")
|
||||
|
||||
s.add_dependency('nokogiri', '~> 1.5', '>= 1.5.11')
|
||||
|
||||
# Modular providers
|
||||
s.add_dependency("fog-brightbox")
|
||||
|
||||
## List your development dependencies here. Development dependencies are
|
||||
## those that are only needed during development
|
||||
s.add_development_dependency('minitest')
|
||||
s.add_development_dependency('jekyll') unless RUBY_PLATFORM == 'java'
|
||||
s.add_development_dependency('rake')
|
||||
s.add_development_dependency('rbvmomi')
|
||||
s.add_development_dependency('yard')
|
||||
s.add_development_dependency('thor')
|
||||
s.add_development_dependency('rbovirt', '>=0.0.11')
|
||||
s.add_development_dependency('shindo', '~>0.3.4')
|
||||
s.add_development_dependency('rbovirt', '>= 0.0.24')
|
||||
s.add_development_dependency('shindo', '~> 0.3.4')
|
||||
s.add_development_dependency('fission')
|
||||
s.add_development_dependency('pry')
|
||||
s.add_development_dependency('google-api-client', '~>0.6.2')
|
||||
s.add_development_dependency('google-api-client', '~> 0.6', '>= 0.6.2')
|
||||
s.add_development_dependency('unf')
|
||||
if ENV["FOG_USE_LIBVIRT"] && RUBY_PLATFORM != 'java'
|
||||
s.add_development_dependency('ruby-libvirt','~>0.4.0')
|
||||
|
||||
if ENV["FOG_USE_LIBVIRT"]
|
||||
s.add_development_dependency('ruby-libvirt','~> 0.5.0')
|
||||
end
|
||||
|
||||
s.files = `git ls-files`.split("\n")
|
||||
|
|
15
lib/fog.rb
15
lib/fog.rb
|
@ -3,6 +3,19 @@
|
|||
__LIB_DIR__ = File.expand_path(File.dirname(__FILE__))
|
||||
$LOAD_PATH.unshift __LIB_DIR__ unless $LOAD_PATH.include?(__LIB_DIR__)
|
||||
|
||||
# Use core
|
||||
require 'fog/core'
|
||||
|
||||
# Previously treated as "core"
|
||||
# data exchange specific (to be extracted and used on a per provider basis)
|
||||
require 'fog/xml'
|
||||
require 'fog/json'
|
||||
require 'fog/core/parser'
|
||||
|
||||
# deprecation wrappers (XML wrapped version)
|
||||
require 'fog/core/deprecated/connection'
|
||||
require 'fog/core/deprecated_connection_accessors'
|
||||
|
||||
# any one of these can be required separately.
|
||||
# they all depend on fog/core for shared functionality.
|
||||
require 'fog/atmos'
|
||||
|
@ -14,6 +27,7 @@ require 'fog/clodo'
|
|||
require 'fog/digitalocean'
|
||||
require 'fog/dnsimple'
|
||||
require 'fog/dnsmadeeasy'
|
||||
require 'fog/fogdocker'
|
||||
require 'fog/dreamhost'
|
||||
require 'fog/dynect'
|
||||
require 'fog/ecloud'
|
||||
|
@ -34,6 +48,7 @@ require 'fog/rage4'
|
|||
require 'fog/riakcs'
|
||||
require 'fog/openstack'
|
||||
require 'fog/ovirt'
|
||||
require 'fog/sakuracloud'
|
||||
require 'fog/serverlove'
|
||||
require 'fog/storm_on_demand'
|
||||
require 'fog/terremark'
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
module Fog
|
||||
module Account
|
||||
|
||||
def self.[](provider)
|
||||
self.new(:provider => provider)
|
||||
end
|
||||
|
||||
def self.new(attributes)
|
||||
attributes = attributes.dup
|
||||
provider = attributes.delete(:provider).to_s.downcase.to_sym
|
||||
|
||||
if provider == :stormondemand
|
||||
require 'fog/storm_on_demand/account'
|
||||
Fog::Account::StormOnDemand.new(attributes)
|
||||
else
|
||||
raise ArgumentError.new("#{provider} has no account service")
|
||||
end
|
||||
end
|
||||
|
||||
def self.providers
|
||||
Fog.services[:account]
|
||||
end
|
||||
|
||||
end
|
||||
end
|
|
@ -1,5 +1,4 @@
|
|||
require 'fog/atmos/core'
|
||||
require 'fog/storage'
|
||||
|
||||
module Fog
|
||||
module Storage
|
||||
|
@ -84,7 +83,7 @@ module Fog
|
|||
@hmac = Fog::HMAC.new('sha1', @storage_secret_decoded)
|
||||
@persistent = options.fetch(:persistent, false)
|
||||
|
||||
@connection = Fog::Connection.new("#{@prefix}://#{@storage_host}:#{@storage_port}",
|
||||
@connection = Fog::XML::Connection.new("#{@prefix}://#{@storage_host}:#{@storage_port}",
|
||||
@persistent, @connection_options)
|
||||
end
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ module Fog
|
|||
@port = options[:port] || 443
|
||||
@persistent = options[:persistent] || false
|
||||
@scheme = options[:scheme] || 'https'
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
end
|
||||
|
||||
def reload
|
||||
|
|
|
@ -78,7 +78,7 @@ module Fog
|
|||
@persistent = options[:persistent] || false
|
||||
@port = options[:port] || 443
|
||||
@scheme = options[:scheme] || 'https'
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
end
|
||||
|
||||
def reload
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
require 'fog/aws/core'
|
||||
require 'fog/cdn'
|
||||
|
||||
module Fog
|
||||
module CDN
|
||||
|
@ -155,7 +154,7 @@ EOF
|
|||
@port = options[:port] || 443
|
||||
@scheme = options[:scheme] || 'https'
|
||||
@version = options[:version] || '2010-11-01'
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
end
|
||||
|
||||
def reload
|
||||
|
|
|
@ -60,7 +60,7 @@ module Fog
|
|||
@persistent = options[:persistent] || false
|
||||
@port = options[:port] || 443
|
||||
@scheme = options[:scheme] || 'https'
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
end
|
||||
|
||||
def reload
|
||||
|
|
|
@ -104,7 +104,7 @@ module Fog
|
|||
@persistent = options[:persistent] || false
|
||||
@port = options[:port] || 443
|
||||
@scheme = options[:scheme] || 'https'
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
end
|
||||
|
||||
def reload
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
require 'fog/aws/core'
|
||||
require 'fog/compute'
|
||||
|
||||
module Fog
|
||||
module Compute
|
||||
|
@ -140,6 +139,7 @@ module Fog
|
|||
request :release_address
|
||||
request :replace_network_acl_association
|
||||
request :replace_network_acl_entry
|
||||
request :replace_route
|
||||
request :register_image
|
||||
request :request_spot_instances
|
||||
request :reset_network_interface_attribute
|
||||
|
@ -163,6 +163,7 @@ module Fog
|
|||
|
||||
class Mock
|
||||
include Fog::AWS::CredentialFetcher::ConnectionMethods
|
||||
include Fog::AWS::RegionMethods
|
||||
|
||||
def self.data
|
||||
@data ||= Hash.new do |hash, region|
|
||||
|
@ -278,10 +279,7 @@ module Fog
|
|||
@aws_credentials_expire_at = Time::now + 20
|
||||
setup_credentials(options)
|
||||
@region = options[:region] || 'us-east-1'
|
||||
|
||||
unless ['ap-northeast-1', 'ap-southeast-1', 'ap-southeast-2', 'eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2', 'sa-east-1'].include?(@region)
|
||||
raise ArgumentError, "Unknown region: #{@region.inspect}"
|
||||
end
|
||||
validate_aws_region @region
|
||||
end
|
||||
|
||||
def region_data
|
||||
|
@ -351,6 +349,7 @@ module Fog
|
|||
|
||||
class Real
|
||||
include Fog::AWS::CredentialFetcher::ConnectionMethods
|
||||
include Fog::AWS::RegionMethods
|
||||
# Initialize connection to EC2
|
||||
#
|
||||
# ==== Notes
|
||||
|
@ -385,6 +384,8 @@ module Fog
|
|||
@instrumentor_name = options[:instrumentor_name] || 'fog.aws.compute'
|
||||
@version = options[:version] || '2013-10-01'
|
||||
|
||||
validate_aws_region @region
|
||||
|
||||
if @endpoint = options[:endpoint]
|
||||
endpoint = URI.parse(@endpoint)
|
||||
@host = endpoint.host
|
||||
|
@ -398,7 +399,7 @@ module Fog
|
|||
@port = options[:port] || 443
|
||||
@scheme = options[:scheme] || 'https'
|
||||
end
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
end
|
||||
|
||||
def reload
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
require 'fog/core'
|
||||
require 'fog/xml'
|
||||
require 'fog/json'
|
||||
require 'fog/aws/credential_fetcher'
|
||||
require 'fog/aws/region_methods'
|
||||
require 'fog/aws/signaturev4'
|
||||
|
||||
module Fog
|
||||
|
|
|
@ -62,7 +62,7 @@ module Fog
|
|||
@persistent = options[:persistent] || false
|
||||
@port = options[:port] || 443
|
||||
@scheme = options[:scheme] || 'https'
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
|
||||
setup_credentials(options)
|
||||
end
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
require 'fog/aws/core'
|
||||
require 'fog/dns'
|
||||
|
||||
module Fog
|
||||
module DNS
|
||||
|
@ -100,7 +99,7 @@ module Fog
|
|||
@scheme = options[:scheme] || 'https'
|
||||
@version = options[:version] || '2012-02-29'
|
||||
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
end
|
||||
|
||||
def reload
|
||||
|
|
|
@ -88,7 +88,7 @@ module Fog
|
|||
@port = options[:port] || '443'
|
||||
@scheme = options[:scheme] || 'https'
|
||||
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -62,7 +62,7 @@ module Fog
|
|||
@path = options[:path] || '/'
|
||||
@port = options[:port] || 443
|
||||
@scheme = options[:scheme] || 'https'
|
||||
@connection = Fog::Connection.new(
|
||||
@connection = Fog::XML::Connection.new(
|
||||
"#{@scheme}://#{@host}:#{@port}#{@path}", options[:persistent]
|
||||
)
|
||||
end
|
||||
|
@ -139,7 +139,16 @@ module Fog
|
|||
:clusters => {}, # cache cluster data, indexed by cluster ID
|
||||
:security_groups => {}, # security groups
|
||||
:subnet_groups => {},
|
||||
}
|
||||
:parameter_groups => {"default.memcached1.4" => { "CacheParameterGroupFamily"=>"memcached1.4",
|
||||
"Description"=>"Default parameter group for memcached1.4",
|
||||
"CacheParameterGroupName"=>"default.memcached1.4"
|
||||
},
|
||||
"default.redis2.6" => {"CacheParameterGroupFamily"=>"redis2.6",
|
||||
"Description"=>"Default parameter group for redis2.6",
|
||||
"CacheParameterGroupName"=>"default.redis2.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -139,7 +139,7 @@ module Fog
|
|||
@persistent = options[:persistent] || false
|
||||
@port = options[:port] || 443
|
||||
@scheme = options[:scheme] || 'https'
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
end
|
||||
|
||||
def reload
|
||||
|
|
|
@ -73,7 +73,7 @@ module Fog
|
|||
@persistent = options[:persistent] || false
|
||||
@port = options[:port] || 443
|
||||
@scheme = options[:scheme] || 'https'
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
@region = options[:region]
|
||||
end
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ module Fog
|
|||
@port = options[:port] || 443
|
||||
@scheme = options[:scheme] || 'https'
|
||||
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ module Fog
|
|||
request :delete_signing_certificate
|
||||
request :delete_user
|
||||
request :delete_user_policy
|
||||
request :get_account_summary
|
||||
request :get_group
|
||||
request :get_group_policy
|
||||
request :get_instance_profile
|
||||
|
@ -169,7 +170,7 @@ module Fog
|
|||
@persistent = options[:persistent] || false
|
||||
@port = options[:port] || 443
|
||||
@scheme = options[:scheme] || 'https'
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
end
|
||||
|
||||
def reload
|
||||
|
|
|
@ -49,7 +49,7 @@ module Fog
|
|||
# >> g = AWS.network_interfaces.new(:subnet_id => "subnet-someId", options)
|
||||
# >> g.save
|
||||
#
|
||||
# options is an optional hash which may contain 'PrivateIpAddress', 'Description', 'groupSet'
|
||||
# options is an optional hash which may contain 'PrivateIpAddress', 'Description', 'GroupSet'
|
||||
#
|
||||
# == Returns:
|
||||
#
|
||||
|
@ -58,7 +58,13 @@ module Fog
|
|||
|
||||
def save
|
||||
requires :subnet_id
|
||||
data = service.create_network_interface(subnet_id).body['networkInterface']
|
||||
options = {
|
||||
'PrivateIpAddress' => private_ip_address,
|
||||
'Description' => description,
|
||||
'GroupSet' => group_set,
|
||||
}
|
||||
options.delete_if {|key, value| value.nil?}
|
||||
data = service.create_network_interface(subnet_id, options).body['networkInterface']
|
||||
new_attributes = data.reject {|key,value| key == 'requestId'}
|
||||
merge_attributes(new_attributes)
|
||||
true
|
||||
|
|
|
@ -58,7 +58,7 @@ module Fog
|
|||
|
||||
|
||||
def initialize(attributes={})
|
||||
self.groups ||= ["default"] unless (attributes[:subnet_id] || attributes[:security_group_ids])
|
||||
self.groups ||= ["default"] unless (attributes[:subnet_id] || attributes[:security_group_ids] || attributes[:network_interfaces])
|
||||
self.flavor_id ||= 't1.micro'
|
||||
|
||||
# Old 'connection' is renamed as service and should be used instead
|
||||
|
@ -146,6 +146,7 @@ module Fog
|
|||
|
||||
options = {
|
||||
'BlockDeviceMapping' => block_device_mapping,
|
||||
'NetworkInterfaces' => network_interfaces,
|
||||
'ClientToken' => client_token,
|
||||
'EbsOptimized' => ebs_optimized,
|
||||
'IamInstanceProfile.Arn' => @iam_instance_profile_arn,
|
||||
|
|
|
@ -25,6 +25,7 @@ module Fog
|
|||
# ami_launch_index=nil,
|
||||
# availability_zone=nil,
|
||||
# block_device_mapping=nil,
|
||||
# network_interfaces=nil,
|
||||
# client_token=nil,
|
||||
# dns_name=nil,
|
||||
# groups=["default"],
|
||||
|
|
|
@ -37,7 +37,9 @@ module Fog
|
|||
end
|
||||
|
||||
def save
|
||||
self.ttl ||= 3600
|
||||
unless self.alias_target
|
||||
self.ttl ||= 3600
|
||||
end
|
||||
options = attributes_to_options('CREATE')
|
||||
data = service.change_resource_record_sets(zone.id, [options]).body
|
||||
merge_attributes(data)
|
||||
|
@ -84,9 +86,9 @@ module Fog
|
|||
end
|
||||
|
||||
def attributes_to_options(action)
|
||||
requires :name, :ttl, :type, :zone
|
||||
requires :name, :type, :zone
|
||||
requires_one :value, :alias_target
|
||||
{
|
||||
options = {
|
||||
:action => action,
|
||||
:name => name,
|
||||
:resource_records => [*value],
|
||||
|
@ -97,6 +99,11 @@ module Fog
|
|||
:set_identifier => set_identifier,
|
||||
:region => region
|
||||
}
|
||||
unless self.alias_target
|
||||
requires :ttl
|
||||
options[:ttl] = ttl
|
||||
end
|
||||
options
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -32,6 +32,8 @@ module Fog
|
|||
:aliases => 'CacheSubnetGroupName'
|
||||
attribute :vpc_security_groups,
|
||||
:aliases => 'VpcSecurityGroups', :type => :array
|
||||
attribute :s3_snapshot_location,
|
||||
:aliases => 'SnapshotArns', :type => :array
|
||||
|
||||
attr_accessor :parameter_group_name
|
||||
|
||||
|
@ -63,6 +65,7 @@ module Fog
|
|||
:port => port,
|
||||
:preferred_availablility_zone => zone,
|
||||
:preferred_maintenance_window => maintenance_window,
|
||||
:s3_snapshot_location => s3_snapshot_location,
|
||||
:parameter_group_name => parameter_group_name || parameter_group['CacheParameterGroupName'],
|
||||
:cache_subnet_group_name => cache_subnet_group_name,
|
||||
:vpc_security_groups => vpc_security_groups,
|
||||
|
|
|
@ -7,9 +7,10 @@ module Fog
|
|||
|
||||
def reset
|
||||
@block_device_mapping = {}
|
||||
@network_interfaces = {}
|
||||
@context = []
|
||||
@contexts = ['blockDeviceMapping', 'groupSet', 'placement', 'productCodes']
|
||||
@instance = { 'blockDeviceMapping' => [], 'instanceState' => {}, 'monitoring' => {}, 'placement' => {}, 'productCodes' => [] }
|
||||
@contexts = ['networkInterfaces', 'blockDeviceMapping', 'groupSet', 'placement', 'productCodes']
|
||||
@instance = { 'networkInterfaces' => [], 'blockDeviceMapping' => [], 'instanceState' => {}, 'monitoring' => {}, 'placement' => {}, 'productCodes' => [] }
|
||||
@response = { 'groupSet' => [], 'instancesSet' => [] }
|
||||
end
|
||||
|
||||
|
@ -40,8 +41,11 @@ module Fog
|
|||
@instance['instanceState'][name] = value.to_i
|
||||
when 'deleteOnTermination'
|
||||
@block_device_mapping[name] = (value == 'true')
|
||||
@network_interfaces[name] = (value == 'true')
|
||||
when 'deviceName', 'status', 'volumeId'
|
||||
@block_device_mapping[name] = value
|
||||
when 'networkInterfaceId'
|
||||
@network_interfaces[name] = value
|
||||
when 'groupId'
|
||||
@response['groupSet'] << value
|
||||
when 'groupName'
|
||||
|
@ -56,9 +60,12 @@ module Fog
|
|||
when 'blockDeviceMapping'
|
||||
@instance['blockDeviceMapping'] << @block_device_mapping
|
||||
@block_device_mapping = {}
|
||||
when 'networkInterfaces'
|
||||
@instance['networkInterfaces'] << @network_interfaces
|
||||
@network_interfaces = {}
|
||||
when nil
|
||||
@response['instancesSet'] << @instance
|
||||
@instance = { 'blockDeviceMapping' => [], 'instanceState' => {}, 'monitoring' => {}, 'placement' => {}, 'productCodes' => [] }
|
||||
@instance = { 'networkInterfaces' => [], 'blockDeviceMapping' => [], 'instanceState' => {}, 'monitoring' => {}, 'placement' => {}, 'productCodes' => [] }
|
||||
end
|
||||
when 'launchTime'
|
||||
@instance[name] = Time.parse(value)
|
||||
|
|
|
@ -8,10 +8,10 @@ module Fog
|
|||
def reset
|
||||
@response = {}
|
||||
end
|
||||
|
||||
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'Id'
|
||||
when 'Id'
|
||||
@response[name] = value.sub('/change/', '')
|
||||
when 'Status', 'SubmittedAt'
|
||||
@response[name] = value
|
||||
|
@ -23,4 +23,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
def reset
|
||||
@response = {}
|
||||
end
|
||||
|
||||
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'Id'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Fog
|
||||
module Parsers
|
||||
module AWS
|
||||
module Elasticache
|
||||
module Elasticache
|
||||
|
||||
class DescribeReservedCacheNodes < Fog::Parsers::Base
|
||||
|
||||
|
@ -34,4 +34,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ module Fog
|
|||
|
||||
def start_element(name, attrs = [])
|
||||
super
|
||||
case name
|
||||
case name
|
||||
when 'CrossZoneLoadBalancing'
|
||||
@cross_zone_load_balancing = {}
|
||||
end
|
||||
|
|
|
@ -8,12 +8,12 @@ module Fog
|
|||
def reset
|
||||
@context = []
|
||||
@contexts = ['BootstrapActions', 'ExecutionStatusDetail', 'Instances', 'Steps', 'InstanceGroups', 'Args']
|
||||
|
||||
|
||||
@response = { 'JobFlows' => [] }
|
||||
@bootstrap_actions = {'ScriptBootstrapActionConfig' => {'Args' => []}}
|
||||
@instance = { 'InstanceGroups' => [], 'Placement' => {}}
|
||||
@step = {
|
||||
'ExecutionStatusDetail' => {},
|
||||
'ExecutionStatusDetail' => {},
|
||||
'StepConfig' => {
|
||||
'HadoopJarStepConfig' => {
|
||||
'Args' => [],
|
||||
|
@ -45,12 +45,12 @@ module Fog
|
|||
@bootstrap_actions = {'ScriptBootstrapActionConfig' => {'Args' => []}}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if @context.last == 'ExecutionStatusDetail'
|
||||
case name
|
||||
when 'CreationDateTime', 'EndDateTime', 'LastStateChangeReason',
|
||||
when 'CreationDateTime', 'EndDateTime', 'LastStateChangeReason',
|
||||
'ReadyDateTime', 'StartDateTime', 'State'
|
||||
@execution_status_detail[name] = value
|
||||
@execution_status_detail[name] = value
|
||||
when 'ExecutionStatusDetail'
|
||||
if @context.include?('Steps')
|
||||
@step['ExecutionStatusDetail'] = @execution_status_detail
|
||||
|
@ -60,7 +60,7 @@ module Fog
|
|||
@execution_status_detail = {}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if @context.last == 'Instances'
|
||||
case name
|
||||
when 'AvailabilityZone'
|
||||
|
@ -71,13 +71,13 @@ module Fog
|
|||
@instance[name] = value
|
||||
when 'member'
|
||||
@instance['InstanceGroups'] << @instance_group_detail
|
||||
@instance_group_detail = {}
|
||||
@instance_group_detail = {}
|
||||
when 'Instances'
|
||||
@flow['Instances'] = @instance
|
||||
@instance = { 'InstanceGroups' => [], 'Placement' => {}}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if @context.last == 'InstanceGroups'
|
||||
case name
|
||||
when 'member'
|
||||
|
@ -87,7 +87,7 @@ module Fog
|
|||
@instance_group_detail[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if @context.last == 'Args'
|
||||
if name == 'member'
|
||||
if @context.include?('Steps')
|
||||
|
@ -97,7 +97,7 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if @context.last == 'Steps'
|
||||
case name
|
||||
when 'ActionOnFailure', 'Name'
|
||||
|
@ -107,7 +107,7 @@ module Fog
|
|||
when 'member'
|
||||
@flow['Steps'] << @step
|
||||
@step = {
|
||||
'ExecutionStatusDetail' => {},
|
||||
'ExecutionStatusDetail' => {},
|
||||
'StepConfig' => {
|
||||
'HadoopJarStepConfig' => {
|
||||
'Args' => [],
|
||||
|
@ -117,7 +117,7 @@ module Fog
|
|||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if @context.empty?
|
||||
case name
|
||||
when 'AmiVersion', 'JobFlowId', 'LogUri', 'Name'
|
||||
|
@ -127,7 +127,7 @@ module Fog
|
|||
@flow = {'Instances' => [], 'ExecutionStatusDetail' => {}, 'BootstrapActions' => [], 'Steps' => []}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if @context.last == name
|
||||
@context.pop
|
||||
end
|
||||
|
|
|
@ -29,7 +29,7 @@ module Fog
|
|||
@role = {}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
|
@ -76,4 +76,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -23,4 +23,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
46
lib/fog/aws/parsers/iam/get_account_summary.rb
Normal file
46
lib/fog/aws/parsers/iam/get_account_summary.rb
Normal file
|
@ -0,0 +1,46 @@
|
|||
module Fog
|
||||
module Parsers
|
||||
module AWS
|
||||
module IAM
|
||||
|
||||
class GetAccountSummary < Fog::Parsers::Base
|
||||
|
||||
def reset
|
||||
super
|
||||
@stack = []
|
||||
@response = {'Summary' => {}}
|
||||
end
|
||||
|
||||
def start_element(name, attrs = [])
|
||||
super
|
||||
case name
|
||||
when 'SummaryMap'
|
||||
@stack << name
|
||||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'SummaryMap'
|
||||
@stack.pop
|
||||
when 'key'
|
||||
if @stack.last == 'SummaryMap'
|
||||
@key = value
|
||||
end
|
||||
when 'value'
|
||||
if @stack.last == 'SummaryMap'
|
||||
@response['Summary'][@key] = value.strip.to_i
|
||||
end
|
||||
when 'RequestId'
|
||||
if @stack.empty?
|
||||
@response['RequestId'] = value.strip
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -38,11 +38,11 @@ module Fog
|
|||
when 'UserId', 'UserName'
|
||||
@user[name] = value
|
||||
when 'member'
|
||||
@response['Users'] << @user
|
||||
@response['Users'] << @user
|
||||
@user = {}
|
||||
when 'IsTruncated'
|
||||
response[name] = (value == 'true')
|
||||
when 'Marker', 'RequestId'
|
||||
when 'Marker', 'RequestId'
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,7 +18,7 @@ module Fog
|
|||
end
|
||||
|
||||
def end_element(name)
|
||||
|
||||
|
||||
case name
|
||||
when 'RequestId'
|
||||
@response[name] = value
|
||||
|
@ -31,4 +31,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -31,4 +31,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,7 +14,7 @@ module Fog
|
|||
def finished_role(role)
|
||||
@response['Roles'] << role
|
||||
end
|
||||
|
||||
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'RequestId', 'Marker'
|
||||
|
@ -28,4 +28,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module IAM
|
||||
|
||||
class ListSigningCertificates < Fog::Parsers::Base
|
||||
|
||||
|
||||
def reset
|
||||
@signing_certificate = {}
|
||||
@response = { 'SigningCertificates' => [] }
|
||||
|
|
|
@ -50,4 +50,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -26,4 +26,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,7 +5,7 @@ module Fog
|
|||
|
||||
class UpdateUser < Fog::Parsers::Base
|
||||
# http://docs.amazonwebservices.com/IAM/latest/APIReference/index.html?API_UpdateUser.html
|
||||
|
||||
|
||||
def reset
|
||||
@response = { 'User' => {} }
|
||||
end
|
||||
|
|
|
@ -11,7 +11,7 @@ module Fog
|
|||
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'Arn', 'Path', 'ServerCertificateId', 'ServerCertificateName'
|
||||
when 'Arn', 'Path', 'ServerCertificateId', 'ServerCertificateName', 'CertificateBody', 'CertificateChain'
|
||||
@response['Certificate'][name] = value
|
||||
when 'UploadDate'
|
||||
@response['Certificate'][name] = Time.parse(value)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Fog
|
||||
module Parsers
|
||||
module AWS
|
||||
module RDS
|
||||
module RDS
|
||||
|
||||
# Base parser for ResponseMetadata, RequestId
|
||||
class Base < Fog::Parsers::Base
|
||||
|
|
|
@ -2,9 +2,9 @@ module Fog
|
|||
module Parsers
|
||||
module AWS
|
||||
module RDS
|
||||
|
||||
|
||||
require 'fog/aws/parsers/rds/db_parser'
|
||||
|
||||
|
||||
class CreateDBInstance < Fog::Parsers::AWS::RDS::DbParser
|
||||
|
||||
def reset
|
||||
|
@ -13,7 +13,7 @@ module Fog
|
|||
end
|
||||
|
||||
def start_element(name, attrs = [])
|
||||
super
|
||||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
|
|
|
@ -2,9 +2,9 @@ module Fog
|
|||
module Parsers
|
||||
module AWS
|
||||
module RDS
|
||||
|
||||
|
||||
require 'fog/aws/parsers/rds/db_parser'
|
||||
|
||||
|
||||
class CreateDBInstanceReadReplica < Fog::Parsers::AWS::RDS::DbParser
|
||||
|
||||
def reset
|
||||
|
@ -13,7 +13,7 @@ module Fog
|
|||
end
|
||||
|
||||
def start_element(name, attrs = [])
|
||||
super
|
||||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
|
|
|
@ -3,7 +3,7 @@ module Fog
|
|||
module AWS
|
||||
module RDS
|
||||
require 'fog/aws/parsers/rds/snapshot_parser'
|
||||
|
||||
|
||||
class CreateDBSnapshot < Fog::Parsers::AWS::RDS::SnapshotParser
|
||||
|
||||
def reset
|
||||
|
@ -17,7 +17,7 @@ module Fog
|
|||
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'DBSnapshot' then
|
||||
when 'DBSnapshot' then
|
||||
@response['CreateDBSnapshotResult']['DBSnapshot'] = @db_snapshot
|
||||
@db_snapshot = fresh_snapshot
|
||||
when 'RequestId'
|
||||
|
|
|
@ -8,14 +8,14 @@ module Fog
|
|||
def reset
|
||||
@db_engine_version = fresh_engine_version
|
||||
end
|
||||
|
||||
|
||||
def fresh_engine_version
|
||||
{}
|
||||
end
|
||||
|
||||
def start_element(name, attrs = [])
|
||||
super
|
||||
|
||||
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
|
@ -25,7 +25,7 @@ module Fog
|
|||
when 'DBParameterGroupFamily' then @db_engine_version['DBParameterGroupFamily'] = @value
|
||||
when 'DBEngineVersionIdentifier' then @db_engine_version['DBEngineVersionIdentifier'] = @value
|
||||
when 'Engine' then @db_engine_version['Engine'] = @value
|
||||
when 'EngineVersion' then @db_engine_version['EngineVersion'] = @value
|
||||
when 'EngineVersion' then @db_engine_version['EngineVersion'] = @value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,9 +7,9 @@ module Fog
|
|||
|
||||
def reset
|
||||
@db_instance = fresh_instance
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
def fresh_instance
|
||||
{'PendingModifiedValues' => [], 'DBSecurityGroups' => [], 'ReadReplicaDBInstanceIdentifiers' => [], 'Endpoint' => {}}
|
||||
end
|
||||
|
@ -39,18 +39,18 @@ module Fog
|
|||
@in_vpc_security_groups = true
|
||||
@vpc_security_groups = []
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
|
||||
case name
|
||||
|
||||
|
||||
when 'LatestRestorableTime', 'InstanceCreateTime'
|
||||
@db_instance[name] = Time.parse value
|
||||
when 'Engine',
|
||||
'DBInstanceStatus', 'DBInstanceIdentifier', 'EngineVersion',
|
||||
'PreferredBackupWindow', 'PreferredMaintenanceWindow',
|
||||
when 'Engine',
|
||||
'DBInstanceStatus', 'DBInstanceIdentifier', 'EngineVersion',
|
||||
'PreferredBackupWindow', 'PreferredMaintenanceWindow',
|
||||
'AvailabilityZone', 'MasterUsername', 'DBName', 'LicenseModel',
|
||||
'DBSubnetGroupName'
|
||||
@db_instance[name] = value
|
||||
|
@ -70,7 +70,7 @@ module Fog
|
|||
if @in_db_parameter_groups
|
||||
@db_parameter_group[name] = value
|
||||
end
|
||||
|
||||
|
||||
when 'BackupRetentionPeriod'
|
||||
if @in_pending_modified_values
|
||||
@pending_modified_values[name] = value.to_i
|
||||
|
@ -91,7 +91,7 @@ module Fog
|
|||
when 'DBSecurityGroup'
|
||||
@db_security_groups << @db_security_group
|
||||
@db_security_group = {}
|
||||
|
||||
|
||||
when 'VpcSecurityGroups'
|
||||
@in_vpc_security_groups = false
|
||||
@db_instance['VpcSecurityGroups'] = @vpc_security_groups
|
||||
|
@ -131,7 +131,7 @@ module Fog
|
|||
elsif @in_endpoint
|
||||
@endpoint[name] = value.to_i
|
||||
end
|
||||
|
||||
|
||||
when 'PendingModifiedValues'
|
||||
@in_pending_modified_values = false
|
||||
@db_instance['PendingModifiedValues'] = @pending_modified_values
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module RDS
|
||||
|
||||
require 'fog/aws/parsers/rds/db_parser'
|
||||
|
||||
|
||||
class DeleteDBInstance < Fog::Parsers::AWS::RDS::DbParser
|
||||
|
||||
def reset
|
||||
|
@ -13,12 +13,12 @@ module Fog
|
|||
end
|
||||
|
||||
def start_element(name, attrs = [])
|
||||
super
|
||||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
case name
|
||||
|
||||
|
||||
when 'DBInstance'
|
||||
@response['DeleteDBInstanceResult']['DBInstance'] = @db_instance
|
||||
@db_instance = fresh_instance
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module RDS
|
||||
|
||||
require 'fog/aws/parsers/rds/snapshot_parser'
|
||||
|
||||
|
||||
class DeleteDBSnapshot < Fog::Parsers::AWS::RDS::SnapshotParser
|
||||
|
||||
def reset
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module RDS
|
||||
|
||||
require 'fog/aws/parsers/rds/db_engine_version_parser'
|
||||
|
||||
|
||||
class DescribeDBEngineVersions < Fog::Parsers::AWS::RDS::DBEngineVersionParser
|
||||
|
||||
def reset
|
||||
|
@ -18,7 +18,7 @@ module Fog
|
|||
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'DBEngineVersion' then
|
||||
when 'DBEngineVersion' then
|
||||
@response['DescribeDBEngineVersionsResult']['DBEngineVersions'] << @db_engine_version
|
||||
@db_engine_version = fresh_engine_version
|
||||
when 'Marker'
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module RDS
|
||||
|
||||
require 'fog/aws/parsers/rds/db_parser'
|
||||
|
||||
|
||||
class DescribeDBInstances < Fog::Parsers::AWS::RDS::DbParser
|
||||
|
||||
def reset
|
||||
|
|
|
@ -19,9 +19,9 @@ module Fog
|
|||
when 'DBParameterGroupFamily' then @db_parameter_group['DBParameterGroupFamily'] = value
|
||||
when 'Description' then @db_parameter_group['Description'] = value
|
||||
when 'DBParameterGroupName' then @db_parameter_group['DBParameterGroupName'] = value
|
||||
when 'DBParameterGroup' then
|
||||
when 'DBParameterGroup' then
|
||||
@response['DescribeDBParameterGroupsResult']['DBParameterGroups'] << @db_parameter_group
|
||||
@db_parameter_group = {}
|
||||
@db_parameter_group = {}
|
||||
when 'Marker'
|
||||
@response['DescribeDBParameterGroupsResult']['Marker'] = value
|
||||
when 'RequestId'
|
||||
|
|
|
@ -21,12 +21,12 @@ module Fog
|
|||
when 'DataType' then @parameter['DataType'] = value
|
||||
when 'AllowedValues' then @parameter['AllowedValues'] = value
|
||||
when 'Source' then @parameter['Source'] = value
|
||||
when 'IsModifiable' then
|
||||
when 'IsModifiable' then
|
||||
@parameter['IsModifiable'] = value == 'true' ? true : false
|
||||
when 'Description' then @parameter['Description'] = value
|
||||
when 'ApplyType' then @parameter['ApplyType'] = value
|
||||
when 'ParameterName' then @parameter['ParameterName'] = value
|
||||
when 'Parameter'
|
||||
when 'Parameter'
|
||||
@parameters << @parameter
|
||||
@parameter = {}
|
||||
when 'Marker'
|
||||
|
|
|
@ -40,4 +40,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module RDS
|
||||
|
||||
require 'fog/aws/parsers/rds/snapshot_parser'
|
||||
|
||||
|
||||
class DescribeDBSnapshots < Fog::Parsers::AWS::RDS::SnapshotParser
|
||||
|
||||
def reset
|
||||
|
@ -18,7 +18,7 @@ module Fog
|
|||
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'DBSnapshot' then
|
||||
when 'DBSnapshot' then
|
||||
@response['DescribeDBSnapshotsResult']['DBSnapshots'] << @db_snapshot
|
||||
@db_snapshot = fresh_snapshot
|
||||
when 'Marker'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Fog
|
||||
module Parsers
|
||||
module AWS
|
||||
module RDS
|
||||
module RDS
|
||||
require 'fog/aws/parsers/rds/base'
|
||||
|
||||
class EventListParser < Base
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module RDS
|
||||
|
||||
require 'fog/aws/parsers/rds/db_parser'
|
||||
|
||||
|
||||
class ModifyDBInstance < Fog::Parsers::AWS::RDS::DbParser
|
||||
|
||||
def reset
|
||||
|
@ -13,7 +13,7 @@ module Fog
|
|||
end
|
||||
|
||||
def start_element(name, attrs = [])
|
||||
super
|
||||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module RDS
|
||||
|
||||
require 'fog/aws/parsers/rds/db_parser'
|
||||
|
||||
|
||||
class RebootDBInstance < Fog::Parsers::AWS::RDS::DbParser
|
||||
|
||||
def reset
|
||||
|
@ -13,12 +13,12 @@ module Fog
|
|||
end
|
||||
|
||||
def start_element(name, attrs = [])
|
||||
super
|
||||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
case name
|
||||
|
||||
|
||||
when 'DBInstance'
|
||||
@response['RebootDBInstanceResult']['DBInstance'] = @db_instance
|
||||
@db_instance = fresh_instance
|
||||
|
|
|
@ -8,14 +8,14 @@ module Fog
|
|||
def reset
|
||||
@db_snapshot = fresh_snapshot
|
||||
end
|
||||
|
||||
|
||||
def fresh_snapshot
|
||||
{}
|
||||
end
|
||||
|
||||
def start_element(name, attrs = [])
|
||||
super
|
||||
|
||||
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
|
|
|
@ -53,7 +53,7 @@ module Fog
|
|||
end
|
||||
|
||||
def fresh_cluster
|
||||
{ 'ClusterParameterGroups' => [], 'ClusterSecurityGroups' => [], 'VpcSecurityGroups' => [],
|
||||
{ 'ClusterParameterGroups' => [], 'ClusterSecurityGroups' => [], 'VpcSecurityGroups' => [],
|
||||
'EndPoint' => {}, 'PendingModifiedValues'=> {}, 'RestoreStatus' => {}}
|
||||
end
|
||||
|
||||
|
@ -73,9 +73,9 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'AvailabilityZone', 'ClusterIdentifier', 'ClusterStatus', 'ClusterSubnetGroupName', 'DBName',
|
||||
when 'AvailabilityZone', 'ClusterIdentifier', 'ClusterStatus', 'ClusterSubnetGroupName', 'DBName',
|
||||
'MasterUsername', 'ModifyStatus', 'PreferredMaintenanceWindow', 'VpcId'
|
||||
@cluster[name] = value
|
||||
when 'ClusterCreateTime'
|
||||
|
@ -83,7 +83,7 @@ module Fog
|
|||
when 'AllowVersionUpgrade', 'Encrypted', 'PubliclyAccessible'
|
||||
@cluster[name] = (value == "true")
|
||||
when 'Address'
|
||||
@cluster['EndPoint'][name] = value
|
||||
@cluster['EndPoint'][name] = value
|
||||
when 'Port'
|
||||
@cluster['EndPoint'][name] = value.to_i
|
||||
when 'NodeType', 'ClusterVersion'
|
||||
|
@ -141,4 +141,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -13,7 +13,7 @@ module Fog
|
|||
# :ip_ranges - (Array)
|
||||
# :status - (String)
|
||||
# :cidrip - (String)
|
||||
|
||||
|
||||
def reset
|
||||
@cluster_security_group = fresh_cluster_security_group
|
||||
end
|
||||
|
@ -31,8 +31,8 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'ClusterSecurityGroupName', 'Description'
|
||||
@cluster_security_group[name] = value
|
||||
|
@ -47,4 +47,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
class ClusterSnapshot < ClusterSnapshotParser
|
||||
# :parameter_group_name - (String)
|
||||
# :parameter_group_status - (String)
|
||||
|
||||
|
||||
def reset
|
||||
super
|
||||
@response = {}
|
||||
|
@ -18,7 +18,7 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Snapshot'
|
||||
|
@ -29,4 +29,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -41,8 +41,8 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'SnapshotIdentifier', 'ClusterIdentifier', 'Status', 'AvailabilityZone', 'MasterUsername', 'ClusterVersion', 'SnapshotType', 'NodeType',
|
||||
'DBName', 'VpcId', 'OwnerAccount'
|
||||
|
@ -63,4 +63,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,8 +12,8 @@ module Fog
|
|||
# :subnet_identifier - (String)
|
||||
# :subnet_availability_zone - (Hash)
|
||||
# :name - (String)
|
||||
# :subnet_status - (String)
|
||||
|
||||
# :subnet_status - (String)
|
||||
|
||||
def reset
|
||||
@response = { 'Subnets' => [] }
|
||||
end
|
||||
|
@ -30,7 +30,7 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'ClusterSubnetGroupName', 'Desciption', 'VpcId', 'SubnetGroupStatus'
|
||||
|
|
|
@ -7,7 +7,7 @@ module Fog
|
|||
# :parameter_group_name - (String)
|
||||
# :parameter_group_family - (String)
|
||||
# :description - (String)
|
||||
|
||||
|
||||
def reset
|
||||
@response = {'ClusterParameterGroup'=>{}}
|
||||
end
|
||||
|
@ -16,7 +16,7 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'ParameterGroupName', 'ParameterGroupFamily', 'Description'
|
||||
|
@ -27,4 +27,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,7 +7,7 @@ module Fog
|
|||
|
||||
class CreateClusterSecurityGroup < ClusterSecurityGroupParser
|
||||
# :cluster_security_group
|
||||
|
||||
|
||||
def reset
|
||||
super
|
||||
@response = {}
|
||||
|
@ -17,7 +17,7 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'ClusterSecurityGroup'
|
||||
|
@ -28,4 +28,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@ module Fog
|
|||
# :parameter_group_name - (String)
|
||||
# :parameter_group_family - (String)
|
||||
# :description - (String)
|
||||
|
||||
|
||||
def reset
|
||||
@response = { 'ParameterGroups' => [] }
|
||||
end
|
||||
|
@ -22,7 +22,7 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
|
@ -38,4 +38,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,7 +14,7 @@ module Fog
|
|||
# :allowed_values - (String)
|
||||
# :is_modifiable - (Boolean)
|
||||
# :minimum_engine_version - (String)
|
||||
|
||||
|
||||
def reset
|
||||
@response = { 'Parameters' => [] }
|
||||
end
|
||||
|
@ -27,8 +27,8 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
@response[name] = value
|
||||
|
@ -45,4 +45,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
class DescribeClusterSecurityGroups < ClusterSecurityGroupParser
|
||||
# :marker - (String)
|
||||
# :cluster_security_groups - (Array)
|
||||
|
||||
|
||||
def reset
|
||||
@response = { 'ClusterSecurityGroups' => [] }
|
||||
end
|
||||
|
@ -21,7 +21,7 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
|
@ -35,4 +35,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -21,8 +21,8 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
@response[name] = value
|
||||
|
@ -35,4 +35,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -28,8 +28,8 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
@response[name] = value
|
||||
|
@ -44,7 +44,7 @@ module Fog
|
|||
when 'SubnetAvailabilityZone'
|
||||
@subnet['SubnetAvailabilityZone'] = {}
|
||||
when 'Name'
|
||||
@subnet['SubnetAvailabilityZone']['Name'] = value
|
||||
@subnet['SubnetAvailabilityZone']['Name'] = value
|
||||
when 'SubnetIdentifier', 'SubnetStatus'
|
||||
@subnet[name] = value
|
||||
end
|
||||
|
|
|
@ -19,16 +19,16 @@ module Fog
|
|||
super
|
||||
case name
|
||||
when 'ClusterVersions'
|
||||
@cluster_version = {}
|
||||
@cluster_version = {}
|
||||
when 'ClusterVersion'
|
||||
# Sadly, there are two nodes of different type named cluster_version
|
||||
# Sadly, there are two nodes of different type named cluster_version
|
||||
# that are nested, so we keep track of which one we're in
|
||||
@cluster_version_depth += 1
|
||||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
@response[name] = value
|
||||
|
@ -39,7 +39,7 @@ module Fog
|
|||
@cluster_version = {}
|
||||
else
|
||||
@cluster_version[name] = value
|
||||
end
|
||||
end
|
||||
when 'ClusterParameterGroupFamily', 'Description'
|
||||
@cluster_version[name] = value
|
||||
end
|
||||
|
|
|
@ -15,7 +15,7 @@ module Fog
|
|||
# :allowed_values - (String)
|
||||
# :is_modifiable - (Boolean)
|
||||
# :minimum_engine_version - (String)
|
||||
|
||||
|
||||
def reset
|
||||
@response = { 'Parameters' => [] }
|
||||
end
|
||||
|
@ -28,8 +28,8 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker', 'ParameterGroupFamily'
|
||||
@response[name] = value
|
||||
|
@ -46,4 +46,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ module Fog
|
|||
# :source_type - (String)
|
||||
# :message - (String)
|
||||
# :date - (Time)
|
||||
|
||||
|
||||
def reset
|
||||
@response = { 'Events' => [] }
|
||||
end
|
||||
|
@ -23,7 +23,7 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
|
@ -41,4 +41,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ module Fog
|
|||
# :cluster_type - (String)
|
||||
# :node_type - (String)
|
||||
# :availability_zones - (Array)
|
||||
# :name - (String)
|
||||
# :name - (String)
|
||||
|
||||
def reset
|
||||
@response = { 'OrderableClusterOptions' => [] }
|
||||
|
@ -30,8 +30,8 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
@response[name] = value
|
||||
|
@ -51,4 +51,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
|
@ -61,4 +61,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,19 +6,19 @@ module Fog
|
|||
class DescribeReservedNodes < Fog::Parsers::Base
|
||||
# :marker - (String)
|
||||
# :reserved_nodes - (Array)
|
||||
# :reserved_node_id - (String)
|
||||
# :reserved_node_offering_id - (String)
|
||||
# :node_type - (String)
|
||||
# :reserved_node_id - (String)
|
||||
# :reserved_node_offering_id - (String)
|
||||
# :node_type - (String)
|
||||
# :start_time - (Time)
|
||||
# :duration - (Integer)
|
||||
# :fixed_price - (Numeric)
|
||||
# :usage_price - (Numeric)
|
||||
# :duration - (Integer)
|
||||
# :fixed_price - (Numeric)
|
||||
# :usage_price - (Numeric)
|
||||
# :currency_code - (String)
|
||||
# :node_count - (Integer)
|
||||
# :state - (String)
|
||||
# :offering_type - (String)
|
||||
# :recurring_charges - (Array)
|
||||
# :recurring_charge_amount - (Numeric)
|
||||
# :node_count - (Integer)
|
||||
# :state - (String)
|
||||
# :offering_type - (String)
|
||||
# :recurring_charges - (Array)
|
||||
# :recurring_charge_amount - (Numeric)
|
||||
# :recurring_charge_frequency - (String)
|
||||
|
||||
def reset
|
||||
|
@ -39,8 +39,8 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'Marker'
|
||||
@response[name] = value
|
||||
|
@ -68,4 +68,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -28,8 +28,8 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'TargetNodeType', 'TargetClusterType', 'Status'
|
||||
@response[name] = value
|
||||
|
@ -57,4 +57,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module AWS
|
||||
|
||||
class PurchaseReservedNodeOffering < Fog::Parsers::Base
|
||||
|
||||
|
||||
# :reserved_node_id - (String)
|
||||
# :reserved_node_offering_id - (String)
|
||||
# :node_type - (String)
|
||||
|
@ -31,8 +31,8 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
super
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'ReservedNodeId', 'ReservedNodeOfferingId', 'NodeType', 'CurrencyCode', 'State', 'OfferingType'
|
||||
@response[name] = value
|
||||
|
@ -55,4 +55,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,7 +7,7 @@ module Fog
|
|||
|
||||
class RevokeClusterSecurityGroupIngress < ClusterSecurityGroupParser
|
||||
# :cluster_security_group
|
||||
|
||||
|
||||
def reset
|
||||
super
|
||||
@response = {}
|
||||
|
@ -17,7 +17,7 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'ClusterSecurityGroup'
|
||||
|
@ -28,4 +28,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ module Fog
|
|||
class UpdateClusterParameterGroupParser < Fog::Parsers::Base
|
||||
# :parameter_group_name - (String)
|
||||
# :parameter_group_status - (String)
|
||||
|
||||
|
||||
def reset
|
||||
@response = {}
|
||||
end
|
||||
|
@ -15,7 +15,7 @@ module Fog
|
|||
super
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
def end_element(name)
|
||||
super
|
||||
case name
|
||||
when 'ParameterGroupName', 'ParameterGroupStatus'
|
||||
|
@ -26,4 +26,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -28,4 +28,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -25,8 +25,8 @@ module Fog
|
|||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -27,4 +27,4 @@ module Fog
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -19,7 +19,7 @@ module Fog
|
|||
when 'Item'
|
||||
@item_name = @attribute_name = nil
|
||||
when 'Name'
|
||||
if @item_name.nil?
|
||||
if @item_name.nil?
|
||||
@item_name = value
|
||||
response['Items'][@item_name] = {}
|
||||
else
|
||||
|
|
|
@ -36,7 +36,7 @@ module Fog
|
|||
end
|
||||
elsif @in_transition
|
||||
case name
|
||||
when 'StorageClass',
|
||||
when 'StorageClass',
|
||||
@transition['StorageClass'] = value
|
||||
when 'Date'
|
||||
@transition[name] = value
|
||||
|
@ -56,7 +56,7 @@ module Fog
|
|||
when 'Rule'
|
||||
@response['Rules'] << @rule
|
||||
@rule = {}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -168,7 +168,7 @@ module Fog
|
|||
@persistent = options[:persistent] || false
|
||||
@port = options[:port] || 443
|
||||
@scheme = options[:scheme] || 'https'
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
@version = options[:version] || '2013-05-15'
|
||||
end
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module AWS
|
||||
class Redshift < Fog::Service
|
||||
extend Fog::AWS::CredentialFetcher::ServiceMethods
|
||||
|
||||
|
||||
requires :aws_access_key_id, :aws_secret_access_key
|
||||
recognizes :region, :host, :path, :port, :scheme, :persistent, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at
|
||||
|
||||
|
@ -30,21 +30,21 @@ module Fog
|
|||
request :create_cluster_subnet_group
|
||||
request :modify_cluster
|
||||
request :modify_cluster_parameter_group
|
||||
request :modify_cluster_subnet_group
|
||||
request :delete_cluster
|
||||
request :modify_cluster_subnet_group
|
||||
request :delete_cluster
|
||||
request :delete_cluster_parameter_group
|
||||
request :delete_cluster_security_group
|
||||
request :delete_cluster_snapshot
|
||||
request :delete_cluster_subnet_group
|
||||
request :authorize_cluster_security_group_ingress
|
||||
request :authorize_snapshot_access
|
||||
request :copy_cluster_snapshot
|
||||
request :purchase_reserved_node_offering
|
||||
request :authorize_cluster_security_group_ingress
|
||||
request :authorize_snapshot_access
|
||||
request :copy_cluster_snapshot
|
||||
request :purchase_reserved_node_offering
|
||||
request :reboot_cluster
|
||||
request :reset_cluster_parameter_group
|
||||
request :restore_from_cluster_snapshot
|
||||
request :revoke_cluster_security_group_ingress
|
||||
request :revoke_snapshot_access
|
||||
request :reset_cluster_parameter_group
|
||||
request :restore_from_cluster_snapshot
|
||||
request :revoke_cluster_security_group_ingress
|
||||
request :revoke_snapshot_access
|
||||
|
||||
class Mock
|
||||
|
||||
|
@ -90,7 +90,7 @@ module Fog
|
|||
@port = options[:port] || 443
|
||||
@scheme = options[:scheme] || 'https'
|
||||
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)
|
||||
end
|
||||
|
||||
|
||||
|
|
13
lib/fog/aws/region_methods.rb
Normal file
13
lib/fog/aws/region_methods.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
module Fog
|
||||
module AWS
|
||||
module RegionMethods
|
||||
|
||||
def validate_aws_region region
|
||||
unless ['ap-northeast-1', 'ap-southeast-1', 'ap-southeast-2', 'eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2', 'sa-east-1'].include?(region)
|
||||
raise ArgumentError, "Unknown region: #{region.inspect}"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
|
@ -72,7 +72,7 @@ module Fog
|
|||
if load_balancer_names = options.delete('LoadBalancerNames')
|
||||
options.merge!(AWS.indexed_param('LoadBalancerNames.member.%d', [*load_balancer_names]))
|
||||
end
|
||||
|
||||
|
||||
if tags = options.delete('Tags')
|
||||
tags.each_with_index do |(key, value), i|
|
||||
options["Tags.member.#{i+1}.Key"] = key.to_s # turns symbol into string
|
||||
|
@ -82,7 +82,7 @@ module Fog
|
|||
if termination_policies = options.delete('TerminationPolicies')
|
||||
options.merge!(AWS.indexed_param('TerminationPolicies.member.%d', [*termination_policies]))
|
||||
end
|
||||
|
||||
|
||||
request({
|
||||
'Action' => 'CreateAutoScalingGroup',
|
||||
'AutoScalingGroupName' => auto_scaling_group_name,
|
||||
|
|
|
@ -90,7 +90,7 @@ module Fog
|
|||
# even a nil object will turn into an empty array
|
||||
lc = [*launch_configuration_names]
|
||||
|
||||
launch_configurations =
|
||||
launch_configurations =
|
||||
if lc.any?
|
||||
lc.map do |lc_name|
|
||||
l_conf = self.data[:launch_configurations].find { |name, data| name == lc_name }
|
||||
|
|
|
@ -47,8 +47,8 @@ module Fog
|
|||
# group.
|
||||
# * 'MinSize'<~Integer> - The minimum size of the Auto Scaling
|
||||
# group.
|
||||
# * 'Recurrence'<~String> - The time when recurring future
|
||||
# actions will start. Start time is specified by the user
|
||||
# * 'Recurrence'<~String> - The time when recurring future
|
||||
# actions will start. Start time is specified by the user
|
||||
# following the Unix cron syntax format.
|
||||
# * 'ScheduledActionARN'<~String> - The Amazon Resource Name
|
||||
# (ARN) of this scheduled action.
|
||||
|
|
|
@ -9,7 +9,7 @@ module Fog
|
|||
# @param etag [String] etag of that distribution from earlier get or put
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/DeleteDistribution.html
|
||||
|
||||
|
||||
def delete_distribution(distribution_id, etag)
|
||||
request({
|
||||
:expects => 204,
|
||||
|
|
|
@ -9,7 +9,7 @@ module Fog
|
|||
# @param [String] etag Etag of that distribution from earlier get or put
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/DeleteStreamingDistribution.html
|
||||
|
||||
|
||||
def delete_streaming_distribution(distribution_id, etag)
|
||||
request({
|
||||
:expects => 204,
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue