Hi Jose,

look at this example in the wiki: 
https://github.com/zaidka/genieacs/wiki/Provisions#creatingdeleting-object-instances

// Ensure that *all* other instances are deleted
declare("InternetGatewayDevice.X_BROADCOM_COM_IPAddrAccCtrl.X_BROADCOM_COM_IPAddrAccCtrlListCfg.[]"
 null, {path: 0});

// Add the two entries we care about
declare("InternetGatewayDevice.X_BROADCOM_COM_IPAddrAccCtrl.X_BROADCOM_COM_IPAddrAccCtrlListCfg.[SourceIPAddress:192.168.1.0,SourceNetMask:255.255.255.0]",
 {path: now}, {path: 1});
declare("InternetGatewayDevice.X_BROADCOM_COM_IPAddrAccCtrl.X_BROADCOM_COM_IPAddrAccCtrlListCfg.[SourceIPAddress:172.16.12.0,SourceNetMask:255.255.0.0]",
 {path: now}, {path: 1});




You must try to find some parameters that are unique in your object then you 
can just say please create an object with that parameters.

You can later access also that object with that path filtering ....

// DELETE ALL UNWANTED OBJECTS
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.[]", null, 
{path: 0});

// DEFINE WANTED OBJECT
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.[VlanMode:2,VlanId:202]",
 null, {path: 0});

// CHANGE Parameter in that Object
declare("InternetGatewayDevice.WANDevice.6.WANConnectionDevice.[VlanMode:2,VlanId:202].
 Enable", null, {value: true});



Regards,

Michael Neumann




Von: Users [mailto:[email protected]] Im Auftrag von Jose Vela 
Delgado
Gesendet: Mittwoch, 8. November 2017 13:03
An: Community support for GenieACS users <[email protected]>
Betreff: Re: Virtual Parameter for External IP Address


Thanks for the reply Michael.

I do not mind working with provisions, if that solves my problem. As you say, 
it should be something that shows the object, regardless of the instance number.

How could I do that?

Thanks in advance.



‌
https://mailtrack.io/Enviado con 
https://chrome.google.com/webstore/detail/mailtrack-for-gmail-inbox/ndnaehgpjlnokgebbaldlmgkapkpjkkb?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality
 


Jose Vela
Técnico de networking routing, switching y GPON networks.

  

"El aprendizaje es experiencia, todo lo demás en información"  Albert Einstein.

Mira mi perfil profesional y conecta conmigo en LinkedIn 
https://mailtrack.io/trace/link/c78401caa176c23a9a3ddac477fb8b0c0561e3e6?url=https%3A%2F%2Fes.linkedin.com%2Fin%2Fjose-vela-delgado&userId=44382&signature=a073bf85aea9969a

2017-11-08 12:55 GMT+01:00 Michael Neumann <mailto:[email protected]>:
Hi,

it's not common to add an object with instance id 1 … you should more find a 
solution how you don’t need to care about the instance id.

I think it's not possible to do that – the acs just send a command AddObject 
and the device is respondiong the instance number ….

Why you want work with virtual parameters and not with a provision?


Best Regards

Michael Neumann



Von: Users [mailto:mailto:[email protected]] Im Auftrag von Jose 
Vela Delgado
Gesendet: Mittwoch, 8. November 2017 12:47
An: Community support for GenieACS users <mailto:[email protected]>
Betreff: Virtual Parameter for External IP Address


Hello everyone.

Will someone have a script to create a Virtual Parameter so that I can create 
the WANConnectionDevice.1 since as they can go down, only 2, 3 and 4 appear and 
the one I need is 1.

Thank you very much in advance.


Device parameters
• 
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.ExternalIPAddress
• 
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.3.WANIPConnection.1.ExternalIPAddress
 
• 
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.4.WANIPConnection.1.ExternalIPAddre

Jose Vela
Técnico de networking routing, switching y GPON networks.

  

"El aprendizaje es experiencia, todo lo demás en información"  Albert Einstein.

Mira mi perfil profesional y conecta conmigo en LinkedIn 
https://mailtrack.io/trace/link/8753eb229099ee0dfc5b7871f6c435fd4847055b?url=https%3A%2F%2Fes.linkedin.com%2Fin%2Fjose-vela-delgado&userId=44382&signature=bb9dae206a746012



‌
_______________________________________________
Users mailing list
mailto:[email protected]
https://mailtrack.io/trace/link/952ff10ed632603eb6acff22582bf63b1d936884?url=http%3A%2F%2Flists.genieacs.com%2Fmailman%2Flistinfo%2Fusers&userId=44382&signature=ee7a49a3ce5e8258

_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users

Reply via email to