blob: 86ea2a9f7cbbe2afe568bd034783ee93015e1ec6 [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 /**
40 * Builder of neutron config.
41 */
42 interface Builder {
43
44 /**
45 * Builds an immutable neutron config instance.
46 *
47 * @return neutron config instance
48 */
49 NeutronConfig build();
50
51 /**
52 * Returns neutron config with supplied useMetadataProxy flag.
53 *
54 * @param useMetadataProxy useMetadataProxy flag
55 * @return neutron config builder
56 */
57 Builder useMetadataProxy(boolean useMetadataProxy);
58
59 /**
60 * Returns neutron config with supplied metadataProxySecret.
61 *
62 * @param metadataProxySecret metadata proxy secret
63 * @return neutron config builder
64 */
65 Builder metadataProxySecret(String metadataProxySecret);
66 }
67}