~harlowja/cloud-init/vd-helper-layer

« back to all changes in this revision

Viewing changes to cloudinit/sources/DataSourceOpenStack.py

  • Committer: Joshua Harlow
  • Date: 2014-03-02 01:17:02 UTC
  • Revision ID: harlowja@gmail.com-20140302011702-uxfm642lj29uk1fj
Do the vendor data namespace in the openstack helper

Since both the config drive datasource and the openstack
datasource expose the vendor data attribute make sure that
we do the namespacing in the underlying helper layer instead
of the datasource layer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
142
142
        self.userdata_raw = results.get('userdata')
143
143
        self.version = results['version']
144
144
        self.files.update(results.get('files', {}))
145
 
 
146
 
        # if vendordata includes 'cloud-init', then read that explicitly
147
 
        # for cloud-init (for namespacing).
148
 
        vd = results.get('vendordata')
149
 
        if isinstance(vd, dict) and 'cloud-init' in vd:
150
 
            self.vendordata_raw = vd['cloud-init']
151
 
        else:
152
 
            self.vendordata_raw = vd
153
 
 
 
145
        self.vendordata_raw = results.get('vendordata')
154
146
        return True
155
147
 
156
148