def set_port_policy(self, port, policy):
        port_id = port['port_id']
        old_policy = self.get_port_policy(port)
        self.known_policies[policy.id] = policy
        self.port_policies[port_id] = policy.id
        self.qos_policy_ports[policy.id][port_id] = port
        if old_policy and old_policy.id != policy.id:
            del self.qos_policy_ports[old_policy.id][port_id]
        return old_policy
Returns whether this CommandType should be run in a snapshot build
dataset/ETHPy150Open openstack/neutron/neutron/agent/l2/extensions/qos.py/PortPolicyMap.set_port_policy--crossover with--dataset/ETHPy150Open dropbox/changes/changes/models/command.py/CommandType.is_valid_for_snapshot