Merge pull request #1311 from ogayot/pro-services-auto-enabled
ubuntu-pro: add auto_enabled property for services
This commit is contained in:
commit
7f4a72a12f
|
@ -460,6 +460,7 @@ class UbuntuProCheckTokenStatus(enum.Enum):
|
|||
class UbuntuProService:
|
||||
name: str
|
||||
description: str
|
||||
auto_enabled: bool
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
|
|
|
@ -191,18 +191,22 @@ class TestUAInterface(unittest.TestCase):
|
|||
self.assertIn(UbuntuProService(
|
||||
name="esm-infra",
|
||||
description="UA Infra: Extended Security Maintenance (ESM)",
|
||||
auto_enabled=True,
|
||||
), services)
|
||||
self.assertIn(UbuntuProService(
|
||||
name="fips",
|
||||
description="NIST-certified core packages",
|
||||
auto_enabled=False,
|
||||
), services)
|
||||
self.assertNotIn(UbuntuProService(
|
||||
name="esm-apps",
|
||||
description="UA Apps: Extended Security Maintenance (ESM)",
|
||||
auto_enabled=True,
|
||||
), services)
|
||||
self.assertNotIn(UbuntuProService(
|
||||
name="cis",
|
||||
description="Center for Internet Security Audit Tools",
|
||||
auto_enabled=False,
|
||||
), services)
|
||||
|
||||
# Test with "Z" suffix for the expiration date.
|
||||
|
|
|
@ -174,6 +174,7 @@ class UAInterface:
|
|||
return UbuntuProService(
|
||||
name=service["name"],
|
||||
description=service["description"],
|
||||
auto_enabled=service["auto_enabled"] == "yes",
|
||||
)
|
||||
|
||||
activable_services: List[UbuntuProService] = []
|
||||
|
|
Loading…
Reference in New Issue