#NEWLINE# def test_update_port_remove_port_security_security_group( self ) : #NEWLINE# #INDENT# if self . _skip_security_group : #NEWLINE# #INDENT# self . skipTest ( 'Plugin does not support security groups' ) #NEWLINE# #UNINDENT# with self . network ( ) as net : #NEWLINE# #INDENT# with self . subnet ( network = net ) : #NEWLINE# #INDENT# res = self . _create_port ( 'json' , net [ 'network' ] [ 'id' ] , arg_list = ( 'port_security_enabled' , ) , port_security_enabled = True ) #NEWLINE# port = self . deserialize ( 'json' , res ) #NEWLINE# self . assertTrue ( port [ 'port' ] [ psec . PORTSECURITY ] ) #NEWLINE# update_port = { #NEWLINE# #INDENT# 'port' : { #NEWLINE# #INDENT# ext_sg . SECURITYGROUPS : None , #NEWLINE# psec . PORTSECURITY : False , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# req = self . new_update_request ( 'ports' , update_port , port [ 'port' ] [ 'id' ] ) #NEWLINE# port = self . deserialize ( 'json' , req . get_response ( self . api ) ) #NEWLINE# self . assertFalse ( update_port [ 'port' ] [ psec . PORTSECURITY ] ) #NEWLINE# self . assertEqual ( 0 , len ( port [ 'port' ] [ ext_sg . SECURITYGROUPS ] ) ) #NEWLINE# self . _delete ( 'ports' , port [ 'port' ] [ 'id' ] )