Merge ~smoser/cloud-init:bug/1570325-chpasswd-hashed-passwds into ~tore.lonoy/cloud-init:hashed-chpasswd-support
- Git
- lp:~smoser/cloud-init
- bug/1570325-chpasswd-hashed-passwds
- Merge into hashed-chpasswd-support
Proposed by
Scott Moser
Status: | Merged | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Merge reported by: | Scott Moser | ||||||||||||||||||||
Merged at revision: | not available | ||||||||||||||||||||
Proposed branch: | ~smoser/cloud-init:bug/1570325-chpasswd-hashed-passwds | ||||||||||||||||||||
Merge into: | ~tore.lonoy/cloud-init:hashed-chpasswd-support | ||||||||||||||||||||
Diff against target: |
27550 lines (+14914/-4663) (has conflicts) 465 files modified
.gitignore (+1/-0) .pylintrc (+39/-0) ChangeLog (+97/-0) HACKING.rst (+8/-7) LICENSE (+22/-674) LICENSE-Apache2.0 (+202/-0) LICENSE-GPLv3 (+674/-0) Makefile (+9/-5) cloudinit/__init__.py (+0/-21) cloudinit/atomic_helper.py (+3/-2) cloudinit/cloud.py (+6/-20) cloudinit/cmd/__init__.py (+0/-21) cloudinit/cmd/main.py (+177/-38) cloudinit/config/__init__.py (+7/-18) cloudinit/config/cc_apt_configure.py (+10/-20) cloudinit/config/cc_apt_pipelining.py (+5/-15) cloudinit/config/cc_bootcmd.py (+8/-18) cloudinit/config/cc_byobu.py (+7/-17) cloudinit/config/cc_ca_certs.py (+7/-17) cloudinit/config/cc_chef.py (+8/-18) cloudinit/config/cc_debug.py (+4/-14) cloudinit/config/cc_disable_ec2_metadata.py (+7/-17) cloudinit/config/cc_disk_setup.py (+14/-24) cloudinit/config/cc_emit_upstart.py (+7/-17) cloudinit/config/cc_fan.py (+5/-15) cloudinit/config/cc_final_message.py (+7/-17) cloudinit/config/cc_foo.py (+7/-17) cloudinit/config/cc_growpart.py (+8/-17) cloudinit/config/cc_grub_dpkg.py (+7/-17) cloudinit/config/cc_keys_to_console.py (+7/-17) cloudinit/config/cc_landscape.py (+7/-17) cloudinit/config/cc_locale.py (+7/-17) cloudinit/config/cc_lxd.py (+5/-15) cloudinit/config/cc_mcollective.py (+8/-18) cloudinit/config/cc_migrator.py (+5/-15) cloudinit/config/cc_mounts.py (+52/-32) cloudinit/config/cc_ntp.py (+5/-15) cloudinit/config/cc_package_update_upgrade_install.py (+5/-15) cloudinit/config/cc_phone_home.py (+7/-17) cloudinit/config/cc_power_state_change.py (+5/-15) cloudinit/config/cc_puppet.py (+7/-17) cloudinit/config/cc_resizefs.py (+8/-17) cloudinit/config/cc_resolv_conf.py (+7/-17) cloudinit/config/cc_rh_subscription.py (+8/-17) cloudinit/config/cc_rightscale_userdata.py (+7/-17) cloudinit/config/cc_rsyslog.py (+8/-17) cloudinit/config/cc_runcmd.py (+7/-17) cloudinit/config/cc_salt_minion.py (+4/-14) cloudinit/config/cc_scripts_per_boot.py (+7/-17) cloudinit/config/cc_scripts_per_instance.py (+7/-17) cloudinit/config/cc_scripts_per_once.py (+7/-17) cloudinit/config/cc_scripts_user.py (+7/-17) cloudinit/config/cc_scripts_vendor.py (+6/-16) cloudinit/config/cc_seed_random.py (+8/-18) cloudinit/config/cc_set_hostname.py (+8/-18) cloudinit/config/cc_set_passwords.py (+52/-19) cloudinit/config/cc_snap_config.py (+5/-15) cloudinit/config/cc_snappy.py (+3/-13) cloudinit/config/cc_spacewalk.py (+3/-13) cloudinit/config/cc_ssh.py (+7/-17) cloudinit/config/cc_ssh_authkey_fingerprints.py (+5/-15) cloudinit/config/cc_ssh_import_id.py (+7/-17) cloudinit/config/cc_timezone.py (+7/-17) cloudinit/config/cc_ubuntu_init_switch.py (+5/-15) cloudinit/config/cc_update_etc_hosts.py (+7/-17) cloudinit/config/cc_update_hostname.py (+7/-17) cloudinit/config/cc_users_groups.py (+5/-15) cloudinit/config/cc_write_files.py (+5/-15) cloudinit/config/cc_yum_add_repo.py (+5/-15) cloudinit/cs_utils.py (+6/-15) cloudinit/dhclient_hook.py (+3/-2) cloudinit/distros/__init__.py (+35/-28) cloudinit/distros/arch.py (+5/-15) cloudinit/distros/debian.py (+25/-32) cloudinit/distros/fedora.py (+9/-19) cloudinit/distros/freebsd.py (+5/-15) cloudinit/distros/gentoo.py (+7/-17) cloudinit/distros/net_util.py (+9/-19) cloudinit/distros/parsers/__init__.py (+5/-15) cloudinit/distros/parsers/hostname.py (+5/-15) cloudinit/distros/parsers/hosts.py (+5/-15) cloudinit/distros/parsers/resolv_conf.py (+12/-19) cloudinit/distros/parsers/sys_conf.py (+5/-15) cloudinit/distros/rhel.py (+22/-32) cloudinit/distros/rhel_util.py (+9/-20) cloudinit/distros/sles.py (+5/-17) cloudinit/distros/ubuntu.py (+10/-20) cloudinit/distros/ug_util.py (+10/-20) cloudinit/ec2_utils.py (+11/-18) cloudinit/filters/__init__.py (+0/-21) cloudinit/filters/launch_index.py (+9/-19) cloudinit/gpg.py (+8/-17) cloudinit/handlers/__init__.py (+9/-19) cloudinit/handlers/boot_hook.py (+9/-19) cloudinit/handlers/cloud_config.py (+9/-19) cloudinit/handlers/shell_script.py (+9/-19) cloudinit/handlers/upstart_job.py (+10/-20) cloudinit/helpers.py (+11/-19) cloudinit/importer.py (+9/-19) cloudinit/log.py (+9/-19) cloudinit/mergers/__init__.py (+5/-15) cloudinit/mergers/m_dict.py (+5/-15) cloudinit/mergers/m_list.py (+5/-15) cloudinit/mergers/m_str.py (+3/-14) cloudinit/net/__init__.py (+94/-98) cloudinit/net/cmdline.py (+27/-26) cloudinit/net/eni.py (+42/-38) cloudinit/net/netplan.py (+373/-0) cloudinit/net/network_state.py (+312/-22) cloudinit/net/renderer.py (+16/-15) cloudinit/net/renderers.py (+53/-0) cloudinit/net/sysconfig.py (+69/-35) cloudinit/net/udev.py (+3/-14) cloudinit/netinfo.py (+9/-19) cloudinit/patcher.py (+7/-17) cloudinit/registry.py (+5/-3) cloudinit/reporting/__init__.py (+3/-2) cloudinit/reporting/events.py (+4/-3) cloudinit/reporting/handlers.py (+3/-1) cloudinit/safeyaml.py (+6/-15) cloudinit/serial.py (+3/-14) cloudinit/settings.py (+12/-19) cloudinit/signal_handler.py (+7/-17) cloudinit/sources/DataSourceAliYun.py (+8/-1) cloudinit/sources/DataSourceAltCloud.py (+10/-20) cloudinit/sources/DataSourceAzure.py (+158/-144) cloudinit/sources/DataSourceBigstep.py (+7/-4) cloudinit/sources/DataSourceCloudSigma.py (+7/-16) cloudinit/sources/DataSourceCloudStack.py (+13/-23) cloudinit/sources/DataSourceConfigDrive.py (+15/-22) cloudinit/sources/DataSourceDigitalOcean.py (+5/-15) cloudinit/sources/DataSourceEc2.py (+159/-21) cloudinit/sources/DataSourceGCE.py (+5/-15) cloudinit/sources/DataSourceMAAS.py (+7/-17) cloudinit/sources/DataSourceNoCloud.py (+9/-19) cloudinit/sources/DataSourceNone.py (+5/-15) cloudinit/sources/DataSourceOVF.py (+42/-23) cloudinit/sources/DataSourceOpenNebula.py (+15/-25) cloudinit/sources/DataSourceOpenStack.py (+17/-18) cloudinit/sources/DataSourceSmartOS.py (+6/-17) cloudinit/sources/__init__.py (+25/-21) cloudinit/sources/helpers/__init__.py (+0/-13) cloudinit/sources/helpers/azure.py (+4/-0) cloudinit/sources/helpers/digitalocean.py (+4/-14) cloudinit/sources/helpers/openstack.py (+21/-19) cloudinit/sources/helpers/vmware/__init__.py (+0/-13) cloudinit/sources/helpers/vmware/imc/__init__.py (+0/-13) cloudinit/sources/helpers/vmware/imc/boot_proto.py (+6/-16) cloudinit/sources/helpers/vmware/imc/config.py (+6/-16) cloudinit/sources/helpers/vmware/imc/config_file.py (+6/-16) cloudinit/sources/helpers/vmware/imc/config_namespace.py (+6/-16) cloudinit/sources/helpers/vmware/imc/config_nic.py (+12/-34) cloudinit/sources/helpers/vmware/imc/config_source.py (+6/-16) cloudinit/sources/helpers/vmware/imc/guestcust_error.py (+6/-16) cloudinit/sources/helpers/vmware/imc/guestcust_event.py (+6/-16) cloudinit/sources/helpers/vmware/imc/guestcust_state.py (+6/-16) cloudinit/sources/helpers/vmware/imc/guestcust_util.py (+6/-16) cloudinit/sources/helpers/vmware/imc/ipv4_mode.py (+6/-16) cloudinit/sources/helpers/vmware/imc/nic.py (+6/-16) cloudinit/sources/helpers/vmware/imc/nic_base.py (+6/-16) cloudinit/ssh_util.py (+26/-24) cloudinit/stages.py (+40/-38) cloudinit/templater.py (+11/-21) cloudinit/type_utils.py (+9/-19) cloudinit/url_helper.py (+10/-20) cloudinit/user_data.py (+9/-19) cloudinit/util.py (+89/-93) cloudinit/version.py (+13/-16) cloudinit/warnings.py (+139/-0) config/cloud.cfg.d/05_logging.cfg (+10/-5) dev/null (+0/-53) doc/examples/cloud-config-apt.txt (+2/-2) doc/examples/cloud-config-boot-cmds.txt (+2/-2) doc/examples/cloud-config-gluster.txt (+2/-2) doc/examples/cloud-config-mount-points.txt (+4/-4) doc/examples/cloud-config.txt (+4/-4) doc/merging.rst (+42/-35) doc/rtd/index.rst (+32/-17) doc/rtd/topics/availability.rst (+4/-3) doc/rtd/topics/boot.rst (+128/-0) doc/rtd/topics/capabilities.rst (+31/-6) doc/rtd/topics/datasources.rst (+38/-140) doc/rtd/topics/datasources/altcloud.rst (+91/-0) doc/rtd/topics/datasources/azure.rst (+155/-0) doc/rtd/topics/datasources/cloudsigma.rst (+40/-0) doc/rtd/topics/datasources/cloudstack.rst (+34/-0) doc/rtd/topics/datasources/configdrive.rst (+129/-0) doc/rtd/topics/datasources/digitalocean.rst (+28/-0) doc/rtd/topics/datasources/ec2.rst (+61/-0) doc/rtd/topics/datasources/fallback.rst (+16/-0) doc/rtd/topics/datasources/maas.rst (+8/-0) doc/rtd/topics/datasources/nocloud.rst (+75/-0) doc/rtd/topics/datasources/opennebula.rst (+146/-0) doc/rtd/topics/datasources/openstack.rst (+62/-0) doc/rtd/topics/datasources/ovf.rst (+12/-0) doc/rtd/topics/datasources/smartos.rst (+164/-0) doc/rtd/topics/dir_layout.rst (+3/-2) doc/rtd/topics/examples.rst (+22/-21) doc/rtd/topics/format.rst (+22/-20) doc/rtd/topics/hacking.rst (+1/-0) doc/rtd/topics/logging.rst (+20/-19) doc/rtd/topics/merging.rst (+3/-2) doc/rtd/topics/modules.rst (+3/-2) doc/rtd/topics/moreinfo.rst (+4/-3) doc/rtd/topics/tests.rst (+289/-0) doc/rtd/topics/vendordata.rst (+71/-0) packages/debian/copyright (+16/-0) packages/debian/rules.in (+2/-0) packages/redhat/cloud-init.spec.in (+4/-3) packages/suse/cloud-init.spec.in (+1/-1) setup.py (+12/-21) systemd/cloud-init-generator (+37/-2) systemd/cloud-init-local.service (+3/-3) systemd/cloud-init.service (+2/-4) sysvinit/redhat/cloud-config (+3/-16) sysvinit/redhat/cloud-final (+3/-16) sysvinit/redhat/cloud-init (+3/-16) sysvinit/redhat/cloud-init-local (+3/-16) tests/cloud_tests/__init__.py (+31/-0) tests/cloud_tests/__main__.py (+93/-0) tests/cloud_tests/args.py (+221/-0) tests/cloud_tests/collect.py (+161/-0) tests/cloud_tests/config.py (+113/-0) tests/cloud_tests/configs/bugs/README.md (+13/-0) tests/cloud_tests/configs/bugs/lp1511485.yaml (+11/-0) tests/cloud_tests/configs/bugs/lp1611074.yaml (+8/-0) tests/cloud_tests/configs/bugs/lp1628337.yaml (+20/-0) tests/cloud_tests/configs/examples/README.md (+12/-0) tests/cloud_tests/configs/examples/TODO.md (+15/-0) tests/cloud_tests/configs/examples/add_apt_repositories.yaml (+21/-0) tests/cloud_tests/configs/examples/alter_completion_message.yaml (+16/-0) tests/cloud_tests/configs/examples/configure_instance_trusted_ca_certificates.yaml (+41/-0) tests/cloud_tests/configs/examples/configure_instances_ssh_keys.yaml (+63/-0) tests/cloud_tests/configs/examples/including_user_groups.yaml (+53/-0) tests/cloud_tests/configs/examples/install_arbitrary_packages.yaml (+20/-0) tests/cloud_tests/configs/examples/install_run_chef_recipes.yaml (+94/-0) tests/cloud_tests/configs/examples/run_apt_upgrade.yaml (+11/-0) tests/cloud_tests/configs/examples/run_commands.yaml (+16/-0) tests/cloud_tests/configs/examples/run_commands_first_boot.yaml (+16/-0) tests/cloud_tests/configs/examples/setup_run_puppet.yaml (+55/-0) tests/cloud_tests/configs/examples/writing_out_arbitrary_files.yaml (+45/-0) tests/cloud_tests/configs/main/README.md (+11/-0) tests/cloud_tests/configs/main/command_output_simple.yaml (+13/-0) tests/cloud_tests/configs/modules/README.md (+12/-0) tests/cloud_tests/configs/modules/TODO.md (+100/-0) tests/cloud_tests/configs/modules/apt_configure_conf.yaml (+19/-0) tests/cloud_tests/configs/modules/apt_configure_disable_suites.yaml (+17/-0) tests/cloud_tests/configs/modules/apt_configure_primary.yaml (+19/-0) tests/cloud_tests/configs/modules/apt_configure_proxy.yaml (+16/-0) tests/cloud_tests/configs/modules/apt_configure_security.yaml (+15/-0) tests/cloud_tests/configs/modules/apt_configure_sources_key.yaml (+47/-0) tests/cloud_tests/configs/modules/apt_configure_sources_keyserver.yaml (+20/-0) tests/cloud_tests/configs/modules/apt_configure_sources_list.yaml (+19/-0) tests/cloud_tests/configs/modules/apt_configure_sources_ppa.yaml (+20/-0) tests/cloud_tests/configs/modules/apt_pipelining_disable.yaml (+13/-0) tests/cloud_tests/configs/modules/apt_pipelining_os.yaml (+13/-0) tests/cloud_tests/configs/modules/bootcmd.yaml (+13/-0) tests/cloud_tests/configs/modules/byobu.yaml (+18/-0) tests/cloud_tests/configs/modules/ca_certs.yaml (+52/-0) tests/cloud_tests/configs/modules/debug_disable.yaml (+9/-0) tests/cloud_tests/configs/modules/debug_enable.yaml (+9/-0) tests/cloud_tests/configs/modules/final_message.yaml (+13/-0) tests/cloud_tests/configs/modules/keys_to_console.yaml (+13/-0) tests/cloud_tests/configs/modules/landscape.yaml (+26/-0) tests/cloud_tests/configs/modules/locale.yaml (+19/-0) tests/cloud_tests/configs/modules/lxd_bridge.yaml (+30/-0) tests/cloud_tests/configs/modules/lxd_dir.yaml (+17/-0) tests/cloud_tests/configs/modules/ntp.yaml (+20/-0) tests/cloud_tests/configs/modules/ntp_pools.yaml (+23/-0) tests/cloud_tests/configs/modules/ntp_servers.yaml (+20/-0) tests/cloud_tests/configs/modules/package_update_upgrade_install.yaml (+22/-0) tests/cloud_tests/configs/modules/runcmd.yaml (+13/-0) tests/cloud_tests/configs/modules/salt_minion.yaml (+34/-0) tests/cloud_tests/configs/modules/seed_random_command.yaml (+18/-0) tests/cloud_tests/configs/modules/seed_random_data.yaml (+15/-0) tests/cloud_tests/configs/modules/set_hostname.yaml (+18/-0) tests/cloud_tests/configs/modules/set_hostname_fqdn.yaml (+20/-0) tests/cloud_tests/configs/modules/set_password.yaml (+17/-0) tests/cloud_tests/configs/modules/set_password_expire.yaml (+28/-0) tests/cloud_tests/configs/modules/set_password_list.yaml (+40/-0) tests/cloud_tests/configs/modules/set_password_list_string.yaml (+40/-0) tests/cloud_tests/configs/modules/snappy.yaml (+13/-0) tests/cloud_tests/configs/modules/ssh_auth_key_fingerprints_disable.yaml (+13/-0) tests/cloud_tests/configs/modules/ssh_auth_key_fingerprints_enable.yaml (+16/-0) tests/cloud_tests/configs/modules/ssh_import_id.yaml (+14/-0) tests/cloud_tests/configs/modules/ssh_keys_generate.yaml (+42/-0) tests/cloud_tests/configs/modules/ssh_keys_provided.yaml (+102/-0) tests/cloud_tests/configs/modules/timezone.yaml (+14/-0) tests/cloud_tests/configs/modules/user_groups.yaml (+50/-0) tests/cloud_tests/configs/modules/write_files.yaml (+42/-0) tests/cloud_tests/images/__init__.py (+11/-0) tests/cloud_tests/images/base.py (+65/-0) tests/cloud_tests/images/lxd.py (+92/-0) tests/cloud_tests/instances/__init__.py (+10/-0) tests/cloud_tests/instances/base.py (+120/-0) tests/cloud_tests/instances/lxd.py (+121/-0) tests/cloud_tests/manage.py (+75/-0) tests/cloud_tests/platforms.yaml (+17/-0) tests/cloud_tests/platforms/__init__.py (+19/-0) tests/cloud_tests/platforms/base.py (+53/-0) tests/cloud_tests/platforms/lxd.py (+97/-0) tests/cloud_tests/releases.yaml (+79/-0) tests/cloud_tests/setup_image.py (+195/-0) tests/cloud_tests/snapshots/__init__.py (+10/-0) tests/cloud_tests/snapshots/base.py (+44/-0) tests/cloud_tests/snapshots/lxd.py (+50/-0) tests/cloud_tests/stage.py (+113/-0) tests/cloud_tests/testcases.yaml (+27/-0) tests/cloud_tests/testcases/__init__.py (+47/-0) tests/cloud_tests/testcases/base.py (+137/-0) tests/cloud_tests/testcases/bugs/__init__.py (+8/-0) tests/cloud_tests/testcases/bugs/lp1511485.py (+15/-0) tests/cloud_tests/testcases/bugs/lp1628337.py (+23/-0) tests/cloud_tests/testcases/examples/__init__.py (+8/-0) tests/cloud_tests/testcases/examples/add_apt_repositories.py (+20/-0) tests/cloud_tests/testcases/examples/alter_completion_message.py (+49/-0) tests/cloud_tests/testcases/examples/configure_instance_trusted_ca_certificates.py (+27/-0) tests/cloud_tests/testcases/examples/configure_instances_ssh_keys.py (+31/-0) tests/cloud_tests/testcases/examples/including_user_groups.py (+43/-0) tests/cloud_tests/testcases/examples/install_arbitrary_packages.py (+20/-0) tests/cloud_tests/testcases/examples/run_apt_upgrade.py (+19/-0) tests/cloud_tests/testcases/examples/run_commands.py (+15/-0) tests/cloud_tests/testcases/examples/run_commands_first_boot.py (+15/-0) tests/cloud_tests/testcases/examples/writing_out_arbitrary_files.py (+30/-0) tests/cloud_tests/testcases/main/__init__.py (+8/-0) tests/cloud_tests/testcases/main/command_output_simple.py (+21/-0) tests/cloud_tests/testcases/modules/__init__.py (+8/-0) tests/cloud_tests/testcases/modules/apt_configure_conf.py (+20/-0) tests/cloud_tests/testcases/modules/apt_configure_disable_suites.py (+15/-0) tests/cloud_tests/testcases/modules/apt_configure_primary.py (+20/-0) tests/cloud_tests/testcases/modules/apt_configure_proxy.py (+22/-0) tests/cloud_tests/testcases/modules/apt_configure_security.py (+15/-0) tests/cloud_tests/testcases/modules/apt_configure_sources_key.py (+23/-0) tests/cloud_tests/testcases/modules/apt_configure_sources_keyserver.py (+23/-0) tests/cloud_tests/testcases/modules/apt_configure_sources_list.py (+26/-0) tests/cloud_tests/testcases/modules/apt_configure_sources_ppa.py (+23/-0) tests/cloud_tests/testcases/modules/apt_pipelining_disable.py (+15/-0) tests/cloud_tests/testcases/modules/apt_pipelining_os.py (+15/-0) tests/cloud_tests/testcases/modules/bootcmd.py (+15/-0) tests/cloud_tests/testcases/modules/byobu.py (+25/-0) tests/cloud_tests/testcases/modules/ca_certs.py (+20/-0) tests/cloud_tests/testcases/modules/debug_disable.py (+16/-0) tests/cloud_tests/testcases/modules/debug_enable.py (+15/-0) tests/cloud_tests/testcases/modules/final_message.py (+49/-0) tests/cloud_tests/testcases/modules/keys_to_console.py (+22/-0) tests/cloud_tests/testcases/modules/locale.py (+27/-0) tests/cloud_tests/testcases/modules/lxd_bridge.py (+26/-0) tests/cloud_tests/testcases/modules/lxd_dir.py (+20/-0) tests/cloud_tests/testcases/modules/ntp.py (+28/-0) tests/cloud_tests/testcases/modules/ntp_pools.py (+28/-0) tests/cloud_tests/testcases/modules/ntp_servers.py (+25/-0) tests/cloud_tests/testcases/modules/package_update_upgrade_install.py (+38/-0) tests/cloud_tests/testcases/modules/runcmd.py (+15/-0) tests/cloud_tests/testcases/modules/salt_minion.py (+29/-0) tests/cloud_tests/testcases/modules/seed_random_data.py (+15/-0) tests/cloud_tests/testcases/modules/set_hostname.py (+15/-0) tests/cloud_tests/testcases/modules/set_hostname_fqdn.py (+26/-0) tests/cloud_tests/testcases/modules/set_password.py (+22/-0) tests/cloud_tests/testcases/modules/set_password_expire.py (+23/-0) tests/cloud_tests/testcases/modules/set_password_list.py (+11/-0) tests/cloud_tests/testcases/modules/set_password_list_string.py (+11/-0) tests/cloud_tests/testcases/modules/snappy.py (+18/-0) tests/cloud_tests/testcases/modules/ssh_auth_key_fingerprints_disable.py (+24/-0) tests/cloud_tests/testcases/modules/ssh_auth_key_fingerprints_enable.py (+18/-0) tests/cloud_tests/testcases/modules/ssh_import_id.py (+26/-0) tests/cloud_tests/testcases/modules/ssh_keys_generate.py (+57/-0) tests/cloud_tests/testcases/modules/ssh_keys_provided.py (+69/-0) tests/cloud_tests/testcases/modules/timezone.py (+15/-0) tests/cloud_tests/testcases/modules/user_groups.py (+43/-0) tests/cloud_tests/testcases/modules/write_files.py (+30/-0) tests/cloud_tests/util.py (+163/-0) tests/cloud_tests/verify.py (+93/-0) tests/data/merge_sources/expected8.yaml (+1/-1) tests/data/merge_sources/source8-1.yaml (+1/-1) tests/unittests/__init__.py (+2/-0) tests/unittests/helpers.py (+63/-48) tests/unittests/test__init__.py (+61/-33) tests/unittests/test_atomic_helper.py (+6/-2) tests/unittests/test_builtin_handlers.py (+4/-0) tests/unittests/test_cli.py (+5/-0) tests/unittests/test_cs_util.py (+4/-0) tests/unittests/test_data.py (+76/-0) tests/unittests/test_datasource/test_aliyun.py (+4/-0) tests/unittests/test_datasource/test_altcloud.py (+6/-18) tests/unittests/test_datasource/test_azure.py (+32/-22) tests/unittests/test_datasource/test_azure_helper.py (+4/-0) tests/unittests/test_datasource/test_cloudsigma.py (+20/-2) tests/unittests/test_datasource/test_cloudstack.py (+4/-0) tests/unittests/test_datasource/test_common.py (+75/-0) tests/unittests/test_datasource/test_configdrive.py (+6/-3) tests/unittests/test_datasource/test_digitalocean.py (+5/-14) tests/unittests/test_datasource/test_gce.py (+8/-15) tests/unittests/test_datasource/test_maas.py (+2/-0) tests/unittests/test_datasource/test_nocloud.py (+2/-0) tests/unittests/test_datasource/test_opennebula.py (+2/-0) tests/unittests/test_datasource/test_openstack.py (+10/-23) tests/unittests/test_datasource/test_ovf.py (+5/-15) tests/unittests/test_datasource/test_smartos.py (+12/-21) tests/unittests/test_distros/test_create_users.py (+151/-0) tests/unittests/test_distros/test_generic.py (+2/-0) tests/unittests/test_distros/test_hostname.py (+4/-0) tests/unittests/test_distros/test_hosts.py (+4/-0) tests/unittests/test_distros/test_netconfig.py (+354/-4) tests/unittests/test_distros/test_resolv.py (+5/-1) tests/unittests/test_distros/test_sysconfig.py (+4/-0) tests/unittests/test_distros/test_user_data_normalize.py (+4/-0) tests/unittests/test_ec2_util.py (+51/-2) tests/unittests/test_filters/test_launch_index.py (+4/-0) tests/unittests/test_handler/test_handler_apt_conf_v1.py (+2/-0) tests/unittests/test_handler/test_handler_apt_configure_sources_list_v1.py (+2/-0) tests/unittests/test_handler/test_handler_apt_configure_sources_list_v3.py (+2/-0) tests/unittests/test_handler/test_handler_apt_source_v1.py (+2/-0) tests/unittests/test_handler/test_handler_apt_source_v3.py (+2/-0) tests/unittests/test_handler/test_handler_ca_certs.py (+4/-0) tests/unittests/test_handler/test_handler_chef.py (+4/-0) tests/unittests/test_handler/test_handler_debug.py (+4/-14) tests/unittests/test_handler/test_handler_disk_setup.py (+120/-0) tests/unittests/test_handler/test_handler_growpart.py (+2/-0) tests/unittests/test_handler/test_handler_locale.py (+5/-15) tests/unittests/test_handler/test_handler_lxd.py (+4/-0) tests/unittests/test_handler/test_handler_mcollective.py (+4/-0) tests/unittests/test_handler/test_handler_mounts.py (+4/-0) tests/unittests/test_handler/test_handler_ntp.py (+4/-0) tests/unittests/test_handler/test_handler_power_state.py (+4/-0) tests/unittests/test_handler/test_handler_rsyslog.py (+4/-0) tests/unittests/test_handler/test_handler_seed_random.py (+5/-11) tests/unittests/test_handler/test_handler_set_hostname.py (+4/-0) tests/unittests/test_handler/test_handler_snappy.py (+4/-0) tests/unittests/test_handler/test_handler_spacewalk.py (+4/-0) tests/unittests/test_handler/test_handler_timezone.py (+5/-15) tests/unittests/test_handler/test_handler_write_files.py (+2/-0) tests/unittests/test_handler/test_handler_yum_add_repo.py (+4/-0) tests/unittests/test_helpers.py (+4/-0) tests/unittests/test_merging.py (+4/-0) tests/unittests/test_net.py (+740/-66) tests/unittests/test_pathprefix2dict.py (+2/-0) tests/unittests/test_registry.py (+4/-0) tests/unittests/test_reporting.py (+3/-2) tests/unittests/test_rh_subscription.py (+7/-13) tests/unittests/test_runs/test_merge_run.py (+4/-0) tests/unittests/test_runs/test_simple_run.py (+4/-0) tests/unittests/test_sshutil.py (+25/-1) tests/unittests/test_templating.py (+5/-15) tests/unittests/test_util.py (+71/-0) tests/unittests/test_version.py (+14/-0) tests/unittests/test_vmware_config_file.py (+6/-16) tools/Z99-cloud-locale-test.sh (+77/-75) tools/Z99-cloudinit-warnings.sh (+30/-0) tools/cloud-init-per (+1/-0) tools/ds-identify (+1266/-0) tools/hacking.py (+3/-2) tools/hook-dhclient (+3/-0) tools/hook-network-manager (+2/-0) tools/hook-rhel.sh (+2/-0) tools/make-mime.py (+3/-1) tools/make-tarball (+1/-1) tools/mock-meta.py (+27/-12) tools/motd-hook (+4/-16) tools/net-convert.py (+84/-0) tools/read-dependencies (+2/-0) tools/read-version (+3/-1) tools/uncloud-init (+2/-1) tools/validate-yaml.py (+5/-3) tools/write-ssh-key-fingerprints (+1/-0) tox.ini (+31/-7) Conflict in cloudinit/config/cc_set_passwords.py |
||||||||||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tore | Approve | ||
Review via email:
|
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message

