summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceGCE.py
Commit message (Collapse)AuthorAgeFilesLines
* README: Mention move of revision control to git.HEADtrunkScott Moser2016-08-101-167/+0
| | | | | | | | | | | | | | cloud-init development has moved its revision control to git. It is available at https://code.launchpad.net/cloud-init Clone with git clone https://git.launchpad.net/cloud-init or git clone git+ssh://git.launchpad.net/cloud-init For more information see https://git.launchpad.net/cloud-init/tree/HACKING.rst
* Re-apply "Remove trailing dot from GCE metadata URL (LP: #1581200) [Phil Roche]"Daniel Watkins2016-06-151-1/+1
| | | | | This commit includes the content of that commit, plus a fix for the tests (provided by Phil).
* [Revert] Remove trailing dot from GCE metadata URLScott Moser2016-06-141-1/+1
| | | | This change broke tox tests.
* Removes trailing dot in metadata.google.internal GCE metadata lookup.Phil Roche2016-06-131-1/+1
| | | | | | | | | | | | | | | | A bug was reported (lp:1581200) where if there is no DNS server configured or it is not running then the metadata lookup on GCE will fail as it contains a trailing dot 'metadata.google.internal.'. As there is no DNS configured or running it will use the /etc/hosts file but the hosts file does not contain an entry with the trailing dot. One solution is to add an entry to the /etc/hosts file with the trailing dot but according to the manpage, /etc/hosts entries must end with an alphanumeric character and cannot end with a dot. The trailing dot was added to avoid MIM by dns search but we should probably assume the instance being started has no DNS and as such when querying metadata should use a URL that will resolve using /etc/hosts.
* Fix up a ton of flake8 issuesJoshua Harlow2016-05-121-2/+2
|
* Add DataSource.region and use it in mirror selection.Daniel Watkins2015-07-221-0/+4
| | | | Also implement DataSource.region for EC2 and GCE data sources.
* Return a sensible value for DataSourceGCE.availability_zone.Daniel Watkins2015-07-061-0/+4
|
* GCE instance-level SSH keys override project-level keys. (LP: #1403617)Daniel Watkins2015-04-201-1/+2
|
* Support multiple metadata paths for metadata keys in GCE data source.Daniel Watkins2015-04-201-11/+15
|
* Rename found variable in GCE data source.Daniel Watkins2015-04-201-4/+4
|
* Refactor GCE metadata fetching to use a helper class.Daniel Watkins2015-04-201-33/+36
|
* move towards user-data being binaryScott Moser2015-02-251-9/+12
| | | | | | | | | | | | | | | | UrlResponse: biggest change... make readurl return bytes, making user know what to do with it. util: add load_tfile_or_url for loading text file or url as read_file_or_url now returns bytes ec2_utils: all meta-data is text, remove non-obvious string translations DigitalOcean: adjust for ec2_utils DataSourceGCE, DataSourceMAAS: user-data is binary other fields are text. openstack.py: read paths without decoding to text. This is ok as paths other than user-data are json, and load_json will handle load_file still returns text, and that is what most things use.
* Make parameter list for get_hostname method consistentMarco Morais2015-01-221-1/+1
| | | | | | | | The sources.DataSource class has method defined as: def get_hostname(self, fqdn=False, resolve_ip=False) Make the parameter list for this method in DataSourceDigitalOcean and DataSourceGCE consistent with superclass sources.DataSource.
* pep8 fixesScott Moser2015-01-161-2/+5
|
* Use the short name for GCE hostnames per GCE's request (LP: #1383794).Ben Howard2015-01-141-1/+2
|
* Corrected errant logging message.Wayne Witzel III2015-01-061-4/+4
|
* add user-data encoding support for gceWayne Witzel III2014-12-191-0/+9
|
* DataSourceGCE: fix 'is_resolvable', remove unnecessary WARNScott Moser2014-02-141-5/+2
|
* some style changes, some pylint, be less noisyScott Moser2014-02-131-21/+44
| | | | | | | | | this changes url_map to a list and adds 'required' information. * If we've not already found an entry, and this is required, then debug log (ie, this is just not GCE). * if we already found an entry and this is required: warn split the keys fixing out of the loop.
* GCE: use dns name instead of IP addressVaidas Jablonskis2014-02-131-7/+4
|
* GCE: add unit tests, user-data support and few other fixesVaidas Jablonskis2014-02-131-24/+25
|
* add 'user-data' support.Scott Moser2014-02-131-4/+11
| | | | | This just adds user-data in 'instance/attributes/user-data'. Also turns retries to 0 on all other things.
* support configuration of MD_URL, disable if not resolvable.Scott Moser2014-02-121-2/+13
| | | | | | | | | | this allows the metadata url to be configured by setting: datasource: GCE: metadata_url: <value> Then also, if its not resolvable, we just deactivate the datasource quickly.
* wrap url get call in try/except clauseVaidas Jablonskis2014-02-081-1/+4
|
* Forgot to include _trim_key functionVaidas Jablonskis2014-02-071-0/+10
| | | | Got removed somehow
* use url_helper instead of requestsVaidas Jablonskis2014-02-071-26/+12
|
* Add Google Compute Engine data source support.Vaidas Jablonskis2014-02-031-0/+100