From 0a80ce1ea6a689a9df83627c443e5506b3e59d84 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Mon, 13 Jun 2022 16:19:51 -0700 Subject: [PATCH] Remove config mappers from provisioner --- plugins/commands/serve/mappers/provisioner.rb | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/plugins/commands/serve/mappers/provisioner.rb b/plugins/commands/serve/mappers/provisioner.rb index 181491133..5447e2d69 100644 --- a/plugins/commands/serve/mappers/provisioner.rb +++ b/plugins/commands/serve/mappers/provisioner.rb @@ -15,35 +15,6 @@ module VagrantPlugins Client::Provisioner.load(proto, broker: broker) end end - - class GeneralConfigFromSpec < Mapper - def initialize - inputs = [].tap do |i| - i << Input.new(type: SDK::FuncSpec::Value) { |arg| - arg.type == "hashicorp.vagrant.sdk.Vagrantfile.GeneralConfig" && - !arg&.value&.value.nil? - } - end - super(inputs: inputs, output: SDK::Vagrantfile::GeneralConfig, func: method(:converter)) - end - - def converter(proto) - proto.value.unpack(SDK::Vagrantfile::GeneralConfig) - end - end - - class ConfigToProto < Mapper - def initialize - inputs = [].tap do |i| - i << Input.new(type: Vagrant::Plugin::V2::Config) - end - super(inputs: inputs, output: SDK::Vagrantfile::GeneralConfig, func: method(:converter)) - end - - def converter(config) - config.to_proto(config.class.to_s) - end - end end end end