summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceCloudStack.py
Commit message (Collapse)AuthorAgeFilesLines
* README: Mention move of revision control to git.HEADtrunkScott Moser2016-08-101-253/+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
* Fix up a ton of flake8 issuesJoshua Harlow2016-05-121-2/+3
|
* cloudstack: Only use DHCPv4 lease files as a datasourceWido den Hollander2016-04-281-1/+2
| | | | | | | It could be that there are also 'dhclient6.leases' files in /var/lib/dhcp when DHCPv6 is used next to DHCPv4. This patch makes sure we only read from DHCPv4 lease files
* DataSource: set ds_cfg to be a dictionaryScott Moser2016-04-041-6/+0
| | | | | | if the Datasource does not have an entry in config, then set it to be a empty dictionary rather than None. Also remove places that did this elsewhere.
* pep8 fixesScott Moser2015-08-041-2/+4
|
* Use wget to fetch CloudStack passwords.Daniel Watkins2015-06-161-25/+10
| | | | | | Different versions of the CloudStack password server respond differently; wget handles these nicely for us, so it's easier to just use wget.
* Add documentation about upstream CloudStack HTTP fix.Daniel Watkins2015-02-231-0/+3
|
* Always close the password server connection, even on failure.Daniel Watkins2015-02-231-4/+6
|
* Split CloudStack password handling out to separate class.Daniel Watkins2015-02-201-20/+45
|
* Minor formatting clean-up in CloudStack DS.Daniel Watkins2015-02-201-5/+5
|
* Set an explicit timeout when fetching CloudStack passwords.Daniel Watkins2015-02-181-0/+1
|
* Failing to fetch a CloudStack password should never fail the whole DS.Daniel Watkins2015-02-181-9/+15
| | | | | | There might be some CloudStack deployments without the :8080 password server, and there's no reason the rest of the data source can't be used for them.
* Add explanatory comment.Daniel Watkins2015-02-171-0/+3
|
* Fetch and use passwords from CloudStack virtual router.Daniel Watkins2015-02-171-3/+33
|
* Clean up imports in DataSourceCloudStack.py.Daniel Watkins2015-02-171-4/+3
|
* use url_helper to combine urlScott Moser2014-08-211-1/+2
| | | | This seems cleaner, to avoid duplicate '/' being added.
* fix and cleanup usage of util.logexcJuerg Haefliger2013-06-191-2/+4
|
* merge from trunkScott Moser2013-03-071-21/+76
|\
| * DataSourceCloudStack: fallback to default route if no virtual router foundGerard Dethier2013-01-071-18/+64
| | | | | | | | | | | | | | | | | | | | | | | | Changes in revision 753 broke cloud-init on ubuntu, as it has a different dhclient directory than Fedora where the change was developed and tested. This change does 2 things: * searches multiple directories (including /var/lib/dhcp) for the lease files. * adds a fallback to the old code path of choosing the default route as the virtual router if there were no virtual routers found in the lease files.
| * DataSourceCloudStack: use virtual router rather than default routeGerard Dethier2012-12-191-21/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In CloudStack's documentation, it is stated that meta/user-data can be retrieved from CloudStack's Virtual Router [1]. However, cloud-init retrieves these information from default gateway. VR and default gateway may be the same machine (i.e. have the same address) in some cases, but that is not be always true (actually, in my case, it is not). This change searches the lease files in /var/lib/dhclient to pick out the dhcp-server-identifier. It admittedly does make this specific to dhclient. -- [1] http://incubator.apache.org/cloudstack/docs/en-US/Apache_CloudStack/4.0.0-incubating/html/Admin_Guide/user-data-and-meta-data.html).
* | Continue working on merging code.Joshua Harlow2013-03-061-3/+0
|/
* pep8 and pylint fixupsScott Moser2012-11-121-1/+1
|
* Handle the case where newer versions of botoJoshua Harlow2012-10-241-6/+5
| | | | | | | | | | | are used that lazily load the metadata from the ec2 metadata service. 1. Add a ec2_utils module that checks which version of boto is being used and under the right versions the metadata dictionary will be expanded. 2. Use this new ec2_utils module in the cloudstack and ec2 datasources as there entrypoints into boto.
* merge from trunk for pep8 fixesScott Moser2012-08-221-2/+1
|\
| * fix pep8 complaints.Scott Moser2012-08-221-2/+1
| | | | | | | | make pep8 now is silent on precise's pep8 ( 0.6.1-2ubuntu2).
* | rework package mirror selectionScott Moser2012-08-221-1/+2
|/ | | | | | | | | | | | | | | | | | | | | There are several changes here. * Datasource now has a 'availability_zone' getter. * get_package_mirror_info * Datasource convenience 'get_package_mirror_info' that calls the configured distro, and passes it the availability-zone * distro has a get_package_mirror_info method * get_package_mirror_info returns a dict that of name:mirror this is to facilitate use of 'security' and 'primary' archive. * this supports searching based on templates. Any template that references undefined values is skipped. These templates can contain 'availability_zone' (LP: #1037727) * distro's mirrors can be arch specific (LP: #1028501) * rename_apt_lists supports the "mirror_info" rather than single mirror * generate_sources_list supports mirror_info, and as a result, the ubuntu mirrors reference '$security' rather than security (LP: #1006963) * remove the DataSourceEc2 specific mirror selection, but instead rely on the above filtering, and the fact that 'ec2_region' is only defined if the availability_zone looks like a ec2 az.
* 1. Move all info() logging methods to debug() harlowja2012-06-211-1/+1
| | | | | 2. Adjust comment on sources list from depends 3. For the /etc/timezone 'writing', add a header that says created by cloud-init
* Massive pylint + pep8 fixups!Joshua Harlow2012-06-201-1/+1
|
* Add the ability to check if the metadata service is up before actually using it.Joshua Harlow2012-06-191-3/+48
| | | | 1. This is very useful for testing (until we have boto timeout in a more sane manner)
* Fixups to ensure that pylint does not find anything major wrong.Joshua Harlow2012-06-151-1/+1
|
* Split up time calculation, use logexc instead of log.exceptionJoshua Harlow2012-06-151-5/+7
|
* Fix this up to use the new datasource class hierachy, as well as other new ↵Joshua Harlow2012-06-111-34/+42
| | | | objects/logging added...
* Darn it. Those shouldn't be there!Joshua Harlow2012-06-071-0/+92