occi-cli 4.2.0.beta.10 → 4.2.0.beta.11

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 07c20aa7d78d97f71d38b5864e8171f87518cd28
4
- data.tar.gz: 6d71a666b9d39ccd5bc5c83777131743c723bf9c
3
+ metadata.gz: b54d0223fb76443e72601cd87d6df9d0aafed156
4
+ data.tar.gz: 671984bb540d744450db92fa5399bb3ccaf5f624
5
5
  SHA512:
6
- metadata.gz: ac651f1a84eb8a2266ad2f49398a95b683016b0a5610f75f168165784ec660d1a7c2b76f60295f5e1ec01e29d3feae0c54554fb23e1c60e240b9f1ffd7116e73
7
- data.tar.gz: 03eb7bd97cb212d3f289f4806a78f0a4286bd6a04ecb71a2681afb9b1cbf9923d7e10ee45f263c8b4e17b1e5107dec9a22da06bcb4b4eccc25239dbfa2e0ccbe
6
+ metadata.gz: de066e40000d7a346c873c484ba615ff1a75fbb343add9802a46397883a598c64c9604e73f04d4fe95d524f961bc3479eb3b37ddb6ddaaf2b99c14589f5feca4
7
+ data.tar.gz: 62276194ab5fc31ae431c4d69e247630f2fe96440dc4f21d02dcd3244b750bc4ad4ac63f8dd3c1f5e84ea1f5456ce9da76cb6556c4650c29f25b87d49027c8b5
@@ -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 -%>
@@ -1,5 +1,5 @@
1
1
  module Occi
2
2
  module Cli
3
- VERSION = "4.2.0.beta.10" unless defined?(::Occi::Cli::VERSION)
3
+ VERSION = "4.2.0.beta.11" unless defined?(::Occi::Cli::VERSION)
4
4
  end
5
5
  end
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.2.0.beta.10
4
+ version: 4.2.0.beta.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Feldhaus