<s> import xmlrpclib <EOL> from openflow . optin_manager . sfa . util . genicode import GENICODE <EOL> class SfaFault ( xmlrpclib . Fault ) : <EOL> def __init__ ( self , faultCode , faultString , extra = None ) : <EOL> if extra : <EOL> faultString += "<STR_LIT>" + str ( extra ) <EOL> xmlrpclib . Fault . __init__ ( self , faultCode , faultString ) <EOL> class OCFSfaPermissionDenied ( SfaFault ) : <EOL> def __init__ ( self , value = '<STR_LIT>' , extra = None ) : <EOL> self . faultString = "<STR_LIT>" % value <EOL> self . code = GENICODE . FORBIDDEN <EOL> SfaFault . __init__ ( self , self . code , self . faultString , extra ) <EOL> class OCFSfaError ( SfaFault ) : <EOL> def __init__ ( self , value = '<STR_LIT>' , method = '<STR_LIT>' , extra = None ) : <EOL> self . faultString = "<STR_LIT>" % ( method , value ) <EOL> self . code = GENICODE . ERROR <EOL> SfaFault . __init__ ( self , self . code , self . faultString , extra ) <EOL> class SfaInvalidAPIMethod ( SfaFault ) : <EOL> def __init__ ( self , method , interface = None , extra = None ) : <EOL> faultString = "<STR_LIT>" + method <EOL> if interface : <EOL> faultString += "<STR_LIT>" + interface <EOL> SfaFault . __init__ ( self , GENICODE . UNSUPPORTED , faultString , extra ) <EOL> class SfaInvalidArgumentCount ( SfaFault ) : <EOL> def __init__ ( self , got , min , max = min , extra = None ) : <EOL> if min != max : <EOL> expected = "<STR_LIT>" % ( min , max ) <EOL> else : <EOL> expected = "<STR_LIT>" % min <EOL> faultString = "<STR_LIT>" % ( expected , got ) <EOL> SfaFault . __init__ ( self , GENICODE . BADARGS , faultString , extra ) <EOL> class SfaInvalidArgument ( SfaFault ) : <EOL> def __init__ ( self , extra = None , name = None ) : <EOL> if name is not None : <EOL> faultString = "<STR_LIT>" % name <EOL> else : <EOL> faultString = "<STR_LIT>" <EOL> SfaFault . __init__ ( self , GENICODE . BADARGS , faultString , extra ) <EOL> class SfaAuthenticationFailure ( SfaFault ) : <EOL> def __init__ ( self , extra = None ) : <EOL> faultString = "<STR_LIT>" <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) <EOL> class SfaDBError ( SfaFault ) : <EOL> def __init__ ( self , extra = None ) : <EOL> faultString = "<STR_LIT>" <EOL> SfaFault . __init__ ( self , GENICODE . DBERROR , faultString , extra ) <EOL> class SfaPermissionDenied ( SfaFault ) : <EOL> def __init__ ( self , extra = None ) : <EOL> faultString = "<STR_LIT>" <EOL> SfaFault . __init__ ( self , GENICODE . FORBIDDEN , faultString , extra ) <EOL> class SfaNotImplemented ( SfaFault ) : <EOL> def __init__ ( self , interface = None , extra = None ) : <EOL> faultString = "<STR_LIT>" <EOL> if interface : <EOL> faultString += "<STR_LIT>" + interface <EOL> SfaFault . __init__ ( self , GENICODE . UNSUPPORTED , faultString , extra ) <EOL> class SfaAPIError ( SfaFault ) : <EOL> def __init__ ( self , extra = None ) : <EOL> faultString = "<STR_LIT>" <EOL> SfaFault . __init__ ( self , GENICODE . SERVERERROR , faultString , extra ) <EOL> class MalformedHrnException ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class TreeException ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class NonExistingRecord ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . SEARCHFAILED , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class ExistingRecord ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . REFUSED , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class InvalidRPCParams ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . RPCERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class ConnectionKeyGIDMismatch ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class MissingCallerGID ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class RecordNotFound ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class UnknownSfaType ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class MissingAuthority ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class PlanetLabRecordDoesNotExist ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class PermissionError ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . FORBIDDEN , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class InsufficientRights ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . FORBIDDEN , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class MissingDelegateBit ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . FORBIDDEN , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class ChildRightsNotSubsetOfParent ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . FORBIDDEN , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class CertMissingParent ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class CertNotSignedByParent ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class GidParentHrn ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class GidInvalidParentHrn ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class SliverDoesNotExist ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class BadRequestHash ( xmlrpclib . Fault ) : <EOL> def __init__ ( self , hash = None , extra = None ) : <EOL> faultString = "<STR_LIT>" + str ( hash ) <EOL> xmlrpclib . Fault . __init__ ( self , GENICODE . ERROR , faultString ) <EOL> class MissingTrustedRoots ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . SERVERERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class MissingSfaInfo ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class InvalidRSpec ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class InvalidRSpecVersion ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . BADVERSION , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class UnsupportedRSpecVersion ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . UNSUPPORTED , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class InvalidRSpecElement ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class InvalidXML ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class AccountNotEnabled ( SfaFault ) : <EOL> def __init__ ( self , extra = None ) : <EOL> faultString = "<STR_LIT>" <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class CredentialNotVerifiable ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % locals ( ) <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) <EOL> def __str__ ( self ) : <EOL> return repr ( self . value ) <EOL> class CertExpired ( SfaFault ) : <EOL> def __init__ ( self , value , extra = None ) : <EOL> self . value = value <EOL> faultString = "<STR_LIT>" % value <EOL> SfaFault . __init__ ( self , GENICODE . ERROR , faultString , extra ) </s>
