occi-cli 4.2.0.beta.10 → 4.2.0.beta.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/occi/cli/occi_opts.rb +9 -0
- data/lib/occi/cli/templates/mixins.erb +1 -1
- data/lib/occi/cli/templates/resources.erb +7 -2
- data/lib/occi/cli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b54d0223fb76443e72601cd87d6df9d0aafed156
|
4
|
+
data.tar.gz: 671984bb540d744450db92fa5399bb3ccaf5f624
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de066e40000d7a346c873c484ba615ff1a75fbb343add9802a46397883a598c64c9604e73f04d4fe95d524f961bc3479eb3b37ddb6ddaaf2b99c14589f5feca4
|
7
|
+
data.tar.gz: 62276194ab5fc31ae431c4d69e247630f2fe96440dc4f21d02dcd3244b750bc4ad4ac63f8dd3c1f5e84ea1f5456ce9da76cb6556c4650c29f25b87d49027c8b5
|
data/lib/occi/cli/occi_opts.rb
CHANGED
@@ -45,6 +45,14 @@ module Occi::Cli
|
|
45
45
|
options.auth.type = auth.to_s
|
46
46
|
end
|
47
47
|
|
48
|
+
opts.on("-k",
|
49
|
+
"--timeout SEC",
|
50
|
+
Integer,
|
51
|
+
"Default timeout for all HTTP connections, in seconds") do |timeout|
|
52
|
+
raise "Timeout has to be a number larger than 0!" if timeout < 1
|
53
|
+
options.timeout = timeout
|
54
|
+
end
|
55
|
+
|
48
56
|
opts.on("-u",
|
49
57
|
"--username USER",
|
50
58
|
String,
|
@@ -297,6 +305,7 @@ module Occi::Cli
|
|
297
305
|
options.dump_model = false
|
298
306
|
|
299
307
|
options.endpoint = "http://localhost:3000"
|
308
|
+
options.timeout = nil
|
300
309
|
|
301
310
|
options.auth = {}
|
302
311
|
options.auth.type = "none"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%- # We always get Occi::Core::Mixins -%>
|
2
|
+
<%- unless occi_resources.blank? -%><%= '#' * (HighLine::SystemExtensions.terminal_size.first - 1) %><%- end %>
|
2
3
|
<%- occi_resources.each do |mixin| -%>
|
3
|
-
<%= '#' * (HighLine::SystemExtensions.terminal_size.first - 1) %>
|
4
4
|
[[ <%= mixin.type_identifier %> ]]
|
5
5
|
title: <%= mixin.title %>
|
6
6
|
term: <%= mixin.term %>
|
@@ -1,13 +1,13 @@
|
|
1
1
|
<%- # We always get Occi::Core::Resources -%>
|
2
|
+
<%- unless occi_resources.blank? -%><%= '#' * (HighLine::SystemExtensions.terminal_size.first - 1) %><%- end %>
|
2
3
|
<%- occi_resources.each do |resource| -%>
|
3
|
-
<%= '#' * (HighLine::SystemExtensions.terminal_size.first - 1) %>
|
4
4
|
[[ <%= resource.kind.type_identifier %> ]]
|
5
5
|
<%- resource.attributes.names.each_pair do |attribute, value| -%>
|
6
6
|
<%= attribute %> = <%= value %>
|
7
7
|
<%- end -%>
|
8
8
|
|
9
9
|
Links:
|
10
|
-
<%- resource.links.each do |link| %>
|
10
|
+
<%- resource.links.to_a.reject { |l| l.rel && l.rel.to_s.match(/^\S+\/action#\S+$/) }.each do |link| %>
|
11
11
|
[[ <%= link.kind.type_identifier %> ]]
|
12
12
|
<%- link.attributes.names.each_pair do |attribute, value| -%>
|
13
13
|
<%= attribute %> = <%= value %>
|
@@ -21,6 +21,11 @@ Mixins:
|
|
21
21
|
term: <%= mixin.term %>
|
22
22
|
location: <%= mixin.location %>
|
23
23
|
<%- end -%>
|
24
|
+
|
25
|
+
Actions:
|
26
|
+
<%- resource.links.to_a.select { |l| l.rel && l.rel.to_s.match(/^\S+\/action#\S+$/) }.each do |action| %>
|
27
|
+
[[ <%= action.rel.to_s %> ]]
|
28
|
+
<%- end -%>
|
24
29
|
<%= '#' * (HighLine::SystemExtensions.terminal_size.first - 1) -%>
|
25
30
|
|
26
31
|
<%- end -%>
|
data/lib/occi/cli/version.rb
CHANGED