omf_rc 6.0.0.pre.8 → 6.0.0.pre.9
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.
- data/bin/install_omf_rc +79 -0
- data/bin/omf_rc +52 -36
- data/config/config.yml +8 -0
- data/init/debian +51 -0
- data/init/fedora +54 -0
- data/init/run_omf_rc.sh +62 -0
- data/init/ubuntu +12 -0
- data/lib/omf_rc/omf_error.rb +5 -5
- data/lib/omf_rc/resource_factory.rb +7 -11
- data/lib/omf_rc/resource_proxy/abstract_resource.rb +327 -228
- data/lib/omf_rc/resource_proxy/application.rb +61 -56
- data/lib/omf_rc/resource_proxy/net.rb +2 -2
- data/lib/omf_rc/resource_proxy/node.rb +11 -2
- data/lib/omf_rc/resource_proxy/virtual_machine.rb +1 -1
- data/lib/omf_rc/resource_proxy/wlan.rb +2 -0
- data/lib/omf_rc/resource_proxy_dsl.rb +22 -1
- data/lib/omf_rc/util/common_tools.rb +2 -4
- data/lib/omf_rc/util/hostapd.rb +4 -3
- data/lib/omf_rc/util/ip.rb +8 -5
- data/lib/omf_rc/util/iw.rb +18 -8
- data/lib/omf_rc/util/sysfs.rb +14 -0
- data/lib/omf_rc/util/vmbuilder.rb +1 -1
- data/lib/omf_rc/util/wpa.rb +4 -3
- data/lib/omf_rc/version.rb +1 -1
- data/lib/omf_rc.rb +3 -1
- data/omf_rc.gemspec +4 -2
- data/test/omf_rc/message_process_error_spec.rb +3 -3
- data/test/omf_rc/resource_factory_spec.rb +14 -7
- data/test/omf_rc/resource_proxy/abstract_resource_spec.rb +47 -21
- data/test/omf_rc/resource_proxy/application_spec.rb +156 -119
- data/test/omf_rc/resource_proxy/mock_spec.rb +6 -1
- data/test/omf_rc/resource_proxy/node_spec.rb +32 -12
- data/test/omf_rc/resource_proxy_dsl_spec.rb +31 -19
- data/test/omf_rc/util/common_tools_spec.rb +8 -11
- data/test/omf_rc/util/ip_spec.rb +7 -1
- data/test/omf_rc/util/iw_spec.rb +18 -13
- data/test/omf_rc/util/mock_spec.rb +6 -1
- data/test/omf_rc/util/mod_spec.rb +17 -10
- data/test/test_helper.rb +3 -0
- metadata +51 -48
- data/config/omf_rc.yml +0 -70
- data/lib/omf_rc/resource_proxy/openflow_slice.rb +0 -79
- data/lib/omf_rc/resource_proxy/openflow_slice_factory.rb +0 -71
@@ -3,7 +3,12 @@ require 'omf_rc/resource_proxy/node'
|
|
3
3
|
|
4
4
|
describe OmfRc::ResourceProxy::Node do
|
5
5
|
before do
|
6
|
-
@
|
6
|
+
@xmpp = MiniTest::Mock.new
|
7
|
+
@xmpp.expect(:subscribe, true, [Array])
|
8
|
+
|
9
|
+
OmfCommon.stub :comm, @xmpp do
|
10
|
+
@node = OmfRc::ResourceFactory.new(:node, hrn: 'node_test')
|
11
|
+
end
|
7
12
|
end
|
8
13
|
|
9
14
|
describe "when included in the resource instance" do
|
@@ -32,26 +37,41 @@ describe OmfRc::ResourceProxy::Node do
|
|
32
37
|
end
|
33
38
|
Dir.stub :glob, glob_proc do
|
34
39
|
@node.request_devices.must_be_kind_of Array
|
35
|
-
@node.request_devices
|
40
|
+
node_devices = @node.request_devices
|
41
|
+
node_devices.size.must_equal 2
|
42
|
+
node_devices[0][:name].must_equal 'eth0'
|
43
|
+
node_devices[1][:name].must_equal 'phy0'
|
36
44
|
end
|
37
45
|
end
|
38
46
|
|
39
47
|
it "must provide a list of created applications" do
|
40
|
-
|
48
|
+
OmfCommon.stub :comm, @xmpp do
|
49
|
+
@xmpp.expect(:subscribe, true, [Array])
|
50
|
+
@node.create(:application, { :uid => 'app_test', :hrn => 'app_test' })
|
41
51
|
|
42
|
-
|
43
|
-
|
44
|
-
|
52
|
+
@node.request_applications.must_equal [
|
53
|
+
{ name: 'app_test', type: :application, uid: 'app_test' }
|
54
|
+
]
|
55
|
+
end
|
45
56
|
end
|
46
57
|
|
47
58
|
it "must provide a list of created interfaces" do
|
48
|
-
|
49
|
-
|
59
|
+
OmfCommon.stub :comm, @xmpp do
|
60
|
+
devices = [
|
61
|
+
{ name: 'eth0', driver: 'e1000e', category: 'net', proxy: 'net' },
|
62
|
+
{ name: 'phy0', driver: 'iwlwifi', category: 'net', subcategory: 'wlan', proxy: 'wlan' }
|
63
|
+
]
|
64
|
+
@node.stub :request_devices, devices do
|
65
|
+
2.times { @xmpp.expect(:subscribe, true, [String]) }
|
66
|
+
@node.create(:wlan, { :uid => 'wlan0', :if_name => 'wlan0' })
|
67
|
+
@node.create(:net, { :uid => 'eth0', :if_name => 'eth0' })
|
50
68
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
69
|
+
@node.request_interfaces.must_equal [
|
70
|
+
{ name: 'eth0', type: :net, uid: 'eth0' },
|
71
|
+
{ name: 'wlan0', type: :wlan, uid: 'wlan0' }
|
72
|
+
]
|
73
|
+
end
|
74
|
+
end
|
55
75
|
end
|
56
76
|
end
|
57
77
|
end
|
@@ -3,6 +3,9 @@ require 'omf_rc/resource_proxy_dsl'
|
|
3
3
|
|
4
4
|
describe OmfRc::ResourceProxyDSL do
|
5
5
|
before do
|
6
|
+
@xmpp = MiniTest::Mock.new
|
7
|
+
@xmpp.expect(:subscribe, true, [String])
|
8
|
+
|
6
9
|
module OmfRc::Util::MockUtility
|
7
10
|
include OmfRc::ResourceProxyDSL
|
8
11
|
|
@@ -67,23 +70,25 @@ describe OmfRc::ResourceProxyDSL do
|
|
67
70
|
end
|
68
71
|
|
69
72
|
it "must be able to define methods" do
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
+
OmfCommon.stub :comm, @xmpp do
|
74
|
+
%w(configure_alpha request_alpha bravo).each do |m|
|
75
|
+
OmfRc::Util::MockUtility.method_defined?(m.to_sym).must_equal true
|
76
|
+
end
|
73
77
|
|
74
|
-
|
75
|
-
|
76
|
-
|
78
|
+
%w(configure_alpha request_alpha before_ready before_release bravo).each do |m|
|
79
|
+
OmfRc::ResourceProxy::MockProxy.method_defined?(m.to_sym).must_equal true
|
80
|
+
end
|
77
81
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
82
|
+
mock_proxy = OmfRc::ResourceFactory.new(:mock_proxy)
|
83
|
+
mock_proxy.request_alpha.must_equal mock_proxy.uid
|
84
|
+
mock_proxy.request_delta.must_equal "printing"
|
85
|
+
mock_proxy.request_charlie.must_equal "working on printing"
|
86
|
+
mock_proxy.bravo("magic", "second parameter") do |v|
|
87
|
+
v.must_equal "working on magic"
|
88
|
+
end
|
89
|
+
mock_proxy.bravo("something", "something else").must_equal "something"
|
90
|
+
mock_proxy.request_zulu(country: 'uk').must_equal "You called zulu with: country"
|
84
91
|
end
|
85
|
-
mock_proxy.bravo("something", "something else").must_equal "something"
|
86
|
-
mock_proxy.request_zulu(country: 'uk').must_equal "You called zulu with: country"
|
87
92
|
end
|
88
93
|
|
89
94
|
it "must be able to include utility" do
|
@@ -104,14 +109,21 @@ describe OmfRc::ResourceProxyDSL do
|
|
104
109
|
end
|
105
110
|
|
106
111
|
it "must check new proxy's create_by option when ask a proxy create a new proxy" do
|
107
|
-
|
108
|
-
|
109
|
-
|
112
|
+
OmfCommon.stub :comm, @xmpp do
|
113
|
+
@xmpp.expect(:subscribe, true, [String])
|
114
|
+
OmfRc::ResourceFactory.new(:mock_root_proxy).create(:mock_proxy)
|
115
|
+
2.times { @xmpp.expect(:subscribe, true, [String]) }
|
116
|
+
OmfRc::ResourceFactory.new(:mock_root_proxy).create(:useless_proxy)
|
117
|
+
2.times { @xmpp.expect(:subscribe, true, [String]) }
|
118
|
+
lambda { OmfRc::ResourceFactory.new(:useless_proxy).create(:mock_proxy) }.must_raise StandardError
|
119
|
+
end
|
110
120
|
end
|
111
121
|
|
112
122
|
it "must be able to define property with default vlaue" do
|
113
|
-
|
114
|
-
|
123
|
+
OmfCommon.stub :comm, @xmpp do
|
124
|
+
mock_proxy = OmfRc::ResourceFactory.new(:mock_proxy)
|
125
|
+
mock_proxy.property.mock_prop.must_equal 1
|
126
|
+
end
|
115
127
|
end
|
116
128
|
end
|
117
129
|
end
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
require 'omf_rc/util/common_tools'
|
3
3
|
|
4
4
|
describe OmfRc::Util::CommonTools do
|
5
|
-
|
5
|
+
|
6
6
|
describe "when included in the resource proxy" do
|
7
7
|
before do
|
8
8
|
module OmfRc::ResourceProxy::Test
|
@@ -10,20 +10,17 @@ describe OmfRc::Util::CommonTools do
|
|
10
10
|
register_proxy :test
|
11
11
|
utility :common_tools
|
12
12
|
end
|
13
|
-
|
14
|
-
@
|
15
|
-
@
|
16
|
-
@stream.expect(:send, true, [Blather::Stanza])
|
17
|
-
@client.post_init @stream, Blather::JID.new('n@d/r')
|
13
|
+
|
14
|
+
@xmpp = MiniTest::Mock.new
|
15
|
+
@xmpp.expect(:subscribe, true, [String])
|
18
16
|
end
|
19
17
|
|
20
18
|
it "must be able to log and inform error/warn messages" do
|
21
|
-
|
19
|
+
OmfCommon.stub :comm, @xmpp do
|
22
20
|
@test = OmfRc::ResourceFactory.new(:test)
|
23
|
-
@
|
24
|
-
|
25
|
-
|
26
|
-
end
|
21
|
+
2.times { @xmpp.expect(:publish, true, [String, OmfCommon::Message]) }
|
22
|
+
@test.log_inform_error "bob"
|
23
|
+
@test.log_inform_warn "bob"
|
27
24
|
end
|
28
25
|
end
|
29
26
|
end
|
data/test/omf_rc/util/ip_spec.rb
CHANGED
@@ -12,8 +12,14 @@ describe OmfRc::Util::Ip do
|
|
12
12
|
utility :ip
|
13
13
|
end
|
14
14
|
|
15
|
-
@
|
15
|
+
@xmpp = MiniTest::Mock.new
|
16
|
+
@xmpp.expect(:subscribe, true, [Array])
|
17
|
+
|
16
18
|
@command = MiniTest::Mock.new
|
19
|
+
|
20
|
+
OmfCommon.stub :comm, @xmpp do
|
21
|
+
@wlan00 = OmfRc::ResourceFactory.new(:ip_test, hrn: 'wlan00')
|
22
|
+
end
|
17
23
|
end
|
18
24
|
|
19
25
|
it "must provide features defined in proxy" do
|
data/test/omf_rc/util/iw_spec.rb
CHANGED
@@ -19,7 +19,12 @@ Cocaine::CommandLine.stub(:new, @command) do
|
|
19
19
|
utility :iw
|
20
20
|
end
|
21
21
|
|
22
|
-
@
|
22
|
+
@xmpp = MiniTest::Mock.new
|
23
|
+
@xmpp.expect(:subscribe, true, [Array])
|
24
|
+
|
25
|
+
OmfCommon.stub :comm, @xmpp do
|
26
|
+
@wlan00 = OmfRc::ResourceFactory.new(:iw_test, hrn: 'wlan00', property: { phy: 'phy00', if_name: 'wlan1' })
|
27
|
+
end
|
23
28
|
end
|
24
29
|
|
25
30
|
it "must provide features defined in proxy" do
|
@@ -54,20 +59,20 @@ Cocaine::CommandLine.stub(:new, @command) do
|
|
54
59
|
|
55
60
|
it "must could initialise wpa config/pid file path" do
|
56
61
|
@wlan00.init_ap_conf_pid
|
57
|
-
@wlan00.request_ap_conf.
|
58
|
-
@wlan00.request_ap_pid.
|
62
|
+
@wlan00.request_ap_conf.must_match /tmp\/hostapd\.wlan1.+\.conf/
|
63
|
+
@wlan00.request_ap_pid.must_match /tmp\/hostapd\.wlan1.+\.pid/
|
59
64
|
end
|
60
65
|
|
61
66
|
it "must could initialise wpa config/pid file path" do
|
62
67
|
@wlan00.init_wpa_conf_pid
|
63
|
-
@wlan00.request_wpa_conf.
|
64
|
-
@wlan00.request_wpa_pid.
|
68
|
+
@wlan00.request_wpa_conf.must_match /tmp\/wpa\.wlan1.+\.conf/
|
69
|
+
@wlan00.request_wpa_pid.must_match /tmp\/wpa\.wlan1.+\.pid/
|
65
70
|
end
|
66
71
|
|
67
72
|
it "could delete current interface" do
|
68
73
|
Cocaine::CommandLine.stub(:new, @command) do
|
69
74
|
@command.expect(:run, true)
|
70
|
-
@wlan00.
|
75
|
+
@wlan00.delete_interface
|
71
76
|
@command.verify
|
72
77
|
end
|
73
78
|
end
|
@@ -92,22 +97,22 @@ Cocaine::CommandLine.stub(:new, @command) do
|
|
92
97
|
3.times { @command.expect(:run, true) }
|
93
98
|
|
94
99
|
@wlan00.configure_mode(mode: 'master', channel: 1, essid: 'bob', hw_mode: 'b')
|
95
|
-
File.open(
|
96
|
-
f.read.must_match "driver=nl80211\ninterface=
|
100
|
+
File.open(@wlan00.property.ap_conf) do |f|
|
101
|
+
f.read.must_match "driver=nl80211\ninterface=wlan1\nssid=bob\nchannel=1\nhw_mode=b\n"
|
97
102
|
end
|
98
103
|
|
99
104
|
3.times { @command.expect(:run, true) }
|
100
105
|
|
101
106
|
@wlan00.configure_mode(mode: 'master', channel: 1, essid: 'bob', hw_mode: 'n')
|
102
|
-
File.open(
|
103
|
-
f.read.must_match "driver=nl80211\ninterface=
|
107
|
+
File.open(@wlan00.property.ap_conf) do |f|
|
108
|
+
f.read.must_match "driver=nl80211\ninterface=wlan1\nssid=bob\nchannel=1\nhw_mode=g\nwmm_enabled=1\nieee80211n=1\nht_capab=\[HT20\-\]\n"
|
104
109
|
end
|
105
110
|
|
106
111
|
3.times { @command.expect(:run, true) }
|
107
112
|
|
108
113
|
@wlan00.configure_mode(mode: 'master', channel: 16, essid: 'bob', hw_mode: 'n')
|
109
|
-
File.open(
|
110
|
-
f.read.must_match "driver=nl80211\ninterface=
|
114
|
+
File.open(@wlan00.property.ap_conf) do |f|
|
115
|
+
f.read.must_match "driver=nl80211\ninterface=wlan1\nssid=bob\nchannel=16\nhw_mode=a\nwmm_enabled=1\nieee80211n=1\nht_capab=\[HT20\-\]\n"
|
111
116
|
end
|
112
117
|
|
113
118
|
@command.verify
|
@@ -119,7 +124,7 @@ Cocaine::CommandLine.stub(:new, @command) do
|
|
119
124
|
3.times { @command.expect(:run, true) }
|
120
125
|
|
121
126
|
@wlan00.configure_mode(mode: 'managed', essid: 'bob')
|
122
|
-
File.open(
|
127
|
+
File.open(@wlan00.property.wpa_conf) do |f|
|
123
128
|
f.read.must_match "network={\n ssid=\"bob\"\n scan_ssid=1\n key_mgmt=NONE\n}"
|
124
129
|
end
|
125
130
|
|
@@ -9,7 +9,12 @@ describe OmfRc::Util::Mock do
|
|
9
9
|
register_proxy :mock_test
|
10
10
|
utility :mock
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
|
+
@xmpp = MiniTest::Mock.new
|
14
|
+
@xmpp.expect(:subscribe, true, [String])
|
15
|
+
OmfCommon.stub :comm, @xmpp do
|
16
|
+
@mock = OmfRc::ResourceFactory.new(:mock_test)
|
17
|
+
end
|
13
18
|
end
|
14
19
|
|
15
20
|
it "must have these demo methods available" do
|
@@ -10,23 +10,30 @@ describe OmfRc::Util::Mod do
|
|
10
10
|
utility :mod
|
11
11
|
end
|
12
12
|
@command = MiniTest::Mock.new
|
13
|
+
@xmpp = MiniTest::Mock.new
|
14
|
+
@xmpp.expect(:subscribe, true, [String])
|
13
15
|
end
|
14
16
|
|
15
17
|
it "will find out a list of modules" do
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
OmfCommon.stub :comm, @xmpp do
|
19
|
+
Cocaine::CommandLine.stub(:new, @command) do
|
20
|
+
@command.expect(:run, fixture("lsmod"))
|
21
|
+
OmfRc::ResourceFactory.new(:mod_test).request_modules.must_include "kvm"
|
22
|
+
@command.expect(:run, fixture("lsmod"))
|
23
|
+
@xmpp.expect(:subscribe, true, [String])
|
24
|
+
OmfRc::ResourceFactory.new(:mod_test).request_modules.wont_include "Module"
|
25
|
+
@command.verify
|
26
|
+
end
|
22
27
|
end
|
23
28
|
end
|
24
29
|
|
25
30
|
it "could load a module" do
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
31
|
+
OmfCommon.stub :comm, @xmpp do
|
32
|
+
Cocaine::CommandLine.stub(:new, @command) do
|
33
|
+
@command.expect(:run, true)
|
34
|
+
OmfRc::ResourceFactory.new(:mod_test).configure_load_module(name: 'magic_module').must_equal "magic_module loaded"
|
35
|
+
@command.verify
|
36
|
+
end
|
30
37
|
end
|
31
38
|
end
|
32
39
|
end
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omf_rc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.0.pre.
|
4
|
+
version: 6.0.0.pre.9
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-03-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: '3.2'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3.2'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: em-minitest-spec
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ~>
|
@@ -32,10 +37,15 @@ dependencies:
|
|
32
37
|
version: 1.1.1
|
33
38
|
type: :development
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.1.1
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: simplecov
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ! '>='
|
@@ -43,10 +53,15 @@ dependencies:
|
|
43
53
|
version: '0'
|
44
54
|
type: :development
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
47
62
|
- !ruby/object:Gem::Dependency
|
48
63
|
name: omf_common
|
49
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
50
65
|
none: false
|
51
66
|
requirements:
|
52
67
|
- - ~>
|
@@ -54,10 +69,15 @@ dependencies:
|
|
54
69
|
version: 6.0.0.pre
|
55
70
|
type: :runtime
|
56
71
|
prerelease: false
|
57
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 6.0.0.pre
|
58
78
|
- !ruby/object:Gem::Dependency
|
59
79
|
name: cocaine
|
60
|
-
requirement:
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
61
81
|
none: false
|
62
82
|
requirements:
|
63
83
|
- - ~>
|
@@ -65,12 +85,18 @@ dependencies:
|
|
65
85
|
version: 0.3.0
|
66
86
|
type: :runtime
|
67
87
|
prerelease: false
|
68
|
-
version_requirements:
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 0.3.0
|
69
94
|
description: Resource controller of OMF, a generic framework for controlling and managing
|
70
95
|
networking testbeds.
|
71
96
|
email:
|
72
97
|
- omf-user@lists.nicta.com.au
|
73
98
|
executables:
|
99
|
+
- install_omf_rc
|
74
100
|
- omf_rc
|
75
101
|
extensions: []
|
76
102
|
extra_rdoc_files: []
|
@@ -78,8 +104,13 @@ files:
|
|
78
104
|
- .gitignore
|
79
105
|
- Gemfile
|
80
106
|
- Rakefile
|
107
|
+
- bin/install_omf_rc
|
81
108
|
- bin/omf_rc
|
82
|
-
- config/
|
109
|
+
- config/config.yml
|
110
|
+
- init/debian
|
111
|
+
- init/fedora
|
112
|
+
- init/run_omf_rc.sh
|
113
|
+
- init/ubuntu
|
83
114
|
- lib/omf_rc.rb
|
84
115
|
- lib/omf_rc/deferred_process.rb
|
85
116
|
- lib/omf_rc/omf_error.rb
|
@@ -89,8 +120,6 @@ files:
|
|
89
120
|
- lib/omf_rc/resource_proxy/mock.rb
|
90
121
|
- lib/omf_rc/resource_proxy/net.rb
|
91
122
|
- lib/omf_rc/resource_proxy/node.rb
|
92
|
-
- lib/omf_rc/resource_proxy/openflow_slice.rb
|
93
|
-
- lib/omf_rc/resource_proxy/openflow_slice_factory.rb
|
94
123
|
- lib/omf_rc/resource_proxy/virtual_machine.rb
|
95
124
|
- lib/omf_rc/resource_proxy/virtual_machine_factory.rb
|
96
125
|
- lib/omf_rc/resource_proxy/wlan.rb
|
@@ -138,8 +167,9 @@ files:
|
|
138
167
|
- test/omf_rc/util/mock_spec.rb
|
139
168
|
- test/omf_rc/util/mod_spec.rb
|
140
169
|
- test/test_helper.rb
|
141
|
-
homepage:
|
142
|
-
licenses:
|
170
|
+
homepage: http://omf.mytestbed.net
|
171
|
+
licenses:
|
172
|
+
- MIT
|
143
173
|
post_install_message:
|
144
174
|
rdoc_options: []
|
145
175
|
require_paths:
|
@@ -149,7 +179,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
149
179
|
requirements:
|
150
180
|
- - ! '>='
|
151
181
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
182
|
+
version: 1.9.3
|
153
183
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
184
|
none: false
|
155
185
|
requirements:
|
@@ -158,36 +188,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
188
|
version: 1.3.1
|
159
189
|
requirements: []
|
160
190
|
rubyforge_project: omf_rc
|
161
|
-
rubygems_version: 1.8.
|
191
|
+
rubygems_version: 1.8.25
|
162
192
|
signing_key:
|
163
193
|
specification_version: 3
|
164
194
|
summary: OMF resource controller
|
165
|
-
test_files:
|
166
|
-
|
167
|
-
- test/fixture/iw/help
|
168
|
-
- test/fixture/iw/info
|
169
|
-
- test/fixture/iw/link
|
170
|
-
- test/fixture/lsmod
|
171
|
-
- test/fixture/oml.hash
|
172
|
-
- test/fixture/oml.spec
|
173
|
-
- test/fixture/oml.xml
|
174
|
-
- test/fixture/sys/class/ieee80211/phy0/device/uevent
|
175
|
-
- test/fixture/sys/class/ieee80211/phy0/uevent
|
176
|
-
- test/fixture/sys/class/net/eth0/device/uevent
|
177
|
-
- test/fixture/sys/class/net/eth0/uevent
|
178
|
-
- test/fixture/sys/class/net/wlan0/device/uevent
|
179
|
-
- test/fixture/sys/class/net/wlan0/uevent
|
180
|
-
- test/omf_rc/deferred_process_spec.rb
|
181
|
-
- test/omf_rc/message_process_error_spec.rb
|
182
|
-
- test/omf_rc/resource_factory_spec.rb
|
183
|
-
- test/omf_rc/resource_proxy/abstract_resource_spec.rb
|
184
|
-
- test/omf_rc/resource_proxy/application_spec.rb
|
185
|
-
- test/omf_rc/resource_proxy/mock_spec.rb
|
186
|
-
- test/omf_rc/resource_proxy/node_spec.rb
|
187
|
-
- test/omf_rc/resource_proxy_dsl_spec.rb
|
188
|
-
- test/omf_rc/util/common_tools_spec.rb
|
189
|
-
- test/omf_rc/util/ip_spec.rb
|
190
|
-
- test/omf_rc/util/iw_spec.rb
|
191
|
-
- test/omf_rc/util/mock_spec.rb
|
192
|
-
- test/omf_rc/util/mod_spec.rb
|
193
|
-
- test/test_helper.rb
|
195
|
+
test_files: []
|
196
|
+
has_rdoc:
|
data/config/omf_rc.yml
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
# This is an example configuration for the Resource Controller at NICTA
|
2
|
-
#
|
3
|
-
# NOTE: use only 'spaces' to indent !
|
4
|
-
# ('tab' indents are not supported by the ruby yaml parser used to read this file)
|
5
|
-
#
|
6
|
-
---
|
7
|
-
:rcontroller:
|
8
|
-
# Communication settings
|
9
|
-
:communicator:
|
10
|
-
|
11
|
-
# Interface to the control network from which this resource can be
|
12
|
-
# controlled & managed
|
13
|
-
:control_if: 'control'
|
14
|
-
|
15
|
-
# set this to true or false if you want to enable or disable signature checks and message signing
|
16
|
-
:authenticate_messages: false
|
17
|
-
# your RSA/DSA SSH private key file
|
18
|
-
:private_key: '/etc/omf-resctl-5.4/id_rsa'
|
19
|
-
# directory holding the public keys of your OMF peers
|
20
|
-
:public_key_dir: '/etc/omf-resctl-5.4/peer_keys'
|
21
|
-
|
22
|
-
:type: 'xmpp'
|
23
|
-
:xmpp:
|
24
|
-
# Address of the PubSub server to use as gateway for PubSub communication
|
25
|
-
:pubsub_gateway: 'norbit.npc.nicta.com.au'
|
26
|
-
#:pubsub_port: 5222
|
27
|
-
# Address of the PubSub server which host the communication for my slice
|
28
|
-
# Leave this commented if the pubsub groups for this slice are hosted on
|
29
|
-
# the same server as the 'pubsub_gateway'
|
30
|
-
#:pubsub_domain: 10.0.0.200
|
31
|
-
# The following 'home_pubsub_user' and 'home_pubsub_pwd' are optional
|
32
|
-
# RC will create a unique user/pwd for itself if this is not provided
|
33
|
-
# In a typical OMF install, you should not uncomment these lines
|
34
|
-
# (do so only if you need to manually set user/password for
|
35
|
-
# your client to connect to your pubsub server)
|
36
|
-
#:pubsub_user: 'my_RC_name'
|
37
|
-
#:pubsub_pwd: 'my_RC_password'
|
38
|
-
# set this to "true" if you have a DNS SRV record pointing to the
|
39
|
-
# real pubsub server hostname
|
40
|
-
:pubsub_use_dnssrv: false
|
41
|
-
|
42
|
-
# Agent settings
|
43
|
-
:agent:
|
44
|
-
|
45
|
-
# Name (i.e. unique HRN ID) of this resource
|
46
|
-
# Or this could also be passed as a command line parameter "--name"
|
47
|
-
# This is either a fully defined string, e.g. "my_resource_name"
|
48
|
-
# Or a string for which some values will be replaced by the running RC,
|
49
|
-
# currently we support the values: %hostname%, %macaddr%, %fqdn%
|
50
|
-
# For example, if you use "some_prefix.%hostname%.some_suffix"
|
51
|
-
# Then if your hostname is 'node1', then your RC name will be
|
52
|
-
# 'some_prefix.node1.some_suffix'
|
53
|
-
# %macaddr% is replaced with the MAC address of the control interface
|
54
|
-
# %fqdn% is the fully qualified hostname (incl. domain part)
|
55
|
-
:name: 'omf.nicta.%hostname%'
|
56
|
-
|
57
|
-
# Name (i.e. unique HRN ID) of the slice to which this resource is assigned
|
58
|
-
:slice: default_slice
|
59
|
-
|
60
|
-
# shrink the filesystem size before saving an image
|
61
|
-
# grow the filesystem to match the disk size after loading an image
|
62
|
-
# enabling this may slow down load/save significantly
|
63
|
-
:resizefs: false
|
64
|
-
|
65
|
-
# Mote settings
|
66
|
-
# Uncomment and set the following parameters if this resource has
|
67
|
-
# a Mote device attached to it
|
68
|
-
#:mote:
|
69
|
-
#:moteport: /dev/ttyUSB0
|
70
|
-
#:motetype: telosb
|