summaryrefslogtreecommitdiff
path: root/cloudinit/sources/helpers/vmware/imc/guestcust_event.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-03-17 17:00:46 -0400
committerScott Moser <smoser@ubuntu.com>2016-03-17 17:00:46 -0400
commit56402e91e95960f54a39eb18cbda391f00f95b6e (patch)
tree4719aaa98096cb1b062b29768888eb1fa3785fc8 /cloudinit/sources/helpers/vmware/imc/guestcust_event.py
parenta27abb80969fd35dc150bcb2d9bddb7dbf98babe (diff)
parent13a32d7599a939370ee0bc0e7257da2c59b4bd61 (diff)
downloadvyos-cloud-init-56402e91e95960f54a39eb18cbda391f00f95b6e.tar.gz
vyos-cloud-init-56402e91e95960f54a39eb18cbda391f00f95b6e.zip
Send proper SUCCESS / FAILED events to the underlying VMware hypervisor.
Added code to customize timezone. Added few utility functions to send events to the VMware hypervisor. Re-factored the code little bit. Added code to send SUCCESS event when customization succeeds. Added code to send FAILED event if any error occurs during customization.
Diffstat (limited to 'cloudinit/sources/helpers/vmware/imc/guestcust_event.py')
-rw-r--r--cloudinit/sources/helpers/vmware/imc/guestcust_event.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/cloudinit/sources/helpers/vmware/imc/guestcust_event.py b/cloudinit/sources/helpers/vmware/imc/guestcust_event.py
new file mode 100644
index 00000000..fc22568f
--- /dev/null
+++ b/cloudinit/sources/helpers/vmware/imc/guestcust_event.py
@@ -0,0 +1,27 @@
+# vi: ts=4 expandtab
+#
+# Copyright (C) 2016 Canonical Ltd.
+# Copyright (C) 2016 VMware Inc.
+#
+# Author: Sankar Tanguturi <stanguturi@vmware.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 3, as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+class GuestCustEventEnum:
+ """Specifies different types of Guest Customization Events"""
+
+ GUESTCUST_EVENT_CUSTOMIZE_FAILED = 100
+ GUESTCUST_EVENT_NETWORK_SETUP_FAILED = 101
+ GUESTCUST_EVENT_ENABLE_NICS = 103
+ GUESTCUST_EVENT_QUERY_NICS = 104