File utils-str2dict-type.diff of Package python-neutronclient

Index: python-neutronclient-2.3.12/neutronclient/common/utils.py
===================================================================
--- python-neutronclient-2.3.12.orig/neutronclient/common/utils.py
+++ python-neutronclient-2.3.12/neutronclient/common/utils.py
@@ -17,8 +17,9 @@
 
 """Utilities and helper functions."""
 
 import argparse
+import functools
 import logging
 import os
 
 #from oslo.utils import encodeutils
@@ -110,8 +111,14 @@ def str2dict(strdict):
         return {}
     return dict([kv.split('=', 1) for kv in strdict.split(',')])
 
 
+def str2dict_type(optional_keys=None, required_keys=None):
+    return functools.partial(str2dict,
+                             optional_keys=optional_keys,
+                             required_keys=required_keys)
+
+
 def http_log_req(_logger, args, kwargs):
     if not _logger.isEnabledFor(logging.DEBUG):
         return