[APACHECNF] Various updates of the demo
[demo.git] / tutorials / ApacheCNF / automation / onap_settings.py
1 # ============LICENSE_START=======================================================
2 # Copyright (C) 2021 Orange
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 # ============LICENSE_END=========================================================
17
18 """Global settings module."""  # pylint: disable=bad-whitespace
19 # uncomment if socks is used
20 #from onapsdk.onap_service import OnapService
21
22 ######################
23 #                    #
24 # ONAP SERVICES URLS #
25 #                    #
26 ######################
27 import logging.config
28
29 LOG_CONFIG = {
30     "version": 1,
31     "disable_existing_loggers": False,
32     "formatters": {
33         "default": {
34             "class": "logging.Formatter",
35             "format": "%(asctime)s %(levelname)s %(lineno)d:%(filename)s(%(process)d) - %(message)s"
36         }
37     },
38     "handlers": {
39         "console": {
40             "level": "DEBUG",
41             "class": "logging.StreamHandler",
42             "formatter": "default"
43         },
44         "file": {
45             "level": "DEBUG",
46             "class": "logging.FileHandler",
47             "formatter": "default",
48             "filename": "/tmp/pythonsdk.debug.log",
49             "mode": "w"
50         }
51     },
52     "root": {
53         "level": "DEBUG",
54         "handlers": ["console", "file"]
55     }
56 }
57
58 logging.config.dictConfig(LOG_CONFIG)
59
60
61 AAI_URL         = "https://aai.api.sparky.simpledemo.onap.org:30233"
62 AAI_API_VERSION = "v23"
63 AAI_AUTH        = "Basic QUFJOkFBSQ=="
64 CDS_URL         = "http://portal.api.simpledemo.onap.org:30449"
65 CDS_AUTH        = ("ccsdkapps", "ccsdkapps")
66 MSB_URL         = "https://msb.api.simpledemo.onap.org:30283"
67 SDC_BE_URL      = "https://sdc.api.be.simpledemo.onap.org:30204"
68 SDC_FE_URL      = "https://sdc.api.fe.simpledemo.onap.org:30207"
69 SDC_AUTH        = "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
70 SDNC_URL        = "https://sdnc.api.simpledemo.onap.org:30267"
71 SDNC_AUTH       = "Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ=="
72 SO_URL          = "http://so.api.simpledemo.onap.org:30277"
73 SO_API_VERSION  = "v7"
74 SO_AUTH         = "Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA=="
75 SO_CAT_DB_AUTH  = "Basic YnBlbDpwYXNzd29yZDEk"
76 VID_URL         = "https://vid.api.simpledemo.onap.org:30200"
77 VID_API_VERSION = "/vid"
78 CLAMP_URL       = "https://clamp.api.simpledemo.onap.org:30258"
79 CLAMP_AUTH      = "Basic ZGVtb0BwZW9wbGUub3NhYWYub3JnOmRlbW8xMjM0NTYh"
80 VES_URL         = "http://ves.api.simpledemo.onap.org:30417"
81 DMAAP_URL       = "http://dmaap.api.simpledemo.onap.org:3904"
82 NBI_URL         = "https://nbi.api.simpledemo.onap.org:30274"
83 NBI_API_VERSION = "/nbi/api/v4"
84 DCAEMOD_URL = ""
85 HOLMES_URL = "https://aai.api.sparky.simpledemo.onap.org:30293"
86 POLICY_URL = ""
87
88 ## GUI
89 AAI_GUI_URL = "https://aai.api.sparky.simpledemo.onap.org:30220"
90 AAI_GUI_SERVICE = f"{AAI_GUI_URL}/services/aai/webapp/index.html#/browse"
91 CDS_GUI_SERVICE = f"{CDS_URL}/"
92 SO_MONITOR_GUI_SERVICE = f"{SO_URL}/"
93 SDC_GUI_SERVICE = f"{SDC_FE_URL}/sdc1/portal"
94 SDNC_DG_GUI_SERVICE = f"{SDNC_URL}/nifi/"
95 SDNC_ODL_GUI_SERVICE = f"{SDNC_URL}/odlux/index.html"
96
97 DCAEMOD_GUI_SERVICE = f"{DCAEMOD_URL}/"
98 HOLMES_GUI_SERVICE = f"{HOLMES_URL}/iui/holmes/default.html"
99 POLICY_GUI_SERVICE = f"{POLICY_URL}/onap/login.html"
100 POLICY_CLAMP_GUI_SERVICE = f"{CLAMP_URL}/"
101
102 # uncomment if socks is used
103 #OnapService.set_proxy({'http': 'socks5h://127.0.0.1:8081', 'https': 'socks5h://127.0.0.1:8081'})
104
105 # execute in the shell to apply these settings
106 # export ONAP_PYTHON_SDK_SETTINGS="onap_settings"