awful 0.0.79 → 0.0.80
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/awful/ami.rb +21 -8
- data/lib/awful/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43078b98ef014badfaafc6f3131158790368fc19
|
4
|
+
data.tar.gz: 46d94310f776c245ad74bc39fa9aa3a9faec1ed5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 319f74dee650f5cd086870258777d54d54d189fd0a4780e9eb8408c8ed4e8c8e496b37f69d8884fb704d689d2900a135144a66b7c95697f7aced2993060b2814
|
7
|
+
data.tar.gz: 82ce207b60082aabc1a3acae11548d4248cd8cd4f33d1d6802cf671dc3a538451ff74d7e66ced5fb2b9e02da1825f3ced3568db546f0cc197ed498ec18c4299c
|
data/lib/awful/ami.rb
CHANGED
@@ -54,16 +54,29 @@ module Awful
|
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
|
-
desc '
|
58
|
-
def
|
59
|
-
|
60
|
-
image
|
57
|
+
desc 'dump IDS', 'describe images'
|
58
|
+
def dump(*ids)
|
59
|
+
ec2.describe_images(image_ids: ids).images.tap do |images|
|
60
|
+
images.each do |image|
|
61
|
+
puts YAML.dump(stringify_keys(image.to_hash))
|
62
|
+
end
|
61
63
|
end
|
62
|
-
|
63
|
-
|
64
|
-
|
64
|
+
end
|
65
|
+
|
66
|
+
desc 'tags ID [TAGS]', 'get tags for AMI, or set multiple tags as key:value'
|
67
|
+
def tags(id, *tags)
|
68
|
+
if tags.empty?
|
69
|
+
ec2.describe_images(image_ids: [id]).images.first.tags.tap do |list|
|
70
|
+
print_table list.map { |t| [t.key, t.value] }
|
71
|
+
end
|
65
72
|
else
|
66
|
-
|
73
|
+
ec2.create_tags(
|
74
|
+
resources: [id],
|
75
|
+
tags: tags.map do |t|
|
76
|
+
key, value = t.split(/[:=]/)
|
77
|
+
{key: key, value: value}
|
78
|
+
end
|
79
|
+
)
|
67
80
|
end
|
68
81
|
end
|
69
82
|
|
data/lib/awful/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awful
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.80
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ric Lister
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|