10 Commits

Author SHA1 Message Date
Kevin Carter
af749d1a6a
Use correct default key file and normalize the usage
The provision command was defaulting to id_rsa.pub, however the deploy
command uses id_rsa_tripleo for initial setup.

When using the deploy command for provision as well, use the public
key, not the private id_rsa_tripleo.

This option was being processed in several different ways, this change
normalize it by creating a single function in the Command class, which
all inheriting methods will consume. Tests have been updated to
accomodate this change.

Related-Bug: #1863920
Change-Id: I221480f3cfc77545a8fcbef777829239c3bad0a0
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-02-20 08:52:09 -06:00
Kevin Carter
6fa0e3d1be
Remove left over mistral layers of abstration
This change removes several layers of abstration from our overcloud commands.
By cleaning up these layers we'll improve the understandability of the client
code while also improving the speed of these interactions.

Story: 2007212

Change-Id: I71617d4f47caaee9ce3025191ff0c0ebfe2adf79
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-02-17 12:28:21 -06:00
Kevin Carter
dc9ae1ac5b Remove mistral from the config_download deploy workflow
This change removes all of mistral from the config_download_deploy function
by calling the required functions directly.

- All of the inputs within this function have been cleaned up and documented.
- New log entires will be created when using this method giving the deployer
  a better overall user experience.
- To ensure we're able to support the ability to reproduce commands, the ssh
  args extravar has been moved to an environment variable.
- The methods get_config and get_key have been moved to the utils module.
  This was done to help avoid circular imports.

Update methods have been changed to execute without running within a mistral
workflow. This was changed because there's no need to support the multiple
code paths anymore given config_download is now running directly.

Test classes have been updated to reduce duplication.

With the new streamlined execution process we should see improved deployment
times and better visability into the deployment process.

Task: 38422
Story: 2007212

Depends-On: I006291a2465aa4c950abce76f9e5f9459b76e330
Change-Id: Ide1a4503dd2bdd2d5e494cd1eac483b842a21acf
Co-authored-by: Luke Short <ekultails@gmail.com>
Co-authored-by: Dougal Matthews <dougal@dougalmatthews.com>
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-02-14 23:40:16 +00:00
David J Peacock
4fc5e74243 Implement tripleo container image show command
This patch implements the tripleo container image show command, AKA,
inspect.

Change-Id: I03b7bb724881eeb3b737845d9a731d4b4f6ee786
2019-07-17 08:54:30 -04:00
Dmitry Tantsur
b3cef86bb9 Do not log tracebacks for expected exceptions
The tripleoclient exceptions are supposed to have enough context,
logging their traceback just confuses the users. Note that with
--debug all exceptions will have a traceback anyway.

This change introduces a base class for tripleoclient exceptions.

Change-Id: Iffc7b557ebd7e30ff56ceaee702ed3c4466d4eea
Closes-Bug: #1824329
2019-04-11 13:05:10 +02:00
Steve Baker
c138a49609 Fix confirmation prompt for overcloud delete
In python-3 the confirmation prompt isn't displayed without a flush on
stdout. This change fixes that.

This change also prevents a stacktrace from being printed when a
CommandError is raised, which is a much friendlier way of displaying
that user inputed caused a command to fail.

Change-Id: Ibab5abf6ab57793ca988b36d3411767f82e7e756
Closes-Bug: #1821672
2019-03-26 16:54:15 +13:00
Cédric Jeanneret
88d3dfd5e7 Ensure created symlink is in $PATH
With "sudo", the $PATH is overriden an really basic:
PATH=/sbin:/bin:/usr/sbin:/usr/bin
It doesn't list the /usr/local/(s)bin, hence the created
symlink wasn't seen by the script.

It also push that symlink creation in the __new__ special
method in order to make it cleaner.

Finaly, it takes care of lint/pep8 failures, not related to
this change (how is that even possible?!)

Co-Authored-By: Natal Ngétal <hobbestigrou@erakis.eu>
Closes-Bug: 1817365
Partial-Bug: 1816446

Change-Id: If09eb32f43b2c26c8cd8a89f2e862db1dd91dfed
2019-02-27 01:33:51 +00:00
Natal Ngétal
73631dfbcf [Core] Add limit option to manage nodes.
Currently we have nodes and roles options for upgrade run and update run
but it's a bit confusing. This both options it's same. Depecrated nodes
and roles and a new option limit. The options nodes and roles will be
remove in the future version.

Closes-Bug: #1813810
Change-Id: I4d33e7e5bd4b892219cfc2067e81938e0f6a8668
2019-02-05 10:53:08 +01:00
Alex Schultz
a022a339be Log exceptions that are uncaught
Since openstackclient usually eats the exceptions, we should at least
print any that manage to not be caught.  We've seen this in the past
where a deploy is run and the last output is 'password'.

Change-Id: I3b298ebe60a278c68fa582c47f36f87a94f9f2f8
Closes-Bug: #1734704
2018-10-09 09:59:20 -06:00
Dougal Matthews
53d06b7f52 Add each command to the history file
Change-Id: I1e93305426dd94dbbcc8ca70f446dae4a1fa0434
2017-11-27 15:37:00 +00:00