Exemplo n.º 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()
Exemplo n.º 2
0
    if (options.interval % 5):
        print "incorrect interval.It must be multiples of 5"
        parser.print_help()
        return -1

    if options.time != "":

        pattern = re.compile(r'\d{12}')
        match = pattern.match(options.time)

        if match == None:
            print "The input pm_timestamp must be in format of YYmmddHHMM."
            parser.print_help()
            return -1

    return options


if __name__ == '__main__':
    options = get_options()
    if options != -1:
        caseutils.pre_test_case(
            "check_nbi_pm_" + options.ne_type.lower() + "_rop=" +
            str(options.interval) + "_cases", "nbi_pm_automation")
        NBIPmFunc.PMCmpInstance(options.ne_type, options.nename,
                                options.nodeid, options.licid,
                                options.interval,
                                options.time).check_pm_accuracy()
        caseutils.post_test_case()