diff --git a/keywords/cloud_platform/ssh/lab_connection_keywords.py b/keywords/cloud_platform/ssh/lab_connection_keywords.py index 8049020a..405da1bf 100644 --- a/keywords/cloud_platform/ssh/lab_connection_keywords.py +++ b/keywords/cloud_platform/ssh/lab_connection_keywords.py @@ -65,32 +65,6 @@ class LabConnectionKeywords(BaseKeyword): return connection - def get_subcloud_ssh(self, subcloud_name: str) -> SSHConnection: - """ - Gets the subcloud ssh - Returns: the SSH connection for the subcloud whose name is specified by 'subcloud_name'. - - """ - lab_config = ConfigurationManager.get_lab_config() - subcloud_config = lab_config.get_subcloud(subcloud_name) - - if not subcloud_config: - raise ValueError(f"There is no subcloud named {subcloud_name} defined in your config file.") - - jump_host_config = None - if subcloud_config.is_use_jump_server(): - jump_host_config = subcloud_config.get_jump_host_configuration() - - connection = SSHConnectionManager.create_ssh_connection( - subcloud_config.get_floating_ip(), - subcloud_config.get_admin_credentials().get_user_name(), - subcloud_config.get_admin_credentials().get_password(), - ssh_port=subcloud_config.get_ssh_port(), - jump_host=jump_host_config, - ) - - return connection - def get_compute_ssh(self, compute_name: str) -> SSHConnection: """ Gets an SSH connection to the 'Compute' node whose name is specified by the argument 'compute_name'. diff --git a/keywords/cloud_platform/system/modify/system_modify_keywords.py b/keywords/cloud_platform/system/modify/system_modify_keywords.py index 80b16de2..efc451df 100644 --- a/keywords/cloud_platform/system/modify/system_modify_keywords.py +++ b/keywords/cloud_platform/system/modify/system_modify_keywords.py @@ -29,3 +29,18 @@ class SystemModifyKeywords(BaseKeyword): AlarmListKeywords(self.ssh_connection).wait_for_alarms_cleared([alarm_list_object]) return system_show_output + + def system_modify_https_enabled(self, https_enabled: bool) -> SystemShowOutput: + """ + Runs system command system modify --https-enabled True + alias system modify -p True + + Args: + https_enabled: boolean value to enable or disable https + + Returns: + SystemShowOutput object + """ + output = self.ssh_connection.send(source_openrc(f"system modify -p {https_enabled}")) + self.validate_success_return_code(self.ssh_connection) + return SystemShowOutput(output) \ No newline at end of file