Fix command parsing on legacy api version

Change-Id: I43db7827a356650ab20e9ecaf0e7b7f41e771463
Closes-Bug: #1825067
(cherry picked from commit 422c9f25e3)
This commit is contained in:
Hongbin Lu 2019-04-16 23:47:43 +00:00
parent f8c981403d
commit 06944e80f9
1 changed files with 3 additions and 0 deletions

View File

@ -18,6 +18,7 @@ import json
import os
from oslo_utils import netutils
import six
from six.moves.urllib import parse
from six.moves.urllib import request
from zunclient.common.apiclient import exceptions as apiexec
@ -199,6 +200,8 @@ def list_availability_zones(zones):
def parse_command(command):
output = []
if command:
if isinstance(command, six.string_types):
command = [command]
for c in command:
c = '"' + c + '"'
output.append(c)