Beispiel #1
0
 def __init__(self, remote, schema):
     super(BaseOvnSbIdl, self).__init__(remote, schema)
     self.notify_handler = event.RowEventHandler()
     events = [ChassisAgentDeleteEvent(), ChassisGatewayAgentEvent()]
     if ovn_config.is_ovn_metadata_enabled():
         events.append(ChassisMetadataAgentEvent())
     self.notify_handler.watch_events(events)
Beispiel #2
0
 def setUp(self):
     super(BaseOvnIdlTest, self).setUp()
     ovn_conf.register_opts()
     self.api = impl.OvsdbSbOvnIdl(self.connection['OVN_Southbound'])
     self.nbapi = impl.OvsdbNbOvnIdl(self.connection['OVN_Northbound'])
     self.handler = ovsdb_event.RowEventHandler()
     self.api.idl.notify = self.handler.notify
 def setUp(self):
     super(TestSbApi, self).setUp()
     self.data = {
         'chassis': [
             {
                 'external_ids': {
                     'ovn-bridge-mappings': 'public:br-ex,private:br-0'
                 }
             },
             {
                 'external_ids': {
                     'ovn-bridge-mappings': 'public:br-ex,public2:br-ex'
                 }
             },
             {
                 'external_ids': {
                     'ovn-bridge-mappings': 'public:br-ex'
                 }
             },
         ]
     }
     self.api = impl.OvsdbSbOvnIdl(self.connection['OVN_Southbound'])
     self.nbapi = impl.OvsdbNbOvnIdl(self.connection['OVN_Northbound'])
     self.load_test_data()
     self.handler = ovsdb_event.RowEventHandler()
     self.api.idl.notify = self.handler.notify
Beispiel #4
0
 def __init__(self):
     self._ovsdb_connection = cfg.CONF.OVS.ovsdb_connection
     if self._ovsdb_connection.startswith('ssl:'):
         configure_ssl_conn()
     helper = self._get_ovsdb_helper(self._ovsdb_connection)
     helper.register_all()
     super(OvsIdl, self).__init__(self._ovsdb_connection, helper)
     self.notify_handler = ovsdb_event.RowEventHandler()
Beispiel #5
0
 def setUp(self):
     super(TestMetadataAgent, self).setUp()
     self.handler = ovsdb_event.RowEventHandler()
     self.sb_api.idl.notify = self.handler.notify
     # We only have OVN NB and OVN SB running for functional tests
     mock.patch.object(ovsdb, 'MetadataAgentOvsIdl').start()
     self._mock_get_ovn_br = mock.patch.object(
         agent.MetadataAgent,
         '_get_ovn_bridge',
         return_value=self.OVN_BRIDGE).start()
     self.agent = self._start_metadata_agent()
Beispiel #6
0
 def setUp(self):
     super(OvnSouthboundTest, self).setUp()
     self.api = impl_idl.OvnSbApiIdlImpl(self.connection['OVN_Southbound'])
     self.nbapi = nbidl.OvnNbApiIdlImpl(self.connection['OVN_Northbound'])
     self.handler = ovsdb_event.RowEventHandler()
     self.api.idl.notify = self.handler.notify
Beispiel #7
0
 def __init__(self, remote, schema):
     self.notify_handler = event.RowEventHandler()
     super(BaseOvnIdl, self).__init__(remote, schema)
Beispiel #8
0
 def setUp(self):
     super(TestMetadataAgent, self).setUp()
     self.handler = ovsdb_event.RowEventHandler()
     self.sb_api.idl.notify = self.handler.notify
     self._start_metadata_agent()
Beispiel #9
0
 def __init__(self, remote, schema):
     super(BaseOvnSbIdl, self).__init__(remote, schema)
     self.notify_handler = event.RowEventHandler()
     self.notify_handler.watch_event(ChassisAgentEvent())