Package Ganga :: Package GPIDev :: Package Streamers :: Module MigrationControl :: Class MigrationControl
[hide private]
[frames] | no frames]

Class MigrationControl

source code

object --+
         |
        MigrationControl

Nested Classes [hide private]
  TreeNode
Instance Methods [hide private]
 
__init__(self, display='full')
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
isAllowed(self, category, name, version, msg='')
This method checks whether migration for the plugin called 'name' of version 'version' from category 'category' is allowed or not.
source code
 
allow(self, category=None, name=None, version=None)
This method allows migration.
source code
 
deny(self, category=None, name=None, version=None)
This method denies migration.
source code
 
getUserInput(self, msg)
This method is for getting user permission for migration.
source code

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

Class Variables [hide private]
  _choices_compact = {'1': 'Yes', '2': 'No', '3': 'Yes for All',...
  _choices_full = {'1': 'Yes', '10': 'No for All within this cat...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, display='full')
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

isAllowed(self, category, name, version, msg='')

source code 

This method checks whether migration for the plugin called 'name' of version 'version' from category 'category' is allowed or not. If migration is not explicitly allowed through MigrationControl.migration object it will warn user with the message 'msg' and ask for permission to allow migration.

allow(self, category=None, name=None, version=None)

source code 

This method allows migration. allow() --> allow all allow(category)--> allow all from 'category' allow(category, name) --> allow for all versions of 'name' from 'category' allow(category, name, version) --> allow for 'version' and 'name' from 'category'

deny(self, category=None, name=None, version=None)

source code 

This method denies migration. deny() --> deny all deny(category)--> deny all from 'category' deny(category, name) --> deny for all versions of 'name' from 'category' deny(category, name, version) --> deny for 'version' and 'name' from 'category'

getUserInput(self, msg)

source code 

This method is for getting user permission for migration. Args: msg - is the warning message.


Class Variable Details [hide private]

_choices_compact

Value:
{'1': 'Yes', '2': 'No', '3': 'Yes for All', '4': 'No for All'}

_choices_full

Value:
{'1': 'Yes',
 '10': 'No for All within this category',
 '2': 'No',
 '3': 'Yes for All',
 '4': 'No for All',
 '5': 'Yes for All with this version',
 '6': 'No for All with this version',
 '7': 'Yes for All with this name',
...