Search in sources :

Example 6 with DscpmarkingRules

use of org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.qos.rev160613.qos.attributes.qos.policies.qos.policy.DscpmarkingRules in project netvirt by opendaylight.

the class QosPolicyChangeListener method remove.

private void remove(InstanceIdentifier<DscpmarkingRules> identifier, DscpmarkingRules input) {
    LOG.trace("Removing DscpMarkingRules : key: {}, value={}", identifier, input);
    Uuid qosUuid = identifier.firstKeyOf(QosPolicy.class).getUuid();
    for (Network network : qosNeutronUtils.getQosNetworks(qosUuid)) {
        qosNeutronUtils.handleNeutronNetworkQosDscpRuleRemove(network);
    }
    for (Port port : qosNeutronUtils.getQosPorts(qosUuid)) {
        jobCoordinator.enqueueJob("QosPort-" + port.getUuid().getValue(), () -> {
            WriteTransaction wrtConfigTxn = dataBroker.newWriteOnlyTransaction();
            List<ListenableFuture<Void>> futures = new ArrayList<>();
            qosNeutronUtils.unsetPortDscpMark(port);
            futures.add(wrtConfigTxn.submit());
            return futures;
        });
    }
}
Also used : WriteTransaction(org.opendaylight.controller.md.sal.binding.api.WriteTransaction) Uuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid) Network(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.networks.rev150712.networks.attributes.networks.Network) Port(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.ports.rev150712.ports.attributes.ports.Port) ArrayList(java.util.ArrayList) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) QosPolicy(org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.qos.rev160613.qos.attributes.qos.policies.QosPolicy)

Aggregations

Uuid (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid)4 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)3 ArrayList (java.util.ArrayList)3 WriteTransaction (org.opendaylight.controller.md.sal.binding.api.WriteTransaction)3 Network (org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.networks.rev150712.networks.attributes.networks.Network)3 Port (org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.ports.rev150712.ports.attributes.ports.Port)3 QosPolicy (org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.qos.rev160613.qos.attributes.qos.policies.QosPolicy)3 BigInteger (java.math.BigInteger)1 IpAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress)1 BandwidthLimitRules (org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.qos.rev160613.qos.attributes.qos.policies.qos.policy.BandwidthLimitRules)1 DscpmarkingRules (org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.qos.rev160613.qos.attributes.qos.policies.qos.policy.DscpmarkingRules)1