Sho SHIMIZU | b2b2d98 | 2015-09-11 15:35:06 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 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 | package org.onosproject.vtnrsc; |
| 17 | |
| 18 | /** |
| 19 | * Representation of the tenantNetwork. |
| 20 | */ |
| 21 | public interface TenantNetwork { |
| 22 | |
| 23 | /** |
| 24 | * Coarse classification of the state of the tenantNetwork. |
| 25 | */ |
Sho SHIMIZU | e2952e4 | 2015-09-11 17:11:21 -0700 | [diff] [blame] | 26 | enum State { |
Sho SHIMIZU | b2b2d98 | 2015-09-11 15:35:06 -0700 | [diff] [blame] | 27 | /** |
| 28 | * Signifies that a tenantNetwork is currently active.This state means |
| 29 | * that this network is available. |
| 30 | */ |
| 31 | ACTIVE, |
| 32 | /** |
| 33 | * Signifies that a tenantNetwork is currently built. |
| 34 | */ |
| 35 | BUILD, |
| 36 | /** |
| 37 | * Signifies that a tenantNetwork is currently unavailable. |
| 38 | */ |
| 39 | DOWN, |
| 40 | /** |
| 41 | * Signifies that a tenantNetwork is currently error. |
| 42 | */ |
| 43 | ERROR |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * Coarse classification of the type of the tenantNetwork. |
| 48 | */ |
Sho SHIMIZU | e2952e4 | 2015-09-11 17:11:21 -0700 | [diff] [blame] | 49 | enum Type { |
Sho SHIMIZU | b2b2d98 | 2015-09-11 15:35:06 -0700 | [diff] [blame] | 50 | /** |
| 51 | * Signifies that a tenantNetwork is local. |
| 52 | */ |
| 53 | LOCAL |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * Returns the tenantNetwork identifier. |
| 58 | * |
| 59 | * @return tenantNetwork identifier |
| 60 | */ |
| 61 | TenantNetworkId id(); |
| 62 | |
| 63 | /** |
| 64 | * Returns the tenantNetwork name. |
| 65 | * |
| 66 | * @return tenantNetwork name |
| 67 | */ |
| 68 | String name(); |
| 69 | |
| 70 | /** |
| 71 | * Returns the administrative state of the tenantNetwork,which is up(true) |
| 72 | * or down(false). |
| 73 | * |
| 74 | * @return true or false |
| 75 | */ |
| 76 | boolean adminStateUp(); |
| 77 | |
| 78 | /** |
| 79 | * Returns the tenantNetwork state. |
| 80 | * |
| 81 | * @return tenant network state |
| 82 | */ |
| 83 | State state(); |
| 84 | |
| 85 | /** |
| 86 | * Indicates whether this tenantNetwork is shared across all tenants. By |
| 87 | * default,only administrative user can change this value. |
| 88 | * |
| 89 | * @return true or false |
| 90 | */ |
| 91 | boolean shared(); |
| 92 | |
| 93 | /** |
| 94 | * Returns the UUID of the tenant that will own the tenantNetwork. This |
| 95 | * tenant can be different from the tenant that makes the create |
| 96 | * tenantNetwork request. |
| 97 | * |
| 98 | * @return the tenant identifier |
| 99 | */ |
| 100 | TenantId tenantId(); |
| 101 | |
| 102 | /** |
| 103 | * Returns the routerExternal.Indicates whether this network is externally |
| 104 | * accessible. |
| 105 | * |
| 106 | * @return true or false |
| 107 | */ |
| 108 | boolean routerExternal(); |
| 109 | |
| 110 | /** |
| 111 | * Returns the tenantNetwork Type. |
| 112 | * |
| 113 | * @return tenantNetwork Type |
| 114 | */ |
| 115 | Type type(); |
| 116 | |
| 117 | /** |
| 118 | * Returns the tenantNetwork physical network. |
| 119 | * |
| 120 | * @return tenantNetwork physical network |
| 121 | */ |
| 122 | PhysicalNetwork physicalNetwork(); |
| 123 | |
| 124 | /** |
| 125 | * Returns the tenantNetwork segmentation id. |
| 126 | * |
| 127 | * @return tenantNetwork segmentation id |
| 128 | */ |
| 129 | SegmentationId segmentationId(); |
| 130 | } |