Update provisioner service implementation

This commit is contained in:
Chris Roberts 2022-02-22 11:39:25 -08:00 committed by Paul Hinze
parent 2f4670e48a
commit f183a8a810
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -1,14 +1,7 @@
module VagrantPlugins
module CommandServe
module Service
class ProvisionerService < Hashicorp::Vagrant::Sdk::ProvisionerService::Service
prepend Util::HasMapper
prepend Util::HasBroker
prepend Util::HasLogger
include Util::ServiceInfo
include Util::HasSeeds::Service
include Util::ExceptionTransformer
class ProvisionerService < ProtoService(SDK::ProvisionerService::Service)
def cleanup(req, ctx)
machine, plugin_config = _process_args(req)
@ -19,19 +12,11 @@ module VagrantPlugins
end
def cleanup_spec(*_)
SDK::FuncSpec.new(
name: "cleanup_spec",
funcspec(
args: [
SDK::FuncSpec::Value.new(
type: "hashicorp.vagrant.sdk.Args.Target.Machine",
name: "",
),
SDK::FuncSpec::Value.new(
type: "hashicorp.vagrant.sdk.Vagrantfile.GeneralConfig",
name: "",
)
],
result: [],
SDK::Args::Target::Machine,
SDK::Vagrantfile::GeneralConfig,
]
)
end
@ -46,23 +31,14 @@ module VagrantPlugins
end
def configure_spec(*_)
SDK::FuncSpec.new(
name: "configure_spec",
funcspec(
args: [
SDK::FuncSpec::Value.new(
type: "hashicorp.vagrant.sdk.Args.Target.Machine",
name: "",
),
SDK::FuncSpec::Value.new(
type: "hashicorp.vagrant.sdk.Vagrantfile.GeneralConfig",
name: "",
)
],
result: [],
SDK::Args::Target::Machine,
SDK::Vagrantfile::GeneralConfig,
]
)
end
def provision(req, ctx)
machine, plugin_config = _process_args(req)
@ -74,19 +50,11 @@ module VagrantPlugins
end
def provision_spec(*_)
SDK::FuncSpec.new(
name: "provision_spec",
funcspec(
args: [
SDK::FuncSpec::Value.new(
type: "hashicorp.vagrant.sdk.Args.Target.Machine",
name: "",
),
SDK::FuncSpec::Value.new(
type: "hashicorp.vagrant.sdk.Vagrantfile.GeneralConfig",
name: "",
)
],
result: [],
SDK::Args::Target::Machine,
SDK::Vagrantfile::GeneralConfig,
]
)
end