summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorzhaolihui <zhaolh@awcloud.com>2018-07-12 11:12:54 +0000
committerTakashi NATSUME <natsume.takashi@lab.ntt.co.jp>2018-12-13 07:50:37 +0000
commitb13ba0138f6ee2e10ce3b4b95aee37c6cebd1f20 (patch)
tree9f6345192bcf459868e01c754bdea75aca011df7 /tox.ini
parenta789bd30ae07eff636e6ea3da4d5d8f9d46e8ff1 (diff)
downloadpython-novaclient-b13ba0138f6ee2e10ce3b4b95aee37c6cebd1f20.tar.gz
Fix flavor keyerror when nova boot vm
When creating a server (the 'nova boot' command), it calls 'POST /servers' API. The response does not have 'addresses' and 'flavor' attributes. When accessing 'networks' attribute in the '_print_server' function, it calls 'GET /servers/{server_id}' and get the 'addresses' and 'flavor' attributes. If 'GET /servers/{server_id}' fails, the server object does not have the 'flavor' attribute, then KeyError is raised when accessing it. Fix the issue by making it raise a CommandError when the 'GET /servers/{server_id}' fails. Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp> Change-Id: I3ef096c61b0e05a637ab0c4a1027338fa87e4f09 Closes-Bug: #1781368
Diffstat (limited to 'tox.ini')
0 files changed, 0 insertions, 0 deletions