Skip to content

Commit 14be0eb

Browse files
authored
Merge pull request #90 from ISISComputingGroup/add_fwdr_to_base_iocs
add forwarder to base iocs
2 parents a5322c9 + 226a147 commit 14be0eb

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

src/common_upgrades/add_to_base_iocs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__(
2323
self._xml_to_add = xml_to_add
2424

2525
def perform(self, file_access: FileAccess, logger: LocalLogger) -> int:
26-
"""Add the autostart of the given.
26+
"""Add the autostart of the given IOC.
2727
2828
Args:
2929
file_access (FileAccess): file access.

src/upgrade_step_from_25p2p1p1.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
from src.common_upgrades import change_pv_in_dashboard as dashboard
2+
from src.common_upgrades.add_to_base_iocs import AddToBaseIOCs
23
from src.file_access import FileAccess
34
from src.local_logger import LocalLogger
45
from src.upgrade_step import UpgradeStep
56

7+
XML_TO_ADD = """\
8+
<ioc autostart="true" name="FWDR" restart="true" simlevel="none">
9+
<macros/>
10+
<pvs/>
11+
<pvsets/>
12+
</ioc>
13+
"""
14+
615

716
class UpgradeFrom25p2p1p1(UpgradeStep):
817
"""
9-
Add calculation to dashboard to display when in test clock
18+
Add calculation to dashboard to display when in test clock, also add FWDR to base IOCs.
1019
"""
1120

1221
def perform(self, file_access: FileAccess, logger: LocalLogger) -> int:
@@ -35,4 +44,9 @@ def perform(self, file_access: FileAccess, logger: LocalLogger) -> int:
3544
pass_fail = 1
3645

3746
reader.write_file(file)
38-
return pass_fail
47+
48+
base_ioc_add_success = AddToBaseIOCs("FWDR", "BSKAFKA", XML_TO_ADD).perform(
49+
file_access, logger
50+
)
51+
52+
return pass_fail | base_ioc_add_success

upgrade.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
("25.2.1", UpgradeFrom25p2p1()),
8181
("25.2.1.1", UpgradeFrom25p2p1p1()),
8282
("25.2.2", None),
83-
# to add step see https://github.com/ISISComputingGroup/ibex_developers_manual/wiki/Config-Upgrader#adding-an-upgrade-step
83+
# to add step see README.md
8484
]
8585

8686
if __name__ == "__main__":

0 commit comments

Comments
 (0)