occi-cli 4.2.0.beta.15 → 4.2.0.beta.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/occi +17 -17
- data/lib/occi/cli/helpers/create_helper.rb +12 -12
- data/lib/occi/cli/helpers/delete_helper.rb +3 -3
- data/lib/occi/cli/helpers/describe_helper.rb +4 -4
- data/lib/occi/cli/helpers/link_helper.rb +3 -3
- data/lib/occi/cli/helpers/list_helper.rb +3 -3
- data/lib/occi/cli/helpers/trigger_helper.rb +4 -4
- data/lib/occi/cli/log.rb +31 -0
- data/lib/occi/cli/occi_opts.rb +4 -4
- data/lib/occi/cli/version.rb +1 -1
- data/lib/occi-cli.rb +2 -1
- data/occi-cli.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ae47add82d1e227122778d88ee9a300dfb63873
|
4
|
+
data.tar.gz: 938818b0e0210f0fd3dfe7c90d546f4da81b1829
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73dca9cb77e9018df43f469db3253f688915407c842c1c896d95562bea9394f02149ad1308f56dd8b47f254a7cb30b8b67ae365d40217f9fe4edaf6e8f63f95c
|
7
|
+
data.tar.gz: 0d8c8f459612f1bbf8ffc150252805baf6399cff58f5e5471084a79d47830cfcf1c08678d1f2af980947a48b18fcb22f656a9a1dd5f86bd05e5b2090b6483e9e
|
data/bin/occi
CHANGED
@@ -25,20 +25,20 @@ require 'occi-cli'
|
|
25
25
|
options = Occi::Cli::OcciOpts.parse ARGV
|
26
26
|
|
27
27
|
# initialize logger
|
28
|
-
logger = Occi::Log.new(options.log[:out])
|
28
|
+
logger = Occi::Cli::Log.new(options.log[:out])
|
29
29
|
logger.level = options.log[:level]
|
30
|
-
options.log[:logger] = logger
|
30
|
+
options.log[:logger] = logger.api_log
|
31
31
|
|
32
32
|
# initialize output factory
|
33
33
|
output = Occi::Cli::ResourceOutputFactory.new options.output_format
|
34
34
|
|
35
|
-
Occi::Log.info "Starting OCCI client ..."
|
36
|
-
Occi::Log.debug "Options: #{options}"
|
35
|
+
Occi::Cli::Log.info "Starting OCCI client ..."
|
36
|
+
Occi::Cli::Log.debug "Options: #{options}"
|
37
37
|
|
38
38
|
# running with an empty password, we should ask the user for one
|
39
39
|
# if auth method is not "none"
|
40
40
|
if options.auth[:password].nil? || options.auth[:user_cert_password].nil?
|
41
|
-
Occi::Log.debug "Password is not set, asking for it now ..."
|
41
|
+
Occi::Cli::Log.debug "Password is not set, asking for it now ..."
|
42
42
|
|
43
43
|
options.auth[:user_cert_password] = ask("Enter a password: ") {
|
44
44
|
|q| q.echo = '*'
|
@@ -49,14 +49,14 @@ end
|
|
49
49
|
|
50
50
|
# establish a connection
|
51
51
|
begin
|
52
|
-
Occi::Log.info "Establishing a connection to #{options.endpoint} ..."
|
52
|
+
Occi::Cli::Log.info "Establishing a connection to #{options.endpoint} ..."
|
53
53
|
|
54
54
|
options.auto_connect = true
|
55
55
|
connect :http, options
|
56
56
|
rescue OpenSSL::SSL::SSLError => ssl_ex
|
57
57
|
# generic SSL error raised whilst establishing a connection
|
58
58
|
# possibly an untrusted server cert or invalid user credentials
|
59
|
-
Occi::Log.fatal "An SSL error occurred! Please, make sure your credentials " \
|
59
|
+
Occi::Cli::Log.fatal "An SSL error occurred! Please, make sure your credentials " \
|
60
60
|
"are valid and recognized by the endpoint! Message: #{ssl_ex.message}"
|
61
61
|
|
62
62
|
raise ssl_ex if options.debug
|
@@ -64,7 +64,7 @@ rescue OpenSSL::SSL::SSLError => ssl_ex
|
|
64
64
|
rescue OpenSSL::PKey::RSAError => key_ex
|
65
65
|
# generic X509 error raised whilst reading user's credentials from a file
|
66
66
|
# possibly a wrong password or mangled/unsupported credential format
|
67
|
-
Occi::Log.fatal "An X509 error occurred! Please, make sure you are using the " \
|
67
|
+
Occi::Cli::Log.fatal "An X509 error occurred! Please, make sure you are using the " \
|
68
68
|
"right password and the file contains both your certificate " \
|
69
69
|
"and your private key! Message: #{key_ex.message}"
|
70
70
|
|
@@ -73,16 +73,16 @@ 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::Log.fatal "Connection refused by #{options.endpoint}!"
|
76
|
+
Occi::Cli::Log.fatal "Connection refused by #{options.endpoint}!"
|
77
77
|
exit!
|
78
78
|
rescue Errno::ETIMEDOUT
|
79
79
|
# connection attempt timed out
|
80
|
-
Occi::Log.fatal "Connection to #{options.endpoint} timed out!"
|
80
|
+
Occi::Cli::Log.fatal "Connection to #{options.endpoint} timed out!"
|
81
81
|
exit!
|
82
82
|
rescue Exception => ex
|
83
83
|
# something went wrong during the execution
|
84
84
|
# hide the stack trace in non-debug modes
|
85
|
-
Occi::Log.fatal "An error occurred! Message: #{ex.message}"
|
85
|
+
Occi::Cli::Log.fatal "An error occurred! Message: #{ex.message}"
|
86
86
|
|
87
87
|
raise ex if options.debug
|
88
88
|
exit!
|
@@ -92,7 +92,7 @@ end
|
|
92
92
|
if options.dump_model
|
93
93
|
|
94
94
|
if !model.respond_to? :instance_variables
|
95
|
-
Occi::Log.fatal "Your Ruby doesn't support 'instance_variables' calls!"
|
95
|
+
Occi::Cli::Log.fatal "Your Ruby doesn't support 'instance_variables' calls!"
|
96
96
|
exit!
|
97
97
|
end
|
98
98
|
|
@@ -130,7 +130,7 @@ end
|
|
130
130
|
# start executing actions
|
131
131
|
begin
|
132
132
|
|
133
|
-
Occi::Log.info "Executing action #{options.action.to_s} on #{options.resource} ..."
|
133
|
+
Occi::Cli::Log.info "Executing action #{options.action.to_s} on #{options.resource} ..."
|
134
134
|
|
135
135
|
# call the appropriate helper and then format its output
|
136
136
|
case options.action
|
@@ -149,7 +149,7 @@ begin
|
|
149
149
|
when :refresh
|
150
150
|
refresh
|
151
151
|
when :skip, :test, :dry_run
|
152
|
-
Occi::Log.info "Just a connection test ..."
|
152
|
+
Occi::Cli::Log.info "Just a connection test ..."
|
153
153
|
else
|
154
154
|
raise "Unknown action [#{options.action}]!"
|
155
155
|
end
|
@@ -157,15 +157,15 @@ begin
|
|
157
157
|
rescue Errno::ECONNREFUSED
|
158
158
|
# remote server refused our connection attempt(s)
|
159
159
|
# even though initial connect was successful
|
160
|
-
Occi::Log.fatal "Connection refused by #{options.endpoint}!"
|
160
|
+
Occi::Cli::Log.fatal "Connection refused by #{options.endpoint}!"
|
161
161
|
exit!
|
162
162
|
rescue Exception => ex
|
163
163
|
# something went wrong during the execution
|
164
164
|
# hide the stack trace in non-debug modes
|
165
|
-
Occi::Log.fatal "An error occurred! Message: #{ex.message}"
|
165
|
+
Occi::Cli::Log.fatal "An error occurred! Message: #{ex.message}"
|
166
166
|
|
167
167
|
raise ex if options.debug
|
168
168
|
exit!
|
169
169
|
end
|
170
170
|
|
171
|
-
Occi::Log.info "OCCI client is shutting down ..."
|
171
|
+
Occi::Cli::Log.info "OCCI client is shutting down ..."
|
@@ -6,7 +6,7 @@ module Occi::Cli::Helpers::CreateHelper
|
|
6
6
|
if resource_types.include?(options.resource) || resource_type_identifiers.include?(options.resource)
|
7
7
|
location = helper_create_resource(options)
|
8
8
|
else
|
9
|
-
Occi::Log.warn "I have no idea what #{options.resource.inspect} is ..."
|
9
|
+
Occi::Cli::Log.warn "I have no idea what #{options.resource.inspect} is ..."
|
10
10
|
raise "Unknown resource #{options.resource.inspect}, there is nothing to create here!"
|
11
11
|
end
|
12
12
|
|
@@ -16,11 +16,11 @@ module Occi::Cli::Helpers::CreateHelper
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def helper_create_resource(options)
|
19
|
-
Occi::Log.debug "#{options.resource.inspect} is a resource type."
|
19
|
+
Occi::Cli::Log.debug "#{options.resource.inspect} is a resource type."
|
20
20
|
|
21
21
|
res = resource(options.resource)
|
22
22
|
|
23
|
-
Occi::Log.debug "Creating #{options.resource.inspect}: #{res.inspect}"
|
23
|
+
Occi::Cli::Log.debug "Creating #{options.resource.inspect}: #{res.inspect}"
|
24
24
|
|
25
25
|
helper_create_attach_mixins(options, res)
|
26
26
|
|
@@ -42,14 +42,14 @@ module Occi::Cli::Helpers::CreateHelper
|
|
42
42
|
# TODO: enable check
|
43
43
|
#res.check
|
44
44
|
|
45
|
-
Occi::Log.debug "Creating #{options.resource.inspect}: #{res.inspect}"
|
45
|
+
Occi::Cli::Log.debug "Creating #{options.resource.inspect}: #{res.inspect}"
|
46
46
|
|
47
47
|
create res
|
48
48
|
end
|
49
49
|
|
50
50
|
def helper_create_attach_links(options, res)
|
51
51
|
return unless options.links
|
52
|
-
Occi::Log.debug "with links: #{options.links.inspect}"
|
52
|
+
Occi::Cli::Log.debug "with links: #{options.links.inspect}"
|
53
53
|
|
54
54
|
options.links.each do |link|
|
55
55
|
if link.start_with? options.endpoint
|
@@ -57,10 +57,10 @@ module Occi::Cli::Helpers::CreateHelper
|
|
57
57
|
end
|
58
58
|
|
59
59
|
if link.include? "/storage/"
|
60
|
-
Occi::Log.debug "Adding storagelink to #{options.resource.inspect}"
|
60
|
+
Occi::Cli::Log.debug "Adding storagelink to #{options.resource.inspect}"
|
61
61
|
res.storagelink link
|
62
62
|
elsif link.include? "/network/"
|
63
|
-
Occi::Log.debug "Adding networkinterface to #{options.resource.inspect}"
|
63
|
+
Occi::Cli::Log.debug "Adding networkinterface to #{options.resource.inspect}"
|
64
64
|
res.networkinterface link
|
65
65
|
else
|
66
66
|
raise "Unknown link type #{link.inspect}, stopping here!"
|
@@ -70,10 +70,10 @@ module Occi::Cli::Helpers::CreateHelper
|
|
70
70
|
|
71
71
|
def helper_create_attach_mixins(options, res)
|
72
72
|
return unless options.mixins
|
73
|
-
Occi::Log.debug "with mixins: #{options.mixins.inspect}"
|
73
|
+
Occi::Cli::Log.debug "with mixins: #{options.mixins.inspect}"
|
74
74
|
|
75
75
|
options.mixins.to_a.each do |mxn|
|
76
|
-
Occi::Log.debug "Adding mixin #{mxn.inspect} to #{options.resource.inspect}"
|
76
|
+
Occi::Cli::Log.debug "Adding mixin #{mxn.inspect} to #{options.resource.inspect}"
|
77
77
|
|
78
78
|
orig_mxn = model.get_by_id(mxn.type_identifier)
|
79
79
|
if orig_mxn.blank?
|
@@ -89,7 +89,7 @@ module Occi::Cli::Helpers::CreateHelper
|
|
89
89
|
def helper_create_attach_context_vars(options, res)
|
90
90
|
# TODO: find a better/universal way to do contextualization
|
91
91
|
return unless options.context_vars
|
92
|
-
Occi::Log.debug "with context variables: #{options.context_vars.inspect}"
|
92
|
+
Occi::Cli::Log.debug "with context variables: #{options.context_vars.inspect}"
|
93
93
|
|
94
94
|
options.context_vars.each_pair do |var, val|
|
95
95
|
schema = nil
|
@@ -104,7 +104,7 @@ module Occi::Cli::Helpers::CreateHelper
|
|
104
104
|
schema = "http://schemas.openstack.org/compute/instance#"
|
105
105
|
mxn_attrs['org.openstack.compute.user_data'] = {}
|
106
106
|
else
|
107
|
-
Occi::Log.warn "Unknown context variable! #{var.to_s.inspect}"
|
107
|
+
Occi::Cli::Log.warn "Unknown context variable! #{var.to_s.inspect}"
|
108
108
|
schema = "http://schemas.ogf.org/occi/core#"
|
109
109
|
end
|
110
110
|
|
@@ -118,7 +118,7 @@ module Occi::Cli::Helpers::CreateHelper
|
|
118
118
|
when 'user_data', :user_data
|
119
119
|
res.attributes['org.openstack.compute.user_data'] = val
|
120
120
|
else
|
121
|
-
Occi::Log.warn "Not setting attributes for an unknown context variable! #{var.to_s.inspect}"
|
121
|
+
Occi::Cli::Log.warn "Not setting attributes for an unknown context variable! #{var.to_s.inspect}"
|
122
122
|
end
|
123
123
|
end
|
124
124
|
end
|
@@ -4,16 +4,16 @@ module Occi::Cli::Helpers::DeleteHelper
|
|
4
4
|
unless resource_types.include?(options.resource) || resource_type_identifiers.include?(options.resource) || options.resource.start_with?(options.endpoint) || options.resource.start_with?('/')
|
5
5
|
message = "Resource #{options.resource.inspect} cannot be deleted!"
|
6
6
|
|
7
|
-
Occi::Log.error message
|
7
|
+
Occi::Cli::Log.error message
|
8
8
|
raise ArgumentError, message
|
9
9
|
end
|
10
10
|
|
11
11
|
if delete(options.resource)
|
12
|
-
Occi::Log.info "Resource #{options.resource.inspect} successfully removed!"
|
12
|
+
Occi::Cli::Log.info "Resource #{options.resource.inspect} successfully removed!"
|
13
13
|
else
|
14
14
|
message = "Failed to remove resource #{options.resource.inspect}!"
|
15
15
|
|
16
|
-
Occi::Log.error message
|
16
|
+
Occi::Cli::Log.error message
|
17
17
|
raise message
|
18
18
|
end
|
19
19
|
|
@@ -2,17 +2,17 @@ module Occi::Cli::Helpers::DescribeHelper
|
|
2
2
|
|
3
3
|
def helper_describe(options, output = nil)
|
4
4
|
if resource_types.include?(options.resource) || resource_type_identifiers.include?(options.resource) || options.resource.start_with?(options.endpoint) || options.resource.start_with?('/')
|
5
|
-
Occi::Log.debug "#{options.resource.inspect} is a resource type, type identifier or an actual resource."
|
5
|
+
Occi::Cli::Log.debug "#{options.resource.inspect} is a resource type, type identifier or an actual resource."
|
6
6
|
|
7
7
|
found = Occi::Core::Resources.new
|
8
8
|
found.merge describe(options.resource)
|
9
9
|
elsif mixin_types.include?(options.resource) || mixin_type_identifiers.include?(options.resource)
|
10
|
-
Occi::Log.debug "#{options.resource.inspect} is a mixin type or type identifier."
|
10
|
+
Occi::Cli::Log.debug "#{options.resource.inspect} is a mixin type or type identifier."
|
11
11
|
|
12
12
|
found = mixins(options.resource)
|
13
13
|
found = mixins(options.resource, true) if found.blank?
|
14
14
|
elsif options.resource.include?('#')
|
15
|
-
Occi::Log.debug "#{options.resource.inspect} might be a specific mixin identifier."
|
15
|
+
Occi::Cli::Log.debug "#{options.resource.inspect} might be a specific mixin identifier."
|
16
16
|
|
17
17
|
potential_mixin = options.resource.split('/').last.split('#')
|
18
18
|
raise "Given resource is not a specific mixin identifier! #{options.resource.inspect}" unless potential_mixin.size == 2
|
@@ -23,7 +23,7 @@ module Occi::Cli::Helpers::DescribeHelper
|
|
23
23
|
found = Occi::Core::Mixins.new
|
24
24
|
found << mxn
|
25
25
|
else
|
26
|
-
Occi::Log.error "I have no idea what #{options.resource.inspect} is ..."
|
26
|
+
Occi::Cli::Log.error "I have no idea what #{options.resource.inspect} is ..."
|
27
27
|
raise "Unknown resource #{options.resource.inspect}, there is nothing to describe here!"
|
28
28
|
end
|
29
29
|
|
@@ -42,7 +42,7 @@ module Occi::Cli::Helpers::LinkHelper
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def helper_link_create_link(options, link_kind, link)
|
45
|
-
Occi::Log.debug "Linking #{link.inspect} to #{options.resource.inspect}"
|
45
|
+
Occi::Cli::Log.debug "Linking #{link.inspect} to #{options.resource.inspect}"
|
46
46
|
|
47
47
|
link_instance = Occi::Core::Link.new(link_kind)
|
48
48
|
link_instance.source = sanitize_instance_link(options.resource)
|
@@ -60,10 +60,10 @@ module Occi::Cli::Helpers::LinkHelper
|
|
60
60
|
def helper_link_attach_mixins(mixins, link)
|
61
61
|
return if mixins.blank?
|
62
62
|
|
63
|
-
Occi::Log.debug "with mixins: #{mixins.inspect}"
|
63
|
+
Occi::Cli::Log.debug "with mixins: #{mixins.inspect}"
|
64
64
|
|
65
65
|
mixins.to_a.each do |mxn|
|
66
|
-
Occi::Log.debug "Adding mixin #{mxn.inspect} to #{link.inspect}"
|
66
|
+
Occi::Cli::Log.debug "Adding mixin #{mxn.inspect} to #{link.inspect}"
|
67
67
|
|
68
68
|
orig_mxn = model.get_by_id(mxn.type_identifier)
|
69
69
|
if orig_mxn.blank?
|
@@ -4,13 +4,13 @@ module Occi::Cli::Helpers::ListHelper
|
|
4
4
|
found = []
|
5
5
|
|
6
6
|
if resource_types.include?(options.resource) || resource_type_identifiers.include?(options.resource)
|
7
|
-
Occi::Log.debug "#{options.resource.inspect} is a resource type."
|
7
|
+
Occi::Cli::Log.debug "#{options.resource.inspect} is a resource type."
|
8
8
|
found = list options.resource
|
9
9
|
elsif mixin_types.include?(options.resource) || mixin_type_identifiers.include?(options.resource)
|
10
|
-
Occi::Log.debug "#{options.resource.inspect} is a mixin type."
|
10
|
+
Occi::Cli::Log.debug "#{options.resource.inspect} is a mixin type."
|
11
11
|
found = mixin_list options.resource
|
12
12
|
else
|
13
|
-
Occi::Log.error "I have no idea what #{options.resource.inspect} is ..."
|
13
|
+
Occi::Cli::Log.error "I have no idea what #{options.resource.inspect} is ..."
|
14
14
|
raise "Unknown resource #{options.resource.inspect}, there is nothing to list here!"
|
15
15
|
end
|
16
16
|
|
@@ -4,7 +4,7 @@ module Occi::Cli::Helpers::TriggerHelper
|
|
4
4
|
unless resource_types.include?(options.resource) || resource_type_identifiers.include?(options.resource) \
|
5
5
|
|| \
|
6
6
|
options.resource.start_with?(options.endpoint) || options.resource.start_with?('/')
|
7
|
-
Occi::Log.error "I have no idea what #{options.resource.inspect} is ..."
|
7
|
+
Occi::Cli::Log.error "I have no idea what #{options.resource.inspect} is ..."
|
8
8
|
raise "Unknown resource #{options.resource.inspect}, there is nothing to trigger here!"
|
9
9
|
end
|
10
10
|
|
@@ -13,11 +13,11 @@ module Occi::Cli::Helpers::TriggerHelper
|
|
13
13
|
action_instance.attributes = options.attributes
|
14
14
|
|
15
15
|
if trigger(options.resource, action_instance)
|
16
|
-
Occi::Log.info "Action #{options.trigger_action.type_identifier.inspect} " \
|
16
|
+
Occi::Cli::Log.info "Action #{options.trigger_action.type_identifier.inspect} " \
|
17
17
|
"triggered on #{options.resource.inspect}!"
|
18
18
|
else
|
19
19
|
message = "Failed to trigger an action on #{options.resource.inspect}!"
|
20
|
-
Occi::Log.error message
|
20
|
+
Occi::Cli::Log.error message
|
21
21
|
raise message
|
22
22
|
end
|
23
23
|
|
@@ -30,7 +30,7 @@ module Occi::Cli::Helpers::TriggerHelper
|
|
30
30
|
ti = action_type_identifier(action.term)
|
31
31
|
if ti.blank?
|
32
32
|
message = "Failed to identify action #{action.type_identifier.inspect} in the model!"
|
33
|
-
Occi::Log.error message
|
33
|
+
Occi::Cli::Log.error message
|
34
34
|
raise message
|
35
35
|
end
|
36
36
|
|
data/lib/occi/cli/log.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'logger'
|
2
|
+
|
3
|
+
module Occi::Cli
|
4
|
+
class Log < ::Occi::Log
|
5
|
+
|
6
|
+
SUBSCRIPTION_HANDLE = "rOCCI-cli.log"
|
7
|
+
|
8
|
+
attr_reader :api_log
|
9
|
+
|
10
|
+
def initialize(log_dev, log_prefix = '[rOCCI-cli]')
|
11
|
+
@api_log = ::Occi::Api::Log.new(log_dev)
|
12
|
+
super
|
13
|
+
end
|
14
|
+
|
15
|
+
def close
|
16
|
+
super
|
17
|
+
@api_log.close
|
18
|
+
end
|
19
|
+
|
20
|
+
# @param severity [::Logger::Severity] severity
|
21
|
+
def level=(severity)
|
22
|
+
@api_log.level = severity
|
23
|
+
super
|
24
|
+
end
|
25
|
+
|
26
|
+
def core_log
|
27
|
+
@api_log.core_log
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
data/lib/occi/cli/occi_opts.rb
CHANGED
@@ -212,8 +212,8 @@ module Occi::Cli
|
|
212
212
|
"--log-level LEVEL",
|
213
213
|
LOG_LEVELS,
|
214
214
|
"Set the specified logging level, only: [#{LOG_LEVELS.join('|')}]") do |log_level|
|
215
|
-
unless options.log.level == Occi::Log::DEBUG
|
216
|
-
options.log.level = Occi::Log.const_get(log_level.to_s.upcase)
|
215
|
+
unless options.log.level == Occi::Cli::Log::DEBUG
|
216
|
+
options.log.level = Occi::Cli::Log.const_get(log_level.to_s.upcase)
|
217
217
|
end
|
218
218
|
end
|
219
219
|
|
@@ -243,7 +243,7 @@ module Occi::Cli
|
|
243
243
|
"--debug",
|
244
244
|
"Enable debugging messages") do |debug|
|
245
245
|
options.debug = debug
|
246
|
-
options.log.level = Occi::Log::DEBUG
|
246
|
+
options.log.level = Occi::Cli::Log::DEBUG
|
247
247
|
end
|
248
248
|
|
249
249
|
opts.on_tail("-h",
|
@@ -299,7 +299,7 @@ module Occi::Cli
|
|
299
299
|
|
300
300
|
options.log = {}
|
301
301
|
options.log.out = STDERR
|
302
|
-
options.log.level = Occi::Log::ERROR
|
302
|
+
options.log.level = Occi::Cli::Log::ERROR
|
303
303
|
|
304
304
|
options.filter = nil
|
305
305
|
options.dump_model = false
|
data/lib/occi/cli/version.rb
CHANGED
data/lib/occi-cli.rb
CHANGED
@@ -4,6 +4,7 @@ require 'occi-api'
|
|
4
4
|
module Occi::Cli; end
|
5
5
|
|
6
6
|
require 'occi/cli/version'
|
7
|
+
require 'occi/cli/log'
|
7
8
|
require 'occi/cli/errors'
|
8
9
|
require 'occi/cli/resource_output_factory'
|
9
10
|
require 'occi/cli/occi_opts'
|
@@ -12,4 +13,4 @@ require 'occi/cli/occi_opts'
|
|
12
13
|
extend Occi::Api::Dsl
|
13
14
|
|
14
15
|
# include helpers
|
15
|
-
require 'occi/cli/helpers'
|
16
|
+
require 'occi/cli/helpers'
|
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', '= 4.2.0.beta.
|
22
|
+
gem.add_dependency 'occi-api', '= 4.2.0.beta.15'
|
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.beta.
|
4
|
+
version: 4.2.0.beta.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Feldhaus
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-02-
|
13
|
+
date: 2014-02-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: occi-api
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 4.2.0.beta.
|
21
|
+
version: 4.2.0.beta.15
|
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.beta.
|
28
|
+
version: 4.2.0.beta.15
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: json
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- lib/occi/cli/helpers/link_helper.rb
|
91
91
|
- lib/occi/cli/helpers/list_helper.rb
|
92
92
|
- lib/occi/cli/helpers/trigger_helper.rb
|
93
|
+
- lib/occi/cli/log.rb
|
93
94
|
- lib/occi/cli/occi_opts.rb
|
94
95
|
- lib/occi/cli/occi_opts/cli_examples.erb
|
95
96
|
- lib/occi/cli/occi_opts/occi_opts_helper.rb
|