swift-object-info should report all object metadata

Bug #1431334 reported by Alistair Coles on 2015-03-12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Ricardo Ferreira

Bug Description

swift-object-info can currently be pointed at a *file* and will report info from that file. It would be really useful to be able to optionally point the tool at a directory and have the tool open the on-disk file set to compose any .meta with .data files, printing the aggregate as would be included with an object GET.

https://bugs.launchpad.net/bugs/1425679 already requests handling .meta and .ts files, this request build on that.

Changed in swift:
importance: Undecided → Wishlist
Ricardo Ferreira (rsff) on 2015-03-12
Changed in swift:
assignee: nobody → Ricardo Ferreira (rsff)
Jiri Suchomel (jsuchome) wrote :

Would the simple change like this be enough? Or am I misunderstanding the request?

> if os.path.isdir(datafile):
> for (dirpath, dirnames, filenames) in os.walk(datafile):
> for f in filenames:
> new_datafile = os.path.join(datafile,f)
> if os.path.isfile(new_datafile):
> print ("Checking file %s" % new_datafile)
> print_obj(new_datafile, check_etag, swift_dir, policy_name)
> break # not going deeper
> return

Jiri Suchomel (jsuchome) wrote :

Sorry, now properly formatted...

John Dickinson (notmyname) wrote :

Jiri, can you please propose this as a patch to Swift via gerrit (including this bug in the commit message)? That way the community can review it and offer feedback.

Changed in swift:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers