Variable substitution in Provisions

Bodlaj Gasper bodlaj at iskratel.si
Tue Oct 31 19:59:23 EDT 2017


Hi,
I have a task in Genie ACS that will create PPPoE session.

Problem is that I do not know how to introduce variable substitution to it.
My current script:

let pppoeUser = "pppoe";
let pppoePass = "pppoe";

declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.[ConnectionType:IP_Routed,Name:trInternet,X_BROADCOM_COM_FirewallEnabled:1,X_BROADCOM_COM_VlanMux8021p:0,X_BROADCOM_COM_VlanMuxID:100,X_BROADCOM_COM_IfName:ppp0.1,X_BROADCOM_COM_VlanTpid:0,MTU:1492,NATEnabled:true,Username:wrong,Password:wrong,Enable:false]",null, {path: 1});

I did try and set variables after creating the object but no luck.

declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username", null,{value: pppoeUser});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Password", null,{value: pppoePass});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Enable", null,{value: true});

Old credential will remain on CPE.
If I hardcode variable in first task it works just fine.

brg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20171031/a5494a9c/attachment.html>


More information about the Users mailing list