<s> from neutron_lib import constants <EOL> from neutron . agent import securitygroups_rpc <EOL> from neutron . extensions import portbindings <EOL> from neutron . plugins . common import constants as p_constants <EOL> from neutron . plugins . ml2 . drivers import mech_agent <EOL> class FakeAgentMechanismDriver ( mech_agent . SimpleAgentMechanismDriverBase ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self ) : <EOL> sg_enabled = securitygroups_rpc . is_firewall_enabled ( ) <EOL> vif_details = { portbindings . CAP_PORT_FILTER : sg_enabled , <EOL> portbindings . OVS_HYBRID_PLUG : sg_enabled } <EOL> super ( FakeAgentMechanismDriver , self ) . __init__ ( <EOL> constants . AGENT_TYPE_OFA , <EOL> portbindings . VIF_TYPE_OVS , <EOL> vif_details ) <EOL> def get_allowed_network_types ( self , agent ) : <EOL> return ( agent [ '<STR_LIT>' ] . get ( '<STR_LIT>' , [ ] ) + <EOL> [ p_constants . TYPE_LOCAL , p_constants . TYPE_FLAT , <EOL> p_constants . TYPE_VLAN ] ) <EOL> def get_mappings ( self , agent ) : <EOL> return dict ( agent [ '<STR_LIT>' ] . get ( '<STR_LIT>' , { } ) ) </s>
