def scan(self):
        results = utils.snmpwalk_by_cl(self.host, self.credential, self.oid)

        if not results:
            logging.info("[Huawei][mac] No results returned from SNMP walk!")
            return None

        mac_list = []

        for entity in results:
            # The format of 'iid' is like '248.192.1.214.34.15.31.1.48'
            # The first 6 numbers will be the MAC address
            # The 7th number is its vlan ID
            numbers = entity['iid'].split('.')
            mac = self.get_mac_address(numbers[:6])
            vlan = numbers[6]
            port = self.get_port(entity['value'])

            tmp = {}
            tmp['port'] = port
            tmp['mac'] = mac
            tmp['vlan'] = vlan
            mac_list.append(tmp)

        return mac_list
Implemnets the scan method in BasePlugin class.
dataset/ETHPy150Open openstack/compass-core/compass/hdsdiscovery/vendors/huawei/plugins/mac.py/Mac.scan