@property
def vlans(self):
    master_vlans = mf['vlans']
    vids = []
    for (tenant, vlans) in master_vlans.items():
        for vlan in vlans:
            vids.append(vlan['id'])
    dup_vids = [vid for vid in set(vids) if (vids.count(vid) > 1)]
    if (len(dup_vids) > 0):
        error = {}
        for (tenant, value) in master_vlans.items():
            v = [v for v in value for d in dup_vids if (v['id'] == d)]
            if (len(v) > 0):
                error[tenant] = v
        msg = "VLANID conflict:\nRefer to the errors below and check the 'master.yml' file\n{}"
        raise AnsibleError(msg.format(self._yaml_f({'vlans': error})))
    return master_vlans
@property
def vlans(self):
    master_vlans = mf['vlans']
    vids = []
    for (tenant, vlans) in master_vlans.items():
        for vlan in vlans:
            vids.append(vlan['id'])
    dup_vids = [vid for vid in set(vids) if (vids.count(vid) > 1)]
    if (len(dup_vids) > 0):
        error = {}
        for (tenant, value) in master_vlans.items():
            v = [v for v in value for d in dup_vids if (v['id'] == d)]
            if (len(v) > 0):
                error[tenant] = v
        msg = "VLANID conflict:\nRefer to the errors below and check the 'master.yml' file\n{}"
        raise AnsibleError(msg.format(self._yaml_f({'vlans': error})))
    return master_vlans