Source code for pcapkit.const.mh.revocation_status_code
# -*- coding: utf-8 -*-# pylint: disable=line-too-long,consider-using-f-string"""Binding Revocation Acknowledgement Status Codes=====================================================.. module:: pcapkit.const.mh.revocation_status_codeThis module contains the constant enumeration for **Binding Revocation Acknowledgement Status Codes**,which is automatically generated from :class:`pcapkit.vendor.mh.revocation_status_code.RevocationStatusCode`."""fromaenumimportIntEnum,extend_enum__all__=['RevocationStatusCode']
[docs]classRevocationStatusCode(IntEnum):"""[RevocationStatusCode] Binding Revocation Acknowledgement Status Codes"""#: success [:rfc:`5846`]success=0#: partial success [:rfc:`5846`]partial_success=1#: Binding Does NOT Exist [:rfc:`5846`]Binding_Does_NOT_Exist=128#: IPv4 Home Address Option Required [:rfc:`5846`]IPv4_Home_Address_Option_Required=129#: Global Revocation NOT Authorized [:rfc:`5846`]Global_Revocation_NOT_Authorized=130#: Revoked Mobile Nodes Identity Required [:rfc:`5846`]Revoked_Mobile_Nodes_Identity_Required=131#: Revocation Failed - MN is Attached [:rfc:`5846`]Revocation_Failed_MN_is_Attached=132#: Revocation Trigger NOT Supported [:rfc:`5846`]Revocation_Trigger_NOT_Supported=133#: Revocation Function NOT Supported [:rfc:`5846`]Revocation_Function_NOT_Supported=134#: Proxy Binding Revocation NOT Supported [:rfc:`5846`]Proxy_Binding_Revocation_NOT_Supported=135@staticmethoddefget(key:'int | str',default:'int'=-1)->'RevocationStatusCode':"""Backport support for original codes. Args: key: Key to get enum item. default: Default value if not found. :meta private: """ifisinstance(key,int):returnRevocationStatusCode(key)ifkeynotinRevocationStatusCode._member_map_:# pylint: disable=no-memberreturnextend_enum(RevocationStatusCode,key,default)returnRevocationStatusCode[key]# type: ignore[misc]
[docs]@classmethoddef_missing_(cls,value:'int')->'RevocationStatusCode':"""Lookup function used when value is not found. Args: value: Value to get enum item. """ifnot(isinstance(value,int)and0<=value<=255):raiseValueError('%r is not a valid %s'%(value,cls.__name__))if2<=value<=127:#: Unassignedreturnextend_enum(cls,'Unassigned_%d'%value,value)if136<=value<=255:#: Unassignedreturnextend_enum(cls,'Unassigned_%d'%value,value)returnsuper()._missing_(value)