Instead of only checking if a given UA service is available, we now also
check if it is entitled.
- the available field for a service refers to its availability on the
current machine (e.g. on Focal running on a amd64 CPU) ; whereas
- the entitled field tells us if the contract covers the service.
Therefore, we need to make sure that we only list the services that are
both "available" and "entitled".
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
This commit introduces example JSON files that would simulate output of
the ua_client script, as in the following command:
$ ubuntu-advantage status \
--simulate-with-token "${token}" \
--format json
Two files are added, one for each of the following scenario:
* output when supplied a valid, non expired token
* output when supplied a valid but expired token
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>