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

NAS-129639 / 25.04 / Remove unused API endpoints #14576

Merged
merged 1 commit into from
Oct 3, 2024
Merged

Conversation

themylogin
Copy link
Contributor

No description provided.

@bugclerk
Copy link
Contributor

@bugclerk bugclerk changed the title Remove unused API endpoints NAS-129639 / 25.04 / Remove unused API endpoints Sep 25, 2024
@themylogin
Copy link
Contributor Author

themylogin commented Sep 25, 2024

@themylogin themylogin force-pushed the NAS-129639 branch 3 times, most recently from 94f45bf to 856dcd3 Compare September 25, 2024 14:22
@themylogin themylogin requested a review from a team September 30, 2024 17:00
Copy link
Member

@sonicaj sonicaj left a comment

Choose a reason for hiding this comment

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

Had a quick pass at crypto/kmip/vm plugins

@@ -47,17 +47,6 @@ async def ec_curve_choices(self):
"""
return {k: k for k in EC_CURVES}

@accepts()
Copy link
Member

Choose a reason for hiding this comment

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

Are we certain UI is not using these ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, no removed endpoints are used by the UI. @undsoft are those just hardcoded?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, this is hardcoded. We can call an endpoint if we feel like that would be beneficial.

*[Dict(profile, additional_attrs=True) for profile in CSR_PROFILES],
example=CSR_PROFILES,
))
async def certificate_signing_requests_profiles(self):
Copy link
Member

Choose a reason for hiding this comment

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

UI should be using this for CSR profiles, seems like they are using the wrong endpoint atm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@undsoft it is strange that the UI does not use this

Copy link
Contributor

Choose a reason for hiding this comment

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

We call webui.crypto.certificate_profiles.

Copy link
Member

Choose a reason for hiding this comment

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

That is not accurate and UI should be using this endpoint instead, i'll make a ticket

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

We missed specifying CSR profiles in that ticket, created a ticket for that https://ixsystems.atlassian.net/browse/NAS-131460

Copy link
Contributor

Choose a reason for hiding this comment

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

Please rename that function and also put it under webui namespace. webui.crypto.csr_profiles

@@ -9,22 +8,6 @@ class Config:
namespace = 'system.advanced'
cli_namespace = 'system.advanced'

@accepts(roles=['SYSTEM_ADVANCED_READ'])
@returns(Dict(additional_attrs=True))
def get_gpu_pci_choices(self):
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 being used by UI as well iirc, @Qubad786 can you confirm ?

Copy link
Contributor

Choose a reason for hiding this comment

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

It seems UI is using device.get_info right now but it should be using this endpoint instead and i think we already have a ticket for UI to use this endpoint

Copy link
Contributor

Choose a reason for hiding this comment

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

@yocalebo yocalebo requested a review from a team October 1, 2024 10:51
Copy link
Member

@sonicaj sonicaj left a comment

Choose a reason for hiding this comment

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

Let's please remove the endpoints which UI is going to consume, apart from that LGTM

@themylogin themylogin merged commit b1682e0 into master Oct 3, 2024
2 of 3 checks passed
@themylogin themylogin deleted the NAS-129639 branch October 3, 2024 17:25
@bugclerk
Copy link
Contributor

bugclerk commented Oct 3, 2024

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Oct 3, 2024
@themylogin
Copy link
Contributor Author

time 20:00

@bugclerk
Copy link
Contributor

Time tracking added.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants