blob: 94b166fffb94bf05d4febc221a6e7cfccc4a3e54 [file] [log] [blame]
Sho SHIMIZUb2b2d982015-09-11 15:35:06 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
Sho SHIMIZUb2b2d982015-09-11 15:35:06 -07003 *
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 */
16package org.onosproject.vtnrsc;
17
18import java.util.Collection;
19import java.util.Set;
20
21import org.onlab.packet.MacAddress;
22import org.onosproject.net.DeviceId;
23
24/**
25 * Representation of the VirtualPort.
26 */
27public interface VirtualPort {
28 /**
29 * Coarse classification of the type of the virtual port.
30 */
Sho SHIMIZUe2952e42015-09-11 17:11:21 -070031 enum State {
Sho SHIMIZUb2b2d982015-09-11 15:35:06 -070032 /**
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 */
Jon Hall8c7b06a2017-02-22 13:37:33 -080040 DOWN
Sho SHIMIZUb2b2d982015-09-11 15:35:06 -070041 }
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}