82d417b9e6
Fresh start for the StarlingX automation framework. Change-Id: Ie265e0791024f45f71faad6315c2b91b022934d1
26 lines
912 B
Python
26 lines
912 B
Python
from framework.ssh.ssh_connection import SSHConnection
|
|
from keywords.base_keyword import BaseKeyword
|
|
from keywords.k8s.daemonsets.objects.kubectl_get_daemonsets_output import KubectlGetDaemonsetsOutput
|
|
from keywords.k8s.k8s_command_wrapper import export_k8s_config
|
|
|
|
|
|
class KubectlGetDaemonsetsKeywords(BaseKeyword):
|
|
"""
|
|
Kubectl get daemonsets keywords class
|
|
"""
|
|
|
|
def __init__(self, ssh_connection: SSHConnection):
|
|
self.ssh_connection = ssh_connection
|
|
|
|
def get_daemonsets(self) -> KubectlGetDaemonsetsOutput:
|
|
"""
|
|
Gets all the daemonsets returned by the kubectl get daemonsets command
|
|
Returns:
|
|
|
|
"""
|
|
output = self.ssh_connection.send(export_k8s_config('kubectl get daemonsets'))
|
|
self.validate_success_return_code(self.ssh_connection)
|
|
get_daemonsets_output = KubectlGetDaemonsetsOutput(output)
|
|
|
|
return get_daemonsets_output
|