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 | import java.util.Collection; |
| 19 | import java.util.Set; |
| 20 | |
| 21 | import org.onlab.packet.MacAddress; |
| 22 | import org.onosproject.net.DeviceId; |
| 23 | |
| 24 | /** |
| 25 | * Representation of the VirtualPort. |
| 26 | */ |
| 27 | public interface VirtualPort { |
| 28 | /** |
| 29 | * Coarse classification of the type of the virtual port. |
| 30 | */ |
Sho SHIMIZU | e2952e4 | 2015-09-11 17:11:21 -0700 | [diff] [blame] | 31 | enum State { |
Sho SHIMIZU | b2b2d98 | 2015-09-11 15:35:06 -0700 | [diff] [blame] | 32 | /** |
| 33 | * Signifies that a virtualPort is currently active,This state mean that |
| 34 | * this virtualPort is available. |
| 35 | */ |
| 36 | ACTIVE, |
| 37 | /** |
| 38 | * Signifies that a virtualPort is currently unavailable. |
| 39 | */ |
Sho SHIMIZU | e2952e4 | 2015-09-11 17:11:21 -0700 | [diff] [blame] | 40 | DOWN; |
Sho SHIMIZU | b2b2d98 | 2015-09-11 15:35:06 -0700 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | /** |
| 44 | * Returns the virtualPort identifier. |
| 45 | * |
| 46 | * @return virtualPort identifier |
| 47 | */ |
| 48 | VirtualPortId portId(); |
| 49 | |
| 50 | /** |
| 51 | * Returns the network identifier. |
| 52 | * |
| 53 | * @return tenantNetwork identifier |
| 54 | */ |
| 55 | TenantNetworkId networkId(); |
| 56 | |
| 57 | /** |
| 58 | * Returns the symbolic name for the virtualPort. |
| 59 | * |
| 60 | * @return virtualPort name |
| 61 | */ |
| 62 | String name(); |
| 63 | |
| 64 | /** |
| 65 | * Returns the administrative status of the port,which is up(true) or |
| 66 | * down(false). |
| 67 | * |
| 68 | * @return true if the administrative status of the port is up |
| 69 | */ |
| 70 | boolean adminStateUp(); |
| 71 | |
| 72 | /** |
| 73 | * Returns the state. |
| 74 | * |
| 75 | * @return state |
| 76 | */ |
| 77 | State state(); |
| 78 | |
| 79 | /** |
| 80 | * Returns the MAC address. |
| 81 | * |
| 82 | * @return MAC Address |
| 83 | */ |
| 84 | MacAddress macAddress(); |
| 85 | |
| 86 | /** |
| 87 | * Returns the port tenantId. |
| 88 | * |
| 89 | * @return port tenantId |
| 90 | */ |
| 91 | TenantId tenantId(); |
| 92 | |
| 93 | /** |
| 94 | * Returns the device identifier. |
| 95 | * |
| 96 | * @return deviceId |
| 97 | */ |
| 98 | DeviceId deviceId(); |
| 99 | |
| 100 | /** |
| 101 | * Returns the identifier of the entity that uses this port. |
| 102 | * |
| 103 | * @return deviceOwner |
| 104 | */ |
| 105 | String deviceOwner(); |
| 106 | |
| 107 | /** |
| 108 | * Returns the virtualPort allowedAddressPairs. |
| 109 | * |
| 110 | * @return virtualPort allowedAddressPairs |
| 111 | */ |
| 112 | Collection<AllowedAddressPair> allowedAddressPairs(); |
| 113 | |
| 114 | /** |
| 115 | * Returns set of IP addresses for the port, include the IP addresses and subnet |
| 116 | * identity. |
| 117 | * |
| 118 | * @return FixedIps Set of fixedIp |
| 119 | */ |
| 120 | Set<FixedIp> fixedIps(); |
| 121 | |
| 122 | /** |
| 123 | * Returns the virtualPort bindinghostId. |
| 124 | * |
| 125 | * @return virtualPort bindinghostId |
| 126 | */ |
| 127 | BindingHostId bindingHostId(); |
| 128 | |
| 129 | /** |
| 130 | * Returns the virtualPort bindingVnicType. |
| 131 | * |
| 132 | * @return virtualPort bindingVnicType |
| 133 | */ |
| 134 | String bindingVnicType(); |
| 135 | |
| 136 | /** |
| 137 | * Returns the virtualPort bindingVifType. |
| 138 | * |
| 139 | * @return virtualPort bindingVifType |
| 140 | */ |
| 141 | String bindingVifType(); |
| 142 | |
| 143 | /** |
| 144 | * Returns the virtualPort bindingvifDetail. |
| 145 | * |
| 146 | * @return virtualPort bindingvifDetail |
| 147 | */ |
| 148 | String bindingVifDetails(); |
| 149 | |
| 150 | /** |
| 151 | * Returns the security groups. |
| 152 | * |
| 153 | * @return port security groups |
| 154 | */ |
| 155 | Iterable<SecurityGroup> securityGroups(); |
| 156 | } |