AETHER-2788 Use parameter from configuration to configure eNB
AETHER-2725 CWMP fault returns by eNodeB
AETHER-2692 Check the XML sent by eNodeB and ACS are valid
AETHER-2691 Research on eNodeB TR-069 service issue
AETHER-2788 Use parameter from configuration to configure eNB
AETHER-2789 Load enodeb configuration by the serial number
AETHER-2821 Configure the PLMN which is current not supported by enodebd
AETHER-2839 Create acs_common to own the common attribute of eNodeb configuration
AETHER-2831 Writing documentation of configuring enodebd
This patch contains above jira tickets.
It can work and configure the eNodeB with single configuration now.
Change-Id: I4875d099246a1995de420c4947e7a99823055161
diff --git a/configuration/service_configs.py b/configuration/service_configs.py
index c60c340..f2d0f24 100644
--- a/configuration/service_configs.py
+++ b/configuration/service_configs.py
@@ -22,7 +22,8 @@
# Location of configs (both service config and mconfig)
CONFIG_DIR = './magma_configs'
CONFIG_OVERRIDE_DIR = './override_configs'
-
+ENB_COMMON_FILE = './magma_configs/acs_common.yml'
+ENB_CONFIG_DIR = './magma_configs/serial_number'
def load_override_config(service_name: str) -> Optional[Any]:
"""
@@ -73,7 +74,6 @@
LoadConfigError:
Unable to load config due to missing file or missing key
"""
- print(CONFIG_DIR, service_name)
cfg_file_name = os.path.join(CONFIG_DIR, '%s.yml' % service_name)
cfg = _load_yaml_file(cfg_file_name)
@@ -83,6 +83,36 @@
cfg.update(overrides)
return cfg
+def load_enb_config() -> Any:
+ """
+ Load enb configurations from directory.
+
+ Args:
+ None
+
+ Returns: json-decoded value of the service config
+ """
+
+ ret = dict()
+ for fname in os.listdir(ENB_CONFIG_DIR):
+ sn = fname.replace(".yml", "")
+ cfg_file_name = os.path.join(ENB_CONFIG_DIR, fname)
+ ret[sn] = _load_yaml_file(cfg_file_name)
+
+ return ret
+
+def load_common_config() -> Any:
+ """
+ Load enb common configuration.
+
+ Args:
+ None
+
+ Returns: json-decoded value of the service config
+ """
+
+ return _load_yaml_file(ENB_COMMON_FILE)
+
cached_service_configs = {} # type: Dict[str, Any]