Project

General

Profile

Actions

Bug #386

closed

ImportClasses should be callable from a rake task

Added by Paul Kelly about 14 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Importers
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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.


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #239: Class import doesn't prune erased classesClosedPaul Kelly05/06/2010Actions
Actions #1

Updated by Paul Kelly about 14 years ago

  • Subject changed from Import host and classes shold be callable from a rake task to ImportClasses should be callable from a rake task
Actions #2

Updated by Ohad Levy about 14 years ago

  • Target version set to 0.1-6
Actions #3

Updated by Paul Kelly about 14 years ago

  • Status changed from New to Ready For Testing
  • Branch set to bug/386-rake-calls-importClasses

Updated the rake task

Actions #4

Updated by Ohad Levy about 14 years ago

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.

Actions #5

Updated by Paul Kelly about 14 years ago

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

Actions #6

Updated by Paul Kelly about 14 years ago

rebased and tested

Actions #7

Updated by Ohad Levy about 14 years ago

  • 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)

Actions #8

Updated by Paul Kelly about 14 years ago

  • Status changed from Feedback to Ready For Testing
  • % Done changed from 0 to 100
Actions #9

Updated by Ohad Levy about 14 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF