def handle_router_delete(self, graph_db, body): """ Handle the routers delete events :param graph_db: Instance of Graph DB :param body: event body """ uuid = body['payload']['router_id'] router = OpenstackResource(uuid) router.remove_neighbours(graph_db, neighbour_type='port') router.remove_resource(graph_db)
def update_router(self, graph_db, neutron_db, uuid, timestamp): """ Update Neutron Routers :param graph_db: Instance of Graph DB :param neutron_db: Instance of NeutronDB :param uuid: UUID of the router to be updated :param timestamp: timestamp in epoch """ if uuid: router = OpenstackResource(uuid) router.remove_neighbours(graph_db, neighbour_type='port') router.remove_resource(graph_db) virtual_resources.add_neutron_routers(neutron_db, graph_db, self.pop, timestamp, uuid=uuid)