/usr/lib/python2.6/site-packages/cloudinit/config
NameSizeModeActions
cc_apt_configure.py96000644editdlrm
cc_apt_configure.pyc90130644editdlrm
cc_apt_configure.pyo90130644editdlrm
cc_apt_pipelining.py21110644editdlrm
cc_apt_pipelining.pyc16430644editdlrm
cc_apt_pipelining.pyo16430644editdlrm
cc_bootcmd.py17820644editdlrm
cc_bootcmd.pyc12950644editdlrm
cc_bootcmd.pyo12950644editdlrm
cc_byobu.py28860644editdlrm
cc_byobu.pyc21850644editdlrm
cc_byobu.pyo21850644editdlrm
cc_ca_certs.py38720644editdlrm
cc_ca_certs.pyc33960644editdlrm
cc_ca_certs.pyo33960644editdlrm
cc_chef.py57180644editdlrm
cc_chef.pyc40270644editdlrm
cc_chef.pyo40270644editdlrm
cc_debug.py28690644editdlrm
cc_debug.pyc24440644editdlrm
cc_debug.pyo24440644editdlrm
cc_disable_ec2_metadata.py13120644editdlrm
cc_disable_ec2_metadata.pyc8730644editdlrm
cc_disable_ec2_metadata.pyo8730644editdlrm
cc_disk_setup.py252740644editdlrm
cc_disk_setup.pyc225600644editdlrm
cc_disk_setup.pyo225600644editdlrm
cc_emit_upstart.py17070644editdlrm
cc_emit_upstart.pyc11430644editdlrm
cc_emit_upstart.pyo11430644editdlrm
cc_final_message.py23480644editdlrm
cc_final_message.pyc18600644editdlrm
cc_final_message.pyo18600644editdlrm
cc_foo.py24530644editdlrm
cc_foo.pyc4880644editdlrm
cc_foo.pyo4880644editdlrm
cc_growpart.py96020644editdlrm
cc_growpart.pyc89280644editdlrm
cc_growpart.pyo89280644editdlrm
cc_grub_dpkg.py23440644editdlrm
cc_grub_dpkg.pyc15430644editdlrm
cc_grub_dpkg.pyo15430644editdlrm
cc_keys_to_console.py19430644editdlrm
cc_keys_to_console.pyc13000644editdlrm
cc_keys_to_console.pyo13000644editdlrm
cc_landscape.py29910644editdlrm
cc_landscape.pyc24760644editdlrm
cc_landscape.pyo24760644editdlrm
cc_locale.py13580644editdlrm
cc_locale.pyc8010644editdlrm
cc_locale.pyo8010644editdlrm
cc_mcollective.py37600644editdlrm
cc_mcollective.pyc18400644editdlrm
cc_mcollective.pyo18400644editdlrm
cc_migrator.py31190644editdlrm
cc_migrator.pyc27490644editdlrm
cc_migrator.pyo27490644editdlrm
cc_mounts.py84830644editdlrm
cc_mounts.pyc61530644editdlrm
cc_mounts.pyo61530644editdlrm
cc_package_update_upgrade_install.py35230644editdlrm
cc_package_update_upgrade_install.pyc29370644editdlrm
cc_package_update_upgrade_install.pyo29370644editdlrm
cc_phone_home.py36660644editdlrm
cc_phone_home.pyc24790644editdlrm
cc_phone_home.pyo24790644editdlrm
cc_power_state_change.py51210644editdlrm
cc_power_state_change.pyc49340644editdlrm
cc_power_state_change.pyo49340644editdlrm
cc_puppet.py51660644editdlrm
cc_puppet.pyc30550644editdlrm
cc_puppet.pyo30550644editdlrm
cc_resizefs.py56970644editdlrm
cc_resizefs.pyc47680644editdlrm
cc_resizefs.pyo47680644editdlrm
cc_resolv_conf.py36810644editdlrm
cc_resolv_conf.pyc22130644editdlrm
cc_resolv_conf.pyo22130644editdlrm
cc_rightscale_userdata.py35750644editdlrm
cc_rightscale_userdata.pyc20740644editdlrm
cc_rightscale_userdata.pyo20740644editdlrm
cc_rsyslog.py34120644editdlrm
cc_rsyslog.pyc18480644editdlrm
cc_rsyslog.pyo18480644editdlrm
cc_runcmd.py13480644editdlrm
cc_runcmd.pyc8420644editdlrm
cc_runcmd.pyo8420644editdlrm
cc_salt_minion.py23150644editdlrm
cc_salt_minion.pyc14130644editdlrm
cc_salt_minion.pyo14130644editdlrm
cc_scripts_per_boot.py13690644editdlrm
cc_scripts_per_boot.pyc8060644editdlrm
cc_scripts_per_boot.pyo8060644editdlrm
cc_scripts_per_instance.py13770644editdlrm
cc_scripts_per_instance.pyc8200644editdlrm
cc_scripts_per_instance.pyo8200644editdlrm
cc_scripts_per_once.py13650644editdlrm
cc_scripts_per_once.pyc8040644editdlrm
cc_scripts_per_once.pyo8040644editdlrm
cc_scripts_user.py13880644editdlrm
cc_scripts_user.pyc7880644editdlrm
cc_scripts_user.pyo7880644editdlrm
cc_scripts_vendor.py13980644editdlrm
cc_scripts_vendor.pyc9240644editdlrm
cc_scripts_vendor.pyo9240644editdlrm
cc_seed_random.py31610644editdlrm
cc_seed_random.pyc27670644editdlrm
cc_seed_random.pyo27670644editdlrm
cc_set_hostname.py14600644editdlrm
cc_set_hostname.pyc9320644editdlrm
cc_set_hostname.pyo9320644editdlrm
cc_set_passwords.py55550644editdlrm
cc_set_passwords.pyc40100644editdlrm
cc_set_passwords.pyo40100644editdlrm
cc_ssh.py52250644editdlrm
cc_ssh.pyc41040644editdlrm
cc_ssh.pyo41040644editdlrm
cc_ssh_authkey_fingerprints.py36480644editdlrm
cc_ssh_authkey_fingerprints.pyc35070644editdlrm
cc_ssh_authkey_fingerprints.pyo35070644editdlrm
cc_ssh_import_id.py30390644editdlrm
cc_ssh_import_id.pyc21910644editdlrm
cc_ssh_import_id.pyo21910644editdlrm
cc_timezone.py13160644editdlrm
cc_timezone.pyc7690644editdlrm
cc_timezone.pyo7690644editdlrm
cc_update_etc_hosts.py23910644editdlrm
cc_update_etc_hosts.pyc15090644editdlrm
cc_update_etc_hosts.pyo15090644editdlrm
cc_update_hostname.py16270644editdlrm
cc_update_hostname.pyc11660644editdlrm
cc_update_hostname.pyo11660644editdlrm
cc_users_groups.py12650644editdlrm
cc_users_groups.pyc7920644editdlrm
cc_users_groups.pyo7920644editdlrm
cc_write_files.py35540644editdlrm
cc_write_files.pyc32310644editdlrm
cc_write_files.pyo32310644editdlrm
cc_yum_add_repo.py39440644editdlrm
cc_yum_add_repo.pyc30260644editdlrm
cc_yum_add_repo.pyo30260644editdlrm
__init__.py19700644editdlrm
__init__.pyc13490644editdlrm
__init__.pyo13490644editdlrm
Edit: /usr/lib/python2.6/site-packages/cloudinit/config/cc_migrator.py (3119B)
# vi: ts=4 expandtab # # Copyright (C) 2012 Yahoo! Inc. # # Author: Joshua Harlow # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3, as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . import os import shutil from cloudinit import helpers from cloudinit import util from cloudinit.settings import PER_ALWAYS frequency = PER_ALWAYS def _migrate_canon_sems(cloud): paths = (cloud.paths.get_ipath('sem'), cloud.paths.get_cpath('sem')) am_adjusted = 0 for sem_path in paths: if not sem_path or not os.path.exists(sem_path): continue for p in os.listdir(sem_path): full_path = os.path.join(sem_path, p) if os.path.isfile(full_path): (name, ext) = os.path.splitext(p) canon_name = helpers.canon_sem_name(name) if canon_name != name: new_path = os.path.join(sem_path, canon_name + ext) shutil.move(full_path, new_path) am_adjusted += 1 return am_adjusted def _migrate_legacy_sems(cloud, log): legacy_adjust = { 'apt-update-upgrade': [ 'apt-configure', 'package-update-upgrade-install', ], } paths = (cloud.paths.get_ipath('sem'), cloud.paths.get_cpath('sem')) for sem_path in paths: if not sem_path or not os.path.exists(sem_path): continue sem_helper = helpers.FileSemaphores(sem_path) for (mod_name, migrate_to) in legacy_adjust.items(): possibles = [mod_name, helpers.canon_sem_name(mod_name)] old_exists = [] for p in os.listdir(sem_path): (name, _ext) = os.path.splitext(p) if name in possibles and os.path.isfile(p): old_exists.append(p) for p in old_exists: util.del_file(os.path.join(sem_path, p)) (_name, freq) = os.path.splitext(p) for m in migrate_to: log.debug("Migrating %s => %s with the same frequency", p, m) with sem_helper.lock(m, freq): pass def handle(name, cfg, cloud, log, _args): do_migrate = util.get_cfg_option_str(cfg, "migrate", True) if not util.translate_bool(do_migrate): log.debug("Skipping module named %s, migration disabled", name) return sems_moved = _migrate_canon_sems(cloud) log.debug("Migrated %s semaphore files to there canonicalized names", sems_moved) _migrate_legacy_sems(cloud, log)