Defined an Enum, where I want to verify mapping of the key from db1 with db2. While iterating using for loop it doesn't print all the defined enums..
from enum import Enum
class SecData(Enum):
secId = "sectoId"
anteName = "anteName"
rAzimuth = "rAzimuth"
agl = "AboveGroundLevel"
actualAzimuth = "AntennaHeight"
actualLatitude = "SectorLat"
technology = "technology"
antennaType = "sectorAntennaType"
actualElectricalTilt = "sectorElecTilt"
actualMechanicalTilt = "sectorMechTilt"
sectorNumber = "sectorNum"
rtsTilt = "rtsTilt"
band = "sectorBand"
actualLongitude = "SectorLong"
actualAntennaheight = "sectorAntennaHeight"
siteReferenceId = "null"
retiid4 = "null"
retiid2 = "null"
retiid3 = "null"
NominalId = "null"
retiid1 = "null"
status = "null"
for sector in (SecData):
print(sector.name, "-" , sector.value)
Output
secId - sectoId
anteName - anteName
rAzimuth - rAzimuth
agl - AboveGroundLevel
actualAzimuth - AntennaHeight
actualLatitude - SectorLat
technology - technology
antennaType - sectorAntennaType
actualElectricalTilt - sectorElecTilt
actualMechanicalTilt - sectorMechTilt
sectorNumber - sectorNum
rtsTilt - rtsTilt
band - sectorBand
actualLongitude - SectorLong
actualAntennaheight - sectorAntennaHeight
siteReferenceId - null
Can someone help to identify what's the issue with the script?
From the doc
The enum value should have different value. In you case you have more than one null value.
So other null value has no effect in your code.