Module: HammerCLIKatello::ApipieHelper

Included in:
ContentExportHelper, ContentViewPurgeCommand, SimpleContentAccess::EligibleCheck
Defined in:
lib/hammer_cli_katello/apipie_helper.rb

Instance Method Summary collapse

Instance Method Details

#call(action, resource, options = {}) ⇒ Object



19
20
21
# File 'lib/hammer_cli_katello/apipie_helper.rb', line 19

def call(action, resource, options = {})
  HammerCLIForeman.foreman_resource(resource).call(action, options)
end

#destroy(resource, options = {}) ⇒ Object



15
16
17
# File 'lib/hammer_cli_katello/apipie_helper.rb', line 15

def destroy(resource, options = {})
  call(:destroy, resource, options)
end

#index(resource, options = {}) ⇒ Object



7
8
9
# File 'lib/hammer_cli_katello/apipie_helper.rb', line 7

def index(resource, options = {})
  call(:index, resource, options)['results']
end

#show(resource, options = {}) ⇒ Object



3
4
5
# File 'lib/hammer_cli_katello/apipie_helper.rb', line 3

def show(resource, options = {})
  call(:show, resource, options)
end

#update(resource, options = {}) ⇒ Object



11
12
13
# File 'lib/hammer_cli_katello/apipie_helper.rb', line 11

def update(resource, options = {})
  call(:update, resource, options)['results']
end