Scott Moser (smoser) wrote : | # |
marked as merged. i'll get this into trunk under https:/
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/.gitignore b/.gitignore | |||
2 | index 865cac1..3946ec7 100644 | |||
3 | --- a/.gitignore | |||
4 | +++ b/.gitignore | |||
5 | @@ -5,3 +5,4 @@ dist | |||
6 | 5 | __pycache__ | 5 | __pycache__ |
7 | 6 | .tox | 6 | .tox |
8 | 7 | .coverage | 7 | .coverage |
9 | 8 | doc/rtd_html | ||
10 | diff --git a/.pylintrc b/.pylintrc | |||
11 | 8 | new file mode 100644 | 9 | new file mode 100644 |
12 | index 0000000..b8cda03 | |||
13 | --- /dev/null | |||
14 | +++ b/.pylintrc | |||
15 | @@ -0,0 +1,39 @@ | |||
16 | 1 | [MASTER] | ||
17 | 2 | |||
18 | 3 | # --go-faster, use multiple processes to speed up Pylint | ||
19 | 4 | jobs=4 | ||
20 | 5 | |||
21 | 6 | |||
22 | 7 | [MESSAGES CONTROL] | ||
23 | 8 | |||
24 | 9 | # Errors only | ||
25 | 10 | disable=C, F, I, R, W | ||
26 | 11 | |||
27 | 12 | |||
28 | 13 | [REPORTS] | ||
29 | 14 | |||
30 | 15 | # Set the output format. Available formats are text, parseable, colorized, msvs | ||
31 | 16 | output-format=colorized | ||
32 | 17 | |||
33 | 18 | # Just the errors please, no full report | ||
34 | 19 | reports=no | ||
35 | 20 | |||
36 | 21 | |||
37 | 22 | [TYPECHECK] | ||
38 | 23 | |||
39 | 24 | # List of module names for which member attributes should not be checked | ||
40 | 25 | # (useful for modules/projects where namespaces are manipulated during runtime | ||
41 | 26 | # and thus existing member attributes cannot be deduced by static analysis. It | ||
42 | 27 | # supports qualified module names, as well as Unix pattern matching. | ||
43 | 28 | ignored-modules=six.moves,pkg_resources | ||
44 | 29 | |||
45 | 30 | # List of class names for which member attributes should not be checked (useful | ||
46 | 31 | # for classes with dynamically set attributes). This supports the use of | ||
47 | 32 | # qualified names. | ||
48 | 33 | ignored-classes=optparse.Values,thread._local | ||
49 | 34 | |||
50 | 35 | # List of members which are set dynamically and missed by pylint inference | ||
51 | 36 | # system, and so shouldn't trigger E1101 when accessed. Python regular | ||
52 | 37 | # expressions are accepted. | ||
53 | 38 | generated-members=types,http.client,command_handlers | ||
54 | 39 | |||
55 | diff --git a/ChangeLog b/ChangeLog | |||
56 | index 71df7ad..80405bc 100644 | |||
57 | --- a/ChangeLog | |||
58 | +++ b/ChangeLog | |||
59 | @@ -1,3 +1,100 @@ | |||
60 | 1 | 0.7.9: | ||
61 | 2 | - doc: adjust headers in tests documentation for consistency. | ||
62 | 3 | - pep8: fix issue found in zesty build with pycodestyle. | ||
63 | 4 | - integration test: initial commit of integration test framework | ||
64 | 5 | [Wesley Wiedenmeier] | ||
65 | 6 | - LICENSE: Allow dual licensing GPL-3 or Apache 2.0 [Jon Grimm] | ||
66 | 7 | - Fix config order of precedence, putting kernel command line over system. | ||
67 | 8 | [Wesley Wiedenmeier] (LP: #1582323) | ||
68 | 9 | - pep8: whitespace fix | ||
69 | 10 | - Update the list of valid ssh keys. [Michael Felt] | ||
70 | 11 | - network: add ENI unit test for statically rendered routes. | ||
71 | 12 | - set_hostname: avoid erroneously appending domain to fqdn | ||
72 | 13 | [Lars Kellogg-Stedman] (LP: #1647910) | ||
73 | 14 | - doc: change 'nobootwait' to 'nofail' in docs [Anhad Jai Singh] | ||
74 | 15 | - Replace an expired bit.ly link in code comment. | ||
75 | 16 | - user-groups: fix bug when groups was provided as string and had spaces | ||
76 | 17 | (LP: #1354694) | ||
77 | 18 | - mounts: use mount -a again to accomplish mounts (LP: #1647708) | ||
78 | 19 | - CloudSigma: Fix bug where datasource was not loaded in local search. | ||
79 | 20 | (LP: #1648380) | ||
80 | 21 | - when adding a user, strip whitespace from group list [Lars Kellogg-Stedman] | ||
81 | 22 | (LP: #1354694) | ||
82 | 23 | - fix decoding of utf-8 chars in yaml test | ||
83 | 24 | - Replace usage of sys_netdev_info with read_sys_net (LP: #1625766) | ||
84 | 25 | - fix problems found in python2.6 test. | ||
85 | 26 | - OpenStack: extend physical types to include hyperv, hw_veb, vhost_user. | ||
86 | 27 | (LP: #1642679) | ||
87 | 28 | - tests: fix assumptions that expected no eth0 in system. (LP: #1644043) | ||
88 | 29 | - net/cmdline: Consider ip= or ip6= on command line not only ip= | ||
89 | 30 | (LP: #1639930) | ||
90 | 31 | - Just use file logging by default (LP: #1643990) | ||
91 | 32 | - Improve formatting for ProcessExecutionError [Wesley Wiedenmeier] | ||
92 | 33 | - flake8: fix trailing white space | ||
93 | 34 | - Doc: various documentation fixes [Sean Bright] | ||
94 | 35 | - cloudinit/config/cc_rh_subscription.py: Remove repos before adding | ||
95 | 36 | [Brent Baude] | ||
96 | 37 | - packages/redhat: fix rpm spec file. | ||
97 | 38 | - main: set TZ in environment if not already set. [Ryan Harper] | ||
98 | 39 | - Azure: No longer rely on walinux agent. (LP: #1538522) | ||
99 | 40 | - disk_setup: Use sectors as unit when formatting MBR disks with sfdisk. | ||
100 | 41 | [Daniel Watkins] (LP: #1460715) | ||
101 | 42 | - Add activate_datasource, for datasource specific code paths. (LP: #1611074) | ||
102 | 43 | - systemd: cloud-init-local use RequiresMountsFor=/var/lib/cloud | ||
103 | 44 | (LP: #1642062) | ||
104 | 45 | - systemd: cloud-init remove After=systemd-networkd-wait-online | ||
105 | 46 | - systemd: cloud-init-local change Before basic to sysinit | ||
106 | 47 | - pep8: fix style errors reported by pycodestyle 2.1.0 | ||
107 | 48 | - systemd: drop both Wants and After local-fs.target | ||
108 | 49 | - systemd: networking service adjustments. (LP: #1636912) | ||
109 | 50 | - systemd: replace Before=basic.target, dbus.target with sysinit.target | ||
110 | 51 | (LP: #1629797) | ||
111 | 52 | - doc: Add documentation on stages of boot. | ||
112 | 53 | - doc: make the RST files consistently formated and other improvements. | ||
113 | 54 | - Ec2: fix syntax and tox in previous commit. | ||
114 | 55 | - Ec2: protect against non-dictionary in block-device-mapping. | ||
115 | 56 | - doc: fixed example to not overwrite /etc/hosts [Chris Glass] | ||
116 | 57 | - Doc: fix spelling / typos in ca_certs and scripts_vendor. | ||
117 | 58 | - pyflakes: fix issue with pyflakes 1.3 found in ubuntu zesty-proposed. | ||
118 | 59 | - net/cmdline: Further adjustments to ipv6 support [LaMont Jones] | ||
119 | 60 | (LP: #1621615) | ||
120 | 61 | - Add coverage dependency to bddeb to fix package build. | ||
121 | 62 | - doc: improve HACKING.rst file | ||
122 | 63 | - dmidecode: Allow dmidecode to be used on aarch64 [Robert Schweikert] | ||
123 | 64 | - AliYun: Add new datasource for Ali-Cloud ECS [kaihuan.pkh] | ||
124 | 65 | - Add coverage collection to tox unit tests. [Joshua Powers] | ||
125 | 66 | - cc_users_groups: fix remaing call to ds.normalize_user_groups [Ryan Harper] | ||
126 | 67 | - disk-config: udev settle after partitioning in gpt format. (LP: #1626243) | ||
127 | 68 | - unittests: do not read system /etc/cloud/cloud.cfg.d (LP: #1635350) | ||
128 | 69 | - Add documentation for logging features. [Wesley Wiedenmeier] | ||
129 | 70 | - Add support for snap create-user on Ubuntu Core images. [Ryan Harper] | ||
130 | 71 | - Fix sshd restarts for rhel distros. [Jim Gorz] | ||
131 | 72 | - OpenNebula: replace 'ip' parsing with cloudinit.net usage. | ||
132 | 73 | - Fix python2.6 things found running in centos 6. | ||
133 | 74 | - Move user/group functions to new ug_util file | ||
134 | 75 | - DigitalOcean: enable usage of data source by default. | ||
135 | 76 | - update Gentoo initscripts to run in the correct order [Matthew Thode] | ||
136 | 77 | - MAAS: improve the main of datasource to look at kernel cmdline config. | ||
137 | 78 | - tests: silence the Cheetah UserWarning about NameMapper C version. | ||
138 | 79 | - systemd: Run cloud-init.service Before dbus.socket not dbus.target | ||
139 | 80 | [Daniel Watkins] (LP: #1629797) | ||
140 | 81 | - systemd: run cloud-init.service Before dbus.service (LP: #1629797) | ||
141 | 82 | - unittests: fix use of mock 2.0 'assert_called' when running make check | ||
142 | 83 | [Ryan Harper] | ||
143 | 84 | - Improve module documentation and doc cleanup. [Wesley Wiedenmeier] | ||
144 | 85 | - lxd: Update network config for LXD 2.3 [Stéphane Graber] | ||
145 | 86 | - DigitalOcean: use meta-data for network configruation [Ben Howard] | ||
146 | 87 | - ntp: move to run after apt configuration (LP: #1628337) | ||
147 | 88 | - Decode unicode types in decode_binary [Robert Schweikert] | ||
148 | 89 | - systemd: Ensure that cloud-init-local happens before NetworkManager | ||
149 | 90 | - Allow ephemeral drive to be unpartitioned [Paul Meyer] | ||
150 | 91 | - subp: add 'update_env' argument | ||
151 | 92 | - net: support reading ipv6 dhcp config from initramfs [LaMont Jones] | ||
152 | 93 | (LP: #1621615, #1621507) | ||
153 | 94 | - Adjust mounts and disk configuration for systemd. (LP: #1611074) | ||
154 | 95 | - dmidecode: run dmidecode only on i?86 or x86_64 arch. [Robert Schweikert] | ||
155 | 96 | - systemd: put cloud-init.target After multi-user.target (LP: #1623868) | ||
156 | 97 | |||
157 | 1 | 0.7.8: | 98 | 0.7.8: |
158 | 2 | - SmartOS: more improvements for network configuration | 99 | - SmartOS: more improvements for network configuration |
159 | 3 | - add ntp config module [Ryan Harper] | 100 | - add ntp config module [Ryan Harper] |
160 | diff --git a/HACKING.rst b/HACKING.rst | |||
161 | index 4072d0f..caee7ac 100644 | |||
162 | --- a/HACKING.rst | |||
163 | +++ b/HACKING.rst | |||
164 | @@ -1,13 +1,13 @@ | |||
166 | 1 | ===================== | 1 | ********************* |
167 | 2 | Hacking on cloud-init | 2 | Hacking on cloud-init |
169 | 3 | ===================== | 3 | ********************* |
170 | 4 | 4 | ||
171 | 5 | This document describes how to contribute changes to cloud-init. | 5 | This document describes how to contribute changes to cloud-init. |
172 | 6 | It assumes you have a `Launchpad`_ account, and refers to your launchpad user | 6 | It assumes you have a `Launchpad`_ account, and refers to your launchpad user |
173 | 7 | as ``LP_USER`` throughout. | 7 | as ``LP_USER`` throughout. |
174 | 8 | 8 | ||
175 | 9 | Do these things once | 9 | Do these things once |
177 | 10 | -------------------- | 10 | ==================== |
178 | 11 | 11 | ||
179 | 12 | * To contribute, you must sign the Canonical `contributor license agreement`_ | 12 | * To contribute, you must sign the Canonical `contributor license agreement`_ |
180 | 13 | 13 | ||
181 | @@ -21,11 +21,12 @@ Do these things once | |||
182 | 21 | There is more information on Launchpad as a git hosting site in | 21 | There is more information on Launchpad as a git hosting site in |
183 | 22 | `Launchpad git documentation`_. | 22 | `Launchpad git documentation`_. |
184 | 23 | 23 | ||
186 | 24 | * Create a new remote pointing to your personal Launchpad repository | 24 | * Create a new remote pointing to your personal Launchpad repository. |
187 | 25 | This is equivalent to 'fork' on github. | ||
188 | 25 | 26 | ||
190 | 26 | This is equivalent to 'fork' on github:: | 27 | .. code:: sh |
191 | 27 | 28 | ||
193 | 28 | git remote add LP_USER git+ssh://LP_USER@git.launchpad.net/~LP_USER/cloud-init | 29 | git remote add LP_USER ssh://LP_USER@git.launchpad.net/~LP_USER/cloud-init |
194 | 29 | git push LP_USER master | 30 | git push LP_USER master |
195 | 30 | 31 | ||
196 | 31 | .. _repository: https://git.launchpad.net/cloud-init | 32 | .. _repository: https://git.launchpad.net/cloud-init |
197 | @@ -34,7 +35,7 @@ Do these things once | |||
198 | 34 | .. _Launchpad git documentation: https://help.launchpad.net/Code/Git | 35 | .. _Launchpad git documentation: https://help.launchpad.net/Code/Git |
199 | 35 | 36 | ||
200 | 36 | Do these things for each feature or bug | 37 | Do these things for each feature or bug |
202 | 37 | --------------------------------------- | 38 | ======================================= |
203 | 38 | 39 | ||
204 | 39 | * Create a new topic branch for your work:: | 40 | * Create a new topic branch for your work:: |
205 | 40 | 41 | ||
206 | diff --git a/LICENSE b/LICENSE | |||
207 | index 94a9ed0..8a23b4d 100644 | |||
208 | --- a/LICENSE | |||
209 | +++ b/LICENSE | |||
210 | @@ -1,674 +1,22 @@ | |||
885 | 1 | GNU GENERAL PUBLIC LICENSE | 1 | Copyright 2015 Canonical Ltd. |
886 | 2 | Version 3, 29 June 2007 | 2 | |
887 | 3 | 3 | This program is free software: you can redistribute it and/or modify it under | |
888 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> | 4 | the terms of the GNU General Public License version 3, as published by the |
889 | 5 | Everyone is permitted to copy and distribute verbatim copies | 5 | Free Software Foundation. |
890 | 6 | of this license document, but changing it is not allowed. | 6 | |
891 | 7 | 7 | This program is distributed in the hope that it will be useful, but WITHOUT | |
892 | 8 | Preamble | 8 | ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, |
893 | 9 | 9 | SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
894 | 10 | The GNU General Public License is a free, copyleft license for | 10 | General Public License for more details. |
895 | 11 | software and other kinds of works. | 11 | |
896 | 12 | 12 | You should have received a copy of the GNU General Public License along with | |
897 | 13 | The licenses for most software and other practical works are designed | 13 | this program. If not, see <http://www.gnu.org/licenses/> |
898 | 14 | to take away your freedom to share and change the works. By contrast, | 14 | |
899 | 15 | the GNU General Public License is intended to guarantee your freedom to | 15 | Alternatively, this program may be used under the terms of the Apache License, |
900 | 16 | share and change all versions of a program--to make sure it remains free | 16 | Version 2.0, in which case the provisions of that license are applicable |
901 | 17 | software for all its users. We, the Free Software Foundation, use the | 17 | instead of those above. If you wish to allow use of your version of this |
902 | 18 | GNU General Public License for most of our software; it applies also to | 18 | program under the terms of the Apache License, Version 2.0 only, indicate |
903 | 19 | any other work released this way by its authors. You can apply it to | 19 | your decision by deleting the provisions above and replace them with the notice |
904 | 20 | your programs, too. | 20 | and other provisions required by the Apache License, Version 2.0. If you do not |
905 | 21 | 21 | delete the provisions above, a recipient may use your version of this file | |
906 | 22 | When we speak of free software, we are referring to freedom, not | 22 | under the terms of either the GPLv3 or the Apache License, Version 2.0. |
233 | 23 | price. Our General Public Licenses are designed to make sure that you | ||
234 | 24 | have the freedom to distribute copies of free software (and charge for | ||
235 | 25 | them if you wish), that you receive source code or can get it if you | ||
236 | 26 | want it, that you can change the software or use pieces of it in new | ||
237 | 27 | free programs, and that you know you can do these things. | ||
238 | 28 | |||
239 | 29 | To protect your rights, we need to prevent others from denying you | ||
240 | 30 | these rights or asking you to surrender the rights. Therefore, you have | ||
241 | 31 | certain responsibilities if you distribute copies of the software, or if | ||
242 | 32 | you modify it: responsibilities to respect the freedom of others. | ||
243 | 33 | |||
244 | 34 | For example, if you distribute copies of such a program, whether | ||
245 | 35 | gratis or for a fee, you must pass on to the recipients the same | ||
246 | 36 | freedoms that you received. You must make sure that they, too, receive | ||
247 | 37 | or can get the source code. And you must show them these terms so they | ||
248 | 38 | know their rights. | ||
249 | 39 | |||
250 | 40 | Developers that use the GNU GPL protect your rights with two steps: | ||
251 | 41 | (1) assert copyright on the software, and (2) offer you this License | ||
252 | 42 | giving you legal permission to copy, distribute and/or modify it. | ||
253 | 43 | |||
254 | 44 | For the developers' and authors' protection, the GPL clearly explains | ||
255 | 45 | that there is no warranty for this free software. For both users' and | ||
256 | 46 | authors' sake, the GPL requires that modified versions be marked as | ||
257 | 47 | changed, so that their problems will not be attributed erroneously to | ||
258 | 48 | authors of previous versions. | ||
259 | 49 | |||
260 | 50 | Some devices are designed to deny users access to install or run | ||
261 | 51 | modified versions of the software inside them, although the manufacturer | ||
262 | 52 | can do so. This is fundamentally incompatible with the aim of | ||
263 | 53 | protecting users' freedom to change the software. The systematic | ||
264 | 54 | pattern of such abuse occurs in the area of products for individuals to | ||
265 | 55 | use, which is precisely where it is most unacceptable. Therefore, we | ||
266 | 56 | have designed this version of the GPL to prohibit the practice for those | ||
267 | 57 | products. If such problems arise substantially in other domains, we | ||
268 | 58 | stand ready to extend this provision to those domains in future versions | ||
269 | 59 | of the GPL, as needed to protect the freedom of users. | ||
270 | 60 | |||
271 | 61 | Finally, every program is threatened constantly by software patents. | ||
272 | 62 | States should not allow patents to restrict development and use of | ||
273 | 63 | software on general-purpose computers, but in those that do, we wish to | ||
274 | 64 | avoid the special danger that patents applied to a free program could | ||
275 | 65 | make it effectively proprietary. To prevent this, the GPL assures that | ||
276 | 66 | patents cannot be used to render the program non-free. | ||
277 | 67 | |||
278 | 68 | The precise terms and conditions for copying, distribution and | ||
279 | 69 | modification follow. | ||
280 | 70 | |||
281 | 71 | TERMS AND CONDITIONS | ||
282 | 72 | |||
283 | 73 | 0. Definitions. | ||
284 | 74 | |||
285 | 75 | "This License" refers to version 3 of the GNU General Public License. | ||
286 | 76 | |||
287 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of | ||
288 | 78 | works, such as semiconductor masks. | ||
289 | 79 | |||
290 | 80 | "The Program" refers to any copyrightable work licensed under this | ||
291 | 81 | License. Each licensee is addressed as "you". "Licensees" and | ||
292 | 82 | "recipients" may be individuals or organizations. | ||
293 | 83 | |||
294 | 84 | To "modify" a work means to copy from or adapt all or part of the work | ||
295 | 85 | in a fashion requiring copyright permission, other than the making of an | ||
296 | 86 | exact copy. The resulting work is called a "modified version" of the | ||
297 | 87 | earlier work or a work "based on" the earlier work. | ||
298 | 88 | |||
299 | 89 | A "covered work" means either the unmodified Program or a work based | ||
300 | 90 | on the Program. | ||
301 | 91 | |||
302 | 92 | To "propagate" a work means to do anything with it that, without | ||
303 | 93 | permission, would make you directly or secondarily liable for | ||
304 | 94 | infringement under applicable copyright law, except executing it on a | ||
305 | 95 | computer or modifying a private copy. Propagation includes copying, | ||
306 | 96 | distribution (with or without modification), making available to the | ||
307 | 97 | public, and in some countries other activities as well. | ||
308 | 98 | |||
309 | 99 | To "convey" a work means any kind of propagation that enables other | ||
310 | 100 | parties to make or receive copies. Mere interaction with a user through | ||
311 | 101 | a computer network, with no transfer of a copy, is not conveying. | ||
312 | 102 | |||
313 | 103 | An interactive user interface displays "Appropriate Legal Notices" | ||
314 | 104 | to the extent that it includes a convenient and prominently visible | ||
315 | 105 | feature that (1) displays an appropriate copyright notice, and (2) | ||
316 | 106 | tells the user that there is no warranty for the work (except to the | ||
317 | 107 | extent that warranties are provided), that licensees may convey the | ||
318 | 108 | work under this License, and how to view a copy of this License. If | ||
319 | 109 | the interface presents a list of user commands or options, such as a | ||
320 | 110 | menu, a prominent item in the list meets this criterion. | ||
321 | 111 | |||
322 | 112 | 1. Source Code. | ||
323 | 113 | |||
324 | 114 | The "source code" for a work means the preferred form of the work | ||
325 | 115 | for making modifications to it. "Object code" means any non-source | ||
326 | 116 | form of a work. | ||
327 | 117 | |||
328 | 118 | A "Standard Interface" means an interface that either is an official | ||
329 | 119 | standard defined by a recognized standards body, or, in the case of | ||
330 | 120 | interfaces specified for a particular programming language, one that | ||
331 | 121 | is widely used among developers working in that language. | ||
332 | 122 | |||
333 | 123 | The "System Libraries" of an executable work include anything, other | ||
334 | 124 | than the work as a whole, that (a) is included in the normal form of | ||
335 | 125 | packaging a Major Component, but which is not part of that Major | ||
336 | 126 | Component, and (b) serves only to enable use of the work with that | ||
337 | 127 | Major Component, or to implement a Standard Interface for which an | ||
338 | 128 | implementation is available to the public in source code form. A | ||
339 | 129 | "Major Component", in this context, means a major essential component | ||
340 | 130 | (kernel, window system, and so on) of the specific operating system | ||
341 | 131 | (if any) on which the executable work runs, or a compiler used to | ||
342 | 132 | produce the work, or an object code interpreter used to run it. | ||
343 | 133 | |||
344 | 134 | The "Corresponding Source" for a work in object code form means all | ||
345 | 135 | the source code needed to generate, install, and (for an executable | ||
346 | 136 | work) run the object code and to modify the work, including scripts to | ||
347 | 137 | control those activities. However, it does not include the work's | ||
348 | 138 | System Libraries, or general-purpose tools or generally available free | ||
349 | 139 | programs which are used unmodified in performing those activities but | ||
350 | 140 | which are not part of the work. For example, Corresponding Source | ||
351 | 141 | includes interface definition files associated with source files for | ||
352 | 142 | the work, and the source code for shared libraries and dynamically | ||
353 | 143 | linked subprograms that the work is specifically designed to require, | ||
354 | 144 | such as by intimate data communication or control flow between those | ||
355 | 145 | subprograms and other parts of the work. | ||
356 | 146 | |||
357 | 147 | The Corresponding Source need not include anything that users | ||
358 | 148 | can regenerate automatically from other parts of the Corresponding | ||
359 | 149 | Source. | ||
360 | 150 | |||
361 | 151 | The Corresponding Source for a work in source code form is that | ||
362 | 152 | same work. | ||
363 | 153 | |||
364 | 154 | 2. Basic Permissions. | ||
365 | 155 | |||
366 | 156 | All rights granted under this License are granted for the term of | ||
367 | 157 | copyright on the Program, and are irrevocable provided the stated | ||
368 | 158 | conditions are met. This License explicitly affirms your unlimited | ||
369 | 159 | permission to run the unmodified Program. The output from running a | ||
370 | 160 | covered work is covered by this License only if the output, given its | ||
371 | 161 | content, constitutes a covered work. This License acknowledges your | ||
372 | 162 | rights of fair use or other equivalent, as provided by copyright law. | ||
373 | 163 | |||
374 | 164 | You may make, run and propagate covered works that you do not | ||
375 | 165 | convey, without conditions so long as your license otherwise remains | ||
376 | 166 | in force. You may convey covered works to others for the sole purpose | ||
377 | 167 | of having them make modifications exclusively for you, or provide you | ||
378 | 168 | with facilities for running those works, provided that you comply with | ||
379 | 169 | the terms of this License in conveying all material for which you do | ||
380 | 170 | not control copyright. Those thus making or running the covered works | ||
381 | 171 | for you must do so exclusively on your behalf, under your direction | ||
382 | 172 | and control, on terms that prohibit them from making any copies of | ||
383 | 173 | your copyrighted material outside their relationship with you. | ||
384 | 174 | |||
385 | 175 | Conveying under any other circumstances is permitted solely under | ||
386 | 176 | the conditions stated below. Sublicensing is not allowed; section 10 | ||
387 | 177 | makes it unnecessary. | ||
388 | 178 | |||
389 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. | ||
390 | 180 | |||
391 | 181 | No covered work shall be deemed part of an effective technological | ||
392 | 182 | measure under any applicable law fulfilling obligations under article | ||
393 | 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or | ||
394 | 184 | similar laws prohibiting or restricting circumvention of such | ||
395 | 185 | measures. | ||
396 | 186 | |||
397 | 187 | When you convey a covered work, you waive any legal power to forbid | ||
398 | 188 | circumvention of technological measures to the extent such circumvention | ||
399 | 189 | is effected by exercising rights under this License with respect to | ||
400 | 190 | the covered work, and you disclaim any intention to limit operation or | ||
401 | 191 | modification of the work as a means of enforcing, against the work's | ||
402 | 192 | users, your or third parties' legal rights to forbid circumvention of | ||
403 | 193 | technological measures. | ||
404 | 194 | |||
405 | 195 | 4. Conveying Verbatim Copies. | ||
406 | 196 | |||
407 | 197 | You may convey verbatim copies of the Program's source code as you | ||
408 | 198 | receive it, in any medium, provided that you conspicuously and | ||
409 | 199 | appropriately publish on each copy an appropriate copyright notice; | ||
410 | 200 | keep intact all notices stating that this License and any | ||
411 | 201 | non-permissive terms added in accord with section 7 apply to the code; | ||
412 | 202 | keep intact all notices of the absence of any warranty; and give all | ||
413 | 203 | recipients a copy of this License along with the Program. | ||
414 | 204 | |||
415 | 205 | You may charge any price or no price for each copy that you convey, | ||
416 | 206 | and you may offer support or warranty protection for a fee. | ||
417 | 207 | |||
418 | 208 | 5. Conveying Modified Source Versions. | ||
419 | 209 | |||
420 | 210 | You may convey a work based on the Program, or the modifications to | ||
421 | 211 | produce it from the Program, in the form of source code under the | ||
422 | 212 | terms of section 4, provided that you also meet all of these conditions: | ||
423 | 213 | |||
424 | 214 | a) The work must carry prominent notices stating that you modified | ||
425 | 215 | it, and giving a relevant date. | ||
426 | 216 | |||
427 | 217 | b) The work must carry prominent notices stating that it is | ||
428 | 218 | released under this License and any conditions added under section | ||
429 | 219 | 7. This requirement modifies the requirement in section 4 to | ||
430 | 220 | "keep intact all notices". | ||
431 | 221 | |||
432 | 222 | c) You must license the entire work, as a whole, under this | ||
433 | 223 | License to anyone who comes into possession of a copy. This | ||
434 | 224 | License will therefore apply, along with any applicable section 7 | ||
435 | 225 | additional terms, to the whole of the work, and all its parts, | ||
436 | 226 | regardless of how they are packaged. This License gives no | ||
437 | 227 | permission to license the work in any other way, but it does not | ||
438 | 228 | invalidate such permission if you have separately received it. | ||
439 | 229 | |||
440 | 230 | d) If the work has interactive user interfaces, each must display | ||
441 | 231 | Appropriate Legal Notices; however, if the Program has interactive | ||
442 | 232 | interfaces that do not display Appropriate Legal Notices, your | ||
443 | 233 | work need not make them do so. | ||
444 | 234 | |||
445 | 235 | A compilation of a covered work with other separate and independent | ||
446 | 236 | works, which are not by their nature extensions of the covered work, | ||
447 | 237 | and which are not combined with it such as to form a larger program, | ||
448 | 238 | in or on a volume of a storage or distribution medium, is called an | ||
449 | 239 | "aggregate" if the compilation and its resulting copyright are not | ||
450 | 240 | used to limit the access or legal rights of the compilation's users | ||
451 | 241 | beyond what the individual works permit. Inclusion of a covered work | ||
452 | 242 | in an aggregate does not cause this License to apply to the other | ||
453 | 243 | parts of the aggregate. | ||
454 | 244 | |||
455 | 245 | 6. Conveying Non-Source Forms. | ||
456 | 246 | |||
457 | 247 | You may convey a covered work in object code form under the terms | ||
458 | 248 | of sections 4 and 5, provided that you also convey the | ||
459 | 249 | machine-readable Corresponding Source under the terms of this License, | ||
460 | 250 | in one of these ways: | ||
461 | 251 | |||
462 | 252 | a) Convey the object code in, or embodied in, a physical product | ||
463 | 253 | (including a physical distribution medium), accompanied by the | ||
464 | 254 | Corresponding Source fixed on a durable physical medium | ||
465 | 255 | customarily used for software interchange. | ||
466 | 256 | |||
467 | 257 | b) Convey the object code in, or embodied in, a physical product | ||
468 | 258 | (including a physical distribution medium), accompanied by a | ||
469 | 259 | written offer, valid for at least three years and valid for as | ||
470 | 260 | long as you offer spare parts or customer support for that product | ||
471 | 261 | model, to give anyone who possesses the object code either (1) a | ||
472 | 262 | copy of the Corresponding Source for all the software in the | ||
473 | 263 | product that is covered by this License, on a durable physical | ||
474 | 264 | medium customarily used for software interchange, for a price no | ||
475 | 265 | more than your reasonable cost of physically performing this | ||
476 | 266 | conveying of source, or (2) access to copy the | ||
477 | 267 | Corresponding Source from a network server at no charge. | ||
478 | 268 | |||
479 | 269 | c) Convey individual copies of the object code with a copy of the | ||
480 | 270 | written offer to provide the Corresponding Source. This | ||
481 | 271 | alternative is allowed only occasionally and noncommercially, and | ||
482 | 272 | only if you received the object code with such an offer, in accord | ||
483 | 273 | with subsection 6b. | ||
484 | 274 | |||
485 | 275 | d) Convey the object code by offering access from a designated | ||
486 | 276 | place (gratis or for a charge), and offer equivalent access to the | ||
487 | 277 | Corresponding Source in the same way through the same place at no | ||
488 | 278 | further charge. You need not require recipients to copy the | ||
489 | 279 | Corresponding Source along with the object code. If the place to | ||
490 | 280 | copy the object code is a network server, the Corresponding Source | ||
491 | 281 | may be on a different server (operated by you or a third party) | ||
492 | 282 | that supports equivalent copying facilities, provided you maintain | ||
493 | 283 | clear directions next to the object code saying where to find the | ||
494 | 284 | Corresponding Source. Regardless of what server hosts the | ||
495 | 285 | Corresponding Source, you remain obligated to ensure that it is | ||
496 | 286 | available for as long as needed to satisfy these requirements. | ||
497 | 287 | |||
498 | 288 | e) Convey the object code using peer-to-peer transmission, provided | ||
499 | 289 | you inform other peers where the object code and Corresponding | ||
500 | 290 | Source of the work are being offered to the general public at no | ||
501 | 291 | charge under subsection 6d. | ||
502 | 292 | |||
503 | 293 | A separable portion of the object code, whose source code is excluded | ||
504 | 294 | from the Corresponding Source as a System Library, need not be | ||
505 | 295 | included in conveying the object code work. | ||
506 | 296 | |||
507 | 297 | A "User Product" is either (1) a "consumer product", which means any | ||
508 | 298 | tangible personal property which is normally used for personal, family, | ||
509 | 299 | or household purposes, or (2) anything designed or sold for incorporation | ||
510 | 300 | into a dwelling. In determining whether a product is a consumer product, | ||
511 | 301 | doubtful cases shall be resolved in favor of coverage. For a particular | ||
512 | 302 | product received by a particular user, "normally used" refers to a | ||
513 | 303 | typical or common use of that class of product, regardless of the status | ||
514 | 304 | of the particular user or of the way in which the particular user | ||
515 | 305 | actually uses, or expects or is expected to use, the product. A product | ||
516 | 306 | is a consumer product regardless of whether the product has substantial | ||
517 | 307 | commercial, industrial or non-consumer uses, unless such uses represent | ||
518 | 308 | the only significant mode of use of the product. | ||
519 | 309 | |||
520 | 310 | "Installation Information" for a User Product means any methods, | ||
521 | 311 | procedures, authorization keys, or other information required to install | ||
522 | 312 | and execute modified versions of a covered work in that User Product from | ||
523 | 313 | a modified version of its Corresponding Source. The information must | ||
524 | 314 | suffice to ensure that the continued functioning of the modified object | ||
525 | 315 | code is in no case prevented or interfered with solely because | ||
526 | 316 | modification has been made. | ||
527 | 317 | |||
528 | 318 | If you convey an object code work under this section in, or with, or | ||
529 | 319 | specifically for use in, a User Product, and the conveying occurs as | ||
530 | 320 | part of a transaction in which the right of possession and use of the | ||
531 | 321 | User Product is transferred to the recipient in perpetuity or for a | ||
532 | 322 | fixed term (regardless of how the transaction is characterized), the | ||
533 | 323 | Corresponding Source conveyed under this section must be accompanied | ||
534 | 324 | by the Installation Information. But this requirement does not apply | ||
535 | 325 | if neither you nor any third party retains the ability to install | ||
536 | 326 | modified object code on the User Product (for example, the work has | ||
537 | 327 | been installed in ROM). | ||
538 | 328 | |||
539 | 329 | The requirement to provide Installation Information does not include a | ||
540 | 330 | requirement to continue to provide support service, warranty, or updates | ||
541 | 331 | for a work that has been modified or installed by the recipient, or for | ||
542 | 332 | the User Product in which it has been modified or installed. Access to a | ||
543 | 333 | network may be denied when the modification itself materially and | ||
544 | 334 | adversely affects the operation of the network or violates the rules and | ||
545 | 335 | protocols for communication across the network. | ||
546 | 336 | |||
547 | 337 | Corresponding Source conveyed, and Installation Information provided, | ||
548 | 338 | in accord with this section must be in a format that is publicly | ||
549 | 339 | documented (and with an implementation available to the public in | ||
550 | 340 | source code form), and must require no special password or key for | ||
551 | 341 | unpacking, reading or copying. | ||
552 | 342 | |||
553 | 343 | 7. Additional Terms. | ||
554 | 344 | |||
555 | 345 | "Additional permissions" are terms that supplement the terms of this | ||
556 | 346 | License by making exceptions from one or more of its conditions. | ||
557 | 347 | Additional permissions that are applicable to the entire Program shall | ||
558 | 348 | be treated as though they were included in this License, to the extent | ||
559 | 349 | that they are valid under applicable law. If additional permissions | ||
560 | 350 | apply only to part of the Program, that part may be used separately | ||
561 | 351 | under those permissions, but the entire Program remains governed by | ||
562 | 352 | this License without regard to the additional permissions. | ||
563 | 353 | |||
564 | 354 | When you convey a copy of a covered work, you may at your option | ||
565 | 355 | remove any additional permissions from that copy, or from any part of | ||
566 | 356 | it. (Additional permissions may be written to require their own | ||
567 | 357 | removal in certain cases when you modify the work.) You may place | ||
568 | 358 | additional permissions on material, added by you to a covered work, | ||
569 | 359 | for which you have or can give appropriate copyright permission. | ||
570 | 360 | |||
571 | 361 | Notwithstanding any other provision of this License, for material you | ||
572 | 362 | add to a covered work, you may (if authorized by the copyright holders of | ||
573 | 363 | that material) supplement the terms of this License with terms: | ||
574 | 364 | |||
575 | 365 | a) Disclaiming warranty or limiting liability differently from the | ||
576 | 366 | terms of sections 15 and 16 of this License; or | ||
577 | 367 | |||
578 | 368 | b) Requiring preservation of specified reasonable legal notices or | ||
579 | 369 | author attributions in that material or in the Appropriate Legal | ||
580 | 370 | Notices displayed by works containing it; or | ||
581 | 371 | |||
582 | 372 | c) Prohibiting misrepresentation of the origin of that material, or | ||
583 | 373 | requiring that modified versions of such material be marked in | ||
584 | 374 | reasonable ways as different from the original version; or | ||
585 | 375 | |||
586 | 376 | d) Limiting the use for publicity purposes of names of licensors or | ||
587 | 377 | authors of the material; or | ||
588 | 378 | |||
589 | 379 | e) Declining to grant rights under trademark law for use of some | ||
590 | 380 | trade names, trademarks, or service marks; or | ||
591 | 381 | |||
592 | 382 | f) Requiring indemnification of licensors and authors of that | ||
593 | 383 | material by anyone who conveys the material (or modified versions of | ||
594 | 384 | it) with contractual assumptions of liability to the recipient, for | ||
595 | 385 | any liability that these contractual assumptions directly impose on | ||
596 | 386 | those licensors and authors. | ||
597 | 387 | |||
598 | 388 | All other non-permissive additional terms are considered "further | ||
599 | 389 | restrictions" within the meaning of section 10. If the Program as you | ||
600 | 390 | received it, or any part of it, contains a notice stating that it is | ||
601 | 391 | governed by this License along with a term that is a further | ||
602 | 392 | restriction, you may remove that term. If a license document contains | ||
603 | 393 | a further restriction but permits relicensing or conveying under this | ||
604 | 394 | License, you may add to a covered work material governed by the terms | ||
605 | 395 | of that license document, provided that the further restriction does | ||
606 | 396 | not survive such relicensing or conveying. | ||
607 | 397 | |||
608 | 398 | If you add terms to a covered work in accord with this section, you | ||
609 | 399 | must place, in the relevant source files, a statement of the | ||
610 | 400 | additional terms that apply to those files, or a notice indicating | ||
611 | 401 | where to find the applicable terms. | ||
612 | 402 | |||
613 | 403 | Additional terms, permissive or non-permissive, may be stated in the | ||
614 | 404 | form of a separately written license, or stated as exceptions; | ||
615 | 405 | the above requirements apply either way. | ||
616 | 406 | |||
617 | 407 | 8. Termination. | ||
618 | 408 | |||
619 | 409 | You may not propagate or modify a covered work except as expressly | ||
620 | 410 | provided under this License. Any attempt otherwise to propagate or | ||
621 | 411 | modify it is void, and will automatically terminate your rights under | ||
622 | 412 | this License (including any patent licenses granted under the third | ||
623 | 413 | paragraph of section 11). | ||
624 | 414 | |||
625 | 415 | However, if you cease all violation of this License, then your | ||
626 | 416 | license from a particular copyright holder is reinstated (a) | ||
627 | 417 | provisionally, unless and until the copyright holder explicitly and | ||
628 | 418 | finally terminates your license, and (b) permanently, if the copyright | ||
629 | 419 | holder fails to notify you of the violation by some reasonable means | ||
630 | 420 | prior to 60 days after the cessation. | ||
631 | 421 | |||
632 | 422 | Moreover, your license from a particular copyright holder is | ||
633 | 423 | reinstated permanently if the copyright holder notifies you of the | ||
634 | 424 | violation by some reasonable means, this is the first time you have | ||
635 | 425 | received notice of violation of this License (for any work) from that | ||
636 | 426 | copyright holder, and you cure the violation prior to 30 days after | ||
637 | 427 | your receipt of the notice. | ||
638 | 428 | |||
639 | 429 | Termination of your rights under this section does not terminate the | ||
640 | 430 | licenses of parties who have received copies or rights from you under | ||
641 | 431 | this License. If your rights have been terminated and not permanently | ||
642 | 432 | reinstated, you do not qualify to receive new licenses for the same | ||
643 | 433 | material under section 10. | ||
644 | 434 | |||
645 | 435 | 9. Acceptance Not Required for Having Copies. | ||
646 | 436 | |||
647 | 437 | You are not required to accept this License in order to receive or | ||
648 | 438 | run a copy of the Program. Ancillary propagation of a covered work | ||
649 | 439 | occurring solely as a consequence of using peer-to-peer transmission | ||
650 | 440 | to receive a copy likewise does not require acceptance. However, | ||
651 | 441 | nothing other than this License grants you permission to propagate or | ||
652 | 442 | modify any covered work. These actions infringe copyright if you do | ||
653 | 443 | not accept this License. Therefore, by modifying or propagating a | ||
654 | 444 | covered work, you indicate your acceptance of this License to do so. | ||
655 | 445 | |||
656 | 446 | 10. Automatic Licensing of Downstream Recipients. | ||
657 | 447 | |||
658 | 448 | Each time you convey a covered work, the recipient automatically | ||
659 | 449 | receives a license from the original licensors, to run, modify and | ||
660 | 450 | propagate that work, subject to this License. You are not responsible | ||
661 | 451 | for enforcing compliance by third parties with this License. | ||
662 | 452 | |||
663 | 453 | An "entity transaction" is a transaction transferring control of an | ||
664 | 454 | organization, or substantially all assets of one, or subdividing an | ||
665 | 455 | organization, or merging organizations. If propagation of a covered | ||
666 | 456 | work results from an entity transaction, each party to that | ||
667 | 457 | transaction who receives a copy of the work also receives whatever | ||
668 | 458 | licenses to the work the party's predecessor in interest had or could | ||
669 | 459 | give under the previous paragraph, plus a right to possession of the | ||
670 | 460 | Corresponding Source of the work from the predecessor in interest, if | ||
671 | 461 | the predecessor has it or can get it with reasonable efforts. | ||
672 | 462 | |||
673 | 463 | You may not impose any further restrictions on the exercise of the | ||
674 | 464 | rights granted or affirmed under this License. For example, you may | ||
675 | 465 | not impose a license fee, royalty, or other charge for exercise of | ||
676 | 466 | rights granted under this License, and you may not initiate litigation | ||
677 | 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that | ||
678 | 468 | any patent claim is infringed by making, using, selling, offering for | ||
679 | 469 | sale, or importing the Program or any portion of it. | ||
680 | 470 | |||
681 | 471 | 11. Patents. | ||
682 | 472 | |||
683 | 473 | A "contributor" is a copyright holder who authorizes use under this | ||
684 | 474 | License of the Program or a work on which the Program is based. The | ||
685 | 475 | work thus licensed is called the contributor's "contributor version". | ||
686 | 476 | |||
687 | 477 | A contributor's "essential patent claims" are all patent claims | ||
688 | 478 | owned or controlled by the contributor, whether already acquired or | ||
689 | 479 | hereafter acquired, that would be infringed by some manner, permitted | ||
690 | 480 | by this License, of making, using, or selling its contributor version, | ||
691 | 481 | but do not include claims that would be infringed only as a | ||
692 | 482 | consequence of further modification of the contributor version. For | ||
693 | 483 | purposes of this definition, "control" includes the right to grant | ||
694 | 484 | patent sublicenses in a manner consistent with the requirements of | ||
695 | 485 | this License. | ||
696 | 486 | |||
697 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free | ||
698 | 488 | patent license under the contributor's essential patent claims, to | ||
699 | 489 | make, use, sell, offer for sale, import and otherwise run, modify and | ||
700 | 490 | propagate the contents of its contributor version. | ||
701 | 491 | |||
702 | 492 | In the following three paragraphs, a "patent license" is any express | ||
703 | 493 | agreement or commitment, however denominated, not to enforce a patent | ||
704 | 494 | (such as an express permission to practice a patent or covenant not to | ||
705 | 495 | sue for patent infringement). To "grant" such a patent license to a | ||
706 | 496 | party means to make such an agreement or commitment not to enforce a | ||
707 | 497 | patent against the party. | ||
708 | 498 | |||
709 | 499 | If you convey a covered work, knowingly relying on a patent license, | ||
710 | 500 | and the Corresponding Source of the work is not available for anyone | ||
711 | 501 | to copy, free of charge and under the terms of this License, through a | ||
712 | 502 | publicly available network server or other readily accessible means, | ||
713 | 503 | then you must either (1) cause the Corresponding Source to be so | ||
714 | 504 | available, or (2) arrange to deprive yourself of the benefit of the | ||
715 | 505 | patent license for this particular work, or (3) arrange, in a manner | ||
716 | 506 | consistent with the requirements of this License, to extend the patent | ||
717 | 507 | license to downstream recipients. "Knowingly relying" means you have | ||
718 | 508 | actual knowledge that, but for the patent license, your conveying the | ||
719 | 509 | covered work in a country, or your recipient's use of the covered work | ||
720 | 510 | in a country, would infringe one or more identifiable patents in that | ||
721 | 511 | country that you have reason to believe are valid. | ||
722 | 512 | |||
723 | 513 | If, pursuant to or in connection with a single transaction or | ||
724 | 514 | arrangement, you convey, or propagate by procuring conveyance of, a | ||
725 | 515 | covered work, and grant a patent license to some of the parties | ||
726 | 516 | receiving the covered work authorizing them to use, propagate, modify | ||
727 | 517 | or convey a specific copy of the covered work, then the patent license | ||
728 | 518 | you grant is automatically extended to all recipients of the covered | ||
729 | 519 | work and works based on it. | ||
730 | 520 | |||
731 | 521 | A patent license is "discriminatory" if it does not include within | ||
732 | 522 | the scope of its coverage, prohibits the exercise of, or is | ||
733 | 523 | conditioned on the non-exercise of one or more of the rights that are | ||
734 | 524 | specifically granted under this License. You may not convey a covered | ||
735 | 525 | work if you are a party to an arrangement with a third party that is | ||
736 | 526 | in the business of distributing software, under which you make payment | ||
737 | 527 | to the third party based on the extent of your activity of conveying | ||
738 | 528 | the work, and under which the third party grants, to any of the | ||
739 | 529 | parties who would receive the covered work from you, a discriminatory | ||
740 | 530 | patent license (a) in connection with copies of the covered work | ||
741 | 531 | conveyed by you (or copies made from those copies), or (b) primarily | ||
742 | 532 | for and in connection with specific products or compilations that | ||
743 | 533 | contain the covered work, unless you entered into that arrangement, | ||
744 | 534 | or that patent license was granted, prior to 28 March 2007. | ||
745 | 535 | |||
746 | 536 | Nothing in this License shall be construed as excluding or limiting | ||
747 | 537 | any implied license or other defenses to infringement that may | ||
748 | 538 | otherwise be available to you under applicable patent law. | ||
749 | 539 | |||
750 | 540 | 12. No Surrender of Others' Freedom. | ||
751 | 541 | |||
752 | 542 | If conditions are imposed on you (whether by court order, agreement or | ||
753 | 543 | otherwise) that contradict the conditions of this License, they do not | ||
754 | 544 | excuse you from the conditions of this License. If you cannot convey a | ||
755 | 545 | covered work so as to satisfy simultaneously your obligations under this | ||
756 | 546 | License and any other pertinent obligations, then as a consequence you may | ||
757 | 547 | not convey it at all. For example, if you agree to terms that obligate you | ||
758 | 548 | to collect a royalty for further conveying from those to whom you convey | ||
759 | 549 | the Program, the only way you could satisfy both those terms and this | ||
760 | 550 | License would be to refrain entirely from conveying the Program. | ||
761 | 551 | |||
762 | 552 | 13. Use with the GNU Affero General Public License. | ||
763 | 553 | |||
764 | 554 | Notwithstanding any other provision of this License, you have | ||
765 | 555 | permission to link or combine any covered work with a work licensed | ||
766 | 556 | under version 3 of the GNU Affero General Public License into a single | ||
767 | 557 | combined work, and to convey the resulting work. The terms of this | ||
768 | 558 | License will continue to apply to the part which is the covered work, | ||
769 | 559 | but the special requirements of the GNU Affero General Public License, | ||
770 | 560 | section 13, concerning interaction through a network will apply to the | ||
771 | 561 | combination as such. | ||
772 | 562 | |||
773 | 563 | 14. Revised Versions of this License. | ||
774 | 564 | |||
775 | 565 | The Free Software Foundation may publish revised and/or new versions of | ||
776 | 566 | the GNU General Public License from time to time. Such new versions will | ||
777 | 567 | be similar in spirit to the present version, but may differ in detail to | ||
778 | 568 | address new problems or concerns. | ||
779 | 569 | |||
780 | 570 | Each version is given a distinguishing version number. If the | ||
781 | 571 | Program specifies that a certain numbered version of the GNU General | ||
782 | 572 | Public License "or any later version" applies to it, you have the | ||
783 | 573 | option of following the terms and conditions either of that numbered | ||
784 | 574 | version or of any later version published by the Free Software | ||
785 | 575 | Foundation. If the Program does not specify a version number of the | ||
786 | 576 | GNU General Public License, you may choose any version ever published | ||
787 | 577 | by the Free Software Foundation. | ||
788 | 578 | |||
789 | 579 | If the Program specifies that a proxy can decide which future | ||
790 | 580 | versions of the GNU General Public License can be used, that proxy's | ||
791 | 581 | public statement of acceptance of a version permanently authorizes you | ||
792 | 582 | to choose that version for the Program. | ||
793 | 583 | |||
794 | 584 | Later license versions may give you additional or different | ||
795 | 585 | permissions. However, no additional obligations are imposed on any | ||
796 | 586 | author or copyright holder as a result of your choosing to follow a | ||
797 | 587 | later version. | ||
798 | 588 | |||
799 | 589 | 15. Disclaimer of Warranty. | ||
800 | 590 | |||
801 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY | ||
802 | 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT | ||
803 | 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY | ||
804 | 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, | ||
805 | 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
806 | 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM | ||
807 | 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF | ||
808 | 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. | ||
809 | 599 | |||
810 | 600 | 16. Limitation of Liability. | ||
811 | 601 | |||
812 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | ||
813 | 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS | ||
814 | 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY | ||
815 | 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE | ||
816 | 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF | ||
817 | 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD | ||
818 | 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), | ||
819 | 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF | ||
820 | 610 | SUCH DAMAGES. | ||
821 | 611 | |||
822 | 612 | 17. Interpretation of Sections 15 and 16. | ||
823 | 613 | |||
824 | 614 | If the disclaimer of warranty and limitation of liability provided | ||
825 | 615 | above cannot be given local legal effect according to their terms, | ||
826 | 616 | reviewing courts shall apply local law that most closely approximates | ||
827 | 617 | an absolute waiver of all civil liability in connection with the | ||
828 | 618 | Program, unless a warranty or assumption of liability accompanies a | ||
829 | 619 | copy of the Program in return for a fee. | ||
830 | 620 | |||
831 | 621 | END OF TERMS AND CONDITIONS | ||
832 | 622 | |||
833 | 623 | How to Apply These Terms to Your New Programs | ||
834 | 624 | |||
835 | 625 | If you develop a new program, and you want it to be of the greatest | ||
836 | 626 | possible use to the public, the best way to achieve this is to make it | ||
837 | 627 | free software which everyone can redistribute and change under these terms. | ||
838 | 628 | |||
839 | 629 | To do so, attach the following notices to the program. It is safest | ||
840 | 630 | to attach them to the start of each source file to most effectively | ||
841 | 631 | state the exclusion of warranty; and each file should have at least | ||
842 | 632 | the "copyright" line and a pointer to where the full notice is found. | ||
843 | 633 | |||
844 | 634 | <one line to give the program's name and a brief idea of what it does.> | ||
845 | 635 | Copyright (C) <year> <name of author> | ||
846 | 636 | |||
847 | 637 | This program is free software: you can redistribute it and/or modify | ||
848 | 638 | it under the terms of the GNU General Public License as published by | ||
849 | 639 | the Free Software Foundation, either version 3 of the License, or | ||
850 | 640 | (at your option) any later version. | ||
851 | 641 | |||
852 | 642 | This program is distributed in the hope that it will be useful, | ||
853 | 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
854 | 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
855 | 645 | GNU General Public License for more details. | ||
856 | 646 | |||
857 | 647 | You should have received a copy of the GNU General Public License | ||
858 | 648 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
859 | 649 | |||
860 | 650 | Also add information on how to contact you by electronic and paper mail. | ||
861 | 651 | |||
862 | 652 | If the program does terminal interaction, make it output a short | ||
863 | 653 | notice like this when it starts in an interactive mode: | ||
864 | 654 | |||
865 | 655 | <program> Copyright (C) <year> <name of author> | ||
866 | 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. | ||
867 | 657 | This is free software, and you are welcome to redistribute it | ||
868 | 658 | under certain conditions; type `show c' for details. | ||
869 | 659 | |||
870 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate | ||
871 | 661 | parts of the General Public License. Of course, your program's commands | ||
872 | 662 | might be different; for a GUI interface, you would use an "about box". | ||
873 | 663 | |||
874 | 664 | You should also get your employer (if you work as a programmer) or school, | ||
875 | 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. | ||
876 | 666 | For more information on this, and how to apply and follow the GNU GPL, see | ||
877 | 667 | <http://www.gnu.org/licenses/>. | ||
878 | 668 | |||
879 | 669 | The GNU General Public License does not permit incorporating your program | ||
880 | 670 | into proprietary programs. If your program is a subroutine library, you | ||
881 | 671 | may consider it more useful to permit linking proprietary applications with | ||
882 | 672 | the library. If this is what you want to do, use the GNU Lesser General | ||
883 | 673 | Public License instead of this License. But first, please read | ||
884 | 674 | <http://www.gnu.org/philosophy/why-not-lgpl.html>. | ||
907 | diff --git a/LICENSE-Apache2.0 b/LICENSE-Apache2.0 | |||
908 | 675 | new file mode 100644 | 23 | new file mode 100644 |
909 | index 0000000..d645695 | |||
910 | --- /dev/null | |||
911 | +++ b/LICENSE-Apache2.0 | |||
912 | @@ -0,0 +1,202 @@ | |||
913 | 1 | |||
914 | 2 | Apache License | ||
915 | 3 | Version 2.0, January 2004 | ||
916 | 4 | http://www.apache.org/licenses/ | ||
917 | 5 | |||
918 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | ||
919 | 7 | |||
920 | 8 | 1. Definitions. | ||
921 | 9 | |||
922 | 10 | "License" shall mean the terms and conditions for use, reproduction, | ||
923 | 11 | and distribution as defined by Sections 1 through 9 of this document. | ||
924 | 12 | |||
925 | 13 | "Licensor" shall mean the copyright owner or entity authorized by | ||
926 | 14 | the copyright owner that is granting the License. | ||
927 | 15 | |||
928 | 16 | "Legal Entity" shall mean the union of the acting entity and all | ||
929 | 17 | other entities that control, are controlled by, or are under common | ||
930 | 18 | control with that entity. For the purposes of this definition, | ||
931 | 19 | "control" means (i) the power, direct or indirect, to cause the | ||
932 | 20 | direction or management of such entity, whether by contract or | ||
933 | 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the | ||
934 | 22 | outstanding shares, or (iii) beneficial ownership of such entity. | ||
935 | 23 | |||
936 | 24 | "You" (or "Your") shall mean an individual or Legal Entity | ||
937 | 25 | exercising permissions granted by this License. | ||
938 | 26 | |||
939 | 27 | "Source" form shall mean the preferred form for making modifications, | ||
940 | 28 | including but not limited to software source code, documentation | ||
941 | 29 | source, and configuration files. | ||
942 | 30 | |||
943 | 31 | "Object" form shall mean any form resulting from mechanical | ||
944 | 32 | transformation or translation of a Source form, including but | ||
945 | 33 | not limited to compiled object code, generated documentation, | ||
946 | 34 | and conversions to other media types. | ||
947 | 35 | |||
948 | 36 | "Work" shall mean the work of authorship, whether in Source or | ||
949 | 37 | Object form, made available under the License, as indicated by a | ||
950 | 38 | copyright notice that is included in or attached to the work | ||
951 | 39 | (an example is provided in the Appendix below). | ||
952 | 40 | |||
953 | 41 | "Derivative Works" shall mean any work, whether in Source or Object | ||
954 | 42 | form, that is based on (or derived from) the Work and for which the | ||
955 | 43 | editorial revisions, annotations, elaborations, or other modifications | ||
956 | 44 | represent, as a whole, an original work of authorship. For the purposes | ||
957 | 45 | of this License, Derivative Works shall not include works that remain | ||
958 | 46 | separable from, or merely link (or bind by name) to the interfaces of, | ||
959 | 47 | the Work and Derivative Works thereof. | ||
960 | 48 | |||
961 | 49 | "Contribution" shall mean any work of authorship, including | ||
962 | 50 | the original version of the Work and any modifications or additions | ||
963 | 51 | to that Work or Derivative Works thereof, that is intentionally | ||
964 | 52 | submitted to Licensor for inclusion in the Work by the copyright owner | ||
965 | 53 | or by an individual or Legal Entity authorized to submit on behalf of | ||
966 | 54 | the copyright owner. For the purposes of this definition, "submitted" | ||
967 | 55 | means any form of electronic, verbal, or written communication sent | ||
968 | 56 | to the Licensor or its representatives, including but not limited to | ||
969 | 57 | communication on electronic mailing lists, source code control systems, | ||
970 | 58 | and issue tracking systems that are managed by, or on behalf of, the | ||
971 | 59 | Licensor for the purpose of discussing and improving the Work, but | ||
972 | 60 | excluding communication that is conspicuously marked or otherwise | ||
973 | 61 | designated in writing by the copyright owner as "Not a Contribution." | ||
974 | 62 | |||
975 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity | ||
976 | 64 | on behalf of whom a Contribution has been received by Licensor and | ||
977 | 65 | subsequently incorporated within the Work. | ||
978 | 66 | |||
979 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of | ||
980 | 68 | this License, each Contributor hereby grants to You a perpetual, | ||
981 | 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable | ||
982 | 70 | copyright license to reproduce, prepare Derivative Works of, | ||
983 | 71 | publicly display, publicly perform, sublicense, and distribute the | ||
984 | 72 | Work and such Derivative Works in Source or Object form. | ||
985 | 73 | |||
986 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of | ||
987 | 75 | this License, each Contributor hereby grants to You a perpetual, | ||
988 | 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable | ||
989 | 77 | (except as stated in this section) patent license to make, have made, | ||
990 | 78 | use, offer to sell, sell, import, and otherwise transfer the Work, | ||
991 | 79 | where such license applies only to those patent claims licensable | ||
992 | 80 | by such Contributor that are necessarily infringed by their | ||
993 | 81 | Contribution(s) alone or by combination of their Contribution(s) | ||
994 | 82 | with the Work to which such Contribution(s) was submitted. If You | ||
995 | 83 | institute patent litigation against any entity (including a | ||
996 | 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work | ||
997 | 85 | or a Contribution incorporated within the Work constitutes direct | ||
998 | 86 | or contributory patent infringement, then any patent licenses | ||
999 | 87 | granted to You under this License for that Work shall terminate | ||
1000 | 88 | as of the date such litigation is filed. | ||
1001 | 89 | |||
1002 | 90 | 4. Redistribution. You may reproduce and distribute copies of the | ||
1003 | 91 | Work or Derivative Works thereof in any medium, with or without | ||
1004 | 92 | modifications, and in Source or Object form, provided that You | ||
1005 | 93 | meet the following conditions: | ||
1006 | 94 | |||
1007 | 95 | (a) You must give any other recipients of the Work or | ||
1008 | 96 | Derivative Works a copy of this License; and | ||
1009 | 97 | |||
1010 | 98 | (b) You must cause any modified files to carry prominent notices | ||
1011 | 99 | stating that You changed the files; and | ||
1012 | 100 | |||
1013 | 101 | (c) You must retain, in the Source form of any Derivative Works | ||
1014 | 102 | that You distribute, all copyright, patent, trademark, and | ||
1015 | 103 | attribution notices from the Source form of the Work, | ||
1016 | 104 | excluding those notices that do not pertain to any part of | ||
1017 | 105 | the Derivative Works; and | ||
1018 | 106 | |||
1019 | 107 | (d) If the Work includes a "NOTICE" text file as part of its | ||
1020 | 108 | distribution, then any Derivative Works that You distribute must | ||
1021 | 109 | include a readable copy of the attribution notices contained | ||
1022 | 110 | within such NOTICE file, excluding those notices that do not | ||
1023 | 111 | pertain to any part of the Derivative Works, in at least one | ||
1024 | 112 | of the following places: within a NOTICE text file distributed | ||
1025 | 113 | as part of the Derivative Works; within the Source form or | ||
1026 | 114 | documentation, if provided along with the Derivative Works; or, | ||
1027 | 115 | within a display generated by the Derivative Works, if and | ||
1028 | 116 | wherever such third-party notices normally appear. The contents | ||
1029 | 117 | of the NOTICE file are for informational purposes only and | ||
1030 | 118 | do not modify the License. You may add Your own attribution | ||
1031 | 119 | notices within Derivative Works that You distribute, alongside | ||
1032 | 120 | or as an addendum to the NOTICE text from the Work, provided | ||
1033 | 121 | that such additional attribution notices cannot be construed | ||
1034 | 122 | as modifying the License. | ||
1035 | 123 | |||
1036 | 124 | You may add Your own copyright statement to Your modifications and | ||
1037 | 125 | may provide additional or different license terms and conditions | ||
1038 | 126 | for use, reproduction, or distribution of Your modifications, or | ||
1039 | 127 | for any such Derivative Works as a whole, provided Your use, | ||
1040 | 128 | reproduction, and distribution of the Work otherwise complies with | ||
1041 | 129 | the conditions stated in this License. | ||
1042 | 130 | |||
1043 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, | ||
1044 | 132 | any Contribution intentionally submitted for inclusion in the Work | ||
1045 | 133 | by You to the Licensor shall be under the terms and conditions of | ||
1046 | 134 | this License, without any additional terms or conditions. | ||
1047 | 135 | Notwithstanding the above, nothing herein shall supersede or modify | ||
1048 | 136 | the terms of any separate license agreement you may have executed | ||
1049 | 137 | with Licensor regarding such Contributions. | ||
1050 | 138 | |||
1051 | 139 | 6. Trademarks. This License does not grant permission to use the trade | ||
1052 | 140 | names, trademarks, service marks, or product names of the Licensor, | ||
1053 | 141 | except as required for reasonable and customary use in describing the | ||
1054 | 142 | origin of the Work and reproducing the content of the NOTICE file. | ||
1055 | 143 | |||
1056 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or | ||
1057 | 145 | agreed to in writing, Licensor provides the Work (and each | ||
1058 | 146 | Contributor provides its Contributions) on an "AS IS" BASIS, | ||
1059 | 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||
1060 | 148 | implied, including, without limitation, any warranties or conditions | ||
1061 | 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A | ||
1062 | 150 | PARTICULAR PURPOSE. You are solely responsible for determining the | ||
1063 | 151 | appropriateness of using or redistributing the Work and assume any | ||
1064 | 152 | risks associated with Your exercise of permissions under this License. | ||
1065 | 153 | |||
1066 | 154 | 8. Limitation of Liability. In no event and under no legal theory, | ||
1067 | 155 | whether in tort (including negligence), contract, or otherwise, | ||
1068 | 156 | unless required by applicable law (such as deliberate and grossly | ||
1069 | 157 | negligent acts) or agreed to in writing, shall any Contributor be | ||
1070 | 158 | liable to You for damages, including any direct, indirect, special, | ||
1071 | 159 | incidental, or consequential damages of any character arising as a | ||
1072 | 160 | result of this License or out of the use or inability to use the | ||
1073 | 161 | Work (including but not limited to damages for loss of goodwill, | ||
1074 | 162 | work stoppage, computer failure or malfunction, or any and all | ||
1075 | 163 | other commercial damages or losses), even if such Contributor | ||
1076 | 164 | has been advised of the possibility of such damages. | ||
1077 | 165 | |||
1078 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing | ||
1079 | 167 | the Work or Derivative Works thereof, You may choose to offer, | ||
1080 | 168 | and charge a fee for, acceptance of support, warranty, indemnity, | ||
1081 | 169 | or other liability obligations and/or rights consistent with this | ||
1082 | 170 | License. However, in accepting such obligations, You may act only | ||
1083 | 171 | on Your own behalf and on Your sole responsibility, not on behalf | ||
1084 | 172 | of any other Contributor, and only if You agree to indemnify, | ||
1085 | 173 | defend, and hold each Contributor harmless for any liability | ||
1086 | 174 | incurred by, or claims asserted against, such Contributor by reason | ||
1087 | 175 | of your accepting any such warranty or additional liability. | ||
1088 | 176 | |||
1089 | 177 | END OF TERMS AND CONDITIONS | ||
1090 | 178 | |||
1091 | 179 | APPENDIX: How to apply the Apache License to your work. | ||
1092 | 180 | |||
1093 | 181 | To apply the Apache License to your work, attach the following | ||
1094 | 182 | boilerplate notice, with the fields enclosed by brackets "[]" | ||
1095 | 183 | replaced with your own identifying information. (Don't include | ||
1096 | 184 | the brackets!) The text should be enclosed in the appropriate | ||
1097 | 185 | comment syntax for the file format. We also recommend that a | ||
1098 | 186 | file or class name and description of purpose be included on the | ||
1099 | 187 | same "printed page" as the copyright notice for easier | ||
1100 | 188 | identification within third-party archives. | ||
1101 | 189 | |||
1102 | 190 | Copyright [yyyy] [name of copyright owner] | ||
1103 | 191 | |||
1104 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
1105 | 193 | you may not use this file except in compliance with the License. | ||
1106 | 194 | You may obtain a copy of the License at | ||
1107 | 195 | |||
1108 | 196 | http://www.apache.org/licenses/LICENSE-2.0 | ||
1109 | 197 | |||
1110 | 198 | Unless required by applicable law or agreed to in writing, software | ||
1111 | 199 | distributed under the License is distributed on an "AS IS" BASIS, | ||
1112 | 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
1113 | 201 | See the License for the specific language governing permissions and | ||
1114 | 202 | limitations under the License. | ||
1115 | diff --git a/LICENSE-GPLv3 b/LICENSE-GPLv3 | |||
1116 | 0 | new file mode 100644 | 203 | new file mode 100644 |
1117 | index 0000000..94a9ed0 | |||
1118 | --- /dev/null | |||
1119 | +++ b/LICENSE-GPLv3 | |||
1120 | @@ -0,0 +1,674 @@ | |||
1121 | 1 | GNU GENERAL PUBLIC LICENSE | ||
1122 | 2 | Version 3, 29 June 2007 | ||
1123 | 3 | |||
1124 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> | ||
1125 | 5 | Everyone is permitted to copy and distribute verbatim copies | ||
1126 | 6 | of this license document, but changing it is not allowed. | ||
1127 | 7 | |||
1128 | 8 | Preamble | ||
1129 | 9 | |||
1130 | 10 | The GNU General Public License is a free, copyleft license for | ||
1131 | 11 | software and other kinds of works. | ||
1132 | 12 | |||
1133 | 13 | The licenses for most software and other practical works are designed | ||
1134 | 14 | to take away your freedom to share and change the works. By contrast, | ||
1135 | 15 | the GNU General Public License is intended to guarantee your freedom to | ||
1136 | 16 | share and change all versions of a program--to make sure it remains free | ||
1137 | 17 | software for all its users. We, the Free Software Foundation, use the | ||
1138 | 18 | GNU General Public License for most of our software; it applies also to | ||
1139 | 19 | any other work released this way by its authors. You can apply it to | ||
1140 | 20 | your programs, too. | ||
1141 | 21 | |||
1142 | 22 | When we speak of free software, we are referring to freedom, not | ||
1143 | 23 | price. Our General Public Licenses are designed to make sure that you | ||
1144 | 24 | have the freedom to distribute copies of free software (and charge for | ||
1145 | 25 | them if you wish), that you receive source code or can get it if you | ||
1146 | 26 | want it, that you can change the software or use pieces of it in new | ||
1147 | 27 | free programs, and that you know you can do these things. | ||
1148 | 28 | |||
1149 | 29 | To protect your rights, we need to prevent others from denying you | ||
1150 | 30 | these rights or asking you to surrender the rights. Therefore, you have | ||
1151 | 31 | certain responsibilities if you distribute copies of the software, or if | ||
1152 | 32 | you modify it: responsibilities to respect the freedom of others. | ||
1153 | 33 | |||
1154 | 34 | For example, if you distribute copies of such a program, whether | ||
1155 | 35 | gratis or for a fee, you must pass on to the recipients the same | ||
1156 | 36 | freedoms that you received. You must make sure that they, too, receive | ||
1157 | 37 | or can get the source code. And you must show them these terms so they | ||
1158 | 38 | know their rights. | ||
1159 | 39 | |||
1160 | 40 | Developers that use the GNU GPL protect your rights with two steps: | ||
1161 | 41 | (1) assert copyright on the software, and (2) offer you this License | ||
1162 | 42 | giving you legal permission to copy, distribute and/or modify it. | ||
1163 | 43 | |||
1164 | 44 | For the developers' and authors' protection, the GPL clearly explains | ||
1165 | 45 | that there is no warranty for this free software. For both users' and | ||
1166 | 46 | authors' sake, the GPL requires that modified versions be marked as | ||
1167 | 47 | changed, so that their problems will not be attributed erroneously to | ||
1168 | 48 | authors of previous versions. | ||
1169 | 49 | |||
1170 | 50 | Some devices are designed to deny users access to install or run | ||
1171 | 51 | modified versions of the software inside them, although the manufacturer | ||
1172 | 52 | can do so. This is fundamentally incompatible with the aim of | ||
1173 | 53 | protecting users' freedom to change the software. The systematic | ||
1174 | 54 | pattern of such abuse occurs in the area of products for individuals to | ||
1175 | 55 | use, which is precisely where it is most unacceptable. Therefore, we | ||
1176 | 56 | have designed this version of the GPL to prohibit the practice for those | ||
1177 | 57 | products. If such problems arise substantially in other domains, we | ||
1178 | 58 | stand ready to extend this provision to those domains in future versions | ||
1179 | 59 | of the GPL, as needed to protect the freedom of users. | ||
1180 | 60 | |||
1181 | 61 | Finally, every program is threatened constantly by software patents. | ||
1182 | 62 | States should not allow patents to restrict development and use of | ||
1183 | 63 | software on general-purpose computers, but in those that do, we wish to | ||
1184 | 64 | avoid the special danger that patents applied to a free program could | ||
1185 | 65 | make it effectively proprietary. To prevent this, the GPL assures that | ||
1186 | 66 | patents cannot be used to render the program non-free. | ||
1187 | 67 | |||
1188 | 68 | The precise terms and conditions for copying, distribution and | ||
1189 | 69 | modification follow. | ||
1190 | 70 | |||
1191 | 71 | TERMS AND CONDITIONS | ||
1192 | 72 | |||
1193 | 73 | 0. Definitions. | ||
1194 | 74 | |||
1195 | 75 | "This License" refers to version 3 of the GNU General Public License. | ||
1196 | 76 | |||
1197 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of | ||
1198 | 78 | works, such as semiconductor masks. | ||
1199 | 79 | |||
1200 | 80 | "The Program" refers to any copyrightable work licensed under this | ||
1201 | 81 | License. Each licensee is addressed as "you". "Licensees" and | ||
1202 | 82 | "recipients" may be individuals or organizations. | ||
1203 | 83 | |||
1204 | 84 | To "modify" a work means to copy from or adapt all or part of the work | ||
1205 | 85 | in a fashion requiring copyright permission, other than the making of an | ||
1206 | 86 | exact copy. The resulting work is called a "modified version" of the | ||
1207 | 87 | earlier work or a work "based on" the earlier work. | ||
1208 | 88 | |||
1209 | 89 | A "covered work" means either the unmodified Program or a work based | ||
1210 | 90 | on the Program. | ||
1211 | 91 | |||
1212 | 92 | To "propagate" a work means to do anything with it that, without | ||
1213 | 93 | permission, would make you directly or secondarily liable for | ||
1214 | 94 | infringement under applicable copyright law, except executing it on a | ||
1215 | 95 | computer or modifying a private copy. Propagation includes copying, | ||
1216 | 96 | distribution (with or without modification), making available to the | ||
1217 | 97 | public, and in some countries other activities as well. | ||
1218 | 98 | |||
1219 | 99 | To "convey" a work means any kind of propagation that enables other | ||
1220 | 100 | parties to make or receive copies. Mere interaction with a user through | ||
1221 | 101 | a computer network, with no transfer of a copy, is not conveying. | ||
1222 | 102 | |||
1223 | 103 | An interactive user interface displays "Appropriate Legal Notices" | ||
1224 | 104 | to the extent that it includes a convenient and prominently visible | ||
1225 | 105 | feature that (1) displays an appropriate copyright notice, and (2) | ||
1226 | 106 | tells the user that there is no warranty for the work (except to the | ||
1227 | 107 | extent that warranties are provided), that licensees may convey the | ||
1228 | 108 | work under this License, and how to view a copy of this License. If | ||
1229 | 109 | the interface presents a list of user commands or options, such as a | ||
1230 | 110 | menu, a prominent item in the list meets this criterion. | ||
1231 | 111 | |||
1232 | 112 | 1. Source Code. | ||
1233 | 113 | |||
1234 | 114 | The "source code" for a work means the preferred form of the work | ||
1235 | 115 | for making modifications to it. "Object code" means any non-source | ||
1236 | 116 | form of a work. | ||
1237 | 117 | |||
1238 | 118 | A "Standard Interface" means an interface that either is an official | ||
1239 | 119 | standard defined by a recognized standards body, or, in the case of | ||
1240 | 120 | interfaces specified for a particular programming language, one that | ||
1241 | 121 | is widely used among developers working in that language. | ||
1242 | 122 | |||
1243 | 123 | The "System Libraries" of an executable work include anything, other | ||
1244 | 124 | than the work as a whole, that (a) is included in the normal form of | ||
1245 | 125 | packaging a Major Component, but which is not part of that Major | ||
1246 | 126 | Component, and (b) serves only to enable use of the work with that | ||
1247 | 127 | Major Component, or to implement a Standard Interface for which an | ||
1248 | 128 | implementation is available to the public in source code form. A | ||
1249 | 129 | "Major Component", in this context, means a major essential component | ||
1250 | 130 | (kernel, window system, and so on) of the specific operating system | ||
1251 | 131 | (if any) on which the executable work runs, or a compiler used to | ||
1252 | 132 | produce the work, or an object code interpreter used to run it. | ||
1253 | 133 | |||
1254 | 134 | The "Corresponding Source" for a work in object code form means all | ||
1255 | 135 | the source code needed to generate, install, and (for an executable | ||
1256 | 136 | work) run the object code and to modify the work, including scripts to | ||
1257 | 137 | control those activities. However, it does not include the work's | ||
1258 | 138 | System Libraries, or general-purpose tools or generally available free | ||
1259 | 139 | programs which are used unmodified in performing those activities but | ||
1260 | 140 | which are not part of the work. For example, Corresponding Source | ||
1261 | 141 | includes interface definition files associated with source files for | ||
1262 | 142 | the work, and the source code for shared libraries and dynamically | ||
1263 | 143 | linked subprograms that the work is specifically designed to require, | ||
1264 | 144 | such as by intimate data communication or control flow between those | ||
1265 | 145 | subprograms and other parts of the work. | ||
1266 | 146 | |||
1267 | 147 | The Corresponding Source need not include anything that users | ||
1268 | 148 | can regenerate automatically from other parts of the Corresponding | ||
1269 | 149 | Source. | ||
1270 | 150 | |||
1271 | 151 | The Corresponding Source for a work in source code form is that | ||
1272 | 152 | same work. | ||
1273 | 153 | |||
1274 | 154 | 2. Basic Permissions. | ||
1275 | 155 | |||
1276 | 156 | All rights granted under this License are granted for the term of | ||
1277 | 157 | copyright on the Program, and are irrevocable provided the stated | ||
1278 | 158 | conditions are met. This License explicitly affirms your unlimited | ||
1279 | 159 | permission to run the unmodified Program. The output from running a | ||
1280 | 160 | covered work is covered by this License only if the output, given its | ||
1281 | 161 | content, constitutes a covered work. This License acknowledges your | ||
1282 | 162 | rights of fair use or other equivalent, as provided by copyright law. | ||
1283 | 163 | |||
1284 | 164 | You may make, run and propagate covered works that you do not | ||
1285 | 165 | convey, without conditions so long as your license otherwise remains | ||
1286 | 166 | in force. You may convey covered works to others for the sole purpose | ||
1287 | 167 | of having them make modifications exclusively for you, or provide you | ||
1288 | 168 | with facilities for running those works, provided that you comply with | ||
1289 | 169 | the terms of this License in conveying all material for which you do | ||
1290 | 170 | not control copyright. Those thus making or running the covered works | ||
1291 | 171 | for you must do so exclusively on your behalf, under your direction | ||
1292 | 172 | and control, on terms that prohibit them from making any copies of | ||
1293 | 173 | your copyrighted material outside their relationship with you. | ||
1294 | 174 | |||
1295 | 175 | Conveying under any other circumstances is permitted solely under | ||
1296 | 176 | the conditions stated below. Sublicensing is not allowed; section 10 | ||
1297 | 177 | makes it unnecessary. | ||
1298 | 178 | |||
1299 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. | ||
1300 | 180 | |||
1301 | 181 | No covered work shall be deemed part of an effective technological | ||
1302 | 182 | measure under any applicable law fulfilling obligations under article | ||
1303 | 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or | ||
1304 | 184 | similar laws prohibiting or restricting circumvention of such | ||
1305 | 185 | measures. | ||
1306 | 186 | |||
1307 | 187 | When you convey a covered work, you waive any legal power to forbid | ||
1308 | 188 | circumvention of technological measures to the extent such circumvention | ||
1309 | 189 | is effected by exercising rights under this License with respect to | ||
1310 | 190 | the covered work, and you disclaim any intention to limit operation or | ||
1311 | 191 | modification of the work as a means of enforcing, against the work's | ||
1312 | 192 | users, your or third parties' legal rights to forbid circumvention of | ||
1313 | 193 | technological measures. | ||
1314 | 194 | |||
1315 | 195 | 4. Conveying Verbatim Copies. | ||
1316 | 196 | |||
1317 | 197 | You may convey verbatim copies of the Program's source code as you | ||
1318 | 198 | receive it, in any medium, provided that you conspicuously and | ||
1319 | 199 | appropriately publish on each copy an appropriate copyright notice; | ||
1320 | 200 | keep intact all notices stating that this License and any | ||
1321 | 201 | non-permissive terms added in accord with section 7 apply to the code; | ||
1322 | 202 | keep intact all notices of the absence of any warranty; and give all | ||
1323 | 203 | recipients a copy of this License along with the Program. | ||
1324 | 204 | |||
1325 | 205 | You may charge any price or no price for each copy that you convey, | ||
1326 | 206 | and you may offer support or warranty protection for a fee. | ||
1327 | 207 | |||
1328 | 208 | 5. Conveying Modified Source Versions. | ||
1329 | 209 | |||
1330 | 210 | You may convey a work based on the Program, or the modifications to | ||
1331 | 211 | produce it from the Program, in the form of source code under the | ||
1332 | 212 | terms of section 4, provided that you also meet all of these conditions: | ||
1333 | 213 | |||
1334 | 214 | a) The work must carry prominent notices stating that you modified | ||
1335 | 215 | it, and giving a relevant date. | ||
1336 | 216 | |||
1337 | 217 | b) The work must carry prominent notices stating that it is | ||
1338 | 218 | released under this License and any conditions added under section | ||
1339 | 219 | 7. This requirement modifies the requirement in section 4 to | ||
1340 | 220 | "keep intact all notices". | ||
1341 | 221 | |||
1342 | 222 | c) You must license the entire work, as a whole, under this | ||
1343 | 223 | License to anyone who comes into possession of a copy. This | ||
1344 | 224 | License will therefore apply, along with any applicable section 7 | ||
1345 | 225 | additional terms, to the whole of the work, and all its parts, | ||
1346 | 226 | regardless of how they are packaged. This License gives no | ||
1347 | 227 | permission to license the work in any other way, but it does not | ||
1348 | 228 | invalidate such permission if you have separately received it. | ||
1349 | 229 | |||
1350 | 230 | d) If the work has interactive user interfaces, each must display | ||
1351 | 231 | Appropriate Legal Notices; however, if the Program has interactive | ||
1352 | 232 | interfaces that do not display Appropriate Legal Notices, your | ||
1353 | 233 | work need not make them do so. | ||
1354 | 234 | |||
1355 | 235 | A compilation of a covered work with other separate and independent | ||
1356 | 236 | works, which are not by their nature extensions of the covered work, | ||
1357 | 237 | and which are not combined with it such as to form a larger program, | ||
1358 | 238 | in or on a volume of a storage or distribution medium, is called an | ||
1359 | 239 | "aggregate" if the compilation and its resulting copyright are not | ||
1360 | 240 | used to limit the access or legal rights of the compilation's users | ||
1361 | 241 | beyond what the individual works permit. Inclusion of a covered work | ||
1362 | 242 | in an aggregate does not cause this License to apply to the other | ||
1363 | 243 | parts of the aggregate. | ||
1364 | 244 | |||
1365 | 245 | 6. Conveying Non-Source Forms. | ||
1366 | 246 | |||
1367 | 247 | You may convey a covered work in object code form under the terms | ||
1368 | 248 | of sections 4 and 5, provided that you also convey the | ||
1369 | 249 | machine-readable Corresponding Source under the terms of this License, | ||
1370 | 250 | in one of these ways: | ||
1371 | 251 | |||
1372 | 252 | a) Convey the object code in, or embodied in, a physical product | ||
1373 | 253 | (including a physical distribution medium), accompanied by the | ||
1374 | 254 | Corresponding Source fixed on a durable physical medium | ||
1375 | 255 | customarily used for software interchange. | ||
1376 | 256 | |||
1377 | 257 | b) Convey the object code in, or embodied in, a physical product | ||
1378 | 258 | (including a physical distribution medium), accompanied by a | ||
1379 | 259 | written offer, valid for at least three years and valid for as | ||
1380 | 260 | long as you offer spare parts or customer support for that product | ||
1381 | 261 | model, to give anyone who possesses the object code either (1) a | ||
1382 | 262 | copy of the Corresponding Source for all the software in the | ||
1383 | 263 | product that is covered by this License, on a durable physical | ||
1384 | 264 | medium customarily used for software interchange, for a price no | ||
1385 | 265 | more than your reasonable cost of physically performing this | ||
1386 | 266 | conveying of source, or (2) access to copy the | ||
1387 | 267 | Corresponding Source from a network server at no charge. | ||
1388 | 268 | |||
1389 | 269 | c) Convey individual copies of the object code with a copy of the | ||
1390 | 270 | written offer to provide the Corresponding Source. This | ||
1391 | 271 | alternative is allowed only occasionally and noncommercially, and | ||
1392 | 272 | only if you received the object code with such an offer, in accord | ||
1393 | 273 | with subsection 6b. | ||
1394 | 274 | |||
1395 | 275 | d) Convey the object code by offering access from a designated | ||
1396 | 276 | place (gratis or for a charge), and offer equivalent access to the | ||
1397 | 277 | Corresponding Source in the same way through the same place at no | ||
1398 | 278 | further charge. You need not require recipients to copy the | ||
1399 | 279 | Corresponding Source along with the object code. If the place to | ||
1400 | 280 | copy the object code is a network server, the Corresponding Source | ||
1401 | 281 | may be on a different server (operated by you or a third party) | ||
1402 | 282 | that supports equivalent copying facilities, provided you maintain | ||
1403 | 283 | clear directions next to the object code saying where to find the | ||
1404 | 284 | Corresponding Source. Regardless of what server hosts the | ||
1405 | 285 | Corresponding Source, you remain obligated to ensure that it is | ||
1406 | 286 | available for as long as needed to satisfy these requirements. | ||
1407 | 287 | |||
1408 | 288 | e) Convey the object code using peer-to-peer transmission, provided | ||
1409 | 289 | you inform other peers where the object code and Corresponding | ||
1410 | 290 | Source of the work are being offered to the general public at no | ||
1411 | 291 | charge under subsection 6d. | ||
1412 | 292 | |||
1413 | 293 | A separable portion of the object code, whose source code is excluded | ||
1414 | 294 | from the Corresponding Source as a System Library, need not be | ||
1415 | 295 | included in conveying the object code work. | ||
1416 | 296 | |||
1417 | 297 | A "User Product" is either (1) a "consumer product", which means any | ||
1418 | 298 | tangible personal property which is normally used for personal, family, | ||
1419 | 299 | or household purposes, or (2) anything designed or sold for incorporation | ||
1420 | 300 | into a dwelling. In determining whether a product is a consumer product, | ||
1421 | 301 | doubtful cases shall be resolved in favor of coverage. For a particular | ||
1422 | 302 | product received by a particular user, "normally used" refers to a | ||
1423 | 303 | typical or common use of that class of product, regardless of the status | ||
1424 | 304 | of the particular user or of the way in which the particular user | ||
1425 | 305 | actually uses, or expects or is expected to use, the product. A product | ||
1426 | 306 | is a consumer product regardless of whether the product has substantial | ||
1427 | 307 | commercial, industrial or non-consumer uses, unless such uses represent | ||
1428 | 308 | the only significant mode of use of the product. | ||
1429 | 309 | |||
1430 | 310 | "Installation Information" for a User Product means any methods, | ||
1431 | 311 | procedures, authorization keys, or other information required to install | ||
1432 | 312 | and execute modified versions of a covered work in that User Product from | ||
1433 | 313 | a modified version of its Corresponding Source. The information must | ||
1434 | 314 | suffice to ensure that the continued functioning of the modified object | ||
1435 | 315 | code is in no case prevented or interfered with solely because | ||
1436 | 316 | modification has been made. | ||
1437 | 317 | |||
1438 | 318 | If you convey an object code work under this section in, or with, or | ||
1439 | 319 | specifically for use in, a User Product, and the conveying occurs as | ||
1440 | 320 | part of a transaction in which the right of possession and use of the | ||
1441 | 321 | User Product is transferred to the recipient in perpetuity or for a | ||
1442 | 322 | fixed term (regardless of how the transaction is characterized), the | ||
1443 | 323 | Corresponding Source conveyed under this section must be accompanied | ||
1444 | 324 | by the Installation Information. But this requirement does not apply | ||
1445 | 325 | if neither you nor any third party retains the ability to install | ||
1446 | 326 | modified object code on the User Product (for example, the work has | ||
1447 | 327 | been installed in ROM). | ||
1448 | 328 | |||
1449 | 329 | The requirement to provide Installation Information does not include a | ||
1450 | 330 | requirement to continue to provide support service, warranty, or updates | ||
1451 | 331 | for a work that has been modified or installed by the recipient, or for | ||
1452 | 332 | the User Product in which it has been modified or installed. Access to a | ||
1453 | 333 | network may be denied when the modification itself materially and | ||
1454 | 334 | adversely affects the operation of the network or violates the rules and | ||
1455 | 335 | protocols for communication across the network. | ||
1456 | 336 | |||
1457 | 337 | Corresponding Source conveyed, and Installation Information provided, | ||
1458 | 338 | in accord with this section must be in a format that is publicly | ||
1459 | 339 | documented (and with an implementation available to the public in | ||
1460 | 340 | source code form), and must require no special password or key for | ||
1461 | 341 | unpacking, reading or copying. | ||
1462 | 342 | |||
1463 | 343 | 7. Additional Terms. | ||
1464 | 344 | |||
1465 | 345 | "Additional permissions" are terms that supplement the terms of this | ||
1466 | 346 | License by making exceptions from one or more of its conditions. | ||
1467 | 347 | Additional permissions that are applicable to the entire Program shall | ||
1468 | 348 | be treated as though they were included in this License, to the extent | ||
1469 | 349 | that they are valid under applicable law. If additional permissions | ||
1470 | 350 | apply only to part of the Program, that part may be used separately | ||
1471 | 351 | under those permissions, but the entire Program remains governed by | ||
1472 | 352 | this License without regard to the additional permissions. | ||
1473 | 353 | |||
1474 | 354 | When you convey a copy of a covered work, you may at your option | ||
1475 | 355 | remove any additional permissions from that copy, or from any part of | ||
1476 | 356 | it. (Additional permissions may be written to require their own | ||
1477 | 357 | removal in certain cases when you modify the work.) You may place | ||
1478 | 358 | additional permissions on material, added by you to a covered work, | ||
1479 | 359 | for which you have or can give appropriate copyright permission. | ||
1480 | 360 | |||
1481 | 361 | Notwithstanding any other provision of this License, for material you | ||
1482 | 362 | add to a covered work, you may (if authorized by the copyright holders of | ||
1483 | 363 | that material) supplement the terms of this License with terms: | ||
1484 | 364 | |||
1485 | 365 | a) Disclaiming warranty or limiting liability differently from the | ||
1486 | 366 | terms of sections 15 and 16 of this License; or | ||
1487 | 367 | |||
1488 | 368 | b) Requiring preservation of specified reasonable legal notices or | ||
1489 | 369 | author attributions in that material or in the Appropriate Legal | ||
1490 | 370 | Notices displayed by works containing it; or | ||
1491 | 371 | |||
1492 | 372 | c) Prohibiting misrepresentation of the origin of that material, or | ||
1493 | 373 | requiring that modified versions of such material be marked in | ||
1494 | 374 | reasonable ways as different from the original version; or | ||
1495 | 375 | |||
1496 | 376 | d) Limiting the use for publicity purposes of names of licensors or | ||
1497 | 377 | authors of the material; or | ||
1498 | 378 | |||
1499 | 379 | e) Declining to grant rights under trademark law for use of some | ||
1500 | 380 | trade names, trademarks, or service marks; or | ||
1501 | 381 | |||
1502 | 382 | f) Requiring indemnification of licensors and authors of that | ||
1503 | 383 | material by anyone who conveys the material (or modified versions of | ||
1504 | 384 | it) with contractual assumptions of liability to the recipient, for | ||
1505 | 385 | any liability that these contractual assumptions directly impose on | ||
1506 | 386 | those licensors and authors. | ||
1507 | 387 | |||
1508 | 388 | All other non-permissive additional terms are considered "further | ||
1509 | 389 | restrictions" within the meaning of section 10. If the Program as you | ||
1510 | 390 | received it, or any part of it, contains a notice stating that it is | ||
1511 | 391 | governed by this License along with a term that is a further | ||
1512 | 392 | restriction, you may remove that term. If a license document contains | ||
1513 | 393 | a further restriction but permits relicensing or conveying under this | ||
1514 | 394 | License, you may add to a covered work material governed by the terms | ||
1515 | 395 | of that license document, provided that the further restriction does | ||
1516 | 396 | not survive such relicensing or conveying. | ||
1517 | 397 | |||
1518 | 398 | If you add terms to a covered work in accord with this section, you | ||
1519 | 399 | must place, in the relevant source files, a statement of the | ||
1520 | 400 | additional terms that apply to those files, or a notice indicating | ||
1521 | 401 | where to find the applicable terms. | ||
1522 | 402 | |||
1523 | 403 | Additional terms, permissive or non-permissive, may be stated in the | ||
1524 | 404 | form of a separately written license, or stated as exceptions; | ||
1525 | 405 | the above requirements apply either way. | ||
1526 | 406 | |||
1527 | 407 | 8. Termination. | ||
1528 | 408 | |||
1529 | 409 | You may not propagate or modify a covered work except as expressly | ||
1530 | 410 | provided under this License. Any attempt otherwise to propagate or | ||
1531 | 411 | modify it is void, and will automatically terminate your rights under | ||
1532 | 412 | this License (including any patent licenses granted under the third | ||
1533 | 413 | paragraph of section 11). | ||
1534 | 414 | |||
1535 | 415 | However, if you cease all violation of this License, then your | ||
1536 | 416 | license from a particular copyright holder is reinstated (a) | ||
1537 | 417 | provisionally, unless and until the copyright holder explicitly and | ||
1538 | 418 | finally terminates your license, and (b) permanently, if the copyright | ||
1539 | 419 | holder fails to notify you of the violation by some reasonable means | ||
1540 | 420 | prior to 60 days after the cessation. | ||
1541 | 421 | |||
1542 | 422 | Moreover, your license from a particular copyright holder is | ||
1543 | 423 | reinstated permanently if the copyright holder notifies you of the | ||
1544 | 424 | violation by some reasonable means, this is the first time you have | ||
1545 | 425 | received notice of violation of this License (for any work) from that | ||
1546 | 426 | copyright holder, and you cure the violation prior to 30 days after | ||
1547 | 427 | your receipt of the notice. | ||
1548 | 428 | |||
1549 | 429 | Termination of your rights under this section does not terminate the | ||
1550 | 430 | licenses of parties who have received copies or rights from you under | ||
1551 | 431 | this License. If your rights have been terminated and not permanently | ||
1552 | 432 | reinstated, you do not qualify to receive new licenses for the same | ||
1553 | 433 | material under section 10. | ||
1554 | 434 | |||
1555 | 435 | 9. Acceptance Not Required for Having Copies. | ||
1556 | 436 | |||
1557 | 437 | You are not required to accept this License in order to receive or | ||
1558 | 438 | run a copy of the Program. Ancillary propagation of a covered work | ||
1559 | 439 | occurring solely as a consequence of using peer-to-peer transmission | ||
1560 | 440 | to receive a copy likewise does not require acceptance. However, | ||
1561 | 441 | nothing other than this License grants you permission to propagate or | ||
1562 | 442 | modify any covered work. These actions infringe copyright if you do | ||
1563 | 443 | not accept this License. Therefore, by modifying or propagating a | ||
1564 | 444 | covered work, you indicate your acceptance of this License to do so. | ||
1565 | 445 | |||
1566 | 446 | 10. Automatic Licensing of Downstream Recipients. | ||
1567 | 447 | |||
1568 | 448 | Each time you convey a covered work, the recipient automatically | ||
1569 | 449 | receives a license from the original licensors, to run, modify and | ||
1570 | 450 | propagate that work, subject to this License. You are not responsible | ||
1571 | 451 | for enforcing compliance by third parties with this License. | ||
1572 | 452 | |||
1573 | 453 | An "entity transaction" is a transaction transferring control of an | ||
1574 | 454 | organization, or substantially all assets of one, or subdividing an | ||
1575 | 455 | organization, or merging organizations. If propagation of a covered | ||
1576 | 456 | work results from an entity transaction, each party to that | ||
1577 | 457 | transaction who receives a copy of the work also receives whatever | ||
1578 | 458 | licenses to the work the party's predecessor in interest had or could | ||
1579 | 459 | give under the previous paragraph, plus a right to possession of the | ||
1580 | 460 | Corresponding Source of the work from the predecessor in interest, if | ||
1581 | 461 | the predecessor has it or can get it with reasonable efforts. | ||
1582 | 462 | |||
1583 | 463 | You may not impose any further restrictions on the exercise of the | ||
1584 | 464 | rights granted or affirmed under this License. For example, you may | ||
1585 | 465 | not impose a license fee, royalty, or other charge for exercise of | ||
1586 | 466 | rights granted under this License, and you may not initiate litigation | ||
1587 | 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that | ||
1588 | 468 | any patent claim is infringed by making, using, selling, offering for | ||
1589 | 469 | sale, or importing the Program or any portion of it. | ||
1590 | 470 | |||
1591 | 471 | 11. Patents. | ||
1592 | 472 | |||
1593 | 473 | A "contributor" is a copyright holder who authorizes use under this | ||
1594 | 474 | License of the Program or a work on which the Program is based. The | ||
1595 | 475 | work thus licensed is called the contributor's "contributor version". | ||
1596 | 476 | |||
1597 | 477 | A contributor's "essential patent claims" are all patent claims | ||
1598 | 478 | owned or controlled by the contributor, whether already acquired or | ||
1599 | 479 | hereafter acquired, that would be infringed by some manner, permitted | ||
1600 | 480 | by this License, of making, using, or selling its contributor version, | ||
1601 | 481 | but do not include claims that would be infringed only as a | ||
1602 | 482 | consequence of further modification of the contributor version. For | ||
1603 | 483 | purposes of this definition, "control" includes the right to grant | ||
1604 | 484 | patent sublicenses in a manner consistent with the requirements of | ||
1605 | 485 | this License. | ||
1606 | 486 | |||
1607 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free | ||
1608 | 488 | patent license under the contributor's essential patent claims, to | ||
1609 | 489 | make, use, sell, offer for sale, import and otherwise run, modify and | ||
1610 | 490 | propagate the contents of its contributor version. | ||
1611 | 491 | |||
1612 | 492 | In the following three paragraphs, a "patent license" is any express | ||
1613 | 493 | agreement or commitment, however denominated, not to enforce a patent | ||
1614 | 494 | (such as an express permission to practice a patent or covenant not to | ||
1615 | 495 | sue for patent infringement). To "grant" such a patent license to a | ||
1616 | 496 | party means to make such an agreement or commitment not to enforce a | ||
1617 | 497 | patent against the party. | ||
1618 | 498 | |||
1619 | 499 | If you convey a covered work, knowingly relying on a patent license, | ||
1620 | 500 | and the Corresponding Source of the work is not available for anyone | ||
1621 | 501 | to copy, free of charge and under the terms of this License, through a | ||
1622 | 502 | publicly available network server or other readily accessible means, | ||
1623 | 503 | then you must either (1) cause the Corresponding Source to be so | ||
1624 | 504 | available, or (2) arrange to deprive yourself of the benefit of the | ||
1625 | 505 | patent license for this particular work, or (3) arrange, in a manner | ||
1626 | 506 | consistent with the requirements of this License, to extend the patent | ||
1627 | 507 | license to downstream recipients. "Knowingly relying" means you have | ||
1628 | 508 | actual knowledge that, but for the patent license, your conveying the | ||
1629 | 509 | covered work in a country, or your recipient's use of the covered work | ||
1630 | 510 | in a country, would infringe one or more identifiable patents in that | ||
1631 | 511 | country that you have reason to believe are valid. | ||
1632 | 512 | |||
1633 | 513 | If, pursuant to or in connection with a single transaction or | ||
1634 | 514 | arrangement, you convey, or propagate by procuring conveyance of, a | ||
1635 | 515 | covered work, and grant a patent license to some of the parties | ||
1636 | 516 | receiving the covered work authorizing them to use, propagate, modify | ||
1637 | 517 | or convey a specific copy of the covered work, then the patent license | ||
1638 | 518 | you grant is automatically extended to all recipients of the covered | ||
1639 | 519 | work and works based on it. | ||
1640 | 520 | |||
1641 | 521 | A patent license is "discriminatory" if it does not include within | ||
1642 | 522 | the scope of its coverage, prohibits the exercise of, or is | ||
1643 | 523 | conditioned on the non-exercise of one or more of the rights that are | ||
1644 | 524 | specifically granted under this License. You may not convey a covered | ||
1645 | 525 | work if you are a party to an arrangement with a third party that is | ||
1646 | 526 | in the business of distributing software, under which you make payment | ||
1647 | 527 | to the third party based on the extent of your activity of conveying | ||
1648 | 528 | the work, and under which the third party grants, to any of the | ||
1649 | 529 | parties who would receive the covered work from you, a discriminatory | ||
1650 | 530 | patent license (a) in connection with copies of the covered work | ||
1651 | 531 | conveyed by you (or copies made from those copies), or (b) primarily | ||
1652 | 532 | for and in connection with specific products or compilations that | ||
1653 | 533 | contain the covered work, unless you entered into that arrangement, | ||
1654 | 534 | or that patent license was granted, prior to 28 March 2007. | ||
1655 | 535 | |||
1656 | 536 | Nothing in this License shall be construed as excluding or limiting | ||
1657 | 537 | any implied license or other defenses to infringement that may | ||
1658 | 538 | otherwise be available to you under applicable patent law. | ||
1659 | 539 | |||
1660 | 540 | 12. No Surrender of Others' Freedom. | ||
1661 | 541 | |||
1662 | 542 | If conditions are imposed on you (whether by court order, agreement or | ||
1663 | 543 | otherwise) that contradict the conditions of this License, they do not | ||
1664 | 544 | excuse you from the conditions of this License. If you cannot convey a | ||
1665 | 545 | covered work so as to satisfy simultaneously your obligations under this | ||
1666 | 546 | License and any other pertinent obligations, then as a consequence you may | ||
1667 | 547 | not convey it at all. For example, if you agree to terms that obligate you | ||
1668 | 548 | to collect a royalty for further conveying from those to whom you convey | ||
1669 | 549 | the Program, the only way you could satisfy both those terms and this | ||
1670 | 550 | License would be to refrain entirely from conveying the Program. | ||
1671 | 551 | |||
1672 | 552 | 13. Use with the GNU Affero General Public License. | ||
1673 | 553 | |||
1674 | 554 | Notwithstanding any other provision of this License, you have | ||
1675 | 555 | permission to link or combine any covered work with a work licensed | ||
1676 | 556 | under version 3 of the GNU Affero General Public License into a single | ||
1677 | 557 | combined work, and to convey the resulting work. The terms of this | ||
1678 | 558 | License will continue to apply to the part which is the covered work, | ||
1679 | 559 | but the special requirements of the GNU Affero General Public License, | ||
1680 | 560 | section 13, concerning interaction through a network will apply to the | ||
1681 | 561 | combination as such. | ||
1682 | 562 | |||
1683 | 563 | 14. Revised Versions of this License. | ||
1684 | 564 | |||
1685 | 565 | The Free Software Foundation may publish revised and/or new versions of | ||
1686 | 566 | the GNU General Public License from time to time. Such new versions will | ||
1687 | 567 | be similar in spirit to the present version, but may differ in detail to | ||
1688 | 568 | address new problems or concerns. | ||
1689 | 569 | |||
1690 | 570 | Each version is given a distinguishing version number. If the | ||
1691 | 571 | Program specifies that a certain numbered version of the GNU General | ||
1692 | 572 | Public License "or any later version" applies to it, you have the | ||
1693 | 573 | option of following the terms and conditions either of that numbered | ||
1694 | 574 | version or of any later version published by the Free Software | ||
1695 | 575 | Foundation. If the Program does not specify a version number of the | ||
1696 | 576 | GNU General Public License, you may choose any version ever published | ||
1697 | 577 | by the Free Software Foundation. | ||
1698 | 578 | |||
1699 | 579 | If the Program specifies that a proxy can decide which future | ||
1700 | 580 | versions of the GNU General Public License can be used, that proxy's | ||
1701 | 581 | public statement of acceptance of a version permanently authorizes you | ||
1702 | 582 | to choose that version for the Program. | ||
1703 | 583 | |||
1704 | 584 | Later license versions may give you additional or different | ||
1705 | 585 | permissions. However, no additional obligations are imposed on any | ||
1706 | 586 | author or copyright holder as a result of your choosing to follow a | ||
1707 | 587 | later version. | ||
1708 | 588 | |||
1709 | 589 | 15. Disclaimer of Warranty. | ||
1710 | 590 | |||
1711 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY | ||
1712 | 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT | ||
1713 | 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY | ||
1714 | 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, | ||
1715 | 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
1716 | 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM | ||
1717 | 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF | ||
1718 | 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. | ||
1719 | 599 | |||
1720 | 600 | 16. Limitation of Liability. | ||
1721 | 601 | |||
1722 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | ||
1723 | 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS | ||
1724 | 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY | ||
1725 | 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE | ||
1726 | 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF | ||
1727 | 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD | ||
1728 | 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), | ||
1729 | 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF | ||
1730 | 610 | SUCH DAMAGES. | ||
1731 | 611 | |||
1732 | 612 | 17. Interpretation of Sections 15 and 16. | ||
1733 | 613 | |||
1734 | 614 | If the disclaimer of warranty and limitation of liability provided | ||
1735 | 615 | above cannot be given local legal effect according to their terms, | ||
1736 | 616 | reviewing courts shall apply local law that most closely approximates | ||
1737 | 617 | an absolute waiver of all civil liability in connection with the | ||
1738 | 618 | Program, unless a warranty or assumption of liability accompanies a | ||
1739 | 619 | copy of the Program in return for a fee. | ||
1740 | 620 | |||
1741 | 621 | END OF TERMS AND CONDITIONS | ||
1742 | 622 | |||
1743 | 623 | How to Apply These Terms to Your New Programs | ||
1744 | 624 | |||
1745 | 625 | If you develop a new program, and you want it to be of the greatest | ||
1746 | 626 | possible use to the public, the best way to achieve this is to make it | ||
1747 | 627 | free software which everyone can redistribute and change under these terms. | ||
1748 | 628 | |||
1749 | 629 | To do so, attach the following notices to the program. It is safest | ||
1750 | 630 | to attach them to the start of each source file to most effectively | ||
1751 | 631 | state the exclusion of warranty; and each file should have at least | ||
1752 | 632 | the "copyright" line and a pointer to where the full notice is found. | ||
1753 | 633 | |||
1754 | 634 | <one line to give the program's name and a brief idea of what it does.> | ||
1755 | 635 | Copyright (C) <year> <name of author> | ||
1756 | 636 | |||
1757 | 637 | This program is free software: you can redistribute it and/or modify | ||
1758 | 638 | it under the terms of the GNU General Public License as published by | ||
1759 | 639 | the Free Software Foundation, either version 3 of the License, or | ||
1760 | 640 | (at your option) any later version. | ||
1761 | 641 | |||
1762 | 642 | This program is distributed in the hope that it will be useful, | ||
1763 | 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1764 | 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1765 | 645 | GNU General Public License for more details. | ||
1766 | 646 | |||
1767 | 647 | You should have received a copy of the GNU General Public License | ||
1768 | 648 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1769 | 649 | |||
1770 | 650 | Also add information on how to contact you by electronic and paper mail. | ||
1771 | 651 | |||
1772 | 652 | If the program does terminal interaction, make it output a short | ||
1773 | 653 | notice like this when it starts in an interactive mode: | ||
1774 | 654 | |||
1775 | 655 | <program> Copyright (C) <year> <name of author> | ||
1776 | 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. | ||
1777 | 657 | This is free software, and you are welcome to redistribute it | ||
1778 | 658 | under certain conditions; type `show c' for details. | ||
1779 | 659 | |||
1780 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate | ||
1781 | 661 | parts of the General Public License. Of course, your program's commands | ||
1782 | 662 | might be different; for a GUI interface, you would use an "about box". | ||
1783 | 663 | |||
1784 | 664 | You should also get your employer (if you work as a programmer) or school, | ||
1785 | 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. | ||
1786 | 666 | For more information on this, and how to apply and follow the GNU GPL, see | ||
1787 | 667 | <http://www.gnu.org/licenses/>. | ||
1788 | 668 | |||
1789 | 669 | The GNU General Public License does not permit incorporating your program | ||
1790 | 670 | into proprietary programs. If your program is a subroutine library, you | ||
1791 | 671 | may consider it more useful to permit linking proprietary applications with | ||
1792 | 672 | the library. If this is what you want to do, use the GNU Lesser General | ||
1793 | 673 | Public License instead of this License. But first, please read | ||
1794 | 674 | <http://www.gnu.org/philosophy/why-not-lgpl.html>. | ||
1795 | diff --git a/Makefile b/Makefile | |||
1796 | index 5d35dcc..5940ed7 100644 | |||
1797 | --- a/Makefile | |||
1798 | +++ b/Makefile | |||
1799 | @@ -27,13 +27,16 @@ ifeq ($(distro),) | |||
1800 | 27 | distro = redhat | 27 | distro = redhat |
1801 | 28 | endif | 28 | endif |
1802 | 29 | 29 | ||
1804 | 30 | READ_VERSION=$(shell $(PYVER) $(CWD)/tools/read-version) | 30 | READ_VERSION=$(shell $(PYVER) $(CWD)/tools/read-version || \ |
1805 | 31 | echo read-version-failed) | ||
1806 | 31 | CODE_VERSION=$(shell $(PYVER) -c "from cloudinit import version; print(version.version_string())") | 32 | CODE_VERSION=$(shell $(PYVER) -c "from cloudinit import version; print(version.version_string())") |
1807 | 32 | 33 | ||
1808 | 33 | 34 | ||
1809 | 34 | all: check | 35 | all: check |
1810 | 35 | 36 | ||
1812 | 36 | check: check_version pep8 $(pyflakes) test $(yaml) | 37 | check: check_version test $(yaml) |
1813 | 38 | |||
1814 | 39 | style-check: pep8 $(pyflakes) | ||
1815 | 37 | 40 | ||
1816 | 38 | pep8: | 41 | pep8: |
1817 | 39 | @$(CWD)/tools/run-pep8 | 42 | @$(CWD)/tools/run-pep8 |
1818 | @@ -62,8 +65,8 @@ test: $(unittests) | |||
1819 | 62 | 65 | ||
1820 | 63 | check_version: | 66 | check_version: |
1821 | 64 | @if [ "$(READ_VERSION)" != "$(CODE_VERSION)" ]; then \ | 67 | @if [ "$(READ_VERSION)" != "$(CODE_VERSION)" ]; then \ |
1824 | 65 | echo "Error: read-version version $(READ_VERSION)" \ | 68 | echo "Error: read-version version '$(READ_VERSION)'" \ |
1825 | 66 | "not equal to code version $(CODE_VERSION)"; exit 2; \ | 69 | "not equal to code version '$(CODE_VERSION)'"; exit 2; \ |
1826 | 67 | else true; fi | 70 | else true; fi |
1827 | 68 | 71 | ||
1828 | 69 | clean_pyc: | 72 | clean_pyc: |
1829 | @@ -73,7 +76,7 @@ clean: clean_pyc | |||
1830 | 73 | rm -rf /var/log/cloud-init.log /var/lib/cloud/ | 76 | rm -rf /var/log/cloud-init.log /var/lib/cloud/ |
1831 | 74 | 77 | ||
1832 | 75 | yaml: | 78 | yaml: |
1834 | 76 | @$(CWD)/tools/validate-yaml.py $(YAML_FILES) | 79 | @$(PYVER) $(CWD)/tools/validate-yaml.py $(YAML_FILES) |
1835 | 77 | 80 | ||
1836 | 78 | rpm: | 81 | rpm: |
1837 | 79 | ./packages/brpm --distro $(distro) | 82 | ./packages/brpm --distro $(distro) |
1838 | @@ -83,3 +86,4 @@ deb: | |||
1839 | 83 | 86 | ||
1840 | 84 | .PHONY: test pyflakes pyflakes3 clean pep8 rpm deb yaml check_version | 87 | .PHONY: test pyflakes pyflakes3 clean pep8 rpm deb yaml check_version |
1841 | 85 | .PHONY: pip-test-requirements pip-requirements clean_pyc unittest unittest3 | 88 | .PHONY: pip-test-requirements pip-requirements clean_pyc unittest unittest3 |
1842 | 89 | .PHONY: style-check | ||
1843 | diff --git a/cloudinit/__init__.py b/cloudinit/__init__.py | |||
1844 | index da12464..e69de29 100644 | |||
1845 | --- a/cloudinit/__init__.py | |||
1846 | +++ b/cloudinit/__init__.py | |||
1847 | @@ -1,21 +0,0 @@ | |||
1848 | 1 | # vi: ts=4 expandtab | ||
1849 | 2 | # | ||
1850 | 3 | # Copyright (C) 2012 Canonical Ltd. | ||
1851 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
1852 | 5 | # Copyright (C) 2012 Yahoo! Inc. | ||
1853 | 6 | # | ||
1854 | 7 | # Author: Scott Moser <scott.moser@canonical.com> | ||
1855 | 8 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
1856 | 9 | # Author: Joshua Harlow <harlowja@yahoo-inc.com> | ||
1857 | 10 | # | ||
1858 | 11 | # This program is free software: you can redistribute it and/or modify | ||
1859 | 12 | # it under the terms of the GNU General Public License version 3, as | ||
1860 | 13 | # published by the Free Software Foundation. | ||
1861 | 14 | # | ||
1862 | 15 | # This program is distributed in the hope that it will be useful, | ||
1863 | 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1864 | 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1865 | 18 | # GNU General Public License for more details. | ||
1866 | 19 | # | ||
1867 | 20 | # You should have received a copy of the GNU General Public License | ||
1868 | 21 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1869 | diff --git a/cloudinit/atomic_helper.py b/cloudinit/atomic_helper.py | |||
1870 | index a3cfd94..fb2df8d 100644 | |||
1871 | --- a/cloudinit/atomic_helper.py | |||
1872 | +++ b/cloudinit/atomic_helper.py | |||
1873 | @@ -1,5 +1,4 @@ | |||
1876 | 1 | #!/usr/bin/python | 1 | # This file is part of cloud-init. See LICENSE file for license information. |
1875 | 2 | # vi: ts=4 expandtab | ||
1877 | 3 | 2 | ||
1878 | 4 | import json | 3 | import json |
1879 | 5 | import os | 4 | import os |
1880 | @@ -29,3 +28,5 @@ def write_json(filename, data, mode=_DEF_PERMS): | |||
1881 | 29 | return write_file( | 28 | return write_file( |
1882 | 30 | filename, json.dumps(data, indent=1, sort_keys=True) + "\n", | 29 | filename, json.dumps(data, indent=1, sort_keys=True) + "\n", |
1883 | 31 | omode="w", mode=mode) | 30 | omode="w", mode=mode) |
1884 | 31 | |||
1885 | 32 | # vi: ts=4 expandtab | ||
1886 | diff --git a/cloudinit/cloud.py b/cloudinit/cloud.py | |||
1887 | index 3e6be20..b93a42e 100644 | |||
1888 | --- a/cloudinit/cloud.py | |||
1889 | +++ b/cloudinit/cloud.py | |||
1890 | @@ -1,24 +1,8 @@ | |||
1904 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2012 Canonical Ltd. |
1905 | 2 | # | 2 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
1906 | 3 | # Copyright (C) 2012 Canonical Ltd. | 3 | # Copyright (C) 2012 Yahoo! Inc. |
1894 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
1895 | 5 | # Copyright (C) 2012 Yahoo! Inc. | ||
1896 | 6 | # | ||
1897 | 7 | # Author: Scott Moser <scott.moser@canonical.com> | ||
1898 | 8 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
1899 | 9 | # Author: Joshua Harlow <harlowja@yahoo-inc.com> | ||
1900 | 10 | # | ||
1901 | 11 | # This program is free software: you can redistribute it and/or modify | ||
1902 | 12 | # it under the terms of the GNU General Public License version 3, as | ||
1903 | 13 | # published by the Free Software Foundation. | ||
1907 | 14 | # | 4 | # |
1915 | 15 | # This program is distributed in the hope that it will be useful, | 5 | # This file is part of cloud-init. See LICENSE file for license information. |
1909 | 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1910 | 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1911 | 18 | # GNU General Public License for more details. | ||
1912 | 19 | # | ||
1913 | 20 | # You should have received a copy of the GNU General Public License | ||
1914 | 21 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1916 | 22 | 6 | ||
1917 | 23 | import copy | 7 | import copy |
1918 | 24 | import os | 8 | import os |
1919 | @@ -107,3 +91,5 @@ class Cloud(object): | |||
1920 | 107 | 91 | ||
1921 | 108 | def get_ipath(self, name=None): | 92 | def get_ipath(self, name=None): |
1922 | 109 | return self.paths.get_ipath(name) | 93 | return self.paths.get_ipath(name) |
1923 | 94 | |||
1924 | 95 | # vi: ts=4 expandtab | ||
1925 | diff --git a/cloudinit/cmd/__init__.py b/cloudinit/cmd/__init__.py | |||
1926 | index da12464..e69de29 100644 | |||
1927 | --- a/cloudinit/cmd/__init__.py | |||
1928 | +++ b/cloudinit/cmd/__init__.py | |||
1929 | @@ -1,21 +0,0 @@ | |||
1930 | 1 | # vi: ts=4 expandtab | ||
1931 | 2 | # | ||
1932 | 3 | # Copyright (C) 2012 Canonical Ltd. | ||
1933 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
1934 | 5 | # Copyright (C) 2012 Yahoo! Inc. | ||
1935 | 6 | # | ||
1936 | 7 | # Author: Scott Moser <scott.moser@canonical.com> | ||
1937 | 8 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
1938 | 9 | # Author: Joshua Harlow <harlowja@yahoo-inc.com> | ||
1939 | 10 | # | ||
1940 | 11 | # This program is free software: you can redistribute it and/or modify | ||
1941 | 12 | # it under the terms of the GNU General Public License version 3, as | ||
1942 | 13 | # published by the Free Software Foundation. | ||
1943 | 14 | # | ||
1944 | 15 | # This program is distributed in the hope that it will be useful, | ||
1945 | 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1946 | 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1947 | 18 | # GNU General Public License for more details. | ||
1948 | 19 | # | ||
1949 | 20 | # You should have received a copy of the GNU General Public License | ||
1950 | 21 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1951 | diff --git a/cloudinit/cmd/main.py b/cloudinit/cmd/main.py | |||
1952 | index 83eb02c..fd22132 100644 | |||
1953 | --- a/cloudinit/cmd/main.py | |||
1954 | +++ b/cloudinit/cmd/main.py | |||
1955 | @@ -1,25 +1,14 @@ | |||
1956 | 1 | #!/usr/bin/python | 1 | #!/usr/bin/python |
1957 | 2 | # vi: ts=4 expandtab | ||
1958 | 3 | # | ||
1959 | 4 | # Copyright (C) 2012 Canonical Ltd. | ||
1960 | 5 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
1961 | 6 | # Copyright (C) 2012 Yahoo! Inc. | ||
1962 | 7 | # | ||
1963 | 8 | # Author: Scott Moser <scott.moser@canonical.com> | ||
1964 | 9 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
1965 | 10 | # Author: Joshua Harlow <harlowja@yahoo-inc.com> | ||
1966 | 11 | # | 2 | # |
1970 | 12 | # This program is free software: you can redistribute it and/or modify | 3 | # Copyright (C) 2012 Canonical Ltd. |
1971 | 13 | # it under the terms of the GNU General Public License version 3, as | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
1972 | 14 | # published by the Free Software Foundation. | 5 | # Copyright (C) 2012 Yahoo! Inc. |
1973 | 15 | # | 6 | # |
1978 | 16 | # This program is distributed in the hope that it will be useful, | 7 | # Author: Scott Moser <scott.moser@canonical.com> |
1979 | 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 8 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
1980 | 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 9 | # Author: Joshua Harlow <harlowja@yahoo-inc.com> |
1977 | 19 | # GNU General Public License for more details. | ||
1981 | 20 | # | 10 | # |
1984 | 21 | # You should have received a copy of the GNU General Public License | 11 | # This file is part of cloud-init. See LICENSE file for license information. |
1983 | 22 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1985 | 23 | 12 | ||
1986 | 24 | import argparse | 13 | import argparse |
1987 | 25 | import json | 14 | import json |
1988 | @@ -37,8 +26,10 @@ from cloudinit import signal_handler | |||
1989 | 37 | from cloudinit import sources | 26 | from cloudinit import sources |
1990 | 38 | from cloudinit import stages | 27 | from cloudinit import stages |
1991 | 39 | from cloudinit import templater | 28 | from cloudinit import templater |
1992 | 29 | from cloudinit import url_helper | ||
1993 | 40 | from cloudinit import util | 30 | from cloudinit import util |
1994 | 41 | from cloudinit import version | 31 | from cloudinit import version |
1995 | 32 | from cloudinit import warnings | ||
1996 | 42 | 33 | ||
1997 | 43 | from cloudinit import reporting | 34 | from cloudinit import reporting |
1998 | 44 | from cloudinit.reporting import events | 35 | from cloudinit.reporting import events |
1999 | @@ -140,23 +131,104 @@ def apply_reporting_cfg(cfg): | |||
2000 | 140 | reporting.update_configuration(cfg.get('reporting')) | 131 | reporting.update_configuration(cfg.get('reporting')) |
2001 | 141 | 132 | ||
2002 | 142 | 133 | ||
2003 | 134 | def parse_cmdline_url(cmdline, names=('cloud-config-url', 'url')): | ||
2004 | 135 | data = util.keyval_str_to_dict(cmdline) | ||
2005 | 136 | for key in names: | ||
2006 | 137 | if key in data: | ||
2007 | 138 | return key, data[key] | ||
2008 | 139 | raise KeyError("No keys (%s) found in string '%s'" % | ||
2009 | 140 | (cmdline, names)) | ||
2010 | 141 | |||
2011 | 142 | |||
2012 | 143 | def attempt_cmdline_url(path, network=True, cmdline=None): | ||
2013 | 144 | """Write data from url referenced in command line to path. | ||
2014 | 145 | |||
2015 | 146 | path: a file to write content to if downloaded. | ||
2016 | 147 | network: should network access be assumed. | ||
2017 | 148 | cmdline: the cmdline to parse for cloud-config-url. | ||
2018 | 149 | |||
2019 | 150 | This is used in MAAS datasource, in "ephemeral" (read-only root) | ||
2020 | 151 | environment where the instance netboots to iscsi ro root. | ||
2021 | 152 | and the entity that controls the pxe config has to configure | ||
2022 | 153 | the maas datasource. | ||
2023 | 154 | |||
2024 | 155 | An attempt is made on network urls even in local datasource | ||
2025 | 156 | for case of network set up in initramfs. | ||
2026 | 157 | |||
2027 | 158 | Return value is a tuple of a logger function (logging.DEBUG) | ||
2028 | 159 | and a message indicating what happened. | ||
2029 | 160 | """ | ||
2030 | 161 | |||
2031 | 162 | if cmdline is None: | ||
2032 | 163 | cmdline = util.get_cmdline() | ||
2033 | 164 | |||
2034 | 165 | try: | ||
2035 | 166 | cmdline_name, url = parse_cmdline_url(cmdline) | ||
2036 | 167 | except KeyError: | ||
2037 | 168 | return (logging.DEBUG, "No kernel command line url found.") | ||
2038 | 169 | |||
2039 | 170 | path_is_local = url.startswith("file://") or url.startswith("/") | ||
2040 | 171 | |||
2041 | 172 | if path_is_local and os.path.exists(path): | ||
2042 | 173 | if network: | ||
2043 | 174 | m = ("file '%s' existed, possibly from local stage download" | ||
2044 | 175 | " of command line url '%s'. Not re-writing." % (path, url)) | ||
2045 | 176 | level = logging.INFO | ||
2046 | 177 | if path_is_local: | ||
2047 | 178 | level = logging.DEBUG | ||
2048 | 179 | else: | ||
2049 | 180 | m = ("file '%s' existed, possibly from previous boot download" | ||
2050 | 181 | " of command line url '%s'. Not re-writing." % (path, url)) | ||
2051 | 182 | level = logging.WARN | ||
2052 | 183 | |||
2053 | 184 | return (level, m) | ||
2054 | 185 | |||
2055 | 186 | kwargs = {'url': url, 'timeout': 10, 'retries': 2} | ||
2056 | 187 | if network or path_is_local: | ||
2057 | 188 | level = logging.WARN | ||
2058 | 189 | kwargs['sec_between'] = 1 | ||
2059 | 190 | else: | ||
2060 | 191 | level = logging.DEBUG | ||
2061 | 192 | kwargs['sec_between'] = .1 | ||
2062 | 193 | |||
2063 | 194 | data = None | ||
2064 | 195 | header = b'#cloud-config' | ||
2065 | 196 | try: | ||
2066 | 197 | resp = util.read_file_or_url(**kwargs) | ||
2067 | 198 | if resp.ok(): | ||
2068 | 199 | data = resp.contents | ||
2069 | 200 | if not resp.contents.startswith(header): | ||
2070 | 201 | if cmdline_name == 'cloud-config-url': | ||
2071 | 202 | level = logging.WARN | ||
2072 | 203 | else: | ||
2073 | 204 | level = logging.INFO | ||
2074 | 205 | return ( | ||
2075 | 206 | level, | ||
2076 | 207 | "contents of '%s' did not start with %s" % (url, header)) | ||
2077 | 208 | else: | ||
2078 | 209 | return (level, | ||
2079 | 210 | "url '%s' returned code %s. Ignoring." % (url, resp.code)) | ||
2080 | 211 | |||
2081 | 212 | except url_helper.UrlError as e: | ||
2082 | 213 | return (level, "retrieving url '%s' failed: %s" % (url, e)) | ||
2083 | 214 | |||
2084 | 215 | util.write_file(path, data, mode=0o600) | ||
2085 | 216 | return (logging.INFO, | ||
2086 | 217 | "wrote cloud-config data from %s='%s' to %s" % | ||
2087 | 218 | (cmdline_name, url, path)) | ||
2088 | 219 | |||
2089 | 220 | |||
2090 | 143 | def main_init(name, args): | 221 | def main_init(name, args): |
2091 | 144 | deps = [sources.DEP_FILESYSTEM, sources.DEP_NETWORK] | 222 | deps = [sources.DEP_FILESYSTEM, sources.DEP_NETWORK] |
2092 | 145 | if args.local: | 223 | if args.local: |
2093 | 146 | deps = [sources.DEP_FILESYSTEM] | 224 | deps = [sources.DEP_FILESYSTEM] |
2094 | 147 | 225 | ||
2107 | 148 | if not args.local: | 226 | early_logs = [] |
2108 | 149 | # See doc/kernel-cmdline.txt | 227 | early_logs.append( |
2109 | 150 | # | 228 | attempt_cmdline_url( |
2110 | 151 | # This is used in maas datasource, in "ephemeral" (read-only root) | 229 | path=os.path.join("%s.d" % CLOUD_CONFIG, |
2111 | 152 | # environment where the instance netboots to iscsi ro root. | 230 | "91_kernel_cmdline_url.cfg"), |
2112 | 153 | # and the entity that controls the pxe config has to configure | 231 | network=not args.local)) |
2101 | 154 | # the maas datasource. | ||
2102 | 155 | # | ||
2103 | 156 | # Could be used elsewhere, only works on network based (not local). | ||
2104 | 157 | root_name = "%s.d" % (CLOUD_CONFIG) | ||
2105 | 158 | target_fn = os.path.join(root_name, "91_kernel_cmdline_url.cfg") | ||
2106 | 159 | util.read_write_cmdline_url(target_fn) | ||
2113 | 160 | 232 | ||
2114 | 161 | # Cloud-init 'init' stage is broken up into the following sub-stages | 233 | # Cloud-init 'init' stage is broken up into the following sub-stages |
2115 | 162 | # 1. Ensure that the init object fetches its config without errors | 234 | # 1. Ensure that the init object fetches its config without errors |
2116 | @@ -182,12 +254,14 @@ def main_init(name, args): | |||
2117 | 182 | outfmt = None | 254 | outfmt = None |
2118 | 183 | errfmt = None | 255 | errfmt = None |
2119 | 184 | try: | 256 | try: |
2121 | 185 | LOG.debug("Closing stdin") | 257 | early_logs.append((logging.DEBUG, "Closing stdin.")) |
2122 | 186 | util.close_stdin() | 258 | util.close_stdin() |
2123 | 187 | (outfmt, errfmt) = util.fixup_output(init.cfg, name) | 259 | (outfmt, errfmt) = util.fixup_output(init.cfg, name) |
2124 | 188 | except Exception: | 260 | except Exception: |
2127 | 189 | util.logexc(LOG, "Failed to setup output redirection!") | 261 | msg = "Failed to setup output redirection!" |
2128 | 190 | print_exc("Failed to setup output redirection!") | 262 | util.logexc(LOG, msg) |
2129 | 263 | print_exc(msg) | ||
2130 | 264 | early_logs.append((logging.WARN, msg)) | ||
2131 | 191 | if args.debug: | 265 | if args.debug: |
2132 | 192 | # Reset so that all the debug handlers are closed out | 266 | # Reset so that all the debug handlers are closed out |
2133 | 193 | LOG.debug(("Logging being reset, this logger may no" | 267 | LOG.debug(("Logging being reset, this logger may no" |
2134 | @@ -201,6 +275,10 @@ def main_init(name, args): | |||
2135 | 201 | # been redirected and log now configured. | 275 | # been redirected and log now configured. |
2136 | 202 | welcome(name, msg=w_msg) | 276 | welcome(name, msg=w_msg) |
2137 | 203 | 277 | ||
2138 | 278 | # re-play early log messages before logging was setup | ||
2139 | 279 | for lvl, msg in early_logs: | ||
2140 | 280 | LOG.log(lvl, msg) | ||
2141 | 281 | |||
2142 | 204 | # Stage 3 | 282 | # Stage 3 |
2143 | 205 | try: | 283 | try: |
2144 | 206 | init.initialize() | 284 | init.initialize() |
2145 | @@ -235,8 +313,15 @@ def main_init(name, args): | |||
2146 | 235 | " would allow us to stop early.") | 313 | " would allow us to stop early.") |
2147 | 236 | else: | 314 | else: |
2148 | 237 | existing = "check" | 315 | existing = "check" |
2150 | 238 | if util.get_cfg_option_bool(init.cfg, 'manual_cache_clean', False): | 316 | mcfg = util.get_cfg_option_bool(init.cfg, 'manual_cache_clean', False) |
2151 | 317 | if mcfg: | ||
2152 | 318 | LOG.debug("manual cache clean set from config") | ||
2153 | 239 | existing = "trust" | 319 | existing = "trust" |
2154 | 320 | else: | ||
2155 | 321 | mfile = path_helper.get_ipath_cur("manual_clean_marker") | ||
2156 | 322 | if os.path.exists(mfile): | ||
2157 | 323 | LOG.debug("manual cache clean found from marker: %s", mfile) | ||
2158 | 324 | existing = "trust" | ||
2159 | 240 | 325 | ||
2160 | 241 | init.purge_cache() | 326 | init.purge_cache() |
2161 | 242 | # Delete the non-net file as well | 327 | # Delete the non-net file as well |
2162 | @@ -326,10 +411,51 @@ def main_init(name, args): | |||
2163 | 326 | util.logexc(LOG, "Failed to re-adjust output redirection!") | 411 | util.logexc(LOG, "Failed to re-adjust output redirection!") |
2164 | 327 | logging.setupLogging(mods.cfg) | 412 | logging.setupLogging(mods.cfg) |
2165 | 328 | 413 | ||
2166 | 414 | # give the activated datasource a chance to adjust | ||
2167 | 415 | init.activate_datasource() | ||
2168 | 416 | |||
2169 | 417 | di_report_warn(datasource=init.datasource, cfg=init.cfg) | ||
2170 | 418 | |||
2171 | 329 | # Stage 10 | 419 | # Stage 10 |
2172 | 330 | return (init.datasource, run_module_section(mods, name, name)) | 420 | return (init.datasource, run_module_section(mods, name, name)) |
2173 | 331 | 421 | ||
2174 | 332 | 422 | ||
2175 | 423 | def di_report_warn(datasource, cfg): | ||
2176 | 424 | if 'di_report' not in cfg: | ||
2177 | 425 | LOG.debug("no di_report found in config.") | ||
2178 | 426 | return | ||
2179 | 427 | |||
2180 | 428 | dicfg = cfg.get('di_report', {}) | ||
2181 | 429 | if not isinstance(dicfg, dict): | ||
2182 | 430 | LOG.warn("di_report config not a dictionary: %s", dicfg) | ||
2183 | 431 | return | ||
2184 | 432 | |||
2185 | 433 | dslist = dicfg.get('datasource_list') | ||
2186 | 434 | if dslist is None: | ||
2187 | 435 | LOG.warn("no 'datasource_list' found in di_report.") | ||
2188 | 436 | return | ||
2189 | 437 | elif not isinstance(dslist, list): | ||
2190 | 438 | LOG.warn("di_report/datasource_list not a list: %s", dslist) | ||
2191 | 439 | return | ||
2192 | 440 | |||
2193 | 441 | # ds.__module__ is like cloudinit.sources.DataSourceName | ||
2194 | 442 | # where Name is the thing that shows up in datasource_list. | ||
2195 | 443 | modname = datasource.__module__.rpartition(".")[2] | ||
2196 | 444 | if modname.startswith(sources.DS_PREFIX): | ||
2197 | 445 | modname = modname[len(sources.DS_PREFIX):] | ||
2198 | 446 | else: | ||
2199 | 447 | LOG.warn("Datasource '%s' came from unexpected module '%s'.", | ||
2200 | 448 | datasource, modname) | ||
2201 | 449 | |||
2202 | 450 | if modname in dslist: | ||
2203 | 451 | LOG.debug("used datasource '%s' from '%s' was in di_report's list: %s", | ||
2204 | 452 | datasource, modname, dslist) | ||
2205 | 453 | return | ||
2206 | 454 | |||
2207 | 455 | warnings.show_warning('dsid_missing_source', cfg, | ||
2208 | 456 | source=modname, dslist=str(dslist)) | ||
2209 | 457 | |||
2210 | 458 | |||
2211 | 333 | def main_modules(action_name, args): | 459 | def main_modules(action_name, args): |
2212 | 334 | name = args.mode | 460 | name = args.mode |
2213 | 335 | # Cloud-init 'modules' stages are broken up into the following sub-stages | 461 | # Cloud-init 'modules' stages are broken up into the following sub-stages |
2214 | @@ -554,6 +680,10 @@ def status_wrapper(name, args, data_d=None, link_d=None): | |||
2215 | 554 | return len(v1[mode]['errors']) | 680 | return len(v1[mode]['errors']) |
2216 | 555 | 681 | ||
2217 | 556 | 682 | ||
2218 | 683 | def main_features(name, args): | ||
2219 | 684 | sys.stdout.write('\n'.join(sorted(version.FEATURES)) + '\n') | ||
2220 | 685 | |||
2221 | 686 | |||
2222 | 557 | def main(sysv_args=None): | 687 | def main(sysv_args=None): |
2223 | 558 | if sysv_args is not None: | 688 | if sysv_args is not None: |
2224 | 559 | parser = argparse.ArgumentParser(prog=sysv_args[0]) | 689 | parser = argparse.ArgumentParser(prog=sysv_args[0]) |
2225 | @@ -644,6 +774,10 @@ def main(sysv_args=None): | |||
2226 | 644 | ' upon')) | 774 | ' upon')) |
2227 | 645 | parser_dhclient.set_defaults(action=('dhclient_hook', dhclient_hook)) | 775 | parser_dhclient.set_defaults(action=('dhclient_hook', dhclient_hook)) |
2228 | 646 | 776 | ||
2229 | 777 | parser_features = subparsers.add_parser('features', | ||
2230 | 778 | help=('list defined features')) | ||
2231 | 779 | parser_features.set_defaults(action=('features', main_features)) | ||
2232 | 780 | |||
2233 | 647 | args = parser.parse_args(args=sysv_args) | 781 | args = parser.parse_args(args=sysv_args) |
2234 | 648 | 782 | ||
2235 | 649 | try: | 783 | try: |
2236 | @@ -662,6 +796,7 @@ def main(sysv_args=None): | |||
2237 | 662 | if name in ("modules", "init"): | 796 | if name in ("modules", "init"): |
2238 | 663 | functor = status_wrapper | 797 | functor = status_wrapper |
2239 | 664 | 798 | ||
2240 | 799 | rname = None | ||
2241 | 665 | report_on = True | 800 | report_on = True |
2242 | 666 | if name == "init": | 801 | if name == "init": |
2243 | 667 | if args.local: | 802 | if args.local: |
2244 | @@ -676,10 +811,10 @@ def main(sysv_args=None): | |||
2245 | 676 | rname, rdesc = ("single/%s" % args.name, | 811 | rname, rdesc = ("single/%s" % args.name, |
2246 | 677 | "running single module %s" % args.name) | 812 | "running single module %s" % args.name) |
2247 | 678 | report_on = args.report | 813 | report_on = args.report |
2252 | 679 | 814 | else: | |
2253 | 680 | elif name == 'dhclient_hook': | 815 | rname = name |
2254 | 681 | rname, rdesc = ("dhclient-hook", | 816 | rdesc = "running 'cloud-init %s'" % name |
2255 | 682 | "running dhclient-hook module") | 817 | report_on = False |
2256 | 683 | 818 | ||
2257 | 684 | args.reporter = events.ReportEventStack( | 819 | args.reporter = events.ReportEventStack( |
2258 | 685 | rname, rdesc, reporting_enabled=report_on) | 820 | rname, rdesc, reporting_enabled=report_on) |
2259 | @@ -691,4 +826,8 @@ def main(sysv_args=None): | |||
2260 | 691 | 826 | ||
2261 | 692 | 827 | ||
2262 | 693 | if __name__ == '__main__': | 828 | if __name__ == '__main__': |
2263 | 829 | if 'TZ' not in os.environ: | ||
2264 | 830 | os.environ['TZ'] = ":/etc/localtime" | ||
2265 | 694 | main(sys.argv) | 831 | main(sys.argv) |
2266 | 832 | |||
2267 | 833 | # vi: ts=4 expandtab | ||
2268 | diff --git a/cloudinit/config/__init__.py b/cloudinit/config/__init__.py | |||
2269 | index d57453b..57e2a44 100644 | |||
2270 | --- a/cloudinit/config/__init__.py | |||
2271 | +++ b/cloudinit/config/__init__.py | |||
2272 | @@ -1,23 +1,10 @@ | |||
2284 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2008-2010 Canonical Ltd. |
2285 | 2 | # | 2 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
2275 | 3 | # Copyright (C) 2008-2010 Canonical Ltd. | ||
2276 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
2277 | 5 | # | ||
2278 | 6 | # Author: Chuck Short <chuck.short@canonical.com> | ||
2279 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
2280 | 8 | # | ||
2281 | 9 | # This program is free software: you can redistribute it and/or modify | ||
2282 | 10 | # it under the terms of the GNU General Public License version 3, as | ||
2283 | 11 | # published by the Free Software Foundation. | ||
2286 | 12 | # | 3 | # |
2294 | 13 | # This program is distributed in the hope that it will be useful, | 4 | # Author: Chuck Short <chuck.short@canonical.com> |
2295 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
2289 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2290 | 16 | # GNU General Public License for more details. | ||
2291 | 17 | # | ||
2292 | 18 | # You should have received a copy of the GNU General Public License | ||
2293 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2296 | 20 | # | 6 | # |
2297 | 7 | # This file is part of cloud-init. See LICENSE file for license information. | ||
2298 | 21 | 8 | ||
2299 | 22 | from cloudinit.settings import (PER_INSTANCE, FREQUENCIES) | 9 | from cloudinit.settings import (PER_INSTANCE, FREQUENCIES) |
2300 | 23 | 10 | ||
2301 | @@ -56,3 +43,5 @@ def fixup_module(mod, def_freq=PER_INSTANCE): | |||
2302 | 56 | if not hasattr(mod, 'osfamilies'): | 43 | if not hasattr(mod, 'osfamilies'): |
2303 | 57 | setattr(mod, 'osfamilies', []) | 44 | setattr(mod, 'osfamilies', []) |
2304 | 58 | return mod | 45 | return mod |
2305 | 46 | |||
2306 | 47 | # vi: ts=4 expandtab | ||
2307 | diff --git a/cloudinit/config/cc_apt_configure.py b/cloudinit/config/cc_apt_configure.py | |||
2308 | index 6145fcd..7f09c91 100644 | |||
2309 | --- a/cloudinit/config/cc_apt_configure.py | |||
2310 | +++ b/cloudinit/config/cc_apt_configure.py | |||
2311 | @@ -1,22 +1,10 @@ | |||
2319 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2009-2010 Canonical Ltd. |
2320 | 2 | # | 2 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
2314 | 3 | # Copyright (C) 2009-2010 Canonical Ltd. | ||
2315 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
2316 | 5 | # | ||
2317 | 6 | # Author: Scott Moser <scott.moser@canonical.com> | ||
2318 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
2321 | 8 | # | 3 | # |
2325 | 9 | # This program is free software: you can redistribute it and/or modify | 4 | # Author: Scott Moser <scott.moser@canonical.com> |
2326 | 10 | # it under the terms of the GNU General Public License version 3, as | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
2324 | 11 | # published by the Free Software Foundation. | ||
2327 | 12 | # | 6 | # |
2335 | 13 | # This program is distributed in the hope that it will be useful, | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
2329 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2330 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2331 | 16 | # GNU General Public License for more details. | ||
2332 | 17 | # | ||
2333 | 18 | # You should have received a copy of the GNU General Public License | ||
2334 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2336 | 20 | 8 | ||
2337 | 21 | """ | 9 | """ |
2338 | 22 | Apt Configure | 10 | Apt Configure |
2339 | @@ -199,6 +187,8 @@ The ``source`` key supports variable replacements for the following strings: | |||
2340 | 199 | deb-src $MIRROR $RELEASE main restricted | 187 | deb-src $MIRROR $RELEASE main restricted |
2341 | 200 | deb $PRIMARY $RELEASE universe restricted | 188 | deb $PRIMARY $RELEASE universe restricted |
2342 | 201 | deb $SECURITY $RELEASE-security multiverse | 189 | deb $SECURITY $RELEASE-security multiverse |
2343 | 190 | debconf_selections: | ||
2344 | 191 | set1: the-package the-package/some-flag boolean true | ||
2345 | 202 | conf: | | 192 | conf: | |
2346 | 203 | APT { | 193 | APT { |
2347 | 204 | Get { | 194 | Get { |
2348 | @@ -216,9 +206,9 @@ The ``source`` key supports variable replacements for the following strings: | |||
2349 | 216 | keyserver: "keyserverurl" | 206 | keyserver: "keyserverurl" |
2350 | 217 | source: "deb http://<url>/ xenial main" | 207 | source: "deb http://<url>/ xenial main" |
2351 | 218 | source2: | 208 | source2: |
2353 | 219 | source "ppa:<ppa-name>" | 209 | source: "ppa:<ppa-name>" |
2354 | 220 | source3: | 210 | source3: |
2356 | 221 | source "deb $MIRROR $RELEASE multiverse" | 211 | source: "deb $MIRROR $RELEASE multiverse" |
2357 | 222 | key: | | 212 | key: | |
2358 | 223 | ------BEGIN PGP PUBLIC KEY BLOCK------- | 213 | ------BEGIN PGP PUBLIC KEY BLOCK------- |
2359 | 224 | <key data> | 214 | <key data> |
2360 | @@ -928,4 +918,4 @@ CONFIG_CLEANERS = { | |||
2361 | 928 | 'cloud-init': clean_cloud_init, | 918 | 'cloud-init': clean_cloud_init, |
2362 | 929 | } | 919 | } |
2363 | 930 | 920 | ||
2365 | 931 | # vi: ts=4 expandtab syntax=python | 921 | # vi: ts=4 expandtab |
2366 | diff --git a/cloudinit/config/cc_apt_pipelining.py b/cloudinit/config/cc_apt_pipelining.py | |||
2367 | index ab9d005..cdf28cd 100644 | |||
2368 | --- a/cloudinit/config/cc_apt_pipelining.py | |||
2369 | +++ b/cloudinit/config/cc_apt_pipelining.py | |||
2370 | @@ -1,20 +1,8 @@ | |||
2376 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2011 Canonical Ltd. |
2372 | 2 | # | ||
2373 | 3 | # Copyright (C) 2011 Canonical Ltd. | ||
2374 | 4 | # | ||
2375 | 5 | # Author: Ben Howard <ben.howard@canonical.com> | ||
2377 | 6 | # | 2 | # |
2381 | 7 | # This program is free software: you can redistribute it and/or modify | 3 | # Author: Ben Howard <ben.howard@canonical.com> |
2379 | 8 | # it under the terms of the GNU General Public License version 3, as | ||
2380 | 9 | # published by the Free Software Foundation. | ||
2382 | 10 | # | 4 | # |
2390 | 11 | # This program is distributed in the hope that it will be useful, | 5 | # This file is part of cloud-init. See LICENSE file for license information. |
2384 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2385 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2386 | 14 | # GNU General Public License for more details. | ||
2387 | 15 | # | ||
2388 | 16 | # You should have received a copy of the GNU General Public License | ||
2389 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2391 | 18 | 6 | ||
2392 | 19 | """ | 7 | """ |
2393 | 20 | Apt Pipelining | 8 | Apt Pipelining |
2394 | @@ -80,3 +68,5 @@ def write_apt_snippet(setting, log, f_name): | |||
2395 | 80 | file_contents = APT_PIPE_TPL % (setting) | 68 | file_contents = APT_PIPE_TPL % (setting) |
2396 | 81 | util.write_file(f_name, file_contents) | 69 | util.write_file(f_name, file_contents) |
2397 | 82 | log.debug("Wrote %s with apt pipeline depth setting %s", f_name, setting) | 70 | log.debug("Wrote %s with apt pipeline depth setting %s", f_name, setting) |
2398 | 71 | |||
2399 | 72 | # vi: ts=4 expandtab | ||
2400 | diff --git a/cloudinit/config/cc_bootcmd.py b/cloudinit/config/cc_bootcmd.py | |||
2401 | index 22b23f2..604f93b 100644 | |||
2402 | --- a/cloudinit/config/cc_bootcmd.py | |||
2403 | +++ b/cloudinit/config/cc_bootcmd.py | |||
2404 | @@ -1,22 +1,10 @@ | |||
2412 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2009-2011 Canonical Ltd. |
2413 | 2 | # | 2 | # Copyright (C) 2012, 2013 Hewlett-Packard Development Company, L.P. |
2407 | 3 | # Copyright (C) 2009-2011 Canonical Ltd. | ||
2408 | 4 | # Copyright (C) 2012, 2013 Hewlett-Packard Development Company, L.P. | ||
2409 | 5 | # | ||
2410 | 6 | # Author: Scott Moser <scott.moser@canonical.com> | ||
2411 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
2414 | 8 | # | 3 | # |
2418 | 9 | # This program is free software: you can redistribute it and/or modify | 4 | # Author: Scott Moser <scott.moser@canonical.com> |
2419 | 10 | # it under the terms of the GNU General Public License version 3, as | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
2417 | 11 | # published by the Free Software Foundation. | ||
2420 | 12 | # | 6 | # |
2428 | 13 | # This program is distributed in the hope that it will be useful, | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
2422 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2423 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2424 | 16 | # GNU General Public License for more details. | ||
2425 | 17 | # | ||
2426 | 18 | # You should have received a copy of the GNU General Public License | ||
2427 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2429 | 20 | 8 | ||
2430 | 21 | """ | 9 | """ |
2431 | 22 | Bootcmd | 10 | Bootcmd |
2432 | @@ -43,7 +31,7 @@ specified either as lists or strings. For invocation details, see ``runcmd``. | |||
2433 | 43 | 31 | ||
2434 | 44 | bootcmd: | 32 | bootcmd: |
2435 | 45 | - echo 192.168.1.130 us.archive.ubuntu.com > /etc/hosts | 33 | - echo 192.168.1.130 us.archive.ubuntu.com > /etc/hosts |
2437 | 46 | - [ cloud-nit-per, once, mymkfs, mkfs, /dev/vdb ] | 34 | - [ cloud-init-per, once, mymkfs, mkfs, /dev/vdb ] |
2438 | 47 | """ | 35 | """ |
2439 | 48 | 36 | ||
2440 | 49 | import os | 37 | import os |
2441 | @@ -80,3 +68,5 @@ def handle(name, cfg, cloud, log, _args): | |||
2442 | 80 | except Exception: | 68 | except Exception: |
2443 | 81 | util.logexc(log, "Failed to run bootcmd module %s", name) | 69 | util.logexc(log, "Failed to run bootcmd module %s", name) |
2444 | 82 | raise | 70 | raise |
2445 | 71 | |||
2446 | 72 | # vi: ts=4 expandtab | ||
2447 | diff --git a/cloudinit/config/cc_byobu.py b/cloudinit/config/cc_byobu.py | |||
2448 | index 4a616e2..8570da1 100755 | |||
2449 | --- a/cloudinit/config/cc_byobu.py | |||
2450 | +++ b/cloudinit/config/cc_byobu.py | |||
2451 | @@ -1,22 +1,10 @@ | |||
2459 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2009-2010 Canonical Ltd. |
2460 | 2 | # | 2 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
2454 | 3 | # Copyright (C) 2009-2010 Canonical Ltd. | ||
2455 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
2456 | 5 | # | ||
2457 | 6 | # Author: Scott Moser <scott.moser@canonical.com> | ||
2458 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
2461 | 8 | # | 3 | # |
2465 | 9 | # This program is free software: you can redistribute it and/or modify | 4 | # Author: Scott Moser <scott.moser@canonical.com> |
2466 | 10 | # it under the terms of the GNU General Public License version 3, as | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
2464 | 11 | # published by the Free Software Foundation. | ||
2467 | 12 | # | 6 | # |
2475 | 13 | # This program is distributed in the hope that it will be useful, | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
2469 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2470 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2471 | 16 | # GNU General Public License for more details. | ||
2472 | 17 | # | ||
2473 | 18 | # You should have received a copy of the GNU General Public License | ||
2474 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2476 | 20 | 8 | ||
2477 | 21 | """ | 9 | """ |
2478 | 22 | Byobu | 10 | Byobu |
2479 | @@ -106,3 +94,5 @@ def handle(name, cfg, cloud, log, args): | |||
2480 | 106 | cmd = ["/bin/sh", "-c", "%s %s %s" % ("X=0;", shcmd, "exit $X")] | 94 | cmd = ["/bin/sh", "-c", "%s %s %s" % ("X=0;", shcmd, "exit $X")] |
2481 | 107 | log.debug("Setting byobu to %s", value) | 95 | log.debug("Setting byobu to %s", value) |
2482 | 108 | util.subp(cmd, capture=False) | 96 | util.subp(cmd, capture=False) |
2483 | 97 | |||
2484 | 98 | # vi: ts=4 expandtab | ||
2485 | diff --git a/cloudinit/config/cc_ca_certs.py b/cloudinit/config/cc_ca_certs.py | |||
2486 | index 53d1406..64bc900 100644 | |||
2487 | --- a/cloudinit/config/cc_ca_certs.py | |||
2488 | +++ b/cloudinit/config/cc_ca_certs.py | |||
2489 | @@ -1,18 +1,6 @@ | |||
2497 | 1 | # vi: ts=4 expandtab | 1 | # Author: Mike Milner <mike.milner@canonical.com> |
2491 | 2 | # | ||
2492 | 3 | # Author: Mike Milner <mike.milner@canonical.com> | ||
2493 | 4 | # | ||
2494 | 5 | # This program is free software: you can redistribute it and/or modify | ||
2495 | 6 | # it under the terms of the GNU General Public License version 3, as | ||
2496 | 7 | # published by the Free Software Foundation. | ||
2498 | 8 | # | 2 | # |
2506 | 9 | # This program is distributed in the hope that it will be useful, | 3 | # This file is part of cloud-init. See LICENSE file for license information. |
2500 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2501 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2502 | 12 | # GNU General Public License for more details. | ||
2503 | 13 | # | ||
2504 | 14 | # You should have received a copy of the GNU General Public License | ||
2505 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2507 | 16 | 4 | ||
2508 | 17 | """ | 5 | """ |
2509 | 18 | CA Certs | 6 | CA Certs |
2510 | @@ -32,7 +20,7 @@ can be removed from the system with the configuration option | |||
2511 | 32 | 20 | ||
2512 | 33 | **Module frequency:** per instance | 21 | **Module frequency:** per instance |
2513 | 34 | 22 | ||
2515 | 35 | **Supporte distros:** ubuntu, debian | 23 | **Supported distros:** ubuntu, debian |
2516 | 36 | 24 | ||
2517 | 37 | **Config keys**:: | 25 | **Config keys**:: |
2518 | 38 | 26 | ||
2519 | @@ -82,8 +70,8 @@ def add_ca_certs(certs): | |||
2520 | 82 | # We have to strip the content because blank lines in the file | 70 | # We have to strip the content because blank lines in the file |
2521 | 83 | # causes subsequent entries to be ignored. (LP: #1077020) | 71 | # causes subsequent entries to be ignored. (LP: #1077020) |
2522 | 84 | orig = util.load_file(CA_CERT_CONFIG) | 72 | orig = util.load_file(CA_CERT_CONFIG) |
2525 | 85 | cur_cont = '\n'.join([l for l in orig.splitlines() | 73 | cur_cont = '\n'.join([line for line in orig.splitlines() |
2526 | 86 | if l != CA_CERT_FILENAME]) | 74 | if line != CA_CERT_FILENAME]) |
2527 | 87 | out = "%s\n%s\n" % (cur_cont.rstrip(), CA_CERT_FILENAME) | 75 | out = "%s\n%s\n" % (cur_cont.rstrip(), CA_CERT_FILENAME) |
2528 | 88 | util.write_file(CA_CERT_CONFIG, out, omode="wb") | 76 | util.write_file(CA_CERT_CONFIG, out, omode="wb") |
2529 | 89 | 77 | ||
2530 | @@ -134,3 +122,5 @@ def handle(name, cfg, _cloud, log, _args): | |||
2531 | 134 | # Update the system with the new cert configuration. | 122 | # Update the system with the new cert configuration. |
2532 | 135 | log.debug("Updating certificates") | 123 | log.debug("Updating certificates") |
2533 | 136 | update_ca_certs() | 124 | update_ca_certs() |
2534 | 125 | |||
2535 | 126 | # vi: ts=4 expandtab | ||
2536 | diff --git a/cloudinit/config/cc_chef.py b/cloudinit/config/cc_chef.py | |||
2537 | index 922fb6a..2be2532 100644 | |||
2538 | --- a/cloudinit/config/cc_chef.py | |||
2539 | +++ b/cloudinit/config/cc_chef.py | |||
2540 | @@ -1,22 +1,10 @@ | |||
2548 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
2542 | 2 | # | ||
2543 | 3 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
2544 | 4 | # | ||
2545 | 5 | # Author: Avishai Ish-Shalom <avishai@fewbytes.com> | ||
2546 | 6 | # Author: Mike Moulton <mike@meltmedia.com> | ||
2547 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
2549 | 8 | # | 2 | # |
2553 | 9 | # This program is free software: you can redistribute it and/or modify | 3 | # Author: Avishai Ish-Shalom <avishai@fewbytes.com> |
2554 | 10 | # it under the terms of the GNU General Public License version 3, as | 4 | # Author: Mike Moulton <mike@meltmedia.com> |
2555 | 11 | # published by the Free Software Foundation. | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
2556 | 12 | # | 6 | # |
2564 | 13 | # This program is distributed in the hope that it will be useful, | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
2558 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2559 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2560 | 16 | # GNU General Public License for more details. | ||
2561 | 17 | # | ||
2562 | 18 | # You should have received a copy of the GNU General Public License | ||
2563 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2565 | 20 | 8 | ||
2566 | 21 | """ | 9 | """ |
2567 | 22 | Chef | 10 | Chef |
2568 | @@ -314,7 +302,7 @@ def install_chef(cloud, chef_cfg, log): | |||
2569 | 314 | retries = max(0, util.get_cfg_option_int(chef_cfg, | 302 | retries = max(0, util.get_cfg_option_int(chef_cfg, |
2570 | 315 | "omnibus_url_retries", | 303 | "omnibus_url_retries", |
2571 | 316 | default=OMNIBUS_URL_RETRIES)) | 304 | default=OMNIBUS_URL_RETRIES)) |
2573 | 317 | content = url_helper.readurl(url=url, retries=retries) | 305 | content = url_helper.readurl(url=url, retries=retries).contents |
2574 | 318 | with util.tempdir() as tmpd: | 306 | with util.tempdir() as tmpd: |
2575 | 319 | # Use tmpdir over tmpfile to avoid 'text file busy' on execute | 307 | # Use tmpdir over tmpfile to avoid 'text file busy' on execute |
2576 | 320 | tmpf = "%s/chef-omnibus-install" % tmpd | 308 | tmpf = "%s/chef-omnibus-install" % tmpd |
2577 | @@ -348,3 +336,5 @@ def install_chef_from_gems(ruby_version, chef_version, distro): | |||
2578 | 348 | util.subp(['/usr/bin/gem', 'install', 'chef', | 336 | util.subp(['/usr/bin/gem', 'install', 'chef', |
2579 | 349 | '--no-ri', '--no-rdoc', '--bindir', | 337 | '--no-ri', '--no-rdoc', '--bindir', |
2580 | 350 | '/usr/bin', '-q'], capture=False) | 338 | '/usr/bin', '-q'], capture=False) |
2581 | 339 | |||
2582 | 340 | # vi: ts=4 expandtab | ||
2583 | diff --git a/cloudinit/config/cc_debug.py b/cloudinit/config/cc_debug.py | |||
2584 | index 5ab3646..0a039eb 100644 | |||
2585 | --- a/cloudinit/config/cc_debug.py | |||
2586 | +++ b/cloudinit/config/cc_debug.py | |||
2587 | @@ -1,18 +1,6 @@ | |||
2595 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2013 Yahoo! Inc. |
2589 | 2 | # | ||
2590 | 3 | # Copyright (C) 2013 Yahoo! Inc. | ||
2591 | 4 | # | ||
2592 | 5 | # This program is free software: you can redistribute it and/or modify | ||
2593 | 6 | # it under the terms of the GNU General Public License version 3, as | ||
2594 | 7 | # published by the Free Software Foundation. | ||
2596 | 8 | # | 2 | # |
2604 | 9 | # This program is distributed in the hope that it will be useful, | 3 | # This file is part of cloud-init. See LICENSE file for license information. |
2598 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2599 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2600 | 12 | # GNU General Public License for more details. | ||
2601 | 13 | # | ||
2602 | 14 | # You should have received a copy of the GNU General Public License | ||
2603 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2605 | 16 | 4 | ||
2606 | 17 | """ | 5 | """ |
2607 | 18 | Debug | 6 | Debug |
2608 | @@ -113,3 +101,5 @@ def handle(name, cfg, cloud, log, args): | |||
2609 | 113 | util.write_file(out_file, "".join(content_to_file), 0o644, "w") | 101 | util.write_file(out_file, "".join(content_to_file), 0o644, "w") |
2610 | 114 | else: | 102 | else: |
2611 | 115 | util.multi_log("".join(content_to_file), console=True, stderr=False) | 103 | util.multi_log("".join(content_to_file), console=True, stderr=False) |
2612 | 104 | |||
2613 | 105 | # vi: ts=4 expandtab | ||
2614 | diff --git a/cloudinit/config/cc_disable_ec2_metadata.py b/cloudinit/config/cc_disable_ec2_metadata.py | |||
2615 | index 5c54e6f..c56319b 100644 | |||
2616 | --- a/cloudinit/config/cc_disable_ec2_metadata.py | |||
2617 | +++ b/cloudinit/config/cc_disable_ec2_metadata.py | |||
2618 | @@ -1,22 +1,10 @@ | |||
2626 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2009-2010 Canonical Ltd. |
2627 | 2 | # | 2 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
2621 | 3 | # Copyright (C) 2009-2010 Canonical Ltd. | ||
2622 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
2623 | 5 | # | ||
2624 | 6 | # Author: Scott Moser <scott.moser@canonical.com> | ||
2625 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
2628 | 8 | # | 3 | # |
2632 | 9 | # This program is free software: you can redistribute it and/or modify | 4 | # Author: Scott Moser <scott.moser@canonical.com> |
2633 | 10 | # it under the terms of the GNU General Public License version 3, as | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
2631 | 11 | # published by the Free Software Foundation. | ||
2634 | 12 | # | 6 | # |
2642 | 13 | # This program is distributed in the hope that it will be useful, | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
2636 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2637 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2638 | 16 | # GNU General Public License for more details. | ||
2639 | 17 | # | ||
2640 | 18 | # You should have received a copy of the GNU General Public License | ||
2641 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2643 | 20 | 8 | ||
2644 | 21 | """ | 9 | """ |
2645 | 22 | Disable EC2 Metadata | 10 | Disable EC2 Metadata |
2646 | @@ -54,3 +42,5 @@ def handle(name, cfg, _cloud, log, _args): | |||
2647 | 54 | else: | 42 | else: |
2648 | 55 | log.debug(("Skipping module named %s," | 43 | log.debug(("Skipping module named %s," |
2649 | 56 | " disabling the ec2 route not enabled"), name) | 44 | " disabling the ec2 route not enabled"), name) |
2650 | 45 | |||
2651 | 46 | # vi: ts=4 expandtab | ||
2652 | diff --git a/cloudinit/config/cc_disk_setup.py b/cloudinit/config/cc_disk_setup.py | |||
2653 | index 0c4b794..f39f081 100644 | |||
2654 | --- a/cloudinit/config/cc_disk_setup.py | |||
2655 | +++ b/cloudinit/config/cc_disk_setup.py | |||
2656 | @@ -1,21 +1,9 @@ | |||
2667 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2009-2010 Canonical Ltd. |
2668 | 2 | # | 2 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
2659 | 3 | # Copyright (C) 2009-2010 Canonical Ltd. | ||
2660 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
2661 | 5 | # | ||
2662 | 6 | # Author: Ben Howard <ben.howard@canonical.com> | ||
2663 | 7 | # | ||
2664 | 8 | # This program is free software: you can redistribute it and/or modify | ||
2665 | 9 | # it under the terms of the GNU General Public License version 3, as | ||
2666 | 10 | # published by the Free Software Foundation. | ||
2669 | 11 | # | 3 | # |
2674 | 12 | # This program is distributed in the hope that it will be useful, | 4 | # Author: Ben Howard <ben.howard@canonical.com> |
2671 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2672 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2673 | 15 | # GNU General Public License for more details. | ||
2675 | 16 | # | 5 | # |
2678 | 17 | # You should have received a copy of the GNU General Public License | 6 | # This file is part of cloud-init. See LICENSE file for license information. |
2677 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2679 | 19 | 7 | ||
2680 | 20 | """ | 8 | """ |
2681 | 21 | Disk Setup | 9 | Disk Setup |
2682 | @@ -213,7 +201,7 @@ def update_fs_setup_devices(disk_setup, tformer): | |||
2683 | 213 | 201 | ||
2684 | 214 | if part and 'partition' in definition: | 202 | if part and 'partition' in definition: |
2685 | 215 | definition['_partition'] = definition['partition'] | 203 | definition['_partition'] = definition['partition'] |
2687 | 216 | definition['partition'] = part | 204 | definition['partition'] = part |
2688 | 217 | 205 | ||
2689 | 218 | 206 | ||
2690 | 219 | def value_splitter(values, start=None): | 207 | def value_splitter(values, start=None): |
2691 | @@ -436,14 +424,13 @@ def get_dyn_func(*args): | |||
2692 | 436 | 424 | ||
2693 | 437 | 425 | ||
2694 | 438 | def get_mbr_hdd_size(device): | 426 | def get_mbr_hdd_size(device): |
2695 | 439 | size_cmd = [SFDISK_CMD, '--show-size', device] | ||
2696 | 440 | size = None | ||
2697 | 441 | try: | 427 | try: |
2699 | 442 | size, _err = util.subp(size_cmd) | 428 | size_in_bytes, _ = util.subp([BLKDEV_CMD, '--getsize64', device]) |
2700 | 429 | sector_size, _ = util.subp([BLKDEV_CMD, '--getss', device]) | ||
2701 | 443 | except Exception as e: | 430 | except Exception as e: |
2702 | 444 | raise Exception("Failed to get %s size\n%s" % (device, e)) | 431 | raise Exception("Failed to get %s size\n%s" % (device, e)) |
2703 | 445 | 432 | ||
2705 | 446 | return int(size.strip()) | 433 | return int(size_in_bytes) / int(sector_size) |
2706 | 447 | 434 | ||
2707 | 448 | 435 | ||
2708 | 449 | def get_gpt_hdd_size(device): | 436 | def get_gpt_hdd_size(device): |
2709 | @@ -588,7 +575,7 @@ def get_partition_mbr_layout(size, layout): | |||
2710 | 588 | raise Exception("Partition was incorrectly defined: %s" % part) | 575 | raise Exception("Partition was incorrectly defined: %s" % part) |
2711 | 589 | percent, part_type = part | 576 | percent, part_type = part |
2712 | 590 | 577 | ||
2714 | 591 | part_size = int((float(size) * (float(percent) / 100)) / 1024) | 578 | part_size = int(float(size) * (float(percent) / 100)) |
2715 | 592 | 579 | ||
2716 | 593 | if part_num == last_part_num: | 580 | if part_num == last_part_num: |
2717 | 594 | part_definition.append(",,%s" % part_type) | 581 | part_definition.append(",,%s" % part_type) |
2718 | @@ -692,7 +679,7 @@ def exec_mkpart_mbr(device, layout): | |||
2719 | 692 | types, i.e. gpt | 679 | types, i.e. gpt |
2720 | 693 | """ | 680 | """ |
2721 | 694 | # Create the partitions | 681 | # Create the partitions |
2723 | 695 | prt_cmd = [SFDISK_CMD, "--Linux", "-uM", device] | 682 | prt_cmd = [SFDISK_CMD, "--Linux", "--unit=S", "--force", device] |
2724 | 696 | try: | 683 | try: |
2725 | 697 | util.subp(prt_cmd, data="%s\n" % layout) | 684 | util.subp(prt_cmd, data="%s\n" % layout) |
2726 | 698 | except Exception as e: | 685 | except Exception as e: |
2727 | @@ -909,7 +896,8 @@ def mkfs(fs_cfg): | |||
2728 | 909 | LOG.debug("Error in device identification handling.") | 896 | LOG.debug("Error in device identification handling.") |
2729 | 910 | return | 897 | return |
2730 | 911 | 898 | ||
2732 | 912 | LOG.debug("File system %s will be created on %s", label, device) | 899 | LOG.debug("File system type '%s' with label '%s' will be created on %s", |
2733 | 900 | fs_type, label, device) | ||
2734 | 913 | 901 | ||
2735 | 914 | # Make sure the device is defined | 902 | # Make sure the device is defined |
2736 | 915 | if not device: | 903 | if not device: |
2737 | @@ -958,3 +946,5 @@ def mkfs(fs_cfg): | |||
2738 | 958 | util.subp(fs_cmd) | 946 | util.subp(fs_cmd) |
2739 | 959 | except Exception as e: | 947 | except Exception as e: |
2740 | 960 | raise Exception("Failed to exec of '%s':\n%s" % (fs_cmd, e)) | 948 | raise Exception("Failed to exec of '%s':\n%s" % (fs_cmd, e)) |
2741 | 949 | |||
2742 | 950 | # vi: ts=4 expandtab | ||
2743 | diff --git a/cloudinit/config/cc_emit_upstart.py b/cloudinit/config/cc_emit_upstart.py | |||
2744 | index a7be635..69dc2d5 100644 | |||
2745 | --- a/cloudinit/config/cc_emit_upstart.py | |||
2746 | +++ b/cloudinit/config/cc_emit_upstart.py | |||
2747 | @@ -1,22 +1,10 @@ | |||
2755 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2009-2011 Canonical Ltd. |
2756 | 2 | # | 2 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
2750 | 3 | # Copyright (C) 2009-2011 Canonical Ltd. | ||
2751 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
2752 | 5 | # | ||
2753 | 6 | # Author: Scott Moser <scott.moser@canonical.com> | ||
2754 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
2757 | 8 | # | 3 | # |
2761 | 9 | # This program is free software: you can redistribute it and/or modify | 4 | # Author: Scott Moser <scott.moser@canonical.com> |
2762 | 10 | # it under the terms of the GNU General Public License version 3, as | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
2760 | 11 | # published by the Free Software Foundation. | ||
2763 | 12 | # | 6 | # |
2771 | 13 | # This program is distributed in the hope that it will be useful, | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
2765 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2766 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2767 | 16 | # GNU General Public License for more details. | ||
2768 | 17 | # | ||
2769 | 18 | # You should have received a copy of the GNU General Public License | ||
2770 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2772 | 20 | 8 | ||
2773 | 21 | """ | 9 | """ |
2774 | 22 | Emit Upstart | 10 | Emit Upstart |
2775 | @@ -82,3 +70,5 @@ def handle(name, _cfg, cloud, log, args): | |||
2776 | 82 | except Exception as e: | 70 | except Exception as e: |
2777 | 83 | # TODO(harlowja), use log exception from utils?? | 71 | # TODO(harlowja), use log exception from utils?? |
2778 | 84 | log.warn("Emission of upstart event %s failed due to: %s", n, e) | 72 | log.warn("Emission of upstart event %s failed due to: %s", n, e) |
2779 | 73 | |||
2780 | 74 | # vi: ts=4 expandtab | ||
2781 | diff --git a/cloudinit/config/cc_fan.py b/cloudinit/config/cc_fan.py | |||
2782 | index 6027fdc..f0cda3d 100644 | |||
2783 | --- a/cloudinit/config/cc_fan.py | |||
2784 | +++ b/cloudinit/config/cc_fan.py | |||
2785 | @@ -1,20 +1,8 @@ | |||
2791 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2015 Canonical Ltd. |
2787 | 2 | # | ||
2788 | 3 | # Copyright (C) 2015 Canonical Ltd. | ||
2789 | 4 | # | ||
2790 | 5 | # Author: Scott Moser <scott.moser@canonical.com> | ||
2792 | 6 | # | 2 | # |
2796 | 7 | # This program is free software: you can redistribute it and/or modify | 3 | # Author: Scott Moser <scott.moser@canonical.com> |
2794 | 8 | # it under the terms of the GNU General Public License version 3, as | ||
2795 | 9 | # published by the Free Software Foundation. | ||
2797 | 10 | # | 4 | # |
2805 | 11 | # This program is distributed in the hope that it will be useful, | 5 | # This file is part of cloud-init. See LICENSE file for license information. |
2799 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2800 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2801 | 14 | # GNU General Public License for more details. | ||
2802 | 15 | # | ||
2803 | 16 | # You should have received a copy of the GNU General Public License | ||
2804 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2806 | 18 | 6 | ||
2807 | 19 | """ | 7 | """ |
2808 | 20 | Fan | 8 | Fan |
2809 | @@ -112,3 +100,5 @@ def handle(name, cfg, cloud, log, args): | |||
2810 | 112 | stop_update_start( | 100 | stop_update_start( |
2811 | 113 | service='ubuntu-fan', config_file=mycfg.get('config_path'), | 101 | service='ubuntu-fan', config_file=mycfg.get('config_path'), |
2812 | 114 | content=mycfg.get('config'), systemd=distro.uses_systemd()) | 102 | content=mycfg.get('config'), systemd=distro.uses_systemd()) |
2813 | 103 | |||
2814 | 104 | # vi: ts=4 expandtab | ||
2815 | diff --git a/cloudinit/config/cc_final_message.py b/cloudinit/config/cc_final_message.py | |||
2816 | index 5e144fd..c61f03d 100644 | |||
2817 | --- a/cloudinit/config/cc_final_message.py | |||
2818 | +++ b/cloudinit/config/cc_final_message.py | |||
2819 | @@ -1,22 +1,10 @@ | |||
2827 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2011 Canonical Ltd. |
2828 | 2 | # | 2 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
2822 | 3 | # Copyright (C) 2011 Canonical Ltd. | ||
2823 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
2824 | 5 | # | ||
2825 | 6 | # Author: Scott Moser <scott.moser@canonical.com> | ||
2826 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
2829 | 8 | # | 3 | # |
2833 | 9 | # This program is free software: you can redistribute it and/or modify | 4 | # Author: Scott Moser <scott.moser@canonical.com> |
2834 | 10 | # it under the terms of the GNU General Public License version 3, as | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
2832 | 11 | # published by the Free Software Foundation. | ||
2835 | 12 | # | 6 | # |
2843 | 13 | # This program is distributed in the hope that it will be useful, | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
2837 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2838 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2839 | 16 | # GNU General Public License for more details. | ||
2840 | 17 | # | ||
2841 | 18 | # You should have received a copy of the GNU General Public License | ||
2842 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2844 | 20 | 8 | ||
2845 | 21 | """ | 9 | """ |
2846 | 22 | Final Message | 10 | Final Message |
2847 | @@ -96,3 +84,5 @@ def handle(_name, cfg, cloud, log, args): | |||
2848 | 96 | 84 | ||
2849 | 97 | if cloud.datasource.is_disconnected: | 85 | if cloud.datasource.is_disconnected: |
2850 | 98 | log.warn("Used fallback datasource") | 86 | log.warn("Used fallback datasource") |
2851 | 87 | |||
2852 | 88 | # vi: ts=4 expandtab | ||
2853 | diff --git a/cloudinit/config/cc_foo.py b/cloudinit/config/cc_foo.py | |||
2854 | index ad0e046..924b967 100644 | |||
2855 | --- a/cloudinit/config/cc_foo.py | |||
2856 | +++ b/cloudinit/config/cc_foo.py | |||
2857 | @@ -1,22 +1,10 @@ | |||
2865 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2009-2010 Canonical Ltd. |
2866 | 2 | # | 2 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
2860 | 3 | # Copyright (C) 2009-2010 Canonical Ltd. | ||
2861 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
2862 | 5 | # | ||
2863 | 6 | # Author: Scott Moser <scott.moser@canonical.com> | ||
2864 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
2867 | 8 | # | 3 | # |
2871 | 9 | # This program is free software: you can redistribute it and/or modify | 4 | # Author: Scott Moser <scott.moser@canonical.com> |
2872 | 10 | # it under the terms of the GNU General Public License version 3, as | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
2870 | 11 | # published by the Free Software Foundation. | ||
2873 | 12 | # | 6 | # |
2881 | 13 | # This program is distributed in the hope that it will be useful, | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
2875 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2876 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2877 | 16 | # GNU General Public License for more details. | ||
2878 | 17 | # | ||
2879 | 18 | # You should have received a copy of the GNU General Public License | ||
2880 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2882 | 20 | 8 | ||
2883 | 21 | """ | 9 | """ |
2884 | 22 | Foo | 10 | Foo |
2885 | @@ -64,3 +52,5 @@ frequency = PER_INSTANCE | |||
2886 | 64 | 52 | ||
2887 | 65 | def handle(name, _cfg, _cloud, log, _args): | 53 | def handle(name, _cfg, _cloud, log, _args): |
2888 | 66 | log.debug("Hi from module %s", name) | 54 | log.debug("Hi from module %s", name) |
2889 | 55 | |||
2890 | 56 | # vi: ts=4 expandtab | ||
2891 | diff --git a/cloudinit/config/cc_growpart.py b/cloudinit/config/cc_growpart.py | |||
2892 | index a95e6c8..832bb3f 100644 | |||
2893 | --- a/cloudinit/config/cc_growpart.py | |||
2894 | +++ b/cloudinit/config/cc_growpart.py | |||
2895 | @@ -1,22 +1,10 @@ | |||
2907 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2011 Canonical Ltd. |
2908 | 2 | # | 2 | # Copyright (C) 2013 Hewlett-Packard Development Company, L.P. |
2898 | 3 | # Copyright (C) 2011 Canonical Ltd. | ||
2899 | 4 | # Copyright (C) 2013 Hewlett-Packard Development Company, L.P. | ||
2900 | 5 | # | ||
2901 | 6 | # Author: Scott Moser <scott.moser@canonical.com> | ||
2902 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
2903 | 8 | # | ||
2904 | 9 | # This program is free software: you can redistribute it and/or modify | ||
2905 | 10 | # it under the terms of the GNU General Public License version 3, as | ||
2906 | 11 | # published by the Free Software Foundation. | ||
2909 | 12 | # | 3 | # |
2914 | 13 | # This program is distributed in the hope that it will be useful, | 4 | # Author: Scott Moser <scott.moser@canonical.com> |
2915 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
2912 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2913 | 16 | # GNU General Public License for more details. | ||
2916 | 17 | # | 6 | # |
2919 | 18 | # You should have received a copy of the GNU General Public License | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
2918 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2920 | 20 | 8 | ||
2921 | 21 | """ | 9 | """ |
2922 | 22 | Growpart | 10 | Growpart |
2923 | @@ -354,4 +342,7 @@ def handle(_name, cfg, _cloud, log, _args): | |||
2924 | 354 | else: | 342 | else: |
2925 | 355 | log.debug("'%s' %s: %s" % (entry, action, msg)) | 343 | log.debug("'%s' %s: %s" % (entry, action, msg)) |
2926 | 356 | 344 | ||
2927 | 345 | |||
2928 | 357 | RESIZERS = (('growpart', ResizeGrowPart), ('gpart', ResizeGpart)) | 346 | RESIZERS = (('growpart', ResizeGrowPart), ('gpart', ResizeGpart)) |
2929 | 347 | |||
2930 | 348 | # vi: ts=4 expandtab | ||
2931 | diff --git a/cloudinit/config/cc_grub_dpkg.py b/cloudinit/config/cc_grub_dpkg.py | |||
2932 | index 33ca40a..a323edf 100644 | |||
2933 | --- a/cloudinit/config/cc_grub_dpkg.py | |||
2934 | +++ b/cloudinit/config/cc_grub_dpkg.py | |||
2935 | @@ -1,22 +1,10 @@ | |||
2943 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2009-2010 Canonical Ltd. |
2944 | 2 | # | 2 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
2938 | 3 | # Copyright (C) 2009-2010 Canonical Ltd. | ||
2939 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
2940 | 5 | # | ||
2941 | 6 | # Author: Scott Moser <scott.moser@canonical.com> | ||
2942 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
2945 | 8 | # | 3 | # |
2949 | 9 | # This program is free software: you can redistribute it and/or modify | 4 | # Author: Scott Moser <scott.moser@canonical.com> |
2950 | 10 | # it under the terms of the GNU General Public License version 3, as | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
2948 | 11 | # published by the Free Software Foundation. | ||
2951 | 12 | # | 6 | # |
2959 | 13 | # This program is distributed in the hope that it will be useful, | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
2953 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2954 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2955 | 16 | # GNU General Public License for more details. | ||
2956 | 17 | # | ||
2957 | 18 | # You should have received a copy of the GNU General Public License | ||
2958 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2960 | 20 | 8 | ||
2961 | 21 | """ | 9 | """ |
2962 | 22 | Grub Dpkg | 10 | Grub Dpkg |
2963 | @@ -105,3 +93,5 @@ def handle(name, cfg, _cloud, log, _args): | |||
2964 | 105 | util.subp(['debconf-set-selections'], dconf_sel) | 93 | util.subp(['debconf-set-selections'], dconf_sel) |
2965 | 106 | except Exception: | 94 | except Exception: |
2966 | 107 | util.logexc(log, "Failed to run debconf-set-selections for grub-dpkg") | 95 | util.logexc(log, "Failed to run debconf-set-selections for grub-dpkg") |
2967 | 96 | |||
2968 | 97 | # vi: ts=4 expandtab | ||
2969 | diff --git a/cloudinit/config/cc_keys_to_console.py b/cloudinit/config/cc_keys_to_console.py | |||
2970 | index d4b2013..efedd4a 100644 | |||
2971 | --- a/cloudinit/config/cc_keys_to_console.py | |||
2972 | +++ b/cloudinit/config/cc_keys_to_console.py | |||
2973 | @@ -1,22 +1,10 @@ | |||
2981 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2011 Canonical Ltd. |
2982 | 2 | # | 2 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
2976 | 3 | # Copyright (C) 2011 Canonical Ltd. | ||
2977 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
2978 | 5 | # | ||
2979 | 6 | # Author: Scott Moser <scott.moser@canonical.com> | ||
2980 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
2983 | 8 | # | 3 | # |
2987 | 9 | # This program is free software: you can redistribute it and/or modify | 4 | # Author: Scott Moser <scott.moser@canonical.com> |
2988 | 10 | # it under the terms of the GNU General Public License version 3, as | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
2986 | 11 | # published by the Free Software Foundation. | ||
2989 | 12 | # | 6 | # |
2997 | 13 | # This program is distributed in the hope that it will be useful, | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
2991 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2992 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2993 | 16 | # GNU General Public License for more details. | ||
2994 | 17 | # | ||
2995 | 18 | # You should have received a copy of the GNU General Public License | ||
2996 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2998 | 20 | 8 | ||
2999 | 21 | """ | 9 | """ |
3000 | 22 | Keys to Console | 10 | Keys to Console |
3001 | @@ -84,3 +72,5 @@ def handle(name, cfg, cloud, log, _args): | |||
3002 | 84 | except Exception: | 72 | except Exception: |
3003 | 85 | log.warn("Writing keys to the system console failed!") | 73 | log.warn("Writing keys to the system console failed!") |
3004 | 86 | raise | 74 | raise |
3005 | 75 | |||
3006 | 76 | # vi: ts=4 expandtab | ||
3007 | diff --git a/cloudinit/config/cc_landscape.py b/cloudinit/config/cc_landscape.py | |||
3008 | index 11c8451..86b7138 100644 | |||
3009 | --- a/cloudinit/config/cc_landscape.py | |||
3010 | +++ b/cloudinit/config/cc_landscape.py | |||
3011 | @@ -1,22 +1,10 @@ | |||
3019 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2011 Canonical Ltd. |
3020 | 2 | # | 2 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
3014 | 3 | # Copyright (C) 2011 Canonical Ltd. | ||
3015 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
3016 | 5 | # | ||
3017 | 6 | # Author: Scott Moser <scott.moser@canonical.com> | ||
3018 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
3021 | 8 | # | 3 | # |
3025 | 9 | # This program is free software: you can redistribute it and/or modify | 4 | # Author: Scott Moser <scott.moser@canonical.com> |
3026 | 10 | # it under the terms of the GNU General Public License version 3, as | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
3024 | 11 | # published by the Free Software Foundation. | ||
3027 | 12 | # | 6 | # |
3035 | 13 | # This program is distributed in the hope that it will be useful, | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
3029 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3030 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3031 | 16 | # GNU General Public License for more details. | ||
3032 | 17 | # | ||
3033 | 18 | # You should have received a copy of the GNU General Public License | ||
3034 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3036 | 20 | 8 | ||
3037 | 21 | """ | 9 | """ |
3038 | 22 | Landscape | 10 | Landscape |
3039 | @@ -146,3 +134,5 @@ def merge_together(objs): | |||
3040 | 146 | else: | 134 | else: |
3041 | 147 | cfg.merge(ConfigObj(obj)) | 135 | cfg.merge(ConfigObj(obj)) |
3042 | 148 | return cfg | 136 | return cfg |
3043 | 137 | |||
3044 | 138 | # vi: ts=4 expandtab | ||
3045 | diff --git a/cloudinit/config/cc_locale.py b/cloudinit/config/cc_locale.py | |||
3046 | index 268888e..f68c3cc 100644 | |||
3047 | --- a/cloudinit/config/cc_locale.py | |||
3048 | +++ b/cloudinit/config/cc_locale.py | |||
3049 | @@ -1,22 +1,10 @@ | |||
3057 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2011 Canonical Ltd. |
3058 | 2 | # | 2 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
3052 | 3 | # Copyright (C) 2011 Canonical Ltd. | ||
3053 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
3054 | 5 | # | ||
3055 | 6 | # Author: Scott Moser <scott.moser@canonical.com> | ||
3056 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
3059 | 8 | # | 3 | # |
3063 | 9 | # This program is free software: you can redistribute it and/or modify | 4 | # Author: Scott Moser <scott.moser@canonical.com> |
3064 | 10 | # it under the terms of the GNU General Public License version 3, as | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
3062 | 11 | # published by the Free Software Foundation. | ||
3065 | 12 | # | 6 | # |
3073 | 13 | # This program is distributed in the hope that it will be useful, | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
3067 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3068 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3069 | 16 | # GNU General Public License for more details. | ||
3070 | 17 | # | ||
3071 | 18 | # You should have received a copy of the GNU General Public License | ||
3072 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3074 | 20 | 8 | ||
3075 | 21 | """ | 9 | """ |
3076 | 22 | Locale | 10 | Locale |
3077 | @@ -55,3 +43,5 @@ def handle(name, cfg, cloud, log, args): | |||
3078 | 55 | log.debug("Setting locale to %s", locale) | 43 | log.debug("Setting locale to %s", locale) |
3079 | 56 | locale_cfgfile = util.get_cfg_option_str(cfg, "locale_configfile") | 44 | locale_cfgfile = util.get_cfg_option_str(cfg, "locale_configfile") |
3080 | 57 | cloud.distro.apply_locale(locale, locale_cfgfile) | 45 | cloud.distro.apply_locale(locale, locale_cfgfile) |
3081 | 46 | |||
3082 | 47 | # vi: ts=4 expandtab | ||
3083 | diff --git a/cloudinit/config/cc_lxd.py b/cloudinit/config/cc_lxd.py | |||
3084 | index 3e7faca..e6262f8 100644 | |||
3085 | --- a/cloudinit/config/cc_lxd.py | |||
3086 | +++ b/cloudinit/config/cc_lxd.py | |||
3087 | @@ -1,20 +1,8 @@ | |||
3093 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2016 Canonical Ltd. |
3089 | 2 | # | ||
3090 | 3 | # Copyright (C) 2016 Canonical Ltd. | ||
3091 | 4 | # | ||
3092 | 5 | # Author: Wesley Wiedenmeier <wesley.wiedenmeier@canonical.com> | ||
3094 | 6 | # | 2 | # |
3098 | 7 | # This program is free software: you can redistribute it and/or modify | 3 | # Author: Wesley Wiedenmeier <wesley.wiedenmeier@canonical.com> |
3096 | 8 | # it under the terms of the GNU General Public License version 3, as | ||
3097 | 9 | # published by the Free Software Foundation. | ||
3099 | 10 | # | 4 | # |
3107 | 11 | # This program is distributed in the hope that it will be useful, | 5 | # This file is part of cloud-init. See LICENSE file for license information. |
3101 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3102 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3103 | 14 | # GNU General Public License for more details. | ||
3104 | 15 | # | ||
3105 | 16 | # You should have received a copy of the GNU General Public License | ||
3106 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3108 | 18 | 6 | ||
3109 | 19 | """ | 7 | """ |
3110 | 20 | LXD | 8 | LXD |
3111 | @@ -262,3 +250,5 @@ def bridge_to_cmd(bridge_cfg): | |||
3112 | 262 | cmd_create.append("--force-local") | 250 | cmd_create.append("--force-local") |
3113 | 263 | 251 | ||
3114 | 264 | return cmd_create, cmd_attach | 252 | return cmd_create, cmd_attach |
3115 | 253 | |||
3116 | 254 | # vi: ts=4 expandtab | ||
3117 | diff --git a/cloudinit/config/cc_mcollective.py b/cloudinit/config/cc_mcollective.py | |||
3118 | index c447f26..d5f63f5 100644 | |||
3119 | --- a/cloudinit/config/cc_mcollective.py | |||
3120 | +++ b/cloudinit/config/cc_mcollective.py | |||
3121 | @@ -1,23 +1,11 @@ | |||
3130 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2009-2011 Canonical Ltd. |
3131 | 2 | # | 2 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
3124 | 3 | # Copyright (C) 2009-2011 Canonical Ltd. | ||
3125 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
3126 | 5 | # | ||
3127 | 6 | # Author: Marc Cluet <marc.cluet@canonical.com> | ||
3128 | 7 | # Based on code by Scott Moser <scott.moser@canonical.com> | ||
3129 | 8 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
3132 | 9 | # | 3 | # |
3136 | 10 | # This program is free software: you can redistribute it and/or modify | 4 | # Author: Marc Cluet <marc.cluet@canonical.com> |
3137 | 11 | # it under the terms of the GNU General Public License version 3, as | 5 | # Based on code by Scott Moser <scott.moser@canonical.com> |
3138 | 12 | # published by the Free Software Foundation. | 6 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
3139 | 13 | # | 7 | # |
3147 | 14 | # This program is distributed in the hope that it will be useful, | 8 | # This file is part of cloud-init. See LICENSE file for license information. |
3141 | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3142 | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3143 | 17 | # GNU General Public License for more details. | ||
3144 | 18 | # | ||
3145 | 19 | # You should have received a copy of the GNU General Public License | ||
3146 | 20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3148 | 21 | 9 | ||
3149 | 22 | """ | 10 | """ |
3150 | 23 | Mcollective | 11 | Mcollective |
3151 | @@ -155,3 +143,5 @@ def handle(name, cfg, cloud, log, _args): | |||
3152 | 155 | 143 | ||
3153 | 156 | # restart mcollective to handle updated config | 144 | # restart mcollective to handle updated config |
3154 | 157 | util.subp(['service', 'mcollective', 'restart'], capture=False) | 145 | util.subp(['service', 'mcollective', 'restart'], capture=False) |
3155 | 146 | |||
3156 | 147 | # vi: ts=4 expandtab | ||
3157 | diff --git a/cloudinit/config/cc_migrator.py b/cloudinit/config/cc_migrator.py | |||
3158 | index 6e0bf4b..3995704 100644 | |||
3159 | --- a/cloudinit/config/cc_migrator.py | |||
3160 | +++ b/cloudinit/config/cc_migrator.py | |||
3161 | @@ -1,20 +1,8 @@ | |||
3167 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2012 Yahoo! Inc. |
3163 | 2 | # | ||
3164 | 3 | # Copyright (C) 2012 Yahoo! Inc. | ||
3165 | 4 | # | ||
3166 | 5 | # Author: Joshua Harlow <harlowja@yahoo-inc.com> | ||
3168 | 6 | # | 2 | # |
3172 | 7 | # This program is free software: you can redistribute it and/or modify | 3 | # Author: Joshua Harlow <harlowja@yahoo-inc.com> |
3170 | 8 | # it under the terms of the GNU General Public License version 3, as | ||
3171 | 9 | # published by the Free Software Foundation. | ||
3173 | 10 | # | 4 | # |
3181 | 11 | # This program is distributed in the hope that it will be useful, | 5 | # This file is part of cloud-init. See LICENSE file for license information. |
3175 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3176 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3177 | 14 | # GNU General Public License for more details. | ||
3178 | 15 | # | ||
3179 | 16 | # You should have received a copy of the GNU General Public License | ||
3180 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3182 | 18 | 6 | ||
3183 | 19 | """ | 7 | """ |
3184 | 20 | Migrator | 8 | Migrator |
3185 | @@ -105,3 +93,5 @@ def handle(name, cfg, cloud, log, _args): | |||
3186 | 105 | log.debug("Migrated %s semaphore files to there canonicalized names", | 93 | log.debug("Migrated %s semaphore files to there canonicalized names", |
3187 | 106 | sems_moved) | 94 | sems_moved) |
3188 | 107 | _migrate_legacy_sems(cloud, log) | 95 | _migrate_legacy_sems(cloud, log) |
3189 | 96 | |||
3190 | 97 | # vi: ts=4 expandtab | ||
3191 | diff --git a/cloudinit/config/cc_mounts.py b/cloudinit/config/cc_mounts.py | |||
3192 | index dfc4b59..5b630f8 100644 | |||
3193 | --- a/cloudinit/config/cc_mounts.py | |||
3194 | +++ b/cloudinit/config/cc_mounts.py | |||
3195 | @@ -1,22 +1,10 @@ | |||
3207 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2009-2010 Canonical Ltd. |
3208 | 2 | # | 2 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
3198 | 3 | # Copyright (C) 2009-2010 Canonical Ltd. | ||
3199 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
3200 | 5 | # | ||
3201 | 6 | # Author: Scott Moser <scott.moser@canonical.com> | ||
3202 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
3203 | 8 | # | ||
3204 | 9 | # This program is free software: you can redistribute it and/or modify | ||
3205 | 10 | # it under the terms of the GNU General Public License version 3, as | ||
3206 | 11 | # published by the Free Software Foundation. | ||
3209 | 12 | # | 3 | # |
3214 | 13 | # This program is distributed in the hope that it will be useful, | 4 | # Author: Scott Moser <scott.moser@canonical.com> |
3215 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
3212 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3213 | 16 | # GNU General Public License for more details. | ||
3216 | 17 | # | 6 | # |
3219 | 18 | # You should have received a copy of the GNU General Public License | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
3218 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3220 | 20 | 8 | ||
3221 | 21 | """ | 9 | """ |
3222 | 22 | Mounts | 10 | Mounts |
3223 | @@ -42,6 +30,14 @@ values. It defaults to:: | |||
3224 | 42 | 30 | ||
3225 | 43 | mount_default_fields: [none, none, "auto", "defaults,nobootwait", "0", "2"] | 31 | mount_default_fields: [none, none, "auto", "defaults,nobootwait", "0", "2"] |
3226 | 44 | 32 | ||
3227 | 33 | On a systemd booted system that default is the mostly equivalent:: | ||
3228 | 34 | |||
3229 | 35 | mount_default_fields: [none, none, "auto", | ||
3230 | 36 | "defaults,nofail,x-systemd.requires=cloud-init.service", "0", "2"] | ||
3231 | 37 | |||
3232 | 38 | Note that `nobootwait` is an upstart specific boot option that somewhat | ||
3233 | 39 | equates to the more standard `nofail`. | ||
3234 | 40 | |||
3235 | 45 | Swap files can be configured by setting the path to the swap file to create | 41 | Swap files can be configured by setting the path to the swap file to create |
3236 | 46 | with ``filename``, the size of the swap file with ``size`` maximum size of | 42 | with ``filename``, the size of the swap file with ``size`` maximum size of |
3237 | 47 | the swap file if using an ``size: auto`` with ``maxsize``. By default no | 43 | the swap file if using an ``size: auto`` with ``maxsize``. By default no |
3238 | @@ -58,8 +54,8 @@ swap file is created. | |||
3239 | 58 | mounts: | 54 | mounts: |
3240 | 59 | - [ /dev/ephemeral0, /mnt, auto, "defaults,noexec" ] | 55 | - [ /dev/ephemeral0, /mnt, auto, "defaults,noexec" ] |
3241 | 60 | - [ sdc, /opt/data ] | 56 | - [ sdc, /opt/data ] |
3244 | 61 | - [ xvdh, /opt/data, "auto", "defaults,nobootwait", "0", "0" ] | 57 | - [ xvdh, /opt/data, "auto", "defaults,nofail", "0", "0" ] |
3245 | 62 | mount_default_fields: [None, None, "auto", "nefaults,nobootwait", "0", "2"] | 58 | mount_default_fields: [None, None, "auto", "defaults,nofail", "0", "2"] |
3246 | 63 | swap: | 59 | swap: |
3247 | 64 | filename: <file> | 60 | filename: <file> |
3248 | 65 | size: <"auto"/size in bytes> | 61 | size: <"auto"/size in bytes> |
3249 | @@ -312,7 +308,8 @@ def handle_swapcfg(swapcfg): | |||
3250 | 312 | def handle(_name, cfg, cloud, log, _args): | 308 | def handle(_name, cfg, cloud, log, _args): |
3251 | 313 | # fs_spec, fs_file, fs_vfstype, fs_mntops, fs-freq, fs_passno | 309 | # fs_spec, fs_file, fs_vfstype, fs_mntops, fs-freq, fs_passno |
3252 | 314 | def_mnt_opts = "defaults,nobootwait" | 310 | def_mnt_opts = "defaults,nobootwait" |
3254 | 315 | if cloud.distro.uses_systemd(): | 311 | uses_systemd = cloud.distro.uses_systemd() |
3255 | 312 | if uses_systemd: | ||
3256 | 316 | def_mnt_opts = "defaults,nofail,x-systemd.requires=cloud-init.service" | 313 | def_mnt_opts = "defaults,nofail,x-systemd.requires=cloud-init.service" |
3257 | 317 | 314 | ||
3258 | 318 | defvals = [None, None, "auto", def_mnt_opts, "0", "2"] | 315 | defvals = [None, None, "auto", def_mnt_opts, "0", "2"] |
3259 | @@ -326,6 +323,8 @@ def handle(_name, cfg, cloud, log, _args): | |||
3260 | 326 | if "mounts" in cfg: | 323 | if "mounts" in cfg: |
3261 | 327 | cfgmnt = cfg["mounts"] | 324 | cfgmnt = cfg["mounts"] |
3262 | 328 | 325 | ||
3263 | 326 | LOG.debug("mounts configuration is %s", cfgmnt) | ||
3264 | 327 | |||
3265 | 329 | for i in range(len(cfgmnt)): | 328 | for i in range(len(cfgmnt)): |
3266 | 330 | # skip something that wasn't a list | 329 | # skip something that wasn't a list |
3267 | 331 | if not isinstance(cfgmnt[i], list): | 330 | if not isinstance(cfgmnt[i], list): |
3268 | @@ -422,32 +421,53 @@ def handle(_name, cfg, cloud, log, _args): | |||
3269 | 422 | cc_lines.append('\t'.join(line)) | 421 | cc_lines.append('\t'.join(line)) |
3270 | 423 | 422 | ||
3271 | 424 | fstab_lines = [] | 423 | fstab_lines = [] |
3272 | 424 | removed = [] | ||
3273 | 425 | for line in util.load_file(FSTAB_PATH).splitlines(): | 425 | for line in util.load_file(FSTAB_PATH).splitlines(): |
3274 | 426 | try: | 426 | try: |
3275 | 427 | toks = WS.split(line) | 427 | toks = WS.split(line) |
3276 | 428 | if toks[3].find(comment) != -1: | 428 | if toks[3].find(comment) != -1: |
3277 | 429 | removed.append(line) | ||
3278 | 429 | continue | 430 | continue |
3279 | 430 | except Exception: | 431 | except Exception: |
3280 | 431 | pass | 432 | pass |
3281 | 432 | fstab_lines.append(line) | 433 | fstab_lines.append(line) |
3282 | 433 | 434 | ||
3283 | 435 | for d in dirs: | ||
3284 | 436 | try: | ||
3285 | 437 | util.ensure_dir(d) | ||
3286 | 438 | except Exception: | ||
3287 | 439 | util.logexc(log, "Failed to make '%s' config-mount", d) | ||
3288 | 440 | |||
3289 | 441 | sadds = [WS.sub(" ", n) for n in cc_lines] | ||
3290 | 442 | sdrops = [WS.sub(" ", n) for n in removed] | ||
3291 | 443 | |||
3292 | 444 | sops = (["- " + drop for drop in sdrops if drop not in sadds] + | ||
3293 | 445 | ["+ " + add for add in sadds if add not in sdrops]) | ||
3294 | 446 | |||
3295 | 434 | fstab_lines.extend(cc_lines) | 447 | fstab_lines.extend(cc_lines) |
3296 | 435 | contents = "%s\n" % ('\n'.join(fstab_lines)) | 448 | contents = "%s\n" % ('\n'.join(fstab_lines)) |
3297 | 436 | util.write_file(FSTAB_PATH, contents) | 449 | util.write_file(FSTAB_PATH, contents) |
3298 | 437 | 450 | ||
3299 | 451 | activate_cmds = [] | ||
3300 | 438 | if needswap: | 452 | if needswap: |
3305 | 439 | try: | 453 | activate_cmds.append(["swapon", "-a"]) |
3302 | 440 | util.subp(("swapon", "-a")) | ||
3303 | 441 | except Exception: | ||
3304 | 442 | util.logexc(log, "Activating swap via 'swapon -a' failed") | ||
3306 | 443 | 454 | ||
3308 | 444 | for d in dirs: | 455 | if len(sops) == 0: |
3309 | 456 | log.debug("No changes to /etc/fstab made.") | ||
3310 | 457 | else: | ||
3311 | 458 | log.debug("Changes to fstab: %s", sops) | ||
3312 | 459 | activate_cmds.append(["mount", "-a"]) | ||
3313 | 460 | if uses_systemd: | ||
3314 | 461 | activate_cmds.append(["systemctl", "daemon-reload"]) | ||
3315 | 462 | |||
3316 | 463 | fmt = "Activating swap and mounts with: %s" | ||
3317 | 464 | for cmd in activate_cmds: | ||
3318 | 465 | fmt = "Activate mounts: %s:" + ' '.join(cmd) | ||
3319 | 445 | try: | 466 | try: |
3323 | 446 | util.ensure_dir(d) | 467 | util.subp(cmd) |
3324 | 447 | except Exception: | 468 | log.debug(fmt, "PASS") |
3325 | 448 | util.logexc(log, "Failed to make '%s' config-mount", d) | 469 | except util.ProcessExecutionError: |
3326 | 470 | log.warn(fmt, "FAIL") | ||
3327 | 471 | util.logexc(log, fmt, "FAIL") | ||
3328 | 449 | 472 | ||
3333 | 450 | try: | 473 | # vi: ts=4 expandtab |
3330 | 451 | util.subp(("mount", "-a")) | ||
3331 | 452 | except util.ProcessExecutionError: | ||
3332 | 453 | util.logexc(log, "Activating mounts via 'mount -a' failed") | ||
3334 | diff --git a/cloudinit/config/cc_ntp.py b/cloudinit/config/cc_ntp.py | |||
3335 | index 7cda317..e33032f 100644 | |||
3336 | --- a/cloudinit/config/cc_ntp.py | |||
3337 | +++ b/cloudinit/config/cc_ntp.py | |||
3338 | @@ -1,20 +1,8 @@ | |||
3344 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2016 Canonical Ltd. |
3340 | 2 | # | ||
3341 | 3 | # Copyright (C) 2016 Canonical Ltd. | ||
3342 | 4 | # | ||
3343 | 5 | # Author: Ryan Harper <ryan.harper@canonical.com> | ||
3345 | 6 | # | 2 | # |
3349 | 7 | # This program is free software: you can redistribute it and/or modify | 3 | # Author: Ryan Harper <ryan.harper@canonical.com> |
3347 | 8 | # it under the terms of the GNU General Public License version 3, as | ||
3348 | 9 | # published by the Free Software Foundation. | ||
3350 | 10 | # | 4 | # |
3358 | 11 | # This program is distributed in the hope that it will be useful, | 5 | # This file is part of cloud-init. See LICENSE file for license information. |
3352 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3353 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3354 | 14 | # GNU General Public License for more details. | ||
3355 | 15 | # | ||
3356 | 16 | # You should have received a copy of the GNU General Public License | ||
3357 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3359 | 18 | 6 | ||
3360 | 19 | """ | 7 | """ |
3361 | 20 | NTP | 8 | NTP |
3362 | @@ -136,3 +124,5 @@ def write_ntp_config_template(cfg, cloud): | |||
3363 | 136 | "not rendering %s"), NTP_CONF) | 124 | "not rendering %s"), NTP_CONF) |
3364 | 137 | 125 | ||
3365 | 138 | templater.render_to_file(template_fn, NTP_CONF, params) | 126 | templater.render_to_file(template_fn, NTP_CONF, params) |
3366 | 127 | |||
3367 | 128 | # vi: ts=4 expandtab | ||
3368 | diff --git a/cloudinit/config/cc_package_update_upgrade_install.py b/cloudinit/config/cc_package_update_upgrade_install.py | |||
3369 | index 6d71761..17b9101 100644 | |||
3370 | --- a/cloudinit/config/cc_package_update_upgrade_install.py | |||
3371 | +++ b/cloudinit/config/cc_package_update_upgrade_install.py | |||
3372 | @@ -1,20 +1,8 @@ | |||
3378 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2012 Yahoo! Inc. |
3374 | 2 | # | ||
3375 | 3 | # Copyright (C) 2012 Yahoo! Inc. | ||
3376 | 4 | # | ||
3377 | 5 | # Author: Joshua Harlow <harlowja@yahoo-inc.com> | ||
3379 | 6 | # | 2 | # |
3383 | 7 | # This program is free software: you can redistribute it and/or modify | 3 | # Author: Joshua Harlow <harlowja@yahoo-inc.com> |
3381 | 8 | # it under the terms of the GNU General Public License version 3, as | ||
3382 | 9 | # published by the Free Software Foundation. | ||
3384 | 10 | # | 4 | # |
3392 | 11 | # This program is distributed in the hope that it will be useful, | 5 | # This file is part of cloud-init. See LICENSE file for license information. |
3386 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3387 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3388 | 14 | # GNU General Public License for more details. | ||
3389 | 15 | # | ||
3390 | 16 | # You should have received a copy of the GNU General Public License | ||
3391 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3393 | 18 | 6 | ||
3394 | 19 | """ | 7 | """ |
3395 | 20 | Package Update Upgrade Install | 8 | Package Update Upgrade Install |
3396 | @@ -132,3 +120,5 @@ def handle(_name, cfg, cloud, log, _args): | |||
3397 | 132 | log.warn("%s failed with exceptions, re-raising the last one", | 120 | log.warn("%s failed with exceptions, re-raising the last one", |
3398 | 133 | len(errors)) | 121 | len(errors)) |
3399 | 134 | raise errors[-1] | 122 | raise errors[-1] |
3400 | 123 | |||
3401 | 124 | # vi: ts=4 expandtab | ||
3402 | diff --git a/cloudinit/config/cc_phone_home.py b/cloudinit/config/cc_phone_home.py | |||
3403 | index cb70d39..878069b 100644 | |||
3404 | --- a/cloudinit/config/cc_phone_home.py | |||
3405 | +++ b/cloudinit/config/cc_phone_home.py | |||
3406 | @@ -1,22 +1,10 @@ | |||
3414 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2011 Canonical Ltd. |
3415 | 2 | # | 2 | # Copyright (C) 2012, 2013 Hewlett-Packard Development Company, L.P. |
3409 | 3 | # Copyright (C) 2011 Canonical Ltd. | ||
3410 | 4 | # Copyright (C) 2012, 2013 Hewlett-Packard Development Company, L.P. | ||
3411 | 5 | # | ||
3412 | 6 | # Author: Scott Moser <scott.moser@canonical.com> | ||
3413 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
3416 | 8 | # | 3 | # |
3420 | 9 | # This program is free software: you can redistribute it and/or modify | 4 | # Author: Scott Moser <scott.moser@canonical.com> |
3421 | 10 | # it under the terms of the GNU General Public License version 3, as | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
3419 | 11 | # published by the Free Software Foundation. | ||
3422 | 12 | # | 6 | # |
3430 | 13 | # This program is distributed in the hope that it will be useful, | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
3424 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3425 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3426 | 16 | # GNU General Public License for more details. | ||
3427 | 17 | # | ||
3428 | 18 | # You should have received a copy of the GNU General Public License | ||
3429 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3431 | 20 | 8 | ||
3432 | 21 | """ | 9 | """ |
3433 | 22 | Phone Home | 10 | Phone Home |
3434 | @@ -154,3 +142,5 @@ def handle(name, cfg, cloud, log, args): | |||
3435 | 154 | except Exception: | 142 | except Exception: |
3436 | 155 | util.logexc(log, "Failed to post phone home data to %s in %s tries", | 143 | util.logexc(log, "Failed to post phone home data to %s in %s tries", |
3437 | 156 | url, tries) | 144 | url, tries) |
3438 | 145 | |||
3439 | 146 | # vi: ts=4 expandtab | ||
3440 | diff --git a/cloudinit/config/cc_power_state_change.py b/cloudinit/config/cc_power_state_change.py | |||
3441 | index 61b5416..c1c6fe7 100644 | |||
3442 | --- a/cloudinit/config/cc_power_state_change.py | |||
3443 | +++ b/cloudinit/config/cc_power_state_change.py | |||
3444 | @@ -1,20 +1,8 @@ | |||
3450 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2011 Canonical Ltd. |
3446 | 2 | # | ||
3447 | 3 | # Copyright (C) 2011 Canonical Ltd. | ||
3448 | 4 | # | ||
3449 | 5 | # Author: Scott Moser <scott.moser@canonical.com> | ||
3451 | 6 | # | 2 | # |
3455 | 7 | # This program is free software: you can redistribute it and/or modify | 3 | # Author: Scott Moser <scott.moser@canonical.com> |
3453 | 8 | # it under the terms of the GNU General Public License version 3, as | ||
3454 | 9 | # published by the Free Software Foundation. | ||
3456 | 10 | # | 4 | # |
3464 | 11 | # This program is distributed in the hope that it will be useful, | 5 | # This file is part of cloud-init. See LICENSE file for license information. |
3458 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3459 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3460 | 14 | # GNU General Public License for more details. | ||
3461 | 15 | # | ||
3462 | 16 | # You should have received a copy of the GNU General Public License | ||
3463 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3465 | 18 | 6 | ||
3466 | 19 | """ | 7 | """ |
3467 | 20 | Power State Change | 8 | Power State Change |
3468 | @@ -266,3 +254,5 @@ def run_after_pid_gone(pid, pidcmdline, timeout, log, condition, func, args): | |||
3469 | 266 | fatal("Unexpected Exception when checking condition: %s" % e) | 254 | fatal("Unexpected Exception when checking condition: %s" % e) |
3470 | 267 | 255 | ||
3471 | 268 | func(*args) | 256 | func(*args) |
3472 | 257 | |||
3473 | 258 | # vi: ts=4 expandtab | ||
3474 | diff --git a/cloudinit/config/cc_puppet.py b/cloudinit/config/cc_puppet.py | |||
3475 | index bfd630d..dc11561 100644 | |||
3476 | --- a/cloudinit/config/cc_puppet.py | |||
3477 | +++ b/cloudinit/config/cc_puppet.py | |||
3478 | @@ -1,22 +1,10 @@ | |||
3486 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2009-2010 Canonical Ltd. |
3487 | 2 | # | 2 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
3481 | 3 | # Copyright (C) 2009-2010 Canonical Ltd. | ||
3482 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
3483 | 5 | # | ||
3484 | 6 | # Author: Scott Moser <scott.moser@canonical.com> | ||
3485 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
3488 | 8 | # | 3 | # |
3492 | 9 | # This program is free software: you can redistribute it and/or modify | 4 | # Author: Scott Moser <scott.moser@canonical.com> |
3493 | 10 | # it under the terms of the GNU General Public License version 3, as | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
3491 | 11 | # published by the Free Software Foundation. | ||
3494 | 12 | # | 6 | # |
3502 | 13 | # This program is distributed in the hope that it will be useful, | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
3496 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3497 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3498 | 16 | # GNU General Public License for more details. | ||
3499 | 17 | # | ||
3500 | 18 | # You should have received a copy of the GNU General Public License | ||
3501 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3503 | 20 | 8 | ||
3504 | 21 | """ | 9 | """ |
3505 | 22 | Puppet | 10 | Puppet |
3506 | @@ -161,3 +149,5 @@ def handle(name, cfg, cloud, log, _args): | |||
3507 | 161 | 149 | ||
3508 | 162 | # Start puppetd | 150 | # Start puppetd |
3509 | 163 | util.subp(['service', 'puppet', 'start'], capture=False) | 151 | util.subp(['service', 'puppet', 'start'], capture=False) |
3510 | 152 | |||
3511 | 153 | # vi: ts=4 expandtab | ||
3512 | diff --git a/cloudinit/config/cc_resizefs.py b/cloudinit/config/cc_resizefs.py | |||
3513 | index 1b91796..e028abf 100644 | |||
3514 | --- a/cloudinit/config/cc_resizefs.py | |||
3515 | +++ b/cloudinit/config/cc_resizefs.py | |||
3516 | @@ -1,22 +1,10 @@ | |||
3528 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2011 Canonical Ltd. |
3529 | 2 | # | 2 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
3519 | 3 | # Copyright (C) 2011 Canonical Ltd. | ||
3520 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
3521 | 5 | # | ||
3522 | 6 | # Author: Scott Moser <scott.moser@canonical.com> | ||
3523 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
3524 | 8 | # | ||
3525 | 9 | # This program is free software: you can redistribute it and/or modify | ||
3526 | 10 | # it under the terms of the GNU General Public License version 3, as | ||
3527 | 11 | # published by the Free Software Foundation. | ||
3530 | 12 | # | 3 | # |
3535 | 13 | # This program is distributed in the hope that it will be useful, | 4 | # Author: Scott Moser <scott.moser@canonical.com> |
3536 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
3533 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3534 | 16 | # GNU General Public License for more details. | ||
3537 | 17 | # | 6 | # |
3540 | 18 | # You should have received a copy of the GNU General Public License | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
3539 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3541 | 20 | 8 | ||
3542 | 21 | """ | 9 | """ |
3543 | 22 | Resizefs | 10 | Resizefs |
3544 | @@ -69,6 +57,7 @@ def _resize_xfs(mount_point, devpth): | |||
3545 | 69 | def _resize_ufs(mount_point, devpth): | 57 | def _resize_ufs(mount_point, devpth): |
3546 | 70 | return ('growfs', devpth) | 58 | return ('growfs', devpth) |
3547 | 71 | 59 | ||
3548 | 60 | |||
3549 | 72 | # Do not use a dictionary as these commands should be able to be used | 61 | # Do not use a dictionary as these commands should be able to be used |
3550 | 73 | # for multiple filesystem types if possible, e.g. one command for | 62 | # for multiple filesystem types if possible, e.g. one command for |
3551 | 74 | # ext2, ext3 and ext4. | 63 | # ext2, ext3 and ext4. |
3552 | @@ -209,3 +198,5 @@ def do_resize(resize_cmd, log): | |||
3553 | 209 | raise | 198 | raise |
3554 | 210 | # TODO(harlowja): Should we add a fsck check after this to make | 199 | # TODO(harlowja): Should we add a fsck check after this to make |
3555 | 211 | # sure we didn't corrupt anything? | 200 | # sure we didn't corrupt anything? |
3556 | 201 | |||
3557 | 202 | # vi: ts=4 expandtab | ||
3558 | diff --git a/cloudinit/config/cc_resolv_conf.py b/cloudinit/config/cc_resolv_conf.py | |||
3559 | index feea565..9c5cd1f 100644 | |||
3560 | --- a/cloudinit/config/cc_resolv_conf.py | |||
3561 | +++ b/cloudinit/config/cc_resolv_conf.py | |||
3562 | @@ -1,22 +1,10 @@ | |||
3570 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2013 Craig Tracey |
3571 | 2 | # | 2 | # Copyright (C) 2013 Hewlett-Packard Development Company, L.P. |
3565 | 3 | # Copyright (C) 2013 Craig Tracey | ||
3566 | 4 | # Copyright (C) 2013 Hewlett-Packard Development Company, L.P. | ||
3567 | 5 | # | ||
3568 | 6 | # Author: Craig Tracey <craigtracey@gmail.com> | ||
3569 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
3572 | 8 | # | 3 | # |
3576 | 9 | # This program is free software: you can redistribute it and/or modify | 4 | # Author: Craig Tracey <craigtracey@gmail.com> |
3577 | 10 | # it under the terms of the GNU General Public License version 3, as | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
3575 | 11 | # published by the Free Software Foundation. | ||
3578 | 12 | # | 6 | # |
3586 | 13 | # This program is distributed in the hope that it will be useful, | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
3580 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3581 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3582 | 16 | # GNU General Public License for more details. | ||
3583 | 17 | # | ||
3584 | 18 | # You should have received a copy of the GNU General Public License | ||
3585 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3587 | 20 | 8 | ||
3588 | 21 | """ | 9 | """ |
3589 | 22 | Resolv Conf | 10 | Resolv Conf |
3590 | @@ -123,3 +111,5 @@ def handle(name, cfg, cloud, log, _args): | |||
3591 | 123 | 111 | ||
3592 | 124 | generate_resolv_conf(template_fn=template_fn, params=cfg["resolv_conf"]) | 112 | generate_resolv_conf(template_fn=template_fn, params=cfg["resolv_conf"]) |
3593 | 125 | return | 113 | return |
3594 | 114 | |||
3595 | 115 | # vi: ts=4 expandtab | ||
3596 | diff --git a/cloudinit/config/cc_rh_subscription.py b/cloudinit/config/cc_rh_subscription.py | |||
3597 | index d858f65..7f36cf8 100644 | |||
3598 | --- a/cloudinit/config/cc_rh_subscription.py | |||
3599 | +++ b/cloudinit/config/cc_rh_subscription.py | |||
3600 | @@ -1,20 +1,8 @@ | |||
3606 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2015 Red Hat, Inc. |
3602 | 2 | # | ||
3603 | 3 | # Copyright (C) 2015 Red Hat, Inc. | ||
3604 | 4 | # | ||
3605 | 5 | # Author: Brent Baude <bbaude@redhat.com> | ||
3607 | 6 | # | 2 | # |
3611 | 7 | # This program is free software: you can redistribute it and/or modify | 3 | # Author: Brent Baude <bbaude@redhat.com> |
3609 | 8 | # it under the terms of the GNU General Public License version 3, as | ||
3610 | 9 | # published by the Free Software Foundation. | ||
3612 | 10 | # | 4 | # |
3620 | 11 | # This program is distributed in the hope that it will be useful, | 5 | # This file is part of cloud-init. See LICENSE file for license information. |
3614 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3615 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3616 | 14 | # GNU General Public License for more details. | ||
3617 | 15 | # | ||
3618 | 16 | # You should have received a copy of the GNU General Public License | ||
3619 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3621 | 18 | 6 | ||
3622 | 19 | """ | 7 | """ |
3623 | 20 | RedHat Subscription | 8 | RedHat Subscription |
3624 | @@ -421,11 +409,12 @@ class SubscriptionManager(object): | |||
3625 | 421 | "because it is not enabled".format(fail)) | 409 | "because it is not enabled".format(fail)) |
3626 | 422 | 410 | ||
3627 | 423 | cmd = ['repos'] | 411 | cmd = ['repos'] |
3628 | 424 | if len(enable_list) > 0: | ||
3629 | 425 | cmd.extend(enable_list) | ||
3630 | 426 | if len(disable_list) > 0: | 412 | if len(disable_list) > 0: |
3631 | 427 | cmd.extend(disable_list) | 413 | cmd.extend(disable_list) |
3632 | 428 | 414 | ||
3633 | 415 | if len(enable_list) > 0: | ||
3634 | 416 | cmd.extend(enable_list) | ||
3635 | 417 | |||
3636 | 429 | try: | 418 | try: |
3637 | 430 | self._sub_man_cli(cmd) | 419 | self._sub_man_cli(cmd) |
3638 | 431 | except util.ProcessExecutionError as e: | 420 | except util.ProcessExecutionError as e: |
3639 | @@ -442,3 +431,5 @@ class SubscriptionManager(object): | |||
3640 | 442 | 431 | ||
3641 | 443 | def is_configured(self): | 432 | def is_configured(self): |
3642 | 444 | return bool((self.userid and self.password) or self.activation_key) | 433 | return bool((self.userid and self.password) or self.activation_key) |
3643 | 434 | |||
3644 | 435 | # vi: ts=4 expandtab | ||
3645 | diff --git a/cloudinit/config/cc_rightscale_userdata.py b/cloudinit/config/cc_rightscale_userdata.py | |||
3646 | index 6cf8c94..4e34c7e 100644 | |||
3647 | --- a/cloudinit/config/cc_rightscale_userdata.py | |||
3648 | +++ b/cloudinit/config/cc_rightscale_userdata.py | |||
3649 | @@ -1,22 +1,10 @@ | |||
3657 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2011 Canonical Ltd. |
3658 | 2 | # | 2 | # Copyright (C) 2012, 2013 Hewlett-Packard Development Company, L.P. |
3652 | 3 | # Copyright (C) 2011 Canonical Ltd. | ||
3653 | 4 | # Copyright (C) 2012, 2013 Hewlett-Packard Development Company, L.P. | ||
3654 | 5 | # | ||
3655 | 6 | # Author: Scott Moser <scott.moser@canonical.com> | ||
3656 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
3659 | 8 | # | 3 | # |
3663 | 9 | # This program is free software: you can redistribute it and/or modify | 4 | # Author: Scott Moser <scott.moser@canonical.com> |
3664 | 10 | # it under the terms of the GNU General Public License version 3, as | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
3662 | 11 | # published by the Free Software Foundation. | ||
3665 | 12 | # | 6 | # |
3673 | 13 | # This program is distributed in the hope that it will be useful, | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
3667 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3668 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3669 | 16 | # GNU General Public License for more details. | ||
3670 | 17 | # | ||
3671 | 18 | # You should have received a copy of the GNU General Public License | ||
3672 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3674 | 20 | 8 | ||
3675 | 21 | """ | 9 | """ |
3676 | 22 | Rightscale Userdata | 10 | Rightscale Userdata |
3677 | @@ -126,3 +114,5 @@ def handle(name, _cfg, cloud, log, _args): | |||
3678 | 126 | log.warn("%s failed with exceptions, re-raising the last one", | 114 | log.warn("%s failed with exceptions, re-raising the last one", |
3679 | 127 | len(captured_excps)) | 115 | len(captured_excps)) |
3680 | 128 | raise captured_excps[-1] | 116 | raise captured_excps[-1] |
3681 | 117 | |||
3682 | 118 | # vi: ts=4 expandtab | ||
3683 | diff --git a/cloudinit/config/cc_rsyslog.py b/cloudinit/config/cc_rsyslog.py | |||
3684 | index 1c12e56..5031621 100644 | |||
3685 | --- a/cloudinit/config/cc_rsyslog.py | |||
3686 | +++ b/cloudinit/config/cc_rsyslog.py | |||
3687 | @@ -1,22 +1,11 @@ | |||
3699 | 1 | # vi: ts=4 expandtab syntax=python | 1 | # Copyright (C) 2009-2010 Canonical Ltd. |
3700 | 2 | # | 2 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
3690 | 3 | # Copyright (C) 2009-2010 Canonical Ltd. | ||
3691 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
3692 | 5 | # | ||
3693 | 6 | # Author: Scott Moser <scott.moser@canonical.com> | ||
3694 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
3695 | 8 | # | ||
3696 | 9 | # This program is free software: you can redistribute it and/or modify | ||
3697 | 10 | # it under the terms of the GNU General Public License version 3, as | ||
3698 | 11 | # published by the Free Software Foundation. | ||
3701 | 12 | # | 3 | # |
3706 | 13 | # This program is distributed in the hope that it will be useful, | 4 | # Author: Scott Moser <scott.moser@canonical.com> |
3707 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
3704 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3705 | 16 | # GNU General Public License for more details. | ||
3708 | 17 | # | 6 | # |
3711 | 18 | # You should have received a copy of the GNU General Public License | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
3712 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 8 | |
3713 | 20 | """ | 9 | """ |
3714 | 21 | .. _cc_rsyslog: | 10 | .. _cc_rsyslog: |
3715 | 22 | 11 | ||
3716 | @@ -451,3 +440,5 @@ def handle(name, cfg, cloud, log, _args): | |||
3717 | 451 | # This should now use rsyslog if | 440 | # This should now use rsyslog if |
3718 | 452 | # the logging was setup to use it... | 441 | # the logging was setup to use it... |
3719 | 453 | log.debug("%s configured %s files", name, changes) | 442 | log.debug("%s configured %s files", name, changes) |
3720 | 443 | |||
3721 | 444 | # vi: ts=4 expandtab syntax=python | ||
3722 | diff --git a/cloudinit/config/cc_runcmd.py b/cloudinit/config/cc_runcmd.py | |||
3723 | index 23e1e89..dfa8cb3 100644 | |||
3724 | --- a/cloudinit/config/cc_runcmd.py | |||
3725 | +++ b/cloudinit/config/cc_runcmd.py | |||
3726 | @@ -1,22 +1,10 @@ | |||
3734 | 1 | # vi: ts=4 expandtab | 1 | # Copyright (C) 2009-2010 Canonical Ltd. |
3735 | 2 | # | 2 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. |
3729 | 3 | # Copyright (C) 2009-2010 Canonical Ltd. | ||
3730 | 4 | # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. | ||
3731 | 5 | # | ||
3732 | 6 | # Author: Scott Moser <scott.moser@canonical.com> | ||
3733 | 7 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> | ||
3736 | 8 | # | 3 | # |
3740 | 9 | # This program is free software: you can redistribute it and/or modify | 4 | # Author: Scott Moser <scott.moser@canonical.com> |
3741 | 10 | # it under the terms of the GNU General Public License version 3, as | 5 | # Author: Juerg Haefliger <juerg.haefliger@hp.com> |
3739 | 11 | # published by the Free Software Foundation. | ||
3742 | 12 | # | 6 | # |
3750 | 13 | # This program is distributed in the hope that it will be useful, | 7 | # This file is part of cloud-init. See LICENSE file for license information. |
3744 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3745 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3746 | 16 | # GNU General Public License for more details. | ||
3747 | 17 | # | ||
3748 | 18 | # You should have received a copy of the GNU General Public License | ||
3749 | 19 |
utACK