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

u.pro.services.dependencies.v1 #2961

Merged
merged 5 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
206 changes: 107 additions & 99 deletions debian/po/pt_BR.po

Large diffs are not rendered by default.

206 changes: 107 additions & 99 deletions debian/po/ubuntu-pro.pot

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions features/api.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Feature: Client behaviour for the API endpoints
When I run `python3 -c "from uaclient.api.u.pro.security.fix.usn.plan.v1 import plan"` as non-root
When I run `python3 -c "from uaclient.api.u.pro.security.status.livepatch_cves.v1 import livepatch_cves"` as non-root
When I run `python3 -c "from uaclient.api.u.pro.security.status.reboot_required.v1 import reboot_required"` as non-root
When I run `python3 -c "from uaclient.api.u.pro.services.dependencies.v1 import dependencies"` as non-root
When I run `python3 -c "from uaclient.api.u.pro.status.enabled_services.v1 import enabled_services"` as non-root
When I run `python3 -c "from uaclient.api.u.pro.status.is_attached.v1 import is_attached"` as non-root
When I run `python3 -c "from uaclient.api.u.pro.version.v1 import version"` as non-root
Expand Down
373 changes: 373 additions & 0 deletions features/api_services_dependencies.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,373 @@
Feature: u.pro.services.dependencies

