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

Sergio Fernández sergio19932 at gmail.com
Thu Oct 5 04:03:24 EDT 2017


Thank you so much, Dan (as always), now I understand a little bit more
about the best way to do it.

In the end, it is causing a fault on my provision, but I think that is
another problem.

I think it could be solved assigning some more parameters to each of the
WANs. For example, let's say I want the WAN with VLAN 100 to be configured
IP_Routed (The parameter is, in this case,
*InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.ConnectionType*).
As it is not a sibling, how to assign it to the VLAN 100 and not to the
VLAN 200?

I am trying right now something like this:

declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.[]", null,
{path: 2});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.*." +
VendorPrefix + "WANGponLinkConfig.[VLANIDMark:100]", {path: 1}, {path:1});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.[" +
VendorPrefix +
"WANGponLinkConfig.VLANIDMark:100].WANIPConnection.*.[ConnectionType:IP_Routed]",
{path: 1}, {path:1});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.*." +
VendorPrefix + "WANGponLinkConfig.[VLANIDMark:200]", {path: 1}, {path:1});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.[" +
VendorPrefix +
"WANGponLinkConfig.VLANIDMark:200].WANIPConnection.*.[ConnectionType:IP_Routed]",
{path: 1}, {path:1});

But it is still faulting. This is what I am getting in the debugging log of
the CPE (In bold, the important bits):

# RESPONSE Thu Oct 05 2017 09:43:22 GMT+0200 (CEST)
{"Server":"GenieACS/1.1.1","SOAPServer":"GenieACS/1.1.1","Content-Type":"text/xml;
charset=\"utf-8\""}
<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns:cwmp="urn:dslforum-org:cwmp-1-2"><soap-env:Header><cwmp:ID
soap-env:mustUnderstand="1">15eeb7d2bf2100</cwmp:ID></soap-env:Header><soap-env:Body><cwmp:
*AddObject*><ObjectName>
*InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.X_CT-COM_WANGponLinkConfig.*
</ObjectName><ParameterKey/></cwmp:AddObject></soap-env:Body></soap-env:Envelope>

# REQUEST Thu Oct 05 2017 09:43:22 GMT+0200 (CEST)
{"host":"10.60.0.20:7547
","user-agent":"BCM_TR69_CPE_04_00","connection":"keep-alive","soapaction":"","cookie":"session=0b7cc0fcc91af6b1","content-type":"text/xml","content-length":"793"}
<SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:cwmp="urn:dslforum-org:cwmp-1-2">
    <SOAP-ENV:Header>
      <cwmp:ID SOAP-ENV:mustUnderstand="1">15eeb7d2bf2100</cwmp:ID>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
        <faultcode>Client</faultcode>
        <faultstring>CWMP fault</faultstring>
          <detail>
            <cwmp:*Fault*>
              <FaultCode>9003</FaultCode>
              <FaultString>*Invalid arguments*</FaultString>
            </cwmp:Fault>
          </detail>
      </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Thank you very much!

Sergio Fernández Rubio - https://www.linkedin.com/in/sergiofdz/
(+34) 687 016 994
CEO @ ACSdesk
https://acsdesk.com

2017-10-04 20:05 GMT+02:00 Dan Morphis <dan at milkcarton.com>:

> 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
>>
>>
>
> _______________________________________________
> 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/20171005/f2b08173/attachment.html>


More information about the Users mailing list