Diff comments:
> diff --git a/cloudinit/event.py b/cloudinit/event.py
> new file mode 100644
> index 0000000..f7b311f
> --- /dev/null
> +++ b/cloudinit/event.py
> @@ -0,0 +1,17 @@
> +# This file is part of cloud-init. See LICENSE file for license information.
> +
> +"""Classes and functions related to event handling."""
> +
> +
> +# Event types which can generate maintenance requests for cloud-init.
> +class EventType(object):
> + BOOT = "System boot"
> + BOOT_NEW_INSTANCE = "New instance first boot"
As I was looking at how I may configure this via the datasource, I realized I
would prefer one word values. Likewise, if configured via cloud config, the
same simple values would make for less error prone configuration. To make
debugging easier, update_metadata() should log the same values that are used
during configuration. The values above seem more appropriate for commands
and/or documentation.
For example, it would be nicer with smartos to use `vmadm update $uuid
maintain_network=boot_new_instance` or `mdata-put maintain_network
boot_new_instance` rather than `mdata-put maintain-network "New instance first
boot"`.
> +
> + # TODO: Cloud-init will grow support for the follow event types:
> + # UDEV
> + # METADATA_CHANGE
> + # USER_REQUEST
> +
> +
> +# vi: ts=4 expandtab
--
https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/348000
Your team cloud-init commiters is requested to review the proposed merge of
~chad.smith/cloud-init:feature/maintain-network-on-boot into cloud-init:master.
_______________________________________________
Mailing list: https://launchpad.net/~cloud-init-dev
Post to : cloud-init-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~cloud-init-dev
More help : https://help.launchpad.net/ListHelp