diff --git a/plugins/commands/serve/client/basis.rb b/plugins/commands/serve/client/basis.rb index 95785477f..bea0620eb 100644 --- a/plugins/commands/serve/client/basis.rb +++ b/plugins/commands/serve/client/basis.rb @@ -1,11 +1,7 @@ module VagrantPlugins module CommandServe - module Client - class Basis - prepend Util::ClientSetup - prepend Util::HasLogger - prepend Util::HasMapper - + class Client + class Basis < Client # return [Sdk::Args::DataDir::Basis] def data_dirs resp = client.data_dir(Empty.new) diff --git a/plugins/commands/serve/client/box.rb b/plugins/commands/serve/client/box.rb index af0b3c01f..dad8d680d 100644 --- a/plugins/commands/serve/client/box.rb +++ b/plugins/commands/serve/client/box.rb @@ -1,10 +1,7 @@ module VagrantPlugins module CommandServe - module Client - class Box - prepend Util::ClientSetup - prepend Util::HasLogger - + class Client + class Box < Client # @return [Bool] check allowed def automatic_update_check_allowed res = client.automatic_update_check_allowed(Empty.new) @@ -33,7 +30,8 @@ module VagrantPlugins # @param [String] path def repackage(path) - client.repackage(SDK::Args::Path.new(path: path.to_s)) + path = Pathname.new(path.to_s) + client.repackage(mapper.map(path, to: SDK::Args::Path)) end # @return [String] path @@ -79,7 +77,7 @@ module VagrantPlugins res = client.compare(box) res.result end - end + end end end end diff --git a/plugins/commands/serve/client/box_collection.rb b/plugins/commands/serve/client/box_collection.rb index 9f614f7ea..7352084d4 100644 --- a/plugins/commands/serve/client/box_collection.rb +++ b/plugins/commands/serve/client/box_collection.rb @@ -1,10 +1,7 @@ module VagrantPlugins module CommandServe - module Client - class BoxCollection - prepend Util::ClientSetup - prepend Util::HasLogger - + class Client + class BoxCollection < Client # @return [Vagrant::Box] box added def add(path, name, version, force=false, metadata_url=nil, providers=[]) logger.debug("adding box at path #{path}") diff --git a/plugins/commands/serve/client/plugin_manager.rb b/plugins/commands/serve/client/plugin_manager.rb index 743cfcfc5..0adf1f3e5 100644 --- a/plugins/commands/serve/client/plugin_manager.rb +++ b/plugins/commands/serve/client/plugin_manager.rb @@ -1,12 +1,7 @@ module VagrantPlugins module CommandServe - module Client - class PluginManager - - prepend Util::ClientSetup - prepend Util::HasLogger - prepend Util::HasMapper - + class Client + class PluginManager < Client def list_plugins(types=[]) resp = client.list_plugins( SDK::PluginManager::PluginsRequest.new( diff --git a/plugins/commands/serve/client/project.rb b/plugins/commands/serve/client/project.rb index 7bd1abf19..fa13a8fb7 100644 --- a/plugins/commands/serve/client/project.rb +++ b/plugins/commands/serve/client/project.rb @@ -1,10 +1,7 @@ module VagrantPlugins module CommandServe - module Client - class Project - prepend Util::ClientSetup - prepend Util::HasLogger - + class Client + class Project < Client # return [VagrantPlugins::CommandServe::Client::BoxCollection] def boxes BoxCollection.load( diff --git a/plugins/commands/serve/client/state_bag.rb b/plugins/commands/serve/client/state_bag.rb index 4fc077bcb..39410f5a6 100644 --- a/plugins/commands/serve/client/state_bag.rb +++ b/plugins/commands/serve/client/state_bag.rb @@ -1,12 +1,7 @@ -require "google/protobuf/well_known_types" - module VagrantPlugins module CommandServe - module Client - class StateBag - prepend Util::ClientSetup - prepend Util::HasLogger - + class Client + class StateBag < Client # @param [String] # @return [String] def get(key) diff --git a/plugins/commands/serve/client/target.rb b/plugins/commands/serve/client/target.rb index ef0d99120..1d193f60c 100644 --- a/plugins/commands/serve/client/target.rb +++ b/plugins/commands/serve/client/target.rb @@ -2,14 +2,10 @@ require "time" module VagrantPlugins module CommandServe - module Client - class Target - + class Client + class Target < Client autoload :Machine, Vagrant.source_root.join("plugins/commands/serve/client/target/machine").to_s - prepend Util::ClientSetup - prepend Util::HasLogger - STATES = [ :UNKNOWN, :PENDING, diff --git a/plugins/commands/serve/client/target/machine.rb b/plugins/commands/serve/client/target/machine.rb index 73bed6b31..4e5b16365 100644 --- a/plugins/commands/serve/client/target/machine.rb +++ b/plugins/commands/serve/client/target/machine.rb @@ -1,15 +1,11 @@ module VagrantPlugins module CommandServe - module Client + class Client # Machine is a specialization of a generic Target # and is how legacy Vagrant willl interact with # targets class Target class Machine < Target - - prepend Util::ClientSetup - prepend Util::HasLogger - # @return [String] resource identifier for this target def ref SDK::Ref::Target::Machine.new(resource_id: resource_id) @@ -97,7 +93,7 @@ module VagrantPlugins client.set_state(req) end - # Synced folder for machine + # Synced folder for machine # # @return [List<[Client::SyncedFolder, Map]>] def synced_folders diff --git a/plugins/commands/serve/client/target_index.rb b/plugins/commands/serve/client/target_index.rb index 80bb96563..b80d7c50f 100644 --- a/plugins/commands/serve/client/target_index.rb +++ b/plugins/commands/serve/client/target_index.rb @@ -1,11 +1,7 @@ module VagrantPlugins module CommandServe - module Client - class TargetIndex - - prepend Util::ClientSetup - prepend Util::HasLogger - + class Client + class TargetIndex < Client # @param [string] # @return [Boolean] true if delete is successful def delete(ident) diff --git a/plugins/commands/serve/client/terminal.rb b/plugins/commands/serve/client/terminal.rb index 08bb7bc4c..ed606febf 100644 --- a/plugins/commands/serve/client/terminal.rb +++ b/plugins/commands/serve/client/terminal.rb @@ -1,14 +1,7 @@ -# TODO(spox): why do we need this?! -require_relative "../util.rb" - module VagrantPlugins module CommandServe - module Client - class Terminal - - prepend Util::ClientSetup - prepend Util::HasLogger - + class Client + class Terminal < Client # @return [String] name of proto class def self.sdk_alias "TerminalUI"