Open Kilda Java Documentation
DefaultParameters.java
Go to the documentation of this file.
1 /* Copyright 2017 Telstra Open Source
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 package org.openkilda;
17 
18 import static com.google.common.base.MoreObjects.firstNonNull;
19 
22 
23 public final class DefaultParameters {
24  private static final String host = firstNonNull(System.getProperty("kilda.host"), "localhost");
25  private static final String mininetPort = firstNonNull(System.getProperty("kilda.mininet.port"), "38080");
26  private static final String topologyPort = firstNonNull(System.getProperty("kilda.topology.port"), "80");
27  private static final String northboundPort = firstNonNull(System.getProperty("kilda.northbound.port"), "8088");
28  private static final String opentsdbPort = firstNonNull(System.getProperty("kilda.opentsdb.port"), "4242");
29  private static final String FLOODLIGHT_PORT = firstNonNull(System.getProperty("kilda.floodlight.port"), "8081");
30  public static final String topologyUsername = firstNonNull(System.getProperty("kilda.topology.username"), "kilda");
31  public static final String topologyPassword = firstNonNull(System.getProperty("kilda.topology.password"), "kilda");
32  public static final String mininetEndpoint = String.format("http://%s:%s", host, mininetPort);
33  public static final String trafficEndpoint = String.format("http://%s:%s", host, "17191");
34  public static final String topologyEndpoint = String.format("http://%s:%s", host, topologyPort);
35  public static final String northboundEndpoint = String.format("http://%s:%s", host, northboundPort);
36  public static final String opentsdbEndpoint = String.format("http://%s:%s", host, opentsdbPort);
37  public static final Auth neoAuth = new AuthNeo4j(host, "neo4j", "temppass");
38  public static final String FLOODLIGHT_ENDPOINT = String.format("http://%s:%s", host, FLOODLIGHT_PORT);
39 
40  static {
41  System.out.println(String.format("Mininet Endpoint: %s", mininetEndpoint));
42  System.out.println(String.format("Topology Endpoint: %s", topologyEndpoint));
43  System.out.println(String.format("Northbound Endpoint: %s", northboundEndpoint));
44  System.out.println(String.format("OpenTSDB Endpoint: %s", opentsdbEndpoint));
45  }
46 
47  private DefaultParameters() {
48  }
49 }
static final String FLOODLIGHT_ENDPOINT
static final String northboundEndpoint