Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common_upgrades/add_to_base_iocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(
self._xml_to_add = xml_to_add

def perform(self, file_access: FileAccess, logger: LocalLogger) -> int:
"""Add the autostart of the given.
"""Add the autostart of the given IOC.

Args:
file_access (FileAccess): file access.
Expand Down
18 changes: 16 additions & 2 deletions src/upgrade_step_from_25p2p1p1.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
from src.common_upgrades import change_pv_in_dashboard as dashboard
from src.common_upgrades.add_to_base_iocs import AddToBaseIOCs
from src.file_access import FileAccess
from src.local_logger import LocalLogger
from src.upgrade_step import UpgradeStep

XML_TO_ADD = """\
<ioc autostart="true" name="FWDR" restart="true" simlevel="none">
<macros/>
<pvs/>
<pvsets/>
</ioc>
"""


class UpgradeFrom25p2p1p1(UpgradeStep):
"""
Add calculation to dashboard to display when in test clock
Add calculation to dashboard to display when in test clock, also add FWDR to base IOCs.
"""

def perform(self, file_access: FileAccess, logger: LocalLogger) -> int:
Expand Down Expand Up @@ -35,4 +44,9 @@ def perform(self, file_access: FileAccess, logger: LocalLogger) -> int:
pass_fail = 1

reader.write_file(file)
return pass_fail

base_ioc_add_success = AddToBaseIOCs("FWDR", "BSKAFKA", XML_TO_ADD).perform(
file_access, logger
)

return pass_fail | base_ioc_add_success
2 changes: 1 addition & 1 deletion upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
("25.2.1", UpgradeFrom25p2p1()),
("25.2.1.1", UpgradeFrom25p2p1p1()),
("25.2.2", None),
# to add step see https://github.com/ISISComputingGroup/ibex_developers_manual/wiki/Config-Upgrader#adding-an-upgrade-step
# to add step see README.md
]

if __name__ == "__main__":
Expand Down
Loading