diff options
author | Brett Holman <brett.holman@canonical.com> | 2023-03-03 14:00:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-03 15:00:16 -0600 |
commit | b728b4e7cda8643c83d5c390411995f759cf97fa (patch) | |
tree | c8498433b5de4dbf775dd09da0a72e44f6e385c2 /cloudinit/config | |
parent | 4896402b2b0acb59646fff9d49e57b084d22d1b0 (diff) | |
download | cloud-init-git-b728b4e7cda8643c83d5c390411995f759cf97fa.tar.gz |
Remove dead code (#2038)
Diffstat (limited to 'cloudinit/config')
-rw-r--r-- | cloudinit/config/cc_apt_configure.py | 9 | ||||
-rw-r--r-- | cloudinit/config/cc_refresh_rmc_and_interface.py | 17 | ||||
-rw-r--r-- | cloudinit/config/schema.py | 13 |
3 files changed, 0 insertions, 39 deletions
diff --git a/cloudinit/config/cc_apt_configure.py b/cloudinit/config/cc_apt_configure.py index 17c2fb58..e8de000a 100644 --- a/cloudinit/config/cc_apt_configure.py +++ b/cloudinit/config/cc_apt_configure.py @@ -383,15 +383,6 @@ def rename_apt_lists(new_mirrors, target, arch): LOG.warning("Failed to rename apt list:", exc_info=True) -def mirror_to_placeholder(tmpl, mirror, placeholder): - """mirror_to_placeholder - replace the specified mirror in a template with a placeholder string - Checks for existance of the expected mirror and warns if not found""" - if mirror not in tmpl: - LOG.warning("Expected mirror '%s' not found in: %s", mirror, tmpl) - return tmpl.replace(mirror, placeholder) - - def map_known_suites(suite): """there are a few default names which will be auto-extended. This comes at the inability to use those names literally as suites, diff --git a/cloudinit/config/cc_refresh_rmc_and_interface.py b/cloudinit/config/cc_refresh_rmc_and_interface.py index 18c22476..87923f0b 100644 --- a/cloudinit/config/cc_refresh_rmc_and_interface.py +++ b/cloudinit/config/cc_refresh_rmc_and_interface.py @@ -150,20 +150,3 @@ def search(contents): or contents.startswith("IPV6INIT") or contents.startswith("NM_CONTROLLED") ) - - -def refresh_rmc(): - # To make a healthy connection between RMC daemon and hypervisor we - # refresh RMC. With refreshing RMC we are ensuring that making IPv6 - # down and up shouldn't impact communication between RMC daemon and - # hypervisor. - # -z : stop Resource Monitoring & Control subsystem and all resource - # managers, but the command does not return control to the user - # until the subsystem and all resource managers are stopped. - # -s : start Resource Monitoring & Control subsystem. - try: - subp.subp([RMCCTRL, "-z"]) - subp.subp([RMCCTRL, "-s"]) - except Exception: - util.logexc(LOG, "Failed to refresh the RMC subsystem.") - raise diff --git a/cloudinit/config/schema.py b/cloudinit/config/schema.py index 9bccdcec..0669defc 100644 --- a/cloudinit/config/schema.py +++ b/cloudinit/config/schema.py @@ -1139,19 +1139,6 @@ def get_schema() -> dict: return full_schema -def get_meta() -> dict: - """Return metadata coalesced from all cc_* cloud-config module.""" - full_meta = dict() - for (_, mod_name) in get_modules().items(): - mod_locs, _ = importer.find_module( - mod_name, ["cloudinit.config"], ["meta"] - ) - if mod_locs: - mod = importer.import_module(mod_locs[0]) - full_meta[mod.meta["id"]] = mod.meta - return full_meta - - def get_parser(parser=None): """Return a parser for supported cmdline arguments.""" if not parser: |