VOL-1410: Integration testing between the OFAgent,
Affinity Router and the Voltha Core
- Added metadata key 'voltha_backend_name' to OFagent's
ReceivePacketsIn RPC to support northbound streaming of
packet-in frames through the affinity router toward ONOS.
- Added metadata key 'voltha_backend_name' to OFagent's
ReceiveChangeEvents RPC to support northbound streaming
of change-event messages through the affinity router
toward ONOS.
- Adding missing args to the OFagent Kubernetes manifest.
Change-Id: Ica4af1747f6b7bcd67f662739cbf6f40bf746667
diff --git a/k8s/ofagent.yml b/k8s/ofagent.yml
index 1f548ac..443b439 100644
--- a/k8s/ofagent.yml
+++ b/k8s/ofagent.yml
@@ -42,3 +42,6 @@
- "--consul=consul.$(NAMESPACE).svc.cluster.local:8500"
- "--controller=onos.$(NAMESPACE).svc.cluster.local:6653"
- "--grpc-endpoint=afrouter.$(NAMESPACE).svc.cluster.local:55555"
+ - "--enable-tls"
+ - "--key-file=/ofagent/pki/voltha.key"
+ - "--cert-file=/ofagent/pki/voltha.crt"
diff --git a/python/ofagent/grpc_client.py b/python/ofagent/grpc_client.py
index b58612f..76b052e 100755
--- a/python/ofagent/grpc_client.py
+++ b/python/ofagent/grpc_client.py
@@ -100,12 +100,13 @@
def receive_packet_in_stream():
streaming_rpc_method = self.local_stub.ReceivePacketsIn
- iterator = streaming_rpc_method(empty_pb2.Empty())
+ iterator = streaming_rpc_method(empty_pb2.Empty(),
+ metadata=((self.CORE_GROUP_ID, self.core_group_id),))
try:
for packet_in in iterator:
reactor.callFromThread(self.packet_in_queue.put,
packet_in)
- log.debug('enqued-packet-in',
+ log.debug('enqueued-packet-in',
packet_in=packet_in,
queue_len=len(self.packet_in_queue.pending))
except _Rendezvous, e:
@@ -119,11 +120,12 @@
def receive_change_events():
streaming_rpc_method = self.local_stub.ReceiveChangeEvents
- iterator = streaming_rpc_method(empty_pb2.Empty())
+ iterator = streaming_rpc_method(empty_pb2.Empty(),
+ metadata=((self.CORE_GROUP_ID, self.core_group_id),))
try:
for event in iterator:
reactor.callFromThread(self.change_event_queue.put, event)
- log.debug('enqued-change-event',
+ log.debug('enqueued-change-event',
change_event=event,
queue_len=len(self.change_event_queue.pending))
except _Rendezvous, e: