def purge_deleted(config, cmd): """Remove database records that have been previously soft deleted.""" purge_tables.purge_deleted(config.tacker_config, CONF.command.resource, CONF.command.age, CONF.command.granularity)
def test_purge_delete_call_events(self): purge_tables.purge_deleted(self.config, 'events', '90', 'days') purge_tables._purge_events_table.assert_called_once_with( mock.ANY, mock.ANY, mock.ANY)
def test_purge_delete_call_vim(self): purge_tables.purge_deleted(self.config, 'vims', '90', 'days') purge_tables._purge_resource_tables.assert_called_once_with( mock.ANY, mock.ANY, mock.ANY, mock.ANY, mock.ANY)