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

Support --format=json for attach/detach/disable/enable #1812

Closed
robert-ancell opened this issue Sep 21, 2021 · 2 comments
Closed

Support --format=json for attach/detach/disable/enable #1812

robert-ancell opened this issue Sep 21, 2021 · 2 comments
Assignees
Labels

Comments

@robert-ancell
Copy link
Contributor

robert-ancell commented Sep 21, 2021

When using the ua client from a desktop environment it is desirable to get back information on requests in a form that can be easily parsed. The proposal is to add a --format=json flag form for these much like the status command does.

For example, currently:

$ sudo ua enable foo
To use 'foo' you need an Ubuntu Advantage subscription
Personal and community subscriptions are available at no charge
See https://ubuntu.com/advantage

proposed:

$ sudo ua enable foo --format=json
{"result": "error", "error-code": "no-subscription", "error-text": "To use 'foo' you need an Ubuntu Advantage subscription\nPersonal and community subscriptions are available at no charge\nSee https://ubuntu.com/advantage"}
@robert-ancell
Copy link
Contributor Author

See #1814 for showing progress information, which may be solved at the same time.

@orndorffgrant
Copy link
Collaborator

This was addressed over several PRs including #1912 #1949 #1953

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

No branches or pull requests

3 participants