"""
Copyright 2015-2016 VMware, Inc.  All rights reserved. -- VMware Confidential

This library implements feature state switch.
"""
__author__ = "VMware, Inc"

import os
import sys
import codecs
import logging
import traceback
import datetime
import platform
from datetime import datetime


featureNameList = [
    'AMDIommuIR',
    'ApplianceMonitoring',
    'APPLMGMT2017Q2API',
    'APPLMGMT2017Q3API',
    'APPLMGMT_FIREWALL_API',
    'AsyncNFC',
    'B2B',
    'BackupManagement',
    'BAUHAUS_VM_MOID',
    'BootBankIncrease',
    'bnxtnet',
    'bnxtnet_unstable',
    'bnxtroce',
    'CBRC2',
    'CertificateManagement',
    'CL_OVA_Support',
    'CL_Native_VMTX',
    'CL_Native_VMTX_Phase2',
    'CL_VMTX_Sync',
    'CM_Disabled',
    'CNS',
    'ComputePolicy',
    'ComputePolicyV2',
    'ConvergeAPI',
    'ConvergeTelemetry',
    'CoreStorage_4knDevSupport',
    'Cross_Domain_Repoint',
    'cswitchVSS',
    'CS_512eSoftwareEmulation',
    'CustomAttributesUi',
    'dcbConfig',
    'DDNS_Updater',
    'DeferHistoryImport',
    'DirectModuleLoading',
    'DPM_V2',
    'EAM_VUM_Integration',
    'EditHaUIEnhancements',
    'elxiscsi',
    'EsxcliPatchPatcher',
    'EmbeddedLinkMode',
    'eSwap',
    'FastHostMMAlgo',
    'FastUpgrade',
    'FBBR_INCREMENTAL',
    'FCD_SNAPSHOT',
    'FCD_SPBM_Policy',
    'FCD_Deletion_Option',
    'FCD_VMcrypt',
    'FCD_VSAN',
    'FCD_GlobalCatalog',
    'FCD_Metadata',
    'FPGA',
    'FT_DRS_METRO_CLUSTER',
    'FT_EFI_SUPPORT',
    'FT_INTEROP_VMCP',
    'FT_VBS_SUPPORT',
    'FT_VCPU_MEM_LIMITS',
    'gfms',
    'hardwareV14_vbs',
    'hardwareV14_vvtd',
    'HARemotePlacementEngine',
    'HBRPerformance',
    'HBR_VMcrypt_INTEROP',
    'HCI',
    'HostUpgradeAutoReconnect',
    'HPDropDownMenu',
    'HPEngineService',
    'HPEngineParallel',
    'HPExtPlugins',
    'HPNSXStateless',
    'HPP',
    'HPValidationWarning',
    'HWv13',
    'HWv14',
    'HWv15',
    'HWvFuture',
    'HybridEvc',
    'HybridVC',
    'HybridVC_V2',
    'iavmd',
    'InjectVsanCapabilities',
    'inotify',
    'InstantClone',
    'InstantClone2',
    'InstantCloneGosc',
    'IntelligentCeipPlatform',
    'IO_FILTERS3',
    'IpfixPrivilege',
    'IPv6PeerDns',
    'iSCSI_NSX',
    'iser',
    'iser_unstable',
    'LiveRefresh',
    'LoadEsx',
    'LookupService_GA1_Compat',
    'LookupService_V1_5',
    'LookupService_V2',
    'lsi_msgpt35',
    'lsi_msgpt35_unstable',
    'lsi_msgpt3_unstable',
    'LUN_mgmt_enhancements',
    'MemSchedGenericAPI',
    'Mirror_Netstack',
    'NativeBrowserFileTransfer',
    'NBD_AIO',
    'NetSchedHClkMQVnic',
    'NewCPUDeprecation',
    'NFC_DISABLED_IN_VPXA',
    'nfnic',
    'NFS41_KRB5I',
    'NFS41_VMKCRYPTO',
    'NFS_AES',
    'NFS_SWMR_LOCK',
    'NicMgmt_Set',
    'NIOCDynInfraRP',
    'nmlx4_core_unstable',
    'nmlx4_en_unstable',
    'nmlx4_rdma_unstable',
    'nmlx5_core_unstable',
    'nmlx5_rdma',
    'nmlx5_rdma_unstable',
    'NVME_NS_MGMT',
    'NVMeNGUIDSupport',
    'nvmxnet3_unstable',
    'OneGbPage',
    'OneKVolumes',
    'OnlinePromoteDisks',
    'OpaqueSwitchMigration',
    'PBCACHE_NLRU',
    'PerVmEvc',
    'Petronas',
    'PG_CHECKSUM',
    'PG_WAL_ARCHIVE',
    'PG_WAL_RESTORE',
    'PMem',
    'PMemDisk',
    'PMemPlatform',
    'PMemV2',
    'PMT8102_16TB',
    'PNIDChange',
    'Pod',
    'PodClusterConfig',
    'PreemptibleSyscalls',
    'PrepareVmsForSanOnly',
    'PUSH_TELEMETRY',
    'PVSCSI_256Devices',
    'qcnic',
    'qedentv_unstable',
    'qedrntv',
    'qfle3_unstable',
    'qfle3i',
    'qfle3f',
    'QSCounterMappingRemoval',
    'RDMA_SRQ',
    'RDMA_UI',
    'RemoveWFMPowerOn',
    'RES_EXHAUSTION',
    'RoleEventsAuditingQuality',
    'SESPARSE_AUTOUNMAP',
    'sfvmk',
    'SGX',
    'SIOC_UserWorld',
    'SMART_ENHANCEMENT',
    'smartpqi',
    'SnowMotion',
    'SoftNUMA',
    'SRIOV_NFV',
    'SRIOV_POOLS',
    'SPBM_VAPI_SHIM1',
    'SSLCertificateManagement',
    'StatsRegistry',
    'SyslogManagementAPI',
    'ThirdPartyDvsRemoval',
    'TLSv12Default',
    'TPM20',
    'TPM20_TXT',
    'TrustManagement',
    'UI_Multi_AZ',
    'UI_TELEMETRY_ENH',
    'USBquirk',
    'UPITHostCapability',
    'UpdateAPI2017',
    'VADP_FCD',
    'VADP_LinuxMountAdvModes',
    'VADP_QueryAllocatedBlocks',
    'VASA3',
    'VCDB_UI',
    'VC_Alarms_B2B_Upgrade',
    'VC_Events_BurstFilter',
    'VC_Events_LevelFilter',
    'VC_Events_Retention',
    'VC_VAPI_Guest',
    'VC_VAPI_Shim2',
    'VC_SecureHeartbeat',
    'VCHA_Embedded',
    'VCHA_Upgrade',
    'VCInstallAPI',
    'VCMigrateAPI',
    'VCSA_LOG_FORWARDING',
    'VCSA_SSH_ACCESS_EVENT',
    'VCUpgradeAPI',
    'VDDK_PHONEHOME',
    'VDFS',
    'VMAFD_ESX',
    'VMBackupGenericManifest',
    'VMConsoleUser',
    'VMcrypt2',
    'VMcrypt3_KeysOps_WithRefCnt',
    'VMcrypt3_QueryKeyState',
    'VMcryptNext',
    'VMDIR_HealthManagement',
    'VMDIR_SimplifiedReplication',
    'VMFork',
    'vmxnet3PacketSteering',
    'VMFS6',
    'VMIOP_CHECKPOINT',
    'VMIOP_MIGRATE',
    'vmkfcoe',
    'VMODL_VASA',
    'vmConnectionControl',
    'VNVME_Milestone_1_1',
    'VNVME_Milestone_2',
    'VpxdUser',
    'VpxdVapiServices',
    'VpxLockThreshold_Baseline',
    'VRDMA_ROCEV2',
    'VSAN_CoreDump',
    'VSAN_Dps',
    'VSAN_Encryption',
    'VSAN_HostAffinity',
    'VSAN_MultipleDatastore',
    'VSAN_MSCS_SUPPORT',
    'VSAN_RDMA',
    'VSAN_ResourceCheck',
    'VSAN_UNMAP',
    'VsanAwareDrsV1',
    'VsanEncrypt',
    'vswitchConvergence',
    'VUM_VA_Removal',
    'VVOL_MSCS_SUPPORT',
    'VMFS3_EOL',
    'VMFS6_UNMAP_BANDWIDTH',
    'VMFS6_VOMA_FIX_MODE_SUPPORT',
    'VMFS6_LARGE_GRANULAR_UNMAP',
    'XCOPY_ARRAY_REPORTED',
    'XVC_Mixed_Version',
]

AMDIommuIR = False
ApplianceMonitoring = True
APPLMGMT2017Q2API = True
APPLMGMT2017Q3API = False
APPLMGMT_FIREWALL_API = True
AsyncNFC = True
B2B = False
BackupManagement = True
BAUHAUS_VM_MOID = False
BootBankIncrease = False
bnxtnet = True
bnxtnet_unstable = False
bnxtroce = True
CBRC2 = True
CertificateManagement = True
CL_OVA_Support = True
CL_Native_VMTX = True
CL_Native_VMTX_Phase2 = True
CL_VMTX_Sync = True
CM_Disabled = True
CNS = True
ComputePolicy = False
ComputePolicyV2 = False
ConvergeAPI = True
ConvergeTelemetry = True
CoreStorage_4knDevSupport = True
Cross_Domain_Repoint = True
cswitchVSS = True
CS_512eSoftwareEmulation = True
CustomAttributesUi = True
dcbConfig = False
DDNS_Updater = True
DeferHistoryImport = True
DirectModuleLoading = False
DPM_V2 = False
EAM_VUM_Integration = True
EditHaUIEnhancements = True
elxiscsi = True
EsxcliPatchPatcher = True
EmbeddedLinkMode = True
eSwap = False
FastHostMMAlgo = True
FastUpgrade = False
FBBR_INCREMENTAL = False
FCD_SNAPSHOT = True
FCD_SPBM_Policy = True
FCD_Deletion_Option = True
FCD_VMcrypt = False
FCD_VSAN = True
FCD_GlobalCatalog = True
FCD_Metadata = True
FPGA = False
FT_DRS_METRO_CLUSTER = False
FT_EFI_SUPPORT = True
FT_INTEROP_VMCP = True
FT_VBS_SUPPORT = False
FT_VCPU_MEM_LIMITS = True
gfms = False
hardwareV14_vbs = True
hardwareV14_vvtd = True
HARemotePlacementEngine = False
HBRPerformance = False
HBR_VMcrypt_INTEROP = True
HCI = True
HostUpgradeAutoReconnect = True
HPDropDownMenu = True
HPEngineService = False
HPEngineParallel = False
HPExtPlugins = False
HPNSXStateless = True
HPP = True
HPValidationWarning = False
HWv13 = True
HWv14 = True
HWv15 = True
HWvFuture = False
HybridEvc = False
HybridVC = False
HybridVC_V2 = False
iavmd = True
InjectVsanCapabilities = False
inotify = False
InstantClone = True
InstantClone2 = True
InstantCloneGosc = False
IntelligentCeipPlatform = True
IO_FILTERS3 = False
IpfixPrivilege = False
IPv6PeerDns = True
iSCSI_NSX = True
iser = True
iser_unstable = False
LiveRefresh = False
LoadEsx = True
LookupService_GA1_Compat = False
LookupService_V1_5 = False
LookupService_V2 = False
lsi_msgpt35 = True
lsi_msgpt35_unstable = False
lsi_msgpt3_unstable = False
LUN_mgmt_enhancements = True
MemSchedGenericAPI = False
Mirror_Netstack = True
NativeBrowserFileTransfer = True
NBD_AIO = True
NetSchedHClkMQVnic = True
NewCPUDeprecation = True
NFC_DISABLED_IN_VPXA = False
nfnic = True
NFS41_KRB5I = True
NFS41_VMKCRYPTO = False
NFS_AES = True
NFS_SWMR_LOCK = False
NicMgmt_Set = True
NIOCDynInfraRP = True
nmlx4_core_unstable = False
nmlx4_en_unstable = False
nmlx4_rdma_unstable = False
nmlx5_core_unstable = False
nmlx5_rdma = True
nmlx5_rdma_unstable = False
NVME_NS_MGMT = True
NVMeNGUIDSupport = True
nvmxnet3_unstable = False
OneGbPage = True
OneKVolumes = True
OnlinePromoteDisks = True
OpaqueSwitchMigration = True
PBCACHE_NLRU = True
PerVmEvc = True
Petronas = False
PG_CHECKSUM = False
PG_WAL_ARCHIVE = True
PG_WAL_RESTORE = False
PMem = True
PMemDisk = True
PMemPlatform = False
PMemV2 = False
PMT8102_16TB = True
PNIDChange = True
Pod = False
PodClusterConfig = False
PreemptibleSyscalls = False
PrepareVmsForSanOnly = False
PUSH_TELEMETRY = True
PVSCSI_256Devices = True
qcnic = True
qedentv_unstable = False
qedrntv = False
qfle3_unstable = False
qfle3i = True
qfle3f = True
QSCounterMappingRemoval = False
RDMA_SRQ = True
RDMA_UI = True
RemoveWFMPowerOn = True
RES_EXHAUSTION = True
RoleEventsAuditingQuality = True
SESPARSE_AUTOUNMAP = True
sfvmk = True
SGX = False
SIOC_UserWorld = False
SMART_ENHANCEMENT = False
smartpqi = True
SnowMotion = False
SoftNUMA = False
SRIOV_NFV = True
SRIOV_POOLS = False
SPBM_VAPI_SHIM1 = True
SSLCertificateManagement = True
StatsRegistry = False
SyslogManagementAPI = True
ThirdPartyDvsRemoval = True
TLSv12Default = True
TPM20 = True
TPM20_TXT = True
TrustManagement = False
UI_Multi_AZ = False
UI_TELEMETRY_ENH = True
USBquirk = True
UPITHostCapability = False
UpdateAPI2017 = True
VADP_FCD = True
VADP_LinuxMountAdvModes = True
VADP_QueryAllocatedBlocks = True
VASA3 = True
VCDB_UI = True
VC_Alarms_B2B_Upgrade = False
VC_Events_BurstFilter = True
VC_Events_LevelFilter = False
VC_Events_Retention = True
VC_VAPI_Guest = True
VC_VAPI_Shim2 = False
VC_SecureHeartbeat = True
VCHA_Embedded = True
VCHA_Upgrade = True
VCInstallAPI = True
VCMigrateAPI = False
VCSA_LOG_FORWARDING = False
VCSA_SSH_ACCESS_EVENT = False
VCUpgradeAPI = True
VDDK_PHONEHOME = True
VDFS = False
VMAFD_ESX = False
VMBackupGenericManifest = True
VMConsoleUser = True
VMcrypt2 = True
VMcrypt3_KeysOps_WithRefCnt = True
VMcrypt3_QueryKeyState = True
VMcryptNext = False
VMDIR_HealthManagement = False
VMDIR_SimplifiedReplication = False
VMFork = False
vmxnet3PacketSteering = True
VMFS6 = True
VMIOP_CHECKPOINT = True
VMIOP_MIGRATE = True
vmkfcoe = True
VMODL_VASA = True
vmConnectionControl = False
VNVME_Milestone_1_1 = True
VNVME_Milestone_2 = False
VpxdUser = True
VpxdVapiServices = True
VpxLockThreshold_Baseline = False
VRDMA_ROCEV2 = True
VSAN_CoreDump = False
VSAN_Dps = True
VSAN_Encryption = False
VSAN_HostAffinity = True
VSAN_MultipleDatastore = True
VSAN_MSCS_SUPPORT = True
VSAN_RDMA = False
VSAN_ResourceCheck = True
VSAN_UNMAP = False
VsanAwareDrsV1 = False
VsanEncrypt = False
vswitchConvergence = True
VUM_VA_Removal = True
VVOL_MSCS_SUPPORT = True
VMFS3_EOL = True
VMFS6_UNMAP_BANDWIDTH = True
VMFS6_VOMA_FIX_MODE_SUPPORT = True
VMFS6_LARGE_GRANULAR_UNMAP = True
XCOPY_ARRAY_REPORTED = True
XVC_Mixed_Version = False


def getFeatureNameList():
   return featureNameList

def computeDatetimeUtc():
    """
    Function that returns the date-time in UTC ISO 8601 format
    """
    return '%sZ' % datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%S.%f')[:-3]

def print_stacktrace_and_exit(msg):
    logging.error(msg)
    logging.error("Printing stack trace before exiting")
    for line in traceback.format_stack():
        logging.error(line.strip())
    sys.exit(1)

def getAMDIommuIR():
    return AMDIommuIR

def getApplianceMonitoring():
    return ApplianceMonitoring

def getAPPLMGMT2017Q2API():
    return APPLMGMT2017Q2API

def getAPPLMGMT2017Q3API():
    return APPLMGMT2017Q3API

def getAPPLMGMT_FIREWALL_API():
    return APPLMGMT_FIREWALL_API

def getAsyncNFC():
    return AsyncNFC

def getB2B():
    return B2B

def getBackupManagement():
    return BackupManagement

def getBAUHAUS_VM_MOID():
    return BAUHAUS_VM_MOID

def getBootBankIncrease():
    return BootBankIncrease

def getbnxtnet():
    return bnxtnet

def getbnxtnet_unstable():
    return bnxtnet_unstable

def getbnxtroce():
    return bnxtroce

def getCBRC2():
    return CBRC2

def getCertificateManagement():
    return CertificateManagement

def getCL_OVA_Support():
    return CL_OVA_Support

def getCL_Native_VMTX():
    return CL_Native_VMTX

def getCL_Native_VMTX_Phase2():
    return CL_Native_VMTX_Phase2

def getCL_VMTX_Sync():
    return CL_VMTX_Sync

def getCM_Disabled():
    return CM_Disabled

def getCNS():
    return CNS

def getComputePolicy():
    return ComputePolicy

def getComputePolicyV2():
    return ComputePolicyV2

def getConvergeAPI():
    return ConvergeAPI

def getConvergeTelemetry():
    return ConvergeTelemetry

def getCoreStorage_4knDevSupport():
    return CoreStorage_4knDevSupport

def getCross_Domain_Repoint():
    return Cross_Domain_Repoint

def getcswitchVSS():
    return cswitchVSS

def getCS_512eSoftwareEmulation():
    return CS_512eSoftwareEmulation

def getCustomAttributesUi():
    return CustomAttributesUi

def getdcbConfig():
    return dcbConfig

def getDDNS_Updater():
    return DDNS_Updater

def getDeferHistoryImport():
    return DeferHistoryImport

def getDirectModuleLoading():
    return DirectModuleLoading

def getDPM_V2():
    return DPM_V2

def getEAM_VUM_Integration():
    return EAM_VUM_Integration

def getEditHaUIEnhancements():
    return EditHaUIEnhancements

def getelxiscsi():
    return elxiscsi

def getEsxcliPatchPatcher():
    return EsxcliPatchPatcher

def getEmbeddedLinkMode():
    return EmbeddedLinkMode

def geteSwap():
    return eSwap

def getFastHostMMAlgo():
    return FastHostMMAlgo

def getFastUpgrade():
    return FastUpgrade

def getFBBR_INCREMENTAL():
    return FBBR_INCREMENTAL

def getFCD_SNAPSHOT():
    return FCD_SNAPSHOT

def getFCD_SPBM_Policy():
    return FCD_SPBM_Policy

def getFCD_Deletion_Option():
    return FCD_Deletion_Option

def getFCD_VMcrypt():
    return FCD_VMcrypt

def getFCD_VSAN():
    return FCD_VSAN

def getFCD_GlobalCatalog():
    return FCD_GlobalCatalog

def getFCD_Metadata():
    return FCD_Metadata

def getFPGA():
    return FPGA

def getFT_DRS_METRO_CLUSTER():
    return FT_DRS_METRO_CLUSTER

def getFT_EFI_SUPPORT():
    return FT_EFI_SUPPORT

def getFT_INTEROP_VMCP():
    return FT_INTEROP_VMCP

def getFT_VBS_SUPPORT():
    return FT_VBS_SUPPORT

def getFT_VCPU_MEM_LIMITS():
    return FT_VCPU_MEM_LIMITS

def getgfms():
    return gfms

def gethardwareV14_vbs():
    return hardwareV14_vbs

def gethardwareV14_vvtd():
    return hardwareV14_vvtd

def getHARemotePlacementEngine():
    return HARemotePlacementEngine

def getHBRPerformance():
    return HBRPerformance

def getHBR_VMcrypt_INTEROP():
    return HBR_VMcrypt_INTEROP

def getHCI():
    return HCI

def getHostUpgradeAutoReconnect():
    return HostUpgradeAutoReconnect

def getHPDropDownMenu():
    return HPDropDownMenu

def getHPEngineService():
    return HPEngineService

def getHPEngineParallel():
    return HPEngineParallel

def getHPExtPlugins():
    return HPExtPlugins

def getHPNSXStateless():
    return HPNSXStateless

def getHPP():
    return HPP

def getHPValidationWarning():
    return HPValidationWarning

def getHWv13():
    return HWv13

def getHWv14():
    return HWv14

def getHWv15():
    return HWv15

def getHWvFuture():
    return HWvFuture

def getHybridEvc():
    return HybridEvc

def getHybridVC():
    return HybridVC

def getHybridVC_V2():
    return HybridVC_V2

def getiavmd():
    return iavmd

def getInjectVsanCapabilities():
    return InjectVsanCapabilities

def getinotify():
    return inotify

def getInstantClone():
    return InstantClone

def getInstantClone2():
    return InstantClone2

def getInstantCloneGosc():
    return InstantCloneGosc

def getIntelligentCeipPlatform():
    return IntelligentCeipPlatform

def getIO_FILTERS3():
    return IO_FILTERS3

def getIpfixPrivilege():
    return IpfixPrivilege

def getIPv6PeerDns():
    return IPv6PeerDns

def getiSCSI_NSX():
    return iSCSI_NSX

def getiser():
    return iser

def getiser_unstable():
    return iser_unstable

def getLiveRefresh():
    return LiveRefresh

def getLoadEsx():
    return LoadEsx

def getLookupService_GA1_Compat():
    return LookupService_GA1_Compat

def getLookupService_V1_5():
    return LookupService_V1_5

def getLookupService_V2():
    return LookupService_V2

def getlsi_msgpt35():
    return lsi_msgpt35

def getlsi_msgpt35_unstable():
    return lsi_msgpt35_unstable

def getlsi_msgpt3_unstable():
    return lsi_msgpt3_unstable

def getLUN_mgmt_enhancements():
    return LUN_mgmt_enhancements

def getMemSchedGenericAPI():
    return MemSchedGenericAPI

def getMirror_Netstack():
    return Mirror_Netstack

def getNativeBrowserFileTransfer():
    return NativeBrowserFileTransfer

def getNBD_AIO():
    return NBD_AIO

def getNetSchedHClkMQVnic():
    return NetSchedHClkMQVnic

def getNewCPUDeprecation():
    return NewCPUDeprecation

def getNFC_DISABLED_IN_VPXA():
    return NFC_DISABLED_IN_VPXA

def getnfnic():
    return nfnic

def getNFS41_KRB5I():
    return NFS41_KRB5I

def getNFS41_VMKCRYPTO():
    return NFS41_VMKCRYPTO

def getNFS_AES():
    return NFS_AES

def getNFS_SWMR_LOCK():
    return NFS_SWMR_LOCK

def getNicMgmt_Set():
    return NicMgmt_Set

def getNIOCDynInfraRP():
    return NIOCDynInfraRP

def getnmlx4_core_unstable():
    return nmlx4_core_unstable

def getnmlx4_en_unstable():
    return nmlx4_en_unstable

def getnmlx4_rdma_unstable():
    return nmlx4_rdma_unstable

def getnmlx5_core_unstable():
    return nmlx5_core_unstable

def getnmlx5_rdma():
    return nmlx5_rdma

def getnmlx5_rdma_unstable():
    return nmlx5_rdma_unstable

def getNVME_NS_MGMT():
    return NVME_NS_MGMT

def getNVMeNGUIDSupport():
    return NVMeNGUIDSupport

def getnvmxnet3_unstable():
    return nvmxnet3_unstable

def getOneGbPage():
    return OneGbPage

def getOneKVolumes():
    return OneKVolumes

def getOnlinePromoteDisks():
    return OnlinePromoteDisks

def getOpaqueSwitchMigration():
    return OpaqueSwitchMigration

def getPBCACHE_NLRU():
    return PBCACHE_NLRU

def getPerVmEvc():
    return PerVmEvc

def getPetronas():
    return Petronas

def getPG_CHECKSUM():
    return PG_CHECKSUM

def getPG_WAL_ARCHIVE():
    return PG_WAL_ARCHIVE

def getPG_WAL_RESTORE():
    return PG_WAL_RESTORE

def getPMem():
    return PMem

def getPMemDisk():
    return PMemDisk

def getPMemPlatform():
    return PMemPlatform

def getPMemV2():
    return PMemV2

def getPMT8102_16TB():
    return PMT8102_16TB

def getPNIDChange():
    return PNIDChange

def getPod():
    return Pod

def getPodClusterConfig():
    return PodClusterConfig

def getPreemptibleSyscalls():
    return PreemptibleSyscalls

def getPrepareVmsForSanOnly():
    return PrepareVmsForSanOnly

def getPUSH_TELEMETRY():
    return PUSH_TELEMETRY

def getPVSCSI_256Devices():
    return PVSCSI_256Devices

def getqcnic():
    return qcnic

def getqedentv_unstable():
    return qedentv_unstable

def getqedrntv():
    return qedrntv

def getqfle3_unstable():
    return qfle3_unstable

def getqfle3i():
    return qfle3i

def getqfle3f():
    return qfle3f

def getQSCounterMappingRemoval():
    return QSCounterMappingRemoval

def getRDMA_SRQ():
    return RDMA_SRQ

def getRDMA_UI():
    return RDMA_UI

def getRemoveWFMPowerOn():
    return RemoveWFMPowerOn

def getRES_EXHAUSTION():
    return RES_EXHAUSTION

def getRoleEventsAuditingQuality():
    return RoleEventsAuditingQuality

def getSESPARSE_AUTOUNMAP():
    return SESPARSE_AUTOUNMAP

def getsfvmk():
    return sfvmk

def getSGX():
    return SGX

def getSIOC_UserWorld():
    return SIOC_UserWorld

def getSMART_ENHANCEMENT():
    return SMART_ENHANCEMENT

def getsmartpqi():
    return smartpqi

def getSnowMotion():
    return SnowMotion

def getSoftNUMA():
    return SoftNUMA

def getSRIOV_NFV():
    return SRIOV_NFV

def getSRIOV_POOLS():
    return SRIOV_POOLS

def getSPBM_VAPI_SHIM1():
    return SPBM_VAPI_SHIM1

def getSSLCertificateManagement():
    return SSLCertificateManagement

def getStatsRegistry():
    return StatsRegistry

def getSyslogManagementAPI():
    return SyslogManagementAPI

def getThirdPartyDvsRemoval():
    return ThirdPartyDvsRemoval

def getTLSv12Default():
    return TLSv12Default

def getTPM20():
    return TPM20

def getTPM20_TXT():
    return TPM20_TXT

def getTrustManagement():
    return TrustManagement

def getUI_Multi_AZ():
    return UI_Multi_AZ

def getUI_TELEMETRY_ENH():
    return UI_TELEMETRY_ENH

def getUSBquirk():
    return USBquirk

def getUPITHostCapability():
    return UPITHostCapability

def getUpdateAPI2017():
    return UpdateAPI2017

def getVADP_FCD():
    return VADP_FCD

def getVADP_LinuxMountAdvModes():
    return VADP_LinuxMountAdvModes

def getVADP_QueryAllocatedBlocks():
    return VADP_QueryAllocatedBlocks

def getVASA3():
    return VASA3

def getVCDB_UI():
    return VCDB_UI

def getVC_Alarms_B2B_Upgrade():
    return VC_Alarms_B2B_Upgrade

def getVC_Events_BurstFilter():
    return VC_Events_BurstFilter

def getVC_Events_LevelFilter():
    return VC_Events_LevelFilter

def getVC_Events_Retention():
    return VC_Events_Retention

def getVC_VAPI_Guest():
    return VC_VAPI_Guest

def getVC_VAPI_Shim2():
    return VC_VAPI_Shim2

def getVC_SecureHeartbeat():
    return VC_SecureHeartbeat

def getVCHA_Embedded():
    return VCHA_Embedded

def getVCHA_Upgrade():
    return VCHA_Upgrade

def getVCInstallAPI():
    return VCInstallAPI

def getVCMigrateAPI():
    return VCMigrateAPI

def getVCSA_LOG_FORWARDING():
    return VCSA_LOG_FORWARDING

def getVCSA_SSH_ACCESS_EVENT():
    return VCSA_SSH_ACCESS_EVENT

def getVCUpgradeAPI():
    return VCUpgradeAPI

def getVDDK_PHONEHOME():
    return VDDK_PHONEHOME

def getVDFS():
    return VDFS

def getVMAFD_ESX():
    return VMAFD_ESX

def getVMBackupGenericManifest():
    return VMBackupGenericManifest

def getVMConsoleUser():
    return VMConsoleUser

def getVMcrypt2():
    return VMcrypt2

def getVMcrypt3_KeysOps_WithRefCnt():
    return VMcrypt3_KeysOps_WithRefCnt

def getVMcrypt3_QueryKeyState():
    return VMcrypt3_QueryKeyState

def getVMcryptNext():
    return VMcryptNext

def getVMDIR_HealthManagement():
    return VMDIR_HealthManagement

def getVMDIR_SimplifiedReplication():
    return VMDIR_SimplifiedReplication

def getVMFork():
    return VMFork

def getvmxnet3PacketSteering():
    return vmxnet3PacketSteering

def getVMFS6():
    return VMFS6

def getVMIOP_CHECKPOINT():
    return VMIOP_CHECKPOINT

def getVMIOP_MIGRATE():
    return VMIOP_MIGRATE

def getvmkfcoe():
    return vmkfcoe

def getVMODL_VASA():
    return VMODL_VASA

def getvmConnectionControl():
    return vmConnectionControl

def getVNVME_Milestone_1_1():
    return VNVME_Milestone_1_1

def getVNVME_Milestone_2():
    return VNVME_Milestone_2

def getVpxdUser():
    return VpxdUser

def getVpxdVapiServices():
    return VpxdVapiServices

def getVpxLockThreshold_Baseline():
    return VpxLockThreshold_Baseline

def getVRDMA_ROCEV2():
    return VRDMA_ROCEV2

def getVSAN_CoreDump():
    return VSAN_CoreDump

def getVSAN_Dps():
    return VSAN_Dps

def getVSAN_Encryption():
    return VSAN_Encryption

def getVSAN_HostAffinity():
    return VSAN_HostAffinity

def getVSAN_MultipleDatastore():
    return VSAN_MultipleDatastore

def getVSAN_MSCS_SUPPORT():
    return VSAN_MSCS_SUPPORT

def getVSAN_RDMA():
    return VSAN_RDMA

def getVSAN_ResourceCheck():
    return VSAN_ResourceCheck

def getVSAN_UNMAP():
    return VSAN_UNMAP

def getVsanAwareDrsV1():
    return VsanAwareDrsV1

def getVsanEncrypt():
    return VsanEncrypt

def getvswitchConvergence():
    return vswitchConvergence

def getVUM_VA_Removal():
    return VUM_VA_Removal

def getVVOL_MSCS_SUPPORT():
    return VVOL_MSCS_SUPPORT

def getVMFS3_EOL():
    return VMFS3_EOL

def getVMFS6_UNMAP_BANDWIDTH():
    return VMFS6_UNMAP_BANDWIDTH

def getVMFS6_VOMA_FIX_MODE_SUPPORT():
    return VMFS6_VOMA_FIX_MODE_SUPPORT

def getVMFS6_LARGE_GRANULAR_UNMAP():
    return VMFS6_LARGE_GRANULAR_UNMAP

def getXCOPY_ARRAY_REPORTED():
    return XCOPY_ARRAY_REPORTED

def getXVC_Mixed_Version():
    return XVC_Mixed_Version

def create_dict_from_file(fileName, delimiter='='):
    with codecs.open(fileName, 'r', 'utf-8') as f:
        d = {}
        for line in f:
            key = line.rstrip().split(delimiter, 1)[0].strip()
            val = line.rstrip().split(delimiter, 1)[1].strip()
            d[key] = val
    return d

def read_feature_state(feature_state_dict, feature):
    state = None
    if feature in feature_state_dict:
        val = feature_state_dict[feature]
        if val is not None:
            if val.lower() == 'enabled':
                state = True
            elif val.lower() == 'disabled':
                state = False

    return state

def print_features():
    pass

def set_feature_state(feature_state_dict):
    pass

def init(enableLogging=True):
    pass
