DX Unified Infrastructure Management

 View Only
  • 1.  Setting Maintenance mode via the API

    Posted Jun 21, 2017 07:15 AM

    Hi everyone, I've been developing a script to set maintenance mode via the API, so following this guide:

     

    Maintenance Calls - CA Unified Infrastructure Management Probes - CA Technologies Documentation 

     

    I get the CS ID of the machine I want, fire an API call to create a schedule on the appropriate hub and then take that schedule ID and add the machine to it.

     

    The API calls work fine, and if I use the get_next_fire_time_for_schedules call i can see that yes, the schedules have been created. however I don't have USM on my test instance so I have no way of seeing if the machines have been added, but if I keep the infrastructure manager program open I never see these machines go into maintenance mode.

     

    So I have a few questions

     

    1) Is there a way either via the API or by some method that isn't USM that I can see which machines are in which schedules

    2) Is it normal to not see machines go into maintenance mode in infrastructure manager using the new method?

    3) I see you can check for individual devices using a device_id which looks similar to a UUID but when pulling data out from either robots or computer systems I can't seem to find a field that correlates to this, so is there a way i can map computer systems or robots to deviceIDs? (using an API call, this all needs to sit in a programmatic loop)

     

    And also is there a way to set schedules to "auto-clean" themselves up when no longer required? This script is designed to fire off when a machine is about to reboot, so it's a one-shot deal only.



  • 2.  Re: Setting Maintenance mode via the API
    Best Answer

    Broadcom Employee
    Posted Jun 21, 2017 09:14 AM

    HI See answers below:

    1) Is there a way either via the API or by some method that isn't USM that I can see which machines are in which schedules

    answer: not currently no

     

    2) Is it normal to not see machines go into maintenance mode in infrastructure manager using the new method?

    Answer: this new method is done by the maintenance_mode probe and nas. no visual indication in IM currently exists.

     

    3) I see you can check for individual devices using a device_id which looks similar to a UUID but when pulling data out from either robots or computer systems I can't seem to find a field that correlates to this, so is there a way i can map computer systems or robots to deviceIDs? (using an API call, this all needs to sit in a programmatic loop)

     

    answer: the cm_computer_system tables has a cd_id field this can be mapped the the cs_id field in the cm_device table with has the dev_id field you are looking for.

     

    hope this helps



  • 3.  Re: Setting Maintenance mode via the API

    Posted Jun 23, 2017 09:19 AM

    Hi Keith, 

    Did Gene's response answer your questions? If yes, could you mark as answered please?

    Thank you.