Update box metadata Name endpoint to boxName

This commit is contained in:
sophia 2022-04-01 12:02:40 -05:00 committed by Paul Hinze
parent 66524426d0
commit 03ecb877e6
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0
3 changed files with 5 additions and 4 deletions

View File

@ -24,11 +24,12 @@ module Vagrant
end
@client = Vagrant.plugin("2").remote_manager.core_plugin_manager.get_plugin("boxmetadata")
@client.load_metadata(url)
@name = @client.name
end
def version(version, **opts)
providers = nil
providers = Array(opts[:provider]).map(&:to_sym) if opts[:provider]
providers = Array(opts[:provider]) || []
v = @client.version(version, providers)
@logger.debug("found version for #{version}, #{providers}: #{v}")
@ -65,7 +66,7 @@ module Vagrant
def providers
@logger.debug("searching for providers with ver #{@version}")
@client.providers(@version)
@client.list_providers(@version)
end
class Provider

View File

@ -593,7 +593,7 @@ module Hashicorp
self.unmarshal_class_method = :decode
self.service_name = 'hashicorp.vagrant.sdk.BoxMetadataService'
rpc :Name, ::Google::Protobuf::Empty, ::Hashicorp::Vagrant::Sdk::BoxMetadata::NameResponse
rpc :BoxName, ::Google::Protobuf::Empty, ::Hashicorp::Vagrant::Sdk::BoxMetadata::NameResponse
rpc :LoadMetadata, ::Hashicorp::Vagrant::Sdk::BoxMetadata::LoadMetadataRequest, ::Google::Protobuf::Empty
rpc :Version, ::Hashicorp::Vagrant::Sdk::BoxMetadata::VersionQuery, ::Hashicorp::Vagrant::Sdk::BoxMetadata::VersionResponse
rpc :ListVersions, ::Hashicorp::Vagrant::Sdk::BoxMetadata::ListVersionsQuery, ::Hashicorp::Vagrant::Sdk::BoxMetadata::ListVersionsResponse

View File

@ -3,7 +3,7 @@ module VagrantPlugins
class Client
class BoxMetadata < Client
def name
client.name(Empty.new)
client.box_name(Empty.new).name
end
# @param [String] url for the metadata