Move Vagrantfile proto definition to the plugin sdk

This commit is contained in:
sophia 2021-05-26 15:24:55 -05:00 committed by Paul Hinze
parent eeb7028a48
commit 5bfa4a6f48
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0
7 changed files with 190 additions and 1709 deletions

2
gen.go
View File

@ -8,7 +8,7 @@ package main
//go:generate sh -c "protoc -I`go list -m -f \"{{.Dir}}\" github.com/mitchellh/protostructure` -I`go list -m -f \"{{.Dir}}\" github.com/hashicorp/vagrant-plugin-sdk`/proto/vagrant_plugin_sdk -I./vendor/proto/api-common-protos -I./internal/server --go-grpc_out=require_unimplemented_servers=false:./internal/server/proto/vagrant_server --go-grpc_opt=module=github.com/hashicorp/vagrant/internal/server/proto/vagrant_server --go_out=./internal/server/proto/vagrant_server --go_opt=module=github.com/hashicorp/vagrant/internal/server/proto/vagrant_server internal/server/proto/vagrant_server/*.proto"
// Builds the Ruby Vagrant Go GRPC for legacy Vagrant interactions
//go:generate sh -c "protoc -I./vendor/proto/api-common-protos -I./internal/server --go-grpc_out=./internal/server/proto/ruby_vagrant --go-grpc_opt=module=github.com/hashicorp/vagrant/internal/server/proto/ruby_vagrant --go_out=./internal/server/proto/ruby_vagrant --go_opt=module=github.com/hashicorp/vagrant/internal/server/proto/ruby_vagrant internal/server/proto/ruby_vagrant/*.proto"
//go:generate sh -c "protoc -I./vendor/proto/api-common-protos -I./internal/server -I`go list -m -f \"{{.Dir}}\" github.com/mitchellh/protostructure` -I`go list -m -f \"{{.Dir}}\" github.com/hashicorp/vagrant-plugin-sdk`/proto/vagrant_plugin_sdk --go-grpc_out=./internal/server/proto/ruby_vagrant --go-grpc_opt=module=github.com/hashicorp/vagrant/internal/server/proto/ruby_vagrant --go_out=./internal/server/proto/ruby_vagrant --go_opt=module=github.com/hashicorp/vagrant/internal/server/proto/ruby_vagrant internal/server/proto/ruby_vagrant/*.proto"
// Builds the Ruby GRPC for the Vagrant server and Ruby Vagrant interactions
//go:generate sh -c "grpc_tools_ruby_protoc -I`go list -m -f \"{{.Dir}}\" github.com/mitchellh/protostructure` -I`go list -m -f \"{{.Dir}}\" github.com/hashicorp/vagrant-plugin-sdk`/proto/vagrant_plugin_sdk -I./vendor/proto/api-common-protos -I./internal/server --grpc_out=./lib/vagrant/protobufs/ --ruby_out=./lib/vagrant/protobufs/ internal/server/proto/vagrant_server/*.proto internal/server/proto/ruby_vagrant/*.proto"

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,8 @@ option go_package = "github.com/hashicorp/vagrant/internal/server/proto/ruby_vag
import "google/protobuf/empty.proto";
import "google/protobuf/any.proto";
import "plugin.proto";
// The service that is implemented for the server backend.
service RubyVagrant {
// Gets available ruby plugins
@ -55,120 +57,5 @@ message ParseVagrantfileRequest {
message ParseVagrantfileResponse {
// Vagrantfile representation
VagrantfileComponents.Vagrantfile vagrantfile = 1;
}
message VagrantfileComponents {
message ConfigVM {
repeated string allowed_synced_folder_types = 1;
bool allow_fstab_modification = 2;
bool allow_hosts_modificaion = 3;
string base_mac = 4;
string base_address = 5;
int32 boot_timeout = 6;
string box = 7;
bool ignore_box_vagrantfile = 8;
bool box_check_update = 9;
repeated string box_url = 10;
string box_server_url = 11;
string box_version = 12;
string box_download_ca_cert = 13;
string box_download_ca_path = 14;
string box_download_checksum = 15;
string box_download_checksum_type = 16;
string box_download_client_cert = 17;
bool box_download_insecure = 18;
bool box_download_location_trusted = 19;
map<string, string> box_download_options = 20;
string communicator = 21;
int32 graceful_halt_timeout = 22;
string guest = 23;
string hostname = 24;
string post_up_message = 25;
repeated int32 usable_port_range = 26;
repeated string box_extra_download_options = 27;
// TODO: CloudInit = 4 (Experimental)
repeated Provider providers = 29;
// TODO: Disks = 6 (Experimental)
repeated Network networks = 31;
repeated Provisioner provisioners = 32;
repeated SyncedFolder synced_folders = 33;
}
message ConfigSSH {
google.protobuf.Any config = 1;
}
message ConfigWinRM {
google.protobuf.Any config = 1;
}
message ConfigWinssh {
google.protobuf.Any config = 1;
}
message ConfigVagrant {
string host = 1;
// TODO: plugins can be a string, a hash or array
repeated string plugins = 2;
repeated string sensitive = 3;
}
// TODO: Review what needs to be sent here
message MachineConfig {
string name = 1;
ConfigVM config_vm = 2;
ConfigSSH config_ssh = 3;
ConfigWinRM config_winrm = 4;
ConfigWinssh config_winssh = 5;
ConfigVagrant config_vagrant = 6;
}
message Provisioner {
string name = 1;
string type = 2;
string before = 3;
string after = 4;
bool communicator_required = 5;
// A Provisioner plugin defines it's own configuration,
// that gets added in here
google.protobuf.Any config = 6;
}
message Provider {
string type = 1;
google.protobuf.Any config = 2;
}
message Network {
string type = 1;
string id = 2;
google.protobuf.Any config = 3;
}
message SyncedFolder {
string source = 1;
string destination = 2;
// A SyncedFolder plugin defines it's own configuration,
// that gets added in here
google.protobuf.Any config = 3;
bool create = 4;
bool disabled = 5;
string group = 6;
string id = 7;
repeated string mount_options = 8;
string owner = 9;
string type = 10;
}
// TODO: Review what needs to be sent here
message Vagrantfile {
string path = 1;
string raw = 2;
string current_version = 3;
repeated MachineConfig machine_configs = 4;
}
sdk.Vagrantfile.Vagrantfile vagrantfile = 1;
}

View File

@ -10,12 +10,13 @@ import (
"google.golang.org/grpc"
"github.com/hashicorp/vagrant-plugin-sdk/internal-shared/pluginclient"
"github.com/hashicorp/vagrant-plugin-sdk/proto/vagrant_plugin_sdk"
"github.com/hashicorp/vagrant/internal/server/proto/ruby_vagrant"
)
type RubyVagrant interface {
GetPlugins() ([]*ruby_vagrant.Plugin, error)
ParseVagrantfile(string) (*ruby_vagrant.VagrantfileComponents_Vagrantfile, error)
ParseVagrantfile(string) (*vagrant_plugin_sdk.Vagrantfile_Vagrantfile, error)
}
// This is the implementation of plugin.GRPCPlugin so we can serve/consume this.
@ -65,7 +66,7 @@ func (r *RubyVagrantClient) GetPlugins() ([]*ruby_vagrant.Plugin, error) {
}
// TODO: This should return an hcl Vagrantfile representation
func (r *RubyVagrantClient) ParseVagrantfile(path string) (*ruby_vagrant.VagrantfileComponents_Vagrantfile, error) {
func (r *RubyVagrantClient) ParseVagrantfile(path string) (*vagrant_plugin_sdk.Vagrantfile_Vagrantfile, error) {
vf, err := r.client.ParseVagrantfile(
context.Background(),
&ruby_vagrant.ParseVagrantfileRequest{Path: path},

View File

@ -5,6 +5,7 @@ require 'google/protobuf'
require 'google/protobuf/empty_pb'
require 'google/protobuf/any_pb'
require 'plugin_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_file("proto/ruby_vagrant/ruby-server.proto", :syntax => :proto3) do
add_message "hashicorp.vagrant.GetPluginsResponse" do
@ -27,99 +28,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :path, :string, 1
end
add_message "hashicorp.vagrant.ParseVagrantfileResponse" do
optional :vagrantfile, :message, 1, "hashicorp.vagrant.VagrantfileComponents.Vagrantfile"
end
add_message "hashicorp.vagrant.VagrantfileComponents" do
end
add_message "hashicorp.vagrant.VagrantfileComponents.ConfigVM" do
repeated :allowed_synced_folder_types, :string, 1
optional :allow_fstab_modification, :bool, 2
optional :allow_hosts_modificaion, :bool, 3
optional :base_mac, :string, 4
optional :base_address, :string, 5
optional :boot_timeout, :int32, 6
optional :box, :string, 7
optional :ignore_box_vagrantfile, :bool, 8
optional :box_check_update, :bool, 9
repeated :box_url, :string, 10
optional :box_server_url, :string, 11
optional :box_version, :string, 12
optional :box_download_ca_cert, :string, 13
optional :box_download_ca_path, :string, 14
optional :box_download_checksum, :string, 15
optional :box_download_checksum_type, :string, 16
optional :box_download_client_cert, :string, 17
optional :box_download_insecure, :bool, 18
optional :box_download_location_trusted, :bool, 19
map :box_download_options, :string, :string, 20
optional :communicator, :string, 21
optional :graceful_halt_timeout, :int32, 22
optional :guest, :string, 23
optional :hostname, :string, 24
optional :post_up_message, :string, 25
repeated :usable_port_range, :int32, 26
repeated :box_extra_download_options, :string, 27
repeated :providers, :message, 29, "hashicorp.vagrant.VagrantfileComponents.Provider"
repeated :networks, :message, 31, "hashicorp.vagrant.VagrantfileComponents.Network"
repeated :provisioners, :message, 32, "hashicorp.vagrant.VagrantfileComponents.Provisioner"
repeated :synced_folders, :message, 33, "hashicorp.vagrant.VagrantfileComponents.SyncedFolder"
end
add_message "hashicorp.vagrant.VagrantfileComponents.ConfigSSH" do
optional :config, :message, 1, "google.protobuf.Any"
end
add_message "hashicorp.vagrant.VagrantfileComponents.ConfigWinRM" do
optional :config, :message, 1, "google.protobuf.Any"
end
add_message "hashicorp.vagrant.VagrantfileComponents.ConfigWinssh" do
optional :config, :message, 1, "google.protobuf.Any"
end
add_message "hashicorp.vagrant.VagrantfileComponents.ConfigVagrant" do
optional :host, :string, 1
repeated :plugins, :string, 2
repeated :sensitive, :string, 3
end
add_message "hashicorp.vagrant.VagrantfileComponents.MachineConfig" do
optional :name, :string, 1
optional :config_vm, :message, 2, "hashicorp.vagrant.VagrantfileComponents.ConfigVM"
optional :config_ssh, :message, 3, "hashicorp.vagrant.VagrantfileComponents.ConfigSSH"
optional :config_winrm, :message, 4, "hashicorp.vagrant.VagrantfileComponents.ConfigWinRM"
optional :config_winssh, :message, 5, "hashicorp.vagrant.VagrantfileComponents.ConfigWinssh"
optional :config_vagrant, :message, 6, "hashicorp.vagrant.VagrantfileComponents.ConfigVagrant"
end
add_message "hashicorp.vagrant.VagrantfileComponents.Provisioner" do
optional :name, :string, 1
optional :type, :string, 2
optional :before, :string, 3
optional :after, :string, 4
optional :communicator_required, :bool, 5
optional :config, :message, 6, "google.protobuf.Any"
end
add_message "hashicorp.vagrant.VagrantfileComponents.Provider" do
optional :type, :string, 1
optional :config, :message, 2, "google.protobuf.Any"
end
add_message "hashicorp.vagrant.VagrantfileComponents.Network" do
optional :type, :string, 1
optional :id, :string, 2
optional :config, :message, 3, "google.protobuf.Any"
end
add_message "hashicorp.vagrant.VagrantfileComponents.SyncedFolder" do
optional :source, :string, 1
optional :destination, :string, 2
optional :config, :message, 3, "google.protobuf.Any"
optional :create, :bool, 4
optional :disabled, :bool, 5
optional :group, :string, 6
optional :id, :string, 7
repeated :mount_options, :string, 8
optional :owner, :string, 9
optional :type, :string, 10
end
add_message "hashicorp.vagrant.VagrantfileComponents.Vagrantfile" do
optional :path, :string, 1
optional :raw, :string, 2
optional :current_version, :string, 3
repeated :machine_configs, :message, 4, "hashicorp.vagrant.VagrantfileComponents.MachineConfig"
optional :vagrantfile, :message, 1, "hashicorp.vagrant.sdk.Vagrantfile.Vagrantfile"
end
end
end
@ -131,17 +40,5 @@ module Hashicorp
Plugin::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.Plugin.Type").enummodule
ParseVagrantfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.ParseVagrantfileRequest").msgclass
ParseVagrantfileResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.ParseVagrantfileResponse").msgclass
VagrantfileComponents = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.VagrantfileComponents").msgclass
VagrantfileComponents::ConfigVM = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.VagrantfileComponents.ConfigVM").msgclass
VagrantfileComponents::ConfigSSH = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.VagrantfileComponents.ConfigSSH").msgclass
VagrantfileComponents::ConfigWinRM = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.VagrantfileComponents.ConfigWinRM").msgclass
VagrantfileComponents::ConfigWinssh = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.VagrantfileComponents.ConfigWinssh").msgclass
VagrantfileComponents::ConfigVagrant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.VagrantfileComponents.ConfigVagrant").msgclass
VagrantfileComponents::MachineConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.VagrantfileComponents.MachineConfig").msgclass
VagrantfileComponents::Provisioner = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.VagrantfileComponents.Provisioner").msgclass
VagrantfileComponents::Provider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.VagrantfileComponents.Provider").msgclass
VagrantfileComponents::Network = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.VagrantfileComponents.Network").msgclass
VagrantfileComponents::SyncedFolder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.VagrantfileComponents.SyncedFolder").msgclass
VagrantfileComponents::Vagrantfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.VagrantfileComponents.Vagrantfile").msgclass
end
end

View File

@ -558,11 +558,99 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :basis, :message, 3, "hashicorp.vagrant.sdk.Ref.Basis"
end
end
add_message "hashicorp.vagrant.sdk.Vagrantfile.Vagrantfile" do
end
add_message "hashicorp.vagrant.sdk.Vagrantfile.GetVagrantfileResponse" do
optional :vagrantfile, :message, 1, "hashicorp.vagrant.sdk.Vagrantfile.Vagrantfile"
end
add_message "hashicorp.vagrant.sdk.Vagrantfile.ConfigVM" do
repeated :allowed_synced_folder_types, :string, 1
optional :allow_fstab_modification, :bool, 2
optional :allow_hosts_modificaion, :bool, 3
optional :base_mac, :string, 4
optional :base_address, :string, 5
optional :boot_timeout, :int32, 6
optional :box, :string, 7
optional :ignore_box_vagrantfile, :bool, 8
optional :box_check_update, :bool, 9
repeated :box_url, :string, 10
optional :box_server_url, :string, 11
optional :box_version, :string, 12
optional :box_download_ca_cert, :string, 13
optional :box_download_ca_path, :string, 14
optional :box_download_checksum, :string, 15
optional :box_download_checksum_type, :string, 16
optional :box_download_client_cert, :string, 17
optional :box_download_insecure, :bool, 18
optional :box_download_location_trusted, :bool, 19
map :box_download_options, :string, :string, 20
optional :communicator, :string, 21
optional :graceful_halt_timeout, :int32, 22
optional :guest, :string, 23
optional :hostname, :string, 24
optional :post_up_message, :string, 25
repeated :usable_port_range, :int32, 26
repeated :box_extra_download_options, :string, 27
repeated :providers, :message, 29, "hashicorp.vagrant.sdk.Vagrantfile.Provider"
repeated :networks, :message, 31, "hashicorp.vagrant.sdk.Vagrantfile.Network"
repeated :provisioners, :message, 32, "hashicorp.vagrant.sdk.Vagrantfile.Provisioner"
repeated :synced_folders, :message, 33, "hashicorp.vagrant.sdk.Vagrantfile.SyncedFolder"
end
add_message "hashicorp.vagrant.sdk.Vagrantfile.ConfigSSH" do
optional :config, :message, 1, "google.protobuf.Any"
end
add_message "hashicorp.vagrant.sdk.Vagrantfile.ConfigWinRM" do
optional :config, :message, 1, "google.protobuf.Any"
end
add_message "hashicorp.vagrant.sdk.Vagrantfile.ConfigWinssh" do
optional :config, :message, 1, "google.protobuf.Any"
end
add_message "hashicorp.vagrant.sdk.Vagrantfile.ConfigVagrant" do
optional :host, :string, 1
repeated :plugins, :string, 2
repeated :sensitive, :string, 3
end
add_message "hashicorp.vagrant.sdk.Vagrantfile.MachineConfig" do
optional :name, :string, 1
optional :config_vm, :message, 2, "hashicorp.vagrant.sdk.Vagrantfile.ConfigVM"
optional :config_ssh, :message, 3, "hashicorp.vagrant.sdk.Vagrantfile.ConfigSSH"
optional :config_winrm, :message, 4, "hashicorp.vagrant.sdk.Vagrantfile.ConfigWinRM"
optional :config_winssh, :message, 5, "hashicorp.vagrant.sdk.Vagrantfile.ConfigWinssh"
optional :config_vagrant, :message, 6, "hashicorp.vagrant.sdk.Vagrantfile.ConfigVagrant"
end
add_message "hashicorp.vagrant.sdk.Vagrantfile.Provisioner" do
optional :name, :string, 1
optional :type, :string, 2
optional :before, :string, 3
optional :after, :string, 4
optional :communicator_required, :bool, 5
optional :config, :message, 6, "google.protobuf.Any"
end
add_message "hashicorp.vagrant.sdk.Vagrantfile.Provider" do
optional :type, :string, 1
optional :config, :message, 2, "google.protobuf.Any"
end
add_message "hashicorp.vagrant.sdk.Vagrantfile.Network" do
optional :type, :string, 1
optional :id, :string, 2
optional :config, :message, 3, "google.protobuf.Any"
end
add_message "hashicorp.vagrant.sdk.Vagrantfile.SyncedFolder" do
optional :source, :string, 1
optional :destination, :string, 2
optional :config, :message, 3, "google.protobuf.Any"
optional :create, :bool, 4
optional :disabled, :bool, 5
optional :group, :string, 6
optional :id, :string, 7
repeated :mount_options, :string, 8
optional :owner, :string, 9
optional :type, :string, 10
end
add_message "hashicorp.vagrant.sdk.Vagrantfile.Vagrantfile" do
optional :path, :string, 1
optional :raw, :string, 2
optional :current_version, :string, 3
repeated :machine_configs, :message, 4, "hashicorp.vagrant.sdk.Vagrantfile.MachineConfig"
end
end
end
@ -711,8 +799,18 @@ module Hashicorp
Project::DefaultPrivateKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Project.DefaultPrivateKeyResponse").msgclass
Vagrantfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Vagrantfile").msgclass
Vagrantfile::GetVagrantfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Vagrantfile.GetVagrantfileRequest").msgclass
Vagrantfile::Vagrantfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Vagrantfile.Vagrantfile").msgclass
Vagrantfile::GetVagrantfileResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Vagrantfile.GetVagrantfileResponse").msgclass
Vagrantfile::ConfigVM = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Vagrantfile.ConfigVM").msgclass
Vagrantfile::ConfigSSH = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Vagrantfile.ConfigSSH").msgclass
Vagrantfile::ConfigWinRM = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Vagrantfile.ConfigWinRM").msgclass
Vagrantfile::ConfigWinssh = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Vagrantfile.ConfigWinssh").msgclass
Vagrantfile::ConfigVagrant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Vagrantfile.ConfigVagrant").msgclass
Vagrantfile::MachineConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Vagrantfile.MachineConfig").msgclass
Vagrantfile::Provisioner = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Vagrantfile.Provisioner").msgclass
Vagrantfile::Provider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Vagrantfile.Provider").msgclass
Vagrantfile::Network = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Vagrantfile.Network").msgclass
Vagrantfile::SyncedFolder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Vagrantfile.SyncedFolder").msgclass
Vagrantfile::Vagrantfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("hashicorp.vagrant.sdk.Vagrantfile.Vagrantfile").msgclass
end
end
end

View File

@ -10,16 +10,16 @@ require_relative "./plugins/commands/serve/command"
vagrantfile_path = "/Users/sophia/project/vagrant-ruby/Vagrantfile"
PROVIDER_PROTO_CLS = Hashicorp::Vagrant::VagrantfileComponents::Provider
PROVISION_PROTO_CLS = Hashicorp::Vagrant::VagrantfileComponents::Provisioner
SYNCED_FOLDER_PROTO_CLS = Hashicorp::Vagrant::VagrantfileComponents::SyncedFolder
NETWORK_PROTO_CLS = Hashicorp::Vagrant::VagrantfileComponents::Network
PROVIDER_PROTO_CLS = Hashicorp::Vagrant::Sdk::Vagrantfile::Provider
PROVISION_PROTO_CLS = Hashicorp::Vagrant::Sdk::Vagrantfile::Provisioner
SYNCED_FOLDER_PROTO_CLS = Hashicorp::Vagrant::Sdk::Vagrantfile::SyncedFolder
NETWORK_PROTO_CLS = Hashicorp::Vagrant::Sdk::Vagrantfile::Network
CONFIG_VM_CLS = Hashicorp::Vagrant::VagrantfileComponents::ConfigVM
CONFIG_SSH_CLS = Hashicorp::Vagrant::VagrantfileComponents::ConfigSSH
CONFIG_WINRM_CLS = Hashicorp::Vagrant::VagrantfileComponents::ConfigWinRM
CONFIG_WINSSH_CLS = Hashicorp::Vagrant::VagrantfileComponents::ConfigWinssh
CONFIG_VAGRANT_CLS = Hashicorp::Vagrant::VagrantfileComponents::ConfigVagrant
CONFIG_VM_CLS = Hashicorp::Vagrant::Sdk::Vagrantfile::ConfigVM
CONFIG_SSH_CLS = Hashicorp::Vagrant::Sdk::Vagrantfile::ConfigSSH
CONFIG_WINRM_CLS = Hashicorp::Vagrant::Sdk::Vagrantfile::ConfigWinRM
CONFIG_WINSSH_CLS = Hashicorp::Vagrant::Sdk::Vagrantfile::ConfigWinssh
CONFIG_VAGRANT_CLS = Hashicorp::Vagrant::Sdk::Vagrantfile::ConfigVagrant
def stringify_symbols(m)
m.each do |k,v|
@ -244,7 +244,7 @@ def parse_vagrantfile(path)
extract_synced_folders(config_vm_proto.synced_folders, vm_config.synced_folders)
extract_provider(config_vm_proto.providers, vm_config)
machine_configs << Hashicorp::Vagrant::VagrantfileComponents::MachineConfig.new(
machine_configs << Hashicorp::Vagrant::Sdk::Vagrantfile::MachineConfig.new(
name: mach.to_s,
config_vm: config_vm_proto,
config_vagrant: config_vagrant_proto,
@ -255,7 +255,7 @@ def parse_vagrantfile(path)
)
end
vagrantfile = Hashicorp::Vagrant::VagrantfileComponents::Vagrantfile.new(
vagrantfile = Hashicorp::Vagrant::Sdk::Vagrantfile::Vagrantfile.new(
path: path,
# raw: raw,
current_version: Vagrant::Config::CURRENT_VERSION,