#NEWLINE# def normalize_nova_secgroups( groups ) : #NEWLINE# #INDENT# "Normalize the structure of nova security groups\n\n    This makes security group dicts, as returned from nova, look like the\n    security group dicts as returned from neutron. This does not make them\n    look exactly the same, but it's pretty close.\n\n    :param list groups: A list of security group dicts.\n\n    :returns: A list of normalized dicts.\n    " #NEWLINE# ret = [ { #NEWLINE# #INDENT# 'id' : g [ 'id' ] , #NEWLINE# 'name' : g [ 'name' ] , #NEWLINE# 'description' : g [ 'description' ] , #NEWLINE# 'security_group_rules' : normalize_nova_secgroup_rules ( g [ 'rules' ] ) , #NEWLINE# #UNINDENT# } for g in g ] #NEWLINE# return meta . obj_list_to_dict ( ret )