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

Add remove() method to StorageBackendInterface #235

Merged

Conversation

joshuagl
Copy link
Collaborator

Fixes issue #: N/A

Description of the changes being introduced by the pull request:
tuf needs to be able to delete files when tidying up outdated/revoked metadata, therefore our storage abstraction needs a method to remove files from storage.

  • Add remove() method to storage.StorageBackendInterface
  • Implement remove() in storage.FilesystemBackend

Please verify and check that the pull request fulfils the following
requirements
:

  • The code follows the Code Style Guidelines
  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

Define a remove method for removing/deleting items from the storage
backend. The tuf reference implementation needs to be able to delete
metadata files which have been marked as removed.

Signed-off-by: Joshua Lock <jlock@vmware.com>
@coveralls
Copy link

coveralls commented May 12, 2020

Coverage Status

Coverage increased (+0.002%) to 98.941% when pulling 807a775 on joshuagl:joshuagl/abstract-file-remove into 01a0c95 on secure-systems-lab:master.

@joshuagl joshuagl force-pushed the joshuagl/abstract-file-remove branch from 574aeda to d633b0b Compare May 12, 2020 10:20
Implement the new remove method of StorageBackendInterface in the
FilesystemBackend with a simple os.remove() wrapper.

Signed-off-by: Joshua Lock <jlock@vmware.com>
@joshuagl joshuagl force-pushed the joshuagl/abstract-file-remove branch from d633b0b to 807a775 Compare May 12, 2020 10:28
Copy link
Contributor

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

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

LGTM!

@trishankatdatadog
Copy link
Contributor

Unfortunately I do not have write bit on this repo

@joshuagl joshuagl merged commit 1c470b8 into secure-systems-lab:master May 12, 2020
@joshuagl joshuagl deleted the joshuagl/abstract-file-remove branch May 12, 2020 20:54
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

4 participants