bobzhou
Committed by Gerrit Code Review

[ONOS-2815] add Router api

Change-Id: I465a8d818fa024ae4e229f5e7245fb77e637a05b
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.List;
19 +
20 +/**
21 + * Representation of a Router.
22 + */
23 +public interface Router {
24 +
25 + /**
26 + * Coarse classification of the type of the Router.
27 + */
28 + public enum Status {
29 + /**
30 + * Signifies that a router is currently active.
31 + */
32 + ACTIVE,
33 + /**
34 + * Signifies that a router is currently inactive.
35 + */
36 + INACTIVE
37 + }
38 +
39 + /**
40 + * Returns the router identifier.
41 + *
42 + * @return identifier
43 + */
44 + RouterId id();
45 +
46 + /**
47 + * Returns the router Name.
48 + *
49 + * @return routerName
50 + */
51 + String name();
52 +
53 + /**
54 + * Returns the router admin state.
55 + *
56 + * @return true or false
57 + */
58 + boolean adminStateUp();
59 +
60 + /**
61 + * Returns the status of router.
62 + *
63 + * @return RouterStatus
64 + */
65 + Status status();
66 +
67 + /**
68 + * Returns the distributed status of this router.
69 + * If true, indicates a distributed router.
70 + *
71 + * @return true or false
72 + */
73 + boolean distributed();
74 +
75 + /**
76 + * Returns the RouterGateway of router.
77 + *
78 + * @return routerGateway
79 + */
80 + RouterGateway externalGatewayInfo();
81 +
82 + /**
83 + * Returns the gatewayPortid of router.
84 + *
85 + * @return virtualPortId
86 + */
87 + VirtualPortId gatewayPortid();
88 +
89 + /**
90 + * Returns the owner(tenant) of this router.
91 + *
92 + * @return tenantId
93 + */
94 + TenantId tenantId();
95 +
96 + /**
97 + * Returns the router list of router.
98 + *
99 + * @return routes
100 + */
101 + List<String> routes();
102 +}