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 mode flag to bundle deletion #584

Merged
merged 2 commits into from
Sep 7, 2018

Conversation

azdagron
Copy link
Member

@azdagron azdagron commented Sep 7, 2018

Bundles cannot be deleted from the datastore if they are associated with
any registration entries unless the dissociate or delete mode is used.
This commit adds mode to the registration API and plumbs it through to
the CLI.

Bundles cannot be deleted from the datastore if they are associated with
any registration entries unless the dissociate or delete mode is used.
This commit adds mode to the registration API and plumbs it through to
the CLI.

Signed-off-by: Andrew Harding <azdagron@gmail.com>
@azdagron azdagron changed the title Add -mode flag to bundle deletion Add mode flag to bundle deletion Sep 7, 2018
Copy link
Member

@amartinezfayo amartinezfayo left a comment

Choose a reason for hiding this comment

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

Looks great.
Just a very minor comment.

@@ -34,6 +44,7 @@ func (c *deleteCommand) synopsis() string {

func (c *deleteCommand) appendFlags(fs *flag.FlagSet) {
fs.StringVar(&c.id, "id", "", "SPIFFE ID of the trust domain")
fs.StringVar(&c.mode, "mode", deleteBundleRestrict, "Deletion mode: one of restrict, delete, or dissociate")
Copy link
Member

Choose a reason for hiding this comment

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

Maybe it make sense to use the constants also to build the usage string?

Copy link
Member Author

Choose a reason for hiding this comment

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

sure, why not! commit coming up.

Signed-off-by: Andrew Harding <azdagron@gmail.com>
Copy link
Member

@amartinezfayo amartinezfayo left a comment

Choose a reason for hiding this comment

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

💯

@azdagron azdagron merged commit 216acdc into spiffe:master Sep 7, 2018
@azdagron azdagron deleted the reg-api-del-bundle-mode branch September 7, 2018 20:57
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.

2 participants