Skip to content
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

Merged
merged 3 commits into from Aug 24, 2018
Merged

Conversation

pschella
Copy link
Collaborator

No description provided.

Since StorageInfo is now solely the datastore name, there is no
reason for registry.updateStorageInfo to exist so it has
been removed.
@timj timj changed the base branch from tickets/DM-14639 to master August 23, 2018 17:03
Copy link
Member

@TallJimbo TallJimbo left a 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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

str or bytes?

Copy link
Member

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}\")"
Copy link
Member

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.
@timj timj merged commit 765be23 into master Aug 24, 2018
@ktlim ktlim deleted the tickets/DM-14760 branch August 25, 2018 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants