janani b | 9ed76be | 2017-08-29 19:11:33 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017-present Open Networking Foundation |
| 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.l3vpn.netl3vpn; |
| 18 | |
| 19 | import org.onosproject.net.driver.HandlerBehaviour; |
| 20 | import org.onosproject.yang.model.ModelObjectData; |
| 21 | |
| 22 | /** |
| 23 | * Behaviour for handling various drivers for l3vpn configurations. |
| 24 | */ |
| 25 | public interface L3VpnConfig extends HandlerBehaviour { |
| 26 | |
| 27 | /** |
| 28 | * Create virtual routing forwarding instance on requested device with |
| 29 | * given standard device model object data. |
| 30 | * |
| 31 | * @param objectData standard device model object data |
| 32 | * @return device model object data |
| 33 | */ |
| 34 | ModelObjectData createInstance(ModelObjectData objectData); |
| 35 | |
| 36 | /** |
| 37 | * Binds requested virtual routing forwarding instance to interface on the |
| 38 | * requested device with given standard device model object data. |
| 39 | * |
| 40 | * @param objectData standard device model object data |
| 41 | * @return device model object data |
| 42 | */ |
| 43 | ModelObjectData bindInterface(ModelObjectData objectData); |
| 44 | |
| 45 | /** |
| 46 | * Deletes virtual routing forwarding instance on requested device with |
| 47 | * given standard device model object data. |
| 48 | * |
| 49 | * @param objectData standard device model object data |
| 50 | * @return device model object data |
| 51 | */ |
| 52 | ModelObjectData deleteInstance(ModelObjectData objectData); |
| 53 | |
| 54 | /** |
| 55 | * Unbinds requested virtual routing forwarding instance to interface on the |
| 56 | * requested device with given standard device model object data. |
| 57 | * |
| 58 | * @param objectData standard device model object data |
| 59 | * @return device model object data |
| 60 | */ |
| 61 | ModelObjectData unbindInterface(ModelObjectData objectData); |
| 62 | |
| 63 | /** |
| 64 | * Deletes tunnel on requested device with the given tunnel info. |
| 65 | * |
| 66 | * @param tnlInfo tunnel info |
| 67 | * @return device model object data |
| 68 | */ |
| 69 | ModelObjectData deleteTnl(TunnelInfo tnlInfo); |
| 70 | |
| 71 | /** |
| 72 | * Creates BGP routing protocol info on requested device with given |
| 73 | * BGP info object. |
| 74 | * |
| 75 | * @param bgpInfo BGP info object |
| 76 | * @param bgpConfig BGP driver config |
| 77 | * @return device model object data |
| 78 | */ |
| 79 | ModelObjectData createBgpInfo(BgpInfo bgpInfo, BgpDriverInfo bgpConfig); |
| 80 | |
| 81 | /** |
| 82 | * Deletes BGP routing protocol info on requested device with given |
| 83 | * BGP info object. |
| 84 | * |
| 85 | * @param bgpInfo BGP info object |
| 86 | * @param bgpConfig BGP driver config |
| 87 | * @return device model object data |
| 88 | */ |
| 89 | ModelObjectData deleteBgpInfo(BgpInfo bgpInfo, BgpDriverInfo bgpConfig); |
| 90 | |
| 91 | /** |
| 92 | * Creates device and devices level on requested device for tunnel creation. |
| 93 | * |
| 94 | * @param tnlInfo tunnel info |
| 95 | * @return device model object data |
| 96 | */ |
| 97 | ModelObjectData createTnlDev(TunnelInfo tnlInfo); |
| 98 | |
| 99 | /** |
| 100 | * Creates tunnel policy on requested device with given tunnel info. |
| 101 | * |
| 102 | * @param tnlInfo tunnel info |
| 103 | * @return device model object data |
| 104 | */ |
| 105 | ModelObjectData createTnlPol(TunnelInfo tnlInfo); |
| 106 | |
| 107 | /** |
| 108 | * Creates tunnel on requested device with given tunnel info. |
| 109 | * |
| 110 | * @param tnlInfo tunnel info |
| 111 | * @return device model object data |
| 112 | */ |
| 113 | ModelObjectData createTnl(TunnelInfo tnlInfo); |
| 114 | |
| 115 | /** |
| 116 | * Binds requested tunnel policy name to the VPN to the requested device |
| 117 | * with given tunnel info. |
| 118 | * |
| 119 | * @param tnlInfo tunnel info |
| 120 | * @return device model object data |
| 121 | */ |
| 122 | ModelObjectData bindTnl(TunnelInfo tnlInfo); |
| 123 | } |