def CreateTopologyPy(topologyName, vPorts): print '\nCreateTopology: %s : %s' % (topologyName, vPorts) topologyObj = ixNet.add(ixNet.getRoot(), 'topology') ixNet.setMultiAttribute(topologyObj, '-name', topologyName, '-vports', vPorts ) ixNet.commit() return topologyObj