Skip to content

Commit

Permalink
Merge pull request #1263 from chidanandpujar/exvc_sw_install_unlink_fix
Browse files Browse the repository at this point in the history
fix for issue #1247
  • Loading branch information
chidanandpujar authored Sep 29, 2023
2 parents ba799a8 + d8ee407 commit 9118b56
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/jnpr/junos/utils/sw.py
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,8 @@ def _progress(report):
for x in self._RE_list
if re.search(r"(\d+)", x)
]
vc_members.remove(self.dev.facts["vc_master"])
vc_members.insert(len(vc_members), self.dev.facts["vc_master"])
for vc_id in vc_members:
if vc_id in member_id:
_progress(
Expand Down Expand Up @@ -1031,6 +1033,8 @@ def _progress(report):
for x in self._RE_list
if re.search(r"(\d+)", x)
]
vc_members.remove(self.dev.facts["vc_master"])
vc_members.insert(len(vc_members), self.dev.facts["vc_master"])
for vc_id in vc_members:
_progress(
"installing software on VC member: {} ... please "
Expand Down
3 changes: 3 additions & 0 deletions tests/unit/utils/test_sw.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@ def test_sw_install_multi_vc(self, mock_pkgadd):
@patch("jnpr.junos.utils.sw.SW.pkgadd")
def test_sw_install_multi_vc_member_id(self, mock_pkgadd):
mock_pkgadd.return_value = True, "msg"
self.dev.facts["vc_master"] = '0'
self.sw._multi_RE = True
self.sw._multi_VC = True
self.sw._RE_list = ("version_RE0", "version_RE1")
Expand All @@ -684,6 +685,7 @@ def test_sw_install_multi_vc_member_id(self, mock_pkgadd):
@patch("jnpr.junos.utils.sw.SW.pkgadd")
def test_sw_install_multi_vc_multiple_member_id(self, mock_pkgadd):
mock_pkgadd.return_value = True, "msg"
self.dev.facts["vc_master"] = '0'
self.sw._multi_RE = False
self.sw._multi_VC_nsync = True
self.sw._RE_list = ("version_RE0", "version_RE1")
Expand All @@ -692,6 +694,7 @@ def test_sw_install_multi_vc_multiple_member_id(self, mock_pkgadd):
@patch("jnpr.junos.utils.sw.SW.pkgadd")
def test_sw_install_mixed_vc(self, mock_pkgadd):
mock_pkgadd.return_value = True
self.dev.facts["vc_master"] = '0'
self.sw._mixed_VC = True
self.sw._RE_list = ("version_RE0", "version_RE1")
self.assertTrue(self.sw.install(pkg_set=["abc.tgz", "pqr.tgz"], no_copy=True))
Expand Down

0 comments on commit 9118b56

Please sign in to comment.