| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |/
| |
| |
| |
| |
| |
| | |
I noticed a test failure when I ran the specs without an internet
connection. Specs should never need an internet connection to pass.
Reviewed-by: Max Martin <max@puppetlabs.com>
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| | |
* 2.6.next:
(#3420) Nagios "name" attribute does not output correctly
(#4487) When setting environment on a host, ensure it is a string.
add test for ticket 7101
(#6487) Add some testing for OS X version support in DirectoryService provider
(#6487) Directoryservice provider will fail in future OS releases
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds some basic testing around whether url, or plist data is used
for the various versions of OS X. Unfortunately this involves
stubbing larger sections of the implementation than we'd like, but
this did not attempt to re-structure the implementation at all.
Paired-with: Josh Cooper <josh@puppetlabs.com>
|
| |
| |
| |
| | |
Reviewed-By: Mike Stahnke
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* feature/master/4258-pkgutil: (29 commits)
(#4258) Fix pkgutil spec test to have the correct provider
(#4258) Remove superfluous command check that called pkgutil
(#4258) Fix fd leak opening pkgutil config files
(#4258) Permit variations of -nv in both pkgutil.conf files
(#4258) Stop file and config checks from breaking spec
(#4258) Check wgetopts in pkgutil.conf
(#4258) Fix hash duplication affecting canonical provider instance
(#4258) Use pkgutil -a to reliably determine package common names/aliases
(#4258) Update pkgutil spec for recent impl changes
(#4258) pkgutil: bug fix: if shortname is not equal to package name
(#4258) pkgutil provider: better handling of short package names
(#4258) pkgutil provider: misc enhancements
Add spec tests for pkgutil package provider
* Fix exception on parse failure of pkgutil output * Fix exception when querying latest version for unknown package
Fixing indentation
Removing blastwave references and unused PAGER
Changing indentation to 2-spaces as per 2.6+ style
Single package queries made more robust when dealing with pkgutil noise
Fixing wget verbose regex
These regular expressions will not match anything. pkgutil doesn't output anything that can be matched.
...
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The resource being used for testing didn't explicitly set the provider,
so it ended up using whatever the default provider was on the system on
which it was run. This was problematic when running the specs on a Mac
since the default provider is pkgdmg and that provider doesn't seem to
be upgradeable. So when you tried:
@resource[:ensure] = :latest
You got the error:
1) Puppet::Type::Package::ProviderPkgutil when installing should use a command without versioned package
Failure/Error: @resource[:ensure] = :latest
Puppet::Error: Parameter ensure failed: Provider must have features 'upgradeable' to set 'ensure' to 'latest'
# ./lib/puppet/parameter.rb:171:in `fail' # ./lib/puppet/parameter.rb:257:in `validate'
# ./lib/puppet/property.rb:300:in `should=' # ./lib/puppet/property.rb:300:in `each'
# ./lib/puppet/property.rb:300:in `should=' # ./lib/puppet/property.rb:337:in `value='
# ./lib/puppet/type.rb:416:in `[]=' # ./spec/unit/provider/package/pkgutil_spec.rb:35
Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | | |
Moved all file and config checks into healthcheck method which is then stubbed
in the spec.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Populate instances with both the real package name ("CSWsvn") and the alias
name ("subversion") from separate "pkgutil -a" call.
Fixed cases where pkgutil noise was parsed as aliased package names and also
breaking "not in catalog" detection.
Updated pkgutil_spec test to show various edge cases.
|
| | |
| | |
| | |
| | |
| | | |
Fix test output of pkgutil for commands using --single
Fix expected upgrade command to match impl
|
| | | |
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 2.6.x:
Updated CHANGELOG for 2.6.8rc1
(#2331) Remove darwinports pkg provider, replace with rewritten macports provider
Fixed #7082 - Added system support for groups
(#7018) Give more context on the service type's assumptions. Wording tweaks.
(#7018) explain internals better in service provider documentation
maint: Fix sqlite3 require to really be optional
maint: Fix sporadic sqlite error
(#6818) Stop from getting Rails 3 named_scope deprecation warning
(#6856) Copy dangling symlinks with 'links => manage' File resource.
Conflicts (Resolved manually):
lib/puppet/type/group.rb
spec/unit/indirector/facts/inventory_active_record_spec.rb
|
| |\ \ |
|
| | | | |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
provider
* Employs port -q installed, much faster than port list installed
* Handles upgrades correctly now
* Makes use of internal port revision for ensure => latest upgrades
* Versionable, now works with ensure => specified_version
* Does not handle port variants at all yet.
* Does not allow manual specification of revision, only version
* Test coverage expanded using newer syntax
Paired-With: Daniel Pittman
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We now use a shebang of: #!/usr/bin/env rspec
This enables the direct execution of spec tests again, which was lost earlier
during the transition to more directly using the rspec2 runtime environment.
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* 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
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 2.6.x:
(maint) Indentation fixes
(#6490) Add plugin initialization callback system to core
Fix #4339 - Locally save the last report to $lastrunreport
Fix #4339 - Save a last run report summary to $statedir/last_run_summary.yaml
Fixed #3127 - removed legacy debug code
Fixed #3127 - Fixed gem selection regex
(#5437) Invalidate cached TypeCollection when there was an error parsing
(#6937) Adjust formatting of recurse's desc
(#6937) Document the recurse parameter of File type.
(#6893) Document the cron type in the case of specials.
(#5670) Don't trigger refresh from a failed resource
Fixed #6554 - Missing $haveftool if/else conditional in install.rb breaking Ruby 1.9
Conflicts (Manually resolved):
lib/puppet/application/agent.rb
lib/puppet/application/apply.rb
lib/puppet/configurer.rb
lib/puppet/resource/type_collection.rb
lib/puppet/type/file.rb
spec/integration/configurer_spec.rb
spec/unit/application/agent_spec.rb
spec/unit/application/apply_spec.rb
spec/unit/configurer_spec.rb
spec/unit/indirector/report/yaml_spec.rb
spec/unit/resource/type_collection_spec.rb
Paired-with: Nick Lewis
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously if the gem json_pure was installed and you requested the
gem json then the regex matched too soon and falshly indicated that
the json gem was already installed.
Also updated to add the --no-ri and no-rdoc options and fix tests.
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
* 2.6.x:
(#5908) Add support for new update-rc.d disable API
(#6862) Add a default subject for the mail_patches rake task
Fixed #6256 - Creation of rrd directory.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Added support for the new disable API to update-rc.d and
added spec tests to check this functionality. This change was made
because in versions of sysv-rc >= 2.88, 'update-rc.d stop' is broken and
actually enables the service.
We only changed the disable case as the enable case still works on
systems which use sysv-rc 2.88 or greater (atm, only Debian Lenny). We
wanted to change as little as possible because update-rc.d prints a
message stating that the new enable/disable API is unstable and may
change in the future.
Paired-with:Matt Robinson, Jacob Helwig
|
|\ \ \
| | | |
| | | |
| | | | |
into next
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The Augeas setm command can set the value of multiple nodes in a single
operation. Takes a base path, then a subnode path expression (relative
to the base) and then the value itself.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Moves the first node to the position of the second, deleting it and its
children if it already exists.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Uses Augeas' defnode command which creates a variable pointing to a node,
creating it with 'set' if it doesn't already exist.
|
| | |/
| |/|
| | |
| | |
| | | |
Uses Augeas' native defvar command to define variables for certain expressions
that can then be referenced later with $variable.
|
|\ \ \
| | | |
| | | |
| | | | |
into next
|
| | | |
| | | |
| | | |
| | | | |
updated spec
|
| | | | |
|
| |/ / |
|
|\| |
| | |
| | |
| | | |
into next
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 2.6.next:
Fixed #6562 - Minor kick documentation fix
(#6658) Propagate ENC connection errors to the agent
(#4884) Remove typo from spec test
(#4884) Modify tests to pass on non-OS X systems
(#4884) Revise new exec tests, add a few more
(#4884) Add an shell provider for execs
(#4884) Fix Test::Unit exec tests
(#4884) Break the exec type out to have a posix provider
(#4884) Add consistent path validation and behavior
(#4884) Add expand_path to requiring the spec_helper
(#4884) Autorequire shared behaviors and method to silence warnings
(#4884) Fix whitespace
(#4884) Get rid of open3 require since it wasn't being used
(#5814) Improved cron type specs
(#5814) cron_spec shouldn't depend on cron provider
Manually Resolved Conflicts:
lib/puppet/util/command_line/puppetrun
spec/spec_helper.rb
spec/unit/type/exec_spec.rb
spec/unit/type_spec.rb
test/ral/type/exec.rb
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixed problems with the spec tests for the new exec type and
providers that were causing failures on non-OS X systems. This
involved rearranging some of the tests and their describe blocks,
which makes the diff look more dramatic than it really is.
Paired-with:Matt Robinson, Jacob Helwig
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Revised a few of the new tests for the exec type and provider to
ensure that they were testing what they meant to, and added in a
couple of new tests.
Reviewed-by:Daniel Pittman
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This makes it possible to use shell builtins when the exec is inline
bash commands.
Paired-with: Max Martin
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is in preparation for allowing other new providers to handle exec
commands differently.
Reviewed-by: Max Martin and Matt Robinson
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
* feature/next/6527-pip_package_provider:
(#6527) Fix pip tests
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The testing of lazypip forgot to stub which, so they worked when pip was
installed, but didn't work when it wasn't. Appropriate stubbing has
been put in place, and stubs changed to expects for some stronger
assertions about what's happening.
Reviewed-by: Jesse Wolfe <jesse@puppetlabs.com>
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* feature/next/6257-pip_package_provider:
(#6527) Fix uninstall problem and refactor
(#6527) Added pip package provider.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Uninstall wasn't working properly because the instances method relied on
the pip command having been defined by calling lazy_pip. This lazy_pip
pattern is a nice way of getting around Puppet's problem of
disqualifying providers at the beginning of a run because the command
doesn't yet exist even though part way through the run the command might
exist.
Really, we need to fix puppet to lazily evaluate a provider
command for validity only at the time the provider is needed.
The refactoring also pointed out that query could just reuse the logic
from instances.
The tests were also refactored to use real resources instead of stubbed
ones, and they reflect the implementation changes to instances.
Paired-with: Richard Crowley <r@rcrowley.org>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Python's pip package manager is analogous to RubyGems and should be included in Puppet.
Reviewed-by: Matt Robinson <matt@puppetlabs.com>
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Running the specs under Ruby 1.9 didn't work using the lambda to recurse
down directories to find the spec_helper. Standardizing the way to find
spec_helper like the rest of specs seemed like the way to go.
Here's the command line perl I used to make the change:
perl -p -i -e "s/Dir.chdir.*lambda.*spec_helper.*$/require
File.expand_path(File.dirname(__FILE__) + '\/..\/..\/spec_helper')/"
`find spec -name "*_spec.rb"`
Then I fixed the number of dots for files that weren't two levels from
the spec dir and whose tests failed.
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 2.6.x: (36 commits)
Updated CHANGELOG for 2.6.7rc1
(#5073) Download plugins even if you're filtering on tags
Fix #5610: Prevent unnecessary RAL lookups
Revert "Merge branch 'ticket/2.6.x/5605' of git://github.com/stschulte/puppet into 2.6.next"
(#6723) Fix withenv environment restoration bug
(#6689) Remove extraneous include of Puppet::Util in InventoryActiveRecord
Remove extra trailing whitespace from lib/puppet/resource.rb
(#5428) More fully "stub" Puppet::Resource::Reference for use with storedconfigs
(#6707) Fix typo in rest_authconfig.rb
(#6689) Make inventory_active_record terminus search quickly
(#5392) Give a better error when realizing a non-existant resource
(#2645) Adding a less-stubby test to verify the "system" attribute's behavior
Update CHANGELOG for 2.6.6
maint: Remove serialization of InventoryFact values
maint: Rename InventoryHost to InventoryNode
Fixed #2645 - Added support for creating system users
maint: Remove spec run noise
maint:Refactor of mount provider integration tests
(#6338) Support searching on metadata in InventoryActiveRecord terminus
(#6338) Implement search for InventoryActiveRecord facts terminus
...
This merge includes essentially reverting #4904's change to the mount
type since tests that came in from 2.6.x specified different
behavior and what's correct is not clear to me. I've reopened #4904 and
added it to our backlog, and talked to Nigel about the RFC that's
currently out on the puppet-users mailing list for a bigger refactor of
how the mount provider works.
Manually Resolved Conflicts:
spec/spec_helper.rb
spec/unit/indirector/queue_spec.rb
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
2.6.next
Manually Resolved Conflicts:
spec/unit/provider/mount/parsed_spec.rb
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The parsedfile provider calls the method key_attributes of the resource
class to decide what resourceparameters must be put in the
property_hash. Tests that uses fake resources and only stub
resource[:name] must also stub resource.class.key_attributes
|
| |\ \ \ |
|