Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package org.onosproject.drivers.microsemi.yang; |
| 18 | |
| 19 | import java.util.List; |
| 20 | import java.util.Map; |
| 21 | |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame^] | 22 | import org.onosproject.netconf.DatastoreId; |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 23 | import org.onosproject.netconf.NetconfException; |
| 24 | import org.onosproject.netconf.NetconfSession; |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame^] | 25 | import org.onosproject.yang.gen.v1.mseaunievcservice.rev20160317.MseaUniEvcService; |
| 26 | import org.onosproject.yang.gen.v1.mseaunievcservice.rev20160317.MseaUniEvcServiceOpParam; |
| 27 | import org.onosproject.yang.gen.v1.mseaunievcservice.rev20160317.mseaunievcservice.mefservices.uni.UniSideInterfaceAssignmentEnum; |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 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 | */ |
| 35 | public 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 Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame^] | 58 | MseaUniEvcServiceOpParam mseaUniEvcService, NetconfSession session, |
| 59 | DatastoreId targetDs) throws NetconfException; |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 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 |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame^] | 67 | * @return Boolean to indicate success or failure |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 68 | * @throws NetconfException if the session has any error |
| 69 | */ |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame^] | 70 | boolean setMseaUniEvcService(MseaUniEvcServiceOpParam mseaUniEvcService, |
| 71 | NetconfSession session, DatastoreId targetDs) |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 72 | throws NetconfException; |
| 73 | |
| 74 | /** |
Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame^] | 75 | * 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 Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 87 | * 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 Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame^] | 95 | NetconfSession session, DatastoreId ncDs) |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 96 | 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 Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame^] | 116 | DatastoreId targetDs, |
Sean Condon | fae8e66 | 2016-12-15 10:25:13 +0000 | [diff] [blame] | 117 | UniSideInterfaceAssignmentEnum portAssign) |
| 118 | throws NetconfException; |
| 119 | |
| 120 | } |