| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
These replace the yaml and file dirs,
since in #1943 we're merging the file and yaml
Terminus classes.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
| |
This is toward fixing #1943 - we need the ability
to easily convert between file extensions and file
formats.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Basically, these classes (ResourceType and ResourceTypeCollection)
don't really belong in Parser, so I'm moving them to the
Resource namespace. This will be where anything RAL-related goes
from now on, and as we migrate functionality out of Puppet::Type,
it should go here.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
| |
It's no longer necessary, given the new ResourceTypeCollection
class.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
|
| |
We now use references to the ResourceTypeCollection
instances through the environment, which is much cleaner.
The next step is to remove the Interpreter class.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
| |
We previously passed a hash of options but now just
the environment.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
|
|
| |
We previously defined the method statically.
This also renames the method to match how the environment
thinks of them - known resource types, rather than resource
type collection.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
| |
This stops hiding some really difficult to track down
problems.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
| |
This is so everyone doesn't have to define the same method
everywhere.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
| |
It was previously handled by the Interpreter,
but we're planning on getting of that.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
|
| |
This is the last step enabling us to make it so no one
needs to maintain these references to the parser. Instead,
everyone will just get access to the type collection from
the Environment.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
| |
Each environment now has its own known collection of resource
types, and it is responsible for caching as necessary.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will soon replace all of the env/parser mungling
we have to do. A given process will only be able to
have one collection of code per environment in memory.
This is somewhat limiting, in theory, but some global means
of looking up code collection (LoadedCode instances) must
exist for the pure ruby stuff to work.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
| |
This doesn't work without the later commits - it just relies
on Ruby to read in Ruby files.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
| |
This is the patch from Mike Pountney <Mike.Pountney@gmail.com> off
the list with the additional test Luke requested.
|
|
|
|
|
|
|
|
| |
The original pure ruby yaml patch missed some edge cases; specifically, classes
that were modified by the syck version to directly call it and thus never
reached the pure ruby version. This adds monkey patches to all of those case
which we might reasonably care about (omitting, for example, calls within the
syck version to itself) and tests which show that the monkey patch works.
|
|
|
|
|
|
|
|
| |
This patch brings in a pure ruby yaml generation library, analagous
to what we did with JSON/PSON, but without the renaming dodge we had
to do in that case to avoid fighting with Rails.
Signed-off-by: Markus Roberts <Markus@reality.com>
|
| |
|
|
|
|
| |
flag and associated check thereof within the resource evaluation code. This should allow for the transaction to bail out of its processing if it finds that a stop has been requested, based on the state of Puppet::Application.stop_requested?.
|
|
|
|
| |
set status flags appropriately in Puppet::Application, and removed call to now-deprecated @agent.configure_delayed_restart. This should get the restart and stop behavior for daemons and their agents working nicely with the new global process status interface of Puppet::Application.
|
|
|
|
| |
behaviors and predicates on new run-status interface of Puppet::Application.
|
|
|
|
| |
provide simple status-restricted execution of a passed in block; this can replace the process status checks and properly handle delayed restart behavior for Puppet::Agent.
|
|
|
|
|
|
|
|
| |
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 them.
|
|
|
|
| |
we need to also change include? method to be more robust.
|
|
|
|
|
|
|
| |
event.
This restores behavior for resource dependencies that was broken
in the #2759 series.
|
|
|
|
|
|
| |
In the #2759 series, noop was altering the synced timestamp and calling
the flush() method on nooped resources. This patch prevents those things
from happening.
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This does some normalization so we're not doing
duplicate queries for large event collections.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
This is handled in the Status instances now.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
| |
We all know these tests should be removed,
but hey, at least these ones pass now.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|