Committed by
Gerrit Code Review
[ONOS-2449]The rest of the table of RFC7047 which contain
NetFlow,Qos,Queue,sFlow,SSL. Change-Id: I45d9d6bad027c5e63a6063b6955fd597e8ed03b6
Showing
5 changed files
with
837 additions
and
0 deletions
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 Netflow Table. | ||
29 | + */ | ||
30 | +public class Netflow extends AbstractOvsdbTableService { | ||
31 | + /** | ||
32 | + * Netflow table column name. | ||
33 | + */ | ||
34 | + public enum NetflowColumn { | ||
35 | + TARGETS("targets"), ACTIVETIMEOUT("active_timeout"), ENGINETYPE("engine_type"), | ||
36 | + EXTERNALIDS("external_ids"), ADDIDTOINTERFACE("add_id_to_interface"), ENGINEID("engine_id"); | ||
37 | + | ||
38 | + private final String columnName; | ||
39 | + | ||
40 | + private NetflowColumn(String columnName) { | ||
41 | + this.columnName = columnName; | ||
42 | + } | ||
43 | + | ||
44 | + /** | ||
45 | + * Returns the table column name for NetflowColumn. | ||
46 | + * @return the table column name | ||
47 | + */ | ||
48 | + public String columnName() { | ||
49 | + return columnName; | ||
50 | + } | ||
51 | + } | ||
52 | + | ||
53 | + /** | ||
54 | + * Constructs a NetFlow object. Generate Netflow Table Description. | ||
55 | + * @param dbSchema DatabaseSchema | ||
56 | + * @param row Row | ||
57 | + */ | ||
58 | + public Netflow(DatabaseSchema dbSchema, Row row) { | ||
59 | + super(dbSchema, row, OvsdbTable.NETFLOW, VersionNum.VERSION100); | ||
60 | + } | ||
61 | + | ||
62 | + /** | ||
63 | + * Get the Column entity which column name is "targets" from the Row entity | ||
64 | + * of attributes. | ||
65 | + * @return the Column entity | ||
66 | + */ | ||
67 | + public Column getTargetsColumn() { | ||
68 | + ColumnDescription columndesc = new ColumnDescription(NetflowColumn.TARGETS.columnName(), | ||
69 | + "getTargetsColumn", VersionNum.VERSION100); | ||
70 | + return (Column) super.getColumnHandler(columndesc); | ||
71 | + } | ||
72 | + | ||
73 | + /** | ||
74 | + * Add a Column entity which column name is "targets" to the Row entity of | ||
75 | + * attributes. | ||
76 | + * @param targets the column data which column name is "targets" | ||
77 | + */ | ||
78 | + public void setTargets(Set<String> targets) { | ||
79 | + ColumnDescription columndesc = new ColumnDescription(NetflowColumn.TARGETS.columnName(), | ||
80 | + "setTargets", VersionNum.VERSION100); | ||
81 | + super.setDataHandler(columndesc, targets); | ||
82 | + } | ||
83 | + | ||
84 | + /** | ||
85 | + * Get the Column entity which column name is "active_timeout" from the Row | ||
86 | + * entity of attributes. | ||
87 | + * @return the Column entity | ||
88 | + */ | ||
89 | + public Column getActiveTimeoutColumn() { | ||
90 | + ColumnDescription columndesc = new ColumnDescription(NetflowColumn.ACTIVETIMEOUT.columnName(), | ||
91 | + "getActiveTimeoutColumn", VersionNum.VERSION100); | ||
92 | + return (Column) super.getColumnHandler(columndesc); | ||
93 | + } | ||
94 | + | ||
95 | + /** | ||
96 | + * Add a Column entity which column name is "active_timeout" to the Row | ||
97 | + * entity of attributes. | ||
98 | + * @param activeTimeout the column data which column name is | ||
99 | + * "active_timeout" | ||
100 | + */ | ||
101 | + public void setActiveTimeout(Long activeTimeout) { | ||
102 | + ColumnDescription columndesc = new ColumnDescription(NetflowColumn.ACTIVETIMEOUT.columnName(), | ||
103 | + "setActiveTimeout", VersionNum.VERSION100); | ||
104 | + super.setDataHandler(columndesc, activeTimeout); | ||
105 | + } | ||
106 | + | ||
107 | + /** | ||
108 | + * Get the Column entity which column name is "engine_type" from the Row | ||
109 | + * entity of attributes. | ||
110 | + * @return the Column entity | ||
111 | + */ | ||
112 | + public Column getEngineTypeColumn() { | ||
113 | + ColumnDescription columndesc = new ColumnDescription(NetflowColumn.ENGINETYPE.columnName(), | ||
114 | + "getEngineTypeColumn", VersionNum.VERSION100); | ||
115 | + return (Column) super.getColumnHandler(columndesc); | ||
116 | + } | ||
117 | + | ||
118 | + /** | ||
119 | + * Add a Column entity which column name is "engine_type" to the Row entity | ||
120 | + * of attributes. | ||
121 | + * @param engineType the column data which column name is "engine_type" | ||
122 | + */ | ||
123 | + public void setEngineType(Set<Long> engineType) { | ||
124 | + ColumnDescription columndesc = new ColumnDescription(NetflowColumn.ENGINETYPE.columnName(), | ||
125 | + "setEngineType", VersionNum.VERSION100); | ||
126 | + super.setDataHandler(columndesc, engineType); | ||
127 | + } | ||
128 | + | ||
129 | + /** | ||
130 | + * Get the Column entity which column name is "external_ids" from the Row | ||
131 | + * entity of attributes. | ||
132 | + * @return the Column entity | ||
133 | + */ | ||
134 | + public Column getExternalIdsColumn() { | ||
135 | + ColumnDescription columndesc = new ColumnDescription(NetflowColumn.EXTERNALIDS.columnName(), | ||
136 | + "getExternalIdsColumn", VersionNum.VERSION100); | ||
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(NetflowColumn.EXTERNALIDS.columnName(), | ||
147 | + "setExternalIds", VersionNum.VERSION100); | ||
148 | + super.setDataHandler(columndesc, externalIds); | ||
149 | + } | ||
150 | + | ||
151 | + /** | ||
152 | + * Get the Column entity which column name is "add_id_to_interface" from the | ||
153 | + * Row entity of attributes. | ||
154 | + * @return the Column entity | ||
155 | + */ | ||
156 | + public Column getAddIdToInterfaceColumn() { | ||
157 | + ColumnDescription columndesc = new ColumnDescription(NetflowColumn.ADDIDTOINTERFACE.columnName(), | ||
158 | + "getAddIdToInterfaceColumn", | ||
159 | + VersionNum.VERSION100); | ||
160 | + return (Column) super.getColumnHandler(columndesc); | ||
161 | + } | ||
162 | + | ||
163 | + /** | ||
164 | + * Add a Column entity which column name is "add_id_to_interface" to the Row | ||
165 | + * entity of attributes. | ||
166 | + * @param addIdToInterface the column data which column name is | ||
167 | + * "add_id_to_interface" | ||
168 | + */ | ||
169 | + public void setAddIdToInterface(Boolean addIdToInterface) { | ||
170 | + ColumnDescription columndesc = new ColumnDescription(NetflowColumn.ADDIDTOINTERFACE.columnName(), | ||
171 | + "setAddIdToInterface", VersionNum.VERSION100); | ||
172 | + super.setDataHandler(columndesc, addIdToInterface); | ||
173 | + } | ||
174 | + | ||
175 | + /** | ||
176 | + * Get the Column entity which column name is "engine_id" from the Row | ||
177 | + * entity of attributes. | ||
178 | + * @return the Column entity | ||
179 | + */ | ||
180 | + public Column getEngineIdColumn() { | ||
181 | + ColumnDescription columndesc = new ColumnDescription(NetflowColumn.ENGINETYPE.columnName(), | ||
182 | + "getEngineIdColumn", VersionNum.VERSION100); | ||
183 | + return (Column) super.getColumnHandler(columndesc); | ||
184 | + } | ||
185 | + | ||
186 | + /** | ||
187 | + * Add a Column entity which column name is "engine_id" to the Row entity of | ||
188 | + * attributes. | ||
189 | + * @param engineId the column data which column name is "engine_id" | ||
190 | + */ | ||
191 | + public void setEngineId(Set<Long> engineId) { | ||
192 | + ColumnDescription columndesc = new ColumnDescription(NetflowColumn.ENGINETYPE.columnName(), | ||
193 | + "setEngineId", VersionNum.VERSION100); | ||
194 | + super.setDataHandler(columndesc, engineId); | ||
195 | + } | ||
196 | + | ||
197 | +} |
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.notation.UUID; | ||
24 | +import org.onosproject.ovsdb.rfc.schema.DatabaseSchema; | ||
25 | +import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService; | ||
26 | +import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription; | ||
27 | + | ||
28 | +/** | ||
29 | + * This class provides operations of Qos Table. | ||
30 | + */ | ||
31 | +public class Qos extends AbstractOvsdbTableService { | ||
32 | + /** | ||
33 | + * Qos table column name. | ||
34 | + */ | ||
35 | + public enum QosColumn { | ||
36 | + QUEUES("queues"), TYPE("type"), OTHERCONFIG("other_config"), EXTERNALIDS("external_ids"); | ||
37 | + | ||
38 | + private final String columnName; | ||
39 | + | ||
40 | + private QosColumn(String columnName) { | ||
41 | + this.columnName = columnName; | ||
42 | + } | ||
43 | + | ||
44 | + /** | ||
45 | + * Returns the table column name for QosColumn. | ||
46 | + * @return the table column name | ||
47 | + */ | ||
48 | + public String columnName() { | ||
49 | + return columnName; | ||
50 | + } | ||
51 | + } | ||
52 | + | ||
53 | + /** | ||
54 | + * Constructs a Qos object. Generate Qos Table Description. | ||
55 | + * @param dbSchema DatabaseSchema | ||
56 | + * @param row Row | ||
57 | + */ | ||
58 | + public Qos(DatabaseSchema dbSchema, Row row) { | ||
59 | + super(dbSchema, row, OvsdbTable.QOS, VersionNum.VERSION100); | ||
60 | + } | ||
61 | + | ||
62 | + /** | ||
63 | + * Get the Column entity which column name is "queues" from the Row entity | ||
64 | + * of attributes. | ||
65 | + * @return the Column entity | ||
66 | + */ | ||
67 | + public Column getQueuesColumn() { | ||
68 | + ColumnDescription columndesc = new ColumnDescription(QosColumn.QUEUES.columnName(), | ||
69 | + "getQueuesColumn", VersionNum.VERSION100); | ||
70 | + return (Column) super.getColumnHandler(columndesc); | ||
71 | + } | ||
72 | + | ||
73 | + /** | ||
74 | + * Add a Column entity which column name is "queues" to the Row entity of | ||
75 | + * attributes. | ||
76 | + * @param queues the column data which column name is "queues" | ||
77 | + */ | ||
78 | + public void setQueues(Map<Long, UUID> queues) { | ||
79 | + ColumnDescription columndesc = new ColumnDescription(QosColumn.QUEUES.columnName(), "setQueues", | ||
80 | + VersionNum.VERSION100); | ||
81 | + super.setDataHandler(columndesc, queues); | ||
82 | + } | ||
83 | + | ||
84 | + /** | ||
85 | + * Get the Column entity which column name is "type" from the Row entity of | ||
86 | + * attributes. | ||
87 | + * @return the Column entity | ||
88 | + */ | ||
89 | + public Column getTypeColumn() { | ||
90 | + ColumnDescription columndesc = new ColumnDescription(QosColumn.TYPE.columnName(), "getTypeColumn", | ||
91 | + VersionNum.VERSION100); | ||
92 | + return (Column) super.getColumnHandler(columndesc); | ||
93 | + } | ||
94 | + | ||
95 | + /** | ||
96 | + * Add a Column entity which column name is "type" to the Row entity of | ||
97 | + * attributes. | ||
98 | + * @param type the column data which column name is "type" | ||
99 | + */ | ||
100 | + public void setType(Set<String> type) { | ||
101 | + ColumnDescription columndesc = new ColumnDescription(QosColumn.TYPE.columnName(), "setType", | ||
102 | + VersionNum.VERSION100); | ||
103 | + super.setDataHandler(columndesc, type); | ||
104 | + } | ||
105 | + | ||
106 | + /** | ||
107 | + * Get the Column entity which column name is "other_config" from the Row | ||
108 | + * entity of attributes. | ||
109 | + * @return the Column entity | ||
110 | + */ | ||
111 | + public Column getOtherConfigColumn() { | ||
112 | + ColumnDescription columndesc = new ColumnDescription(QosColumn.OTHERCONFIG.columnName(), | ||
113 | + "getOtherConfigColumn", VersionNum.VERSION100); | ||
114 | + return (Column) super.getColumnHandler(columndesc); | ||
115 | + } | ||
116 | + | ||
117 | + /** | ||
118 | + * Add a Column entity which column name is "other_config" to the Row entity | ||
119 | + * of attributes. | ||
120 | + * @param otherConfig the column data which column name is "other_config" | ||
121 | + */ | ||
122 | + public void setOtherConfig(Map<String, String> otherConfig) { | ||
123 | + ColumnDescription columndesc = new ColumnDescription(QosColumn.OTHERCONFIG.columnName(), | ||
124 | + "setOtherConfig", VersionNum.VERSION100); | ||
125 | + super.setDataHandler(columndesc, otherConfig); | ||
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 | ||
132 | + */ | ||
133 | + public Column getExternalIdsColumn() { | ||
134 | + ColumnDescription columndesc = new ColumnDescription(QosColumn.EXTERNALIDS.columnName(), | ||
135 | + "getExternalIdsColumn", VersionNum.VERSION100); | ||
136 | + return (Column) super.getColumnHandler(columndesc); | ||
137 | + } | ||
138 | + | ||
139 | + /** | ||
140 | + * Add a Column entity which column name is "external_ids" to the Row entity | ||
141 | + * of attributes. | ||
142 | + * @param externalIds the column data which column name is "external_ids" | ||
143 | + */ | ||
144 | + public void setExternalIds(Map<String, String> externalIds) { | ||
145 | + ColumnDescription columndesc = new ColumnDescription(QosColumn.EXTERNALIDS.columnName(), | ||
146 | + "setExternalIds", VersionNum.VERSION100); | ||
147 | + super.setDataHandler(columndesc, externalIds); | ||
148 | + } | ||
149 | +} |
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 Queue Table. | ||
29 | + */ | ||
30 | +public class Queue extends AbstractOvsdbTableService { | ||
31 | + /** | ||
32 | + * Queue table column name. | ||
33 | + */ | ||
34 | + public enum QueueColumn { | ||
35 | + DSCP("dscp"), OTHERCONFIG("other_config"), EXTERNALIDS("external_ids"); | ||
36 | + | ||
37 | + private final String columnName; | ||
38 | + | ||
39 | + private QueueColumn(String columnName) { | ||
40 | + this.columnName = columnName; | ||
41 | + } | ||
42 | + | ||
43 | + /** | ||
44 | + * Returns the table column name for QueueColumn. | ||
45 | + * @return the table column name | ||
46 | + */ | ||
47 | + public String columnName() { | ||
48 | + return columnName; | ||
49 | + } | ||
50 | + } | ||
51 | + | ||
52 | + /** | ||
53 | + * Constructs a Queue object. Generate Queue Table Description. | ||
54 | + * @param dbSchema DatabaseSchema | ||
55 | + * @param row Row | ||
56 | + */ | ||
57 | + public Queue(DatabaseSchema dbSchema, Row row) { | ||
58 | + super(dbSchema, row, OvsdbTable.QUEUE, VersionNum.VERSION100); | ||
59 | + } | ||
60 | + | ||
61 | + /** | ||
62 | + * Get the Column entity which column name is "dscp" from the Row entity of | ||
63 | + * attributes. | ||
64 | + * @return the Column entity | ||
65 | + */ | ||
66 | + public Column getDscpColumn() { | ||
67 | + ColumnDescription columndesc = new ColumnDescription(QueueColumn.DSCP.columnName(), "getDscpColumn", | ||
68 | + VersionNum.VERSION100); | ||
69 | + return (Column) super.getColumnHandler(columndesc); | ||
70 | + } | ||
71 | + | ||
72 | + /** | ||
73 | + * Add a Column entity which column name is "dscp" to the Row entity of | ||
74 | + * attributes. | ||
75 | + * @param dscp the column data which column name is "dscp" | ||
76 | + */ | ||
77 | + public void setDscp(Set<Long> dscp) { | ||
78 | + ColumnDescription columndesc = new ColumnDescription(QueueColumn.DSCP.columnName(), "setDscp", | ||
79 | + VersionNum.VERSION100); | ||
80 | + super.setDataHandler(columndesc, dscp); | ||
81 | + } | ||
82 | + | ||
83 | + /** | ||
84 | + * Get the Column entity which column name is "other_config" from the Row | ||
85 | + * entity of attributes. | ||
86 | + * @return the Column entity | ||
87 | + */ | ||
88 | + public Column getOtherConfigColumn() { | ||
89 | + ColumnDescription columndesc = new ColumnDescription(QueueColumn.OTHERCONFIG.columnName(), | ||
90 | + "getOtherConfigColumn", VersionNum.VERSION100); | ||
91 | + return (Column) super.getColumnHandler(columndesc); | ||
92 | + } | ||
93 | + | ||
94 | + /** | ||
95 | + * Add a Column entity which column name is "other_config" to the Row entity | ||
96 | + * of attributes. | ||
97 | + * @param otherConfig the column data which column name is "other_config" | ||
98 | + */ | ||
99 | + public void setOtherConfig(Map<String, String> otherConfig) { | ||
100 | + ColumnDescription columndesc = new ColumnDescription(QueueColumn.OTHERCONFIG.columnName(), | ||
101 | + "setOtherConfig", VersionNum.VERSION100); | ||
102 | + super.setDataHandler(columndesc, otherConfig); | ||
103 | + } | ||
104 | + | ||
105 | + /** | ||
106 | + * Get the Column entity which column name is "external_ids" from the Row | ||
107 | + * entity of attributes. | ||
108 | + * @return the Column entity | ||
109 | + */ | ||
110 | + public Column getExternalIdsColumn() { | ||
111 | + ColumnDescription columndesc = new ColumnDescription(QueueColumn.EXTERNALIDS.columnName(), | ||
112 | + "getExternalIdsColumn", VersionNum.VERSION100); | ||
113 | + return (Column) super.getColumnHandler(columndesc); | ||
114 | + } | ||
115 | + | ||
116 | + /** | ||
117 | + * Add a Column entity which column name is "external_ids" to the Row entity | ||
118 | + * of attributes. | ||
119 | + * @param externalIds the column data which column name is "external_ids" | ||
120 | + */ | ||
121 | + public void setExternalIds(Map<String, String> externalIds) { | ||
122 | + ColumnDescription columndesc = new ColumnDescription(QueueColumn.EXTERNALIDS.columnName(), | ||
123 | + "setExternalIds", VersionNum.VERSION100); | ||
124 | + super.setDataHandler(columndesc, externalIds); | ||
125 | + } | ||
126 | +} |
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 Sflow Table. | ||
29 | + */ | ||
30 | +public class Sflow extends AbstractOvsdbTableService { | ||
31 | + /** | ||
32 | + * Sflow table column name. | ||
33 | + */ | ||
34 | + public enum SflowColumn { | ||
35 | + TARGETS("targets"), AGENT("agent"), EXTERNALIDS("external_ids"), HAEDER("header"), | ||
36 | + POLLING("polling"), SAMPLING("sampling"); | ||
37 | + | ||
38 | + private final String columnName; | ||
39 | + | ||
40 | + private SflowColumn(String columnName) { | ||
41 | + this.columnName = columnName; | ||
42 | + } | ||
43 | + | ||
44 | + /** | ||
45 | + * Returns the table column name for SflowColumn. | ||
46 | + * @return the table column name | ||
47 | + */ | ||
48 | + public String columnName() { | ||
49 | + return columnName; | ||
50 | + } | ||
51 | + } | ||
52 | + | ||
53 | + /** | ||
54 | + * Constructs a Sflow object. Generate Sflow Table Description. | ||
55 | + * @param dbSchema DatabaseSchema | ||
56 | + * @param row Row | ||
57 | + */ | ||
58 | + public Sflow(DatabaseSchema dbSchema, Row row) { | ||
59 | + super(dbSchema, row, OvsdbTable.SFLOW, VersionNum.VERSION100); | ||
60 | + } | ||
61 | + | ||
62 | + /** | ||
63 | + * Get the Column entity which column name is "targets" from the Row entity | ||
64 | + * of attributes. | ||
65 | + * @return the Column entity | ||
66 | + */ | ||
67 | + public Column getTargetsColumn() { | ||
68 | + ColumnDescription columndesc = new ColumnDescription(SflowColumn.TARGETS.columnName(), | ||
69 | + "getTargetsColumn", VersionNum.VERSION100); | ||
70 | + return (Column) super.getColumnHandler(columndesc); | ||
71 | + } | ||
72 | + | ||
73 | + /** | ||
74 | + * Add a Column entity which column name is "targets" to the Row entity of | ||
75 | + * attributes. | ||
76 | + * @param targets the column data which column name is "targets" | ||
77 | + */ | ||
78 | + public void setTargets(Set<String> targets) { | ||
79 | + ColumnDescription columndesc = new ColumnDescription(SflowColumn.TARGETS.columnName(), "setTargets", | ||
80 | + VersionNum.VERSION100); | ||
81 | + super.setDataHandler(columndesc, targets); | ||
82 | + } | ||
83 | + | ||
84 | + /** | ||
85 | + * Get the Column entity which column name is "agent" from the Row entity of | ||
86 | + * attributes. | ||
87 | + * @return the Column entity | ||
88 | + */ | ||
89 | + public Column getAgentColumn() { | ||
90 | + ColumnDescription columndesc = new ColumnDescription(SflowColumn.AGENT.columnName(), | ||
91 | + "getAgentColumn", VersionNum.VERSION100); | ||
92 | + return (Column) super.getColumnHandler(columndesc); | ||
93 | + } | ||
94 | + | ||
95 | + /** | ||
96 | + * Add a Column entity which column name is "agent" to the Row entity of | ||
97 | + * attributes. | ||
98 | + * @param agent the column data which column name is "agent" | ||
99 | + */ | ||
100 | + public void setAgent(Set<String> agent) { | ||
101 | + ColumnDescription columndesc = new ColumnDescription(SflowColumn.AGENT.columnName(), "setAgent", | ||
102 | + VersionNum.VERSION100); | ||
103 | + super.setDataHandler(columndesc, agent); | ||
104 | + } | ||
105 | + | ||
106 | + /** | ||
107 | + * Get the Column entity which column name is "external_ids" from the Row | ||
108 | + * entity of attributes. | ||
109 | + * @return the Column entity | ||
110 | + */ | ||
111 | + public Column getExternalIdsColumn() { | ||
112 | + ColumnDescription columndesc = new ColumnDescription(SflowColumn.EXTERNALIDS.columnName(), | ||
113 | + "getExternalIdsColumn", VersionNum.VERSION100); | ||
114 | + return (Column) super.getColumnHandler(columndesc); | ||
115 | + } | ||
116 | + | ||
117 | + /** | ||
118 | + * Add a Column entity which column name is "external_ids" to the Row entity | ||
119 | + * of attributes. | ||
120 | + * @param externalIds the column data which column name is "external_ids" | ||
121 | + */ | ||
122 | + public void setExternalIds(Map<String, String> externalIds) { | ||
123 | + ColumnDescription columndesc = new ColumnDescription(SflowColumn.EXTERNALIDS.columnName(), | ||
124 | + "setExternalIds", VersionNum.VERSION100); | ||
125 | + super.setDataHandler(columndesc, externalIds); | ||
126 | + } | ||
127 | + | ||
128 | + /** | ||
129 | + * Get the Column entity which column name is "header" from the Row entity | ||
130 | + * of attributes. | ||
131 | + * @return the Column entity | ||
132 | + */ | ||
133 | + public Column getHeaderColumn() { | ||
134 | + ColumnDescription columndesc = new ColumnDescription(SflowColumn.HAEDER.columnName(), | ||
135 | + "getHeaderColumn", VersionNum.VERSION100); | ||
136 | + return (Column) super.getColumnHandler(columndesc); | ||
137 | + } | ||
138 | + | ||
139 | + /** | ||
140 | + * Add a Column entity which column name is "header" to the Row entity of | ||
141 | + * attributes. | ||
142 | + * @param header the column data which column name is "header" | ||
143 | + */ | ||
144 | + public void setHeader(Set<Long> header) { | ||
145 | + ColumnDescription columndesc = new ColumnDescription(SflowColumn.HAEDER.columnName(), "setHeader", | ||
146 | + VersionNum.VERSION100); | ||
147 | + super.setDataHandler(columndesc, header); | ||
148 | + } | ||
149 | + | ||
150 | + /** | ||
151 | + * Get the Column entity which column name is "polling" from the Row entity | ||
152 | + * of attributes. | ||
153 | + * @return the Column entity | ||
154 | + */ | ||
155 | + public Column getPollingColumn() { | ||
156 | + ColumnDescription columndesc = new ColumnDescription(SflowColumn.POLLING.columnName(), | ||
157 | + "getPollingColumn", VersionNum.VERSION100); | ||
158 | + return (Column) super.getColumnHandler(columndesc); | ||
159 | + } | ||
160 | + | ||
161 | + /** | ||
162 | + * Add a Column entity which column name is "polling" to the Row entity of | ||
163 | + * attributes. | ||
164 | + * @param polling the column data which column name is "polling" | ||
165 | + */ | ||
166 | + public void setPolling(Set<Long> polling) { | ||
167 | + ColumnDescription columndesc = new ColumnDescription(SflowColumn.POLLING.columnName(), "setPolling", | ||
168 | + VersionNum.VERSION100); | ||
169 | + super.setDataHandler(columndesc, polling); | ||
170 | + } | ||
171 | + | ||
172 | + /** | ||
173 | + * Get the Column entity which column name is "sampling" from the Row entity | ||
174 | + * of attributes. | ||
175 | + * @return the Column entity | ||
176 | + */ | ||
177 | + public Column getSamplingColumn() { | ||
178 | + ColumnDescription columndesc = new ColumnDescription(SflowColumn.SAMPLING.columnName(), | ||
179 | + "getSamplingColumn", VersionNum.VERSION100); | ||
180 | + return (Column) super.getColumnHandler(columndesc); | ||
181 | + } | ||
182 | + | ||
183 | + /** | ||
184 | + * Add a Column entity which column name is "sampling" to the Row entity of | ||
185 | + * attributes. | ||
186 | + * @param sampling the column data which column name is "sampling" | ||
187 | + */ | ||
188 | + public void setSampling(Set<Long> sampling) { | ||
189 | + ColumnDescription columndesc = new ColumnDescription(SflowColumn.SAMPLING.columnName(), | ||
190 | + "setSampling", VersionNum.VERSION100); | ||
191 | + super.setDataHandler(columndesc, sampling); | ||
192 | + } | ||
193 | +} |
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.schema.DatabaseSchema; | ||
23 | +import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService; | ||
24 | +import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription; | ||
25 | + | ||
26 | +/** | ||
27 | + * This class provides operations of Ssl Table. | ||
28 | + */ | ||
29 | +public class Ssl extends AbstractOvsdbTableService { | ||
30 | + /** | ||
31 | + * Ssl table column name. | ||
32 | + */ | ||
33 | + public enum SslColumn { | ||
34 | + CACERT("ca_cert"), EXTERNALIDS("external_ids"), BOOTSTRAPCACERT("bootstrap_ca_cert"), | ||
35 | + CERTIFICATE("certificate"), PRIVATEKEY("private_key"); | ||
36 | + | ||
37 | + private final String columnName; | ||
38 | + | ||
39 | + private SslColumn(String columnName) { | ||
40 | + this.columnName = columnName; | ||
41 | + } | ||
42 | + | ||
43 | + /** | ||
44 | + * Returns the table column name for SslColumn. | ||
45 | + * @return the table column name | ||
46 | + */ | ||
47 | + public String columnName() { | ||
48 | + return columnName; | ||
49 | + } | ||
50 | + } | ||
51 | + | ||
52 | + /** | ||
53 | + * Constructs a Ssl object. Generate Ssl Table Description. | ||
54 | + * @param dbSchema DatabaseSchema | ||
55 | + * @param row Row | ||
56 | + */ | ||
57 | + public Ssl(DatabaseSchema dbSchema, Row row) { | ||
58 | + super(dbSchema, row, OvsdbTable.SSL, VersionNum.VERSION100); | ||
59 | + } | ||
60 | + | ||
61 | + /** | ||
62 | + * Get the Column entity which column name is "ca_cert" from the Row entity | ||
63 | + * of attributes. | ||
64 | + * @return the Column entity | ||
65 | + */ | ||
66 | + public Column getCaCertColumn() { | ||
67 | + ColumnDescription columndesc = new ColumnDescription(SslColumn.CACERT.columnName(), | ||
68 | + "getCaCertColumn", VersionNum.VERSION100); | ||
69 | + return (Column) super.getColumnHandler(columndesc); | ||
70 | + } | ||
71 | + | ||
72 | + /** | ||
73 | + * Add a Column entity which column name is "ca_cert" to the Row entity of | ||
74 | + * attributes. | ||
75 | + * @param caCert the column data which column name is "ca_cert" | ||
76 | + */ | ||
77 | + public void setCaCert(String caCert) { | ||
78 | + ColumnDescription columndesc = new ColumnDescription(SslColumn.CACERT.columnName(), "setCaCert", | ||
79 | + VersionNum.VERSION100); | ||
80 | + super.setDataHandler(columndesc, caCert); | ||
81 | + } | ||
82 | + | ||
83 | + /** | ||
84 | + * Get the Column entity which column name is "external_ids" from the Row | ||
85 | + * entity of attributes. | ||
86 | + * @return the Column entity | ||
87 | + */ | ||
88 | + public Column getExternalIdsColumn() { | ||
89 | + ColumnDescription columndesc = new ColumnDescription(SslColumn.EXTERNALIDS.columnName(), | ||
90 | + "getExternalIdsColumn", VersionNum.VERSION100); | ||
91 | + return (Column) super.getColumnHandler(columndesc); | ||
92 | + } | ||
93 | + | ||
94 | + /** | ||
95 | + * Add a Column entity which column name is "external_ids" to the Row entity | ||
96 | + * of attributes. | ||
97 | + * @param externalIds the column data which column name is "external_ids" | ||
98 | + */ | ||
99 | + public void setExternalIds(Map<String, String> externalIds) { | ||
100 | + ColumnDescription columndesc = new ColumnDescription(SslColumn.EXTERNALIDS.columnName(), | ||
101 | + "setExternalIds", VersionNum.VERSION100); | ||
102 | + super.setDataHandler(columndesc, externalIds); | ||
103 | + } | ||
104 | + | ||
105 | + /** | ||
106 | + * Get the Column entity which column name is "bootstrap_ca_cert" from the | ||
107 | + * Row entity of attributes. | ||
108 | + * @return the Column entity | ||
109 | + */ | ||
110 | + public Column getBootstrapCaCertColumn() { | ||
111 | + ColumnDescription columndesc = new ColumnDescription(SslColumn.BOOTSTRAPCACERT.columnName(), | ||
112 | + "getBootstrapCaCertColumn", | ||
113 | + VersionNum.VERSION100); | ||
114 | + return (Column) super.getColumnHandler(columndesc); | ||
115 | + } | ||
116 | + | ||
117 | + /** | ||
118 | + * Add a Column entity which column name is "bootstrap_ca_cert" to the Row | ||
119 | + * entity of attributes. | ||
120 | + * @param bootstrapCaCert the column data which column name is | ||
121 | + * "bootstrap_ca_cert" | ||
122 | + */ | ||
123 | + public void setBootstrapCaCert(Boolean bootstrapCaCert) { | ||
124 | + ColumnDescription columndesc = new ColumnDescription(SslColumn.BOOTSTRAPCACERT.columnName(), | ||
125 | + "setBootstrapCaCert", VersionNum.VERSION100); | ||
126 | + super.setDataHandler(columndesc, bootstrapCaCert); | ||
127 | + } | ||
128 | + | ||
129 | + /** | ||
130 | + * Get the Column entity which column name is "certificate" from the Row | ||
131 | + * entity of attributes. | ||
132 | + * @return the Column entity | ||
133 | + */ | ||
134 | + public Column getCertificateColumn() { | ||
135 | + ColumnDescription columndesc = new ColumnDescription(SslColumn.CERTIFICATE.columnName(), | ||
136 | + "getCertificateColumn", VersionNum.VERSION100); | ||
137 | + return (Column) super.getColumnHandler(columndesc); | ||
138 | + } | ||
139 | + | ||
140 | + /** | ||
141 | + * Add a Column entity which column name is "certificate" to the Row entity | ||
142 | + * of attributes. | ||
143 | + * @param certificate the column data which column name is "certificate" | ||
144 | + */ | ||
145 | + public void setCertificate(String certificate) { | ||
146 | + ColumnDescription columndesc = new ColumnDescription(SslColumn.CERTIFICATE.columnName(), | ||
147 | + "setCertificate", VersionNum.VERSION100); | ||
148 | + super.setDataHandler(columndesc, certificate); | ||
149 | + } | ||
150 | + | ||
151 | + /** | ||
152 | + * Get the Column entity which column name is "private_key" from the Row | ||
153 | + * entity of attributes. | ||
154 | + * @return the Column entity | ||
155 | + */ | ||
156 | + public Column getPrivateKeyColumn() { | ||
157 | + ColumnDescription columndesc = new ColumnDescription(SslColumn.PRIVATEKEY.columnName(), | ||
158 | + "getPrivateKeyColumn", VersionNum.VERSION100); | ||
159 | + return (Column) super.getColumnHandler(columndesc); | ||
160 | + } | ||
161 | + | ||
162 | + /** | ||
163 | + * Add a Column entity which column name is "private_key" to the Row entity | ||
164 | + * of attributes. | ||
165 | + * @param privatekey the column data which column name is "private_key" | ||
166 | + */ | ||
167 | + public void setPrivateKey(String privatekey) { | ||
168 | + ColumnDescription columndesc = new ColumnDescription(SslColumn.PRIVATEKEY.columnName(), | ||
169 | + "setPrivateKey", VersionNum.VERSION100); | ||
170 | + super.setDataHandler(columndesc, privatekey); | ||
171 | + } | ||
172 | +} |
-
Please register or login to post a comment