openstack-compute 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/openstack/compute/server.rb +4 -3
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
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(:
|
165
|
-
response = @connection.csreq("POST",@svrmgmthost,"#{@svrmgmtpath}/
|
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
|
-
|
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:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 1
|
10
|
+
version: 1.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dan Prince
|