blob: a7f85bf48fbe33448dd18debe1b5c1c4344d9027 [file] [log] [blame]
Sean Condonfae8e662016-12-15 10:25:13 +00001/*
2 * Copyright 2017-present 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
17package org.onosproject.drivers.microsemi.yang;
18
19import java.util.List;
20import java.util.Map;
21
Sean Condon06613e92017-06-09 15:14:01 +010022import org.onosproject.netconf.DatastoreId;
Sean Condonfae8e662016-12-15 10:25:13 +000023import org.onosproject.netconf.NetconfException;
24import org.onosproject.netconf.NetconfSession;
Sean Condon06613e92017-06-09 15:14:01 +010025import org.onosproject.yang.gen.v1.mseaunievcservice.rev20160317.MseaUniEvcService;
26import org.onosproject.yang.gen.v1.mseaunievcservice.rev20160317.MseaUniEvcServiceOpParam;
27import org.onosproject.yang.gen.v1.mseaunievcservice.rev20160317.mseaunievcservice.mefservices.uni.UniSideInterfaceAssignmentEnum;
Sean Condonfae8e662016-12-15 10:25:13 +000028
29/**
30 * Extension of mseaUniEvcServiceService to include NETCONF sessions.
31 *
32 * This is manually extended and should be revised if the msea-uni-evc-service.yang
33 * file changes
34 */
35public interface MseaUniEvcServiceNetconfService {
36 /**
37 * Returns the configuration and state attributes of the running mseaUniEvcService.
38 *
39 * @param mseaUniEvcService value of mseaUniEvcService
40 * @param session The NETCONF session
41 * @return mseaUniEvcService
42 * @throws NetconfException if the session has any error
43 */
44 MseaUniEvcService getMseaUniEvcService(
45 MseaUniEvcServiceOpParam mseaUniEvcService, NetconfSession session)
46 throws NetconfException;
47
48 /**
49 * Returns the configuration only attributes of mseaUniEvcService.
50 *
51 * @param mseaUniEvcService value of mseaUniEvcService
52 * @param session The NETCONF session
53 * @param targetDs one of running, candidate or startup
54 * @return mseaUniEvcService
55 * @throws NetconfException if the session has any error
56 */
57 MseaUniEvcService getConfigMseaUniEvcService(
Sean Condon06613e92017-06-09 15:14:01 +010058 MseaUniEvcServiceOpParam mseaUniEvcService, NetconfSession session,
59 DatastoreId targetDs) throws NetconfException;
Sean Condonfae8e662016-12-15 10:25:13 +000060
61 /**
62 * Sets the value to attribute mseaUniEvcService.
63 *
64 * @param mseaUniEvcService value of mseaUniEvcService
65 * @param session The NETCONF session
66 * @param targetDs one of running, candidate or startup
Sean Condon06613e92017-06-09 15:14:01 +010067 * @return Boolean to indicate success or failure
Sean Condonfae8e662016-12-15 10:25:13 +000068 * @throws NetconfException if the session has any error
69 */
Sean Condon06613e92017-06-09 15:14:01 +010070 boolean setMseaUniEvcService(MseaUniEvcServiceOpParam mseaUniEvcService,
71 NetconfSession session, DatastoreId targetDs)
Sean Condonfae8e662016-12-15 10:25:13 +000072 throws NetconfException;
73
74 /**
Sean Condon06613e92017-06-09 15:14:01 +010075 * Deletes the objects in mseaUniEvcService.
76 *
77 * @param mseaUniEvcService value of mseaUniEvcService
78 * @param session The NETCONF session
79 * @param targetDs one of running, candidate or startup
80 * @return Boolean to indicate success or failure
81 * @throws NetconfException if the session has any error
82 */
83 boolean deleteMseaUniEvcService(MseaUniEvcServiceOpParam mseaUniEvcService,
84 NetconfSession session, DatastoreId targetDs) throws NetconfException;
85
86 /**
Sean Condonfae8e662016-12-15 10:25:13 +000087 * Returns a list of the CeVlanMaps on both sides of the EVC.
88 *
89 * @param session A NETCONF Session
90 * @param ncDs The datastore to affect - running, candidate or startup
91 * @return The Object Model with the VLans
92 * @throws NetconfException if the session has any error
93 */
94 MseaUniEvcService getmseaUniEvcCeVlanMaps(
Sean Condon06613e92017-06-09 15:14:01 +010095 NetconfSession session, DatastoreId ncDs)
Sean Condonfae8e662016-12-15 10:25:13 +000096 throws NetconfException;
97
98 /**
99 * Replace ceVlans or delete EVCs from a device.
100 *
101 * It is necessary to have a custom command for this as the YCH cannot
102 * handle the intricacies of putting a replace operation on the
103 * ceVlanMap leaf at present
104 *
105 * @param ceVlanUpdates A Map of CeVlanMap entries to change, as flows are deleted
106 * @param flowVlanIds The IDs of flows that are being removed
107 * @param session A NETCONF Session
108 * @param targetDs The datastore to affect - running, candidate or startup
109 * @param portAssign The port assignment of the device
110 * @throws NetconfException if the session has any error
111 */
112 void removeEvcUniFlowEntries(
113 Map<Integer, String> ceVlanUpdates,
114 Map<Integer, List<Short>> flowVlanIds,
115 NetconfSession session,
Sean Condon06613e92017-06-09 15:14:01 +0100116 DatastoreId targetDs,
Sean Condonfae8e662016-12-15 10:25:13 +0000117 UniSideInterfaceAssignmentEnum portAssign)
118 throws NetconfException;
119
120}