From 559365aaaec3207060db23d38da1494808bbe155 Mon Sep 17 00:00:00 2001 From: James Slagle Date: Fri, 14 Sep 2018 17:03:52 -0400 Subject: [PATCH] Handle non-existant plan when getting deployment status Instead of showing a traceback when requesting the deployment status of a non-existant plan, show a useful message instead. Change-Id: I3b10361fd17e1068e46a219b8081451f5c7ed035 Depends-On: Ic0333c0726b16d284a7cc54bc68e16ea1c9ebc4d Closes-Bug: #1792637 (cherry picked from commit 0b14fd10fd4c48da27837053057a10d591ccb152) --- .../notes/handle-no-deployment-status-a8f73f887f0f158f.yaml | 4 ++++ tripleoclient/v1/overcloud_deploy.py | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 releasenotes/notes/handle-no-deployment-status-a8f73f887f0f158f.yaml diff --git a/releasenotes/notes/handle-no-deployment-status-a8f73f887f0f158f.yaml b/releasenotes/notes/handle-no-deployment-status-a8f73f887f0f158f.yaml new file mode 100644 index 000000000..6bb3544a1 --- /dev/null +++ b/releasenotes/notes/handle-no-deployment-status-a8f73f887f0f158f.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - When requesting the deployment status of a non-existant plan, instead of + showing a traceback, show a helpful message indicating there is no status. diff --git a/tripleoclient/v1/overcloud_deploy.py b/tripleoclient/v1/overcloud_deploy.py index 51c6d9095..8d722d916 100644 --- a/tripleoclient/v1/overcloud_deploy.py +++ b/tripleoclient/v1/overcloud_deploy.py @@ -970,6 +970,9 @@ class GetDeploymentStatus(command.Command): plan=plan ) + if not status: + return + payload = status['workflow_status']['payload'] execution = payload['execution'] table = PrettyTable(