git://git.onelab.eu
/
nodemanager-topo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1 LinkSpec per link. The array defines more than 1 linkspec.
[nodemanager-topo.git]
/
vinilinkspec.py
diff --git
a/vinilinkspec.py
b/vinilinkspec.py
index
5e8911b
..
d2aeee2
100755
(executable)
--- a/
vinilinkspec.py
+++ b/
vinilinkspec.py
@@
-33,7
+33,7
@@
def ifSpecDict(nodedict):
# 'ip_spoof']
# Assume only 1 node network per node.
nodenetwork = GetNodeNetworks(nodedict['nodenetwork_ids'])[0]
# 'ip_spoof']
# Assume only 1 node network per node.
nodenetwork = GetNodeNetworks(nodedict['nodenetwork_ids'])[0]
- ifspec
s
= {'name': nodenetwork['hostname'],
+ ifspec = {'name': nodenetwork['hostname'],
'addr': nodenetwork['ip'],
'type': nodenetwork['type'],
'init_params': None,
'addr': nodenetwork['ip'],
'type': nodenetwork['type'],
'init_params': None,
@@
-41,7
+41,7
@@
def ifSpecDict(nodedict):
'min_alloc': 0,
'max_alloc': '1Gbps',
'ip_spoof': False}
'min_alloc': 0,
'max_alloc': '1Gbps',
'ip_spoof': False}
- return
ifspecs
+ return
{'IfSpec': ifspec}
def linkSpecDict():
def linkSpecDict():
@@
-68,7
+68,7
@@
def linkSpecDict():
ifspecs = []
for node in nodeset:
ifspecs.append(ifSpecDict(node))
ifspecs = []
for node in nodeset:
ifspecs.append(ifSpecDict(node))
- linkspecs.append({\
+ linkspecs.append({
'LinkSpec': {
\
'type': 'ipv4',
'init_params': None,
'bw': '1Gbps',
'type': 'ipv4',
'init_params': None,
'bw': '1Gbps',
@@
-76,7
+76,7
@@
def linkSpecDict():
'bw': '1Gbps',
'endpoints': ifspecs,
'start_time': int(time()),
'bw': '1Gbps',
'endpoints': ifspecs,
'start_time': int(time()),
- 'duration': '-1'})
+ 'duration': '-1'}
}
)
return linkspecs
return linkspecs