diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-07-03 02:48:47 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-07-03 02:48:47 +0000 |
| commit | ee64c2fa6b9eb6f8d628e8899df39a4ee01c2bb3 (patch) | |
| tree | 57e047252b843c67eef60fa4a1a8358dbac9f173 /openstackclient/common/utils.py | |
| parent | d80deaba41d09534a3f5a670957b4b0d035509b6 (diff) | |
| parent | 5521e4c504c6a3a06f17a9e4f80444743aa293c7 (diff) | |
| download | python-openstackclient-ee64c2fa6b9eb6f8d628e8899df39a4ee01c2bb3.tar.gz | |
Merge "Add --os-endpoint-type cli optional argument"
Diffstat (limited to 'openstackclient/common/utils.py')
| -rw-r--r-- | openstackclient/common/utils.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/openstackclient/common/utils.py b/openstackclient/common/utils.py index c824678e..6cd35c05 100644 --- a/openstackclient/common/utils.py +++ b/openstackclient/common/utils.py @@ -368,3 +368,11 @@ def read_blob_file_contents(blob_file): except IOError: msg = "Error occurred trying to read from file %s" raise exceptions.CommandError(msg % blob_file) + + +def build_kwargs_dict(arg_name, value): + """Return a dictionary containing `arg_name` if `value` is set.""" + kwargs = {} + if value: + kwargs[arg_name] = value + return kwargs |
