syntax = "proto3"; package hashicorp.vagrant; option go_package = "github.com/hashicorp/vagrant/internal/server/proto/ruby_vagrant"; import "google/protobuf/empty.proto"; import "google/protobuf/any.proto"; // The service that is implemented for the server backend. service RubyVagrant { // Gets available ruby plugins rpc GetPlugins(google.protobuf.Empty) returns (GetPluginsResponse); rpc ParseVagrantfile(ParseVagrantfileRequest) returns (ParseVagrantfileResponse); } /******************************************************************** * Plugins ********************************************************************/ message GetPluginsResponse { repeated Plugin plugins = 1; } message Plugin { // name of the plugin string name = 1; // type of the plugin Type type = 2; // Supported plugin types, the values here MUST match the enum values // in the Go sdk/component package exactly. A test in internal/server // validates this. enum Type { COMMAND = 0; COMMUNICATOR = 1; GUEST = 2; HOST = 3; PROVIDER = 4; PROVISIONER = 5; SYNCED_FOLDER = 6; } } /******************************************************************** * Vagrantfile ********************************************************************/ message ParseVagrantfileRequest { // Path to the Vagrantfile string path = 1; // TODO: might be good to add an option for passing cmd line args } 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; 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 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 { bool compresssion = 1; int64 connect_timeout = 2; string config = 3; bool dsa_authentication = 4; string export_command_template = 5; repeated string extra_args = 6; bool forward_agent = 7; repeated string forward_env = 8; bool forward_x11 = 9; int32 guest_port = 10; string host = 11; bool insert_key = 12; bool keep_alive = 13; bool keys_only = 14; bool paranoid = 15; int32 port = 16; repeated string private_key_path = 17; string proxy_command = 18; bool pty = 19; string remote_user = 20; string shell = 21; string sudo_command = 22; string username = 23; string verify_host_key = 24; } message ConfigWinRM { string username = 1; string password = 2; string host = 3; int32 port = 4; int32 guest_port = 5; // Note: this could be an enum, however in order to make // the ruby -> proto translation a bit more simple, leaving // this as a string string transport = 6; bool basic_auth_only = 7; string execution_time_limit = 8; bool ssl_peer_verification = 9; int32 timeout = 10; int32 max_tries = 11; int32 retry_delay = 12; string codepage = 13; } message ConfigWinssh { bool forward_agent = 1; repeated string forward_env = 2; string proxy_command = 3; bool keep_alive = 4; string shell = 5; string export_command_template = 6; string sudo_command = 7; string upload_directory = 8; } 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; } }