Substep class for conditionsTag.
More...
|
def | value (self) |
| Return argument value. More...
|
|
def | value (self, value) |
| Set argument value. More...
|
|
def | prodsysDescription (self) |
|
def | returnMyValue (self, name=None, substep=None, first=False, exe=None) |
| Return the value of this substep arg for an executor with the given parameters. More...
|
|
def | isRunarg (self) |
| Return runarg status. More...
|
|
def | name (self) |
| Name getter. More...
|
|
def | name (self, value) |
| Name setter. More...
|
|
def | __str__ (self) |
| String conversion of our value. More...
|
|
def | __repr__ (self) |
| Repr conversion of our value. More...
|
|
def | __eq__ (self, other) |
| Comparison is based on value attribute. More...
|
|
def | __nq__ (self, other) |
|
def | __lt__ (self, other) |
|
def | __gt__ (self, other) |
|
Substep class for conditionsTag.
Definition at line 2420 of file trfArgClasses.py.
◆ __eq__()
def python.trfArgClasses.argument.__eq__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
|
inherited |
Comparison is based on value attribute.
Definition at line 161 of file trfArgClasses.py.
161 def __eq__(self,other):
162 return self.value == other.value
◆ __gt__()
def python.trfArgClasses.argument.__gt__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
|
inherited |
Definition at line 170 of file trfArgClasses.py.
170 def __gt__(self, other):
171 return self.value > other.value
◆ __lt__()
def python.trfArgClasses.argument.__lt__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
|
inherited |
Definition at line 167 of file trfArgClasses.py.
167 def __lt__(self, other):
168 return self.value < other.value
◆ __nq__()
def python.trfArgClasses.argument.__nq__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
|
inherited |
Definition at line 164 of file trfArgClasses.py.
164 def __nq__(self, other):
165 return self.value != other.value
◆ __repr__()
def python.trfArgClasses.argument.__repr__ |
( |
|
self | ) |
|
|
inherited |
◆ __str__()
def python.trfArgClasses.argument.__str__ |
( |
|
self | ) |
|
|
inherited |
◆ _amiLookUp()
def python.trfArgClasses.argSubstepConditions._amiLookUp |
( |
|
self, |
|
|
|
client |
|
) |
| |
|
private |
Definition at line 2438 of file trfArgClasses.py.
2438 def _amiLookUp(self, client):
2439 cmd =
"COMAGetGlobalTagNameByCurrentState --state=CurrentMC"
2440 return str(client.execute(cmd, format =
'dom_object').get_rows().pop()[
'globalTag'])
◆ _parseStringAsSubstep()
def python.trfArgClasses.argSubstep._parseStringAsSubstep |
( |
|
self, |
|
|
|
string |
|
) |
| |
|
privateinherited |
Parse a string for substep:value format.
If the string matches the substep specifier regexp then we return the two parts; if not then the substep is returned as self._defaultSubstep
, with the entire string passed back as the value
- Parameters
-
string | The string which should be parsed |
Reimplemented in python.trfArgClasses.argSubstepList.
Definition at line 1987 of file trfArgClasses.py.
1987 def _parseStringAsSubstep(self, string):
1988 subStepMatch = re.match(
r'([a-zA-Z0-9,]+)' + self._separator +
r'(.*)', string)
1991 subStep = subStepMatch.group(1).
split(
',')
1992 subStepValue = subStepMatch.group(2)
1994 subStep = [self._defaultSubstep]
1995 subStepValue = string
1996 msg.debug(
'Parsed {0} as substep {1}, argument {2}'.
format(string, subStep, subStepValue))
1997 for step
in subStep:
1998 subStepList.append((step, subStepValue))
◆ isRunarg()
def python.trfArgClasses.argument.isRunarg |
( |
|
self | ) |
|
|
inherited |
◆ name() [1/2]
def python.trfArgClasses.argument.name |
( |
|
self | ) |
|
|
inherited |
◆ name() [2/2]
def python.trfArgClasses.argument.name |
( |
|
self, |
|
|
|
value |
|
) |
| |
|
inherited |
◆ prodsysDescription()
def python.trfArgClasses.argSubstepConditions.prodsysDescription |
( |
|
self | ) |
|
Reimplemented from python.trfArgClasses.argSubstep.
Definition at line 2443 of file trfArgClasses.py.
2443 def prodsysDescription(self):
2444 desc = {
'type':
'substep',
'substeptype':
'str',
'separator': self._separator,
2445 'default': self._defaultSubstep}
◆ returnMyValue()
def python.trfArgClasses.argSubstep.returnMyValue |
( |
|
self, |
|
|
|
name = None , |
|
|
|
substep = None , |
|
|
|
first = False , |
|
|
|
exe = None |
|
) |
| |
|
inherited |
Return the value of this substep arg for an executor with the given parameters.
- Parameters
-
name | Executor name |
substep | Executor substep nickname |
first | Boolean flag set true if this is the first executor in the chain |
exe | Executor instance, from which 'name', 'substep' and 'first' can be taken.
|
Definition at line 2007 of file trfArgClasses.py.
2007 def returnMyValue(self, name=None, substep=None, first=False, exe=None):
2010 substep = exe.substep
2011 first = exe.conf.firstExecutor
2017 if name
in self._value:
2018 value = self._value[name]
2019 elif substep
in self._value:
2020 value = self._value[substep]
2021 elif first
and 'first' in self._value:
2022 value = self._value[
'first']
2023 elif 'default' in self._value:
2024 value = self._value[
'default']
2034 if 'all' in self._value:
2036 value = self._value[
'all']
2037 elif isinstance(value, list):
2038 value = self._value[
'all'] + value
2040 msg.debug(
'From substep argument {myvalue} picked value "{value}" for {name}, {substep}, first={first}'.
format(myvalue=self._value, value=value, name=name, substep=substep, first=first))
◆ value() [1/2]
def python.trfArgClasses.argSubstepConditions.value |
( |
|
self | ) |
|
◆ value() [2/2]
def python.trfArgClasses.argSubstepConditions.value |
( |
|
self, |
|
|
|
value |
|
) |
| |
Set argument value.
- Note
- No conversion or coercion done
Reimplemented from python.trfArgClasses.argSubstep.
Definition at line 2426 of file trfArgClasses.py.
2426 def value(self, value):
2427 msg.debug(
'Attempting to set argSubstepConditions from {0!s} (type {1}'.
format(value,
type(value)))
2429 super(self.__class__, self.__class__).value.fset(self, value)
2432 for k, v
in self._value.
items():
2433 if "CurrentMC" == v:
2436 self._value[k] = current
◆ _defaultSubstep
python.trfArgClasses.argSubstep._defaultSubstep |
|
privateinherited |
◆ _name
python.trfArgClasses.argument._name |
|
privateinherited |
◆ _runarg
python.trfArgClasses.argument._runarg |
|
privateinherited |
◆ _separator
python.trfArgClasses.argSubstep._separator |
|
privateinherited |
◆ _value
python.trfArgClasses.argSubstep._value |
|
privateinherited |
◆ value
python.trfArgClasses.argument.value |
|
inherited |
- Note
- We have a default of None here, but all derived classes should definitely have their own value setter and translate this value to something sensible for their underlying value type. N.B. As most argument classes use this default constructor it must call the
@value
.setter function!
Definition at line 118 of file trfArgClasses.py.
The documentation for this class was generated from the following file: