Package buildbot :: Package schedulers :: Module forcesched :: Class BaseParameter
[frames] | no frames]

Class BaseParameter

source code

object --+
         |
        BaseParameter
Known Subclasses:

BaseParameter provides a base implementation for property customization

Instance Methods
 
setParent(self, parent) source code
 
__init__(self, name, label=None, regex=None, **kw)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
getFromKwargs(self, kwargs)
Simple customization point for child classes that do not need the other parameters supplied to updateFromKwargs.
source code
 
updateFromKwargs(self, properties, kwargs, **unused)
Primary entry point to turn 'kwargs' into 'properties'
source code
 
parse_from_args(self, l)
Secondary customization point, called from getFromKwargs to turn a validated value into a single property value
source code
 
parse_from_arg(self, s) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  name = ''
  parentName = None
hash(x)
  label = ''
  type = []
  default = ''
  required = False
  multiple = False
  regex = None
hash(x)
  debug = True
  hide = False
Properties
  fullName
A full name, intended to uniquely identify a parameter

Inherited from object: __class__

Method Details

__init__(self, name, label=None, regex=None, **kw)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • name (unicode) - the name of the field, used during posting values back to the scheduler. This is not necessarily a UI value, and there may be restrictions on the characters allowed for this value. For example, HTML would require this field to avoid spaces and other punctuation ('-', '.', and '_' allowed)
  • label (unicode or None (to use 'name')) - (optional) the name of the field, used for UI display.
  • regex (unicode or regex) - (optional) regex to validate the value with. Not used by all subclasses
Overrides: object.__init__

getFromKwargs(self, kwargs)

source code 

Simple customization point for child classes that do not need the other parameters supplied to updateFromKwargs. Return the value for the property named 'self.name'.

The default implementation converts from a list of items, validates using the optional regex field and calls 'parse_from_args' for the final conversion.


Property Details

fullName

A full name, intended to uniquely identify a parameter

Get Method:
unreachable.fullName(self) - A full name, intended to uniquely identify a parameter