Skip to content

Commit

Permalink
Update imports on cve/usn endpoints
Browse files Browse the repository at this point in the history
We want users to import all necessary data objects
directly from the cve/usn endpoint. To achieve that,
we are moving some imports directly into those modules
  • Loading branch information
lucasmoura committed Oct 11, 2023
1 parent c3ae838 commit f1ae776
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
5 changes: 4 additions & 1 deletion uaclient/api/u/pro/security/fix/cve/execute/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
FixStatus,
get_expected_overall_status,
)
from uaclient.api.u.pro.security.fix._common.execute.v1 import (
from uaclient.api.u.pro.security.fix._common.execute.v1 import ( # noqa: F401
FailedUpgrade,
FixExecuteError,
FixExecuteResult,
UpgradedPackage,
_execute_fix,
)
from uaclient.api.u.pro.security.fix.cve.plan.v1 import (
Expand Down
11 changes: 10 additions & 1 deletion uaclient/api/u/pro/security/fix/cve/plan/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,17 @@
from uaclient.api.api import APIEndpoint
from uaclient.api.data_types import AdditionalInfo
from uaclient.api.u.pro.security.fix._common import get_expected_overall_status
from uaclient.api.u.pro.security.fix._common.plan.v1 import (
from uaclient.api.u.pro.security.fix._common.plan.v1 import ( # noqa: F401
AptUpgradeData,
AttachData,
EnableData,
FixPlanError,
FixPlanResult,
FixPlanStep,
FixPlanWarning,
NoOpData,
PackageCannotBeInstalledData,
SecurityIssueNotFixedData,
fix_plan_cve,
)
from uaclient.config import UAConfig
Expand Down
5 changes: 4 additions & 1 deletion uaclient/api/u/pro/security/fix/usn/execute/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
FixStatus,
get_expected_overall_status,
)
from uaclient.api.u.pro.security.fix._common.execute.v1 import (
from uaclient.api.u.pro.security.fix._common.execute.v1 import ( # noqa: F401
FailedUpgrade,
FixExecuteError,
FixExecuteResult,
UpgradedPackage,
_execute_fix,
)
from uaclient.api.u.pro.security.fix.usn.plan.v1 import (
Expand Down
12 changes: 11 additions & 1 deletion uaclient/api/u/pro/security/fix/usn/plan/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,18 @@
from uaclient.api.api import APIEndpoint
from uaclient.api.data_types import AdditionalInfo
from uaclient.api.u.pro.security.fix._common import get_expected_overall_status
from uaclient.api.u.pro.security.fix._common.plan.v1 import (
from uaclient.api.u.pro.security.fix._common.plan.v1 import ( # noqa: F401
AptUpgradeData,
AttachData,
EnableData,
FixPlanError,
FixPlanResult,
FixPlanStep,
FixPlanUSNResult,
FixPlanWarning,
NoOpData,
PackageCannotBeInstalledData,
SecurityIssueNotFixedData,
fix_plan_usn,
)
from uaclient.config import UAConfig
Expand Down

0 comments on commit f1ae776

Please sign in to comment.