summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'ticket/next/3360' into nextNick Lewis2011-04-123-0/+55
|\
| * (#3360) Add an allow_duplicate_certs optionNick Lewis2011-04-123-0/+55
| | | | | | | | | | | | | | | | | | If this option is true, a certificate request with the same CN as an existing certificate will override the existing certificate when signed. With the option false, the new certificate request will be rejected. This option will default to false. Paired-With: Max Martin
* | Merge branch 'tickets/master/7021' into nextJames Turnbull2011-04-1229-0/+2303
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tickets/master/7021: Updated confine in Spec test for RSpec 2 Add management of router/switchs global vlans Cisco Switch/Router Interface management Base class for network device based providers Ssh transport for network device management Telnet transport to connect to remote network device Remote Network Device transport system Introduce a module for some IP computations
| * | Updated confine in Spec test for RSpec 2James Turnbull2011-04-081-3/+2
| | |
| * | Add management of router/switchs global vlansBrice Figureau2011-04-086-3/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to manage the global device list of vlans. Currently supports only cisco IOS devices. This is as easy as: Vlan { device_url => "ssh://user:pass@switch.domain.com/" } vlan { "200": description => "R&D"; "99": description => "Management"; } The device_url conforms to the same specs as for the interface type. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * | Cisco Switch/Router Interface managementBrice Figureau2011-04-0813-0/+1243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces managing remotely cisco IOS network devices through ssh or telnet with a puppet type/provider. This patch allows to manage router/switch interface with the interface type: interface { "FastEthernet 0/1": device_url => "ssh://user:pass@cisco2960.domain.com/", mode => trunk, encapsulation => dot1q, trunk_allowed_vlans => "1-99,200,253", description => "to back bone router" } It is possible with this patch to set interface: * mode (access or trunk) * native vlan (only for access mode) * speed (auto or a given speed) * duplex (auto, half or full) * trunk encapsulation * allowed trunk vlan * ipv4 addresses * ipv6 addresses * etherchannel membership The interface name (at least for the cisco provider) can be any shorthand interface name a switch or router can use. The device url should conform to: * scheme: either telnet or ssh * user: can be absent depending on switch/router line config * pass: must be present * port: optional * an optional enable password can be mentioned in the url query string Ex: To connect to a switch with a line password and an enable password: "telnet://:letmein@cisco29224XL.domain.com/?enable=letmeinagain" To connect to a switch/router through ssh and a privileged user: "ssh://brice:letmein@cisco1841L.domain.com/" Note: This patch only includes a Cisco IOS provider. Also terminology adopted in the various types are mostly the ones used in Cisco devices. This patch was tested against: * (really old) Cisco switch 2924XL with ios 12.0(5)WC10 * Cisco router 1841 with ios 12.4(15)T8 * Cisco router 877 with ios 12.4(11)XJ4 * Cisco switch 2960G with ios 12.2(44)SE Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * | Base class for network device based providersBrice Figureau2011-04-082-0/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the common bits of all future network device providers that are using prefetching/flushing to limit the number of calls to the remote network device. The idea is that we need one transaction to prefetch and one to flush each instance. Implementors needs to implement lookup which returns a hash of the found entity, and flush to update the remote device. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * | Ssh transport for network device managementBrice Figureau2011-04-083-0/+331
| | | | | | | | | | | | | | | | | | | | | It is an adapatation of net-ssh-telnet, so that net-ssh conforms to a saner interface for consumer. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * | Telnet transport to connect to remote network deviceBrice Figureau2011-04-082-0/+118
| | | | | | | | | | | | | | | | | | It is based on net/telnet. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * | Remote Network Device transport systemBrice Figureau2011-04-083-0/+73
| | | | | | | | | | | | | | | | | | | | | This is the base for upcoming telnet and ssh transport mechanism to send commands to network devices. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * | Introduce a module for some IP computationsBrice Figureau2011-04-082-0/+131
| | | | | | | | | | | | | | | | | | | | | Those will be used to parse IPs, compute netmaks or prefix length. Unfortunately ruby IPAddr doesn't support those directly. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | | Merge branch 'tickets/master/5684' into nextJames Turnbull2011-04-1135-2459/+99
|\ \ \ | | | | | | | | | | | | | | | | * tickets/master/5684: Fixed #5684 - Move to Apache 2.0 license
| * | | Fixed #5684 - Move to Apache 2.0 licenseJames Turnbull2011-04-1135-2459/+99
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For details of why we're moving please see: https://groups.google.com/d/topic/puppet-users/NuspYhMpE5o/discussion Removed explicit GPL licenses where appropriate Replaced selected GPL licenses with Apache 2.0 Replaced LICENSE with Apache 2.0 Updated README
* | | Fixing Indirector::Facts::Couch loadingLuke Kanies2011-04-092-66/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was previously failing to load at all if couch was missing, but now it only fails on initialization. This means that you can tell that the terminus is there when you're missing couch, but you just can't use it. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
* | | Fixing dependency loading in Rails::FactNameLuke Kanies2011-04-091-0/+1
| | | | | | | | | | | | | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
* | | Fixing 'puppet faces' applicationLuke Kanies2011-04-092-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It only had one available method, and the errors incorrectly specified what it was. This just defaults to listing all the time, and I've updated the docs to be correct, too. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
* | | Fixing the watchr scriptLuke Kanies2011-04-092-4/+2
| | | | | | | | | | | | | | | | | | | | | It had not been updated for quite a while. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
* | | Fixing FaceCollection#facesLuke Kanies2011-04-091-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were still looking for faces in version directories. No changes to testing because the current test is pending. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
* | | Merge branch 'ticket/next/maint-fix_sqlite_test' into nextMatt Robinson2011-04-081-1/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | * ticket/next/maint-fix_sqlite_test: maint: Fix sporadic sqlite error maint: Fix sqlite3 require to really be optional
| * | | maint: Fix sporadic sqlite errorMatt Robinson2011-04-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ActiveRecord::StatementInvalid: SQLite3::IOException: disk I/O error This happened if you ran these tests in the following order since Rails wasn't disconnecting between tests. rspec spec/unit/indirector/facts/inventory_active_record_spec.rb spec/unit/indirector/node/active_record_spec.rb Paired-with: Nick Lewis <nick@puppetlabs.com>
| * | | maint: Fix sqlite3 require to really be optionalMatt Robinson2011-04-081-1/+4
|/ / / | | | | | | | | | | | | | | | | | | You need to specifically rescue LoadError if you want requires to be optional. Paired-with: Nick Lewis
* | | Merge branch 'maint/next/clean-up-spec_helper-require' into nextDaniel Pittman2011-04-08440-453/+442
|\ \ \
| * | | maint: just require 'spec_helper', thanks rspec2Daniel Pittman2011-04-08440-453/+442
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rspec2 automatically sets a bunch of load-path stuff we were by hand, so we can just stop. As a side-effect we can now avoid a whole pile of stupid things to try and include the spec_helper.rb file... ...and then we can stop protecting spec_helper from evaluating twice, since we now require it with a consistent name. Yay. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
* | | Merge branch 'maint/next/improve-test-suite-performance' into nextDaniel Pittman2011-04-084-109/+44
|\ \ \ | |_|/ |/| |
| * | maint: delete dead darwinport package providerDaniel Pittman2011-04-081-86/+0
| | | | | | | | | | | | | | | | | | | | | | | | The DarwinPorts package provider was actually entirely broken; we are not shipping or supporting it with the 2.7 release. Plans exist to introduce a newer, functional MacPorts provider, but this dead code can be removed early. Paired-With: Nigel Kersten <nigel@puppetlabs.com>
| * | maint: don't take over signal handling in tests...Daniel Pittman2011-04-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | We had a problem where we installed a signal handler during a :before block, which wasn't stubbed, so ended up leaving that in place forever. Which bites. We stub it out locally, which is ugly but functional. Paired-With: Matt Robinson <matt@puppetlabs.com>
| * | maint: use FileUtil to remove files, not execDaniel Pittman2011-04-081-23/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | We used to shell out to chmod and rm to clean up temporary files; this lead to the cleanup method here being one of the largest consumers of walltime. Replacing that with FileUtil calls is as, or more, secure, and performs sufficiently well that we can just delegate. Reviewed-By: Matt Robinson <matt@puppetlabs.com>
| * | maint: disable garbage collector during individual test cases.Daniel Pittman2011-04-081-0/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | This reduced overhead of garbage collection from 50 percent to 20 percent in my test runs, and reduced wall-time to match. This seems to be a reasonable win: we allow the GC to run on demand, but only outside the testing. Memory use went from ~ 300MB to ~550MB between runs, which suggests that we are generating a *lot* of garbage at times, but that we also benefit from cleaning it automatically on a regular basis. Reviewed-By: Matt Robinson <matt@puppetlabs.com>
* | Merge branch 'ticket/next/maint-fix_tests_for_old_rubies' into nextMatt Robinson2011-04-082-5/+5
|\ \ | | | | | | | | | | | | | | | * ticket/next/maint-fix_tests_for_old_rubies: maint: Ruby < 1.8.7 knows size but not count maint: Get tests passing on Ruby < 1.8.7
| * | maint: Ruby < 1.8.7 knows size but not countMatt Robinson2011-04-081-4/+4
| | | | | | | | | | | | Reviewd-by: Nick Lewis
| * | maint: Get tests passing on Ruby < 1.8.7Matt Robinson2011-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixing test errors: wrong argument type Symbol (expected Proc) undefined method `lines' for #<Array:0x1020823e0> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
* | | Merge branch 'ticket/next/7026' into nextNick Lewis2011-04-082-0/+25
|\ \ \ | |/ / |/| |
| * | (#7026) Remove whits from reports when finalizingNick Lewis2011-04-082-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resource statuses and metrics for Whits were being added to reports. Since they are transient internal data, they shouldn't be included in the report. This change adds a Puppet::Transaction::Report#prune_internal_data method, called by Puppet::Transaction::Report#finalize_report, providing a central place for this sort of pruning in the future. Paired-With: Max Martin
* | | Merge branch 'ticket/next/maint-backport_array_combination' into nextMatt Robinson2011-04-082-0/+37
|\ \ \ | | | | | | | | | | | | | | | | * ticket/next/maint-backport_array_combination: maint: Add Array combinations method
| * | | maint: Add Array combinations methodMatt Robinson2011-04-082-0/+37
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ruby < 1.8.7 doesn't have this method and we're using it in a test, so tests won't run on 1.8.6 until this is in place. It's probably a good thing to use much in implementation since it's written in pure Ruby when using < 1.8.7 and in C when in > 1.8.7, but then if you're using older Rubies you're probably not expecting much for performance anyway. Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
* | | maint: mark tests pending for a discovered bug...Daniel Pittman2011-04-082-0/+4
| | | | | | | | | | | | | | | | | | | | | Changes elsewhere in the tree break these two tests, but getting the merge in is worth marking them pending. :/ Paired-With: Nick Lewis <nick@puppetlabs.com>
* | | Merge puppet-interfaces into puppet.Daniel Pittman2011-04-0774-0/+2853
|\ \ \ | | | | | | | | | | | | | | | | This joins the two repositories, including full history, into a single run, as well as landing the interfaces work on the next branch ready for release.
| * | | maint: mocking 'require' causes random stack-overflow failures.Daniel Pittman2011-04-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that mocking require on objects can cause random "stack depth exceeded" failures, usually triggered by otherwise innocent changes to load order or the use of require in the rest of the code. Disable the currently failing test, which needs rewriting, and let it go for now. We need to systematically purge these problems once the build is stable. Paired-With: Dan Bode <dan@puppetlabs.com>
| * | | (#6969) String failures differentiate between invalid string/versionDan Bode2011-04-071-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does two things: 1. splits out the string lookup functionality from define into a seperate method [] 2. Tries to both load the specific version of a string as well as the current version so that specific error messages can be returned differentiating between an invalid version/string. Reviewed-By: Daniel Pittman <daniel@puppetlabs.com>
| * | | (#6985) Allows indirectors to accept a hash as an argument.Dan Bode2011-04-072-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many indirectors need to take a hash as the last argument. This was not allowed b/c the last hash argument was assumed to be the options hash. I resolved this by assuming that the hash needed by an indirector would be the same as the options hash. Reviewed-By: Daniel Pittman <daniel@puppetlabs.com>
| * | | (#7005) added require 'tmpdir' to spec helper.Dan Bode2011-04-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Source files should resolve their own deps. This is required for the spec tests to run individually. Reviewed-By: Daniel Pittman <daniel@puppetlabs.com>
| * | | Merge branch 'refactor/master/7012-rename-strings-to-interfaces-and-faces'Daniel Pittman2011-04-0779-634/+623
| |\ \ \
| | * | | (#7012) Split plumbing into Puppet::InterfaceDaniel Pittman2011-04-0725-270/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This splits out the plumbing into the Puppet::Interface namespace, and uses Puppet::Faces for all the public-facing code. The fault line is "what you care about if you are using or writing a face", which is public, against "what you care about to enable either of those two", which is the plumbing.
| | * | | (#7012) Update references in code to use face(s)Daniel Pittman2011-04-0756-398/+398
| | | | | | | | | | | | | | | | | | | | | | | | | The codebase is now using the new name, faces, uniformly to reference the objects contained. All tests pass.
| | * | | (#7012) global rename of strings to faces.Daniel Pittman2011-04-0749-0/+0
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This just changes filenames and directories; files are exact copies rather than having additional modifications to make clearer each step of this process. This does leave a currently broken build. :/
| * | | Merge branch 'bug/master/7006-missing-require'Daniel Pittman2011-04-071-0/+2
| |\ \ \
| | * | | (#7006) Add a missing require to puppet/string/option.rbDaniel Pittman2011-04-071-0/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | This was causing failure in some cases, based on load order; we should always satisfy our external dependencies. Reviewed-By: Dan Bode <dan@puppetlabs.com>
| * | | Merge branch ↵Daniel Pittman2011-04-067-25/+93
| |\ \ \ | | | | | | | | | | | | | | | 'bug/master/6972-setting-CA-location-for-cert-string-no-longer-works'
| | * | | (#6983) mark test pending until string is fixed...Daniel Pittman2011-04-062-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The certificate string is broken, and won't allow you to either search or save certificates. Given that, mark the test on it broken until that is completed. Reviewed-By: Dan Bode <dan@puppetlabs.com>
| | * | | (#6972) Handle ca-location in the certificate string.Daniel Pittman2011-04-064-21/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ports the existing certificate location configuration to be a string option, and then uses that to change the configuration. This will leak state between calls, which is somewhat unavoidable, but should at least get the basic stuff right for the CLI. We eventually need the CA string to be supported by a stateless internal CA implementation that allows us to do the right thing overall. Reviewed-By: Dan Bode <dan@puppetlabs.com>