#NEWLINE# def convert_groups_to_neutron_format( self , context , nova_security_groups ) : #NEWLINE# #INDENT# neutron_security_groups = [ ] #NEWLINE# for nova_group in nova_security_groups : #NEWLINE# #INDENT# neutron_group = { #NEWLINE# #INDENT# 'id' : str ( nova_group . id ) , #NEWLINE# 'name' : nova_group . name , #NEWLINE# 'description' : nova_group . description , #NEWLINE# 'tenant_id' : nova_group . tenant_id , #NEWLINE# #UNINDENT# } #NEWLINE# neutron_rules = [ ] #NEWLINE# for rule in nova_group . rules : #NEWLINE# #INDENT# neutron_rules . append ( self . convert_rule_to_neutron ( context , rule , nova_security_groups ) ) #NEWLINE# #UNINDENT# if neutron_rules : #NEWLINE# #INDENT# neutron_group [ 'security_group_rules' ] = neutron_rules #NEWLINE# #UNINDENT# neutron_security_groups . append ( neutron_group ) #NEWLINE# #UNINDENT# return neutron_security_groups