diff options
author | Joshua Harlow <harlowja@gmail.com> | 2012-08-19 22:28:14 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@gmail.com> | 2012-08-19 22:28:14 -0700 |
commit | 0247b1be0ae3d1bc913b5e368dadf22e26b54b86 (patch) | |
tree | 25c07e9079612edbd6901788ace9a7e13bb1d8d8 /cloudinit/sources/__init__.py | |
parent | 4540821caa31dc9ed0bedf521cd36975ddafebfa (diff) | |
download | vyos-cloud-init-0247b1be0ae3d1bc913b5e368dadf22e26b54b86.tar.gz vyos-cloud-init-0247b1be0ae3d1bc913b5e368dadf22e26b54b86.zip |
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).
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 |