AW: Get path of an interface instance for traffic shaping

Michael Neumann mn at jm-data.at
Thu Nov 16 03:33:11 EST 2017


Hi,

thx Zaid - I think there was a typo - but this example is working perfect.

log("PROVISON TEST STARTED");
let p = declare("InternetGatewayDevice.WANDevice.6.WANConnectionDevice.[X_CT-COM_WANEponLinkConfig.VLANIDMark:303]", {path: Date.now()}, {path: 1});
log(p.path);
log("PROVISON TEST FINISHED");

Produces that log output:

[INFO] 10.31.0.8 0cb912-968380FESH-0cb9120129af: Script: PROVISON TEST STARTED
[INFO] 10.31.0.8 0cb912-968380FESH-0cb9120129af: Script: InternetGatewayDevice.WANDevice.6.WANConnectionDevice.4
[INFO] 10.31.0.8 0cb912-968380FESH-0cb9120129af: Script: PROVISON TEST FINISHED



-----Ursprüngliche Nachricht-----
Von: Users [mailto:users-bounces at lists.genieacs.com] Im Auftrag von Zaid Abdulla
Gesendet: Donnerstag, 16. November 2017 09:16
An: Community support for GenieACS users <users at lists.genieacs.com>
Betreff: Re: Get path of an interface instance for traffic shaping

On Wed, 2017-11-15 at 08:14 +0000, Michael Neumann wrote:
> I create an Interface for Internet like that:
> 
> declare("InternetGatewayDevice.WANDevice.6.WANConnectionDevice.[
> VLANIDMark:303]",{path: now}, {path: 1});
> 
> For traffic shaping I need the full path of the interface:
> declare("InternetGatewayDevice.QueueManagement.Queue.1.QueueInterface
> ", null, {value:
> "InternetGatewayDevice.WANDevice.6.WANConnectionDevice.3"});
> 
> So I need here the instance number of the WANConnectionDevice. In that 
> case the 3. Is there a way to get this inside the provision? Or only 
> over a external script with the api?

Use the "path" property:

  let p = declare(somePath1, {path: now}, {path: 1});
  declare(somePath2, null, {value: somePath1.path});

--
Zaid Abdulla <zaid at genieacs.com>
_______________________________________________
Users mailing list
Users at lists.genieacs.com
http://lists.genieacs.com/mailman/listinfo/users


More information about the Users mailing list