diff --git a/CHANGELOG.md b/CHANGELOG.md index 43ef8fc..c85a23d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - `TransactionStep.SENDING_ACK_OF_FINISHED` for source handler which is not required anymore. +## Changed + +- Replaced `*Cfg*` abbreviation with `*Config*` + # [v0.5.1] 2025-02-10 - Bump allowed `spacepackets` to v0.28.0 diff --git a/examples/cfdp-cli-udp/common.py b/examples/cfdp-cli-udp/common.py index 9ade7c3..cef0933 100644 --- a/examples/cfdp-cli-udp/common.py +++ b/examples/cfdp-cli-udp/common.py @@ -37,8 +37,8 @@ CheckTimerProvider, DefaultFaultHandlerBase, EntityType, - IndicationCfg, - RemoteEntityCfg, + IndicationConfig, + RemoteEntityConfig, ) from cfdppy.user import ( CfdpUserBase, @@ -58,13 +58,13 @@ LOCAL_ENTITY_ID = ByteFieldU16(1) REMOTE_ENTITY_ID = ByteFieldU16(2) # Enable all indications for both local and remote entity. -INDICATION_CFG = IndicationCfg() +INDICATION_CFG = IndicationConfig() FILE_CONTENT = "Hello World!\n" FILE_SEGMENT_SIZE = 256 MAX_PACKET_LEN = 512 -REMOTE_CFG_OF_LOCAL_ENTITY = RemoteEntityCfg( +REMOTE_CFG_OF_LOCAL_ENTITY = RemoteEntityConfig( entity_id=LOCAL_ENTITY_ID, max_packet_len=MAX_PACKET_LEN, max_file_segment_len=FILE_SEGMENT_SIZE, diff --git a/examples/cfdp-cli-udp/local.py b/examples/cfdp-cli-udp/local.py index 0f4512b..2dd7c29 100755 --- a/examples/cfdp-cli-udp/local.py +++ b/examples/cfdp-cli-udp/local.py @@ -36,8 +36,8 @@ from cfdppy.handler.dest import DestHandler from cfdppy.handler.source import SourceHandler from cfdppy.mib import ( - LocalEntityCfg, - RemoteEntityCfgTable, + LocalEntityConfig, + RemoteEntityConfigTable, ) _LOGGER = logging.getLogger(__name__) @@ -80,7 +80,7 @@ def main() -> None: basicConfig(level=logging_level) - remote_cfg_table = RemoteEntityCfgTable() + remote_cfg_table = RemoteEntityConfigTable() remote_cfg_table.add_config(REMOTE_CFG_OF_REMOTE_ENTITY) src_fault_handler = CfdpFaultHandler(BASE_STR_SRC) @@ -89,7 +89,7 @@ def main() -> None: src_user = CfdpUser(BASE_STR_SRC, PUT_REQ_QUEUE) check_timer_provider = CustomCheckTimerProvider() source_handler = SourceHandler( - cfg=LocalEntityCfg(LOCAL_ENTITY_ID, INDICATION_CFG, src_fault_handler), + cfg=LocalEntityConfig(LOCAL_ENTITY_ID, INDICATION_CFG, src_fault_handler), seq_num_provider=src_seq_count_provider, remote_cfg_table=remote_cfg_table, user=src_user, @@ -109,7 +109,7 @@ def main() -> None: dest_fault_handler = CfdpFaultHandler(BASE_STR_DEST) dest_user = CfdpUser(BASE_STR_DEST, PUT_REQ_QUEUE) dest_handler = DestHandler( - cfg=LocalEntityCfg(LOCAL_ENTITY_ID, INDICATION_CFG, dest_fault_handler), + cfg=LocalEntityConfig(LOCAL_ENTITY_ID, INDICATION_CFG, dest_fault_handler), user=dest_user, remote_cfg_table=remote_cfg_table, check_timer_provider=check_timer_provider, diff --git a/examples/cfdp-cli-udp/remote.py b/examples/cfdp-cli-udp/remote.py index 164d54c..4124dd4 100755 --- a/examples/cfdp-cli-udp/remote.py +++ b/examples/cfdp-cli-udp/remote.py @@ -25,8 +25,8 @@ from cfdppy.handler.dest import DestHandler from cfdppy.handler.source import SourceHandler from cfdppy.mib import ( - LocalEntityCfg, - RemoteEntityCfgTable, + LocalEntityConfig, + RemoteEntityConfigTable, ) _LOGGER = logging.getLogger(__name__) @@ -62,11 +62,11 @@ def main() -> None: # 16 bit sequence count for transactions. src_seq_count_provider = SeqCountProvider(16) src_user = CfdpUser(BASE_STR_SRC, PUT_REQ_QUEUE) - remote_cfg_table = RemoteEntityCfgTable() + remote_cfg_table = RemoteEntityConfigTable() remote_cfg_table.add_config(REMOTE_CFG_OF_LOCAL_ENTITY) check_timer_provider = CustomCheckTimerProvider() source_handler = SourceHandler( - cfg=LocalEntityCfg(REMOTE_ENTITY_ID, INDICATION_CFG, src_fault_handler), + cfg=LocalEntityConfig(REMOTE_ENTITY_ID, INDICATION_CFG, src_fault_handler), user=src_user, remote_cfg_table=remote_cfg_table, check_timer_provider=check_timer_provider, @@ -86,7 +86,7 @@ def main() -> None: dest_fault_handler = CfdpFaultHandler(BASE_STR_DEST) dest_user = CfdpUser(BASE_STR_DEST, PUT_REQ_QUEUE) dest_handler = DestHandler( - cfg=LocalEntityCfg(REMOTE_ENTITY_ID, INDICATION_CFG, dest_fault_handler), + cfg=LocalEntityConfig(REMOTE_ENTITY_ID, INDICATION_CFG, dest_fault_handler), user=dest_user, remote_cfg_table=remote_cfg_table, check_timer_provider=check_timer_provider, diff --git a/examples/cfdp-libre-cube-crosstest/common.py b/examples/cfdp-libre-cube-crosstest/common.py index bee47b5..39a8f0f 100755 --- a/examples/cfdp-libre-cube-crosstest/common.py +++ b/examples/cfdp-libre-cube-crosstest/common.py @@ -1,7 +1,7 @@ from spacepackets.cfdp import ChecksumType, TransmissionMode from spacepackets.util import ByteFieldU16 -from cfdppy.mib import RemoteEntityCfg +from cfdppy.mib import RemoteEntityConfig SOURCE_ENTITY_ID = 2 REMOTE_ENTITY_ID = 3 @@ -12,7 +12,7 @@ FILE_SEGMENT_SIZE = 128 MAX_PACKET_LEN = 512 -REMOTE_CFG_FOR_DEST_ENTITY = RemoteEntityCfg( +REMOTE_CFG_FOR_DEST_ENTITY = RemoteEntityConfig( entity_id=ByteFieldU16(REMOTE_ENTITY_ID), max_packet_len=MAX_PACKET_LEN, max_file_segment_len=FILE_SEGMENT_SIZE, diff --git a/examples/cfdp-libre-cube-crosstest/tmtccmd-client.py b/examples/cfdp-libre-cube-crosstest/tmtccmd-client.py index a29087c..ea93f81 100755 --- a/examples/cfdp-libre-cube-crosstest/tmtccmd-client.py +++ b/examples/cfdp-libre-cube-crosstest/tmtccmd-client.py @@ -36,9 +36,9 @@ CheckTimerProvider, DefaultFaultHandlerBase, EntityType, - IndicationCfg, - LocalEntityCfg, - RemoteEntityCfgTable, + IndicationConfig, + LocalEntityConfig, + RemoteEntityConfigTable, ) from cfdppy.request import PutRequest from cfdppy.user import ( @@ -217,12 +217,12 @@ def main() -> None: with open(SOURCE_FILE, "w") as file: file.write(FILE_CONTENT) - remote_cfg_table = RemoteEntityCfgTable([REMOTE_CFG_FOR_DEST_ENTITY]) + remote_cfg_table = RemoteEntityConfigTable([REMOTE_CFG_FOR_DEST_ENTITY]) # Enable all indications. - src_indication_cfg = IndicationCfg() + src_indication_cfg = IndicationConfig() src_fault_handler = CfdpFaultHandler() - src_entity_cfg = LocalEntityCfg(SOURCE_ENTITY_ID, src_indication_cfg, src_fault_handler) + src_entity_cfg = LocalEntityConfig(SOURCE_ENTITY_ID, src_indication_cfg, src_fault_handler) # 16 bit sequence count for transactions. src_seq_count_provider = SeqCountProvider(16) src_user = CfdpUser("SRC ENTITY") diff --git a/examples/cfdp-simple/file-copy-example.py b/examples/cfdp-simple/file-copy-example.py index 9f6161f..7f1b43e 100755 --- a/examples/cfdp-simple/file-copy-example.py +++ b/examples/cfdp-simple/file-copy-example.py @@ -33,10 +33,10 @@ CheckTimerProvider, DefaultFaultHandlerBase, EntityType, - IndicationCfg, - LocalEntityCfg, - RemoteEntityCfg, - RemoteEntityCfgTable, + IndicationConfig, + LocalEntityConfig, + RemoteEntityConfig, + RemoteEntityConfigTable, ) from cfdppy.request import PutRequest from cfdppy.user import ( @@ -67,7 +67,7 @@ class TransferParams: _LOGGER = logging.getLogger() -REMOTE_CFG_FOR_SOURCE_ENTITY = RemoteEntityCfg( +REMOTE_CFG_FOR_SOURCE_ENTITY = RemoteEntityConfig( entity_id=SOURCE_ENTITY_ID, max_packet_len=MAX_PACKET_LEN, max_file_segment_len=FILE_SEGMENT_SIZE, @@ -235,14 +235,14 @@ def main() -> None: with open(SOURCE_FILE, "w") as file: file.write(FILE_CONTENT) - remote_cfg_table = RemoteEntityCfgTable() + remote_cfg_table = RemoteEntityConfigTable() remote_cfg_table.add_config(REMOTE_CFG_FOR_SOURCE_ENTITY) remote_cfg_table.add_config(REMOTE_CFG_FOR_DEST_ENTITY) # Enable all indications. - src_indication_cfg = IndicationCfg() + src_indication_cfg = IndicationConfig() src_fault_handler = CfdpFaultHandler() - src_entity_cfg = LocalEntityCfg(SOURCE_ENTITY_ID, src_indication_cfg, src_fault_handler) + src_entity_cfg = LocalEntityConfig(SOURCE_ENTITY_ID, src_indication_cfg, src_fault_handler) # 16 bit sequence count for transactions. src_seq_count_provider = SeqCountProvider(16) src_user = CfdpUser("SRC ENTITY") @@ -262,9 +262,9 @@ def main() -> None: ) # Enable all indications. - dest_indication_cfg = IndicationCfg() + dest_indication_cfg = IndicationConfig() dest_fault_handler = CfdpFaultHandler() - dest_entity_cfg = LocalEntityCfg(DEST_ENTITY_ID, dest_indication_cfg, dest_fault_handler) + dest_entity_cfg = LocalEntityConfig(DEST_ENTITY_ID, dest_indication_cfg, dest_fault_handler) dest_user = CfdpUser("DEST ENTITY") dest_handler = DestHandler( cfg=dest_entity_cfg, diff --git a/src/cfdppy/__init__.py b/src/cfdppy/__init__.py index 27941f7..73f662b 100644 --- a/src/cfdppy/__init__.py +++ b/src/cfdppy/__init__.py @@ -8,10 +8,10 @@ from .filestore import HostFilestore, VirtualFilestore from .handler.common import PacketDestination, get_packet_destination from .mib import ( - IndicationCfg, - LocalEntityCfg, - RemoteEntityCfg, - RemoteEntityCfgTable, + IndicationConfig, + LocalEntityConfig, + RemoteEntityConfig, + RemoteEntityConfigTable, ) from .request import PutRequest from .restricted_filestore import RestrictedFilestore @@ -22,12 +22,12 @@ "CfdpState", "CfdpUserBase", "HostFilestore", - "IndicationCfg", - "LocalEntityCfg", + "IndicationConfig", + "LocalEntityConfig", "PacketDestination", "PutRequest", - "RemoteEntityCfg", - "RemoteEntityCfgTable", + "RemoteEntityConfig", + "RemoteEntityConfigTable", "RestrictedFilestore", "TransactionId", "VirtualFilestore", diff --git a/src/cfdppy/handler/__init__.py b/src/cfdppy/handler/__init__.py index 1a591fe..5713ab7 100644 --- a/src/cfdppy/handler/__init__.py +++ b/src/cfdppy/handler/__init__.py @@ -1,9 +1,9 @@ from spacepackets.seqcount import ProvidesSeqCount from cfdppy.mib import ( - LocalEntityCfg, - RemoteEntityCfg, - RemoteEntityCfgTable, + LocalEntityConfig, + RemoteEntityConfig, + RemoteEntityConfigTable, ) from .common import PacketDestination, get_packet_destination @@ -17,11 +17,11 @@ "DestStateWrapper", "DestTransactionStep", "FsmResult", - "LocalEntityCfg", + "LocalEntityConfig", "PacketDestination", "ProvidesSeqCount", - "RemoteEntityCfg", - "RemoteEntityCfgTable", + "RemoteEntityConfig", + "RemoteEntityConfigTable", "SourceHandler", "SourceStateWrapper", "SourceTransactionStep", diff --git a/src/cfdppy/handler/dest.py b/src/cfdppy/handler/dest.py index d3bf493..6ae3cf6 100644 --- a/src/cfdppy/handler/dest.py +++ b/src/cfdppy/handler/dest.py @@ -56,9 +56,9 @@ from cfdppy.mib import ( CheckTimerProvider, EntityType, - LocalEntityCfg, - RemoteEntityCfg, - RemoteEntityCfgTable, + LocalEntityConfig, + RemoteEntityConfig, + RemoteEntityConfigTable, ) from cfdppy.user import ( CfdpUserBase, @@ -238,7 +238,7 @@ class _DestFieldWrapper: def __init__(self): self.transaction_id: TransactionId | None = None - self.remote_cfg: RemoteEntityCfg | None = None + self.remote_cfg: RemoteEntityConfig | None = None self.check_timer: Countdown | None = None self.current_check_count: int = 0 self.closure_requested: bool = False @@ -319,9 +319,9 @@ class DestHandler: def __init__( self, - cfg: LocalEntityCfg, + cfg: LocalEntityConfig, user: CfdpUserBase, - remote_cfg_table: RemoteEntityCfgTable, + remote_cfg_table: RemoteEntityConfigTable, check_timer_provider: CheckTimerProvider, ) -> None: self.cfg = cfg diff --git a/src/cfdppy/handler/source.py b/src/cfdppy/handler/source.py index 7e62657..328fe73 100644 --- a/src/cfdppy/handler/source.py +++ b/src/cfdppy/handler/source.py @@ -56,7 +56,7 @@ SourceFileDoesNotExist, UnretrievedPdusToBeSent, ) -from cfdppy.mib import CheckTimerProvider, EntityType, RemoteEntityCfgTable +from cfdppy.mib import CheckTimerProvider, EntityType, RemoteEntityConfigTable from cfdppy.user import TransactionFinishedParams, TransactionParams from .common import _PositiveAckProcedureParams @@ -69,8 +69,8 @@ from cfdppy import ( CfdpUserBase, - LocalEntityCfg, - RemoteEntityCfg, + LocalEntityConfig, + RemoteEntityConfig, ) from cfdppy.request import PutRequest @@ -146,7 +146,7 @@ def __init__(self, local_entity_id: UnsignedByteField): self.ack_params: _AckedModeParams = _AckedModeParams() self.fp: _SourceFileParams = _SourceFileParams.empty() self.finished_params: FinishedParams | None = None - self.remote_cfg: RemoteEntityCfg | None = None + self.remote_cfg: RemoteEntityConfig | None = None self.closure_requested: bool = False self.pdu_conf = PduConfig.empty() self.pdu_conf.source_entity_id = local_entity_id @@ -237,9 +237,9 @@ class SourceHandler: def __init__( self, - cfg: LocalEntityCfg, + cfg: LocalEntityConfig, user: CfdpUserBase, - remote_cfg_table: RemoteEntityCfgTable, + remote_cfg_table: RemoteEntityConfigTable, check_timer_provider: CheckTimerProvider, seq_num_provider: ProvidesSeqCount, ): @@ -457,7 +457,7 @@ def state_machine(self, packet: AbstractFileDirectiveBase | None = None) -> FsmR Invalid PDU file directive type. PduIgnoredForSource The specified PDU can not be handled in the current state. - NoRemoteEntityCfgFound + NoRemoteEntityConfigFound No remote configuration found for specified destination entity. InvalidSourceId Source ID not identical to local entity ID. diff --git a/src/cfdppy/mib.py b/src/cfdppy/mib.py index 4892bf3..bece91a 100644 --- a/src/cfdppy/mib.py +++ b/src/cfdppy/mib.py @@ -150,7 +150,7 @@ def provide_check_timer( @dataclass -class IndicationCfg: +class IndicationConfig: eof_sent_indication_required: bool = True eof_recv_indication_required: bool = True file_segment_recvd_indication_required: bool = True @@ -160,17 +160,17 @@ class IndicationCfg: @dataclass -class LocalEntityCfg: +class LocalEntityConfig: """This models the remote entity configuration information as specified in chapter 8.2 of the CFDP standard.""" local_entity_id: UnsignedByteField - indication_cfg: IndicationCfg + indication_cfg: IndicationConfig default_fault_handlers: DefaultFaultHandlerBase @dataclass -class RemoteEntityCfg: +class RemoteEntityConfig: """This models the remote entity configuration information as specified in chapter 8.3 of the CFDP standard. @@ -264,26 +264,26 @@ class RemoteEntityCfg: cfdp_version: int = CFDP_VERSION_2 -class RemoteEntityCfgTable: +class RemoteEntityConfigTable: """Thin abstraction for a dictionary containing remote configurations with the remote entity ID being used as a key.""" - def __init__(self, init_cfgs: Sequence[RemoteEntityCfg] | None = None): + def __init__(self, init_cfgs: Sequence[RemoteEntityConfig] | None = None): self._remote_entity_dict = {} if init_cfgs is not None: self.add_configs(init_cfgs) - def add_config(self, cfg: RemoteEntityCfg) -> bool: + def add_config(self, cfg: RemoteEntityConfig) -> bool: if cfg.entity_id in self._remote_entity_dict: return False self._remote_entity_dict.update({cfg.entity_id.value: cfg}) return True - def add_configs(self, cfgs: Sequence[RemoteEntityCfg]) -> None: + def add_configs(self, cfgs: Sequence[RemoteEntityConfig]) -> None: for cfg in cfgs: if cfg.entity_id in self._remote_entity_dict: continue self._remote_entity_dict.update({cfg.entity_id.value: cfg}) - def get_cfg(self, remote_entity_id: UnsignedByteField) -> RemoteEntityCfg | None: + def get_cfg(self, remote_entity_id: UnsignedByteField) -> RemoteEntityConfig | None: return self._remote_entity_dict.get(remote_entity_id.value) diff --git a/tests/test_dest_handler.py b/tests/test_dest_handler.py index 8846358..9acce7b 100644 --- a/tests/test_dest_handler.py +++ b/tests/test_dest_handler.py @@ -41,10 +41,10 @@ from spacepackets.util import ByteFieldU8, ByteFieldU16 from cfdppy import ( - IndicationCfg, - LocalEntityCfg, - RemoteEntityCfg, - RemoteEntityCfgTable, + IndicationConfig, + LocalEntityConfig, + RemoteEntityConfig, + RemoteEntityConfigTable, ) from cfdppy.defs import CfdpState from cfdppy.handler.dest import ( @@ -73,11 +73,11 @@ class FileInfo: class TestDestHandlerBase(TestCase): def common_setup(self, trans_mode: TransmissionMode): self.setUpPyfakefs() - self.indication_cfg = IndicationCfg(True, True, True, True, True, True) + self.indication_cfg = IndicationConfig(True, True, True, True, True, True) self.fault_handler = FaultHandler() self.fault_handler.notice_of_cancellation_cb = MagicMock() self.entity_id = ByteFieldU16(2) - self.local_cfg = LocalEntityCfg(self.entity_id, self.indication_cfg, self.fault_handler) + self.local_cfg = LocalEntityConfig(self.entity_id, self.indication_cfg, self.fault_handler) self.src_entity_id = ByteFieldU16(1) self.src_pdu_conf = PduConfig( source_entity_id=self.src_entity_id, @@ -95,10 +95,10 @@ def common_setup(self, trans_mode: TransmissionMode): self.cfdp_user.metadata_recv_indication = MagicMock() self.cfdp_user.transaction_finished_indication = MagicMock() self.file_segment_len = 128 - self.remote_cfg_table = RemoteEntityCfgTable() + self.remote_cfg_table = RemoteEntityConfigTable() self.timeout_nak_procedure_seconds = 0.05 self.timeout_positive_ack_procedure_seconds = 0.05 - self.remote_cfg = RemoteEntityCfg( + self.remote_cfg = RemoteEntityConfig( entity_id=self.src_entity_id, check_limit=2, crc_type=ChecksumType.CRC_32, diff --git a/tests/test_dest_handler_naked.py b/tests/test_dest_handler_naked.py index a90e14f..bbc48d5 100644 --- a/tests/test_dest_handler_naked.py +++ b/tests/test_dest_handler_naked.py @@ -23,7 +23,7 @@ from spacepackets.cfdp.pdu.file_data import FileDataParams from cfdppy import ( - RemoteEntityCfgTable, + RemoteEntityConfigTable, ) from cfdppy.defs import CfdpState from cfdppy.exceptions import NoRemoteEntityConfigFound @@ -106,7 +106,7 @@ def test_larger_file_reception_with_closure(self): def test_remote_cfg_does_not_exist(self): # Re-create empty table - self.remote_cfg_table = RemoteEntityCfgTable() + self.remote_cfg_table = RemoteEntityConfigTable() self.dest_handler = DestHandler( self.local_cfg, self.cfdp_user, diff --git a/tests/test_src_handler.py b/tests/test_src_handler.py index ecd0c45..c99dd1f 100644 --- a/tests/test_src_handler.py +++ b/tests/test_src_handler.py @@ -25,10 +25,10 @@ from cfdppy import ( CfdpState, - IndicationCfg, - LocalEntityCfg, - RemoteEntityCfg, - RemoteEntityCfgTable, + IndicationConfig, + LocalEntityConfig, + RemoteEntityConfig, + RemoteEntityConfigTable, ) from cfdppy.exceptions import UnretrievedPdusToBeSent from cfdppy.handler import FsmResult, SourceHandler @@ -60,14 +60,14 @@ class TestCfdpSourceHandler(TestCase): def common_setup(self, closure_requested: bool, default_transmission_mode: TransmissionMode): self.setUpPyfakefs() self.closure_requested = closure_requested - self.indication_cfg = IndicationCfg(True, True, True, True, True, True) + self.indication_cfg = IndicationConfig(True, True, True, True, True, True) self.fault_handler = FaultHandler() self.fault_handler.notice_of_cancellation_cb = MagicMock() self.fault_handler.notice_of_suspension_cb = MagicMock() self.fault_handler.abandoned_cb = MagicMock() self.fault_handler.ignore_cb = MagicMock() print(self.fault_handler.notice_of_cancellation_cb) - self.local_cfg = LocalEntityCfg(ByteFieldU16(1), self.indication_cfg, self.fault_handler) + self.local_cfg = LocalEntityConfig(ByteFieldU16(1), self.indication_cfg, self.fault_handler) self.cfdp_user = CfdpUser() self.cfdp_user.eof_sent_indication = MagicMock() self.cfdp_user.transaction_indication = MagicMock() @@ -81,7 +81,7 @@ def common_setup(self, closure_requested: bool, default_transmission_mode: Trans self.file_segment_len = 64 self.max_packet_len = 256 self.positive_ack_intvl_seconds = 0.02 - self.default_remote_cfg = RemoteEntityCfg( + self.default_remote_cfg = RemoteEntityConfig( entity_id=self.dest_id, max_packet_len=self.max_packet_len, max_file_segment_len=self.file_segment_len, @@ -95,7 +95,7 @@ def common_setup(self, closure_requested: bool, default_transmission_mode: Trans ) self.alternative_remote_cfg = copy.copy(self.default_remote_cfg) self.alternative_remote_cfg.entity_id = self.alternative_dest_id - self.remote_cfg_table = RemoteEntityCfgTable() + self.remote_cfg_table = RemoteEntityConfigTable() self.remote_cfg_table.add_config(self.default_remote_cfg) self.remote_cfg_table.add_config(self.alternative_remote_cfg) # Create an empty file and send it via CFDP diff --git a/tests/test_src_handler_restricted.py b/tests/test_src_handler_restricted.py index 77b5330..53c0f9e 100644 --- a/tests/test_src_handler_restricted.py +++ b/tests/test_src_handler_restricted.py @@ -32,11 +32,11 @@ from cfdppy import ( CfdpState, - IndicationCfg, - LocalEntityCfg, + IndicationConfig, + LocalEntityConfig, PutRequest, - RemoteEntityCfg, - RemoteEntityCfgTable, + RemoteEntityConfig, + RemoteEntityConfigTable, RestrictedFilestore, ) from cfdppy.handler import SourceHandler @@ -50,10 +50,10 @@ def setUp(self): super().setUp() self.temp_dir = Path(tempfile.mkdtemp()) self.closure_requested = False - self.indication_cfg = IndicationCfg(True, True, True, True, True, True) + self.indication_cfg = IndicationConfig(True, True, True, True, True, True) self.fault_handler = MagicMock() self.fault_handler.mock_add_spec(spec=FaultHandler, spec_set=True) - self.local_cfg = LocalEntityCfg(ByteFieldU16(1), self.indication_cfg, self.fault_handler) + self.local_cfg = LocalEntityConfig(ByteFieldU16(1), self.indication_cfg, self.fault_handler) self.cfdp_user = CfdpUser(vfs=RestrictedFilestore(self.temp_dir)) self.seq_num_provider = SeqCountProvider(bit_width=8) self.expected_seq_num = 0 @@ -63,7 +63,7 @@ def setUp(self): self.file_segment_len = 64 self.max_packet_len = 256 self.positive_ack_intvl_seconds = 0.02 - self.default_remote_cfg = RemoteEntityCfg( + self.default_remote_cfg = RemoteEntityConfig( entity_id=self.dest_id, max_packet_len=self.max_packet_len, max_file_segment_len=self.file_segment_len, @@ -77,7 +77,7 @@ def setUp(self): ) self.alternative_remote_cfg = copy.copy(self.default_remote_cfg) self.alternative_remote_cfg.entity_id = self.alternative_dest_id - self.remote_cfg_table = RemoteEntityCfgTable() + self.remote_cfg_table = RemoteEntityConfigTable() self.remote_cfg_table.add_config(self.default_remote_cfg) self.remote_cfg_table.add_config(self.alternative_remote_cfg) # Create an empty file and send it via CFDP