def _mlag_bonds_error(self, rack, item, title):
    bonds = []
    for bond in mf['mlag_bonds'][rack]:
        if (item in filter.uncluster(bond['members'])):
            bonds.append(bond)
        elif (bond['name'] == item):
            bonds.append(bond)
        elif (bond['vids'] == item):
            bonds.append(bond)
    if (len(bonds) > 0):
        msg = "{}\nRefer to the errors below and check the 'master.yml' file.\n{}"
        raise AnsibleError(msg.format(title, filter.yaml_format({'mlag_bonds': {rack: bonds}})))
def _mlag_bonds_error(self, rack, item, title):
    bonds = []
    for bond in mf['mlag_bonds'][rack]:
        if (item in filter.uncluster(bond['members'])):
            bonds.append(bond)
        elif (bond['name'] == item):
            bonds.append(bond)
        elif (bond['vids'] == item):
            bonds.append(bond)
    if (len(bonds) > 0):
        msg = "{}\nRefer to the errors below and check the 'master.yml' file.\n{}"
        raise AnsibleError(msg.format(title, filter.yaml_format({'mlag_bonds': {rack: bonds}})))