<s> from neutron . plugins . ml2 import driver_api as api <EOL> from gbpservice . neutron . services . grouppolicy . drivers . nuage import driver <EOL> NOVA_PORT_OWNER_PREF = '<STR_LIT>' <EOL> class NuageMechanismGBPDriver ( api . MechanismDriver ) : <EOL> def initialize ( self ) : <EOL> self . _nuage_gbp = None <EOL> @ property <EOL> def nuage_gbp ( self ) : <EOL> if not self . _nuage_gbp : <EOL> self . _nuage_gbp = ( driver . NuageGBPDriver . <EOL> get_initialized_instance ( ) ) <EOL> return self . _nuage_gbp <EOL> def update_port_postcommit ( self , context ) : <EOL> port = context . current <EOL> port_prefix = NOVA_PORT_OWNER_PREF <EOL> if ( ( not context . original_bound_segment and <EOL> context . bound_segment ) and <EOL> port [ '<STR_LIT>' ] . startswith ( port_prefix ) ) : <EOL> self . nuage_gbp . create_nuage_policy_target ( <EOL> context . _plugin_context , context . current ) </s>
