stem 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/stem.rb +1 -0
  2. data/lib/stem/snapshot.rb +17 -0
  3. metadata +2 -1
data/lib/stem.rb CHANGED
@@ -16,5 +16,6 @@ require 'stem/tag'
16
16
 
17
17
  module Stem
18
18
  autoload :Family, 'stem/family'
19
+ autoload :Snapshot, 'stem/snapshot'
19
20
  class Deprecated < StandardError; end
20
21
  end
@@ -0,0 +1,17 @@
1
+ module Stem
2
+ module Snapshot
3
+ include Util
4
+ extend self
5
+
6
+ def list
7
+ result = swirl.call("DescribeSnapshots", "Owner" => "self")['snapshotSet'] || []
8
+ result.map {|h| h['snapshotId'] }
9
+ end
10
+
11
+ def destroy(snapshot_id)
12
+ swirl.call("DeleteSnapshot", "SnapshotId" => snapshot_id)
13
+ end
14
+ end
15
+ end
16
+
17
+
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: stem
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.8.2
5
+ version: 0.8.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Peter van Hardenberg
@@ -126,6 +126,7 @@ files:
126
126
  - lib/stem/instance_types.rb
127
127
  - lib/stem/ip.rb
128
128
  - lib/stem/key_pair.rb
129
+ - lib/stem/snapshot.rb
129
130
  - lib/stem/tag.rb
130
131
  - lib/stem/userdata.rb
131
132
  - lib/stem/util.rb