fog 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fog (0.3.6)
4
+ fog (0.3.7)
5
5
  builder
6
- excon (>= 0.2.1)
6
+ excon (>= 0.2.3)
7
7
  formatador (>= 0.0.15)
8
8
  json
9
9
  mime-types
@@ -15,7 +15,7 @@ GEM
15
15
  remote: http://rubygems.org/
16
16
  specs:
17
17
  builder (2.1.2)
18
- excon (0.2.1)
18
+ excon (0.2.3)
19
19
  formatador (0.0.15)
20
20
  gestalt (0.0.11)
21
21
  formatador (>= 0.0.12)
@@ -35,7 +35,7 @@ PLATFORMS
35
35
 
36
36
  DEPENDENCIES
37
37
  builder
38
- excon (>= 0.2.1)
38
+ excon (>= 0.2.3)
39
39
  fog!
40
40
  formatador (>= 0.0.15)
41
41
  json
@@ -93,18 +93,18 @@ It will return an {excon}[http://github.com/geemus/excon] response, which has #h
93
93
  Play around and use the console to explore or check out the {getting started guide}[http://wiki.github.com/geemus/fog/getting-started-with-fog] for more details.
94
94
 
95
95
  You should try out the (varying) support fog has for:
96
- * {AWS}[http://aws.amazon.com] [{EC2}[http://aws.amazon.com/ec2], {ELB}[http://aws.amazon.com/elasticloadbalancing], {S3}[http://aws.amazon.com/s3], {SimpleDB}[http://aws.amazon.com/simpledb]]
97
- * {Blue Box Group}[http://www.blueboxgrp.com] [{Blocks}[http://www.blueboxgrp.com/blocks]]
96
+ * {AWS}[http://aws.amazon.com] [{Compute}[http://aws.amazon.com/ec2], {ELB}[http://aws.amazon.com/elasticloadbalancing], {Storage}[http://aws.amazon.com/s3], {SimpleDB}[http://aws.amazon.com/simpledb]]
97
+ * {Blue Box Group}[http://www.blueboxgrp.com] [{Compute}[http://www.blueboxgrp.com/blocks]]
98
98
  * {Google}[http://www.google.com] [{Storage}[http://code.google.com/apis/storage]]
99
- * {Rackspace}[http://www.rackspace.com] [{Files}[http://www.rackspacecloud.com/cloud_hosting_products/files], {Servers}[http://www.rackspacecloud.com/cloud_hosting_products/servers]]
100
- * {Slicehost}[http://www.slicehost.com]
99
+ * {Rackspace}[http://www.rackspace.com] [{Compute}[http://www.rackspacecloud.com/cloud_hosting_products/servers], {Storage}[http://www.rackspacecloud.com/cloud_hosting_products/files]]
100
+ * {Slicehost}[http://www.slicehost.com] [{Compute}[http://www.slicehost.com]]
101
101
  * {Terremark}[http://www.terremark.com] [{vCloud Express}[http://vcloudexpress.terremark.com]]
102
102
 
103
103
  There are also the basics of these providers (that could use your love):
104
- * {GoGrid}[http://www.gogrid.com]
105
- * {Linode}[http://www.linode.com]
106
- * Local [Files]
107
- * {New Servers}[http://www.newservers.com]
104
+ * {GoGrid}[http://www.gogrid.com] [{Compute}[http://www.gogrid.com]]
105
+ * {Linode}[http://www.linode.com] [{Compute}[http://www.linode.com]]
106
+ * Local [Storage]
107
+ * {New Servers}[http://www.newservers.com] [{Compute}[http://www.newservers.com]]
108
108
 
109
109
  Enjoy, and let me know what I can do to continue improving fog!
110
110
 
@@ -7,8 +7,8 @@ Gem::Specification.new do |s|
7
7
  ## If your rubyforge_project name is different, then edit it and comment out
8
8
  ## the sub! line in the Rakefile
9
9
  s.name = 'fog'
10
- s.version = '0.3.6'
11
- s.date = '2010-09-27'
10
+ s.version = '0.3.7'
11
+ s.date = '2010-09-29'
12
12
  s.rubyforge_project = 'fog'
13
13
 
14
14
  ## Make sure your summary is short. The description may be as long
@@ -43,7 +43,7 @@ Gem::Specification.new do |s|
43
43
  ## List your runtime dependencies here. Runtime dependencies are those
44
44
  ## that are needed for an end user to actually USE your code.
45
45
  s.add_dependency('builder')
46
- s.add_dependency('excon', '>=0.2.1')
46
+ s.add_dependency('excon', '>=0.2.3')
47
47
  s.add_dependency('formatador', '>=0.0.15')
48
48
  s.add_dependency('json')
49
49
  s.add_dependency('mime-types')
@@ -548,7 +548,6 @@ Gem::Specification.new do |s|
548
548
  spec/aws/models/storage/directory_spec.rb
549
549
  spec/aws/models/storage/file_spec.rb
550
550
  spec/aws/models/storage/files_spec.rb
551
- spec/aws/requests/compute/describe_images_spec.rb
552
551
  spec/aws/requests/simpledb/batch_put_attributes_spec.rb
553
552
  spec/aws/requests/simpledb/create_domain_spec.rb
554
553
  spec/aws/requests/simpledb/delete_attributes_spec.rb
@@ -650,6 +649,7 @@ Gem::Specification.new do |s|
650
649
  tests/aws/models/storage/directory_tests.rb
651
650
  tests/aws/requests/compute/address_tests.rb
652
651
  tests/aws/requests/compute/availability_zone_tests.rb
652
+ tests/aws/requests/compute/image_tests.rb
653
653
  tests/aws/requests/compute/instance_tests.rb
654
654
  tests/aws/requests/compute/key_pair_tests.rb
655
655
  tests/aws/requests/compute/region_tests.rb
data/lib/fog.rb CHANGED
@@ -32,7 +32,7 @@ require 'fog/ssh'
32
32
  module Fog
33
33
 
34
34
  unless const_defined?(:VERSION)
35
- VERSION = '0.3.6'
35
+ VERSION = '0.3.7'
36
36
  end
37
37
 
38
38
  module Mock
@@ -173,6 +173,7 @@ module Fog
173
173
 
174
174
  if response.status == 307
175
175
  uri = URI.parse(response.headers['Location'])
176
+ Formatador.display_line("[yellow][WARN] fog: followed redirect to #{uri.host}, connecting to the matching region will be more performant[/]")
176
177
  response = Fog::Connection.new("#{@scheme}://#{uri.host}:#{@port}", false).request(original_params, &block)
177
178
  end
178
179
 
@@ -7,6 +7,11 @@ module Fog
7
7
  class BlockInstantiationError < StandardError; end
8
8
 
9
9
  class Server < Fog::Model
10
+ extend Fog::Deprecation
11
+ deprecate(:ssh_key, :public_key)
12
+ deprecate(:ssh_key=, :public_key=)
13
+ deprecate(:user, :username)
14
+ deprecate(:user=, :username=)
10
15
 
11
16
  identity :id
12
17
 
@@ -17,13 +22,16 @@ module Fog
17
22
  attribute :ips
18
23
  attribute :status
19
24
  attribute :flavor_id
20
- # attribute :image_id
21
-
22
- attr_accessor :image_id
25
+ attribute :image_id
23
26
  attribute :template
24
27
 
25
- # Not reported by the API, but used at create time
26
- attr_accessor :password, :ssh_key, :user
28
+ attr_accessor :password
29
+ attr_writer :private_key, :private_key_path, :public_key, :public_key_path, :username
30
+
31
+ def initialize(attributes={})
32
+ @flavor_id ||= '94fd37a7-2606-47f7-84d5-9000deda52ae'
33
+ super
34
+ end
27
35
 
28
36
  def destroy
29
37
  requires :id
@@ -41,6 +49,22 @@ module Fog
41
49
  connection.images.get(@image_id)
42
50
  end
43
51
 
52
+ def private_key_path
53
+ File.expand_path(@private_key_path ||= Fog.credentials[:private_key_path])
54
+ end
55
+
56
+ def private_key
57
+ @private_key ||= File.read(private_key_path)
58
+ end
59
+
60
+ def public_key_path
61
+ File.expand_path(@public_key_path ||= Fog.credentials[:public_key_path])
62
+ end
63
+
64
+ def public_key
65
+ @public_key ||= File.read(public_key_path)
66
+ end
67
+
44
68
  def ready?
45
69
  @status == 'running'
46
70
  end
@@ -53,21 +77,42 @@ module Fog
53
77
 
54
78
  def save
55
79
  requires :flavor_id, :image_id
56
- options = if !@password && !@ssh_key
57
- raise(ArgumentError, "password or ssh_key is required for this operation")
58
- elsif @ssh_key
59
- {'ssh_public_key' => @ssh_key}
80
+ options = if !password && !public_key
81
+ raise(ArgumentError, "password or public_key is required for this operation")
82
+ elsif public_key
83
+ {'ssh_public_key' => public_key}
60
84
  elsif @password
61
- {'password' => @password}
62
- end
63
- if @user
64
- options['user'] = @user
85
+ {'password' => password}
65
86
  end
66
- data = connection.create_block(@flavor_id, @image_id, options)
87
+ options['username'] = username
88
+ data = connection.create_block(flavor_id, image_id, options)
67
89
  merge_attributes(data.body)
68
90
  true
69
91
  end
70
92
 
93
+ def setup(credentials = {})
94
+ requires :identity, :ips, :public_key, :username
95
+ Fog::SSH.new(ips.first['address'], username, credentials).run([
96
+ %{mkdir .ssh},
97
+ %{echo "#{public_key}" >> ~/.ssh/authorized_keys},
98
+ %{passwd -l root},
99
+ %{echo "#{attributes.to_json}" >> ~/attributes.json}
100
+ ])
101
+ rescue Errno::ECONNREFUSED
102
+ sleep(1)
103
+ retry
104
+ end
105
+
106
+ def ssh(commands)
107
+ requires :identity, :ips, :private_key, :username
108
+ @ssh ||= Fog::SSH.new(ips.first['address'], username, :key_data => [private_key])
109
+ @ssh.run(commands)
110
+ end
111
+
112
+ def username
113
+ @username ||= 'deploy'
114
+ end
115
+
71
116
  private
72
117
 
73
118
  def product=(new_product)
@@ -14,6 +14,13 @@ module Fog
14
14
  load(data)
15
15
  end
16
16
 
17
+ def bootstrap(new_attributes = {})
18
+ server = create(new_attributes)
19
+ server.wait_for { ready? }
20
+ server.setup(:key_data => [server.private_key])
21
+ server
22
+ end
23
+
17
24
  def get(server_id)
18
25
  if server_id && server = connection.get_block(server_id).body
19
26
  new(server)
@@ -18,8 +18,8 @@ module Fog
18
18
  attribute :progress
19
19
  attribute :status
20
20
 
21
- attr_accessor :password, :username
22
- attr_writer :private_key, :private_key_path, :public_key, :public_key_path
21
+ attr_reader :password
22
+ attr_writer :private_key, :private_key_path, :public_key, :public_key_path, :username
23
23
 
24
24
  def initialize(attributes={})
25
25
  @flavor_id ||= 1
@@ -15,10 +15,13 @@ module Fog
15
15
  attribute :flavor_id, :aliases => 'flavor-id'
16
16
  attribute :image_id, :aliases => 'image-id'
17
17
  attribute :name
18
- attribute :password, :aliases => 'root-password'
19
18
  attribute :progress
20
19
  attribute :status
21
20
 
21
+ attr_accessor :password
22
+ alias_method :'root-password=', :password=
23
+ attr_writer :private_key, :private_key_path, :public_key, :public_key_path, :username
24
+
22
25
  def initialize(attributes={})
23
26
  @flavor_id ||= 1
24
27
  super
@@ -40,6 +43,22 @@ module Fog
40
43
  connection.images.get(@image_id)
41
44
  end
42
45
 
46
+ def private_key_path
47
+ File.expand_path(@private_key_path ||= Fog.credentials[:private_key_path])
48
+ end
49
+
50
+ def private_key
51
+ @private_key ||= File.read(private_key_path)
52
+ end
53
+
54
+ def public_key_path
55
+ File.expand_path(@public_key_path ||= Fog.credentials[:public_key_path])
56
+ end
57
+
58
+ def public_key
59
+ @public_key ||= File.read(public_key_path)
60
+ end
61
+
43
62
  def ready?
44
63
  @status == 'active'
45
64
  end
@@ -57,6 +76,29 @@ module Fog
57
76
  true
58
77
  end
59
78
 
79
+ def setup(credentials = {})
80
+ requires :addresses, :identity, :public_key, :username
81
+ Fog::SSH.new(addresses.first, username, credentials).run([
82
+ %{mkdir .ssh},
83
+ %{echo "#{public_key}" >> ~/.ssh/authorized_keys},
84
+ %{passwd -l root},
85
+ %{echo "#{attributes.to_json}" >> ~/attributes.json}
86
+ ])
87
+ rescue Errno::ECONNREFUSED
88
+ sleep(1)
89
+ retry
90
+ end
91
+
92
+ def ssh(commands)
93
+ requires :addresses, :identity, :private_key, :username
94
+ @ssh ||= Fog::SSH.new(addresses.first, username, :key_data => [private_key])
95
+ @ssh.run(commands)
96
+ end
97
+
98
+ def username
99
+ @username ||= 'root'
100
+ end
101
+
60
102
  end
61
103
 
62
104
  end
@@ -14,6 +14,13 @@ module Fog
14
14
  load(data)
15
15
  end
16
16
 
17
+ def bootstrap(new_attributes = {})
18
+ server = create(new_attributes)
19
+ server.wait_for { ready? }
20
+ server.setup(:password => server.password)
21
+ server
22
+ end
23
+
17
24
  def get(server_id)
18
25
  if server_id && server = connection.get_slice(server_id).body
19
26
  new(server)
@@ -2,7 +2,8 @@ Shindo.tests('AWS::Storage | directory models', ['aws']) do
2
2
 
3
3
  @collection = AWS[:storage].directories
4
4
  @model = @collection.new(:key => Time.now.to_f.to_s)
5
+ @non_id = 'not_a_directory'
5
6
 
6
- tests_models
7
+ tests_model
7
8
 
8
9
  end
@@ -0,0 +1,41 @@
1
+ Shindo.tests('AWS::Compute | image requests', ['aws']) do
2
+
3
+ @images_format = {
4
+ 'imagesSet' => [{
5
+ 'architecture' => String,
6
+ 'blockDeviceMapping' =>[],
7
+ 'imageId' => String,
8
+ 'imageLocation' => String,
9
+ 'imageOwnerId' => String,
10
+ 'imageState' => String,
11
+ 'imageType' => String,
12
+ 'isPublic' => Fog::Boolean,
13
+ 'kernelId' => String,
14
+ 'productCodes' => [],
15
+ 'ramdiskId' => String,
16
+ 'rootDeviceType' => String
17
+ }],
18
+ 'requestId' => String,
19
+ }
20
+
21
+ tests('success') do
22
+
23
+ # the result for this is HUGE an relatively uninteresting...de
24
+ # tests("#describe_images").formats(@images_format) do
25
+ # AWS[:compute].describe_images.body
26
+ # end
27
+
28
+ tests("#describe_images('ImageId' => '#{GENTOO_AMI}')").formats(@images_format) do
29
+ AWS[:compute].describe_images('ImageId' => GENTOO_AMI).body
30
+ end
31
+
32
+ end
33
+
34
+ tests('failure') do
35
+
36
+ tests("#describe_images('ImageId' => 'ami-00000000')").raises(Fog::AWS::Compute::Error) do
37
+ AWS[:compute].describe_regions('ImageId' => 'ami-00000000')
38
+ end
39
+ end
40
+
41
+ end
@@ -4,7 +4,6 @@ Shindo.tests('AWS::Compute | key pair requests', ['aws']) do
4
4
 
5
5
  @keypair_format = {
6
6
  'keyFingerprint' => String,
7
- 'keyMaterial' => String,
8
7
  'keyName' => String,
9
8
  'requestId' => String
10
9
  }
@@ -17,9 +16,10 @@ Shindo.tests('AWS::Compute | key pair requests', ['aws']) do
17
16
  'requestId' => String
18
17
  }
19
18
 
20
- @key_pair_name = 'fog_key_pair'
19
+ @key_pair_name = 'fog_create_key_pair'
20
+ @public_key_material = 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA1SL+kgze8tvSFW6Tyj3RyZc9iFVQDiCKzjgwn2tS7hyWxaiDhjfY2mBYSZwFdKN+ZdsXDJL4CPutUg4DKoQneVgIC1zuXrlpPbaT0Btu2aFd4qNfJ85PBrOtw2GrWZ1kcIgzZ1mMbQt6i1vhsySD2FEj+5kGHouNxQpI5dFR5K+nGgcTLFGnzb/MPRBk136GVnuuYfJ2I4va/chstThoP8UwnoapRHcBpwTIfbmmL91BsRVqjXZEUT73nxpxFeXXidYwhHio+5dXwE0aM/783B/3cPG6FVoxrBvjoNpQpAcEyjtRh9lpwHZtSEW47WNzpIW3PhbQ8j4MryznqF1Rhw=='
21
21
 
22
- tests("#create_key_pair('#{@key_pair_name}')").formats(@keypair_format) do
22
+ tests("#create_key_pair('#{@key_pair_name}')").formats(@keypair_format.merge({'keyMaterial' => String})) do
23
23
  AWS[:compute].create_key_pair(@key_pair_name).body
24
24
  end
25
25
 
@@ -35,6 +35,14 @@ Shindo.tests('AWS::Compute | key pair requests', ['aws']) do
35
35
  AWS[:compute].delete_key_pair(@key_pair_name).body
36
36
  end
37
37
 
38
+ tests("#import_key_pair('fog_import_key_pair', '#{@public_key_material}')").formats(@keypair_format) do
39
+ AWS[:compute].import_key_pair('fog_import_key_pair', @public_key_material).body
40
+ end
41
+
42
+ tests("#delete_key_pair('fog_import_key_pair)").succeeds do
43
+ AWS[:compute].delete_key_pair('fog_import_key_pair')
44
+ end
45
+
38
46
  tests("#delete_key_pair('not_a_key_name')").succeeds do
39
47
  AWS[:compute].delete_key_pair('not_a_key_name')
40
48
  end
@@ -1,37 +1,52 @@
1
- def tests_models
1
+ def tests_model
2
+ tests_model_first
3
+ tests_collection
4
+ tests_model_last
5
+ end
2
6
 
3
- after do
4
- if @model && !@model.new_record?
5
- if @model.respond_to?(:ready?)
6
- @model.wait_for { ready? }
7
- end
8
- @model.destroy
7
+ def tests_model_first
8
+
9
+ tests(@model.class) do
10
+
11
+ test('#save') do
12
+ @model.save
9
13
  end
14
+
15
+ if @model.respond_to?(:ready?)
16
+ @model.wait_for { ready? }
17
+ end
18
+
19
+ test('#reload') do
20
+ reloaded = @model.reload
21
+ @model.attributes == reloaded.attributes
22
+ end
23
+
10
24
  end
11
25
 
12
- tests('collection') do
26
+ end
13
27
 
14
- test('#all includes persisted models') do
15
- @model.save
16
- @collection.all.map {|model| model.identity}.include? @model.identity
28
+ def tests_collection
29
+
30
+ tests(@collection.class) do
31
+
32
+ test('collection#all includes persisted models') do
33
+ @collection.all.map {|model| model.identity}.include?(@model.identity)
17
34
  end
18
35
 
19
- tests('#get') do
36
+ tests('collection#get') do
20
37
 
21
38
  test 'should return a matching model if one exists' do
22
- @model.save
23
39
  get = @collection.get(@model.identity)
24
40
  @model.attributes == get.attributes
25
41
  end
26
42
 
27
43
  test 'should return nil if no matching model exists' do
28
- !@collection.get('0')
44
+ !@collection.get(@non_id)
29
45
  end
30
46
 
31
47
  end
32
48
 
33
- test('#reload') do
34
- @model.save
49
+ test('collection#reload') do
35
50
  @collection.all
36
51
  reloaded = @collection.reload
37
52
  @collection.attributes == reloaded.attributes
@@ -39,38 +54,19 @@ def tests_models
39
54
 
40
55
  end
41
56
 
42
- tests('model') do
43
-
44
- test('#reload') do
45
- @model.save
46
- if @model.respond_to?(:ready?)
47
- @model.wait_for { ready? }
48
- end
49
- reloaded = @model.reload
50
- @model.attributes == reloaded.attributes
51
- end
52
-
53
- tests('#save') do
57
+ end
54
58
 
55
- test('does not exist remotely before save') do
56
- !@collection.get(@model.identity)
57
- end
59
+ def tests_model_last
58
60
 
59
- test('succeeds') do
60
- @model.save
61
- end
61
+ tests(@model.class) do
62
62
 
63
- test('does exist remotely after save') do
64
- @model.save
65
- if @model.respond_to?(:ready?)
66
- @model.wait_for { ready? }
67
- end
68
- reloaded = @model.reload
69
- @model.attributes == reloaded.attributes
63
+ test('#destroy') do
64
+ if @model.respond_to?(:ready?)
65
+ @model.wait_for{ ready? }
70
66
  end
71
-
67
+ @model.destroy
72
68
  end
73
69
 
74
70
  end
75
71
 
76
- end
72
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 6
9
- version: 0.3.6
8
+ - 7
9
+ version: 0.3.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - geemus (Wesley Beary)
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-09-27 00:00:00 -07:00
17
+ date: 2010-09-29 00:00:00 -07:00
18
18
  default_executable: fog
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -39,8 +39,8 @@ dependencies:
39
39
  segments:
40
40
  - 0
41
41
  - 2
42
- - 1
43
- version: 0.2.1
42
+ - 3
43
+ version: 0.2.3
44
44
  requirement: *id002
45
45
  name: excon
46
46
  - !ruby/object:Gem::Dependency
@@ -655,7 +655,6 @@ files:
655
655
  - spec/aws/models/storage/directory_spec.rb
656
656
  - spec/aws/models/storage/file_spec.rb
657
657
  - spec/aws/models/storage/files_spec.rb
658
- - spec/aws/requests/compute/describe_images_spec.rb
659
658
  - spec/aws/requests/simpledb/batch_put_attributes_spec.rb
660
659
  - spec/aws/requests/simpledb/create_domain_spec.rb
661
660
  - spec/aws/requests/simpledb/delete_attributes_spec.rb
@@ -757,6 +756,7 @@ files:
757
756
  - tests/aws/models/storage/directory_tests.rb
758
757
  - tests/aws/requests/compute/address_tests.rb
759
758
  - tests/aws/requests/compute/availability_zone_tests.rb
759
+ - tests/aws/requests/compute/image_tests.rb
760
760
  - tests/aws/requests/compute/instance_tests.rb
761
761
  - tests/aws/requests/compute/key_pair_tests.rb
762
762
  - tests/aws/requests/compute/region_tests.rb
@@ -1,44 +0,0 @@
1
- require File.dirname(__FILE__) + '/../../../spec_helper'
2
-
3
- describe 'Compute.describe_images' do
4
- describe 'success' do
5
-
6
- it "should return proper attributes with no params" do
7
- actual = AWS[:compute].describe_images
8
- actual.body['requestId'].should be_a(String)
9
- image = actual.body['imagesSet'].first
10
- image['architecture'].should be_a(String)
11
- image['imageId'].should be_a(String)
12
- image['imageLocation'].should be_a(String)
13
- image['imageOwnerId'].should be_a(String)
14
- image['imageState'].should be_a(String)
15
- image['imageType'].should be_a(String)
16
- [false, true].should include(image['isPublic'])
17
- image['kernelId'].should be_a(String) if image['kernelId']
18
- image['platform'].should be_a(String) if image['platform']
19
- image['ramdiskId'].should be_a(String) if image['ramdiskId']
20
- image['rootDeviceName'].should be_a(String) if image['rootDeviceName']
21
- ["ebs","instance-store"].should include(image['rootDeviceType'])
22
- image['rootDeviceName'].should be_a(String) if image['rootDeviceName']
23
- end
24
-
25
- it "should return proper attributes with params" do
26
- actual = AWS[:compute].describe_images('ImageId' => GENTOO_AMI)
27
- actual.body['requestId'].should be_a(String)
28
- image = actual.body['imagesSet'].first
29
- image['architecture'].should be_a(String)
30
- image['imageId'].should be_a(String)
31
- image['imageLocation'].should be_a(String)
32
- image['imageOwnerId'].should be_a(String)
33
- image['imageState'].should be_a(String)
34
- image['imageType'].should be_a(String)
35
- [false, true].should include(image['isPublic'])
36
- image['kernelId'].should be_a(String) if image['kernelId']
37
- image['platform'].should be_a(String) if image['platform']
38
- image['ramdiskId'].should be_a(String) if image['ramdiskId']
39
- ["ebs","instance-store"].should include(image['rootDeviceType'])
40
- image['rootDeviceName'].should be_a(String) if image['rootDeviceName']
41
- end
42
-
43
- end
44
- end