Table: Dynamic data services functions in the alc.dyn module describes the functions available in the SR OS alc.dyn Python module to create dynamic data services.
alc.dyn functions | Description |
---|---|
dyn.action (dictionary) |
Executes the setup, modify or teardown function that is found with a lookup in the specified dictionary using the function-key present in the script parameters. The script-parameters can be obtained from RADIUS in the Alc-Dyn-Serv-Script-Params VSA or can be configured in the local authentication database. The action (setup, modify or teardown) is determined from the Alc-Dyn-Script-Action VSA. Returns: None (no value) dictionary - Python dictionary with format: dictionary = {function-key-1 : (setup-function-1, modify-function-1|None, revert-function-1|None, teardown-function-1), …, function-key-n : (setup-function-n, modify-function-n|None, revert-function-n|None, teardown-function-n) } where:
|
dyn.add_cli (string) |
Executes the specified CLI commands to create the dynamic data service Returns: None (no value) string - CLI commands. The string can span multiple lines in the script when enclosed in three double quotes ("""). |
dyn.get_circuit-id() |
Returns a string containing the control channel circuit-id (DHCP relay agent option 82 or PPP tags) |
dyn.get_remote-id() |
Returns a string containing the control channel remote-id (DHCP relay agent option 82 or PPP tags) |
dyn.get_sap() |
Returns a string containing the dynamic data service sap-id: the value of the Alc-DynServ-SAP-ID VSA. A wildcard hash (#) in the VSA value is replaced with the corresponding control channel or data trigger port or vlan-id field. |
dyn.reference (function-key, reference-id, dictionary) |
Create a dynamic reference to another function in the script. Typically used to create n:1 relations between dynamic data services, such as multiple SAPs in a VPLS service or multiple services for the same customer. Dynamic referencing is only allowed in setup functions. Corresponding teardown functions automatically dereference. Returns a dictionary provided by the setup script matching the function-key: function-key is the key in the action dictionary (see dyn.action) to find the corresponding setup or teardown functions. reference-id is the unique reference ID string that identifies the dynamic reference (for example, all SAPs from a VPLS service would have the same reference id). dictionary is a Python dictionary containing parameters for use in the setup or teardown function, such as to generate CLI output. |
dyn.select_free_id (type) |
Returns a string representing a free identifier of the specified type. type is identifier type that is returned:
The corresponding filters are shown in the system as ‟_tmnx_dyn_<number>” |