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.IPFIX;
16 import org.opendaylight.ovsdb.lib.table.Interface;
17 import org.opendaylight.ovsdb.lib.table.Manager;
18 import org.opendaylight.ovsdb.lib.table.Mirror;
19 import org.opendaylight.ovsdb.lib.table.NetFlow;
20 import org.opendaylight.ovsdb.lib.table.Open_vSwitch;
21 import org.opendaylight.ovsdb.lib.table.Port;
22 import org.opendaylight.ovsdb.lib.table.Qos;
23 import org.opendaylight.ovsdb.lib.table.Queue;
24 import org.opendaylight.ovsdb.lib.table.SFlow;
25 import org.opendaylight.ovsdb.lib.table.SSL;
26 import org.opendaylight.ovsdb.lib.table.internal.Table;
28 import com.fasterxml.jackson.annotation.JsonSubTypes;
29 import com.fasterxml.jackson.annotation.JsonTypeInfo;
30 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
32 @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
33 public class OVSDBRow {
36 * MINIMAL_CLASS Directive expects a leading "." character on the class name and is lame.
37 * Hence going with NAME directive even though it calls for SubTypes.
38 * Since we are using fixed table types for the Hydrogen release, this is acceptable.
39 * When we move towards Schema driven table definition, this is anyways not required.
42 use = JsonTypeInfo.Id.MINIMAL_CLASS,
43 include = JsonTypeInfo.As.PROPERTY,
48 use = JsonTypeInfo.Id.NAME,
49 include = JsonTypeInfo.As.WRAPPER_OBJECT)
51 @JsonSubTypes.Type(value=Bridge.class, name="Bridge"),
52 @JsonSubTypes.Type(value=Capability.class, name="Capbility"),
53 @JsonSubTypes.Type(value=Controller.class, name="Controller"),
54 @JsonSubTypes.Type(value=Interface.class, name="Interface"),
55 @JsonSubTypes.Type(value=Manager.class, name="Manager"),
56 @JsonSubTypes.Type(value=Mirror.class, name="Mirror"),
57 @JsonSubTypes.Type(value=NetFlow.class, name="NetFlow"),
58 @JsonSubTypes.Type(value=Open_vSwitch.class, name="Open_vSwitch"),
59 @JsonSubTypes.Type(value=Port.class, name="Port"),
60 @JsonSubTypes.Type(value=Qos.class, name="QoS"),
61 @JsonSubTypes.Type(value=Queue.class, name="Queue"),
62 @JsonSubTypes.Type(value=SFlow.class, name="sFlow"),
63 @JsonSubTypes.Type(value=SSL.class, name="SSL"),
64 @JsonSubTypes.Type(value=IPFIX.class, name="IPFIX")
71 public OVSDBRow(String parent_uuid, Table row) {
72 this.parent_uuid = parent_uuid;
76 public String getParent_uuid() {
79 public void setParent_uuid(String parent_uuid) {
80 this.parent_uuid = parent_uuid;
82 public Table getRow() {
85 public void setRow(Table row) {