Comment 7 for bug 1367011

Revision history for this message
Pawel Koniszewski (pawel-koniszewski) wrote :

Ian,

I have some worries about this solution:
1. In glance-manage shell we have no idea what is in database so we can't issue a warning here (why issue a warning when maybe not even one file will be overwritten?).
2. It is possible to issue a warning during export: get all namespaces from database and check provided directory. If at least one namespace matches then issue a warning and ask for directory. And ask for directory until there isn't any collision. But what if I want to overwrite these files? We would need to add another optional parameter, e.g. --overwrite to allow overwritting, or just overwrite if user didn't provide another directory (this is dirty).

I can see two more approaches:
1. Stick to optional parameter but at the beginning of export generate UUID and make it a prefix/suffix of each namespace. But again updating existing files will be harder.
2. Extend current solution - issue a warning if there are files inside directory (y - continue and overwrite, n - break the operation).