How to delete an instance of an object based on a parameter

Dan Morphis dan at milkcarton.com
Wed Oct 4 14:05:50 EDT 2017


Close :)

declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.[]", null,
{path: 2}); //Tell Genie we need 2 instances
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.*." +
VendorPrefix + "WANGponLinkConfig.[VLANIDMark:100]", {path: 1}, {path:1});
//One instance will have the value of 100
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.*." +
VendorPrefix + "WANGponLinkConfig.[VLANIDMark:200]", {path: 1}, {path:1});
//Another instance will have the value of 200

The CPE is creating a new connection device because you've told it to via
declare("InternetGatewayDevice.WANDevice.1.*WANConnectionDevice.[]", null,
{path: 2})*. One thing to keep in mind is you have to stop caring about
instance IDs because they can change. Care about what you want the final
state of the CPE to be.

-dan

On Wed, Oct 4, 2017 at 2:52 AM, Sergio Fernández <sergio19932 at gmail.com>
wrote:

> Hello,
>
> I've been trying to create a provisioning flow in order to start by only
> leaving 1 WAN Interface, with a fixed VLAN (that is pre-setted: for
> example, a VLAN with id 100 for TR069), and removing the rest of the WAN
> interfaces. After that is completed, I would add 2 or 3 WAN interfaces with
> other VLANs (for example, VLAN 200 for INTERNET, VLAN 300 for VoIP, VLAN
> 400 for IPTV... etc)
>
> I would like to know the exact condition to make it work without pain.
> Like:
>
> declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.[]", null,
> {path: 1});
> declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1." +
> VendorPrefix + "WANGponLinkConfig.VLANIDMark", null, {value: "100"});
>
> (It works)
>
> But now, how do I add another VLAN? Because the next code isn't working
> for me:
>
> declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.[]", null,
> {path: 2});
> declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2." +
> VendorPrefix + "WANGponLinkConfig.VLANIDMark", null, {value: "200"});
>
> Anyway, my CPE creates a WANConnectionDevice.5. .... and I don't know why.
>
> Thank you so much! Sorry for "reopening" the thread, but I think the
> answer to Angel would be one of the keys to solve my issue.
>
>
>
>
>
>
> Sergio Fernández Rubio - https://www.linkedin.com/in/sergiofdz/
> (+34) 687 016 994 <+34%20687%2001%2069%2094>
> CEO @ ACSdesk
> https://acsdesk.com
>
> 2017-03-06 20:05 GMT+01:00 Zaid Abdulla <zaid at genieacs.com>:
>
>> On Mon, 2017-03-06 at 17:08 +0100, Àngel Wifibytes wrote:
>> > I'm trying to delete an instance of an object. In this case, I have a
>> > device with 3 WANConnectionDevice preconfigurated.
>>
>> This should help (v1.1 only): https://github.com/zaidka/genieacs/wiki/P
>> rovisions#creatingdeleting-object-instances
>> <https://github.com/zaidka/genieacs/wiki/Provisions#creatingdeleting-object-instances>
>>
>> --
>> Zaid Abdulla <zaid at genieacs.com>
>> _______________________________________________
>> Users mailing list
>> Users at lists.genieacs.com
>> http://lists.genieacs.com/mailman/listinfo/users
>>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.genieacs.com
> http://lists.genieacs.com/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20171004/e1b553c9/attachment.html>


More information about the Users mailing list