Skip to content

Instantly share code, notes, and snippets.

View cschwede's full-sized avatar

Christian Schwede cschwede

View GitHub Profile
@cschwede
cschwede / swift-container-crawler
Created April 6, 2023 14:31
Sample code to iterate over OpenStack Swift container DB files
#!/usr/bin/env python
from swift.common.utils import audit_location_generator
from swift.container.backend import ContainerBroker
if __name__ == '__main__':
locations = audit_location_generator('/srv/node', 'containers', '.db')
for path, _, _ in locations: