Created
September 20, 2013 12:20
-
-
Save actionjack/6636642 to your computer and use it in GitHub Desktop.
AWS-SDK and Fog differences
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| snapshot_ids.each do |snapshot_id| | |
| AWS.config(:access_key_id => 'AAAAAAAAAAAAAAAAAA', :secret_access_key => 'aaaaaaaaaaaaaaaaaaaa', :region => 'eu-west-1') | |
| ec2 = AWS::EC2.new | |
| current_snap1 = ec2.snapshots[snapshot_id].status | |
| current_snap = Fog::Compute.new({:provider => 'AWS', :region => 'eu-west-1'}).snapshots.all('snapshot-id' => snapshot_id) | |
| p "Snapshot id is #{snapshot_id}" | |
| p current_snap1 | |
| p ec2.snapshots[snapshot_id].progress | |
| p "This is the value from the fog library: #{current_snap.inspect}" | |
| p '----------------------------------------------------------' | |
| current_snap.reload | |
| sleep(5) | |
| p current_snap1 | |
| p ec2.snapshots[snapshot_id].progress | |
| p "This is the value from the fog library: #{current_snap.inspect}" | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment