diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-08-20 21:27:04 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-08-20 21:27:04 -0400 |
commit | 989252019b14c7147367ffddaa990b371438fa7c (patch) | |
tree | be49fc53b38eca8eef5e074efa2e198a40004305 /cloudinit/sources/__init__.py | |
parent | a2ebfe8f6f31ae6972620f271ab9fa935d46dff1 (diff) | |
parent | c1d2bc7ff9824b967cca21ed0254e4ee47168b10 (diff) | |
download | vyos-cloud-init-989252019b14c7147367ffddaa990b371438fa7c.tar.gz vyos-cloud-init-989252019b14c7147367ffddaa990b371438fa7c.zip |
Add the "None" datasource
The None datasource is the last resort fallback datasource. It is
identifiable by a property 'is_disconnected' that indicates that the
datasource used is "not connected to a datasource".
This will allow any thing that needs to run to still run in the absense
of a DataSource.
Also, we add a logging of the datasource found in final_message, and
a warning if the None datasource is found.
LP: #906669
Diffstat (limited to 'cloudinit/sources/__init__.py')
-rw-r--r-- | cloudinit/sources/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
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 |