If no name or label filter specified baremetal operation will
be performed against all nodes with baremetalhost kind. Also,
baremeral cmd code was refactored and combined, which allowed
to remove duplicated code and slighlty improve test coverage
by reducing the number of untestable lines.
Change-Id: Ieadafdb9f55b995d4b47aeff1dc7233325f3191c
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #361
Closes: #361
All the baremetal commands was refactored for usage with new config
factory. Config object now is being initialized in pkg module on demand,
which provides more flexibility and cleaner code.
Change-Id: If75cd3f1a8bc22fc47ea132188bd9fec989ee434
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
Both host selectors are always passed to create a manager when a power
command is invoked; however, an empty label selector will include all
hosts.
This change adds a helper function to determine which selectors will be
used based on the flags passed to airshipctl. When a flag is not used, a
selector is not created for it.
Change-Id: I48684cdf6d16073bf85468f6286a22a0aba602f7
Signed-off-by: Drew Walters <andrew.walters@att.com>
When tracking down issues on baremetal nodes using remotedirect, it has
been difficult to pinpoint which Redfish calls fail. This change adds
additional debug logging to make the troubleshooting process simpler
during pre-alpha development.
Change-Id: Ic32d34d010c44b2e7e2a4dfe2b623a451ad94019
Signed-off-by: Drew Walters <andrew.walters@att.com>
Early airshipctl usage has identified the need to eject virtual media
on-demand using airshipctl in order to prevent booting from stuck media.
This change adds a command to eject all virtual media attached to a
baremetal node.
Change-Id: Id67fa00489093dcb84ce54216e0553fa6a737ea6
Signed-off-by: Drew Walters <andrew.walters@att.com>