DX Unified Infrastructure Management

 View Only
  • 1.  Is there any way to update Interface Speeds via REST API in one go?

    Posted Jul 14, 2016 09:29 AM

    I want to modify/ override speed of Interfaces (I have their ItemIds) via REST API or any other way.

    OR

    Can I change speed in one go as I can change the alias name of devices by loading csv file??



  • 2.  Re: Is there any way to update Interface Speeds via REST API in one go?

    Posted Jul 18, 2016 11:29 AM

    Hello Sajid,

    Can you please tell me what product you are referring to on your question about Interface Speeds?

    Kind Regards,

    Helen Biederbeck

    CA Support Delivery Manager



  • 3.  Re: Is there any way to update Interface Speeds via REST API in one go?

    Posted Jul 18, 2016 01:11 PM

    Hi Helen I was referring to CA PC.



  • 4.  Re: Is there any way to update Interface Speeds via REST API in one go?

    Broadcom Employee
    Posted Jul 18, 2016 12:40 PM

    I assume you are referring to CA Performance Management 2.x?

    There is a REST API, but only allows you to update 1 interface at a time...

     

    * Speed In/Out Override Rest:

     

    PUT http://DAHOST:8581/rest/ports/PORTID

    Header:  Content-Type: application/xml

     

    Body To Set (replace SPEED with the override values, and if you wish to just override Out, just remove the SpeedInOverride line):

        <Port version="1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

          <SpeedInOverride>SPEED</SpeedInOverride>

          <SpeedOutOverride>SPEED</SpeedOutOverride>

        </Port>

     

    Body To Clear (if you wish to just clear Out, just remove SpeedInOverride line):

        <Port version="1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

          <SpeedInOverride xsi:nil="true"></SpeedInOverride>

          <SpeedOutOverride xsi:nil="true"></SpeedOutOverride>

        </Port>



  • 5.  Re: Is there any way to update Interface Speeds via REST API in one go?

    Posted Jul 18, 2016 01:13 PM

    Thanks Jeffery

    Yes I was referring to CA PC. I was able to do it for one by one via REST API.

    But I had like 700 Interface speed level modifications, but I think there is no such way for that. But no luck



  • 6.  Re: Is there any way to update Interface Speeds via REST API in one go?

    Posted Aug 09, 2016 07:38 AM

    You have an example of a script that mass-modifies alias for devices or interfaces in PC. You can find it under default path of /opt/CA/PerformanceCenter/Tools/bin/update_alias_name.sh. You can take that example and modify it to suit your needs. I'm sure you can automate changing the speed for the interfaces somehow.



  • 7.  Re: Is there any way to update Interface Speeds via REST API in one go?

    Posted Aug 09, 2016 07:49 AM

    Thanks ! I just had a look at code again, I think I can try it sometime but it would require alot of time to first get to know the schema and REST APIs.

    As far as, I remember I didn't even see any Speed Modification REST Call at that time. Device alias was there but not for speed of interface. I had to do this from PC GUI (Monitored Devices -> Metric Family). 

    I had no choice but to modify the speed one by one.



  • 8.  Re: Is there any way to update Interface Speeds via REST API in one go?

    Posted Aug 09, 2016 09:48 AM

    As Jeff said before, that's the way to update speed on the interface using rest. That's only for the update speed call. You'll need a script to get your exact interface id that you want updated. Anyways, it can be done.

     

    You can search for each interface, based on a criteria. You get the Id of the interface and then you go by the rest call above to update its speed. Once you get it going, just use a csv file to update all your elements.

     

    REST is very flexible. The downside is that you have to write everything yourself.



  • 9.  RE: Re: Is there any way to update Interface Speeds via REST API in one go?

    Posted May 27, 2020 01:22 PM
    I've tried the clearing as laid out but getting an error indicating the schema is wrong.

    Any Ideas?
    Response: <WebServiceException>
    <LocalizedMessage>The web service request failed because the XML provided in the request's body did not conform to the defined schema (see the documentation at 'ports/documentation' for access to the schema definitions).The specific error was: "Error on line 3: The prefix "xsi" for attribute "xsi:nil" associated with an element type "SpeedOutOverride" is not bound.".</LocalizedMessage>
    </WebServiceException>


  • 10.  Re: Is there any way to update Interface Speeds via REST API in one go?

    Posted Jul 18, 2016 01:30 PM

    Thank you Jeffery.

    Hello Sajid,

    Here is the link to the correct user community for your product. CA Infrastructure Management

    Regards,

    Helen