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 docs for new API endpoints #3057

Merged
merged 3 commits into from
Apr 11, 2024
Merged

Add docs for new API endpoints #3057

merged 3 commits into from
Apr 11, 2024

Conversation

lucasmoura
Copy link
Contributor

Why is this needed?

Add documentation for the following API related changes:

  • u.pro.detach.v1 endpoint
  • u.pro.attach.token.full_token_attach.v1 endpoint
  • u.pro.status.is_attached.v1 new fields in the API result

Test Steps

Verify if the documentation page is correctly rendered and we are not missing any information related to the API changes

Checklist

  • I have updated or added any unit tests accordingly
  • I have updated or added any integration tests accordingly
  • Changes here need to be documented, and this was done in:

Does this PR require extra reviews?

  • Yes
  • No

Copy link
Contributor

@s-makin s-makin left a comment

Choose a reason for hiding this comment

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

Just a few nits :)

- Introduced in Ubuntu Pro Client Version: ``32~``
- Args:

- ``token``: The token associated with a Pro subscriptionn
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- ``token``: The token associated with a Pro subscriptionn
- ``token``: The token associated with a Pro subscription

- The services enabled during the attach operation
* - ``reboot_required``
- *bool*
- If the system requires a reboot after the attach operation
Copy link
Contributor

Choose a reason for hiding this comment

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

Presumably this is True if the system requires a reboot?

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, I will make it more explicit


pro api u.pro.attach.token.full_token_attach.v1

Note that we don't need to explicit pass the token when calling the CLI command.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Note that we don't need to explicit pass the token when calling the CLI command.
Note that we don't need to explicitly pass the token when calling the CLI command.

pro api u.pro.attach.token.full_token_attach.v1

Note that we don't need to explicit pass the token when calling the CLI command.
If we define a json file (i.e. file.json) with the same attributes as the options for 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.

Suggested change
If we define a json file (i.e. file.json) with the same attributes as the options for this endpoint:
If we define a JSON file (i.e. ``file.json``) with the same attributes as the options for this endpoint:

"auto_enable_services": false
}

Then, we can call the API like this:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Then, we can call the API like this:
Then we can call the API like this:

- The services disabled during the detach operation
* - ``reboot_required``
- *bool*
- If the system requires a reboot after the detach operation
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this also be "True if..."

.. tab-item:: Explanation
:sync: explanation

The *contract_status* field can return 4 different states, they are:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The *contract_status* field can return 4 different states, they are:
The ``contract_status`` field can return 4 different states, they are:

Comment on lines 2392 to 2393
* **grace-period**: The contract is in the grace period. This means that it is expired,
there are still some days were the contract will be valid.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* **grace-period**: The contract is in the grace period. This means that it is expired,
there are still some days were the contract will be valid.
* **grace-period**: The contract is in the grace period. This means that it is expired,
but there are still some days where the contract will be valid.

@lucasmoura
Copy link
Contributor Author

@s-makin updated

Copy link
Contributor

@s-makin s-makin left a comment

Choose a reason for hiding this comment

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

Just two little nits

- The services enabled during the attach operation
* - ``reboot_required``
- *bool*
- True If the system requires a reboot after the attach operation
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- True If the system requires a reboot after the attach operation
- True if the system requires a reboot after the attach operation

* - ``contract_status``
- *str*
- The current contract status (active, grace-period, active-soon-to-expire, expired).
Please refer to the explanation tab for a description of each state
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Please refer to the explanation tab for a description of each state
Please refer to the explanation tab for a description of each state.

@lucasmoura
Copy link
Contributor Author

@s-makin fixed

@s-makin s-makin merged commit 9acee1b into docs-devel Apr 11, 2024
7 checks passed
@s-makin s-makin deleted the new-api-docs branch April 11, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants