Esempio n. 1
0
    def __init__(self,
                 name,
                 inNamespace=True,
                 server='',
                 sargs='',
                 sdir='/tmp/bcn',
                 client='',
                 cargs='{command}',
                 cdir=None,
                 ip="127.0.0.1",
                 port='',
                 **params):
        # Server params
        self.server = server
        self.sargs = sargs
        self.sdir = sdir
        # Client params
        self.client = client
        self.cargs = cargs
        self.cdir = cdir

        self.ip = ip
        self.port = port
        CPULimitedHost.__init__(self,
                                name,
                                inNamespace=inNamespace,
                                ip=ip,
                                **params)
Esempio n. 2
0
    def __init__(self, name, sched='cfs', **kwargs):

        CPULimitedHost.__init__(self, name, sched, **kwargs)
        if not NdnHost.inited:
            NdnHostCommon.init()

        self.nfd = Nfd(self)
        self.nfd.start()

        self.peerList = {}
Esempio n. 3
0
    def __init__(self, name, sched='cfs', **kwargs):

        CPULimitedHost.__init__(self, name, sched, **kwargs)
        if not NdnHost.inited:
            NdnHostCommon.init()

        # Create home directory for a node
        self.homeFolder = "%s/%s" % (self.params['workdir'], self.name)
        self.cmd("mkdir -p %s" % self.homeFolder)
        self.cmd("cd %s" % self.homeFolder)

        self.nfd = None

        self.peerList = {}
Esempio n. 4
0
    def __init__(self, name, sched='cfs', **kwargs):

        CPULimitedHost.__init__(self, name, sched, **kwargs)
        if not NdnHost.inited:
            NdnHostCommon.init()

        # Create home directory for a node
        self.homeFolder = "%s/%s" % (self.params['workdir'], self.name)
        self.cmd("mkdir -p %s" % self.homeFolder)
        self.cmd("cd %s" % self.homeFolder)

        self.nfd = Nfd(self)
        self.nfd.start()

        self.peerList = {}
Esempio n. 5
0
 def __init__( self, name, **kwargs ):
     # First N (=pairs) hosts are clients, in root NS
     kwargs.pop('inNamespace', True)
     isServer = int( name[ 1: ] ) > pairs
     CPULimitedHost.__init__( self, name, inNamespace=isServer, **kwargs )
 def __init__(self, name, inNamespace=True, **params):
     CPULimitedHost.__init__(self, name, inNamespace=inNamespace, **params)
Esempio n. 7
0
 def __init__(self, name, **params):
     CPULimitedHost.__init__(self, name, **params)
     self.status = "INIT"