Skip to content

Commit

Permalink
Added the support for VS in deployer
Browse files Browse the repository at this point in the history
  • Loading branch information
pierventre committed Feb 3, 2015
1 parent 78be42a commit 3d7149d
Show file tree
Hide file tree
Showing 3 changed files with 875 additions and 1 deletion.
20 changes: 19 additions & 1 deletion mininet_deployer.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ def topo(topology):
if verbose:
print "*** Build Topology From Parsed File"
parser = TopoParser(topology, verbose = False)
(ppsubnets, l2subnets) = parser.getsubnets()
ppsubnets = parser.getsubnets()
vlls = parser.getVLLs()
pws = parser.getPWs()
vss = parser.getVSs()
# XXX
if parser.generated == False:
if verbose:
Expand Down Expand Up @@ -88,6 +89,13 @@ def topo(topology):
pws_properties = []
for pw in pws:
pws_properties.append(generator.getVLLProperties(pw))

if verbose:
print "*** Build VSs Properties"
vss_properties = []
for vs in vss:
vs_properties = generator.getVSProperties(vs)
vss_properties.append(vs_properties)


set_cr_oshis = parser.cr_oshis
Expand Down Expand Up @@ -177,6 +185,16 @@ def topo(topology):
if verbose:
print "*** PWs Properties", pws_properties[i]
i = i + 1

i = 0
for vs in vss:
endnodes = []
for node in vs:
endnodes.append(net.getNodeByName(node))
net.addVS(endnodes, vss_properties[i])
if verbose:
print "*** VSs Properties", vss_properties[i]
i = i + 1

net.start()
CLI(net)
Expand Down
Loading

0 comments on commit 3d7149d

Please sign in to comment.