omf_rc 6.1.14.pre.2 → 6.2.0.pre.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 +8 -8
- data/bin/omf_rc +3 -0
- data/lib/omf_rc/resource_proxy/abstract_resource.rb +15 -10
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTczNDcwNjJiYmRiZjNiOGJhNDk3ODQ1Y2JjZTMzZjAxOWRjYWIxZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTUxYzA2MzIxMjMyMjI0MzY5YWUyYWI2YTE3ZDhiM2UyNjNlMzFmMw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2Q3OWZmZTBhYjFiOTE5ZDcwNTU3YjM5OTY2MjlmNDY4MTNiYWVhYjcxZDlk
|
10
|
+
NjAzZmYxZTI0ZDA4N2JjN2ZhOGE1MTcwYzI3MmRiMGFiYjc4NmMxYzNjZjFl
|
11
|
+
NTkyYWNhNmRlOGQxZWY2MWUwMDIxZjBjZTJmMjI1MmIwYWE3MmE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzllYjg0ZTE1MDUzYjI1MjhiOTE1ZDhhNTEyYjgzZTZjNmE5ZTI2NTNiZTEz
|
14
|
+
ODQyNDA1YjM1ZDExZTMzMWFjYjQxZjFhNzJjMjk3N2RmZmQzNzA1OTJiMWE5
|
15
|
+
YWRlYzI4MjYyZGE3YTk3NmNiNTgxMWFmYzBiMGViZDdkZmU1NjQ=
|
data/bin/omf_rc
CHANGED
@@ -463,8 +463,6 @@ class OmfRc::ResourceProxy::AbstractResource
|
|
463
463
|
# @param [OmfCommon::Message] message FRCP message
|
464
464
|
# @param [OmfCommon::Comm::Topic] topic subscribed to
|
465
465
|
def process_omf_message(message, topic)
|
466
|
-
return unless check_guard(message)
|
467
|
-
|
468
466
|
unless message.is_a? OmfCommon::Message
|
469
467
|
raise ArgumentError, "Expected OmfCommon::Message, but got '#{message.class}'"
|
470
468
|
end
|
@@ -473,6 +471,10 @@ class OmfRc::ResourceProxy::AbstractResource
|
|
473
471
|
raise StandardError, "Invalid message received: #{pubsub_item_payload}. Please check protocol schema of version #{OmfCommon::PROTOCOL_VERSION}."
|
474
472
|
end
|
475
473
|
|
474
|
+
return unless check_guard(message)
|
475
|
+
# We really don't care about inform messages which created from here
|
476
|
+
return nil if message.operation == :inform
|
477
|
+
|
476
478
|
objects_by_topic(topic.id.to_s).each do |obj|
|
477
479
|
OmfRc::ResourceProxy::MPReceived.inject(Time.now.to_f, self.uid,
|
478
480
|
topic.id.to_s, message.mid) if OmfCommon::Measure.enabled?
|
@@ -514,8 +516,18 @@ class OmfRc::ResourceProxy::AbstractResource
|
|
514
516
|
# @param [OmfCommon::Message] message FRCP message
|
515
517
|
# @param [OmfRc::ResourceProxy::AbstractResource] obj resource object
|
516
518
|
def handle_message(message, obj)
|
519
|
+
# We really don't care about inform messages which created from here
|
520
|
+
return nil if message.operation == :inform
|
521
|
+
|
522
|
+
unless [:create, :request, :configure, :release].include?(message.operation)
|
523
|
+
raise StandardError, <<-ERROR
|
524
|
+
Invalid message received (Unknown OMF operation #{message.operation}): #{message}.
|
525
|
+
Please check protocol schema of version #{OmfCommon::PROTOCOL_VERSION}.
|
526
|
+
ERROR
|
527
|
+
end
|
528
|
+
|
517
529
|
response = message.create_inform_reply_message(nil, {}, src: resource_address)
|
518
|
-
response.replyto replyto_address(obj, message.replyto)
|
530
|
+
response.replyto = replyto_address(obj, message.replyto)
|
519
531
|
|
520
532
|
case message.operation
|
521
533
|
when :create
|
@@ -526,13 +538,6 @@ class OmfRc::ResourceProxy::AbstractResource
|
|
526
538
|
handle_configure_message(message, obj, response)
|
527
539
|
when :release
|
528
540
|
handle_release_message(message, obj, response)
|
529
|
-
when :inform
|
530
|
-
nil # We really don't care about inform messages which created from here
|
531
|
-
else
|
532
|
-
raise StandardError, <<-ERROR
|
533
|
-
Invalid message received (Unknown OMF operation #{message.operation}): #{message}.
|
534
|
-
Please check protocol schema of version #{OmfCommon::PROTOCOL_VERSION}.
|
535
|
-
ERROR
|
536
541
|
end
|
537
542
|
response
|
538
543
|
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.
|
4
|
+
version: 6.2.0.pre.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- NICTA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 6.
|
75
|
+
version: 6.2.0.pre.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.
|
82
|
+
version: 6.2.0.pre.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: cocaine
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|