Set the ports on this hub

        :param ports: ports info

def ports_mapping(self, ports):
        """
        Set the ports on this hub

        :param ports: ports info
        """
        if ports != self._ports:
            if len(self._mappings) > 0:
                raise NodeError("Can't modify a hub already connected.")

            port_number = 0
            for port in ports:
                port["name"] = "Ethernet{}".format(port_number)
                port["port_number"] = port_number
                port_number += 1

            self._ports = ports