Class: Bosh::Director::Api::Controllers::PackagesController

Inherits:
BaseController show all
Defined in:
lib/bosh/director/api/controllers/packages_controller.rb

Constant Summary

Constants inherited from BaseController

BaseController::ROUTES_WITH_EXTENDED_TIMEOUT

Constants included from Http

Http::BAD_REQUEST, Http::CREATED, Http::FORBIDDEN, Http::INTERNAL_SERVER_ERROR, Http::NOT_FOUND, Http::NO_CONTENT, Http::OK, Http::UNAUTHORIZED

Constants included from ApiHelper

ApiHelper::READ_CHUNK_SIZE

Instance Attribute Summary

Attributes inherited from BaseController

#identity_provider

Instance Method Summary collapse

Methods inherited from BaseController

consumes, #initialize, #requires_authentication?

Methods included from ApiHelper

#check_available_disk_space, #json_decode, #json_encode, #prepare_yml_file, #send_disposable_file, #start_task, #validate_manifest_yml, #write_file

Constructor Details

This class inherits a constructor from Bosh::Director::Api::Controllers::BaseController

Instance Method Details

#filter_matching_packages(matching_packages, manifest) ⇒ Object

dependencies & stemcell should also match



46
47
48
49
50
51
52
53
54
55
# File 'lib/bosh/director/api/controllers/packages_controller.rb', line 46

def filter_matching_packages(matching_packages, manifest)
  compiled_release_manifest = CompiledRelease::Manifest.new(manifest)
  filtered_packages = []
  matching_packages.each do |package|
    if compiled_release_manifest.has_matching_package(package.name, package[:stemcell_os], package[:stemcell_version], package[:dependency_key])
      filtered_packages << package
    end
  end
  filtered_packages
end