A DHCP transaction cache (DTC) is a short-lived cache during DHCPv4/v6 transaction. The cache could be used to store user-chosen information or return ESM attributes via a Python script. The DTC’s lifetime is only during a single DHCP transaction (for example, only between discovery-offer, request-reply). This includes both alc.dtc.store() data and alc.dtc.setESM() data. DTC is also a transaction specific cache, which means the cached information could only be accessed by the Python script running in same DHCP transaction.
The following are the DTC APIs:
alc.dtc.derivedId: A string used as a LUDB lookup key
alc.dtc.store(cache-key, cache-value): Store the value with the specified cache-key in DTC, both key and value are string.
alc.dtc.retrieve(cache-key): Returns the cached value string according to the specified cache-key, raise exception if specified key does not exist.
alc.dtc.setESM(ESM-key, value): Sets the specified ESM attribute, which could be used when system creating the ESM host.
Because of the short-lived nature of DTC, setESM should be used in final DHCP transaction before system create ESM host., such as DHCPv4 REQUEST-ACK.
The following is a list of supported ESM-keys and corresponding Python type:
alc.dtc.accountingPolicy:str
alc.dtc.ancpString:str
alc.dtc.appProfileString:str
alc.dtc.catMapString:str
alc.dtc.defGw:str
alc.dtc.dhcpv4GIAddr:str
alc.dtc.dhcpv4Pool:str
alc.dtc.dhcpv4ServerAddr:str
alc.dtc.dhcpv6LinkAddr:str
alc.dtc.dhcpv6PreferredLifetime
alc.dtc.dhcpv6RebindTimer
alc.dtc.dhcpv6RenewTimer
alc.dtc.dhcpv6ServerAddr:str
alc.dtc.dhcpv6ValidLifetime
alc.dtc.intDestId:str
alc.dtc.ipAddress:str
alc.dtc.ipv4LeaseTime:int
alc.dtc.ipv4PrimDns:str
alc.dtc.ipv4SecDns:str
alc.dtc.ipv6Address:str
alc.dtc.ipv6DelegatedPrefix:str
alc.dtc.ipv6DelegatedPrefixLength:int
alc.dtc.ipv6PrefixPool:str
alc.dtc.ipv6PrimDns:str
alc.dtc.ipv6SecDns:str
alc.dtc.ipv6SlaacPrefix:str
alc.dtc.ipv6WanPool:str
alc.dtc.msapGroupInterface:str
alc.dtc.msapPolicy:str
alc.dtc.msapServiceId:str
alc.dtc.primNbns:str
alc.dtc.primNbns:str
alc.dtc.retailServiceId:str
alc.dtc.secNbns:str
alc.dtc.slaProfileString:str
alc.dtc.subIdent:str
alc.dtc.subnetMask:str
alc.dtc.subProfileString:str