test/keywords/k8s/k8s_command_wrapper.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

12 lines
347 B
Python

"""
This file contains the command wrapper that will set the Environment Variables necessary
to execute kubectl commands.
"""
from config.configuration_manager import ConfigurationManager
def export_k8s_config(cmd: str):
kubeconfig = ConfigurationManager.get_k8s_config().get_kubeconfig()
return f"export KUBECONFIG={kubeconfig};{cmd}"