blob: 74f563fa1270dc4c675721ae546d3a8795ea4184 [file] [log] [blame]
Daniel Park81a61a12016-02-26 08:24:44 +09001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Daniel Park81a61a12016-02-26 08:24:44 +09003 *
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.openstacknetworking.routing;
17
18import org.onosproject.core.ApplicationId;
19import org.onosproject.net.config.Config;
20import org.slf4j.Logger;
21
22import static org.slf4j.LoggerFactory.getLogger;
23
24/**
25 * Configuration object for OpenstackRouting service.
26 */
27public class OpenstackRoutingConfig extends Config<ApplicationId> {
28 protected final Logger log = getLogger(getClass());
29
30 public static final String PHYSICAL_ROUTER_MAC = "physicalRouterMac";
31 public static final String GATEWAY_BRIDGE_ID = "gatewayBridgeId";
32 public static final String GATEWAY_EXTERNAL_INTERFACE_NAME = "gatewayExternalInterfaceName";
33 public static final String GATEWAY_EXTERNAL_INTERFACE_MAC = "gatewayExternalInterfaceMac";
34
35 /**
36 * Returns physical router mac.
37 *
38 * @return physical router mac
39 */
40 public String physicalRouterMac() {
41 return this.get("physicalRouterMac", "");
42 }
43
44 /**
45 * Returns gateway's bridge id.
46 *
47 * @return bridge id
48 */
49 public String gatewayBridgeId() {
50 return this.get("gatewayBridgeId", "");
51 }
52
53 /**
54 * Returns gateway's external interface name.
55 *
56 * @return external interface name
57 */
58 public String gatewayExternalInterfaceName() {
59 return this.get("gatewayExternalInterfaceName", "");
60 }
61
62 /**
63 * Returns gateway's external interface mac.
64 *
65 * @return external interface mac
66 */
67 public String gatewayExternalInterfaceMac() {
68 return this.get("gatewayExternalInterfaceMac", "");
69 }
70}