Beispiel #1
0
def check_pm_as():
    global nes_info
    caseutils.pre_test_case(
        "check_nbi_pm_" + nes_info["AS"]["ne_type"] + "_rop=" +
        str(nes_info["AS"]["interval"]) + "_cases", "nbi_pm_automation")
    NBIPmFunc.PMCmpInstance(nes_info["AS"]["ne_type"],
                            nes_info["AS"]["nename"], nes_info["AS"]["nodeid"],
                            nes_info["AS"]["licid"],
                            nes_info["AS"]["interval"],
                            nes_info["AS"]["time"]).check_pm_accuracy()
    caseutils.post_test_case()
import os
from datetime import datetime, timedelta
from com.ericsson.xn.commons import caseutils
from com.ericsson.xn.x.pm.PmCommons import PmBaseFunc

sep = os.sep
module_name = os.path.split(os.path.abspath(__file__))[1][:-3]
# Pre of the test case
caseutils.pre_test_case(module_name, 'pm_automation')

root_dir = os.path.dirname(os.path.abspath(__file__)).split(
    'x' + sep + 'pm' + sep + 'test_cases', 1)[0]
ne_info_cfg = os.path.normpath(root_dir + sep + 'x' + sep + 'pm' + sep +
                               'nes' + sep + 'ltehss.cfg')
counter_info_cfg = os.path.normpath(root_dir + sep + 'x' + sep + 'pm' + sep +
                                    'counters' + sep + 'ltehss.cfg')
me_counter_cfg = os.path.normpath(root_dir + sep + 'x' + sep + 'pm' + sep +
                                  'me_counters' + sep + 'ltehss.cfg')
me_types_cfg = os.path.normpath(root_dir + sep + 'x' + sep + 'pm' + sep +
                                'me_types' + sep + 'ltehss.cfg')
server_info_path = os.path.normpath(root_dir + sep + 'x' + sep + 'pm' + sep +
                                    'execute_conf.cfg')
t_now = datetime.now()
end_time = t_now + timedelta(minutes=-(t_now.minute % 5 + 14))
str_end_time = end_time.strftime('%Y-%m-%d %H:%M') + ":00"
PmBaseFunc.check_pm_accurate(ne_info_cfg, counter_info_cfg, server_info_path,
                             str_end_time, 2, 12, me_counter_cfg, me_types_cfg)

# Post of the test case
caseutils.post_test_case()
Beispiel #3
0
                error_code = int(alarm_raw["code"])
                if error_code==1:
                    alarm_trap = alarm_raw["trap"]
                    nbi_notif = alarm_raw["nbi"]
                    test.info("get TrapInfo is:" + str(alarm_trap) + " and NotifInfo is:" + str(nbi_notif))
                    test.info("start to check " + alarm_type)
                    check_notif_items = mappingInstance.get_property("notif_attr_names")
                    attr_list = []
                    if type(check_notif_items) is types.StringType:
                        attr_list.append(check_notif_items)
                    else:
                        attr_list = check_notif_items
                    check_attr_accuracy(mappingInstance,alarm_trap,nbi_notif,ne_name,nodeid,attr_list,mysqlInst)
                else:
                    test.failed(dict_ne_info["ne_type"] + ":" + alarm_type + " accuracy test failed, reason:sending alarm trap failed, the error msg is:" + alarm_raw["msg"])
            mysqlInst.closeConnection()

        except Exception as e:

            mysqlInst.closeConnection()
            test.error(e.message)


if __name__ == '__main__':
    pre_test_case("check_hss_nbi_notif_accuracy_case","notify_accuracy")
    check_notify_accuracy(ne_info_cfg,server_info_cfg,notify_mapping_cfg)
    post_test_case()



# -*- coding: utf-8 -*-

import os
from datetime import datetime, timedelta
from com.ericsson.xn.commons import caseutils
from com.ericsson.xn.x.pm.PmCommons import PmBaseFunc

sep = os.sep
module_name = os.path.split(os.path.abspath(__file__))[1][:-4]
# Pre of the test case
caseutils.pre_test_case(module_name, 'pm_automation')

root_dir = os.path.dirname(os.path.abspath(__file__)).split('x' + sep + 'pm' + sep + 'test_cases', 1)[0]
ne_info_cfg = os.path.normpath(root_dir + sep + 'x' + sep + 'pm' + sep + 'nes' + sep + 'imshss.cfg')
counter_info_cfg = os.path.normpath(root_dir + sep + 'x' + sep + 'pm' + sep + 'counters' + sep + 'imshss.cfg')
me_counter_cfg = os.path.normpath(root_dir + sep + 'x' + sep + 'pm' + sep + 'me_counters' + sep + 'imshss.cfg')
me_types_cfg = os.path.normpath(root_dir + sep + 'x' + sep + 'pm' + sep + 'me_types' + sep + 'imshss.cfg')
server_info_path = os.path.normpath(root_dir + sep + 'x' + sep + 'pm' + sep + 'execute_conf.cfg')
t_now = datetime.now()
end_time = t_now + timedelta(minutes=-(t_now.minute % 5 + 14))
str_end_time = end_time.strftime('%Y-%m-%d %H:%M') + ":00"
PmBaseFunc.check_pm_accurate(ne_info_cfg, counter_info_cfg, server_info_path, str_end_time, 4, 12,
                             me_counter_cfg, me_types_cfg)

# Post of the test case.
caseutils.post_test_case()
Beispiel #5
0
def check_pm_imshss():
    global  nes_info
    caseutils.pre_test_case("check_nbi_pm_"+nes_info["IMSHSS"]["ne_type"]+"_rop="+str(nes_info["IMSHSS"]["interval"])+"_cases", "nbi_pm_automation")
    NBIPmFunc.PMCmpInstance(nes_info["IMSHSS"]["ne_type"],nes_info["IMSHSS"]["nename"],nes_info["IMSHSS"]["nodeid"],nes_info["IMSHSS"]["licid"],nes_info["IMSHSS"]["interval"],nes_info["IMSHSS"]["time"]).check_pm_accuracy()
    caseutils.post_test_case()
Beispiel #6
0
def check_imshss_nbi_accuracy():
    pre_test_case("check_imshss_nbi_accuracy_case", "nbi_notify_accuracy")
    check_notify_accuracy(ne_info_cfg, server_info_cfg, notify_mapping_cfg)
    post_test_case()
Beispiel #7
0
def check_ltehss_nbi_accuracy():
    pre_test_case("check_ltehss_nbi_accuracy_case", "nbi_notify_accuracy")
    check_notify_accuracy(ne_info_cfg, server_info_cfg, notify_mapping_cfg)
    post_test_case()
Beispiel #8
0
def check_imshss_alarm_accuracy():
    pre_test_case("check_imshss_gui_accuracy_case", "gui_fm_accuracy")
    check_alarm_data_accuracy(ne_info_cfg, server_info_cfg, alarm_mapping_cfg)
    post_test_case()
Beispiel #9
0
def check_imshss_alarm_accuracy():
    pre_test_case("check_imshss_gui_accuracy_case","gui_fm_accuracy")
    check_alarm_data_accuracy(ne_info_cfg,server_info_cfg,alarm_mapping_cfg)
    post_test_case()