blob: 38ccbf63906c6cf8295c65bf5fc2f4b894c130a7 [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
22import org.onosproject.netconf.NetconfException;
23import org.onosproject.netconf.NetconfSession;
24import org.onosproject.netconf.TargetConfig;
25import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.uni.evc.service.rev20160317.MseaUniEvcService;
26import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.uni.evc.service.rev20160317.MseaUniEvcServiceOpParam;
27import org.onosproject.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.uni.evc.service.rev20160317.mseaunievcservice.mefservices.uni.UniSideInterfaceAssignmentEnum;
28
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(
58 MseaUniEvcServiceOpParam mseaUniEvcService, NetconfSession session, TargetConfig targetDs)
59 throws NetconfException;
60
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
67 * @throws NetconfException if the session has any error
68 */
69 void setMseaUniEvcService(MseaUniEvcServiceOpParam mseaUniEvcService,
70 NetconfSession session, TargetConfig targetDs)
71 throws NetconfException;
72
73 /**
74 * Returns a list of the CeVlanMaps on both sides of the EVC.
75 *
76 * @param session A NETCONF Session
77 * @param ncDs The datastore to affect - running, candidate or startup
78 * @return The Object Model with the VLans
79 * @throws NetconfException if the session has any error
80 */
81 MseaUniEvcService getmseaUniEvcCeVlanMaps(
82 NetconfSession session, TargetConfig ncDs)
83 throws NetconfException;
84
85 /**
86 * Replace ceVlans or delete EVCs from a device.
87 *
88 * It is necessary to have a custom command for this as the YCH cannot
89 * handle the intricacies of putting a replace operation on the
90 * ceVlanMap leaf at present
91 *
92 * @param ceVlanUpdates A Map of CeVlanMap entries to change, as flows are deleted
93 * @param flowVlanIds The IDs of flows that are being removed
94 * @param session A NETCONF Session
95 * @param targetDs The datastore to affect - running, candidate or startup
96 * @param portAssign The port assignment of the device
97 * @throws NetconfException if the session has any error
98 */
99 void removeEvcUniFlowEntries(
100 Map<Integer, String> ceVlanUpdates,
101 Map<Integer, List<Short>> flowVlanIds,
102 NetconfSession session,
103 TargetConfig targetDs,
104 UniSideInterfaceAssignmentEnum portAssign)
105 throws NetconfException;
106
107}