From 0247b1be0ae3d1bc913b5e368dadf22e26b54b86 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Sun, 19 Aug 2012 22:28:14 -0700 Subject: Add a 'none' datasource as a last resort fallback 1. This will allow a basically empty datasource to be activated (as the last datasource) when no other datasources work. This allows modules to still run (if they can, new function added to the datasource if modules want to check if cloud-init is in this 'disconnected' state). --- cloudinit/sources/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cloudinit/sources/__init__.py') diff --git a/cloudinit/sources/__init__.py b/cloudinit/sources/__init__.py index b25724a5..ca9f58e5 100644 --- a/cloudinit/sources/__init__.py +++ b/cloudinit/sources/__init__.py @@ -65,6 +65,10 @@ class DataSource(object): self.userdata = self.ud_proc.process(raw_data) return self.userdata + @property + def is_disconnected(self): + return False + def get_userdata_raw(self): return self.userdata_raw -- cgit v1.2.3