Enbo Wang | 818f76a | 2020-03-04 00:42:31 +0800 | [diff] [blame^] | 1 | # ============LICENSE_START======================================================= |
| 2 | # ONAP - SO |
| 3 | # ================================================================================ |
| 4 | # Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved. |
| 5 | # ================================================================================ |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
| 17 | # ============LICENSE_END========================================================= |
Enbo Wang | 6ab8b62 | 2019-04-23 13:42:21 +0000 | [diff] [blame] | 18 | |
| 19 | import sys |
Enbo Wang | 818f76a | 2020-03-04 00:42:31 +0800 | [diff] [blame^] | 20 | import os |
Enbo Wang | 6ab8b62 | 2019-04-23 13:42:21 +0000 | [diff] [blame] | 21 | |
| 22 | SWM_DIR = sys.path[0] |
| 23 | |
Enbo Wang | 818f76a | 2020-03-04 00:42:31 +0800 | [diff] [blame^] | 24 | LOGGER_FORMAT = "[%(asctime)-15s] %(levelname)s [%(name)s]: %(message)s" |
| 25 | LOGGER_FILE_DIR = os.path.join(SWM_DIR, "log") |
| 26 | |
| 27 | NE_INFO_TABLE = os.path.join(SWM_DIR, "ems_db", "ne_info_table.json") |
| 28 | SW_SERVER_SIMULATOR = os.path.join(SWM_DIR, "sw_server_simulator") |
| 29 | PNF_SIMULATORS_DIR = os.path.join(SWM_DIR, "pnf_simulators") |
| 30 | COMMON_PATH = "opt" |
| 31 | PNF_SW_DOWNLOAD_DIR = "download" |
| 32 | PNF_SW_INSTALL_DIR = "install" |
Enbo Wang | 6ab8b62 | 2019-04-23 13:42:21 +0000 | [diff] [blame] | 33 | MANIFEST_FILE = "manifest.json" |
Enbo Wang | 818f76a | 2020-03-04 00:42:31 +0800 | [diff] [blame^] | 34 | INSTALLED_SW_FILE = "installed_sw.json" |
Enbo Wang | 6ab8b62 | 2019-04-23 13:42:21 +0000 | [diff] [blame] | 35 | CURRENT_VERSION_DIR = "current" |
| 36 | NOTIFICATION_DIR = "/tmp" |
| 37 | |
| 38 | MAX_INT = (2**32) - 1 |
| 39 | |
Enbo Wang | 818f76a | 2020-03-04 00:42:31 +0800 | [diff] [blame^] | 40 | OBJECT_CLASS = "NRCellDU" |
| 41 | OBJECT_INSTANCE = "DC=com, SubNetwork=1, ManagedElement=123, GNBDUFunction=1, NRCellDU=1" |
| 42 | SYSTEM_DN = "DC=com, SubNetwork=1, ManagedElement=123" |
| 43 | |
Enbo Wang | 6ab8b62 | 2019-04-23 13:42:21 +0000 | [diff] [blame] | 44 | STATUS_DOWNLOADING = "Downloading" |
| 45 | STATUS_INSTALLING = "Installing" |
| 46 | STATUS_ACTIVATING = "Activating" |
| 47 | STATUS_ACTIVATED = "Activated" |
| 48 | |
| 49 | STATUS_PRECHECKED = "PreChecked" |
| 50 | STATUS_POSTCHECKED = "PostChecked" |
| 51 | |
| 52 | REQ_SUCCESS = "requestAccepted" |
| 53 | REQ_FAILURE = "requestFailed" |
| 54 | |
| 55 | RET_CODE_SUCCESS = 0 |
| 56 | RET_CODE_FAILURE = 1 |
| 57 | |
| 58 | RESULT_SUCCESS = "Success" |
| 59 | RESULT_FAILURE = "Failure" |
| 60 | RESULT_PARTLY = "Partly successful" |