Class: Crowbar::Client::App::Repository

Inherits:
Base
  • Object
show all
Defined in:
lib/crowbar/client/app/repository.rb

Overview

A Thor based CLI wrapper for repository commands

Instance Method Summary collapse

Methods inherited from Base

banner, handle_argument_error, #initialize

Constructor Details

This class inherits a constructor from Crowbar::Client::App::Base

Instance Method Details

#activate(platform, arch, repo) ⇒ Object



88
89
90
91
92
93
94
95
96
97
98
# File 'lib/crowbar/client/app/repository.rb', line 88

def activate(platform, arch, repo)
  Command::Repository::Activate.new(
    *command_params(
      platform: platform,
      arch: arch,
      repo: repo
    )
  ).execute
rescue => e
  catch_errors(e)
end

#activate_allObject



108
109
110
111
112
113
114
# File 'lib/crowbar/client/app/repository.rb', line 108

def activate_all
  Command::Repository::ActivateAll.new(
    *command_params
  ).execute
rescue => e
  catch_errors(e)
end

#deactivate(platform, arch, repo) ⇒ Object



124
125
126
127
128
129
130
131
132
133
134
# File 'lib/crowbar/client/app/repository.rb', line 124

def deactivate(platform, arch, repo)
  Command::Repository::Deactivate.new(
    *command_params(
      platform: platform,
      arch: arch,
      repo: repo
    )
  ).execute
rescue => e
  catch_errors(e)
end

#deactivate_allObject



144
145
146
147
148
149
150
# File 'lib/crowbar/client/app/repository.rb', line 144

def deactivate_all
  Command::Repository::DeactivateAll.new(
    *command_params
  ).execute
rescue => e
  catch_errors(e)
end

#listObject



72
73
74
75
76
77
78
# File 'lib/crowbar/client/app/repository.rb', line 72

def list
  Command::Repository::List.new(
    *command_params
  ).execute
rescue => e
  catch_errors(e)
end