summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Adding suitability as a requirement for a format being supported.Luke Kanies2008-08-261-1/+2
| | | | | | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | | Merge branch '0.24.x'Luke Kanies2008-09-232-9/+9
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | 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
| * Only apply splay the first runAndrew Shafer2008-09-211-8/+8
| | | | | | | | Issue 1491
| * Fixes #1551 puppetmaster.freshness xmlrpc call returns incorrect typeNigel Kersten2008-09-051-1/+1
| |
* | Adding parameter and URL support to the REST terminus.Luke Kanies2008-08-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fixing the String format (fixes #1522).Luke Kanies2008-08-202-17/+5
| | | | | | | | | | | | | | | | | | 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>
* | Merge branch '0.24.x'Luke Kanies2008-08-181-3/+4
|\| | | | | | | | | | | | | Conflicts: CHANGELOG test/util/posixtest.rb
| * Ensure that we consistently use either string #{} interpolation or String.%Daniel Pittman2008-08-011-3/+4
| | | | | | | | | | | | | | interpolation, not both, to avoid issues where a #{} interpolated value contains a % character. Signed-off-by: Daniel Pittman <daniel@rimspace.net>
* | Certificates now work over REST.Luke Kanies2008-08-071-3/+1
| | | | | | | | | | | | | | | | | | 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>
* | Enhancing formatting errors with class and format.Luke Kanies2008-08-041-4/+4
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding a plaintext network format.Luke Kanies2008-08-041-2/+22
| | | | | | | | | | | | Certs don't seem to support yaml, for some reason. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Correctly handling when REST searches return nothing.Luke Kanies2008-07-301-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 REST formats are now fully functional, with yaml and marshal support.Luke Kanies2008-07-302-14/+52
| | | | | | | | | | | | | | | | 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>
* | Adding some support for case insensivity in format names.Luke Kanies2008-07-302-5/+9
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Moving validation from FormatHandler to Format.Luke Kanies2008-07-302-9/+2
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Moving functionality out of the FormatHandler into the Format class.Luke Kanies2008-07-302-17/+66
| | | | | | | | | | | | | | 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>
* | Searching again works over REST, including full content-type translation.Luke Kanies2008-07-291-2/+2
| | | | | | | | | | | | | | | | | | 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>
* | Adding rudimentary support for directly managing formats.Luke Kanies2008-07-293-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Adding support for rendering and converting multiple instances.Luke Kanies2008-07-291-0/+16
| | | | | | | | | | | | | | 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>
* | All error and format handling works over REST except searching.Luke Kanies2008-07-294-11/+30
| | | | | | | | | | | | | | | | | | 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.
* | Drastically simplifying the REST implementation tests.Luke Kanies2008-07-292-10/+25
| | | | | | | | | | | | | | | | | | 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>
* | Removing an apparently-obsolete hook from the handlerLuke Kanies2008-07-291-4/+0
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding explicit tests for the HTTP::Handler module.Luke Kanies2008-07-291-23/+67
| | | | | | | | | | | | | | | | | | | | | | 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>
* | The REST terminus now uses the content-type and http result codes.Luke Kanies2008-07-292-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Using the FormatHandler in indirected classes automatically.Luke Kanies2008-07-291-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Adding a FormatHandler module for managing format conversions.Luke Kanies2008-07-291-0/+33
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x' into mergingLuke Kanies2008-07-293-17/+26
|\| | | | | | | | | | | Conflicts: test/ral/type/filesources.rb
| * You can now select the encoding format when transferring the catalog,Luke Kanies2008-07-182-11/+18
| | | | | | | | | | | | | | | | | | | | 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>
| * The mongrel-related tests now run without mongrel.Luke Kanies2008-07-171-6/+8
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch '0.24.x'Luke Kanies2008-07-021-20/+17
|\| | | | | | | | | | | | | | | | | | | | | 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
| * Fixed #1114 - Facts in plugin directories should now be autoloaded,Luke Kanies2008-07-011-20/+17
| | | | | | | | as long as you're using Facter 1.5.
* | Merge branch '0.24.x'Luke Kanies2008-06-144-74/+97
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fixing #1362 -- I had previously removed a stub point needed for testing.Luke Kanies2008-06-131-1/+7
| | | | | | | | | | | | | | 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.
| * Replacing all two-space indents with four-spaceLuke Kanies2008-06-131-1/+1
| |
| * The mongrel and webrick REST handlers now extract certificate information.Luke Kanies2008-06-093-60/+96
| | | | | | | | | | | | | | | | | | | | | | 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.
| * Always using the cert name to store yaml files, which fixes #1178.Luke Kanies2008-05-261-22/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fixing how the mongrel server sets up xmlrpc handlers.Luke Kanies2008-05-161-2/+2
| | | | | | | | | | It was trying to use arguments but they were never actually set.
* | Using the new Cacher class for handling cached data.Luke Kanies2008-05-131-15/+17
| | | | | | | | | | This provides a single, global bit for determining whether a given piece of cached data is still valid.
* | Fixing some broken tests.Luke Kanies2008-05-071-0/+1
| | | | | | | | | | | | | | 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.
* | The CRL is now automatically used or ignored.Luke Kanies2008-05-071-1/+1
| | | | | | | | | | | | | | | | | | 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.
* | Adding pidfile management and daemonization to the ServerLuke Kanies2008-05-071-0/+56
| | | | | | | | class.
* | Fixing the HttpPool module to get rid of an infinite loop.Luke Kanies2008-05-063-3/+4
| | | | | | | | | | | | | | | | | | 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.
* | The master is now functionally serving REST and xmlrpc.Luke Kanies2008-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | ...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.
* | The REST infrastructure now correctly the SSL certificates.Luke Kanies2008-05-052-7/+5
| | | | | | | | | | | | | | 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.
* | The http pool manager now uses new-style certificate management.Luke Kanies2008-05-051-11/+15
| | | | | | | | | | It uses an instance of SSL::Host for getting its certificate and ssl store.
* | Fixing a critical problem in how CRLs were saved and moving SSL Store ↵Luke Kanies2008-05-051-16/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Switched puppetmasterd to use the new-style server plumbing.Luke Kanies2008-05-022-2/+11
| | | | | | | | | | | | | | | | 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.
* | Adding xmlrpc backward compatibility to the new Mongrel code.Luke Kanies2008-05-021-0/+10
| |
* | Adding xmlrpc support to webrick.Luke Kanies2008-05-022-3/+20
| | | | | | | | | | This provides the backward compatibility for webrick, and only Mongrel is left.
* | Fixing some whitespaceLuke Kanies2008-05-021-4/+3
| |