diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-01-16 16:54:23 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-01-16 16:54:23 -0500 |
commit | 8a952c7c7797e2a1dfcd2be1c3a983de767de04e (patch) | |
tree | c7019672aedd90e6d558c7aaffaf14d1276abc52 /cloudinit/sources/__init__.py | |
parent | 16cb9ef67725091235ddafd70b43bf715020d504 (diff) | |
download | vyos-cloud-init-8a952c7c7797e2a1dfcd2be1c3a983de767de04e.tar.gz vyos-cloud-init-8a952c7c7797e2a1dfcd2be1c3a983de767de04e.zip |
DataSource: remove has_vendordata and consume_vendordata, drop filters
remove apply_filter from get_vendordata. I can't think of a good
reason to filter vendor-data per instance-id.
remove has_vendordata and consume_vendordata.
has vendordata is always "true", whether or not there is something
to operate is determined by:
if ds.vendordata_raw()
consume_vendordata is based on config entirely.
Diffstat (limited to 'cloudinit/sources/__init__.py')
-rw-r--r-- | cloudinit/sources/__init__.py | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/cloudinit/sources/__init__.py b/cloudinit/sources/__init__.py index a7c7993f..7e11c1ca 100644 --- a/cloudinit/sources/__init__.py +++ b/cloudinit/sources/__init__.py @@ -82,25 +82,11 @@ class DataSource(object): return self._filter_xdata(self.userdata) return self.userdata - def get_vendordata(self, apply_filter=False): + def get_vendordata(self) if self.vendordata is None: self.vendordata = self.ud_proc.process(self.get_vendordata_raw()) - if apply_filter: - return self._filter_xdata(self.vendordata) return self.vendordata - def has_vendordata(self): - if self.vendordata_raw is not None: - return True - return False - - def consume_vendordata(self): - """ - The datasource may allow for consumption of vendordata, but only - when the datasource has allowed it. The default is false. - """ - return False - @property def launch_index(self): if not self.metadata: |