82d417b9e6
Fresh start for the StarlingX automation framework. Change-Id: Ie265e0791024f45f71faad6315c2b91b022934d1
31 lines
809 B
Python
31 lines
809 B
Python
from keywords.base_keyword import BaseKeyword
|
|
from keywords.linux.ifconfig.object.ifconfig_output import IfConfigOutput
|
|
|
|
|
|
class IfConfigKeywords(BaseKeyword):
|
|
"""
|
|
Class for "ifconfig" command keywords
|
|
"""
|
|
|
|
def __init__(self, ssh_connection):
|
|
"""
|
|
Constructor
|
|
Args:
|
|
ssh_connection:
|
|
"""
|
|
self.ssh_connection = ssh_connection
|
|
|
|
def get_ifconfig(self, application_name) -> [IfConfigOutput]:
|
|
"""
|
|
Gets the output of 'ifconfig' command as a IfConfigOutput object.
|
|
Args: None.
|
|
|
|
Returns: IfConfigOutput
|
|
|
|
"""
|
|
output = self.ssh_connection.send('ifconfig -a')
|
|
self.validate_success_return_code(self.ssh_connection)
|
|
ifconfig_output = IfConfigOutput(output)
|
|
|
|
return ifconfig_output
|