X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=vinilinkspec.py;h=1f47e26b40a440c380fc38d2298cf6c7f93a47b1;hb=d24a4554ca31b5a8f22e606f578fd2b07fcf71f9;hp=5e8911b2ea009c46434c9ead8f48d74e4d6b2661;hpb=7fe0b7fe3450fe8c693f6815fd362caa64ae8052;p=nodemanager-topo.git diff --git a/vinilinkspec.py b/vinilinkspec.py index 5e8911b..1f47e26 100755 --- 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] - ifspecs = {'name': nodenetwork['hostname'], + ifspec = {'name': nodenetwork['hostname'], '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} - return ifspecs + return {'IfSpec': ifspec} def linkSpecDict(): @@ -74,10 +74,10 @@ def linkSpecDict(): 'bw': '1Gbps', 'min_alloc': '0', 'bw': '1Gbps', - 'endpoints': ifspecs, + 'endpoint': ifspecs, 'start_time': int(time()), 'duration': '-1'}) - return linkspecs + return {'LinkSpec': linkspecs} def main():