Class: Conjur::Command::LDAPSync

Inherits:
Conjur::Command show all
Defined in:
lib/conjur/command/ldapsync.rb

Constant Summary collapse

LIST_FORMATS =
%w(pretty json)

Class Method Summary collapse

Methods inherited from Conjur::Command

acting_as_option, annotate_option, api, api=, assert_empty, collection_option, command, command_impl_for_list, command_options_for_list, context_option, current_role, current_user, destination_role, display, display_members, elevated?, give_away_resource, has_admin?, hide_docs, highline, integer?, interactive_option, method_missing, min_version, prompt_for_annotations, prompt_for_group, prompt_for_id, prompt_for_idnumber, prompt_for_password, prompt_for_public_key, prompt_to_confirm, read_till_eof, require_arg, retire_internal_role, retire_options, retire_resource, retire_role, validate_privileges, validate_public_key, validate_retire_privileges

Methods included from IdentifierManipulation

#conjur_account, #full_resource_id, #get_kind_and_id_from_args

Class Method Details

.find_job_by_id(args) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/conjur/command/ldapsync.rb', line 7

def self.find_job_by_id args
  job_id = require_arg args, 'JOB-ID'

  if (job = api.ldap_sync_jobs.find{|j| j.id == job_id})
    job
  else
    exit_now! "No job found with ID '#{job_id}'"
  end
end