YuanyouZhang
Committed by Gerrit Code Review

[ONOS-2449] - OVSDB -- Create the rest table of RFC7047 which contain

FlowSampleCollectorSet,FlowTable,IPFIX,Manager,Mirror.

Change-Id: I730a6a42c7bb90a6ffd8e3c4e525dabfd85b3bd0
1 +/*
2 + * Copyright 2015 Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +package org.onosproject.ovsdb.rfc.table;
17 +
18 +import java.util.Map;
19 +
20 +import org.onosproject.ovsdb.rfc.notation.Column;
21 +import org.onosproject.ovsdb.rfc.notation.Row;
22 +import org.onosproject.ovsdb.rfc.notation.UUID;
23 +import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
24 +import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService;
25 +import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription;
26 +
27 +/**
28 + * This class provides operations of FlowSampleCollectorSet Table.
29 + */
30 +public class FlowSampleCollectorSet extends AbstractOvsdbTableService {
31 + /**
32 + * FlowSampleCollectorSet table column name.
33 + */
34 + public enum FlowSampleCollectorSetColumn {
35 + ID("id"), BRIDGE("bridge"), IPFIX("ipfix"), EXTERNALIDS("external_ids");
36 +
37 + private final String columnName;
38 +
39 + private FlowSampleCollectorSetColumn(String columnName) {
40 + this.columnName = columnName;
41 + }
42 +
43 + /**
44 + * Returns the table column name for FlowSampleCollectorSetColumn.
45 + * @return the table column name
46 + */
47 + public String columnName() {
48 + return columnName;
49 + }
50 + }
51 +
52 + /**
53 + * Constructs a FlowSampleCollectorSet object. Generate
54 + * FlowSampleCollectorSet Table Description.
55 + * @param dbSchema DatabaseSchema
56 + * @param row Row
57 + */
58 + public FlowSampleCollectorSet(DatabaseSchema dbSchema, Row row) {
59 + super(dbSchema, row, OvsdbTable.FLOWSAMPLECOLLECTORSET, VersionNum.VERSION710);
60 + }
61 +
62 + /**
63 + * Get the Column entity which column name is "id" from the Row entity of
64 + * attributes.
65 + * @return the Column entity which column name is "id"
66 + */
67 + public Column getIdColumn() {
68 + ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.ID.columnName(),
69 + "getIdColumn", VersionNum.VERSION710);
70 + return (Column) super.getColumnHandler(columndesc);
71 + }
72 +
73 + /**
74 + * Add a Column entity which column name is "id" to the Row entity of
75 + * attributes.
76 + * @param id the column data which column name is "id"
77 + */
78 + public void setId(Long id) {
79 + ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.ID.columnName(),
80 + "setId", VersionNum.VERSION710);
81 + super.setDataHandler(columndesc, id);
82 + }
83 +
84 + /**
85 + * Get the Column entity which column name is "bridge" from the Row entity
86 + * of attributes.
87 + * @return the Column entity which column name is "bridge"
88 + */
89 + public Column getBridgeColumn() {
90 + ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.BRIDGE.columnName(),
91 + "getBridgeColumn", VersionNum.VERSION710);
92 + return (Column) super.getColumnHandler(columndesc);
93 + }
94 +
95 + /**
96 + * Add a Column entity which column name is "bridge" to the Row entity of
97 + * attributes.
98 + * @param bridge the column data which column name is "bridge"
99 + */
100 + public void setBridge(UUID bridge) {
101 + ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.BRIDGE.columnName(),
102 + "setBridge", VersionNum.VERSION710);
103 + super.setDataHandler(columndesc, bridge);
104 + }
105 +
106 + /**
107 + * Get the Column entity which column name is "ipfix" from the Row entity of
108 + * attributes.
109 + * @return the Column entity which column name is "ipfix"
110 + */
111 + public Column getIpfixColumn() {
112 + ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.IPFIX.columnName(),
113 + "getIpfixColumn", VersionNum.VERSION710);
114 + return (Column) super.getColumnHandler(columndesc);
115 + }
116 +
117 + /**
118 + * Add a Column entity which column name is "ipfix" to the Row entity of
119 + * attributes.
120 + * @param ipfix the column data which column name is "ipfix"
121 + */
122 + public void setIpfix(UUID ipfix) {
123 + ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.IPFIX.columnName(),
124 + "setIpfix", VersionNum.VERSION710);
125 + super.setDataHandler(columndesc, ipfix);
126 + }
127 +
128 + /**
129 + * Get the Column entity which column name is "external_ids" from the Row
130 + * entity of attributes.
131 + * @return the Column entity which column name is "external_ids"
132 + */
133 + public Column getExternalIdsColumn() {
134 + ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.EXTERNALIDS
135 + .columnName(),
136 + "getExternalIdsColumn", VersionNum.VERSION710);
137 + return (Column) super.getColumnHandler(columndesc);
138 + }
139 +
140 + /**
141 + * Add a Column entity which column name is "external_ids" to the Row entity
142 + * of attributes.
143 + * @param externalIds the column data which column name is "external_ids"
144 + */
145 + public void setExternalIds(Map<String, String> externalIds) {
146 + ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.EXTERNALIDS
147 + .columnName(),
148 + "setExternalIds", VersionNum.VERSION710);
149 + super.setDataHandler(columndesc, externalIds);
150 + }
151 +}
1 +/*
2 + * Copyright 2015 Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +package org.onosproject.ovsdb.rfc.table;
17 +
18 +import java.util.Map;
19 +import java.util.Set;
20 +
21 +import org.onosproject.ovsdb.rfc.notation.Column;
22 +import org.onosproject.ovsdb.rfc.notation.Row;
23 +import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
24 +import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService;
25 +import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription;
26 +
27 +/**
28 + * This class provides operations of FlowTable Table.
29 + */
30 +public class FlowTable extends AbstractOvsdbTableService {
31 + /**
32 + * FlowTable table column name.
33 + */
34 + public enum FlowTableColumn {
35 + FLOWLIMIT("flow_limit"), OVERFLOWPOLICY("overflow_policy"), GROUPS("groups"), NAME("name"),
36 + PREFIXES("prefixes"), EXTERNALIDS("external_ids");
37 +
38 + private final String columnName;
39 +
40 + private FlowTableColumn(String columnName) {
41 + this.columnName = columnName;
42 + }
43 +
44 + /**
45 + * Returns the table column name for FlowTableColumn.
46 + * @return the table column name
47 + */
48 + public String columnName() {
49 + return columnName;
50 + }
51 + }
52 +
53 + /**
54 + * Constructs a FlowTable object. Generate FlowTable Table Description.
55 + * @param dbSchema DatabaseSchema
56 + * @param row Row
57 + */
58 + public FlowTable(DatabaseSchema dbSchema, Row row) {
59 + super(dbSchema, row, OvsdbTable.FLWTABLE, VersionNum.VERSION650);
60 + }
61 +
62 + /**
63 + * Get the Column entity which column name is "flow_limit" from the Row
64 + * entity of attributes.
65 + * @return the Column entity which column name is "flow_limit"
66 + */
67 + public Column getFlowLimitColumn() {
68 + ColumnDescription columndesc = new ColumnDescription(FlowTableColumn.FLOWLIMIT.columnName(),
69 + "getFlowLimitColumn", VersionNum.VERSION650);
70 + return (Column) super.getColumnHandler(columndesc);
71 + }
72 +
73 + /**
74 + * Add a Column entity which column name is "flow_limit" to the Row entity
75 + * of attributes.
76 + * @param flowLimit the column data which column name is "flow_limit"
77 + */
78 + public void setFlowLimit(Set<Long> flowLimit) {
79 + ColumnDescription columndesc = new ColumnDescription(FlowTableColumn.FLOWLIMIT.columnName(),
80 + "setFlowLimit", VersionNum.VERSION650);
81 + super.setDataHandler(columndesc, flowLimit);
82 + }
83 +
84 + /**
85 + * Get the Column entity which column name is "overflow_policy" from the Row
86 + * entity of attributes.
87 + * @return the Column entity which column name is "overflow_policy"
88 + */
89 + public Column getOverflowPolicyColumn() {
90 + ColumnDescription columndesc = new ColumnDescription(FlowTableColumn.OVERFLOWPOLICY.columnName(),
91 + "getOverflowPolicyColumn", VersionNum.VERSION650);
92 + return (Column) super.getColumnHandler(columndesc);
93 + }
94 +
95 + /**
96 + * Add a Column entity which column name is "overflow_policy" to the Row
97 + * entity of attributes.
98 + * @param overflowPolicy the column data which column name is
99 + * "overflow_policy"
100 + */
101 + public void setOverflowPolicy(Set<String> overflowPolicy) {
102 + ColumnDescription columndesc = new ColumnDescription(FlowTableColumn.OVERFLOWPOLICY.columnName(),
103 + "setOverflowPolicy", VersionNum.VERSION650);
104 + super.setDataHandler(columndesc, overflowPolicy);
105 + }
106 +
107 + /**
108 + * Get the Column entity which column name is "groups" from the Row entity
109 + * of attributes.
110 + * @return the Column entity which column name is "groups"
111 + */
112 + public Column getGroupsColumn() {
113 + ColumnDescription columndesc = new ColumnDescription(FlowTableColumn.GROUPS.columnName(),
114 + "getGroupsColumn", VersionNum.VERSION650);
115 + return (Column) super.getColumnHandler(columndesc);
116 + }
117 +
118 + /**
119 + * Add a Column entity which column name is "groups" to the Row entity of
120 + * attributes.
121 + * @param groups the column data which column name is "groups"
122 + */
123 + public void setGroups(Set<String> groups) {
124 + ColumnDescription columndesc = new ColumnDescription(FlowTableColumn.GROUPS.columnName(),
125 + "setGroups", VersionNum.VERSION650);
126 + super.setDataHandler(columndesc, groups);
127 + }
128 +
129 + /**
130 + * Get the Column entity which column name is "name" from the Row entity of
131 + * attributes.
132 + * @return the Column entity which column name is "name"
133 + */
134 + public Column getNameColumn() {
135 + ColumnDescription columndesc = new ColumnDescription(FlowTableColumn.NAME.columnName(),
136 + "getNameColumn", VersionNum.VERSION650);
137 + return (Column) super.getColumnHandler(columndesc);
138 + }
139 +
140 + /**
141 + * Add a Column entity which column name is "name" to the Row entity of
142 + * attributes.
143 + * @param name the column data which column name is "name"
144 + */
145 + public void setName(Set<String> name) {
146 + ColumnDescription columndesc = new ColumnDescription(FlowTableColumn.NAME.columnName(),
147 + "setName",
148 + VersionNum.VERSION650);
149 + super.setDataHandler(columndesc, name);
150 + }
151 +
152 + /**
153 + * Get the Column entity which column name is "prefixes" from the Row entity
154 + * of attributes.
155 + * @return the Column entity which column name is "prefixes"
156 + */
157 + public Column getPrefixesColumn() {
158 + ColumnDescription columndesc = new ColumnDescription(FlowTableColumn.PREFIXES.columnName(),
159 + "getPrefixesColumn", VersionNum.VERSION740);
160 + return (Column) super.getColumnHandler(columndesc);
161 + }
162 +
163 + /**
164 + * Add a Column entity which column name is "prefixes" to the Row entity of
165 + * attributes.
166 + * @param prefixes the column data which column name is "prefixes"
167 + */
168 + public void setPrefixes(Set<String> prefixes) {
169 + ColumnDescription columndesc = new ColumnDescription(FlowTableColumn.PREFIXES.columnName(),
170 + "setPrefixes", VersionNum.VERSION740);
171 + super.setDataHandler(columndesc, prefixes);
172 + }
173 +
174 + /**
175 + * Get the Column entity which column name is "external_ids" from the Row
176 + * entity of attributes.
177 + * @return the Column entity which column name is "external_ids"
178 + */
179 + public Column getExternalIdsColumn() {
180 + ColumnDescription columndesc = new ColumnDescription(FlowTableColumn.EXTERNALIDS.columnName(),
181 + "getExternalIdsColumn", VersionNum.VERSION750);
182 + return (Column) super.getColumnHandler(columndesc);
183 + }
184 +
185 + /**
186 + * Add a Column entity which column name is "external_ids" to the Row entity
187 + * of attributes.
188 + * @param externalIds the column data which column name is "external_ids"
189 + */
190 + public void setExternalIds(Map<String, String> externalIds) {
191 + ColumnDescription columndesc = new ColumnDescription(FlowTableColumn.EXTERNALIDS.columnName(),
192 + "setExternalIds", VersionNum.VERSION750);
193 + super.setDataHandler(columndesc, externalIds);
194 + }
195 +
196 +}
1 +/*
2 + * Copyright 2015 Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +package org.onosproject.ovsdb.rfc.table;
17 +
18 +import java.util.Map;
19 +import java.util.Set;
20 +
21 +import org.onosproject.ovsdb.rfc.notation.Column;
22 +import org.onosproject.ovsdb.rfc.notation.Row;
23 +import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
24 +import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService;
25 +import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription;
26 +
27 +/**
28 + * This class provides operations of Ipfix Table.
29 + */
30 +public class Ipfix extends AbstractOvsdbTableService {
31 + /**
32 + * Ipfix table column name.
33 + */
34 + public enum IpfixColumn {
35 + TARGETS("targets"), SAMPLING("sampling"), OBSDOMAINID("obs_domain_id"), OBSPOINTID("obs_point_id"),
36 + CACHEACTIVETIMEOUT("cache_active_timeout"), EXTERNALIDS("external_ids"),
37 + CACHEMAXFLOWS("cache_max_flows");
38 +
39 + private final String columnName;
40 +
41 + private IpfixColumn(String columnName) {
42 + this.columnName = columnName;
43 + }
44 +
45 + /**
46 + * Returns the table column name for IpfixColumn.
47 + * @return the table column name
48 + */
49 + public String columnName() {
50 + return columnName;
51 + }
52 + }
53 +
54 + /**
55 + * Constructs a Ipfix object. Generate Ipfix Table Description.
56 + * @param dbSchema DatabaseSchema
57 + * @param row Row
58 + */
59 + public Ipfix(DatabaseSchema dbSchema, Row row) {
60 + super(dbSchema, row, OvsdbTable.IPFIX, VersionNum.VERSION710);
61 + }
62 +
63 + /**
64 + * Get the Column entity which column name is "targets" from the Row entity
65 + * of attributes.
66 + * @return the Column entity which column name is "targets"
67 + */
68 + public Column getTargetsColumn() {
69 + ColumnDescription columndesc = new ColumnDescription(IpfixColumn.TARGETS.columnName(),
70 + "getTargetsColumn", VersionNum.VERSION710);
71 + return (Column) super.getColumnHandler(columndesc);
72 + }
73 +
74 + /**
75 + * Add a Column entity which column name is "targets" to the Row entity of
76 + * attributes.
77 + * @param targets the column data which column name is "targets"
78 + */
79 + public void setTargets(Set<String> targets) {
80 + ColumnDescription columndesc = new ColumnDescription(IpfixColumn.TARGETS.columnName(),
81 + "setTargets",
82 + VersionNum.VERSION710);
83 + super.setDataHandler(columndesc, targets);
84 + }
85 +
86 + /**
87 + * Get the Column entity which column name is "sampling" from the Row entity
88 + * of attributes.
89 + * @return the Column entity which column name is "sampling"
90 + */
91 + public Column getSamplingColumn() {
92 + ColumnDescription columndesc = new ColumnDescription(IpfixColumn.SAMPLING.columnName(),
93 + "getSamplingColumn", VersionNum.VERSION710);
94 + return (Column) super.getColumnHandler(columndesc);
95 + }
96 +
97 + /**
98 + * Add a Column entity which column name is "sampling" to the Row entity of
99 + * attributes.
100 + * @param sampling the column data which column name is "sampling"
101 + */
102 + public void setSampling(Set<Long> sampling) {
103 + ColumnDescription columndesc = new ColumnDescription(IpfixColumn.SAMPLING.columnName(),
104 + "setSampling", VersionNum.VERSION710);
105 + super.setDataHandler(columndesc, sampling);
106 + }
107 +
108 + /**
109 + * Get the Column entity which column name is "obs_domain_id" from the Row
110 + * entity of attributes.
111 + * @return the Column entity which column name is "obs_domain_id"
112 + */
113 + public Column getObsDomainIdColumn() {
114 + ColumnDescription columndesc = new ColumnDescription(IpfixColumn.OBSDOMAINID.columnName(),
115 + "getObsDomainIdColumn", VersionNum.VERSION710);
116 + return (Column) super.getColumnHandler(columndesc);
117 + }
118 +
119 + /**
120 + * Add a Column entity which column name is "obs_domain_id" to the Row
121 + * entity of attributes.
122 + * @param obsdomainid the column data which column name is "obs_domain_id"
123 + */
124 + public void setObsDomainId(Set<Long> obsdomainid) {
125 + ColumnDescription columndesc = new ColumnDescription(IpfixColumn.OBSDOMAINID.columnName(),
126 + "setObsDomainId", VersionNum.VERSION710);
127 + super.setDataHandler(columndesc, obsdomainid);
128 + }
129 +
130 + /**
131 + * Get the Column entity which column name is "obs_point_id" from the Row
132 + * entity of attributes.
133 + * @return the Column entity which column name is "obs_point_id"
134 + */
135 + public Column getObsPointIdColumn() {
136 + ColumnDescription columndesc = new ColumnDescription(IpfixColumn.OBSPOINTID.columnName(),
137 + "getObsPointIdColumn", VersionNum.VERSION710);
138 + return (Column) super.getColumnHandler(columndesc);
139 + }
140 +
141 + /**
142 + * Add a Column entity which column name is "obs_point_id" to the Row entity
143 + * of attributes.
144 + * @param obsPointId the column data which column name is "obs_point_id"
145 + */
146 + public void setObsPointId(Set<Long> obsPointId) {
147 + ColumnDescription columndesc = new ColumnDescription(IpfixColumn.OBSPOINTID.columnName(),
148 + "setObsPointId", VersionNum.VERSION710);
149 + super.setDataHandler(columndesc, obsPointId);
150 + }
151 +
152 + /**
153 + * Get the Column entity which column name is "cache_active_timeout" from
154 + * the Row entity of attributes.
155 + * @return the Column entity which column name is "cache_active_timeout"
156 + */
157 + public Column getCacheActiveTimeoutColumn() {
158 + ColumnDescription columndesc = new ColumnDescription(IpfixColumn.CACHEACTIVETIMEOUT.columnName(),
159 + "getCacheActiveTimeoutColumn",
160 + VersionNum.VERSION730);
161 + return (Column) super.getColumnHandler(columndesc);
162 + }
163 +
164 + /**
165 + * Add a Column entity which column name is "cache_active_timeout" to the
166 + * Row entity of attributes.
167 + * @param cacheActiveTimeout the column data which column name is
168 + * "cache_active_timeout"
169 + */
170 + public void setCacheActiveTimeout(Set<Long> cacheActiveTimeout) {
171 + ColumnDescription columndesc = new ColumnDescription(IpfixColumn.CACHEACTIVETIMEOUT.columnName(),
172 + "setCacheActiveTimeout", VersionNum.VERSION730);
173 + super.setDataHandler(columndesc, cacheActiveTimeout);
174 + }
175 +
176 + /**
177 + * Get the Column entity which column name is "cache_max_flows" from the Row
178 + * entity of attributes.
179 + * @return the Column entity which column name is "cache_max_flows"
180 + */
181 + public Column getCacheMaxFlowsColumn() {
182 + ColumnDescription columndesc = new ColumnDescription(IpfixColumn.CACHEMAXFLOWS.columnName(),
183 + "getCacheMaxFlowsColumn", VersionNum.VERSION730);
184 + return (Column) super.getColumnHandler(columndesc);
185 + }
186 +
187 + /**
188 + * Add a Column entity which column name is "cache_max_flows" to the Row
189 + * entity of attributes.
190 + * @param cacheMaxFlows the column data which column name is
191 + * "cache_max_flows"
192 + */
193 + public void setCacheMaxFlows(Set<Long> cacheMaxFlows) {
194 + ColumnDescription columndesc = new ColumnDescription(IpfixColumn.CACHEMAXFLOWS.columnName(),
195 + "setCacheMaxFlows", VersionNum.VERSION730);
196 + super.setDataHandler(columndesc, cacheMaxFlows);
197 + }
198 +
199 + /**
200 + * Get the Column entity which column name is "external_ids" from the Row
201 + * entity of attributes.
202 + * @return the Column entity which column name is "external_ids"
203 + */
204 + public Column getExternalIdsColumn() {
205 + ColumnDescription columndesc = new ColumnDescription(IpfixColumn.EXTERNALIDS.columnName(),
206 + "getExternalIdsColumn", VersionNum.VERSION710);
207 + return (Column) super.getColumnHandler(columndesc);
208 + }
209 +
210 + /**
211 + * Add a Column entity which column name is "external_ids" to the Row entity
212 + * of attributes.
213 + * @param externalIds the column data which column name is "external_ids"
214 + */
215 + public void setExternalIds(Map<String, String> externalIds) {
216 + ColumnDescription columndesc = new ColumnDescription(IpfixColumn.EXTERNALIDS.columnName(),
217 + "setExternalIds", VersionNum.VERSION710);
218 + super.setDataHandler(columndesc, externalIds);
219 + }
220 +}