def register_swift_info(name='swift', admin=False, **kwargs):
 if ((name == 'admin') or (name == 'disallowed_sections')):
  raise ValueError("'{0}' is reserved name.".format(name))
 if admin:
  dict_to_use = _swift_admin_info
 else:
  dict_to_use = _swift_info
 if (name not in dict_to_use):
  if ('.' in name):
   raise ValueError(('Cannot use "." in a swift_info key: %s' % name))
  dict_to_use[name] = {}
 for (key, val) in kwargs.items():
  if ('.' in key):
   raise ValueError(('Cannot use "." in a swift_info key: %s' % key))
  dict_to_use[name][key] = val

def register_swift_info ( name = 'swift' , admin = False , ** kwargs ) : if ( ( name == 'admin' ) or ( name == 'disallowed_sections' ) ) : raise ValueError ( "'{0}' is reserved name." . format ( name ) ) if admin : dict_to_use = _swift_admin_info else : dict_to_use = _swift_info if ( name not in dict_to_use ) : if ( '.' in name ) : raise ValueError ( ( 'Cannot use "." in a swift_info key: %s' % name ) ) dict_to_use [ name ] = { } for ( key , val ) in kwargs . items ( ) : if ( '.' in key ) : raise ValueError ( ( 'Cannot use "." in a swift_info key: %s' % key ) ) dict_to_use [ name ] [ key ] = val
registers information about the swift cluster to be retrieved with calls to get_swift_info .