DX NetOps

  • 1.  How to export device list in xml formate

    Posted Mar 21, 2019 12:53 PM

    I need to export device list from ca spectrum in xml formate. is there any command or way to do this. Please help urgently.



  • 2.  Re: How to export device list in xml formate

    Posted Mar 21, 2019 12:57 PM

    Run the All Devices search in the Locater tab and then export to csv format.

     

    Joe



  • 3.  Re: How to export device list in xml formate

    Posted Mar 21, 2019 01:00 PM

    Joseph i already know to export the list in csv . i need to export the list of devices in xml formate. Please share a way how to export in xml formate



  • 4.  Re: How to export device list in xml formate
    Best Answer

    Broadcom Employee
    Posted Mar 21, 2019 01:23 PM

    You can use the Spectrum REST API to do this. The following URL will give you a list of devices in XML format:

     

    http://OCSERVER:port/spectrum/restful/devices?attr=0x1006e&attr=0x12d7f

     

    This will give you the devices as well as the model name and network address in  XML format.



  • 5.  Re: How to export device list in xml formate

    Broadcom Employee
    Posted Mar 26, 2019 05:20 AM

    You can also use the Modeling Gateway in order to perform this task. You can select from the toolkit configuration file as to what you want to dump out and away you go. The nice thing about the Modeling Gateway is that it has been present in Spectrum for awhile now - a lot longer than the REST interface.

     

    https://docops.ca.com/ca-spectrum/10-3-1/en/customizing/modeling-gateway-toolkit/export-topology-data-from-ca-spectrum

     

    The main use for the Gateway is performing upgrades on Spectrum servers (when you need to move content between them). However, there is no reason why you can't use it to just dump out the devices... The standard output is XML.

     

    Therefore, I would probably counter your question and ask as to what version of Spectrum you are running? Also, how often you need to perform this task. If you require output that is done on a regular basis and through web services then use the REST API. If it is a one off or on a semi-regular basis then I would consider using the Modeling Gateway.

     

    Ed