def METHOD_NAME(test, output, opt_dict):
    """
    Check the snapshot dumpxml info, including
    1. snapshot name
    2. description
    3. createTime
    4. domstate
    5. domname
    6. passwd if have --security-info
    :param output: snapshot dumpxml info
    :param opt_dict: compare info including passwd, snapname, createtime,
                     domain state, description and domain name
    """
    sname_snip = "<name>%s</name>" % opt_dict['snap_name']
    desc_snip = "<description>%s</description>" % opt_dict['desc_opt']
    dname_snip = "<name>%s</name>" % opt_dict['vm_name']
    ctime = opt_dict['ctime']
    timestamp = int(time.mktime(time.strptime(ctime, "%Y-%m-%d %H:%M:%S")))
    time_snip = "<creationTime>%s</creationTime>" % timestamp
    dom_state = "".join(opt_dict['dom_state'].split())
    if 'disk_opt' in opt_dict and dom_state != "shutoff":
        dstate_snip = "<state>disk-snapshot</state>"
    else:
        dstate_snip = "<state>%s</state>" % dom_state
    # Check all options in xml at one time
    var_match = locals()
    for var in ["sname_snip", "desc_snip", "dname_snip", "time_snip",
                "dstate_snip"]:
        if not re.search(var_match[var], output):
            test.fail("Fail to match %s in xml %s" %
                      (var_match[var], output))
        else:
            logging.info("XML check for %s success", var_match[var])
    if 'passwd' in opt_dict:
        passwd_match = "<graphic.*passwd='%s'.*>" % opt_dict['passwd']
        if not re.search(passwd_match, output):
            test.fail("Fail to match passwd in xml %s" % output)
        else:
            logging.info("XML check for %s success",
                         re.search(passwd_match, output).group())
    else:
        passwd_match = "<graphic.*passwd=.*>"
        if re.search(passwd_match, output):
            test.fail("Have no --security-info option but find "
                      "passwd in xml")
        else:
            logging.info("Do not have --security-info option and can not find "
                         "passwd in xml")