AETHER-3321 Refactor configuration code in enodebd
AETHER-3520 Make enodebd containerized
AETHER-3504 Geomap of Grafana with enodeb coordinate information
Change-Id: Ie425254fa1a8b286004d2bcd366cf6c7057c925c
diff --git a/devices/freedomfi_one.py b/devices/freedomfi_one.py
index 9ad6b00..6149ff6 100644
--- a/devices/freedomfi_one.py
+++ b/devices/freedomfi_one.py
@@ -1,8 +1,15 @@
-# SPDX-FileCopyrightText: 2020 The Magma Authors.
-# SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
-#
-# SPDX-License-Identifier: BSD-3-Clause
+"""
+Copyright 2020 The Magma Authors.
+This source code is licensed under the BSD-style license found in the
+LICENSE file in the root directory of this source tree.
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
import logging
from typing import Any, Callable, Dict, List, Optional, Type
@@ -41,9 +48,6 @@
EndSessionState,
EnodebAcsState,
ErrorState,
- DownloadState,
- WaitDownloadResponseState,
- WaitInformTransferCompleteState,
GetParametersState,
SetParameterValuesState,
WaitGetParametersState,
@@ -81,17 +85,7 @@
),
# 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",
+ self, when_done="get_params",
),
"get_params": FreedomFiOneGetObjectParametersState(
self,
@@ -338,18 +332,6 @@
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.
@@ -492,8 +474,6 @@
)
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])
@@ -570,6 +550,18 @@
is_optional=False,
),
# Device info
+ 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,
+ ),
ParameterName.IP_ADDRESS: TrParam(
"Device.IP.Interface.1.IPv4Address.1.IPAddress",
is_invasive=False,
@@ -652,7 +644,7 @@
ParameterName.SUBFRAME_ASSIGNMENT: TrParam(
FAPSERVICE_PATH + "CellConfig.LTE.RAN.PHY.TDDFrame.SubFrameAssignment",
is_invasive=False,
- type=TrParameterType.INT,
+ type=TrParameterType.BOOLEAN,
is_optional=False,
),
ParameterName.SPECIAL_SUBFRAME_PATTERN: TrParam(
@@ -661,12 +653,6 @@
type=TrParameterType.INT,
is_optional=False,
),
- ParameterName.CELL_ENABLE64QAM: TrParam(
- FAPSERVICE_PATH + "CellConfig.LTE.RAN.PHY.PUSCH.Enable64QAM",
- is_invasive=False,
- type=TrParameterType.BOOLEAN,
- is_optional=False,
- ),
ParameterName.CELL_ID: TrParam(
FAPSERVICE_PATH + "CellConfig.LTE.RAN.Common.CellIdentity",
is_invasive=False,
@@ -898,10 +884,9 @@
Some eNB parameters are read only and updated by the eNB itself.
"""
- def __init__(self, acs: EnodebAcsStateMachine, when_upgrade: str, when_done: str):
+ def __init__(self, acs: EnodebAcsStateMachine, 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:
@@ -910,6 +895,11 @@
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)
@@ -933,15 +923,7 @@
name_to_val, self.acs.device_cfg,
)
- 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)
+ return AcsReadMsgResult(msg_handled=True, next_state=self.done_transition,)
def state_description(self) -> str:
return "Getting transient read-only parameters"