L3: Add eth to br-ex
[ovsdb.git] / southbound / southbound-impl / src / main / java / org / opendaylight / ovsdb / southbound / transactions / md / OvsdbOperationalCommandAggregator.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.ovsdb.southbound.transactions.md;
10
11 import java.util.ArrayList;
12 import java.util.List;
13
14 import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
15 import org.opendaylight.ovsdb.lib.message.TableUpdates;
16 import org.opendaylight.ovsdb.lib.schema.DatabaseSchema;
17 import org.opendaylight.ovsdb.southbound.OvsdbConnectionInstance;
18
19 public class OvsdbOperationalCommandAggregator implements TransactionCommand {
20
21
22     private List<TransactionCommand> commands = new ArrayList<TransactionCommand>();
23
24     public OvsdbOperationalCommandAggregator(OvsdbConnectionInstance key,TableUpdates updates,
25             DatabaseSchema dbSchema) {
26         commands.add(new OpenVSwitchUpdateCommand(key, updates, dbSchema));
27         commands.add(new OvsdbManagersUpdateCommand(key, updates,  dbSchema));
28         commands.add(new OvsdbManagersRemovedCommand(key, updates,  dbSchema));
29         commands.add(new OvsdbBridgeUpdateCommand(key, updates,  dbSchema));
30         commands.add(new OvsdbBridgeRemovedCommand(key, updates,  dbSchema));
31         commands.add(new OvsdbControllerUpdateCommand(key, updates,  dbSchema));
32         commands.add(new OvsdbControllerRemovedCommand(key, updates,  dbSchema));
33         commands.add(new OvsdbPortUpdateCommand(key, updates, dbSchema));
34         commands.add(new OvsdbPortRemoveCommand(key, updates, dbSchema));
35     }
36
37     @Override
38     public void execute(ReadWriteTransaction transaction) {
39         for (TransactionCommand command: commands) {
40             command.execute(transaction);
41         }
42     }
43 }