def role_create(name, profile=None, **connection_args):
 kstone = auth(profile, **connection_args)
 if ('Error' not in role_get(name=name, profile=profile, **connection_args)):
  return {'Error': 'Role "{0}" already exists'.format(name)}
 kstone.roles.create(name)
 return role_get(name=name, profile=profile, **connection_args)

def role_create ( name , profile = None , ** connection_args ) : kstone = auth ( profile , ** connection_args ) if ( 'Error' not in role_get ( name = name , profile = profile , ** connection_args ) ) : return { 'Error' : 'Role "{0}" already exists' . format ( name ) } kstone . roles . create ( name ) return role_get ( name = name , profile = profile , ** connection_args )
create a named role .