82d417b9e6
Fresh start for the StarlingX automation framework. Change-Id: Ie265e0791024f45f71faad6315c2b91b022934d1
24 lines
604 B
Python
24 lines
604 B
Python
from framework.ssh.ssh_connection import SSHConnection
|
|
from keywords.base_keyword import BaseKeyword
|
|
|
|
|
|
class TarKeywords(BaseKeyword):
|
|
"""
|
|
Class for linux tar command keywords
|
|
"""
|
|
|
|
def __init__(self, ssh_connection: SSHConnection):
|
|
self.ssh_connection = ssh_connection
|
|
|
|
def extract_tar_file(self, file_name: str):
|
|
"""
|
|
Extracts the given tar file
|
|
Args:
|
|
file_name (): the name of the file
|
|
|
|
Returns:
|
|
|
|
"""
|
|
self.ssh_connection.send(f'tar -xzvf {file_name}')
|
|
self.validate_success_return_code(self.ssh_connection)
|