summaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix 2239 (step one): introduce global settings represeting application run ↵Ethan Rowe2010-02-171-0/+99
| | | | | | | | state with methods for setting the state and appropriately-named predicates for querying state, all in the Puppet::Application class itself. To be used by Puppet::Daemon and Puppet::Agent and Puppet::Transaction for better response to TERM, INT, HUP.
* Generated resources' events are actually bound to the resource thatJesse Wolfe2010-02-171-1/+1
| | | | generated them.
* Mark resource/status as failed if they are associated with a failingJesse Wolfe2010-02-171-4/+4
| | | | | | | event. This restores behavior for resource dependencies that was broken in the #2759 series.
* Resolving conflicts with reinh:feature/master/single_executableMarkus Roberts2010-02-171-1/+1
| | | | Puppet is now main, and the variable got renamed to reflect that.
* Fixing most failing test/ tests.Luke Kanies2010-02-171-0/+7
| | | | | | | | | This is mostly just adjusting existing tests to meet new APIs, but it's a small amount of fixing the code to meet new standards and an even smaller amount of porting code over. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fixing Configurer interface to transaction reportLuke Kanies2010-02-171-1/+1
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fixing fingerprint tests to work with new log validationLuke Kanies2010-02-171-2/+2
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Changing REST report integration test to use new interfaceLuke Kanies2010-02-171-4/+3
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fixing "require" function to use new class interfaceLuke Kanies2010-02-171-2/+2
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fixing broken selinux testsLuke Kanies2010-02-171-2/+1
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fixing feature validation when passed one itemLuke Kanies2010-02-173-7/+15
| | | | | | | | When I changed how the validation errors worked I accidentally caused the feature list to need to be an array rather than supporting either. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Changing method profile for other event queueingLuke Kanies2010-02-171-9/+9
| | | | | | | | It wasn't clear in the first refactor if this was necessary, but doing the performance optimization made it clear it was. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Changing the method profile of EventManager#queue_eventLuke Kanies2010-02-172-15/+16
| | | | | | | It now takes multiple events instead of just one. This will help simplify a bunch of performance optimizations. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Moving Metric management to the reportsLuke Kanies2010-02-176-61/+195
| | | | | | | | | | | | This is one less bit that the transaction does. The resource status objects had nearly enough information to do everything, so I just added that last bit, and moved everything over. It's all much cleaner now. I had to change some existing, internal APIs, but mostly this should be hidden from outside users. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Removing mention of @changes in TransactionLuke Kanies2010-02-171-0/+22
| | | | | | This is handled in the Status instances now. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Cleaning up the report tests a bitLuke Kanies2010-02-171-19/+20
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fixing #2759 - reports now have complete change infoLuke Kanies2010-02-173-21/+12
| | | | | | | | This includes every event generated in the transaction and a Resource::Status object for each resource managed, with per-resource information in it. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* ResourceHarness now doesn't check params with no 'should'Luke Kanies2010-02-171-0/+9
| | | | | | | | | | | I hadn't been skipping parameters that didn't have a 'should' value set. This almost always resulted in the right behaviour, because most properties correctly just short-circuit to being in sync if the 'should' value is nil, but this encodes it at the harness, which is where it should be. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Changing Transaction to use the new ResourceHarnessLuke Kanies2010-02-176-61/+171
| | | | | | | | | | | | This is a much messier commit than I would like, mostly because of how 'file' works. I had to fix multiple special cases, and I had to move others. The whole system appears to now work, though, and we're ready to change reports to receive resource status instances rather than events. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Renaming some methods in Transaction::ChangeLuke Kanies2010-02-171-42/+11
| | | | | | | | | | | Renaming 'go' to 'apply', which is a much more reasonable name. Also removing the 'backward' and 'forward' methods, since they're not actually used anywhere. (Well, 'forward' was used, but it just called 'go'.) Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Adding Transaction::ResourceHarness classLuke Kanies2010-02-171-0/+230
| | | | | | | | | This is the interface class between Transactions and Resources. It's a relatively ugly class, but it will hopefully allow us to move most/all of the messy interface code into this one, relatively small class. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Adding first version of Resource::Status classLuke Kanies2010-02-171-0/+103
| | | | | | | This is the class that will be returned in reports, and they'll contain the events being created. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Solidifying the RAL/Event integration.Luke Kanies2010-02-174-2/+22
| | | | | | | | | | | | | | This has two changes: * Clarifies how we get the property and resource name (we pass the instance, the event converts to a string) * Logs at the resource's loglevel when there's no error These are related, because the event creator (resource) was passing in a string rather than an instance. Signed-off-by: Luke Kanies <luke@madstop.com>
* Refactoring the Change/Event/Property interfaceLuke Kanies2010-02-173-15/+78
| | | | | | | | This gives all logging responsibility to the event, which can now produce logs identical to those produced directly by the property. At this point, the events are entirely supersets of the logs.
* Cleaning up the Log initialization code.Luke Kanies2010-02-171-0/+7
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Refactoring the RAL interface to loggingLuke Kanies2010-02-172-3/+51
| | | | | | | | | | | Previously, the Log class knew a lot about RAL objects, but now the Logging module is the only one that does. This greatly simplifies the Log class, which is good, and means that whatever complexity does need to exist is directly exposed in the Logging middleware module. Signed-off-by: Luke Kanies <luke@madstop.com>
* Using Logging module in main Puppet moduleLuke Kanies2010-02-171-0/+12
| | | | | | | We've had essentially duplicate methods in this module forever, and this just removes that duplication. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding tests for "Logging" moduleLuke Kanies2010-02-171-0/+47
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Correcting comments and making report timestamp internalLuke Kanies2010-02-172-6/+5
| | | | | | | | | We had some no-longer-correct comments in the Transaction class, which are now removed. This also moves the timestamp for reports into the report class, so it's created at initialization by the report, rather than by the transaction. Signed-off-by: Luke Kanies <luke@madstop.com>
* Failing in app/puppet if facts are not foundLuke Kanies2010-02-171-0/+6
| | | | | | | This is a rare case in puppet, but at least will come up when we support routes. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding Transaction events to Transaction reportsLuke Kanies2010-02-172-1/+33
| | | | | | | This means that every event generated during a transaction, with all of its metadata, will now be in the report. Signed-off-by: Luke Kanies <luke@madstop.com>
* Removing a redundant method in ReportLuke Kanies2010-02-171-1/+1
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Removing unused code and adding a couple of testsLuke Kanies2010-02-171-26/+46
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding tests for the 'report' log destinationLuke Kanies2010-02-171-0/+24
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Extracting event management into a separate classLuke Kanies2010-02-172-248/+278
| | | | | | | | | | Thus pulls all event-related code out of Transaction. The Transaction class currently creates a single instance of this class, so it's nowhere near a "real" event manager, but at least it has very clean integration points and will be easy to upgrade as needed. Signed-off-by: Luke Kanies <luke@madstop.com>
* Changing SimpleGraph.matching_edges to expect one eventLuke Kanies2010-02-171-6/+5
| | | | | | | It previously worked with multiple, but the only caller actually only ever passed one event. Signed-off-by: Luke Kanies <luke@madstop.com>
* Moving event creation to the resourceLuke Kanies2010-02-173-24/+60
| | | | | | | | This allows the Transaction class to reuse the event creation code when it creates noop and restart events. Signed-off-by: Luke Kanies <luke@madstop.com>
* Cleaning up Event creationLuke Kanies2010-02-173-53/+132
| | | | | | | | | | The Property class is now completely responsible for creating the event, and it adds all of the metadata that a log message would normally have. This provides a cleaner definition of responsibility, and will allow further cleaning up in later commits. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding "type" instance method to enhance DemeternessLuke Kanies2010-02-171-0/+4
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Random code cleanupLuke Kanies2010-02-172-105/+125
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Moving Ensure property into separate fileLuke Kanies2010-02-171-0/+13
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Moving Parameter utility classes into separate filesLuke Kanies2010-02-173-244/+255
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Switching transactions to callback-based eventsLuke Kanies2010-02-173-22/+468
| | | | | | | | | | | | | Events are now queued as they are created, and the queues are managed through simple interfaces, rather than collecting events over time and responding to them inline. This drastically simplifies event management, and will make moving it to a separate system essentially trivial. Signed-off-by: Luke Kanies <luke@madstop.com>
* Unit tests for path changesMarc Fournier2010-02-171-0/+14
|
* Fix failing specsRein Henrichs2010-02-175-15/+15
| | | | Some variable ns were missed in the rename
* Rename puppet application spec to mainRein Henrichs2010-02-171-74/+74
|
* Renaming applications, mostly removing 'puppet'Luke Kanies2010-02-177-362/+365
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Replace test/unit file write test with specRein Henrichs2010-02-171-11/+36
|
* Allow adding single key to hashesBrice Figureau2010-02-172-48/+82
| | | | | | | | | | This patch allow this syntax: $hash[mykey] = 12 If the key already exist an error is raised. Hashes are essentially write only, like puppet variables. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Raise an error when appending not a hash to a hashBrice Figureau2010-02-171-4/+9
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>