DX NetOps

 View Only
  • 1.  Is there a way to change the Device names in a massive way?

    Posted Oct 08, 2018 05:42 PM

    We are moving pingeable devices from one lansdcape to another, I know there is no way to copy and paste directly, so we will have to rediscover all the devices in the new landscape, but since they are pingeable, is there a way or script to massively rename these devices ? The only data to monitor are the ip and the name

     

    We are using Spectrum 10.2



  • 2.  Re: Is there a way to change the Device names in a massive way?
    Best Answer

    Broadcom Employee
    Posted Oct 08, 2018 05:48 PM

    What about using Modeling Gateway ( Modeling Gateway Toolkit - CA Spectrum - 10.2 to 10.2.3 - CA Technologies Documentation ) to export what you have in one landscape, edit the file to only include what you want to "move" and then import into the other landscape? 



  • 3.  Re: Is there a way to change the Device names in a massive way?

    Posted Oct 08, 2018 06:34 PM

    Hi Robert!

     

    Thanks for the tip, do you know wich parameters do i have to pick if im using the modelinggateway.bat for this case?

     

    Im Reading and it seems that the tool brings you all the information of a spectroserver, in our case we only want the devices, plus, is there a option to filter this and only get the devices located in a global collection?



  • 4.  Re: Is there a way to change the Device names in a massive way?

    Posted Oct 09, 2018 02:12 AM

    You cannot export devices from a certain GC as a way of filtering. In the .modeliggawayresource.xml there's a section where you have to specify which container you want to be exported. All your devices would have to be in that container. By default, Universe is selected. 

     

    <!-- RootContainerToExport specifies the root container in -->
    <!-- SPECTRUM to be exported. -->
    <!-- -->
    <!-- ******************************************************** -->

    <RootContainerToExport model_type="Universe" model_name=""/>

     

     

    In the ExportConfiguration section you can specify what is that you want to export. In the DeviceExportAttributes section you can set the attributes to be exported. 

     

    Just go over the config file, you'll figure it out. It's self explanatory. 



  • 5.  Re: Is there a way to change the Device names in a massive way?

    Posted Oct 09, 2018 12:28 PM

    Hi Catalin!

     

    Thanks for the help, im starting to understeand how the modelinggateway tool works, i was able to export only devices from a especific network instead of trying on the global collections

     

    Now the issue i cant resolve is, is there a way to import this devices into another specific network on the new spectroserver? i dont see anything similar to  "RootContainerToExport"  for imports, and aparenttly it places all the devices by default on the main universe 

     

    I was searching in the documentation whiout any results



  • 6.  Re: Is there a way to change the Device names in a massive way?

    Posted Oct 10, 2018 03:51 AM

    I don't think there's a way to specify to which container you'd have your devices modeled. I can think however on some workarounds over this.

     

    One would be to put all your devices in a second container. You'd have this: Universe->Container1->Container2->all_your_devices. You'd choose as RootContainerToExport Container1. This way, all your devices would be put under Universe->Container2. You'd have them all together.

     

    Second way would be to use a combination of searches and Attribute Editor to mass-modify all your newly created models.I would search for all models of type Pingables that have the createtime (0x11b41) attribute after the moment you ran the import. For all the results I would modify the TopologyModelNameString (0x129e7) to suit my needs.

     

    I'm sure that there are more methods of doing what you want, these are the first 2 that popped into my mind.



  • 7.  Re: Is there a way to change the Device names in a massive way?

    Posted Oct 10, 2018 04:10 AM

    There's a kind of way through Webservices again. You can create a device and then create a relation between a device and a container.



  • 8.  Re: Is there a way to change the Device names in a massive way?

    Posted Oct 09, 2018 05:09 AM

    Yes, Modeling Gateway is the easiest way to go. If you need something more flexible, you can still build your own program based on REST API!



  • 9.  Re: Is there a way to change the Device names in a massive way?

    Posted Oct 09, 2018 08:42 AM

    Another idea…  if you are going to rediscover all those models in the new landscape, you might be able to change the model naming preference order of your discovery.  You have Name Service, SysName and IP Address as choices.  If you want to use one of those as the new names you could change the setting under SpectroSERVER Control, run your discovery, then set it back once it is done so it doesn’t alter your other models in that landscape.  Something like that may work for you.   (I’ve personally never tried this, just thinking of other things that might work)

     

    Chris