DX NetOps

  • 1.  XML Personalization SPECTRUM

    Posted Sep 08, 2016 11:41 AM

    Hello

    I'm looking for a solution to display some information about firmware for our HP/H3C/3COM switches.

    The only possibility to display this information is to use the subview "Entity View".


    I thought it was possible with XML and display it into list or locater but currently, I tried a lot of things and all results are negatives.

     

    I would know if that type of expression below is possible ?

     

    <expression>((attr(0x23000e).toString).matches("H3C S7503E-S")) ? attr( 0xfff0106e ) : value()</expression>

     

    Apparently, after doing a lot of tests, I guess expression works only with value like "null" or "0" but not with the precise value like in my example, the type of switch (H3C ...).

     

    Thank you in advance !



  • 2.  Re: XML Personalization SPECTRUM

    Broadcom Employee
    Posted Sep 13, 2016 05:36 AM

    Hi,

     

    In doing some further research, I believe this expression may work for you to compare an attribute with a text string as long as attr 0x23000e equals "H3C S7503E-S".

     

    attr(0x23000e) != null &amp;&amp; attr(0x23000e).toString().equals ( "H3C S7503E-S" )

     

    Best regards,

    Glenn



  • 3.  Re: XML Personalization SPECTRUM
    Best Answer

    Posted Sep 20, 2016 04:28 AM

    Hi

     

    Thank you for your feedback.

     

    I found a solution for the expression and now it works :

     

    <expression>
                    attr(0x23000e) != null &amp;&amp; (attr(0x23000e).toString().matches("H3C S3610-28F")) ? attr(0xfff0106e):value()
                    </expression>
                    <renderer>
                    <param name="index">1</param>
                    com.aprisma.spectrum.app.util.render.ListInstanceRenderer
                    </renderer>

     

    But badly I can't find solution to use this expression with condition (IF or dynamic renderer)

     

    Best regards,

    Cyril