omf_rc 6.1.1.pre → 6.1.1
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 +13 -5
- data/Rakefile +2 -0
- data/lib/omf_rc/resource_proxy/application.rb +11 -4
- data/lib/omf_rc/util/sysfs.rb +1 -1
- metadata +15 -44
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MDc2ZGUxY2Y1M2IzM2RjNGNkYmFhZmZjYjFmZWJkZjUzNGI5NDU5ZA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MTliNjA1NmMxNWEzNzc0Mjc4NTBiZjAzZGMzZjQwZTQ4NTk0OWNjMg==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZjA3MTIxNjlkZDdiYTI1OGM0ZjY3ZmVhNjAxYzEwMzJhZDYyMDhjYThlYTU4
|
10
|
+
NTRjNTg4ZDlhZDhmZTQ4ZGRmN2I2YzQ5NzVkMDJhNGFhMjJlODExZTA4YmUw
|
11
|
+
NTkzYzViZjQzNGVhNzVjMTNjMDNiMWI1NTEzY2ZlMmRhZmM4MWM=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MDk2NGU3M2JlYWI3ZTlhNmRmY2VlMGEwZThmYzJjY2FhNmYzMzViODczNjU0
|
14
|
+
MmY0OTI5ZGJlOWVlY2FiZDE2NDI2YmMxY2MyZTMxZTJiNzQxZDRjNTExZmMz
|
15
|
+
Yzc1NDdmNDg5MTU2YjMzZGEwNDU3ZWE2NTY5NDM3ODQ5YTQ3ZTQ=
|
data/Rakefile
CHANGED
@@ -26,6 +26,7 @@
|
|
26
26
|
# - environment (Hash) the environment variables to set prior to starting
|
27
27
|
# this app. { k1 => v1, ... } will result in "env -i K1=v1 ... "
|
28
28
|
# (with k1 being either a String or a Symbol)
|
29
|
+
# - clean_env (Boolean) if true, application will be executed in a clean environment (env -i). Default is TRUE.
|
29
30
|
# - use_oml (Boolean) if true enable OML for this application (default false)
|
30
31
|
# - oml_loglevel (Integer) set a specific OML log level (default unset)
|
31
32
|
# - oml_logfile (String) set a specific path for OML log file (default unset)
|
@@ -101,6 +102,7 @@ module OmfRc::ResourceProxy::Application
|
|
101
102
|
property :event_sequence, :default => 0
|
102
103
|
property :parameters, :default => Hashie::Mash.new
|
103
104
|
property :environments, :default => Hashie::Mash.new
|
105
|
+
property :clean_env, :default => true
|
104
106
|
property :use_oml, :default => false
|
105
107
|
property :oml_configfile, :default => nil
|
106
108
|
property :oml, :default => Hashie::Mash.new
|
@@ -472,11 +474,16 @@ module OmfRc::ResourceProxy::Application
|
|
472
474
|
# @return [String] the full command line
|
473
475
|
# @!macro work
|
474
476
|
work('build_command_line') do |res|
|
475
|
-
|
476
|
-
|
477
|
-
env =
|
478
|
-
|
477
|
+
if res.property.clean_env
|
478
|
+
cmd_line = "env -i " # Start with a 'clean' environment
|
479
|
+
if env = res.defaults(:env)
|
480
|
+
env = env.map {|k,v| "#{k.to_s.upcase}=#{v}"}.join(' ')
|
481
|
+
cmd_line += "#{env} "
|
482
|
+
end
|
483
|
+
else
|
484
|
+
cmd_line = ""
|
479
485
|
end
|
486
|
+
|
480
487
|
res.property.environments.each do |e,v|
|
481
488
|
val = v.kind_of?(String) ? "'#{v}'" : v
|
482
489
|
cmd_line += "#{e.to_s.upcase}=#{val} "
|
data/lib/omf_rc/util/sysfs.rb
CHANGED
@@ -36,7 +36,7 @@ module OmfRc::Util::Sysfs
|
|
36
36
|
# Let's see if the interface is already up
|
37
37
|
# NOTE: THIS MAY NOT BE ROBUST
|
38
38
|
s = `ifconfig #{File.basename(v)}`
|
39
|
-
unless s.empty?
|
39
|
+
unless s.nil? || s.empty?
|
40
40
|
if m = s.match(/inet addr:\s*([0-9.]+)/)
|
41
41
|
device[:ip4] = m[1]
|
42
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omf_rc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.1
|
4
|
+
version: 6.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- NICTA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -42,28 +42,28 @@ dependencies:
|
|
42
42
|
name: pry
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - '>='
|
45
|
+
- - ! '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - '>='
|
52
|
+
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: simplecov
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - '>='
|
59
|
+
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - '>='
|
66
|
+
- - ! '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 6.1.1
|
75
|
+
version: 6.1.1
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 6.1.1
|
82
|
+
version: 6.1.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: cocaine
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,14 +98,14 @@ dependencies:
|
|
98
98
|
name: mocha
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - '>='
|
101
|
+
- - ! '>='
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - '>='
|
108
|
+
- - ! '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
description: Resource controller of OMF, a generic framework for controlling and managing
|
@@ -201,47 +201,18 @@ require_paths:
|
|
201
201
|
- lib
|
202
202
|
required_ruby_version: !ruby/object:Gem::Requirement
|
203
203
|
requirements:
|
204
|
-
- - '>='
|
204
|
+
- - ! '>='
|
205
205
|
- !ruby/object:Gem::Version
|
206
206
|
version: 1.9.3
|
207
207
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
208
208
|
requirements:
|
209
|
-
- - '
|
209
|
+
- - ! '>='
|
210
210
|
- !ruby/object:Gem::Version
|
211
|
-
version:
|
211
|
+
version: '0'
|
212
212
|
requirements: []
|
213
213
|
rubyforge_project: omf_rc
|
214
|
-
rubygems_version: 2.
|
214
|
+
rubygems_version: 2.2.2
|
215
215
|
signing_key:
|
216
216
|
specification_version: 4
|
217
217
|
summary: OMF resource controller
|
218
|
-
test_files:
|
219
|
-
- test/fixture/ip/addr_show
|
220
|
-
- test/fixture/iw/help
|
221
|
-
- test/fixture/iw/info
|
222
|
-
- test/fixture/iw/link
|
223
|
-
- test/fixture/lsmod
|
224
|
-
- test/fixture/omf_rc.simple.yml
|
225
|
-
- test/fixture/omf_rc.yml
|
226
|
-
- test/fixture/oml.hash
|
227
|
-
- test/fixture/oml.spec
|
228
|
-
- test/fixture/oml.xml
|
229
|
-
- test/fixture/sys/class/ieee80211/phy0/device/uevent
|
230
|
-
- test/fixture/sys/class/ieee80211/phy0/uevent
|
231
|
-
- test/fixture/sys/class/net/eth0/device/uevent
|
232
|
-
- test/fixture/sys/class/net/eth0/uevent
|
233
|
-
- test/fixture/sys/class/net/wlan0/device/uevent
|
234
|
-
- test/fixture/sys/class/net/wlan0/uevent
|
235
|
-
- test/omf_rc/deferred_process_spec.rb
|
236
|
-
- test/omf_rc/message_process_error_spec.rb
|
237
|
-
- test/omf_rc/resource_factory_spec.rb
|
238
|
-
- test/omf_rc/resource_proxy/abstract_resource_spec.rb
|
239
|
-
- test/omf_rc/resource_proxy/application_spec.rb
|
240
|
-
- test/omf_rc/resource_proxy/node_spec.rb
|
241
|
-
- test/omf_rc/resource_proxy_dsl_spec.rb
|
242
|
-
- test/omf_rc/runner_spec.rb
|
243
|
-
- test/omf_rc/util/common_tools_spec.rb
|
244
|
-
- test/omf_rc/util/ip_spec.rb
|
245
|
-
- test/omf_rc/util/iw_spec.rb
|
246
|
-
- test/omf_rc/util/mod_spec.rb
|
247
|
-
- test/test_helper.rb
|
218
|
+
test_files: []
|