| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This can happen because we're almost always converting
to environment instances from strings.
Shouldn't happen often, but it's easier to be more failure-tolerant.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
| |
This change to the REST branch restores some sanity by explicitly
allowing a destination URL for indirector save() calls,
removing a hack that I was using to accomplish this.
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
A naked rescue in Puppet::Node::Environment was hiding expectation
violations from the Mocha mocks.
Specifically, 'modulepath' expectations were failing, as Puppet::Module now calls
Puppet::Node::Environment#modulepath internally.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
|
| |
This adds a new environment cached attribute: manifestdir.
It is modeled on the code of modulepath, but returns
the manifestdir.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
| |
This simplifies who owns what code in these two classes,
and the result should be much cleaner and simpler.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We had to fix the fileserving plumbing to use the request
environment instead of trying to use the node environment.
This was apparently never fixed after we added the environment
to the URI in REST calls.
There's still a bit of refactoring left to clean up the APIs used
in some of this code.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Caching the module path (because we check which
directories exist, and this method can get called
often), and the complete list of modules.
The cache ttl uses the filetimeout, which defaults to
15 seconds.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, when you created a module you had to specify
the path. Now Module instances can use the module path
to look up their paths, and there are methods for determining
whether the module is present (if the path is present).
Also cleaned up the methods for figuring out what's in
the module (plugins, etc.).
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
| |
This is the first main phase to having a common module for
handling the REST api - this Handler module will be included
by all of the web server REST modules and the Indirector
Request class, so there's a common place that understands
how the URI consists.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
| |
They were previously still using just the variable itself.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This includes adding PUPPETLIB from the shell environment.
I'm moving responsibility for this from the Module class,
because nearly every method in Puppet::Module accepted
'environment' as its argument, which is a good sign that
it's on the wrong class.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
| |
This uses the environment to search for the modules, rather
than relying on the Puppet::Module class to know how to
handle environments.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
| |
I moved all of the extra Fact modifications into the Facts
class, and then moved the calls of those new methods
into the Facter terminus.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
| |
All file tests now pass.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
| |
This way we'll cache when in a transaction, but otherwise always
hit the disk so the data is fresh. This works because we
really only use resources mid-transaction, but it behaves correctly
if we happen to use a resource outside of a transaction.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Catalog is the expirer, which means that a resource
with no catalog will not cache data.
Also switching files to use a cached attribute for its stat.
And modifying catalogs to expire data at the end of every
transaction.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It now ignores or removes implicit resources that conflict,
and it yields all resources that are valid.
This makes it simple for calling classes to pass in a list
of resources but only perform a chunk of work for valid (i.e.,
non-conflicting) resources.
This refactor is entirely meant as a way of cleaning up the
Transaction#generate interface to the catalog.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
| |
It was previously another catalog instance, but I was only
ever actually using the graphing abilities.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
| |
This class is a holdover from when I was using GRATR, and it's
obsolete now.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
| |
This basically just cleans up dynamic resources.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
since that method is deprecated.
Conflicts:
CHANGELOG
bin/puppetca
lib/puppet/file_serving/fileset.rb
lib/puppet/network/xmlrpc/client.rb
lib/puppet/type/file/selcontext.rb
spec/unit/file_serving/metadata.rb
spec/unit/type/file.rb
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
lib/puppet/util/settings.rb
spec/integration/defaults.rb
spec/unit/node/catalog.rb
spec/unit/type/interface.rb
spec/unit/type/ssh_authorized_key.rb
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
CHANGELOG
spec/unit/node/catalog.rb
spec/unit/type/package.rb
spec/unit/type/schedule.rb
spec/unit/type/service.rb
spec/unit/util/settings.rb
|
| | |
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
CHANGELOG
lib/puppet/transaction.rb
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
catalogs.
It largely worked previously, except when aliases were set,
which require catalogs. This now converts all parser resources
to trans_objects then to RAL resources, and sets the catalog
in the meantime. This allows aliases to work just
fine when converting directly from parser catalogs to RAL catalogs.
|
|\| |
|
| |
| |
| |
| |
| |
| | |
internally), and fixing the Facts class so it
auto-expires any associated cached nodes when facts
are saved.
|
| |
| |
| |
| |
| | |
including removing some now-obsolete code and tests from
the Settings class.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
lib/puppet/node/catalog.rb
lib/puppet/type/pfile.rb
lib/puppet/type/pfilebucket.rb
lib/puppet/util/filetype.rb
spec/unit/node/catalog.rb
spec/unit/other/transbucket.rb
spec/unit/ral/provider/mount/parsed.rb
spec/unit/ral/types/file.rb
spec/unit/ral/types/interface.rb
spec/unit/ral/types/mount.rb
spec/unit/ral/types/package.rb
spec/unit/ral/types/schedule.rb
spec/unit/ral/types/service.rb
test/language/compile.rb
test/language/lexer.rb
test/language/snippets.rb
test/lib/puppettest.rb
test/ral/types/basic.rb
test/ral/types/cron.rb
test/ral/types/exec.rb
test/ral/types/file.rb
test/ral/types/file/target.rb
test/ral/types/filebucket.rb
test/ral/types/fileignoresource.rb
test/ral/types/filesources.rb
test/ral/types/group.rb
test/ral/types/host.rb
test/ral/types/parameter.rb
test/ral/types/sshkey.rb
test/ral/types/tidy.rb
test/ral/types/user.rb
test/ral/types/yumrepo.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
any local variables and added a local variable -- see
http://snurl.com/21zf8. My own testing showed that this
caused memory growth to level off at a reasonable level.
Note that the link above says the problem is only with class
methods, but my own testing showed that it's any method that
meets these criteria. This is not a functional change, but
should hopefully be the last nail in the coffin of #1131.
|
| |
| |
| |
| |
| |
| | |
Replace the catalog with the newly created one when converting to ral types.
The aliases were being lost because the resources had references to the old catalog being converted
|
| |
| |
| |
| |
| |
| | |
resources whether they're isomorphic, and they in turn
ask the resource types (or default to true for defined
resource types).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
any objects, nor does it use Puppet's RAL resources. In the
process, I fixed #894 (you can now copy links) and refactored
other classes as necessary. Mostly it was fixing tests.
This is a squashed commit of a temporary branch, fwiw,
and it also includes any fixes to the tests that were
necessary to get all tests passing again.
|
| |
| |
| |
| |
| | |
aliases in the resource catalog, just like they were added
in the resource classes.
|
| |
| |
| |
| | |
removing the bangs from 'add_vertex!' and 'add_edge!'.
|
| |
| |
| |
| | |
instead of its own tag methods.
|
| |
| |
| |
| |
| |
| | |
for validating that a given resource is unique
within the catalog. This no longer allows any
duplication, even with Execs.
|
| |
| |
| |
| |
| |
| | |
refactored, fixing this problem and making the whole interplay
between the classes, definitions, and nodes, and the Compile class much
cleaner.
|
| |
| |
| |
| |
| | |
as its resource container, instead of having its own behaviour
around resource uniqueness.
|
| |
| |
| |
| |
| | |
up in the relationship graph, which only stores the vertices, not
the resource table.
|