QoS: Add support for direction
[neutron.git] / transcriber / src / main / java / org / opendaylight / neutron / transcriber / NeutronQosPolicyInterface.java
index 7b549989e4ba33fbf57b154fcbf029a87a98c35d..3cc30234f6fd97a2982ca0c7d011900035bdf80f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Intel Corporation and others.  All rights reserved.
+ * Copyright (c) 2016, 2018 Intel Corporation and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -60,6 +60,7 @@ public final class NeutronQosPolicyInterface
                         toMdIds(bandwidthLimitRule, BandwidthLimitRulesBuilder.class);
                 bandwidthLimitRulesBuilder.setMaxKbps(bandwidthLimitRule.getMaxKbps());
                 bandwidthLimitRulesBuilder.setMaxBurstKbps(bandwidthLimitRule.getMaxBurstKbps());
+                bandwidthLimitRulesBuilder.setDirection(DirectionMapper.get(bandwidthLimitRule.getDirection()));
                 listBandwith.add(bandwidthLimitRulesBuilder.build());
             }
             qosPolicyBuilder.setBandwidthLimitRules(listBandwith);
@@ -104,6 +105,7 @@ public final class NeutronQosPolicyInterface
                 NeutronQosBandwidthLimitRule opt = new NeutronQosBandwidthLimitRule();
                 opt.setMaxKbps(rule.getMaxKbps());
                 opt.setMaxBurstKbps(rule.getMaxBurstKbps());
+                opt.setDirection(DirectionMapper.getDirectionString(rule.getDirection()));
                 bandwidthLimitRules.add(opt);
             }
             result.setQosBandwidthLimitRules(bandwidthLimitRules);