class ChefCLI::Policyfile::ArchivedCookbook
def build_from_lock_data(lock_data)
def build_from_lock_data(lock_data) raise NotImplementedError, "ArchivedCookbook cannot be built from lock data, it can only wrap an existing lock object" end
def cookbook_path
So the cookbook will be located in a path like:
mode" repos since Chef Zero doesn't yet support cookbook_artifact APIs.
created by `chef export`. Currently that only creates "compatibility
The cookbook is assumed to be stored in a Chef Zero compatible repo as
def cookbook_path File.join(relative_paths_root, "cookbook_artifacts", "#{name}-#{identifier}") end
def initialize(archived_lock, storage_config)
def initialize(archived_lock, storage_config) @archived_lock = archived_lock @storage_config = storage_config end
def installed?
def installed? File.exist?(cookbook_path) && File.directory?(cookbook_path) end
def refresh!
We trust that archived cookbooks haven't been modified, so just return
def refresh! true end
def validate!
We trust that archived cookbooks haven't been modified, so just return
def validate! true end