def destroy_instance(cls): inst = cls.get_instance() if not inst: return inst._vnc_amqp.close() for obj_cls in DBBaseDM.get_obj_type_map().values(): obj_cls.reset() DBBase.clear() DMCassandraDB.clear_instance() cls._instance = None
def destroy_instance(cls): inst = cls.get_instance() if not inst: return inst._vnc_amqp.close() for obj_cls in DBBaseDM.get_obj_type_map().values(): obj_cls.reset() DBBase.clear() DMCassandraDB.clear_instance() inst._object_db = None cls._device_manager = None
def sigterm_handler(): global _amqp_client DeviceManager.destroy_instance() DeviceZtpManager.destroy_instance() DeviceJobManager.destroy_instance() DMCassandraDB.clear_instance() if _amqp_client is not None: _amqp_client.stop()
def destroy_instance(cls): inst = cls.get_instance() if not inst: return inst._vnc_amqp.close() if PushConfigState.is_push_mode_ansible(): FabricManager.destroy_instance() for obj_cls in DBBaseDM.get_obj_type_map().values(): obj_cls.reset() DBBase.clear() DMCassandraDB.clear_instance() cls._instance = None