2 * Copyright (C) 2013 Red Hat, Inc.
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
8 * Authors : Madhu Venugopal, Brent Salisbury
10 package org.opendaylight.ovsdb.northbound;
12 import org.opendaylight.ovsdb.lib.table.Bridge;
13 import org.opendaylight.ovsdb.lib.table.Capability;
14 import org.opendaylight.ovsdb.lib.table.Controller;
15 import org.opendaylight.ovsdb.lib.table.Interface;
16 import org.opendaylight.ovsdb.lib.table.Manager;
17 import org.opendaylight.ovsdb.lib.table.Mirror;
18 import org.opendaylight.ovsdb.lib.table.NetFlow;
19 import org.opendaylight.ovsdb.lib.table.Open_vSwitch;
20 import org.opendaylight.ovsdb.lib.table.Port;
21 import org.opendaylight.ovsdb.lib.table.Qos;
22 import org.opendaylight.ovsdb.lib.table.Queue;
23 import org.opendaylight.ovsdb.lib.table.SFlow;
24 import org.opendaylight.ovsdb.lib.table.SSL;
25 import org.opendaylight.ovsdb.lib.table.Table;
27 import com.fasterxml.jackson.annotation.JsonSubTypes;
28 import com.fasterxml.jackson.annotation.JsonTypeInfo;
29 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
31 @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
32 public class OVSDBRow {
35 * MINIMAL_CLASS Directive expects a leading "." character on the class name and is lame.
36 * Hence going with NAME directive even though it calls for SubTypes.
37 * Since we are using fixed table types for the Hydrogen release, this is acceptable.
38 * When we move towards Schema driven table definition, this is anyways not required.
41 use = JsonTypeInfo.Id.MINIMAL_CLASS,
42 include = JsonTypeInfo.As.PROPERTY,
47 use = JsonTypeInfo.Id.NAME,
48 include = JsonTypeInfo.As.WRAPPER_OBJECT)
50 @JsonSubTypes.Type(value=Bridge.class, name="Bridge"),
51 @JsonSubTypes.Type(value=Capability.class, name="Capbility"),
52 @JsonSubTypes.Type(value=Controller.class, name="Controller"),
53 @JsonSubTypes.Type(value=Interface.class, name="Interface"),
54 @JsonSubTypes.Type(value=Manager.class, name="Manager"),
55 @JsonSubTypes.Type(value=Mirror.class, name="Mirror"),
56 @JsonSubTypes.Type(value=NetFlow.class, name="NetFlow"),
57 @JsonSubTypes.Type(value=Open_vSwitch.class, name="Open_vSwitch"),
58 @JsonSubTypes.Type(value=Port.class, name="Port"),
59 @JsonSubTypes.Type(value=Qos.class, name="QoS"),
60 @JsonSubTypes.Type(value=Queue.class, name="Queue"),
61 @JsonSubTypes.Type(value=SFlow.class, name="sFlow"),
62 @JsonSubTypes.Type(value=SSL.class, name="SSL")
69 public OVSDBRow(String parent_uuid, Table row) {
70 this.parent_uuid = parent_uuid;
74 public String getParent_uuid() {
77 public void setParent_uuid(String parent_uuid) {
78 this.parent_uuid = parent_uuid;
80 public Table getRow() {
83 public void setRow(Table row) {