openstack-compute 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.1.1
@@ -161,10 +161,11 @@ module Compute
161
161
  # >> image = server.create_image("My Rails Server")
162
162
  # =>
163
163
  def create_image(name)
164
- data = JSON.generate(:image => {:serverId => self.id, :name => name})
165
- response = @connection.csreq("POST",@svrmgmthost,"#{@svrmgmtpath}/images",@svrmgmtport,@svrmgmtscheme,{'content-type' => 'application/json'},data)
164
+ data = JSON.generate(:createImage => {:name => name})
165
+ response = @connection.csreq("POST",@svrmgmthost,"#{@svrmgmtpath}/servers/#{URI.encode(self.id.to_s)}/action",@svrmgmtport,@svrmgmtscheme,{'content-type' => 'application/json'},data)
166
166
  OpenStack::Compute::Exception.raise_exception(response) unless response.code.match(/^20.$/)
167
- OpenStack::Compute::Image.new(@connection,JSON.parse(response.body)['image']['id'])
167
+ image_id = response["Location"].scan(/.*\/(.*)/).flatten
168
+ OpenStack::Compute::Image.new(@connection, image_id)
168
169
  end
169
170
 
170
171
  # Resizes the server to the size contained in the server flavor found at ID flavorRef. The server name, ID number, and IP addresses
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstack-compute
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 0
10
- version: 1.1.0
9
+ - 1
10
+ version: 1.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dan Prince