#NEWLINE# def __init__( self ) : #NEWLINE# #INDENT# self . set_ipam_backend ( ) #NEWLINE# if cfg . CONF . notify_nova_on_port_status_changes : #NEWLINE# #INDENT# self . nova_notifier = nova_notifier . Notifier ( ) #NEWLINE# event . listen ( models_v2 . Port , 'after_insert' , self . nova_notifier . send_port_status ) #NEWLINE# event . listen ( models_v2 . Port , 'after_update' , self . nova_notifier . send_port_status ) #NEWLINE# event . listen ( models_v2 . Port . status , 'set' , self . nova_notifier . record_port_status_changed ) #NEWLINE# #UNINDENT# for e in ( events . BEFORE_CREATE , events . BEFORE_UPDATE , events . BEFORE_DELETE ) : #NEWLINE# #INDENT# registry . subscribe ( self . validate_network_rbac_policy_change , rbac_mixin . RBAC_POLICY , e )