omf_rc 6.0.2.pre.2 → 6.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/bin/omf_rc +19 -11
  2. data/config/config.yml +0 -5
  3. data/config/config_with_authentication.yml.example +1 -1
  4. data/lib/omf_rc/deferred_process.rb +5 -0
  5. data/lib/omf_rc/omf_error.rb +5 -0
  6. data/lib/omf_rc/resource_factory.rb +17 -5
  7. data/lib/omf_rc/resource_proxy/abstract_resource.rb +186 -85
  8. data/lib/omf_rc/resource_proxy/application.rb +77 -53
  9. data/lib/omf_rc/resource_proxy/net.rb +29 -2
  10. data/lib/omf_rc/resource_proxy/node.rb +53 -2
  11. data/lib/omf_rc/resource_proxy/virtual_machine.rb +5 -0
  12. data/lib/omf_rc/resource_proxy/virtual_machine_factory.rb +5 -0
  13. data/lib/omf_rc/resource_proxy/wlan.rb +41 -2
  14. data/lib/omf_rc/resource_proxy_dsl.rb +68 -8
  15. data/lib/omf_rc/util/common_tools.rb +5 -0
  16. data/lib/omf_rc/util/hostapd.rb +13 -0
  17. data/lib/omf_rc/util/ip.rb +39 -0
  18. data/lib/omf_rc/util/iw.rb +115 -39
  19. data/lib/omf_rc/util/libvirt.rb +5 -0
  20. data/lib/omf_rc/util/mod.rb +20 -1
  21. data/lib/omf_rc/util/openflow_tools.rb +5 -0
  22. data/lib/omf_rc/util/package.rb +5 -0
  23. data/lib/omf_rc/util/platform_tools.rb +5 -0
  24. data/lib/omf_rc/util/sysfs.rb +23 -3
  25. data/lib/omf_rc/util/vmbuilder.rb +5 -0
  26. data/lib/omf_rc/util/wpa.rb +12 -0
  27. data/lib/omf_rc/version.rb +6 -1
  28. data/lib/omf_rc.rb +5 -0
  29. data/omf_rc.gemspec +2 -1
  30. data/test/omf_rc/deferred_process_spec.rb +5 -0
  31. data/test/omf_rc/message_process_error_spec.rb +5 -0
  32. data/test/omf_rc/resource_factory_spec.rb +8 -6
  33. data/test/omf_rc/resource_proxy/abstract_resource_spec.rb +151 -89
  34. data/test/omf_rc/resource_proxy/application_spec.rb +10 -11
  35. data/test/omf_rc/resource_proxy/node_spec.rb +6 -1
  36. data/test/omf_rc/resource_proxy_dsl_spec.rb +31 -6
  37. data/test/omf_rc/util/common_tools_spec.rb +6 -1
  38. data/test/omf_rc/util/ip_spec.rb +9 -3
  39. data/test/omf_rc/util/iw_spec.rb +16 -6
  40. data/test/omf_rc/util/mod_spec.rb +8 -3
  41. data/test/test_helper.rb +6 -0
  42. metadata +26 -13
  43. data/lib/omf_rc/resource_proxy/mock.rb +0 -16
  44. data/lib/omf_rc/util/mock.rb +0 -22
  45. data/test/omf_rc/resource_proxy/mock_spec.rb +0 -20
  46. data/test/omf_rc/util/mock_spec.rb +0 -31
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omf_rc
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.2.pre.2
5
- prerelease: 6
4
+ version: 6.0.2
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - NICTA
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-30 00:00:00.000000000 Z
12
+ date: 2013-06-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
@@ -82,7 +82,7 @@ dependencies:
82
82
  requirements:
83
83
  - - ~>
84
84
  - !ruby/object:Gem::Version
85
- version: 6.0.2.pre.2
85
+ version: 6.0.2
86
86
  type: :runtime
87
87
  prerelease: false
88
88
  version_requirements: !ruby/object:Gem::Requirement
@@ -90,7 +90,7 @@ dependencies:
90
90
  requirements:
91
91
  - - ~>
92
92
  - !ruby/object:Gem::Version
93
- version: 6.0.2.pre.2
93
+ version: 6.0.2
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: cocaine
96
96
  requirement: !ruby/object:Gem::Requirement
@@ -107,6 +107,22 @@ dependencies:
107
107
  - - ~>
108
108
  - !ruby/object:Gem::Version
109
109
  version: 0.3.0
110
+ - !ruby/object:Gem::Dependency
111
+ name: mocha
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
110
126
  description: Resource controller of OMF, a generic framework for controlling and managing
111
127
  networking testbeds.
112
128
  email:
@@ -135,7 +151,6 @@ files:
135
151
  - lib/omf_rc/resource_factory.rb
136
152
  - lib/omf_rc/resource_proxy/abstract_resource.rb
137
153
  - lib/omf_rc/resource_proxy/application.rb
138
- - lib/omf_rc/resource_proxy/mock.rb
139
154
  - lib/omf_rc/resource_proxy/net.rb
140
155
  - lib/omf_rc/resource_proxy/node.rb
141
156
  - lib/omf_rc/resource_proxy/virtual_machine.rb
@@ -147,7 +162,6 @@ files:
147
162
  - lib/omf_rc/util/ip.rb
148
163
  - lib/omf_rc/util/iw.rb
