Files
test/keywords/k8s/deployments/kubectl_expose_deployment_keywords.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

31 lines
861 B
Python

from keywords.base_keyword import BaseKeyword
from keywords.k8s.k8s_command_wrapper import export_k8s_config
class KubectlExposeDeploymentKeywords(BaseKeyword):
"""
Class for Expose Deployment Keywords
"""
def __init__(self, ssh_connection):
"""
Constructor
Args:
ssh_connection:
"""
self.ssh_connection = ssh_connection
def expose_deployment(self, deployment_name: str, type: str, name: str):
"""
Exposes the deployment
Args:
deployment_name (): the deployment name
type (): the type
name (): the name
Returns:
"""
self.ssh_connection.send(export_k8s_config(f"kubectl expose deployment {deployment_name} --type={type} --name={name}"))
self.validate_success_return_code(self.ssh_connection)