Dueling presets

Dan Morphis dan at milkcarton.com
Sat Jun 27 12:33:29 EDT 2015


Makes perfect sense. Thank you for your help on this!

-dan

> On Jun 27, 2015, at 7:33 AM, Zaid Abdulla <zaid at genieacs.com> wrote:
> 
>> On Fri, Jun 26, 2015, at 11:57 PM, Dan Morphis wrote:
>> Correction to my email. The presets only flop InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.Enable value only flops back and forth if I do a GetParameterValue or RefreshObject on any parameter/object instance. Not on informs.
>>  
>> On Fri, Jun 26, 2015 at 8:50 AM, Dan Morphis <dan at milkcarton.com> wrote:
>> I have two presets that apply to a particular CPE. The lowest value one (20) sets up the base config of the CPE, including setting values for the WLANConfiguration (enabling the WiFi). The next preset is specific to this particular CPE, and specifically sets InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.Enable to false.
>>  
>> Every time the CPE does an inform, the value of InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.Enable changes back and forth between true and false. The odd thing is it only happens to this one CPE. I have about 5 other CPE (all with the same configuration as the problem CPE) specific presets that set InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.Enable to false with no issues.
>>  
>> I've tried restarting the the cwmp, nbi, mongo and redis processes and still have the same issue. Any help would be most appreciated!
>>  
>> -dan
>  
> I haven't tested this, but I think I know what's going on. It's a problem in preset handling where a value set through the "set" configuration doesn't override (or be overridden by) the "add_object" configuration. The reason why the value is not flopping in inform is due to caching. When you do a get manually the cache is cleared and the presets will cause the value to change.
> 
> Having said that, it's not recommended to directly set a parameter that's part of an object definition. Because you cannot guarantee that the instance index will always be 1. What you should do instead is create another object with the same keys but with Enable set to false. Then switch between the objects using presets. But... I think there might be another bug that prevents you from doing that either :)
> 
> I'll have to look at these two bugs.
>  
> Zaid
> _______________________________________________
> 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/20150627/99f63dd4/attachment.html>


More information about the Users mailing list