-
Notifications
You must be signed in to change notification settings - Fork 38
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
Added changes for deletion of sshKey/sshKeys #192
Conversation
a1fc2ea
to
0b603bb
Compare
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.
Initial review comments
26b3961
to
0cd0c7c
Compare
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.
Lets move to purge command as discussed
cmd/delete/key/key.go
Outdated
# Delete all the ssh keys which are created before 12hrs | ||
pvsadm delete key --instance-name upstream-core --before 12h | ||
|
||
#Delete all the ssh keys created since 30m | ||
pvsadm delete key --instance-name upstream-core --since 30m | ||
|
||
#Delete all ssh keys starts with rdr- | ||
pvsadm delete key --instance-name upstream-core --regex "^rdr-.*" | ||
|
||
#Delete all ssh keys without asking confirmation | ||
pvsadm delete key --instance-name upstream-core --noprompt | ||
|
||
#Delete all ssh keys and ignore if any errors during the delete operation | ||
pvsadm delete key --instance-name upstream-core --ignore-errors |
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.
keys api is not tied with any instance, hence wondering if we really need the instance-name or instance-id?
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.
From IBM UI, we can check ssh_keys irrespective of the instances, but powervs sdk needs instance id for getting the ssh keys..
c.session.Power.PCloudTenantsSSHKeys.PcloudTenantsSshkeysGetall(params, ibmpisession.NewAuth(c.session, c.instanceID))
PcloudTenantsSshkeysGetall function needs information about instanceid, hence I have added the instance-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.
can we send an empty or some dummy value there? because API doesn't I feel.
11d1f3c
to
1160e5b
Compare
@bkhadars is this ready for review? |
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bkhadars, mkumatag The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Added Changes: