diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2013-07-12 15:49:03 -0500 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2013-07-29 19:07:22 -0500 |
| commit | c94e262df8d2d37e6c2043a3c3d0bc1cb78348a5 (patch) | |
| tree | 4db83cbff672f27f8d5ff94f9d97b03a4ba4d412 /openstackclient/common/utils.py | |
| parent | 65d2a14e3e834ce0c57c879ec7d42715058254bf (diff) | |
| download | python-openstackclient-c94e262df8d2d37e6c2043a3c3d0bc1cb78348a5.tar.gz | |
Add security group commands
* Add security group: create, delete, list, set, show
* Add server: add secgroup, remove secgroup
* Add security group rule: create, delete, list
* Add Oslo's strutils and gettextutils
* Adds parseractions.RangeAction() to handle option arguments of either a single number
or a range of numbers: '--port 25' or '--port 1024:65535'
Blueprint: nova-client
Change-Id: Iad2de1b273ba29197709fc4c6a1036b4ae99725f
Diffstat (limited to 'openstackclient/common/utils.py')
| -rw-r--r-- | openstackclient/common/utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/openstackclient/common/utils.py b/openstackclient/common/utils.py index fd504ea1..4d2afd15 100644 --- a/openstackclient/common/utils.py +++ b/openstackclient/common/utils.py @@ -16,11 +16,13 @@ """Common client utilities""" import os +import six import sys import time import uuid from openstackclient.common import exceptions +from openstackclient.openstack.common import strutils def find_resource(manager, name_or_id): @@ -84,7 +86,8 @@ def format_dict(data): output = "" for s in data: - output = output + s + "='" + data[s] + "', " + output = output + s + "='" + \ + strutils.safe_encode(six.text_type(data[s])) + "', " return output[:-2] |
