●方法定义
get_top_level_alarmgroups(self)
●异常
如果调用失败,抛出hyperdb.HDError异常
●返回值
报警组的数组
●方法调用
def GetTopLevelAlarmgroups(self):
try:
alGs = self.myAlarmGroupMgr.get_top_level_alarmgroups()
except Exception as e:
print("get_top_level_alarmgroups error: ", e.errcode)
else:
print("getting top level alarmgroups succeeds")
len_alGs = len(alGs)
for i in range(len_alGs):
print("The alarm group' name: ", alGs[i].name, "\t"
"The alarm group' description: ", alGs[i].description, "\t"
"The alarm group' id: ", alGs[i].id, "\t
"The alarm group' parentid: ", alGs[i].parentid)