summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceCloudStack.py
AgeCommit message (Collapse)Author
2015-08-04pep8 fixesScott Moser
2015-06-16Use wget to fetch CloudStack passwords.Daniel Watkins
Different versions of the CloudStack password server respond differently; wget handles these nicely for us, so it's easier to just use wget. LP: #1440263, #1464253
2015-02-23Add documentation about upstream CloudStack HTTP fix.Daniel Watkins
2015-02-23Always close the password server connection, even on failure.Daniel Watkins
2015-02-20Split CloudStack password handling out to separate class.Daniel Watkins
2015-02-20Minor formatting clean-up in CloudStack DS.Daniel Watkins
2015-02-18Set an explicit timeout when fetching CloudStack passwords.Daniel Watkins
2015-02-18Failing to fetch a CloudStack password should never fail the whole DS.Daniel Watkins
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.
2015-02-17Add explanatory comment.Daniel Watkins
2015-02-17Fetch and use passwords from CloudStack virtual router.Daniel Watkins
2015-02-17Clean up imports in DataSourceCloudStack.py.Daniel Watkins
2014-08-21use url_helper to combine urlScott Moser
This seems cleaner, to avoid duplicate '/' being added.
2013-06-19fix and cleanup usage of util.logexcJuerg Haefliger
2013-03-07merge from trunkScott Moser
2013-03-06Continue working on merging code.Joshua Harlow
2013-01-07DataSourceCloudStack: fallback to default route if no virtual router foundGerard Dethier
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. LP: #1089989
2012-12-19DataSourceCloudStack: use virtual router rather than default routeGerard Dethier
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). LP: #1089989
2012-11-12pep8 and pylint fixupsScott Moser
2012-10-24Handle the case where newer versions of botoJoshua Harlow
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.
2012-08-22merge from trunk for pep8 fixesScott Moser
2012-08-22fix pep8 complaints.Scott Moser
make pep8 now is silent on precise's pep8 ( 0.6.1-2ubuntu2).
2012-08-22rework package mirror selectionScott Moser
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.
2012-06-211. Move all info() logging methods to debug() harlowja
2. Adjust comment on sources list from depends 3. For the /etc/timezone 'writing', add a header that says created by cloud-init
2012-06-20Massive pylint + pep8 fixups!Joshua Harlow
2012-06-19Add the ability to check if the metadata service is up before actually using it.Joshua Harlow
1. This is very useful for testing (until we have boto timeout in a more sane manner)
2012-06-15Fixups to ensure that pylint does not find anything major wrong.Joshua Harlow
2012-06-15Split up time calculation, use logexc instead of log.exceptionJoshua Harlow
2012-06-11Fix this up to use the new datasource class hierachy, as well as other new ↵Joshua Harlow
objects/logging added...
2012-06-07Darn it. Those shouldn't be there!Joshua Harlow