Add box from ruby
This commit is contained in:
parent
c50ca3a991
commit
c5de0d88f7
@ -24,8 +24,8 @@ module Vagrant
|
||||
# @return [Vagrant::Box]
|
||||
def add(path, name, version, **opts)
|
||||
client.add(
|
||||
path, name, version, force: opts[:force],
|
||||
metadata_url: opts[:metadata_url], provider:opts[:providers]
|
||||
path, name, version, force=opts[:force],
|
||||
metadata_url=opts[:metadata_url], provider=opts[:providers]
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
@ -7,9 +7,10 @@ module VagrantPlugins
|
||||
|
||||
# @return [Vagrant::Box] box added
|
||||
def add(path, name, version, force=false, metadata_url=nil, providers=[])
|
||||
logger.debug("adding box at path #{path}")
|
||||
res = client.add(SDK::BoxCollection::AddRequest.new(
|
||||
path: path, name: name, version: version, metadataUrl: metadata_url,
|
||||
force: force, providers: providers
|
||||
path: path.to_s, name: name, version: version, metadataUrl: metadata_url,
|
||||
force: force, providers: Array(providers)
|
||||
))
|
||||
box_client = Box.load(res, broker: broker)
|
||||
box = Vagrant::Box.new(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user