2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
\r
4 * This program and the accompanying materials are made available under the
\r
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
\r
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
\r
9 package org.opendaylight.groupbasedpolicy.renderer.ofoverlay.flow;
\r
11 import java.util.Map;
\r
13 import org.opendaylight.groupbasedpolicy.renderer.ofoverlay.PolicyManager.FlowMap;
\r
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table;
\r
15 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
\r
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
\r
18 public class FlowTableTest extends OfTableTest {
\r
20 InstanceIdentifier<Table> tiid;
\r
22 protected void setup() throws Exception {
\r
23 tiid = FlowUtils.createTablePath(nodeId,
\r
24 table.getTableId());
\r
27 protected FlowMap dosync(Map<String, Flow> flows) throws Exception {
\r
28 FlowMap flowMap = policyManager.new FlowMap();
\r
29 if (flows != null) {
\r
30 for (String key : flows.keySet()) {
\r
31 Flow flow = flows.get(key);
\r
33 flowMap.writeFlow(nodeId, flow.getTableId(), flow);
\r
37 table.sync(nodeId, policyResolver.getCurrentPolicy(), flowMap);
\r