149
164
  - lib/omf_rc/util/libvirt.rb
150
- - lib/omf_rc/util/mock.rb
151
165
  - lib/omf_rc/util/mod.rb
152
166
  - lib/omf_rc/util/openflow_tools.rb
153
167
  - lib/omf_rc/util/package.rb
@@ -176,13 +190,11 @@ files:
176
190
  - test/omf_rc/resource_factory_spec.rb
177
191
  - test/omf_rc/resource_proxy/abstract_resource_spec.rb
178
192
  - test/omf_rc/resource_proxy/application_spec.rb
179
- - test/omf_rc/resource_proxy/mock_spec.rb
180
193
  - test/omf_rc/resource_proxy/node_spec.rb
181
194
  - test/omf_rc/resource_proxy_dsl_spec.rb
182
195
  - test/omf_rc/util/common_tools_spec.rb
183
196
  - test/omf_rc/util/ip_spec.rb
184
197
  - test/omf_rc/util/iw_spec.rb
185
- - test/omf_rc/util/mock_spec.rb
186
198
  - test/omf_rc/util/mod_spec.rb
187
199
  - test/test_helper.rb
188
200
  homepage: http://omf.mytestbed.net
@@ -201,9 +213,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
201
213
  required_rubygems_version: !ruby/object:Gem::Requirement
202
214
  none: false
203
215
  requirements:
204
- - - ! '>'
216
+ - - ! '>='
205
217
  - !ruby/object:Gem::Version
206
- version: 1.3.1
218
+ version: '0'
219
+ segments:
220
+ - 0
221
+ hash: -3715583105084478099
207
222
  requirements: []
208
223
  rubyforge_project: omf_rc
209
224
  rubygems_version: 1.8.25
@@ -230,12 +245,10 @@ test_files:
230
245
  - test/omf_rc/resource_factory_spec.rb
231
246
  - test/omf_rc/resource_proxy/abstract_resource_spec.rb
232
247
  - test/omf_rc/resource_proxy/application_spec.rb
233
- - test/omf_rc/resource_proxy/mock_spec.rb
234
248
  - test/omf_rc/resource_proxy/node_spec.rb
235
249
  - test/omf_rc/resource_proxy_dsl_spec.rb
236
250
  - test/omf_rc/util/common_tools_spec.rb
237
251
  - test/omf_rc/util/ip_spec.rb
238
252
  - test/omf_rc/util/iw_spec.rb
239
- - test/omf_rc/util/mock_spec.rb
240
253
  - test/omf_rc/util/mod_spec.rb
241
254
  - test/test_helper.rb
@@ -1,16 +0,0 @@
1
- module OmfRc::ResourceProxy::Mock
2
- include OmfRc::ResourceProxyDSL
3
-
4
- register_proxy :mock
5
-
6
- utility :mock
7
-
8
- hook :before_ready do |resource|
9
- logger.info "#{resource.uid} is now ready"
10
- end
11
-
12
- hook :before_release do |resource|
13
- logger.info "#{resource.uid} is to be released"
14
- end
15
- end
16
-
@@ -1,22 +0,0 @@
1
- module OmfRc::Util::Mock
2
- include OmfRc::ResourceProxyDSL
3
-
4
- request :nothing do |resource|
5
- resource.uid
6
- end
7
-
8
- configure :nothing do
9
- end
10
-
11
- configure :hrn do |resource, hrn|
12
- resource.hrn = hrn
13
- end
14
-
15
- request :resource_proxy_list do
16
- OmfRc::ResourceFactory.proxy_list
17
- end
18
-
19
- request :kernel_version do
20
- OmfCommon::Command.execute("uname -r")
21
- end
22
- end
@@ -1,20 +0,0 @@
1
- require 'test_helper'
2
- require 'omf_rc/resource_proxy/mock'
3
-
4
- describe OmfRc::ResourceProxy::Mock do
5
- before do
6
- @xmpp = MiniTest::Mock.new
7
- @xmpp.expect(:subscribe, true, [String])
8
-
9
- OmfCommon.stub :comm, @xmpp do
10
- @mock = OmfRc::ResourceFactory.new(:mock, hrn: 'mock_test')
11
- end
12
- end
13
-
14
- describe "when included in the resource instance" do
15
- it "must provide hooks" do
16
- @mock.before_ready
17
- @mock.before_release
18
- end
19
- end
20
- end
@@ -1,31 +0,0 @@
1
- require 'test_helper'
2
- require 'omf_rc/util/mock'
3
-
4
- describe OmfRc::Util::Mock do
5
- describe "when included in the resource proxy" do
6
- before do
7
- module OmfRc::ResourceProxy::MockTest
8
- include OmfRc::ResourceProxyDSL
9
- register_proxy :mock_test
10
- utility :mock
11
- end
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
18
- end
19
-
20
- it "must have these demo methods available" do
21
- @mock.request_nothing.must_equal @mock.uid
22
- @mock.configure_nothing
23
- @mock.configure_hrn "bob"
24
- @mock.request_hrn.must_equal "bob"
25
- @mock.request_resource_proxy_list.must_equal OmfRc::ResourceFactory.proxy_list
26
- OmfCommon::Command.stub :execute, "bob_os" do
27
- @mock.request_kernel_version.must_equal "bob_os"
28
- end
29
- end
30
- end
31
- end