Class HammerCLIImport::BaseCommand
In: lib/hammer_cli_import/base.rb
Parent: HammerCLI::Apipie::Command

Methods

Included Modules

PersistentMap::Include ImportTools::ImportLogging::Include ImportTools::Task::Include ImportTools::Exceptional::Include AsyncTasksReactor::Include

Attributes

api_pwd  [R] 
api_usr  [R] 
reportname  [RW] 

Public Class methods

Call API. Ideally accessed via api_call instance method. This is supposed to be the only way to access @api.

Initialize API. Needed to be called before any api_call calls. If used in shell, it may be called multiple times

Which columns have to be be present in CSV.

Public Instance methods

Call API. Convenience method for calling api_call class method.

Create entity, with recovery strategy.

  • +:map+ - Use existing entity
  • +:rename+ - Change name
  • nil - Fail

Delete entity by original (Sat5) id

This method is called to process single CSV line when deleting

this method returns a first found original_id (since we‘re able to map several organizations into one)

This method is called to process single CSV line when importing.

Call API on corresponding resource (defined by map_target_entity).

Method to call when you have created/deleted/found/mapped… something. Collected data used for summary reporting.

:found is used for situation, when you want to create something, but you found out, it is already created.

Method for use when writing messages to user.

    > to_singular(:contentveiws)
    "contentview"
    > to_singular(:repositories)
    "repository"

Wait for asynchronous task.

  • uuid - UUID of async task.
  • start_wait - Seconds to wait before first check.
  • delta_wait - How much longer will every next wait be (unless max_wait is reached).
  • max_wait - Maximum time to wait between two checks.

[Validate]