Fixed P4Runtime spelling (#162)

As agreed in the P4 API WG
This commit is contained in:
Carmelo Cascone
2018-06-01 11:16:13 -07:00
committed by Nate Foster
parent 08445e0b18
commit 948a890700
6 changed files with 21 additions and 21 deletions

View File

@@ -62,7 +62,7 @@ class SwitchConnection(object):
request.arbitration.election_id.low = 1
if dry_run:
print "P4 Runtime MasterArbitrationUpdate: ", request
print "P4Runtime MasterArbitrationUpdate: ", request
else:
self.requests_stream.put(request)
@@ -78,7 +78,7 @@ class SwitchConnection(object):
request.action = p4runtime_pb2.SetForwardingPipelineConfigRequest.VERIFY_AND_COMMIT
if dry_run:
print "P4 Runtime SetForwardingPipelineConfig:", request
print "P4Runtime SetForwardingPipelineConfig:", request
else:
self.client_stub.SetForwardingPipelineConfig(request)
@@ -90,7 +90,7 @@ class SwitchConnection(object):
update.type = p4runtime_pb2.Update.INSERT
update.entity.table_entry.CopyFrom(table_entry)
if dry_run:
print "P4 Runtime Write:", request
print "P4Runtime Write:", request
else:
self.client_stub.Write(request)
@@ -104,7 +104,7 @@ class SwitchConnection(object):
else:
table_entry.table_id = 0
if dry_run:
print "P4 Runtime Read:", request
print "P4Runtime Read:", request
else:
for response in self.client_stub.Read(request):
yield response
@@ -121,7 +121,7 @@ class SwitchConnection(object):
if index is not None:
counter_entry.index.index = index
if dry_run:
print "P4 Runtime Read:", request
print "P4Runtime Read:", request
else:
for response in self.client_stub.Read(request):
yield response

View File

@@ -38,7 +38,7 @@ def configureP4Switch(**switch_args):
switch's thrift server is using a unique port.
"""
if "sw_path" in switch_args and 'grpc' in switch_args['sw_path']:
# If grpc appears in the BMv2 switch target, we assume will start P4 Runtime
# If grpc appears in the BMv2 switch target, we assume will start P4Runtime
class ConfiguredP4RuntimeSwitch(P4RuntimeSwitch):
def __init__(self, *opts, **kwargs):
kwargs.update(switch_args)