~smoser/cloud-init/trunk.transfer-ds

« back to all changes in this revision

Viewing changes to cloudinit/helpers.py

  • Committer: Scott Moser
  • Date: 2016-03-22 08:08:51 UTC
  • Revision ID: smoser@ubuntu.com-20160322080851-3hiise035rniilq2
commit data source transfer stuff

the goal here is to make a v2 datasources that are mroe aware of
network_config and can return a 'transfer' mode, taht basically
says "Yes,  I'm the datasource you're looking for, but I need some network".

I walked through the DS and looked which ones could benefit from this.
The first ones to look at would be:
ConfigDrive: claim, hostname, network
NoCloud    : claim, hostname, network
MAAS       : claim, network (disabled)
Azure      : claim, hostname

                  definitive hostname   network
== Pure Local ==
ConfigDrive:        YES       yes        yes
CloudSigma:         YES       yes        no
NoCloud             YES       yes        yes
OpenNebula          Weak      yes        yes
OVF                 Weak      yes        yes
SmartOS             YES       yes        no
AltCloud            YES       no         no

== Hybrid ==
Azure:              YES       yes        no
BigStep:            YES       no         could[partner mod]

== Pure Network ==
CloudStack:         NO        no         no
Ec2                 NO        no         yes[network]
GCE                 NO        no         no?
MAAS                YES       no         no
OpenStack           NO        no         no
DigitalOcean        NO        no         no

Show diffs side-by-side

added added

removed removed

Lines of Context:
335
335
        # This one isn't joined, since it should just be read-only
336
336
        template_dir = path_cfgs.get('templates_dir', '/etc/cloud/templates/')
337
337
        self.template_tpl = os.path.join(template_dir, '%s.tmpl')
 
338
        self.run_dir = path_cfgs.get('run', '/run/cloud-init')
 
339
        self.local_transfer_dir = os.path.join(self.run_dir, ".ltransfer")
338
340
        self.lookups = {
339
341
            "handlers": "handlers",
340
342
            "scripts": "scripts",