Skip to content
Snippets Groups Projects
Commit 08efa405 authored by Michael Marsh's avatar Michael Marsh
Browse files

sane device naming

parent fdd31b83
No related branches found
No related tags found
No related merge requests found
...@@ -47,8 +47,8 @@ def connect_nodes(node1, node2): ...@@ -47,8 +47,8 @@ def connect_nodes(node1, node2):
ctr2 = nodelist[node2] ctr2 = nodelist[node2]
print ctr1, ctr2 print ctr1, ctr2
# Create a virtual ethernet link. # Create a virtual ethernet link.
dev_1 = 'bac0_{n1}_{n2}'.format(n1=node1,n2=node2) dev_1 = '{name}_{n1}_{n2}'.format(name=ntwk['name'],n1=node1,n2=node2)
dev_2 = 'bac0_{n2}_{n1}'.format(n1=node1,n2=node2) dev_2 = '{name}_{n2}_{n1}'.format(name=ntwk['name'],n1=node1,n2=node2)
subprocess.call([ subprocess.call([
'sudo', 'sudo',
'ip', 'link', 'add', dev_1, 'type', 'veth', 'ip', 'link', 'add', dev_1, 'type', 'veth',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment