Commit Graph

110 Commits (d8f60687dcda5c40fee348c68fd97ac8daf09ba8)

Author SHA1 Message Date
Clint Byrum d8f60687dc Refactor to avoid monkeypatching requests 2013-07-01 22:28:01 -07:00
Clint Byrum 9e1afa9d76 Skeleton implementation of cfn 2013-07-01 22:26:54 -07:00
Clint Byrum ea19fd8416 Use a session so only one connection is needed. 2013-06-28 13:04:27 -07:00
Clint Byrum 5d961341c0 Migrate from httplib2 to requests. 2013-06-28 12:47:30 -07:00
Clint Byrum 33d869975f Ensure full test coverage of cache. 2013-06-28 11:47:14 -07:00
Clint Byrum ccea45fc47 Rearrange cache to its own module. 2013-06-28 11:23:41 -07:00
Clint Byrum 312592d3db If no command is specified, print collected data as json 2013-06-28 09:16:10 -07:00
Clint Byrum 75d178083d Fix tests for shell argument 2013-06-28 09:07:20 -07:00
Clint Byrum 6e28cddc30 Use shell to execute --command. 2013-06-28 16:03:46 +00:00
Clint Byrum bfec47c769 Do not commit when creating .orig 2013-06-28 08:33:04 -07:00
Clint Byrum f6de46c259 Detect cache changes properly.
Also add explicit tests for caching.
2013-06-27 17:40:09 -07:00
Clint Byrum 48058f5a31 Fixing missed monkey patch 2013-06-27 16:38:36 -07:00
Clint Byrum 7983481bc3 Implement --command as documented in 2013-06-27 16:29:30 -07:00
Clint Byrum b34e62abda using global CONF object 2013-06-27 11:04:36 -07:00
Clint Byrum 6bdc6d991a Add CLI options 2013-06-27 10:41:41 -07:00
Clint Byrum 21db93faba Add cachedir and command options 2013-06-27 09:41:02 -07:00
Clint Byrum ae75926f47 Move ec2 code into its own module. 2013-06-27 09:23:21 -07:00
Clint Byrum 7f2546ff26 Use oslo.config.
Also make sure __main__ is tested.
2013-06-27 09:01:02 -07:00
Clint Byrum e3c058618a Assert logging 2013-06-26 18:13:23 -07:00
Clint Byrum 9baa5cc879 Add logging 2013-06-26 17:53:59 -07:00
Clint Byrum c88ed2b577 Importing openstack-common using and openstack-common.conf 2013-06-26 17:49:26 -07:00
Clint Byrum b6c2efaed6 Revert "import openstack.common from oslo-incubator"
This reverts commit f8d710517b.
2013-06-26 17:43:04 -07:00
Clint Byrum f8d710517b import openstack.common from oslo-incubator 2013-06-26 17:07:14 -07:00
Clint Byrum 4a568e4456 Add explicit os_collect_config exceptions. 2013-06-26 16:35:46 -07:00
Clint Byrum 98e6c25a39 Fixes from testing on HP Cloud Instances. 2013-06-26 16:17:17 -07:00
Clint Byrum 7208c42b55 Add copyright and license headers 2013-06-26 13:23:55 -07:00
Clint Byrum f260f92a49 Fix tests for rename. 2013-06-26 13:08:42 -07:00
Clint Byrum 819a075de6 Fix .gitreview file 2013-06-26 12:53:07 -07:00
Clint Byrum 05b667a977 Splitting os-collect-config into its own repo. 2013-06-26 12:40:25 -07:00
Clint Byrum 5841dd6e24 Create os-collect-config entry point.
Tool to grab config from known data sources. First data source is
The EC2 metadata service.

Change-Id: I33f8c1a96dc20486836055bb60d87f544aac2a62
2013-06-17 09:56:27 -07:00
Robert Collins ba51abbdf1 Rename to os-apply-config.
The name os-config-applier was too confusing given os-refresh-config as the
partner program, so we've decided to rename to os-apply-config.

To aid migration the old command name and default template path are still

Change-Id: I39725595275e7b4375ac4fda52e6a14b7071f7e9
2013-06-14 15:30:14 +12:00
Dan Prince 48e6c5f40e Allow default type's to contain underscores.
Fixes LP Bug #1188786.

Change-Id: I2ff2b4abc88ca914220a7de1fa0ef05a6105b9c1
2013-06-07 15:48:46 -04:00
Clint Byrum e76e73a61d Add a 'netaddress' value type for --key.
It is quite common to expect either a numeric IP address or domain name.
We include all ASCII characters needed to express IPv4, CIDR networks,
IPv6, or DNS names.

Change-Id: I2ab370d2bdad0d568b34c4ed55d60a5b6cdd9b19
2013-05-28 11:32:56 -07:00
Jenkins 1ef136031c Merge "Add support for default --key values." 2013-05-21 17:13:38 +00:00
Clint Byrum fa5fb2d163 Allow empty strings for raw and default types.
Empty string is a perfectly valid raw string and the default type is
meant to prevent malicious characters, not empty strings.

Change-Id: I717bbcfe1a81b383782122870d0d727b28f40cce
2013-05-21 10:07:48 -07:00
Clint Byrum 0746e22407 Add support for default --key values.
We are using a pattern of suppressing errors to allow missing keys
in some TripleO elements.

This allows simply specifying a default value inside

Change-Id: I15702d205bab995f918f2efcb75af832b760be74
2013-05-21 09:58:50 -07:00
Clint Byrum c56819ae40 Allow missing tags in templates.
Previously missing_tags was set to 'strict', so any missing values in
the configuration json would be flagged as an error. They will now be
ignored and returned as u'', per the pystache documentation.

Change-Id: I46d675bdd76948238191be92f0a2162963fcc478
2013-05-09 11:47:04 -07:00
Clint Byrum b208ab5269 Read metadata from local heat-cfntools cache
Heat writes to /var/lib/heat-cfntools/cfn-init-data , and heat-cfntools
writes the last metadata it read to
/var/cache/heat-cfntools/last_metadata. We expect to run on first boot,
which is why we need the heat version. Then we also expect to run after
cfn-hup notices changes, so that is where the last_metadata comes from.

Change-Id: I781c74a10b419f84c6983ed2b4d54b47bfa7b605
2013-04-12 16:30:12 -07:00
Jenkins e22ebf2212 Merge "Make main() return rather than call sys.exit" 2013-04-10 23:02:27 +00:00
Clint Byrum a8f8df92d8 Make main() return rather than call sys.exit
Fixes tests not all being run and also makes main() more directly
testable. Also adding tests for log messages when main() is called.
Finally adding argparse to requirements.txt to fix python 2.6

Change-Id: I7f152c9aa1e99d0fd3d763871c96cf60840e3ff7
2013-04-10 15:56:34 -07:00
Clint Byrum af70f8402d Remove unnecessary check for writable output dir.
os-config-applier is useful by non-root users who have access to
write the files they need to in sub-directories under the main output

Change-Id: I52af0bd076f3fef99ea09a3074f0b0d5b7e9afca
2013-04-10 04:06:15 +00:00
Clint Byrum e7e4b9f0ec Adding stackforge .gitreview file 2013-03-27 21:10:31 -07:00
Monty Taylor 3bc12fbccf Remove env vars we don't use. 2013-03-28 04:05:31 +01:00
Monty Taylor 82489a11ba Align to OpenStack Hacking rules. 2013-03-28 04:03:46 +01:00
Monty Taylor 74929e70cc Aligned tests with OpenStack standards.
Made them run as testtools.TestCase tests.
Removed nose references.
2013-03-28 03:40:38 +01:00
Monty Taylor 49c060a313 Migrate to pbr and testr. 2013-03-28 02:37:45 +01:00
Tim Miller 354297435d Merge pull request #6 from SpamapS/master
Render complex sub-objects using json.dumps
2013-03-20 09:28:31 -07:00
Clint Byrum e34be4df0f Render complex sub-objects using json.dumps
Normally pystache will just use the python unicode representation of
objects. This is not very useful programatically. Rendering using json
makes these values more useful.
2013-03-20 09:12:22 -07:00
Tim Miller 9883a86228 Ensure config files are readable by all. 2013-03-18 11:44:26 -07:00
Clint Byrum 1db777fd9e Pass all flake8 tests - run in CI too 2013-03-15 10:47:02 -07:00