1 Before running python scripts, some settings for onapsdk with information about ONAP endpoints (and proxies if needed)
2 must be be provided. ONAP SDK can be configured by exporting `ONAP_PYTHON_SDK_SETTINGS` which points to configuration python file.
4 Example setting are below
7 # ============LICENSE_START=======================================================
8 # Copyright (C) 2021 Orange
9 # Copyright (C) 2022 Samsung Electronics
10 # ================================================================================
11 # Licensed under the Apache License, Version 2.0 (the "License");
12 # you may not use this file except in compliance with the License.
13 # You may obtain a copy of the License at
15 # http://www.apache.org/licenses/LICENSE-2.0
17 # Unless required by applicable law or agreed to in writing, software
18 # distributed under the License is distributed on an "AS IS" BASIS,
19 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 # See the License for the specific language governing permissions and
21 # limitations under the License.
23 # ============LICENSE_END=========================================================
25 """Global settings module.""" # pylint: disable=bad-whitespace
26 # needed when socks proxy is used to connect to cluster
27 #from onapsdk.onap_service import OnapService
29 ######################
31 # ONAP SERVICES URLS #
33 ######################
35 AAI_URL = "https://aai.api.sparky.simpledemo.onap.org:30233"
36 AAI_API_VERSION = "v20"
37 CDS_URL = "http://portal.api.simpledemo.onap.org:30449"
38 MSB_URL = "https://msb.api.simpledemo.onap.org:30283"
39 SDC_BE_URL = "https://sdc.api.be.simpledemo.onap.org:30204"
40 SDC_FE_URL = "https://sdc.api.fe.simpledemo.onap.org:30207"
41 SDNC_URL = "https://sdnc.api.simpledemo.onap.org:30267"
42 SO_URL = "http://so.api.simpledemo.onap.org:30277"
44 VID_URL = "https://vid.api.simpledemo.onap.org:30200"
45 VID_API_VERSION = "/vid"
46 CLAMP_URL = "https://clamp.api.simpledemo.onap.org:30258"
47 VES_URL = "https://ves.api.simpledemo.onap.org:30417"
48 DMAAP_URL = "http://dmaap.api.simpledemo.onap.org:3904"
50 # needed when socks proxy is used to connect to cluster
51 #OnapService.set_proxy({'http': 'socks5h://127.0.0.1:8081', 'https': 'socks5h://127.0.0.1:8081'})
53 # execute in the shell to apply these settings
54 # export ONAP_PYTHON_SDK_SETTINGS="onap_settings"
56 which are saved in onap_settings.py one needs to set evirnioment like below:
59 (automation) ubuntu@onap:~/automation$ export ONAP_PYTHON_SDK_SETTINGS="onap_settings"