def main(): try: global handle handle = ucs_login() #get faults _get_faults(handle) # get inventory #_get_inventory(handle) ucs_logout(handle) except: ucs_logout(handle) raise
def main(): global handle global ucs_event_handler global assoc_done handle = ucs_login() ucs_event_handler = UcsEventHandle(handle) sp_create() sp_assoc() # Wait for the background processing to complete. # quit when end_script flag is set to True while not end_script: time.sleep(1)
def main(): try: global handle handle = ucs_login() # ########################################### # Create the SP from template # ########################################### mo_list = create_sp_from_template() if mo_list: for mo in mo_list: print(mo.dn) # ########################################### # Delete_sp_created_from_template # ########################################### delete_sp_created_from_template() ucs_logout(handle) except: ucs_logout(handle) raise