Files
test/config/lab/objects/credentials.py
croy 82d417b9e6 New StarlingX Automation Framework
Fresh start for the StarlingX automation framework.

Change-Id: Ie265e0791024f45f71faad6315c2b91b022934d1
2024-11-29 16:01:57 -05:00

33 lines
752 B
Python

class Credentials:
"""
Class to handle credential objects
"""
def __init__(self, credentials_dict: []):
self.user_name = credentials_dict['user_name']
self.password = credentials_dict['password']
def get_user_name(self) -> str:
"""
Getter for user name
Returns: the user name
"""
return self.user_name
def get_password(self) -> str:
"""
Getter for password
Returns: the password
"""
return self.password
def to_string(self) -> str:
"""
This function will return a single string representation of the Credentials object
Returns: str
"""
return f"{self.user_name} / {self.password}"