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

« back to all changes in this revision

Viewing changes to bin/cloud-init

  • 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:
263
263
                return (None, [])
264
264
            else:
265
265
                return (None, ["No instance datasource found."])
 
266
 
 
267
    if args.local:
 
268
        init.apply_network_config()
 
269
 
 
270
    if args.local and init.is_transfer():
 
271
        init.store_transfer()
 
272
        return (init.datasource, [])
 
273
    elif init.is_transfer():
 
274
        raise Exception("Transfer datasource returned in network search: %s",
 
275
                        init.datasource)
 
276
 
266
277
    # Stage 6
267
278
    iid = init.instancify()
268
279
    LOG.debug("%s will now be targeting instance id: %s", name, iid)