| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit includes multiple, related changes, all
in one commit because the whole thing was necessary to
reach a functional tree again:
* The URI starts with the environment, so:
/production/certificate/foo
/development/file_content/path/to/your/file
* All REST handling is done by a single instance mounted
at / for webrick and Mongrel, rather than having individual
instances mounted at, say, /certificate.
* All REST URI translation is done by an API module. Currently
only the 'v1' module exists with no support for additional modules,
but it's well-separated and will be easy to expand as we need it.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
semicolons
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Again, much cleaner and simpler.
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>
|
|
|
|
| |
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: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Basically, this just includes a consistent method for collecting
info (either content or metadata) and then calls that method
when returning instances via the indirector.
It's such a large commit mostly because of small changes in the normal
code and large changes in the testing to accomodate those small changes.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, they retained some concept of the URI used to
find them, and this uri was the primary key
for the FileServing instances. This key was unfortunately
completely useless, as evidenced by the fact that it was never
used except to test that it worked.
I've modified the FileServing instances (through modifying
the Base class) to use their local path as their key, and they
no longer care about the URI at all.
This commit is mostly about fixing the code that interacts with
the instances to use this new API.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| |
| |
| |
| | |
Conflicts:
test/ral/type/filesources.rb
|
| |
| |
| |
| |
| |
| |
| |
| | |
This looks like a much larger commit than it is -- it doesn't change
any behaviour at all, it just adds some integration tests (which expose
the problem) and then switches from an ad-hoc api to a request-based api.
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
|
| |
| |
| |
| |
| |
| | |
I foolishly was just using the old-style api.
Added an integration test to catch this in the future.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
This idiom is only functional when you have
Rails loaded, which is why it was failing for others
but not me.
|
| |
| |
| |
| |
| | |
This provides a single, global bit for determining whether
a given piece of cached data is still valid.
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
| |
broken by my incomplete cert support in webrick. I just
stubbed out the cert usage for now; once all the cert stuff is done
we'll need to go back and unstub it.
|
|
|
|
| |
the connection information.
|
|
|
|
|
| |
to work with the current state of the indirection work,
including using a request object and an expiration date.
|
|
|
|
| |
in that area now need to be updated.
|
|
|
|
|
|
|
|
| |
on both webrick & mongrel).
Added pending specs for the trivialities in the REST network_fetch and network_delete methods.
Refactored YAML exception detection out into a private helper method.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
re-raised (integration-tested)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
REST-related code. Two specs are failing related to how Mongrel is initialized for REST; will fix those shortly.
REST indirector now supports find, with deserialization. Network code in indirector now. Will still need to un-hardwire address/port for outbound connections. Will still need to urlencode path parameters.
Code for search, destroy, update is coming, should be similar to find.
Reworked how the Handler module is used. Needed to be included, rather than inherited. Needed to sidestep initializers for actual web servers (webrick, mongrel), needed to be possible to have handler-including class be used as a class (aka servlet) instead of as an instance.
Webrick handler registration is now abstracted to "above" the servlet.
Provided a #model method to use instead of @model in handler module. This allows neutering during testing.
Brought class_for_protocol up into http/webrick class as a (tested) class method.
Integration tests for rest indirection. Split server integration tests into mongrel and webrick tests.
Got Node/REST working properly wrt the crazy-ass autoloader thing.
We're now actually passing traffic w/ webrick, fwiw.
|
|
|
|
| |
has a remote shot at working; will need to be upgraded to actually be useful
|