
from enum import Enum

ERROR_MSG = 'The API server returned an error: "The request has been submitted'

class VPSAInterfaceTypes(Enum):
    FE = 'fe'
    PUBLIC = 'public'
    VNI_PREFIX = 'vni-'

from enum import Enum

ERROR_MSG = 'The API server returned an error: "The request has been submitted'

class BaseEnum(Enum):
    @classmethod
    def list(cls):
        return list(map(lambda c: c.value, cls))

class VPSAInterfaceTypes(BaseEnum):
    FE = 'fe'
    PUBLIC = 'public'
    VNI_PREFIX = 'vni-'
Create Base class for enum
Create Base class for enum

Change-Id: Ia0de5c1c99cabcab38d1a64949b50e916fadd8b8

  
  from enum import Enum
  
  ERROR_MSG = 'The API server returned an error: "The request has been submitted'
  
+ class BaseEnum(Enum):
+     @classmethod
+     def list(cls):
+         return list(map(lambda c: c.value, cls))
+ 
- class VPSAInterfaceTypes(Enum):
+ class VPSAInterfaceTypes(BaseEnum):
      FE = 'fe'
      PUBLIC = 'public'
      VNI_PREFIX = 'vni-'
Create Base class for enum
## Code Before:

from enum import Enum

ERROR_MSG = 'The API server returned an error: "The request has been submitted'

class VPSAInterfaceTypes(Enum):
    FE = 'fe'
    PUBLIC = 'public'
    VNI_PREFIX = 'vni-'
## Instruction:
Create Base class for enum
## Code After:

from enum import Enum

ERROR_MSG = 'The API server returned an error: "The request has been submitted'

class BaseEnum(Enum):
    @classmethod
    def list(cls):
        return list(map(lambda c: c.value, cls))

class VPSAInterfaceTypes(BaseEnum):
    FE = 'fe'
    PUBLIC = 'public'
    VNI_PREFIX = 'vni-'