Skip to content

Commit

Permalink
fix user name
Browse files Browse the repository at this point in the history
  • Loading branch information
kthare10 committed Dec 13, 2024
1 parent a072836 commit 15386b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 3 additions & 0 deletions fabrictestbed_extensions/fablib/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,9 @@ def set_username(self, username: str = None):
:param username: Optional username parameter. The username
likely should be picked to match the image type.
"""
if self.get_fim_node().type == NodeType.Switch and not username:
self.username = "fabric"
return
if username is not None:
self.username = username
elif "default_centos9_stream" == self.get_image():
Expand Down
6 changes: 0 additions & 6 deletions fabrictestbed_extensions/fablib/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,3 @@ def get_interfaces(self) -> List[Interface] or None:
interfaces.append(Interface(node=self, fim_interface=ifs, model="NIC_P4"))

return interfaces

def set_username(self, username: str = None):
self.username = Constants.FABRIC_USER

def get_username(self) -> str:
return Constants.FABRIC_USER

0 comments on commit 15386b5

Please sign in to comment.