occi-cli 4.2.0.beta.18 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/bin/occi +15 -11
- data/lib/occi/cli/version.rb +1 -1
- data/occi-cli.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65e10804d47573dec0a66e2b3c787414f459de59
|
4
|
+
data.tar.gz: 54c7e23213d0571c2a702f1a7869e5f761f462c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb575a9516a736fa9bafb3e71f9a4920c564953ce1588d18dc499a6590398df5130fbd064b519dd6a08574b4284be017e228438cec972b2313b9f207ce1717d3
|
7
|
+
data.tar.gz: 9eb16ad029683427ff326ca544715155e7bd12b2a4e11d9141bf17e1997178d8fb1a8030b5b780e55f696eb2a50de5c9c1278ee0cc8e8901cca84ed5c78f7fc9
|
data/.travis.yml
CHANGED
data/bin/occi
CHANGED
@@ -33,7 +33,7 @@ options.log[:logger] = logger.api_log
|
|
33
33
|
output = Occi::Cli::ResourceOutputFactory.new options.output_format
|
34
34
|
|
35
35
|
Occi::Cli::Log.info "Starting OCCI client ..."
|
36
|
-
Occi::Cli::Log.debug "Options: #{options}"
|
36
|
+
Occi::Cli::Log.debug "Options: #{options.inspect}"
|
37
37
|
|
38
38
|
# running with an empty password, we should ask the user for one
|
39
39
|
# if auth method is not "none"
|
@@ -49,7 +49,7 @@ end
|
|
49
49
|
|
50
50
|
# establish a connection
|
51
51
|
begin
|
52
|
-
Occi::Cli::Log.info "Establishing a connection to #{options.endpoint} ..."
|
52
|
+
Occi::Cli::Log.info "Establishing a connection to #{options.endpoint.inspect} ..."
|
53
53
|
|
54
54
|
options.auto_connect = true
|
55
55
|
connect :http, options
|
@@ -73,13 +73,13 @@ rescue OpenSSL::PKey::RSAError => key_ex
|
|
73
73
|
rescue Errno::ECONNREFUSED
|
74
74
|
# the remote server has refused our connection attempt(s)
|
75
75
|
# there is nothing we can do ...
|
76
|
-
Occi::Cli::Log.fatal "Connection refused by #{options.endpoint}!"
|
76
|
+
Occi::Cli::Log.fatal "Connection refused by #{options.endpoint.inspect}!"
|
77
77
|
exit!
|
78
|
-
rescue Errno::ETIMEDOUT
|
78
|
+
rescue Errno::ETIMEDOUT, Net::OpenTimeout, Net::ReadTimeout
|
79
79
|
# connection attempt timed out
|
80
|
-
Occi::Cli::Log.fatal "Connection to #{options.endpoint} timed out!"
|
80
|
+
Occi::Cli::Log.fatal "Connection to #{options.endpoint.inspect} timed out!"
|
81
81
|
exit!
|
82
|
-
rescue
|
82
|
+
rescue => ex
|
83
83
|
# something went wrong during the execution
|
84
84
|
# hide the stack trace in non-debug modes
|
85
85
|
Occi::Cli::Log.fatal "An error occurred! Message: #{ex.message}"
|
@@ -101,7 +101,7 @@ if options.dump_model
|
|
101
101
|
# iterate through available instance variables
|
102
102
|
collection.instance_variables.each do |inst_var_sym|
|
103
103
|
puts "#"*79
|
104
|
-
puts "Dumping #{inst_var_sym.to_s}:"
|
104
|
+
puts "Dumping #{inst_var_sym.to_s.inspect}:"
|
105
105
|
|
106
106
|
inst_var = collection.instance_variable_get(inst_var_sym)
|
107
107
|
next unless inst_var.respond_to? :each
|
@@ -130,7 +130,7 @@ end
|
|
130
130
|
# start executing actions
|
131
131
|
begin
|
132
132
|
|
133
|
-
Occi::Cli::Log.info "Executing action #{options.action.
|
133
|
+
Occi::Cli::Log.info "Executing action #{options.action.inspect} on #{options.resource.inspect} ..."
|
134
134
|
|
135
135
|
# call the appropriate helper and then format its output
|
136
136
|
case options.action
|
@@ -151,15 +151,19 @@ begin
|
|
151
151
|
when :skip, :test, :dry_run
|
152
152
|
Occi::Cli::Log.info "Just a connection test ..."
|
153
153
|
else
|
154
|
-
raise "Unknown action
|
154
|
+
raise "Unknown action #{options.action.inspect}!"
|
155
155
|
end
|
156
156
|
|
157
157
|
rescue Errno::ECONNREFUSED
|
158
158
|
# remote server refused our connection attempt(s)
|
159
159
|
# even though initial connect was successful
|
160
|
-
Occi::Cli::Log.fatal "Connection refused by #{options.endpoint}!"
|
160
|
+
Occi::Cli::Log.fatal "Connection refused by #{options.endpoint.inspect}!"
|
161
161
|
exit!
|
162
|
-
rescue
|
162
|
+
rescue Errno::ETIMEDOUT, Net::OpenTimeout, Net::ReadTimeout
|
163
|
+
# connection attempt timed out
|
164
|
+
Occi::Cli::Log.fatal "Connection to #{options.endpoint.inspect} timed out!"
|
165
|
+
exit!
|
166
|
+
rescue => ex
|
163
167
|
# something went wrong during the execution
|
164
168
|
# hide the stack trace in non-debug modes
|
165
169
|
Occi::Cli::Log.fatal "An error occurred! Message: #{ex.message}"
|
data/lib/occi/cli/version.rb
CHANGED
data/occi-cli.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
|
|
19
19
|
gem.test_files = `git ls-files -- {test,spec}/*`.split("\n")
|
20
20
|
gem.require_paths = ["lib"]
|
21
21
|
|
22
|
-
gem.add_dependency 'occi-api', '
|
22
|
+
gem.add_dependency 'occi-api', '~> 4.2.0'
|
23
23
|
gem.add_dependency 'json'
|
24
24
|
gem.add_dependency 'highline'
|
25
25
|
|
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
|
4
|
+
version: 4.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Feldhaus
|
@@ -16,16 +16,16 @@ dependencies:
|
|
16
16
|
name: occi-api
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 4.2.0
|
21
|
+
version: 4.2.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
|
-
- -
|
26
|
+
- - ~>
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 4.2.0
|
28
|
+
version: 4.2.0
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: json
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -118,9 +118,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
118
118
|
version: 1.9.3
|
119
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
|
-
- - '
|
121
|
+
- - '>='
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version:
|
123
|
+
version: '0'
|
124
124
|
requirements: []
|
125
125
|
rubyforge_project:
|
126
126
|
rubygems_version: 2.1.11
|