-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[#6540] Platform: Remove certificate feature. #6885
[#6540] Platform: Remove certificate feature. #6885
Conversation
…e-db into 6540-Remove-Certificate
mahendra bhat seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
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.
Another thing, we use the google style guide for code formatting, which means line breaks need atleast a 4 space indentation
managed/src/main/java/com/yugabyte/yw/controllers/CertificateController.java
Outdated
Show resolved
Hide resolved
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.
Also, it is important to correctly add the description as I had mentioned earlier.
Add the sections:
Description:
Testing: How you tested it, and the summary lines of the sbt test
command. Should look like:
[info] Passed: Total 1115, Failed 0, Errors 0, Passed 1111, Skipped 4
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.
need some refinements on UI side
managed/src/main/java/com/yugabyte/yw/controllers/CertificateController.java
Outdated
Show resolved
Hide resolved
managed/src/main/java/com/yugabyte/yw/controllers/CertificateController.java
Outdated
Show resolved
Hide resolved
managed/src/main/java/com/yugabyte/yw/controllers/CertificateController.java
Outdated
Show resolved
Hide resolved
…gabyte-db into 6540-Remove-Certificate
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, just these minor fixes and then it should be good to go.
@@ -145,9 +146,29 @@ public Result get(UUID customerUUID, String label) { | |||
} | |||
} | |||
|
|||
public Result delete(UUID customerUUID, UUID reqCertUUID) { |
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.
Add a check to verify the certificate belongs to the customer.
|
||
public static boolean existsCertificate(UUID certUUID, UUID customerUUID) { | ||
Set<Universe> universeList = Customer.get(customerUUID).getUniverses(); | ||
for (Universe universe : universeList) { |
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.
Nit: Maybe use the java stream functionality. (If unaware, take a look here)
managed/src/main/java/com/yugabyte/yw/controllers/CertificateController.java
Outdated
Show resolved
Hide resolved
…40-Remove-Certificate
* certificate delete api * added one field to response * added removable * [6540] Added ability to delete certificates * added removable field * removable added * removable added to list api * [6540]Added ability to remove certificate * added validation for remove certificates. * review comment fixes * replaced removable props with inUse as recommended * fixed disabled scenario of remove cert button * review comment fixes * Addressed review comments * modified test cases * Code improvements * modified FE code as recommended * removed local state declaration * Review comment fixes * review comment fixes * review comment fixes * review comment fixes * review comment fixes * certificate delete api * added one field to response * added removable * [6540] Added ability to delete certificates * added removable field * removable added * [6540]Added ability to remove certificate * removable added to list api * added validation for remove certificates. * review comment fixes * replaced removable props with inUse as recommended * fixed disabled scenario of remove cert button * review comment fixes * Addressed review comments * modified test cases * Code improvements * modified FE code as recommended * removed local state declaration * Review comment fixes * review comment fixes * review comment fixes * review comment fixes * review comment fixes * review comment fixes * Review comment fixes * Review comment fixes Co-authored-by: mahendra bhat <[email protected]> Co-authored-by: gaurav061 <[email protected]>
Description: Remove certificate feature which will be added in the list view of certificates to delete unused certificates.
If the certificate is linked to the existing universe then we will be disabling the button in the FE.
Testing: :
sbt run