DX NetOps

 View Only
  • 1.  Reevaluate model name and rename interface models automaically

    Posted Sep 12, 2016 05:37 AM

    Hello, 

     

    Is there a way to make spectrum reevaluate model names and interface model automatically ? 

     

    Maybe scheduled or when running discovery ? 

     

    Thanks

    Amit



  • 2.  Re: Reevaluate model name and rename interface models automaically

    Broadcom Employee
    Posted Sep 13, 2016 12:08 AM

    Hi Amit,

     

    Do you want to reevaluate the model type or model name?

     

    Also would it be possible to describe what exactly you are trying to achieve.

     

    Regards

    Sunny



  • 3.  Re: Reevaluate model name and rename interface models automaically

    Posted Sep 13, 2016 08:14 AM

    Hello, 

     

    I'm when device name or interface name is updated, they are not automatically updated in spectrum. 

    Usually you have to select the device, right click it and choose reevaluate model name...

     

    Thanks,

    Amit



  • 4.  Re: Reevaluate model name and rename interface models automaically
    Best Answer

    Broadcom Employee
    Posted Sep 13, 2016 05:19 AM

    Hi Amit,

     

    The action code from CLI to reevaluate model name for a specific model handle is:

     

     

    ./update action=0x1011f mh=<model handle>

     

    So as an example if my model_handle is 0x100005e, the command from CLI would be

     

    ./update action=0x1011f mh=0x100005e

     

    You can automate this via a script in CLI if you have a list of only model handles and have run dos2unix on the file listing to remove any windows control characters.

     

    So if I created a list of only model handles and called it mh.txt and I have run it through dos2unix in bash shell for Windows or bash for Linux/Solaris I can then use the script like:

     

    for x in `cat mh.txt`; do ./update action=0x1011f mh=$x; done

     

    This should process the list of model handles from mh.txt and you should see changes in OneClick if any model names are changed based upon the Method Model Name attribute.

     

    Best regards,

    Glenn



  • 5.  Re: Reevaluate model name and rename interface models automaically

    Posted Sep 13, 2016 08:15 AM

    This could be a solution, but you have to run it against all devices for example once a week. 

    Thank you for your help....



  • 6.  Re: Reevaluate model name and rename interface models automaically

    Posted Nov 14, 2017 01:24 PM

    Just to add for those who use RESTful, you can do a simple GET and run the same with this URL syntax:

     

    http://<oneclick>:<port>/spectrum/restful/action/0x0001011f?mh=<landscape_mh>

     

    This is the same as going into one-click in the landscape's VNM event in the alarm detail and under SpectroSERVER Control, clicking on Reevaluate All Model Names.

     

    If you have the ability to do LWP via perl, it can be scripted rather easy for all landscapes and CRON the event.