New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-14760: Merge StorageFileInfo into StorageInfo #51
Conversation
e285ef7
to
5605bff
Compare
Since StorageInfo is now solely the datastore name, there is no reason for registry.updateStorageInfo to exist so it has been removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Only really minor comments.
@@ -58,6 +58,10 @@ def __init__(self, formatter, path, storageClass): | |||
self._path = path | |||
assert isinstance(storageClass, StorageClass) | |||
self._storageClass = storageClass | |||
assert checksum is None or isinstance(checksum, str) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
str
or bytes
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently computeChecksum
returns a hex digest as a str. We don't have byte checksums flying around.
|
||
def __repr__(self): | ||
return f"{type(self).__qualname__}(path=\"{self.path}\", formatter=\"{self.formatter}\"" \ | ||
f" size={self.size}, checksum=\"{self.checksum}\", storageClass=\"{self.storageClass.name}\")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty hard to read with all the escaping - seems like a solid reason to use single-quotes in some of these places.
StorageInfo now only has a single item in it so change all the APIs to be explicit about that item. Rename the StorageInfo registry methods as Address methods. getAddresses now returns all matching datastores.
No description provided.