Scenario Outline: u.pro.services.dependencies.v1
Given a `<release>` `<machine_type>` machine with ubuntu-advantage-tools installed
When I run `pro api u.pro.services.dependencies.v1` as non-root
Then API data field output is:
"""
{
"attributes": {
"services": [
{
"depends_on": [],
"incompatible_with": [],
"name": "anbox-cloud"
},
{
"depends_on": [],
"incompatible_with": [],
"name": "cc-eal"
},
{
"depends_on": [],
"incompatible_with": [],
"name": "cis"
},
{
"depends_on": [],
"incompatible_with": [],
"name": "esm-apps"
},
{
"depends_on": [],
"incompatible_with": [],
"name": "esm-infra"
},
{
"depends_on": [],
"incompatible_with": [
{
"name": "livepatch",
"reason": {
"code": "livepatch-invalidates-fips",
"title": "Livepatch cannot be enabled while running the official FIPS certified kernel. If you would like a FIPS compliant kernel with additional bug fixes and security updates, you can use the FIPS Updates service with Livepatch."
}
},
{
"name": "fips-updates",
"reason": {
"code": "fips-updates-invalidates-fips",
"title": "FIPS cannot be enabled if FIPS Updates has ever been enabled because FIPS Updates installs security patches that aren't officially certified."
}
},
{
"name": "realtime-kernel",
"reason": {
"code": "realtime-fips-incompatible",
"title": "Realtime and FIPS require different kernels, so you cannot enable both at the same time."
}
}
],
"name": "fips"
},
{
"depends_on": [],
"incompatible_with": [
{
"name": "fips",
"reason": {
"code": "fips-invalidates-fips-updates",
"title": "FIPS Updates cannot be enabled if FIPS is enabled. FIPS Updates installs security patches that aren't officially certified."
}
},
{
"name": "realtime-kernel",
"reason": {
"code": "realtime-fips-updates-incompatible",
"title": "Realtime and FIPS Updates require different kernels, so you cannot enable both at the same time."
}
}
],
"name": "fips-updates"
},
{
"depends_on": [],
"incompatible_with": [
{
"name": "livepatch",
"reason": {
"code": "livepatch-invalidates-fips",
"title": "Livepatch cannot be enabled while running the official FIPS certified kernel. If you would like a FIPS compliant kernel with additional bug fixes and security updates, you can use the FIPS Updates service with Livepatch."
}
},
{
"name": "fips-updates",
"reason": {
"code": "fips-updates-invalidates-fips",
"title": "FIPS cannot be enabled if FIPS Updates has ever been enabled because FIPS Updates installs security patches that aren't officially certified."
}
},
{
"name": "realtime-kernel",
"reason": {
"code": "realtime-fips-incompatible",
"title": "Realtime and FIPS require different kernels, so you cannot enable both at the same time."
}
},
{
"name": "fips",
"reason": {
"code": "fips-invalidates-fips-updates",
"title": "FIPS Updates cannot be enabled if FIPS is enabled. FIPS Updates installs security patches that aren't officially certified."
}
}
],
"name": "fips-preview"
},
{
"depends_on": [],
"incompatible_with": [],
"name": "landscape"
},
{
"depends_on": [],
"incompatible_with": [
{
"name": "fips",
"reason": {
"code": "livepatch-invalidates-fips",
"title": "Livepatch cannot be enabled while running the official FIPS certified kernel. If you would like a FIPS compliant kernel with additional bug fixes and security updates, you can use the FIPS Updates service with Livepatch."
}
},
{
"name": "realtime-kernel",
"reason": {
"code": "realtime-livepatch-incompatible",
"title": "Livepatch is not currently supported for the Real-time kernel."
}
}
],
"name": "livepatch"
},
{
"depends_on": [],
"incompatible_with": [
{
"name": "fips",
"reason": {
"code": "realtime-fips-incompatible",
"title": "Realtime and FIPS require different kernels, so you cannot enable both at the same time."
}
},
{
"name": "fips-updates",
"reason": {
"code": "realtime-fips-updates-incompatible",
"title": "Realtime and FIPS Updates require different kernels, so you cannot enable both at the same time."
}
},
{
"name": "livepatch",
"reason": {
"code": "realtime-livepatch-incompatible",
"title": "Livepatch is not currently supported for the Real-time kernel."
}
}
],
"name": "realtime-kernel"
},
{
"depends_on": [
{
"name": "esm-infra",
"reason": {
"code": "ros-requires-esm",
"title": "ROS packages assume ESM updates are enabled."
}
},
{
"name": "esm-apps",
"reason": {
"code": "ros-requires-esm",
"title": "ROS packages assume ESM updates are enabled."
}
}
],
"incompatible_with": [],
"name": "ros"
},
{
"depends_on": [
{
"name": "esm-infra",
"reason": {
"code": "ros-requires-esm",
"title": "ROS packages assume ESM updates are enabled."
}
},
{
"name": "esm-apps",
"reason": {
"code": "ros-requires-esm",
"title": "ROS packages assume ESM updates are enabled."
}
},
{
"name": "ros",
"reason": {
"code": "ros-updates-requires-ros",
"title": "ROS bug-fix updates assume ROS security fix updates are enabled."
}
}
],
"incompatible_with": [],
"name": "ros-updates"
}
]
},
"meta": {
"environment_vars": []
},
"type": "ServiceDependencies"
}
"""
When I create the file `/tmp/dependencies.py` with the following:
"""
import yaml
from uaclient.api.u.pro.services.dependencies.v1 import dependencies

print(yaml.dump(dependencies().to_dict(), default_flow_style=False))
"""
And I run `python3 /tmp/dependencies.py` with sudo
Then I will see the following on stdout:
"""
services:
- depends_on: []
incompatible_with: []
name: anbox-cloud
- depends_on: []
incompatible_with: []
name: cc-eal
- depends_on: []
incompatible_with: []
name: cis
- depends_on: []
incompatible_with: []
name: esm-apps
- depends_on: []
incompatible_with: []
name: esm-infra
- depends_on: []
incompatible_with:
- name: livepatch
reason:
code: livepatch-invalidates-fips
title: Livepatch cannot be enabled while running the official FIPS certified
kernel. If you would like a FIPS compliant kernel with additional bug fixes
and security updates, you can use the FIPS Updates service with Livepatch.
- name: fips-updates
reason:
code: fips-updates-invalidates-fips
title: FIPS cannot be enabled if FIPS Updates has ever been enabled because
FIPS Updates installs security patches that aren't officially certified.
- name: realtime-kernel
reason:
code: realtime-fips-incompatible
title: Realtime and FIPS require different kernels, so you cannot enable both
at the same time.
name: fips
- depends_on: []
incompatible_with:
- name: fips
reason:
code: fips-invalidates-fips-updates
title: FIPS Updates cannot be enabled if FIPS is enabled. FIPS Updates installs
security patches that aren't officially certified.
- name: realtime-kernel
reason:
code: realtime-fips-updates-incompatible
title: Realtime and FIPS Updates require different kernels, so you cannot enable
both at the same time.
name: fips-updates
- depends_on: []
incompatible_with:
- name: livepatch
reason:
code: livepatch-invalidates-fips
title: Livepatch cannot be enabled while running the official FIPS certified
kernel. If you would like a FIPS compliant kernel with additional bug fixes
and security updates, you can use the FIPS Updates service with Livepatch.
- name: fips-updates
reason:
code: fips-updates-invalidates-fips
title: FIPS cannot be enabled if FIPS Updates has ever been enabled because
FIPS Updates installs security patches that aren't officially certified.
- name: realtime-kernel
reason:
code: realtime-fips-incompatible
title: Realtime and FIPS require different kernels, so you cannot enable both
at the same time.
- name: fips
reason:
code: fips-invalidates-fips-updates
title: FIPS Updates cannot be enabled if FIPS is enabled. FIPS Updates installs
security patches that aren't officially certified.
name: fips-preview
- depends_on: []
incompatible_with: []
name: landscape
- depends_on: []
incompatible_with:
- name: fips
reason:
code: livepatch-invalidates-fips
title: Livepatch cannot be enabled while running the official FIPS certified
kernel. If you would like a FIPS compliant kernel with additional bug fixes
and security updates, you can use the FIPS Updates service with Livepatch.
- name: realtime-kernel
reason:
code: realtime-livepatch-incompatible
title: Livepatch is not currently supported for the Real-time kernel.
name: livepatch
- depends_on: []
incompatible_with:
- name: fips
reason:
code: realtime-fips-incompatible
title: Realtime and FIPS require different kernels, so you cannot enable both
at the same time.
- name: fips-updates
reason:
code: realtime-fips-updates-incompatible
title: Realtime and FIPS Updates require different kernels, so you cannot enable
both at the same time.
- name: livepatch
reason:
code: realtime-livepatch-incompatible
title: Livepatch is not currently supported for the Real-time kernel.
name: realtime-kernel
- depends_on:
- name: esm-infra
reason:
code: ros-requires-esm
title: ROS packages assume ESM updates are enabled.
- name: esm-apps
reason:
code: ros-requires-esm
title: ROS packages assume ESM updates are enabled.
incompatible_with: []
name: ros
- depends_on:
- name: esm-infra
reason:
code: ros-requires-esm
title: ROS packages assume ESM updates are enabled.
- name: esm-apps
reason:
code: ros-requires-esm
title: ROS packages assume ESM updates are enabled.
- name: ros
reason:
code: ros-updates-requires-ros
title: ROS bug-fix updates assume ROS security fix updates are enabled.
incompatible_with: []
name: ros-updates
"""

Examples: ubuntu release
| release | machine_type |
| xenial | lxd-container |
| bionic | lxd-container |
| focal | lxd-container |
| jammy | lxd-container |
| mantic | lxd-container |
Loading
Loading