#NEWLINE# def test_create_port_with_security_group_and_net_sec_false( self ) : #NEWLINE# #INDENT# if self . _skip_security_group : #NEWLINE# #INDENT# self . skipTest ( 'Plugin does not support security groups' ) #NEWLINE# #UNINDENT# res = self . _create_network ( 'json' , 'net1' , True , arg_list = ( 'port_security_enabled' , ) , port_security_enabled = False ) #NEWLINE# net = self . deserialize ( 'json' , res ) #NEWLINE# self . _create_subnet ( 'json' , net [ 'network' ] [ 'id' ] , '10.0.0.0/24' ) #NEWLINE# security_group = self . deserialize ( 'json' , self . _create_security_group ( self . fmt , 'asdf' , 'asdf' ) ) #NEWLINE# security_group_id = self [ 'security_group' ] [ 'id' ] #NEWLINE# res = self . _create_port ( 'json' , net [ 'network' ] [ 'id' ] , arg_list = ( 'security_groups' , 'port_security_enabled' ) , port_security_enabled = True , security_groups = [ security_group_id ] ) #NEWLINE# port = self . deserialize ( 'json' , res ) #NEWLINE# self . assertTrue ( port [ 'port' ] [ psec . PORTSECURITY ] ) #NEWLINE# self . assertEqual ( port [ 'port' ] [ 'security_groups' ] , [ security_group_id ] ) #NEWLINE# self . _delete ( 'ports' , port [ 'port' ] [ 'id' ] )