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

cc_pipeline_apt fix invalid claim #4571

Merged
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
6 changes: 2 additions & 4 deletions cloudinit/config/cc_apt_pipelining.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,14 @@

Value configuration options for this module are:

* ``false`` (Default): disable pipelining altogether
* ``none``, ``unchanged``, or ``os``: use distro default
* ``os``: (Default) use distro default
* ``false`` disable pipelining altogether
* ``<number>``: Manually specify pipeline depth. This is not recommended.""" # noqa: E501
),
"distros": distros,
"frequency": frequency,
"examples": [
"apt_pipelining: false",
"apt_pipelining: none",
"apt_pipelining: unchanged",
"apt_pipelining: os",
"apt_pipelining: 3",
],
Expand Down
19 changes: 15 additions & 4 deletions cloudinit/config/schemas/schema-cloud-config-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -883,10 +883,21 @@
},
{
"type": "string",
"enum": [
"none",
"unchanged",
"os"
"oneOf": [
{
"enum": [
"os"
]
},
{
"deprecated": true,
"deprecated_version": "22.4",
"deprecated_description": "Use ``os`` instead.",
"enum": [
"none",
"unchanged"
]
}
]
}
]
Expand Down
7 changes: 2 additions & 5 deletions tests/unittests/config/test_cc_apt_pipelining.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,14 @@ def test_false_disables_pipelining(self, m_write_file):
({"apt_pipelining": 1}, None),
({"apt_pipelining": True}, None),
({"apt_pipelining": False}, None),
({"apt_pipelining": "none"}, None),
({"apt_pipelining": "unchanged"}, None),
({"apt_pipelining": "os"}, None),
# Invalid schemas
({"apt_pipelining": "none"}, "Deprecated in version"),
({"apt_pipelining": "unchanged"}, "Deprecated in version"),
(
{"apt_pipelining": "bogus"},
re.escape(
"Cloud config schema errors: apt_pipelining: 'bogus' is"
" not of type 'boolean', apt_pipelining: 'bogus' is not"
" of type 'integer', apt_pipelining: 'bogus' is not one"
" of ['none', 'unchanged', 'os']"
),
),
),
Expand Down