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