DX NetOps

 View Only
  • 1.  Tuesday Tip: Defining an attribute to distinguish proxy from maintenance

    Broadcom Employee
    Posted Feb 21, 2012 01:55 PM

    Tuesday Tip: Defining a single attribute to distinguish a proxy model from one in maintenance mode

    CA Spectrum Tuesday Tip by Roger Nason, Principal Support Engineer

    How to compare two attributes in a watch to determine if a model is set as a proxy model

    Description: The issue here is that when a model is made a proxy model, the isEventCreationEnabled (0x129f8) is set to ‘No’, however when a model is placed into maintenance mode the same attribute is also set to ‘No.’ We can distinguish a proxy model from a model in maintenance by looking a two attributes; isEventCreationEnabled and isManaged (0x1295d). On a proxy model isEventCreationEnabled will be set to 'No' while isManaged is set to 'Yes'. Whereas a model in maintenance will have both attributes set to 'No'.

    Solution: Our solution needs to boil these two attributes down to one. To do this we will create a watch. This will be a Boolean watch with an expression defined as: (!isEventCreationEnabled & isManaged). In the example below I named the watch isProxy (See Figure 1). Now when a device is a proxy model the expression will evaluate to true; any other time it evaluates to false.

    You will also notice that in the Properties tab (See Figure 2), I set the watch to be active by default and to evaluate on change. In addition, I set up the watch on the GnSNMPDev model type and made it inheritable, so now every SNMP-based model type will have this watch.

    Figure 3 shows the watch in the model’s Watches table. Note that the Watch Status is Initial, this is expected.

    Figure 4 shows the watch as an attribute, isProxy, in a model’s Attribute tab along with its calculated value.

    Next we need to add following XML code to the $SPECROOT/custom/common/config/table-model-config.xml and then restart tomcat.

    <?xml version="1.0" encoding="utf-8"?>
    <table idref="table-model-config">
    <column>
    <hidden-by-default>true</hidden-by-default>
    <name>Proxy</name>
    <content>
    <attribute>0xffff0003</attribute>
    <select>
    <case>
    <match>true</match>
    <yield>Yes</yield>
    </case>
    </select>
    </content>
    </column>
    </column-list>
    </table>

    Now I can enable the Proxy column in my List view. Notice the models in maintenance do not have a ‘Yes’ value in the Proxy column. Only the two models that are actually set as Proxy models show a Yes in that column (See Figure 5).



  • 2.  Re: Tuesday Tip: Defining an attribute to distinguish proxy from maintenance

    Broadcom Employee
    Posted May 18, 2016 09:30 AM

    Folks,

    As of 10.1, when putting a device in maintenance mode we no longer set isEventCreationEnabled to FALSE( even though internally event creation is disabled as it is in maintenance mode ), so now to distinguish proxy model you can solely rely on IsEventCreationEnabled=FALSE.

     

    -Todd



  • 3.  Re: Tuesday Tip: Defining an attribute to distinguish proxy from maintenance

    Posted Oct 18, 2016 05:39 AM

    Hi Todd,

    setting a device to maintenance mode doesn't touch the attribute isEventCreationEnabled anymore

    But it seems that removing the maintenance mode still sets IsEventCreationEnabled to TRUE, what should only remove the proxy status.

     

    Best Regards,

    Olaf



  • 4.  Re: Tuesday Tip: Defining an attribute to distinguish proxy from maintenance

    Posted Oct 28, 2016 09:17 AM

    I agree, both attributes should be exclusive for either maintenance mode or proxy model state



  • 5.  Re: Tuesday Tip: Defining an attribute to distinguish proxy from maintenance

    Posted Aug 02, 2017 09:19 AM

    Please note for Spectrum releases 9.4 and 10.0, for a proxy model, the 'isEventCreationEnabled' and 'isManaged' attributes needs to be set to No as discussed in the below technical document:

     

    https://www.ca.com/us/services-support/ca-support/ca-support-online/knowledge-base-articles.TEC1898721.html