Skip to content

Commit

Permalink
Removed unexpected behavior of import lab method (#121)
Browse files Browse the repository at this point in the history
When a lab with a specific title existed on a CML instance,
we joined that lab instead of creating a new lab with the same
title which would had been perfectly fine.  I believe that this
was some obsolete feature request from pre-CML 2.0 era where labs
possibly were enforced to have unique titles.

This feature requests was in my opinion by mistake delivered
in CML 2.7.0 and should be removed.  More importantly, it is
causing harm when working with deleted labs #120.
  • Loading branch information
tmikuska authored Oct 16, 2024
1 parent 481c00a commit 3a995a8
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions virl2_client/virl2_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,13 +542,6 @@ def import_lab(
:raises httpx.HTTPError: If there was a transport error.
"""
_deprecated_argument(self.import_lab, offline, "offline")

if title is not None:
for lab_id in self._labs:
if (lab := self._labs[lab_id]).title == title:
# Lab of this title already exists, sync and return it
lab.sync()
return lab
lab = self._create_imported_lab(topology, title, virl_1x)
lab.sync()
self._labs[lab.id] = lab
Expand Down

0 comments on commit 3a995a8

Please sign in to comment.