janani b | f41dec3 | 2017-03-24 18:44:07 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2017-present Open Networking Foundation |
janani b | f41dec3 | 2017-03-24 18:44:07 +0530 | [diff] [blame] | 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 | /** |
| 20 | * Representation of the hub and spoke VPN configuration containing import and |
| 21 | * export RTs. |
| 22 | */ |
| 23 | public class HubSpokeVpnConfig extends VpnConfig { |
| 24 | |
| 25 | /** |
| 26 | * Hub import RT value. |
| 27 | */ |
| 28 | private String hubImpRt; |
| 29 | |
| 30 | /** |
| 31 | * Hub export RT value. |
| 32 | */ |
| 33 | private String hubExpRt; |
| 34 | |
| 35 | /** |
| 36 | * Spoke import RT value. |
| 37 | */ |
| 38 | private String spokeImpRt; |
| 39 | |
| 40 | /** |
| 41 | * Spoke export RT value. |
| 42 | */ |
| 43 | private String spokeExpRt; |
| 44 | |
| 45 | /** |
| 46 | * Creates hub and spoke VPN config. |
| 47 | */ |
| 48 | public HubSpokeVpnConfig() { |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * Returns hub import RT value. |
| 53 | * |
| 54 | * @return RT value |
| 55 | */ |
janani b | 35f6cbc | 2017-03-24 21:56:58 +0530 | [diff] [blame] | 56 | public String hubImpRt() { |
janani b | f41dec3 | 2017-03-24 18:44:07 +0530 | [diff] [blame] | 57 | return hubImpRt; |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * Sets hub import RT value. |
| 62 | * |
| 63 | * @param hubImpRt RT value |
| 64 | */ |
janani b | 35f6cbc | 2017-03-24 21:56:58 +0530 | [diff] [blame] | 65 | public void hubImpRt(String hubImpRt) { |
janani b | f41dec3 | 2017-03-24 18:44:07 +0530 | [diff] [blame] | 66 | this.hubImpRt = hubImpRt; |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * Returns hub export RT value. |
| 71 | * |
| 72 | * @return RT value |
| 73 | */ |
janani b | 35f6cbc | 2017-03-24 21:56:58 +0530 | [diff] [blame] | 74 | public String hubExpRt() { |
janani b | f41dec3 | 2017-03-24 18:44:07 +0530 | [diff] [blame] | 75 | return hubExpRt; |
| 76 | } |
| 77 | |
| 78 | /** |
| 79 | * Sets hub export RT value. |
| 80 | * |
| 81 | * @param hubExpRt RT value |
| 82 | */ |
janani b | 35f6cbc | 2017-03-24 21:56:58 +0530 | [diff] [blame] | 83 | public void hubExpRt(String hubExpRt) { |
janani b | f41dec3 | 2017-03-24 18:44:07 +0530 | [diff] [blame] | 84 | this.hubExpRt = hubExpRt; |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * Returns spoke import RT value. |
| 89 | * |
| 90 | * @return RT value |
| 91 | */ |
janani b | 35f6cbc | 2017-03-24 21:56:58 +0530 | [diff] [blame] | 92 | public String spokeImpRt() { |
janani b | f41dec3 | 2017-03-24 18:44:07 +0530 | [diff] [blame] | 93 | return spokeImpRt; |
| 94 | } |
| 95 | |
| 96 | /** |
| 97 | * Sets spoke import RT value. |
| 98 | * |
| 99 | * @param spokeImpRt RT value |
| 100 | */ |
janani b | 35f6cbc | 2017-03-24 21:56:58 +0530 | [diff] [blame] | 101 | public void spokeImpRt(String spokeImpRt) { |
janani b | f41dec3 | 2017-03-24 18:44:07 +0530 | [diff] [blame] | 102 | this.spokeImpRt = spokeImpRt; |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * Returns spoke export RT value. |
| 107 | * |
| 108 | * @return RT value |
| 109 | */ |
janani b | 35f6cbc | 2017-03-24 21:56:58 +0530 | [diff] [blame] | 110 | public String spokeExpRt() { |
janani b | f41dec3 | 2017-03-24 18:44:07 +0530 | [diff] [blame] | 111 | return spokeExpRt; |
| 112 | } |
| 113 | |
| 114 | /** |
| 115 | * Sets spoke export RT value. |
| 116 | * |
| 117 | * @param spokeExpRt RT value |
| 118 | */ |
janani b | 35f6cbc | 2017-03-24 21:56:58 +0530 | [diff] [blame] | 119 | public void spokeExpRt(String spokeExpRt) { |
janani b | f41dec3 | 2017-03-24 18:44:07 +0530 | [diff] [blame] | 120 | this.spokeExpRt = spokeExpRt; |
| 121 | } |
| 122 | } |