variable/grpc cleanup to rename everything using spelt out numbers instead of actual numbers
This commit is contained in:
parent
b28ef76d65
commit
876699e8ef
45 changed files with 932 additions and 966 deletions
|
@ -227,21 +227,21 @@ class LinkConfigurationDialog(Dialog):
|
|||
)
|
||||
link.options.CopyFrom(options)
|
||||
|
||||
interface_one = None
|
||||
if link.HasField("interface_one"):
|
||||
interface_one = link.interface_one.id
|
||||
interface_two = None
|
||||
if link.HasField("interface_two"):
|
||||
interface_two = link.interface_two.id
|
||||
interface1_id = None
|
||||
if link.HasField("interface1"):
|
||||
interface1_id = link.interface1.id
|
||||
interface2_id = None
|
||||
if link.HasField("interface2"):
|
||||
interface2_id = link.interface2.id
|
||||
|
||||
if not self.is_symmetric:
|
||||
link.options.unidirectional = True
|
||||
asym_interface_one = None
|
||||
if interface_one:
|
||||
asym_interface_one = core_pb2.Interface(id=interface_one)
|
||||
asym_interface_two = None
|
||||
if interface_two:
|
||||
asym_interface_two = core_pb2.Interface(id=interface_two)
|
||||
asym_interface1 = None
|
||||
if interface1_id:
|
||||
asym_interface1 = core_pb2.Interface(id=interface1_id)
|
||||
asym_interface2 = None
|
||||
if interface2_id:
|
||||
asym_interface2 = core_pb2.Interface(id=interface2_id)
|
||||
down_bandwidth = get_int(self.down_bandwidth)
|
||||
down_jitter = get_int(self.down_jitter)
|
||||
down_delay = get_int(self.down_delay)
|
||||
|
@ -256,10 +256,10 @@ class LinkConfigurationDialog(Dialog):
|
|||
unidirectional=True,
|
||||
)
|
||||
self.edge.asymmetric_link = core_pb2.Link(
|
||||
node_one_id=link.node_two_id,
|
||||
node_two_id=link.node_one_id,
|
||||
interface_one=asym_interface_one,
|
||||
interface_two=asym_interface_two,
|
||||
node1_id=link.node2_id,
|
||||
node2_id=link.node1_id,
|
||||
interface1=asym_interface1,
|
||||
interface2=asym_interface2,
|
||||
options=options,
|
||||
)
|
||||
else:
|
||||
|
@ -270,20 +270,20 @@ class LinkConfigurationDialog(Dialog):
|
|||
session_id = self.app.core.session_id
|
||||
self.app.core.client.edit_link(
|
||||
session_id,
|
||||
link.node_one_id,
|
||||
link.node_two_id,
|
||||
link.node1_id,
|
||||
link.node2_id,
|
||||
link.options,
|
||||
interface_one,
|
||||
interface_two,
|
||||
interface1_id,
|
||||
interface2_id,
|
||||
)
|
||||
if self.edge.asymmetric_link:
|
||||
self.app.core.client.edit_link(
|
||||
session_id,
|
||||
link.node_two_id,
|
||||
link.node_one_id,
|
||||
link.node2_id,
|
||||
link.node1_id,
|
||||
self.edge.asymmetric_link.options,
|
||||
interface_one,
|
||||
interface_two,
|
||||
interface1_id,
|
||||
interface2_id,
|
||||
)
|
||||
|
||||
self.destroy()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue