| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| | |
Also adding it to the Indirection Request.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
It required a request instance and didn't use
the REST class it was in, so it makes more sense in
the Request class.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This changeset defines a new syntax to override collection
of resources (virtual or not). This feature is not constrained
to the override in inherited context as usual resource
override.
The collection of resource supports a query like regular collection
of virtual or exported resources.
Usage example:
file {
"/tmp/testing": content => "whatever"
}
File<| |> {
mode => 0600
}
It also introduces a different behaviour for collection of catalog
resources. Before this patch, only virtual resources were collected,
now all resources (virtual or no) are collected and can be overriden.
That means it is now possible to do:
File <| |> { mode => 0600 }
And all the Files resources will have mode 0600.
It is then possible to have this puppet pattern:
file { "/tmp/a": content => "a" }
file { "/tmp/b": content => "b" }
File <| title != "/tmp/a" |> {
require => File["/tmp/b"]
}
which means that every File requires a file.
Moreover it is now possible to define resource overriding
without respecting the override on inheritance rule:
class a {
file {
"/tmp/testing": content => "whatever"
}
}
class b {
include a
File<| |> {
mode => 0600
}
}
include b
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This was important because the use of the label to store attributes
was a holdover from the GRATR library, and if we didn't cease its
use before we switched to RESTful catalogs, then we'd be stuck with
the @label instance variable forever, essentially.
Now we can add and remove variables however we please.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
This was sometimes causing files to get converted to
directories.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Content is now returning the checksum rather than
the actual content, and the method of creating
the full checksum wasn't correctly handling
timestamps, which aren't strings and can't be the
right side of a String + call.
I've opened #2064 as a better long-term fix.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These calls were resulting in 1-2 extra round
trips per file. For simple comparison,
200 empty files took 73s before this change
and 20s after.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This switches the file's 'content' parameter to always
use checksums, rather than always using content but switching
to checksums whenever necessary.
This greatly simplifies all the logging requirements (so
that content doesn't show up in logs), but also simplifies
insync comparisons, and much more.
In the process, I found that the code was pulling down file content
more often than was necessary, and fixing that cut 40% off of the time
of a very small transaction.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It was previously in the parser, but the parser is only created
if the fileserver.conf exists, so the default mounts weren't
made if the file didn't exist.
This is a bit less encapsulation, but not much.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The problem was that the server had a certificate
for the client. Initially the client just didn't have a
key, because it assumed that if it had a certificate then
it had a key. Upon fixing it to create the key, the key then
did not match the found certificate.
This commit fixes both of those: The key is always found
before the certificate, and when the certificate is found
it's verified against the private key and an exception
is thrown if they don't match.
It's always a failure, so this just makes the failure
more informative.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
semicolons
|
| | |
|
|\ \ |
|
| | | |
|
|/ / |
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
lib/puppet/type/file/content.rb
spec/unit/type/file/content.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
They were still being printed in noop mode.
The fix was to use is_to_s and should_to_s methods,
rather than 'change_to_s'.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Most of these were just obsolete tests that have
been sitting around and broke with recent internal
changes.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This means, at the least, that we can now serve files
via REST when they have spaces and other weird characters
in their names.
This involves a small change to many files.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The goal of this refactor was to use a cached attribute
for the LoadedFile instance we use to monitor whether
the file needs reparsing. We were getting tests that
affected later tests because they were holding on to
LoadedFile stubs, somehow.
The other main change here is that the Settings#parse
method now knows how to look up its own file path.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
There was some redundancy here, as the app was marked
as needing to parse the config, but then the setup
hook manually parsed it.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
The errors now include the indirection and key,
or the full URI used.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This switches away from the use of terminii for
each type of fileserving - it goes back to the traditional
fileserving method, and is much cleaner and simpler
as a result.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
It was previously in a helper module, TerminusHelper.
I hope to actually remove that module entirely.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| | |
Again, much cleaner and simpler.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
The interface is *much* cleaner, and I'd removed one of the methods
used in this code.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since Environments now know how to look for modules,
a lot of the Module code was able to be pushed into them.
Also moving some of the tests to instance-level tests,
rather than just testing the class-level interfaces.
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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This 'each_module' method will be used by environments
to find all or a given module, and will likely eventually
be used internally, too.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
This is, once again, used for plugins, which needs
to search across multiple modules' plugin directories.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
This is required for plugins, which recurse across multiple
directories.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are now boolean methods to test whether a given kind
of file is present in a given module. E.g, you can do:
Puppet::Module.new("mod", "/my/path").plugins?
There are also accessor-style methods that return the
full path for a given kind of file.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
No behaviour change here, just some internal changes to
make way for methods I want to add.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Only host-configs actually load and store the state file,
so any attempt to use that state will just result
in lots of "initializing" and "creating" messages.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
When used internally we would use symbols, but
the REST transfers need to support strings.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We previously only handled simple strings as values,
but we know handle true and false as booleans, we URI-escape
all strings, and we can yaml-encode and then escape arrays of
strings.
This could get abused a bit, in that we're just yaml-dumping anything
that's an array, but it should be pretty safe. Mmmm, should.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| | |
communication
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| | |
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| | |
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| | |
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| | |
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| | |
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|