MCPcopy Create free account
hub / github.com/mininet/mininet / config

Method config

mininet/node.py:868–878  ·  view source on GitHub ↗

cpu: desired overall system CPU fraction cores: (real) core(s) this host can run on params: parameters for Node.config()

( self, cpu=-1, cores=None, **params )

Source from the content-addressed store, hash-verified

866
867 # pylint: disable=arguments-differ
868 def config( self, cpu=-1, cores=None, **params ):
869 """cpu: desired overall system CPU fraction
870 cores: (real) core(s) this host can run on
871 params: parameters for Node.config()"""
872 r = Node.config( self, **params )
873 self.initCgroups()
874 # Was considering cpu={'cpu': cpu , 'sched': sched}, but
875 # that seems redundant
876 self.setParam( r, 'setCPUFrac', cpu=cpu )
877 self.setParam( r, 'setCPUs', cores=cores )
878 return r
879
880 inited = False
881 cgversion = 'cgroup2'

Callers

nothing calls this directly

Calls 3

initCgroupsMethod · 0.95
configMethod · 0.45
setParamMethod · 0.45

Tested by

no test coverage detected