Adding keywords and objects for both pmc get_default_data_set and get_parent_data_set Change-Id: Ie266390ee797d1c9886cbeb319694628165ec99a
28 lines
831 B
Python
28 lines
831 B
Python
from framework.ssh.ssh_connection import SSHConnection
|
|
from keywords.base_keyword import BaseKeyword
|
|
from keywords.ptp.cat.objects.cat_ptp_config_output import CATPtpConfigOutput
|
|
|
|
|
|
class CatPtpConfigKeywords(BaseKeyword):
|
|
"""
|
|
Class for Cat Ptp Config Keywords
|
|
"""
|
|
|
|
def __init__(self, ssh_connection: SSHConnection):
|
|
self.ssh_connection = ssh_connection
|
|
|
|
def cat_ptp_config(self, config_file: str) -> CATPtpConfigOutput:
|
|
"""
|
|
Run cat cpt config command
|
|
Args:
|
|
config_file (): the ptp config file
|
|
|
|
Returns: CatPtpConfigOutput
|
|
|
|
"""
|
|
output = self.ssh_connection.send(f'cat {config_file}')
|
|
self.validate_success_return_code(self.ssh_connection)
|
|
cat_ptp_config_output = CATPtpConfigOutput(output)
|
|
return cat_ptp_config_output
|
|
|