AETHER-2846 Support all parameters which lists in Aether Docs
AETHER-2847 Integrating with Prometheus and record eNB information
AETHER-2848 Move SAS configuration as enodeb base, not plugin in driver code
AETHER-2879 add gps information in prometheus
AETHER-2880 add ip and port as configurable parameter in enodebd
AETHER-2897 Firmware update feature over CWMP
AETHER-3022 Integrate firmware upgrade state into configuration workflow
AETHER-3120 Develop ACS state machine with firmware upgrade feature
Change-Id: I0bcbf2229ba3c1638f2a997f3c651f8d6240145d
diff --git a/devices/freedomfi_one.py b/devices/freedomfi_one.py
index bfa66eb..4dfee90 100644
--- a/devices/freedomfi_one.py
+++ b/devices/freedomfi_one.py
@@ -48,6 +48,9 @@
EndSessionState,
EnodebAcsState,
ErrorState,
+ DownloadState,
+ WaitDownloadResponseState,
+ WaitInformTransferCompleteState,
GetParametersState,
SetParameterValuesState,
WaitGetParametersState,
@@ -59,113 +62,239 @@
from tr069 import models
+FAPSERVICE_PATH = "Device.Services.FAPService.1."
+FAP_CONTROL = FAPSERVICE_PATH + "FAPControl."
+
+
+class FreedomFiOneHandler(BasicEnodebAcsStateMachine):
+ def __init__(self, service: MagmaService,) -> None:
+ self._state_map = {}
+ super().__init__(service=service, use_param_key=True)
+
+ def reboot_asap(self) -> None:
+ self.transition("reboot")
+
+ def is_enodeb_connected(self) -> bool:
+ return not isinstance(self.state, WaitInformState)
+
+ def _init_state_map(self) -> None:
+ self._state_map = {
+ # Inform comes in -> Respond with InformResponse
+ "wait_inform": WaitInformState(self, when_done="get_rpc_methods"),
+ # If first inform after boot -> GetRpc request comes in, if not
+ # empty request comes in => Transition to get_transient_params
+ "get_rpc_methods": FreedomFiOneGetInitState(
+ self, when_done="get_transient_params",
+ ),
+ # Read transient readonly params.
+ "get_transient_params": FreedomFiOneSendGetTransientParametersState(
+ self, when_upgrade="firmware_upgrade", when_done="get_params",
+ ),
+ "firmware_upgrade": DownloadState(self, when_done="wait_download_response"),
+ "wait_download_response": WaitDownloadResponseState(
+ self, when_done="wait_transfer_complete"
+ ),
+ "wait_transfer_complete": WaitInformTransferCompleteState(
+ self,
+ when_done="get_params",
+ when_periodic="wait_transfer_complete",
+ when_timeout="end_session",
+ ),
+ "get_params": FreedomFiOneGetObjectParametersState(
+ self,
+ when_delete="delete_objs",
+ when_add="add_objs",
+ when_set="set_params",
+ when_skip="end_session",
+ ),
+ "delete_objs": DeleteObjectsState(
+ self, when_add="add_objs", when_skip="set_params",
+ ),
+ "add_objs": AddObjectsState(self, when_done="set_params"),
+ "set_params": SetParameterValuesState(self, when_done="wait_set_params",),
+ "wait_set_params": WaitSetParameterValuesState(
+ self,
+ when_done="check_get_params",
+ when_apply_invasive="check_get_params",
+ status_non_zero_allowed=True,
+ ),
+ "check_get_params": GetParametersState(
+ self, when_done="check_wait_get_params", request_all_params=True,
+ ),
+ "check_wait_get_params": WaitGetParametersState(
+ self, when_done="end_session",
+ ),
+ "end_session": EndSessionState(self),
+ # These states are only entered through manual user intervention
+ "reboot": EnbSendRebootState(self, when_done="wait_reboot"),
+ "wait_reboot": WaitRebootResponseState(
+ self, when_done="wait_post_reboot_inform",
+ ),
+ "wait_post_reboot_inform": WaitInformMRebootState(
+ self, when_done="wait_empty", when_timeout="wait_inform",
+ ),
+ # The states below are entered when an unexpected message type is
+ # received
+ "unexpected_fault": ErrorState(
+ self, inform_transition_target="wait_inform",
+ ),
+ }
+
+ @property
+ def device_name(self) -> str:
+ return EnodebDeviceName.FREEDOMFI_ONE
+
+ @property
+ def data_model_class(self) -> Type[DataModel]:
+ return FreedomFiOneTrDataModel
+
+ @property
+ def config_postprocessor(self) -> EnodebConfigurationPostProcessor:
+ return FreedomFiOneConfigurationInitializer(self)
+
+ @property
+ def state_map(self) -> Dict[str, EnodebAcsState]:
+ return self._state_map
+
+ @property
+ def disconnected_state_name(self) -> str:
+ return "wait_inform"
+
+ @property
+ def unexpected_fault_state_name(self) -> str:
+ return "unexpected_fault"
+
+
class SASParameters:
""" Class modeling the SAS parameters and their TR path"""
- # SAS parameters for FreedomFiOne
- FAP_CONTROL = "Device.Services.FAPService.1.FAPControl."
- FAPSERVICE_PATH = "Device.Services.FAPService.1."
-
- # Sas management parameters
- SAS_ENABLE = "sas_enabled"
- SAS_SERVER_URL = "sas_server_url"
- SAS_UID = "sas_uid"
- SAS_CATEGORY = "sas_category"
- SAS_CHANNEL_TYPE = "sas_channel_type"
- SAS_CERT_SUBJECT = "sas_cert_subject"
- SAS_IC_GROUP_ID = "sas_icg_group_id"
- SAS_LOCATION = "sas_location"
- SAS_HEIGHT_TYPE = "sas_height_type"
- SAS_CPI_ENABLE = "sas_cpi_enable"
- SAS_CPI_IPE = "sas_cpi_ipe" # Install param supplied enable
- FREQ_BAND_1 = "freq_band_1"
- FREQ_BAND_2 = "freq_band_2"
# For CBRS radios we set this to the limit and the SAS can reduce the
# power if needed.
- TX_POWER_CONFIG = "tx_power_config"
SAS_PARAMETERS = {
- SAS_ENABLE: TrParam(
- FAP_CONTROL + "LTE.X_000E8F_SAS.Enable",
+ ParameterName.SAS_ENABLE: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.Enable",
is_invasive=False,
type=TrParameterType.BOOLEAN,
is_optional=False,
),
- SAS_SERVER_URL: TrParam(
- FAP_CONTROL + "LTE.X_000E8F_SAS.Server",
+ ParameterName.SAS_SERVER_URL: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.Server",
is_invasive=False,
type=TrParameterType.STRING,
is_optional=False,
),
- SAS_UID: TrParam(
- FAP_CONTROL + "LTE.X_000E8F_SAS.UserContactInformation",
+ ParameterName.SAS_UID: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.UserContactInformation",
is_invasive=False,
type=TrParameterType.STRING,
is_optional=False,
),
- SAS_CATEGORY: TrParam(
- FAP_CONTROL + "LTE.X_000E8F_SAS.Category",
+ ParameterName.SAS_CATEGORY: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.Category",
is_invasive=False,
type=TrParameterType.STRING,
is_optional=False,
),
- SAS_CHANNEL_TYPE: TrParam(
- FAP_CONTROL + "LTE.X_000E8F_SAS.ProtectionLevel",
+ ParameterName.SAS_CHANNEL_TYPE: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.ProtectionLevel",
is_invasive=False,
type=TrParameterType.STRING,
is_optional=False,
),
- SAS_CERT_SUBJECT: TrParam(
- FAP_CONTROL + "LTE.X_000E8F_SAS.CertSubject",
+ ParameterName.SAS_CERT_SUBJECT: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.CertSubject",
is_invasive=False,
type=TrParameterType.STRING,
is_optional=False,
),
# SAS_IC_GROUP_ID: TrParam(
- # FAP_CONTROL + 'LTE.X_000E8F_SAS.ICGGroupId', is_invasive=False,
+ # FAP_CONTROL + 'LTE.X_SCM_SAS.ICGGroupId', is_invasive=False,
# type=TrParameterType.STRING, False),
- SAS_LOCATION: TrParam(
- FAP_CONTROL + "LTE.X_000E8F_SAS.Location",
+ ParameterName.SAS_LOCATION: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.Location",
is_invasive=False,
type=TrParameterType.STRING,
is_optional=False,
),
- SAS_HEIGHT_TYPE: TrParam(
- FAP_CONTROL + "LTE.X_000E8F_SAS.HeightType",
+ ParameterName.SAS_HEIGHT_TYPE: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.HeightType",
is_invasive=False,
type=TrParameterType.STRING,
is_optional=False,
),
- SAS_CPI_ENABLE: TrParam(
- FAP_CONTROL + "LTE.X_000E8F_SAS.CPIEnable",
+ ParameterName.SAS_CPI_ENABLE: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.CPIEnable",
is_invasive=False,
type=TrParameterType.BOOLEAN,
is_optional=False,
),
- SAS_CPI_IPE: TrParam(
- FAP_CONTROL + "LTE.X_000E8F_SAS.CPIInstallParamSuppliedEnable",
+ ParameterName.SAS_CPI_IPE: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.CPIInstallParamSuppliedEnable",
is_invasive=False,
type=TrParameterType.BOOLEAN,
is_optional=False,
),
- FREQ_BAND_1: TrParam(
- FAPSERVICE_PATH + "CellConfig.LTE.RAN.RF.FreqBandIndicator",
+ ParameterName.SAS_FCCID: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.FCCIdentificationNumber",
is_invasive=False,
- type=TrParameterType.UNSIGNED_INT,
+ type=TrParameterType.STRING,
is_optional=False,
),
- FREQ_BAND_2: TrParam(
- FAPSERVICE_PATH + "CellConfig.LTE.RAN.RF.X_000E8F_FreqBandIndicator2",
+ ParameterName.SAS_MEAS_CAPS: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.MeasCapability",
is_invasive=False,
- type=TrParameterType.UNSIGNED_INT,
+ type=TrParameterType.STRING,
is_optional=False,
),
- TX_POWER_CONFIG: TrParam(
- FAPSERVICE_PATH + "CellConfig.LTE.RAN.RF.X_000E8F_TxPowerConfig",
- is_invasive=True,
+ ParameterName.SAS_MANU_ENABLE: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.ManufacturerPrefixEnable",
+ is_invasive=False,
+ type=TrParameterType.BOOLEAN,
+ is_optional=False,
+ ),
+ ParameterName.SAS_CPI_NAME: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.CPIName",
+ is_invasive=False,
+ type=TrParameterType.STRING,
+ is_optional=False,
+ ),
+ ParameterName.SAS_CPI_ID: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.CPIId",
+ is_invasive=False,
+ type=TrParameterType.STRING,
+ is_optional=False,
+ ),
+ ParameterName.SAS_ANTA_AZIMUTH: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.AntennaAzimuth",
+ is_invasive=False,
type=TrParameterType.INT,
is_optional=False,
),
+ ParameterName.SAS_ANTA_DOWNTILT: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.AntennaDowntilt",
+ is_invasive=False,
+ type=TrParameterType.INT,
+ is_optional=False,
+ ),
+ ParameterName.SAS_ANTA_GAIN: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.AntennaGain",
+ is_invasive=False,
+ type=TrParameterType.INT,
+ is_optional=False,
+ ),
+ ParameterName.SAS_ANTA_BEAMWIDTH: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.AntennaBeamwidth",
+ is_invasive=False,
+ type=TrParameterType.INT,
+ is_optional=False,
+ ),
+ ParameterName.SAS_CPI_DATA: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_SAS.CPISignatureData",
+ is_invasive=False,
+ type=TrParameterType.STRING,
+ is_optional=False,
+ ),
}
@@ -177,10 +306,6 @@
and converting it to Magma understood fields.
"""
- DEFGW_STATUS_PATH = "Device.X_SCM_DeviceFeature.X_SCM_NEStatus.X_SCM_DEFGW_Status"
- SAS_STATUS_PATH = "Device.Services.FAPService.1.FAPControl.LTE.X_SCM_SAS.State"
- ENB_STATUS_PATH = "Device.X_SCM_DeviceFeature.X_SCM_NEStatus.X_SCM_eNB_Status"
-
# Status parameters
DEFAULT_GW = "defaultGW"
SYNC_STATUS = "syncStatus"
@@ -190,30 +315,18 @@
STATUS_PARAMETERS = {
# Status nodes
- # This works
DEFAULT_GW: TrParam(
- DEFGW_STATUS_PATH,
+ "Device.X_SCM_DeviceFeature.X_SCM_NEStatus.X_SCM_DEFGW_Status",
is_invasive=False,
type=TrParameterType.STRING,
is_optional=False,
),
- # SYNC_STATUS: TrParam(
- # STATUS_PATH + 'X_000E8F_Sync_Status', is_invasive=False,
- # type=TrParameterType.STRING, is_optional=False,
- # ),
- # This works
SAS_STATUS: TrParam(
- SAS_STATUS_PATH,
+ "Device.Services.FAPService.1.FAPControl.LTE.X_SCM_SAS.State",
is_invasive=False,
type=TrParameterType.STRING,
is_optional=False,
),
- # This doesn't work
- # ENB_STATUS: TrParam(
- # ENB_STATUS_PATH, is_invasive=False,
- # type=TrParameterType.STRING, is_optional=False,
- # ),
- # GPS status, lat, long
GPS_SCAN_STATUS: TrParam(
"Device.FAP.GPS.ScanStatus",
is_invasive=False,
@@ -232,6 +345,18 @@
type=TrParameterType.STRING,
is_optional=False,
),
+ ParameterName.SW_VERSION: TrParam(
+ "Device.DeviceInfo.SoftwareVersion",
+ is_invasive=False,
+ type=TrParameterType.STRING,
+ is_optional=False,
+ ),
+ ParameterName.SERIAL_NUMBER: TrParam(
+ "Device.DeviceInfo.SerialNumber",
+ is_invasive=False,
+ type=TrParameterType.STRING,
+ is_optional=False,
+ ),
}
# Derived status params that don't have tr69 representation.
@@ -374,6 +499,8 @@
)
pass_through_params = [ParameterName.GPS_LAT, ParameterName.GPS_LONG]
+
+ print(name_to_val)
for name in pass_through_params:
device_cfg.set_parameter(name, name_to_val[name])
@@ -384,159 +511,39 @@
miscellaneous properties
"""
- FAP_CONTROL = "Device.Services.FAPService.1.FAPControl."
- FAPSERVICE_PATH = "Device.Services.FAPService.1."
-
- # Tunnel ref format clobber it to non IPSEC as we don't support
- # IPSEC
- TUNNEL_REF = "tunnel_ref"
- PRIM_SOURCE = "prim_src"
-
- # Carrier aggregation
- CARRIER_AGG_ENABLE = "carrier_agg_enable"
- CARRIER_NUMBER = "carrier_number" # Carrier aggregation params
- CONTIGUOUS_CC = "contiguous_cc"
- WEB_UI_ENABLE = "web_ui_enable" # Enable or disable local enb UI
-
MISC_PARAMETERS = {
- # WEB_UI_ENABLE: TrParam(
- # 'Device.X_000E8F_DeviceFeature.X_000E8F_WebServerEnable',
- # is_invasive=False,
- # type=TrParameterType.BOOLEAN, is_optional=False,
- # ),
- CARRIER_AGG_ENABLE: TrParam(
- FAP_CONTROL + "LTE.X_000E8F_RRMConfig.X_000E8F_CA_Enable",
+ ParameterName.CARRIER_AGG_ENABLE: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_RRMConfig.X_SCM_CA_Enable",
is_invasive=False,
type=TrParameterType.BOOLEAN,
is_optional=False,
),
- CARRIER_NUMBER: TrParam(
- FAP_CONTROL + "LTE.X_000E8F_RRMConfig.X_000E8F_Cell_Number",
+ ParameterName.CARRIER_NUMBER: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_RRMConfig.X_SCM_Cell_Number",
is_invasive=False,
type=TrParameterType.INT,
is_optional=False,
),
- CONTIGUOUS_CC: TrParam(
- FAP_CONTROL + "LTE.X_000E8F_RRMConfig.X_000E8F_CELL_Freq_Contiguous",
+ ParameterName.CONTIGUOUS_CC: TrParam(
+ FAP_CONTROL + "LTE.X_SCM_RRMConfig.X_SCM_CELL_Freq_Contiguous",
is_invasive=False,
type=TrParameterType.INT,
is_optional=False,
),
- TUNNEL_REF: TrParam(
- FAPSERVICE_PATH + "CellConfig.LTE.Tunnel.1.TunnelRef",
+ ParameterName.PRIM_SOURCE: TrParam(
+ FAPSERVICE_PATH + "REM.X_SCM_tfcsManagerConfig.primSrc",
is_invasive=False,
type=TrParameterType.STRING,
is_optional=False,
),
- PRIM_SOURCE: TrParam(
- FAPSERVICE_PATH + "REM.X_000E8F_tfcsManagerConfig.primSrc",
+ ParameterName.ENABLE_CWMP: TrParam(
+ "Device.ManagementServer.EnableCWMP",
is_invasive=False,
- type=TrParameterType.STRING,
+ type=TrParameterType.BOOLEAN,
is_optional=False,
),
}
- # Hardcoded defaults
- defaults = {
- # Use IPV4 only
- TUNNEL_REF: "Device.IP.Interface.1.IPv4Address.1.",
- # Only synchronize with GPS
- PRIM_SOURCE: "FREE_RUNNING",
- # Always enable carrier aggregation for the CBRS bands
- CARRIER_AGG_ENABLE: False,
- CARRIER_NUMBER: 1, # CBRS has two carriers
- CONTIGUOUS_CC: 0, # Its not contiguous carrier
- }
-
-
-class FreedomFiOneHandler(BasicEnodebAcsStateMachine):
- def __init__(self, service: MagmaService,) -> None:
- self._state_map = {}
- super().__init__(service=service, use_param_key=True)
-
- def reboot_asap(self) -> None:
- self.transition("reboot")
-
- def is_enodeb_connected(self) -> bool:
- return not isinstance(self.state, WaitInformState)
-
- def _init_state_map(self) -> None:
- self._state_map = {
- # Inform comes in -> Respond with InformResponse
- "wait_inform": WaitInformState(self, when_done="get_rpc_methods"),
- # If first inform after boot -> GetRpc request comes in, if not
- # empty request comes in => Transition to get_transient_params
- "get_rpc_methods": FreedomFiOneGetInitState(
- self, when_done="get_transient_params",
- ),
- # Read transient readonly params.
- "get_transient_params": FreedomFiOneSendGetTransientParametersState(
- self, when_done="get_params",
- ),
- "get_params": FreedomFiOneGetObjectParametersState(
- self,
- when_delete="delete_objs",
- when_add="add_objs",
- when_set="set_params",
- when_skip="end_session",
- ),
- "delete_objs": DeleteObjectsState(
- self, when_add="add_objs", when_skip="set_params",
- ),
- "add_objs": AddObjectsState(self, when_done="set_params"),
- "set_params": SetParameterValuesState(self, when_done="wait_set_params",),
- "wait_set_params": WaitSetParameterValuesState(
- self,
- when_done="check_get_params",
- when_apply_invasive="check_get_params",
- status_non_zero_allowed=True,
- ),
- "check_get_params": GetParametersState(
- self, when_done="check_wait_get_params", request_all_params=True,
- ),
- "check_wait_get_params": WaitGetParametersState(
- self, when_done="end_session",
- ),
- "end_session": EndSessionState(self),
- # These states are only entered through manual user intervention
- "reboot": EnbSendRebootState(self, when_done="wait_reboot"),
- "wait_reboot": WaitRebootResponseState(
- self, when_done="wait_post_reboot_inform",
- ),
- "wait_post_reboot_inform": WaitInformMRebootState(
- self, when_done="wait_empty", when_timeout="wait_inform",
- ),
- # The states below are entered when an unexpected message type is
- # received
- "unexpected_fault": ErrorState(
- self, inform_transition_target="wait_inform",
- ),
- }
-
- @property
- def device_name(self) -> str:
- return EnodebDeviceName.FREEDOMFI_ONE
-
- @property
- def data_model_class(self) -> Type[DataModel]:
- return FreedomFiOneTrDataModel
-
- @property
- def config_postprocessor(self) -> EnodebConfigurationPostProcessor:
- return FreedomFiOneConfigurationInitializer(self)
-
- @property
- def state_map(self) -> Dict[str, EnodebAcsState]:
- return self._state_map
-
- @property
- def disconnected_state_name(self) -> str:
- return "wait_inform"
-
- @property
- def unexpected_fault_state_name(self) -> str:
- return "unexpected_fault"
-
class FreedomFiOneTrDataModel(DataModel):
"""
@@ -555,16 +562,10 @@
- Num PLMNs is not reported by these units
"""
- # Mapping of TR parameter paths to aliases
- DEVICE_PATH = "Device."
- FAPSERVICE_PATH = DEVICE_PATH + "Services.FAPService.1."
- FAP_CONTROL = FAPSERVICE_PATH + "FAPControl."
- BCCH = FAPSERVICE_PATH + "REM.LTE.Cell.1.BCCH."
-
PARAMETERS = {
# Top-level objects
ParameterName.DEVICE: TrParam(
- DEVICE_PATH,
+ "Device.",
is_invasive=False,
type=TrParameterType.OBJECT,
is_optional=False,
@@ -576,25 +577,67 @@
is_optional=False,
),
# Device info
- ParameterName.SW_VERSION: TrParam(
- DEVICE_PATH + "DeviceInfo.SoftwareVersion",
- is_invasive=False,
- type=TrParameterType.STRING,
- is_optional=False,
- ),
- ParameterName.SERIAL_NUMBER: TrParam(
- DEVICE_PATH + "DeviceInfo.SerialNumber",
+ ParameterName.IP_ADDRESS: TrParam(
+ "Device.IP.Interface.1.IPv4Address.1.IPAddress",
is_invasive=False,
type=TrParameterType.STRING,
is_optional=False,
),
# RF-related parameters
+ ParameterName.FREQ_BAND_1: TrParam(
+ FAPSERVICE_PATH + "CellConfig.LTE.RAN.RF.FreqBandIndicator",
+ is_invasive=False,
+ type=TrParameterType.UNSIGNED_INT,
+ is_optional=False,
+ ),
+ ParameterName.FREQ_BAND_2: TrParam(
+ FAPSERVICE_PATH + "CellConfig.LTE.RAN.RF.X_SCM_FreqBandIndicator2",
+ is_invasive=False,
+ type=TrParameterType.UNSIGNED_INT,
+ is_optional=False,
+ ),
+ ParameterName.FREQ_BAND_LIST: TrParam(
+ FAPSERVICE_PATH + "CellConfig.LTE.RAN.RF.X_SCM_FreqBandIndicatorConfigList",
+ is_invasive=False,
+ type=TrParameterType.STRING,
+ is_optional=False,
+ ),
ParameterName.EARFCNDL: TrParam(
FAPSERVICE_PATH + "CellConfig.LTE.RAN.RF.EARFCNDL",
is_invasive=False,
type=TrParameterType.INT,
is_optional=False,
),
+ ParameterName.EARFCNUL: TrParam(
+ FAPSERVICE_PATH + "CellConfig.LTE.RAN.RF.EARFCNUL",
+ is_invasive=False,
+ type=TrParameterType.INT,
+ is_optional=False,
+ ),
+ ParameterName.EARFCNDL2: TrParam(
+ FAPSERVICE_PATH + "CellConfig.LTE.RAN.RF.X_SCM_EARFCNDL2",
+ is_invasive=False,
+ type=TrParameterType.INT,
+ is_optional=False,
+ ),
+ ParameterName.EARFCNUL2: TrParam(
+ FAPSERVICE_PATH + "CellConfig.LTE.RAN.RF.X_SCM_EARFCNUL2",
+ is_invasive=False,
+ type=TrParameterType.INT,
+ is_optional=False,
+ ),
+ ParameterName.EARFCNDL_LIST: TrParam(
+ FAPSERVICE_PATH + "CellConfig.LTE.RAN.RF.X_SCM_EARFCNDLConfigList",
+ is_invasive=False,
+ type=TrParameterType.STRING,
+ is_optional=False,
+ ),
+ ParameterName.EARFCNUL_LIST: TrParam(
+ FAPSERVICE_PATH + "CellConfig.LTE.RAN.RF.X_SCM_EARFCNULConfigList",
+ is_invasive=False,
+ type=TrParameterType.STRING,
+ is_optional=False,
+ ),
ParameterName.DL_BANDWIDTH: TrParam(
FAPSERVICE_PATH + "CellConfig.LTE.RAN.RF.DLBandwidth",
is_invasive=False,
@@ -639,7 +682,7 @@
is_optional=False,
),
ParameterName.GPS_ENABLE: TrParam(
- DEVICE_PATH + "FAP.GPS.ScanOnBoot",
+ "Device.FAP.GPS.ScanOnBoot",
is_invasive=False,
type=TrParameterType.BOOLEAN,
is_optional=False,
@@ -657,46 +700,58 @@
type=TrParameterType.INT,
is_optional=False,
),
- # It may not work, comment out first
- # ParameterName.NUM_PLMNS: TrParam(
- # FAPSERVICE_PATH + 'CellConfig.LTE.EPC.PLMNListNumberOfEntries',
- # is_invasive=False,
- # type=TrParameterType.INT, is_optional=False,
- # ),
ParameterName.TAC: TrParam(
FAPSERVICE_PATH + "CellConfig.LTE.EPC.TAC",
is_invasive=False,
type=TrParameterType.INT,
is_optional=False,
),
+ ParameterName.TAC2: TrParam(
+ FAPSERVICE_PATH + "CellConfig.LTE.EPC.X_SCM_TAC2",
+ is_invasive=False,
+ type=TrParameterType.INT,
+ is_optional=False,
+ ),
# Management server parameters
ParameterName.PERIODIC_INFORM_ENABLE: TrParam(
- DEVICE_PATH + "ManagementServer.PeriodicInformEnable",
+ "Device.ManagementServer.PeriodicInformEnable",
is_invasive=False,
type=TrParameterType.BOOLEAN,
is_optional=False,
),
ParameterName.PERIODIC_INFORM_INTERVAL: TrParam(
- DEVICE_PATH + "ManagementServer.PeriodicInformInterval",
+ "Device.ManagementServer.PeriodicInformInterval",
is_invasive=False,
type=TrParameterType.INT,
is_optional=False,
),
# Performance management parameters
ParameterName.PERF_MGMT_ENABLE: TrParam(
- DEVICE_PATH + "FAP.PerfMgmt.Config.1.Enable",
+ "Device.FAP.PerfMgmt.Config.1.Enable",
is_invasive=False,
type=TrParameterType.BOOLEAN,
is_optional=False,
),
ParameterName.PERF_MGMT_UPLOAD_INTERVAL: TrParam(
- DEVICE_PATH + "FAP.PerfMgmt.Config.1.PeriodicUploadInterval",
+ "Device.FAP.PerfMgmt.Config.1.PeriodicUploadInterval",
is_invasive=False,
type=TrParameterType.INT,
is_optional=False,
),
ParameterName.PERF_MGMT_UPLOAD_URL: TrParam(
- DEVICE_PATH + "FAP.PerfMgmt.Config.1.URL",
+ "Device.FAP.PerfMgmt.Config.1.URL",
+ is_invasive=False,
+ type=TrParameterType.STRING,
+ is_optional=False,
+ ),
+ ParameterName.TX_POWER: TrParam(
+ FAPSERVICE_PATH + "CellConfig.LTE.RAN.RF.X_SCM_TxPowerConfig",
+ is_invasive=True,
+ type=TrParameterType.INT,
+ is_optional=False,
+ ),
+ ParameterName.TUNNEL_TYPE: TrParam(
+ FAPSERVICE_PATH + "CellConfig.LTE.Tunnel.1.TunnelRef",
is_invasive=False,
type=TrParameterType.STRING,
is_optional=False,
@@ -740,7 +795,6 @@
PARAMETERS.update(SASParameters.SAS_PARAMETERS)
PARAMETERS.update(FreedomFiOneMiscParameters.MISC_PARAMETERS)
PARAMETERS.update(StatusParameters.STATUS_PARAMETERS)
- # These are stateful parameters that have no tr-69 representation
PARAMETERS.update(StatusParameters.DERIVED_STATUS_PARAMETERS)
TRANSFORMS_FOR_MAGMA = {
@@ -812,7 +866,6 @@
"""
SAS_KEY = "sas"
- WEB_UI_ENABLE_LIST_KEY = "web_ui_enable_list"
def __init__(self, acs: EnodebAcsStateMachine):
super().__init__()
@@ -821,29 +874,9 @@
def postprocess(
self, mconfig: Any, service_cfg: Any, desired_cfg: EnodebConfiguration,
) -> None:
-
- desired_cfg.delete_parameter(ParameterName.EARFCNDL)
- desired_cfg.delete_parameter(ParameterName.DL_BANDWIDTH)
- desired_cfg.delete_parameter(ParameterName.UL_BANDWIDTH)
-
- # go through misc parameters and set them to default.
- for name, val in FreedomFiOneMiscParameters.defaults.items():
- desired_cfg.set_parameter(name, val)
-
# Bump up the parameter key version
self.acs.parameter_version_inc()
- if self.WEB_UI_ENABLE_LIST_KEY in service_cfg:
- serial_nos = service_cfg.get(self.WEB_UI_ENABLE_LIST_KEY)
- if self.acs.device_cfg.has_parameter(ParameterName.SERIAL_NUMBER,):
- if self.acs.get_parameter(ParameterName.SERIAL_NUMBER) in serial_nos:
- desired_cfg.set_parameter(
- FreedomFiOneMiscParameters.WEB_UI_ENABLE, True,
- )
- else:
- # This should not happen
- EnodebdLogger.error("Serial number unknown for device")
-
# Load eNB customized configuration from "./magma_config/serial_number/"
# and configure each connected eNB based on serial number
enbcfg = load_enb_config()
@@ -866,9 +899,10 @@
Some eNB parameters are read only and updated by the eNB itself.
"""
- def __init__(self, acs: EnodebAcsStateMachine, when_done: str):
+ def __init__(self, acs: EnodebAcsStateMachine, when_upgrade: str, when_done: str):
super().__init__()
self.acs = acs
+ self.upgrade_transition = when_upgrade
self.done_transition = when_done
def get_msg(self, message: Any) -> AcsMsgAndTransition:
@@ -877,11 +911,6 @@
request.ParameterNames = models.ParameterNames()
request.ParameterNames.string = []
- # request = models.GetParameterNames()
- # request.ParameterPath = "Device."
- # request.NextLevel = False
-
- # Get the status parameters which was defined in Line 171
for _, tr_param in StatusParameters.STATUS_PARAMETERS.items():
path = tr_param.path
request.ParameterNames.string.append(path)
@@ -905,7 +934,15 @@
name_to_val, self.acs.device_cfg,
)
- return AcsReadMsgResult(msg_handled=True, next_state=self.done_transition,)
+ print("In get transient state", name_to_val, type(name_to_val))
+ if name_to_val["SW version"] != "TEST3918@210224":
+ print("Get into Firmware Upgrade state")
+ return AcsReadMsgResult(
+ msg_handled=True, next_state=self.upgrade_transition
+ )
+
+ print("Skip firmware upgrade, configure the enb")
+ return AcsReadMsgResult(msg_handled=True, next_state=self.done_transition)
def state_description(self) -> str:
return "Getting transient read-only parameters"
@@ -1005,6 +1042,8 @@
obj_name = ParameterName.PLMN_N % i
desired = obj_to_params[obj_name]
names += desired
+
+ print(obj_to_params)
return names
def get_msg(self, message: Any) -> AcsMsgAndTransition: