Class: Bosh::Director::Api::ProblemManager
- Defined in:
- lib/bosh/director/api/problem_manager.rb
Instance Method Summary collapse
- #apply_resolutions(username, deployment, resolutions) ⇒ Object
- #get_problems(deployment) ⇒ Object
- #perform_scan(username, deployment) ⇒ Object
- #scan_and_fix(username, deployment, jobs) ⇒ Object
Instance Method Details
#apply_resolutions(username, deployment, resolutions) ⇒ Object
17 18 19 |
# File 'lib/bosh/director/api/problem_manager.rb', line 17 def apply_resolutions(username, deployment, resolutions) JobQueue.new.enqueue(username, Jobs::CloudCheck::ApplyResolutions, 'apply resolutions', [deployment.name, resolutions], deployment) end |
#get_problems(deployment) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/bosh/director/api/problem_manager.rb', line 8 def get_problems(deployment) filters = { :deployment_id => deployment.id, :state => 'open' } Models::DeploymentProblem.filter(filters).order(:created_at).all end |
#perform_scan(username, deployment) ⇒ Object
4 5 6 |
# File 'lib/bosh/director/api/problem_manager.rb', line 4 def perform_scan(username, deployment) JobQueue.new.enqueue(username, Jobs::CloudCheck::Scan, 'scan cloud', [deployment.name], deployment) end |
#scan_and_fix(username, deployment, jobs) ⇒ Object
21 22 23 |
# File 'lib/bosh/director/api/problem_manager.rb', line 21 def scan_and_fix(username, deployment, jobs) JobQueue.new.enqueue(username, Jobs::CloudCheck::ScanAndFix, 'scan and fix', [deployment.name, jobs, Bosh::Director::Config.fix_stateful_nodes], deployment) end |