ipmininet.host package¶
This module defines a modular host that is able to support multiple daemons
-
class
ipmininet.host.IPHost(name, config: Union[Type[ipmininet.host.config.base.HostConfig], Tuple[Type[ipmininet.host.config.base.HostConfig], Dict[KT, VT]]] = <class 'ipmininet.host.config.base.HostConfig'>, *args, **kwargs)¶ Bases:
ipmininet.router.__router.IPNodeA Host which manages a set of daemons
-
createDefaultRoutes()¶
-
setDefaultRoute(intf: Union[ipmininet.link.IPIntf, str, None] = None, v6=False)¶ Set the default routes to go through the intfs. intf: Intf or {dev <intfname> via <gw-ip> …}
-
-
class
ipmininet.host.CPULimitedHost(name, sched='cfs', **kwargs)¶ Bases:
ipmininet.host.__host.IPHostCPU limited host
-
cfsInfo(f)¶ Internal method: return parameters for CFS bandwidth
-
cgroupDel()¶ Clean up our cgroup
-
cgroupGet(param, resource='cpu')¶ Return value of cgroup parameter
-
cgroupSet(param, value, resource='cpu')¶ Set a cgroup parameter and return its value
-
classmethod
checkRtGroupSched()¶ Check (Ubuntu,Debian) kernel config for CONFIG_RT_GROUP_SCHED for RT
-
chrt()¶ Set RT scheduling priority
-
cleanup()¶ Clean up Node, then clean up our cgroup
-
config(cpu=-1, cores=None, **params)¶ cpu: desired overall system CPU fraction cores: (real) core(s) this host can run on params: parameters for Node.config()
-
classmethod
init()¶ Initialization for CPULimitedHost class
-
inited= False¶
-
popen(*args, **kwargs)¶ Return a Popen() object in node’s namespace args: Popen() args, single list, or string kwargs: Popen() keyword args
-
rtInfo(f)¶ Internal method: return parameters for RT bandwidth
-
setCPUFrac(f, sched=None)¶ Set overall CPU fraction for this host f: CPU bandwidth limit (positive fraction, or -1 for cfs unlimited) sched: ‘rt’ or ‘cfs’ Note ‘cfs’ requires CONFIG_CFS_BANDWIDTH, and ‘rt’ requires CONFIG_RT_GROUP_SCHED
-
setCPUs(cores, mems=0)¶ Specify (real) cores that our cgroup can run on
-