Get path of an interface instance for traffic shaping

Zaid Abdulla zaid at genieacs.com
Thu Nov 16 03:15:45 EST 2017


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>


More information about the Users mailing list