| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | |
| | |
| | |
| | | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |\ \ \
| |/ /
|/| /
| |/
| |
| |
| |
| |
| |
| | |
Conflicts:
lib/puppet/metatype/container.rb
lib/puppet/metatype/instances.rb
lib/puppet/metatype/metaparams.rb
lib/puppet/metatype/relationships.rb
lib/puppet/metatype/schedules.rb
|
| | |
| |
| |
| | |
Issue 1491
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, the server side correctly pulled parameters out of
the query strings, but the REST terminus never passed them on. It does
now, at least for finding and searching. It appears that at least
WEBrick doesn't support parameters for anything other than forms
and GET.
I've also added the ability for the REST terminus to pull
host/port information from the request key, if it's a URI.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
The string format no longer provides any support methods,
which means that I had to create to_multiple_s and from_multiple_s
methods on the SSL classes. I created them in the base class
and tested them just in the cert class.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |\|
| |
| |
| |
| |
| |
| | |
Conflicts:
CHANGELOG
test/util/posixtest.rb
|
| | |
| |
| |
| |
| |
| |
| | |
interpolation, not both, to avoid issues where a #{} interpolated value
contains a % character.
Signed-off-by: Daniel Pittman <daniel@rimspace.net>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
All of the format work is done, they all
support plaintext successfully, and I've got
integration tests that demonstrate that it
actually works.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| |
| |
| |
| |
| | |
Certs don't seem to support yaml, for some reason.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We return a 404, which the client can correctly handle.
That wasn't the actual problem causing failing tests, of course --
the problem was that one side of our stub was autodetecting
marshal, and the other side was forcing yaml, which strangely didn't
work. It was only happening with searching, though, not finding et al.
The 'search returning nil' problem was a bit of a red herring but
needed to be fixed, too.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This is the last of the REST plumbing. The only flaw right now
is that the formats are managed by name rather than by
mimetype, which I'll fix next.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| |
| |
| |
| |
| |
| | |
The Format class now takes care of deciding whether it's supported,
and it also does method dispatch to classes and instances as necessary.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
The format management is a bit clunky right now, though, so I
need to fix how they're managed. Some of these tests fail,
but 99% of the remaining work is in other classes so I wanted
this as a discrete commit.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We have a simple Format class, and the FormatHandler
module is responsible for managing its instances,
including providing access by mime type or name.
It will soon replace some of the testing functionality
in the FormatHandler module, but for now, it's just
there as a name => mimetype converter, which makes it
seem a lot like overkill.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| |
| |
| |
| |
| |
| | |
It's a touch hackish in terms of design, but it should work,
and it's the last major piece of plumbing necessary for REST support.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Searching operates on multiple instances, and I have not
yet figured out how we should handle converting multiple
instances to a given format -- we can't use the instance
method (e.g., to_yaml), because it would be on Array
instead of the class we're operating on. That would work
for yaml, but not, for instance, for xml.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Nearly all of the tests are now written just once, in
the Handler module. The Mongrel and Webrick tests just
validate that they provide the interface and how they do
so.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This will help to remove a ton of duplication among the
Mongrel and Webrick tests, and it also helps make the
interface between the servers and the handler more explicit,
and thus more maintainable.
I still need to switch all of the servers over.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Things are currently broken -- this is a checkpoint commit
so that it's safe to make mistakes and will probably be
removed.
Signed-off-by: Luke Kanies <luke@madstop.com>
The REST terminus now completely does error handling and serialization.
The Integration tests are still completely broken.
Signed-off-by: Luke Kanies <luke@madstop.com>
The Mongrel and Webrick rest handlers no longer yaml-encode exceptions.
They just store the exceptions in plain text in the message body.
They also set the status to 400, rather than 404.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
Changing the FormatHandler#render method to render_to
Signed-off-by: Luke Kanies <luke@madstop.com>
Adding the ability for the format handler to query supported formats.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |\|
| |
| |
| |
| |
| | |
Conflicts:
test/ral/type/filesources.rb
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
with 'yaml' still being the default but 'marshal' being an option.
This is because testing has shown drastic performance differences
between the two, with up to 70% of compile time being spent
in YAML code. Use the 'catalog_format' setting to choose your format,
and the setting must be set on the client.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Here were the main changes necessary:
* Fixed the class loader so it only loads mongrel if it's available.
* Fixed the test runner to skip example groups contained in non-runnable
example groups.
* Fixed the Mongrel tests to use quoted class names instead of constants,
since the constants themselves would be absent.
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
|
| | |
| |
| |
| | |
as long as you're using Facter 1.5.
|
| |\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also added the fixes to make the certhandler tests pass
even when certs exist; I'll deal with the conflict later.
Conflicts:
CHANGELOG
bin/puppetd
lib/puppet/network/http/handler.rb
lib/puppet/network/http/mongrel/rest.rb
spec/integration/indirector/rest.rb
spec/integration/network/server/mongrel.rb
spec/integration/network/server/webrick.rb
spec/unit/network/http/webrick.rb
|
| | |
| |
| |
| |
| |
| |
| | |
There was a save_object method in the http/handler module, but it
seemed unnecessary and was undocumented. I don't know I missed
it causing failures, but I've added it back with appropriate
documention.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
All requests should now have an ipaddress add to them, they
should always be marked authenticated or not, and they should
have the certificate name set as their 'node' if a certificate
is present.
They both use the same methods they use for xmlrpc,
although there's no common code, to facilitate deprecation
of xmlrpc.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The Master handler previously provided the support for the :node_name
setting, and that functionality has now been moved into the Node
class. At the same time, the names to search through have been
changed somewhat: Previously, the certificate name and the
hostname were both used for searching, but now, the cert name
is always searched first (unless node_name == facter), but only
the Facter hostname, domain, and fqdn are used otherwise. We no
longer split the cert name, only the hostname/domain/fqdn.
In the general case, this provides no behaviour change, because
people's hostname is the same as their certname. This only
results in a change in behaviour if you specify a certificate
name that is a normal node name, and you want to look that node
up by something other than the full name in the certificate.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| |
| |
| |
| | |
It was trying to use arguments but they were never actually
set.
|
| | |
| |
| |
| |
| | |
This provides a single, global bit for determining whether
a given piece of cached data is still valid.
|
| | |
| |
| |
| |
| |
| |
| | |
The HttpPool module now removes its cached ssl_host instance
when clearing its cache. This is really only useful
for testing, but it correctly causes the pool to use
new certificates when they're available.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, you had to configure whether you wanted the CRL or not,
which resulted in errors all the time when it was configured but
unavailable.
Now, Puppet will always create and try to use it, but you won't
get failures if it's unavailable.
|
| | |
| |
| |
| | |
class.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
We can't have the HttpPool class use the Indirector to see
if it has a cert available, because it might be being used to
try to download one, which would cause it to make an http instance,
which would cause it to... Well, you get the idea.
Adding and fixing a few other tests I ran into on the way.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
...as far as I can tell. The client, however, is broken,
since it used the old http_pool/ssl_support stuff, which
no longer works.
I have to port puppetd over to using the new ssl stuff,
then I'll at least be able to verify that the master can
still speak xmlrpc.
|
| | |
| |
| |
| |
| |
| |
| | |
I don't think the whole thing is done, but at least the
basic flows are in place. Now it's just a question of
doing real-world tests and fleshing out the unit tests
as necessary.
|
| | |
| |
| |
| |
| | |
It uses an instance of SSL::Host for getting its certificate
and ssl store.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
responsibilities to the SSL::Host class.
I was previously saving invalid CRLs unless they'd had a revocation
done in them; this commit fixes them so that they're always valid.
Also, I've added to SSL::Host the ability to generate a valid
SSL Store, suitable for validation. This is now used by
Webrick and can be used by the http clients, too.
This should have been two commits, but I'm kind of down the
rabbit hole ATM.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The code is much cleaner, and it seems to be mostly
functional, but we have to pick a strategy for signing
the host's certificate on first startup. Also, I haven't
actually done end-to-end testing yet, which needs the certs
working first.
|
| | | |
|
| | |
| |
| |
| |
| | |
This provides the backward compatibility for webrick,
and only Mongrel is left.
|
| | | |
|