blob: e5e9cd4d6b6e3471f6d1c0787c381dacd39d3b45 [file] [log] [blame]
Jian Lic704b672018-09-04 18:52:53 +09001/*
2 * Copyright 2018-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.openstacknode.api;
18
19/**
20 * Representation of openstack neutron config information.
21 */
22public interface NeutronConfig {
23
24 /**
25 * Returns whether to use metadata proxy service.
26 * Note that SONA will behave as a metadata proxy server
27 *
28 * @return true if metadata proxy service is enabled, false otherwise
29 */
30 boolean useMetadataProxy();
31
32 /**
33 * Returns metadata proxy secret.
34 *
35 * @return metadata proxy secret
36 */
37 String metadataProxySecret();
38
39 /**
Jian Li92b6f292018-09-06 10:57:18 +090040 * Returns NOVA metadata IP address.
41 *
42 * @return NOVA metadata IP address
43 */
44 String novaMetadataIp();
45
46 /**
47 * Returns NOVA metadata port number.
48 *
49 * @return NOVA metadata port number
50 */
51 Integer novaMetadataPort();
52
53 /**
Jian Lic704b672018-09-04 18:52:53 +090054 * Builder of neutron config.
55 */
56 interface Builder {
57
58 /**
59 * Builds an immutable neutron config instance.
60 *
61 * @return neutron config instance
62 */
63 NeutronConfig build();
64
65 /**
66 * Returns neutron config with supplied useMetadataProxy flag.
67 *
68 * @param useMetadataProxy useMetadataProxy flag
69 * @return neutron config builder
70 */
71 Builder useMetadataProxy(boolean useMetadataProxy);
72
73 /**
74 * Returns neutron config with supplied metadataProxySecret.
75 *
76 * @param metadataProxySecret metadata proxy secret
77 * @return neutron config builder
78 */
79 Builder metadataProxySecret(String metadataProxySecret);
Jian Li92b6f292018-09-06 10:57:18 +090080
81 /**
82 * Returns neutron config with supplied NOVA metadata IP address.
83 *
84 * @param novaMetadataIp NOVA metadata IP address
85 * @return neutron config builder
86 */
87 Builder novaMetadataIp(String novaMetadataIp);
88
89 /**
90 * Returns neutron config with supplied NOVA metadata port number.
91 *
92 * @param novaMetadataPort NOVA metadata port number
93 * @return neutron config builder
94 */
95 Builder novaMetadataPort(Integer novaMetadataPort);
Jian Lic704b672018-09-04 18:52:53 +090096 }
97}