'Detach port from policy and cleanup data we don\'t need anymore.'

def clean_by_port(self, port):

    port_id = port['port_id']
    if (port_id in self.port_policies):
        del self.port_policies[port_id]
        for (qos_policy_id, port_dict) in self.qos_policy_ports.items():
            if (port_id in port_dict):
                del port_dict[port_id]
                if (not port_dict):
                    self._clean_policy_info(qos_policy_id)
                return
    LOG.debug('QoS    extension    did    not    have    information    on    port    %s', port_id)
