Bug #386
closed
ImportClasses should be callable from a rake task
Added by Paul Kelly about 14 years ago.
Updated about 14 years ago.
Description
The import facility for environments and puppetclasses was updated in the GUI but there was a rake task that called the old API and this does not work now.
- Subject changed from Import host and classes shold be callable from a rake task to ImportClasses should be callable from a rake task
- Target version set to 0.1-6
- Status changed from New to Ready For Testing
- Branch set to bug/386-rake-calls-importClasses
i think you need to add support for actions via parameters, as this might be called from a cron job, or a repo hook script.
A batch mode has been supplied that requires no interaction. Activate by rake puppet:import:puppet_classes[true]
If the file config/ignored_classes_and_environments.yml is present then its contents are stripped from the set of changes that the puppetclass import will attempt to do. There is also a self documenting sample file in extras/ignored_classes_and_environments.yml.sample
- Status changed from Ready For Testing to Feedback
while trying to test, i've got the following test failing:
1) Failure:
test_should_obey_config/ignored_classes_and_environments.yml(EnvironmentsControllerTest) [/test/functional/environments_controller_test.rb:149]:
not all expectations were satisfied
unsatisfied expectations:
- expected at least once, not yet invoked: Puppetclass(id: integer, name: string, nameindicator: string, operatingsystem_id: integer, created_at: datetime, updated_at: datetime).scanForClasses(any_parameters)
satisfied expectations:
- expected at least once, already invoked once: Environment(id: integer, name: string, created_at: datetime, updated_at: datetime).puppetEnvs(any_parameters)
- Status changed from Feedback to Ready For Testing
- % Done changed from 0 to 100
- Status changed from Ready For Testing to Closed
Also available in: Atom
PDF