Project

General

Profile

Actions

action #33388

closed

openQA Project - coordination #14626: [epic] backend and console capabilities interface to increase extensibility and code reuse

coordination #38819: [qe-core][tools][functional][epic] Refactor use of backends

[functional][u][easy][pvm] Implement proper split from other backends

Added by nicksinger about 6 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Enhancement to existing tests
Target version:
SUSE QA - Milestone 25
Start date:
2019-02-17
Due date:
% Done:

0%

Estimated time:
Difficulty:
easy

Description

Motivation

The current implementation of the spvm backend makes use of functions ( e.g. use_ssh_serial_console located in lib/ipmi_backend_utils.pm) from other "backends".
This is good enough for a first proof of concept but for the sake of clarity and further maintainability this should reside in a separate file which is shared/included from the backends using it.

Acceptance criteria

  • AC1: Have clearly seperated backends with shared common functions
  • AC2: Do not include any functions from other backends (e.g. from ipmi into spvm)

Suggestions

  • Extract method "use_ssh_serial_console" into a common lib, e.g. "ssh_remote_console_backend_something_foobar"
  • Call git grep 'BACKEND.*pvm' and only work on these occurences, that excludes e.g. boot_from_pxe.pm
  • Find occurences like in https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/lib/susedistribution.pm#L554 where we look for "s390x || ipmi || spvm" and replace this with an explicit function returning a boolean value for what it really is, e.g. "no_local_tty" or "remote_backend" or "relies_on_ssh_terminal"
  • Create followup sibling ticket for all necessary work for other backends

Further details

Focus on spvm, leave the rest for the parent epic. "Having a single verification run is enough" says okurz

Example for a change:

- if (check_var('BACKEND', 'foo') || check_var('BACKEND', 'bar')) {
+ sub backend_is_remote { return check_var('BACKEND', 'foo') || check_var('BACKEND', 'bar') }
+ if (backend_is_remote) {

Related issues 5 (0 open5 closed)

Related to openQA Project - action #38486: [functional][u] add capability flags to os-autoinst backends (or tests)Rejectedmgriessmeier2018-07-17

Actions
Related to openQA Tests - action #38423: [sle][functional][u][hard] Refactor first_boot to unify duplicated behavior for remote backendRejectedzluo2018-07-16

Actions
Blocked by openQA Project - coordination #21838: [functional][u][saga] PowerVM backendClosednicksinger2017-08-082018-07-31

Actions
Blocks qe-yam - action #41546: [functional][y] Change architecture checks with functionality of the #33388 to detect VNC installationResolvedsyrianidou_sofia2018-09-25

Actions
Precedes openQA Tests - action #45008: [functional][u] Further improvements on splitting backend codeResolvedzluo2019-04-16

Actions
Actions

Also available in: Atom PDF