occi-cli 4.0.0.beta.1 → 4.0.0.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/occi/cli/helpers.rb +6 -2
- data/lib/occi/cli/occi_opts.rb +5 -1
- data/lib/occi/cli/version.rb +1 -1
- metadata +2 -2
data/lib/occi/cli/helpers.rb
CHANGED
@@ -90,7 +90,9 @@ module Occi::Cli
|
|
90
90
|
Occi::Log.debug "with links: #{options.links}"
|
91
91
|
|
92
92
|
options.links.each do |link|
|
93
|
-
|
93
|
+
if link.start_with? options.endpoint
|
94
|
+
link.gsub!(options.endpoint.chomp('/'), '')
|
95
|
+
end
|
94
96
|
|
95
97
|
if link.include? "/storage/"
|
96
98
|
Occi::Log.debug "Adding storagelink to #{options.resource}"
|
@@ -155,8 +157,10 @@ module Occi::Cli
|
|
155
157
|
end
|
156
158
|
end
|
157
159
|
|
158
|
-
#TODO: set other attributes
|
160
|
+
# TODO: set other attributes
|
161
|
+
# TODO: OCCI-OS uses occi.compute.hostname instead of title
|
159
162
|
res.title = options.attributes[:title]
|
163
|
+
res.hostname = options.attributes[:title]
|
160
164
|
|
161
165
|
Occi::Log.debug "Creating #{options.resource}:\n#{res.inspect}"
|
162
166
|
|
data/lib/occi/cli/occi_opts.rb
CHANGED
@@ -163,6 +163,10 @@ occi --endpoint https://localhost:3300/ --action delete --resource /compute/65sd
|
|
163
163
|
"--resource RESOURCE",
|
164
164
|
String,
|
165
165
|
"Resource to be queried (e.g. network, compute, storage etc.), required") do |resource|
|
166
|
+
# TODO: find a way to remove this OCCI-OS compatibility hack
|
167
|
+
resource = 'os_tpl' if resource == 'os'
|
168
|
+
resource = 'resource_tpl' if resource == 'resource'
|
169
|
+
|
166
170
|
options.resource = resource
|
167
171
|
end
|
168
172
|
|
@@ -199,7 +203,7 @@ occi --endpoint https://localhost:3300/ --action delete --resource /compute/65sd
|
|
199
203
|
end
|
200
204
|
|
201
205
|
if symbol == :user_data
|
202
|
-
context_data = Base64.encode64(context_data)
|
206
|
+
context_data = Base64.encode64(context_data).gsub("\n", '')
|
203
207
|
end
|
204
208
|
|
205
209
|
options.context_vars[symbol] = context_data.strip
|
data/lib/occi/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: occi-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.beta.
|
4
|
+
version: 4.0.0.beta.2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-
|
14
|
+
date: 2013-08-01 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: occi-api
|