"flags": Attribute.ExecReadOnly | Attribute.ExecImmutable,
"validation_function": validation.is_string,
}),
+ "city": dict({
+ "name": "city",
+ "help": "Constrain location (city) during resource discovery. May use wildcards.",
+ "type": Attribute.STRING,
+ "flags": Attribute.ExecReadOnly | Attribute.ExecImmutable,
+ "validation_function": validation.is_string,
+ }),
+ "country": dict({
+ "name": "hostname",
+ "help": "Constrain location (country) during resource discovery. May use wildcards.",
+ "type": Attribute.STRING,
+ "flags": Attribute.ExecReadOnly | Attribute.ExecImmutable,
+ "validation_function": validation.is_string,
+ }),
+ "region": dict({
+ "name": "hostname",
+ "help": "Constrain location (region) during resource discovery. May use wildcards.",
+ "type": Attribute.STRING,
+ "flags": Attribute.ExecReadOnly | Attribute.ExecImmutable,
+ "validation_function": validation.is_string,
+ }),
"architecture": dict({
"name": "architecture",
"help": "Constrain architexture during resource discovery.",
"flags": Attribute.ExecReadOnly | Attribute.ExecImmutable,
"validation_function": validation.is_number,
}),
+ "min_load": dict({
+ "name": "minLoad",
+ "help": "Constrain node load average while picking PlanetLab nodes. Specifies a lower acceptable bound.",
+ "type": Attribute.DOUBLE,
+ "range": (0,2**31),
+ "flags": Attribute.ExecReadOnly | Attribute.ExecImmutable,
+ "validation_function": validation.is_number,
+ }),
+ "max_load": dict({
+ "name": "maxLoad",
+ "help": "Constrain node load average while picking PlanetLab nodes. Specifies an upper acceptable bound.",
+ "type": Attribute.DOUBLE,
+ "range": (0,2**31),
+ "flags": Attribute.ExecReadOnly | Attribute.ExecImmutable,
+ "validation_function": validation.is_number,
+ }),
+ "min_cpu": dict({
+ "name": "minCpu",
+ "help": "Constrain available cpu time while picking PlanetLab nodes. Specifies a lower acceptable bound.",
+ "type": Attribute.DOUBLE,
+ "range": (0,100),
+ "flags": Attribute.ExecReadOnly | Attribute.ExecImmutable,
+ "validation_function": validation.is_number,
+ }),
+ "max_cpu": dict({
+ "name": "maxCpu",
+ "help": "Constrain available cpu time while picking PlanetLab nodes. Specifies an upper acceptable bound.",
+ "type": Attribute.DOUBLE,
+ "range": (0,100),
+ "flags": Attribute.ExecReadOnly | Attribute.ExecImmutable,
+ "validation_function": validation.is_number,
+ }),
"up": dict({
"name": "up",
'architecture' : ('arch','value'),
'operatingSystem' : ('fcdistro','value'),
'pl_distro' : ('pldistro','value'),
+ 'city' : ('city','value'),
+ 'country' : ('country','value'),
+ 'region' : ('region','value'),
'minReliability' : ('reliability%(timeframe)s', ']value'),
'maxReliability' : ('reliability%(timeframe)s', '[value'),
'minBandwidth' : ('bw%(timeframe)s', ']value'),
'maxBandwidth' : ('bw%(timeframe)s', '[value'),
+ 'minLoad' : ('load%(timeframe)s', ']value'),
+ 'maxLoad' : ('load%(timeframe)s', '[value'),
+ 'minCpu' : ('cpu%(timeframe)s', ']value'),
+ 'maxCpu' : ('cpu%(timeframe)s', '[value'),
}
DEPENDS_PIDFILE = '/tmp/nepi-depends.pid'
maxReliability = _castproperty(float, '_maxReliability')
minBandwidth = _castproperty(float, '_minBandwidth')
maxBandwidth = _castproperty(float, '_maxBandwidth')
+ minCpu = _castproperty(float, '_minCpu')
+ maxCpu = _castproperty(float, '_maxCpu')
+ minLoad = _castproperty(float, '_minLoad')
+ maxLoad = _castproperty(float, '_maxLoad')
def __init__(self, api=None):
if not api:
self.operatingSystem = None
self.pl_distro = None
self.site = None
+ self.city = None
+ self.country = None
+ self.region = None
self.minReliability = None
self.maxReliability = None
self.minBandwidth = None
self.maxBandwidth = None
+ self.minCpu = None
+ self.maxCpu = None
+ self.minLoad = None
+ self.maxLoad = None
self.min_num_external_ifaces = None
self.max_num_external_ifaces = None
self.timeframe = 'm'
self.minReliability = \
self.maxReliability = \
self.minBandwidth = \
- self.maxBandwidth = None
+ self.maxBandwidth = \
+ self.minCpu = \
+ self.maxCpu = \
+ self.minLoad = \
+ self.maxLoad = None
def install_dependencies(self):
if self.required_packages and not self._installed: