ESM: Subscriber management

The system provides a Python object alc.esm to set a list of attributes on a subscriber host or session in setup. It also provides alc.esm.derivedId to achieve flexible LUDB lookups.

alc.esm APIs only apply during a host and session setup phase.

The alc.esm object

Attributes

alc.esm.derivedId

The derivedId attribute is an attribute which can be set by a Python script and used as an LUDB match criterion. The current value can be read from this attribute. A new value for the derivedId can be set by assigning a new value to this attribute.

The type of this attribute is str.

If the derivedId is not supported, a RuntimeException is raised when retrieving or setting this attribute.

If no derivedId is set, None is returned. This behavior has changed with respect to the Python 2 implementation.

Methods

alc.esm.set(key, value, /)

Sets an attribute on the current subscriber to a specific value.

Parameters
  • key (int) – Integer representing which attribute to set. See Constants for an enumeration of all supported attributes.

  • value – value to set the attribute to.

Raises

KeyError if the key is not valid

Raises

ValueError if the type of the value or the actual value is not valid for the specified key.

Constants

The alc.esm object provides a list of constants which can be used as a key parameter to choose which attribute to set. The following table lists all attributes and the supported object-types for the corresponding value.

Attribute

Types

subIdent

str

subProfileString

str

slaProfileString

str

ancpString

str

appProfileString

str

intDestId

str

catMapString

str

msapGroupInterface

str

msapPolicy

str

msapServiceId

str | int

retailServiceId

str | int

ipAddress

str

ipv6Address

str

ipv6DelegatedPrefix

str

ipv6DelegatedPrefixLength

int

ipv6SlaacPrefix

str

ipv6WanPool

str

ipv6PrefixPool

str

accountingPolicy

str

dhcpv4ServerAddr

str

dhcpv4GIAddr

str

dhcpv4SrcAddr

str

dhcpv4Pool

str

dhcpv6LinkAddr

str

dhcpv6ServerAddr

str

dhcpv6SrcAddr

str

defGw

str

subnetMask

str

ipv4LeaseTime

int

ipv4PrimDns

str

ipv4SecDns

str

primNbns

str

secNbns

str

ipv6PrimDns

str

ipv6SecDns

str

dhcpv6PreferredLifetime

int

dhcpv6RebindTimer

int

dhcpv6RenewTimer

int

dhcpv6ValidLifetime

int

padoDelay

int

pppAuthProtocol

str

pppMTU

int

aaSubScope

int

spiSharingGroupId

int

Breaking changes

Derived Id

Warning

With Python 2 API, reading a derived-id which is not set raises a RuntimeError. With Python 3, the value None is returned.