mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-05-28 04:36:05 -04:00
Return list of box info when requesting all boxes
This commit is contained in:
parent
9e04d926bf
commit
69b15f7140
2 changed files with 8 additions and 3 deletions
|
|
@ -33,7 +33,12 @@ module Vagrant
|
|||
# @return [Array] Array of `[name, version, provider]` of the boxes
|
||||
# installed on this system.
|
||||
def all
|
||||
client.all
|
||||
all_boxes = client.all
|
||||
boxes = []
|
||||
all_boxes.each do |b|
|
||||
boxes << [b.name, b.version, b.provider]
|
||||
end
|
||||
boxes
|
||||
end
|
||||
|
||||
# @return [Box] The box found, or `nil` if not found.
|
||||
|
|
|
|||
|
|
@ -46,9 +46,9 @@ module VagrantPlugins
|
|||
end
|
||||
|
||||
# @return [Vagrant::Box] box found
|
||||
def find(name, providers, versions)
|
||||
def find(name, providers, version)
|
||||
res = client.find(SDK::BoxCollection::FindRequest.new(
|
||||
name: name, version: version, providers: providers
|
||||
name: name, version: version, providers: Array(providers)
|
||||
))
|
||||
box_client = Box.load(res, broker: broker)
|
||||
box = Vagrant::Box.new(
|
||||
|
|
|
|||
Loading…
Reference in a new issue