コード例 #1
0
ファイル: fie.py プロジェクト: tz70s/fie
    def __init__(self,
                 topo=None,
                 switch=OVSKernelSwitch,
                 host=Host,
                 controller=DefaultController,
                 link=Link,
                 intf=Intf,
                 build=True,
                 xterms=False,
                 cleanup=False,
                 ipBase='10.0.0.0/8',
                 inNamespace=False,
                 autoSetMacs=False,
                 autoStaticArp=False,
                 autoPinCpus=False,
                 listenPort=None,
                 waitConnected=False):

        Mininet.__init__(self, topo, switch, host, controller, link, intf,
                         build, xterms, cleanup, ipBase, inNamespace,
                         autoSetMacs, autoStaticArp, autoPinCpus, listenPort,
                         waitConnected)

        # We add abstraction nodes in this class.
        # Automatically wraps mininet host, containers, internal network

        self.absnode_map = {}
        e = Env(len(self.hosts))
        self.env = e

        for h in self.hosts:
            self.absnode_map[h.name] = AbstractionNode(h.name, h,
                                                       e.assign_cidr(),
                                                       e.docker_client)