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

Fixes #36545 - Correcting apidoc for reclaim_space endpoint of smart-… #10630

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

sayan3296
Copy link
Contributor

@sayan3296 sayan3296 commented Jun 28, 2023

What are the changes introduced in this pull request?

Modification of APIDOC to include the right reclaim_space endpoint for external smart-proxies

Considerations taken when implementing this change?

When we invoke the "Reclaim Space" action from WebUI for any external smart-proxies, that triggers the right API call as expected.

But navigating to the API doc, we can see reclaim_space endpoint is not mentioned correctly and results in failure if used as mentioned.

We should document the correct endpoint in the apidoc , which is the source of information for all the admins\end-users

What are the testing steps for this pull request?

  1. Build a setup with an external smart-proxy included
  2. Sync some repos in main Katello server with Immediate download policy
  3. Change the download policy of external smart-proxy to Immediate and sync the external smart-proxy
  4. Change the download policy back to On_Demand for the external smart-proxy
  5. Check the apidoc for Capsule Content --> Reclaim Space and notice POST /katello/api/capsules/:id/reclaim_space is mentioned.
  6. Use the API to trigger the "ReclaimSpace" task and it should immediately show some failure as mentioned in BZ 2218179
  7. Apply the fix from PR and restart the katello instance
  8. Repeat step 5 and notice the corrected endpoint POST /katello/api/capsules/:id/content/reclaim_space
  9. Repeat step 6 and that should successfully trigger the expected task

@theforeman-bot
Copy link

Issues: #36545

Copy link
Member

@sjha4 sjha4 left a comment

Choose a reason for hiding this comment

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

The API desc now matches the actual route of reclaim_space.
UI is not impacted as we use the correct the endpoint path there:

return BastionResource('katello/api/capsules/:id/content/:action', {id: '@id'}, {
          syncStatus: {method: 'GET', isArray: false, params: {action: 'sync'}},
          sync: {method: 'post', isArray: false, params: {action: 'sync'}},
          cancelSync: {method: 'delete', isArray: false, params: {action: 'sync'}},
          reclaimSpace: {method: 'post', isArray: false, params: {action: 'reclaim_space'}}
        });

APJ 👍🏼

@sjha4 sjha4 merged commit a29414b into Katello:master Jun 28, 2023
5 checks passed
wbclark pushed a commit to wbclark/katello that referenced this pull request Jul 20, 2023
wbclark pushed a commit to wbclark/katello that referenced this pull request Jul 21, 2023
wbclark pushed a commit that referenced this pull request Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants