diff --git a/ext/go-plugin/vagrant/plugin/base.go b/ext/go-plugin/vagrant/plugin/base.go index 366580994..82a622c9d 100644 --- a/ext/go-plugin/vagrant/plugin/base.go +++ b/ext/go-plugin/vagrant/plugin/base.go @@ -284,7 +284,7 @@ func handleGrpcError(err error, pluginCtx context.Context, reqCtx context.Contex return errors.New("exceeded context timeout") } return err - } else if s != nil { + } else if s != nil && s.Message() != "" { // Extract actual error message received // and create new error return errors.New(s.Message()) diff --git a/ext/go-plugin/vagrant/plugin/capabilities.go b/ext/go-plugin/vagrant/plugin/capabilities.go index 9bf1f0164..95129490b 100644 --- a/ext/go-plugin/vagrant/plugin/capabilities.go +++ b/ext/go-plugin/vagrant/plugin/capabilities.go @@ -8,8 +8,7 @@ import ( go_plugin "github.com/hashicorp/go-plugin" "github.com/hashicorp/vagrant/ext/go-plugin/vagrant" - "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_caps" - "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_common" + "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto" "github.com/LK4D4/joincontext" ) @@ -26,7 +25,7 @@ type GuestCapabilitiesPlugin struct { func (g *GuestCapabilitiesPlugin) GRPCServer(broker *go_plugin.GRPCBroker, s *grpc.Server) error { g.Impl.Init() - vagrant_caps.RegisterGuestCapabilitiesServer(s, &GRPCGuestCapabilitiesServer{ + vagrant_proto.RegisterGuestCapabilitiesServer(s, &GRPCGuestCapabilitiesServer{ Impl: g.Impl, GRPCIOServer: GRPCIOServer{ Impl: g.Impl}}) @@ -34,7 +33,7 @@ func (g *GuestCapabilitiesPlugin) GRPCServer(broker *go_plugin.GRPCBroker, s *gr } func (g *GuestCapabilitiesPlugin) GRPCClient(ctx context.Context, broker *go_plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) { - client := vagrant_caps.NewGuestCapabilitiesClient(c) + client := vagrant_proto.NewGuestCapabilitiesClient(c) return &GRPCGuestCapabilitiesClient{ client: client, doneCtx: ctx, @@ -48,13 +47,20 @@ type GRPCGuestCapabilitiesServer struct { Impl GuestCapabilities } -func (s *GRPCGuestCapabilitiesServer) GuestCapabilities(ctx context.Context, req *vagrant_common.NullRequest) (resp *vagrant_caps.CapabilitiesResponse, err error) { - resp = &vagrant_caps.CapabilitiesResponse{} +func (s *GRPCGuestCapabilitiesServer) GuestCapabilities(ctx context.Context, req *vagrant_proto.Empty) (resp *vagrant_proto.SystemCapabilityList, err error) { + resp = &vagrant_proto.SystemCapabilityList{} var r []vagrant.SystemCapability - n := make(chan struct{}, 1) + n := make(chan struct{}) go func() { + defer func() { n <- struct{}{} }() r, err = s.Impl.GuestCapabilities() - n <- struct{}{} + if err != nil { + return + } + for _, cap := range r { + rcap := &vagrant_proto.SystemCapability{Name: cap.Name, Platform: cap.Platform} + resp.Capabilities = append(resp.Capabilities, rcap) + } }() select { case <-ctx.Done(): @@ -64,15 +70,11 @@ func (s *GRPCGuestCapabilitiesServer) GuestCapabilities(ctx context.Context, req if err != nil { return } - for _, cap := range r { - rcap := &vagrant_caps.Capability{Name: cap.Name, Platform: cap.Platform} - resp.Capabilities = append(resp.Capabilities, rcap) - } return } -func (s *GRPCGuestCapabilitiesServer) GuestCapability(ctx context.Context, req *vagrant_caps.GuestCapabilityRequest) (resp *vagrant_caps.GuestCapabilityResponse, err error) { - resp = &vagrant_caps.GuestCapabilityResponse{} +func (s *GRPCGuestCapabilitiesServer) GuestCapability(ctx context.Context, req *vagrant_proto.GuestCapabilityRequest) (resp *vagrant_proto.GenericResponse, err error) { + resp = &vagrant_proto.GenericResponse{} var args, r interface{} if err = json.Unmarshal([]byte(req.Arguments), &args); err != nil { return @@ -84,17 +86,15 @@ func (s *GRPCGuestCapabilitiesServer) GuestCapability(ctx context.Context, req * cap := &vagrant.SystemCapability{ Name: req.Capability.Name, Platform: req.Capability.Platform} - n := make(chan struct{}, 1) + n := make(chan struct{}) go func() { + defer func() { n <- struct{}{} }() r, err = s.Impl.GuestCapability(ctx, cap, args, machine) - n <- struct{}{} }() select { case <-ctx.Done(): - return case <-n: } - if err != nil { return } @@ -109,14 +109,14 @@ func (s *GRPCGuestCapabilitiesServer) GuestCapability(ctx context.Context, req * type GRPCGuestCapabilitiesClient struct { GRPCCoreClient GRPCIOClient - client vagrant_caps.GuestCapabilitiesClient + client vagrant_proto.GuestCapabilitiesClient doneCtx context.Context } func (c *GRPCGuestCapabilitiesClient) GuestCapabilities() (caps []vagrant.SystemCapability, err error) { ctx := context.Background() jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.GuestCapabilities(jctx, &vagrant_common.NullRequest{}) + resp, err := c.client.GuestCapabilities(jctx, &vagrant_proto.Empty{}) if err != nil { return nil, handleGrpcError(err, c.doneCtx, ctx) } @@ -140,8 +140,8 @@ func (c *GRPCGuestCapabilitiesClient) GuestCapability(ctx context.Context, cap * return } jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.GuestCapability(jctx, &vagrant_caps.GuestCapabilityRequest{ - Capability: &vagrant_caps.Capability{Name: cap.Name, Platform: cap.Platform}, + resp, err := c.client.GuestCapability(jctx, &vagrant_proto.GuestCapabilityRequest{ + Capability: &vagrant_proto.SystemCapability{Name: cap.Name, Platform: cap.Platform}, Machine: m, Arguments: string(a)}) if err != nil { @@ -163,7 +163,7 @@ type HostCapabilitiesPlugin struct { func (h *HostCapabilitiesPlugin) GRPCServer(broker *go_plugin.GRPCBroker, s *grpc.Server) error { h.Impl.Init() - vagrant_caps.RegisterHostCapabilitiesServer(s, &GRPCHostCapabilitiesServer{ + vagrant_proto.RegisterHostCapabilitiesServer(s, &GRPCHostCapabilitiesServer{ Impl: h.Impl, GRPCIOServer: GRPCIOServer{ Impl: h.Impl}}) @@ -171,7 +171,7 @@ func (h *HostCapabilitiesPlugin) GRPCServer(broker *go_plugin.GRPCBroker, s *grp } func (h *HostCapabilitiesPlugin) GRPCClient(ctx context.Context, broker *go_plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) { - client := vagrant_caps.NewHostCapabilitiesClient(c) + client := vagrant_proto.NewHostCapabilitiesClient(c) return &GRPCHostCapabilitiesClient{ client: client, doneCtx: ctx, @@ -185,10 +185,10 @@ type GRPCHostCapabilitiesServer struct { Impl HostCapabilities } -func (s *GRPCHostCapabilitiesServer) HostCapabilities(ctx context.Context, req *vagrant_common.NullRequest) (resp *vagrant_caps.CapabilitiesResponse, err error) { - resp = &vagrant_caps.CapabilitiesResponse{} +func (s *GRPCHostCapabilitiesServer) HostCapabilities(ctx context.Context, req *vagrant_proto.Empty) (resp *vagrant_proto.SystemCapabilityList, err error) { + resp = &vagrant_proto.SystemCapabilityList{} var r []vagrant.SystemCapability - n := make(chan struct{}, 1) + n := make(chan struct{}) go func() { r, err = s.Impl.HostCapabilities() n <- struct{}{} @@ -202,14 +202,14 @@ func (s *GRPCHostCapabilitiesServer) HostCapabilities(ctx context.Context, req * return } for _, cap := range r { - rcap := &vagrant_caps.Capability{Name: cap.Name, Platform: cap.Platform} + rcap := &vagrant_proto.SystemCapability{Name: cap.Name, Platform: cap.Platform} resp.Capabilities = append(resp.Capabilities, rcap) } return } -func (s *GRPCHostCapabilitiesServer) HostCapability(ctx context.Context, req *vagrant_caps.HostCapabilityRequest) (resp *vagrant_caps.HostCapabilityResponse, err error) { - resp = &vagrant_caps.HostCapabilityResponse{} +func (s *GRPCHostCapabilitiesServer) HostCapability(ctx context.Context, req *vagrant_proto.HostCapabilityRequest) (resp *vagrant_proto.GenericResponse, err error) { + resp = &vagrant_proto.GenericResponse{} var args, r interface{} if err = json.Unmarshal([]byte(req.Arguments), &args); err != nil { return @@ -221,7 +221,7 @@ func (s *GRPCHostCapabilitiesServer) HostCapability(ctx context.Context, req *va cap := &vagrant.SystemCapability{ Name: req.Capability.Name, Platform: req.Capability.Platform} - n := make(chan struct{}, 1) + n := make(chan struct{}) go func() { r, err = s.Impl.HostCapability(ctx, cap, args, env) n <- struct{}{} @@ -245,14 +245,14 @@ func (s *GRPCHostCapabilitiesServer) HostCapability(ctx context.Context, req *va type GRPCHostCapabilitiesClient struct { GRPCCoreClient GRPCIOClient - client vagrant_caps.HostCapabilitiesClient + client vagrant_proto.HostCapabilitiesClient doneCtx context.Context } func (c *GRPCHostCapabilitiesClient) HostCapabilities() (caps []vagrant.SystemCapability, err error) { ctx := context.Background() jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.HostCapabilities(jctx, &vagrant_common.NullRequest{}) + resp, err := c.client.HostCapabilities(jctx, &vagrant_proto.Empty{}) if err != nil { return nil, handleGrpcError(err, c.doneCtx, ctx) } @@ -276,8 +276,8 @@ func (c *GRPCHostCapabilitiesClient) HostCapability(ctx context.Context, cap *va return } jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.HostCapability(jctx, &vagrant_caps.HostCapabilityRequest{ - Capability: &vagrant_caps.Capability{ + resp, err := c.client.HostCapability(jctx, &vagrant_proto.HostCapabilityRequest{ + Capability: &vagrant_proto.SystemCapability{ Name: cap.Name, Platform: cap.Platform}, Environment: e, @@ -301,7 +301,7 @@ type ProviderCapabilitiesPlugin struct { func (p *ProviderCapabilitiesPlugin) GRPCServer(broker *go_plugin.GRPCBroker, s *grpc.Server) error { p.Impl.Init() - vagrant_caps.RegisterProviderCapabilitiesServer(s, &GRPCProviderCapabilitiesServer{ + vagrant_proto.RegisterProviderCapabilitiesServer(s, &GRPCProviderCapabilitiesServer{ Impl: p.Impl, GRPCIOServer: GRPCIOServer{ Impl: p.Impl}}) @@ -309,7 +309,7 @@ func (p *ProviderCapabilitiesPlugin) GRPCServer(broker *go_plugin.GRPCBroker, s } func (p *ProviderCapabilitiesPlugin) GRPCClient(ctx context.Context, broker *go_plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) { - client := vagrant_caps.NewProviderCapabilitiesClient(c) + client := vagrant_proto.NewProviderCapabilitiesClient(c) return &GRPCProviderCapabilitiesClient{ client: client, doneCtx: ctx, @@ -323,10 +323,10 @@ type GRPCProviderCapabilitiesServer struct { Impl ProviderCapabilities } -func (s *GRPCProviderCapabilitiesServer) ProviderCapabilities(ctx context.Context, req *vagrant_common.NullRequest) (resp *vagrant_caps.ProviderCapabilitiesResponse, err error) { - resp = &vagrant_caps.ProviderCapabilitiesResponse{} +func (s *GRPCProviderCapabilitiesServer) ProviderCapabilities(ctx context.Context, req *vagrant_proto.Empty) (resp *vagrant_proto.ProviderCapabilityList, err error) { + resp = &vagrant_proto.ProviderCapabilityList{} var r []vagrant.ProviderCapability - n := make(chan struct{}, 1) + n := make(chan struct{}) go func() { r, err = s.Impl.ProviderCapabilities() n <- struct{}{} @@ -340,14 +340,14 @@ func (s *GRPCProviderCapabilitiesServer) ProviderCapabilities(ctx context.Contex return } for _, cap := range r { - rcap := &vagrant_caps.ProviderCapability{Name: cap.Name, Provider: cap.Provider} + rcap := &vagrant_proto.ProviderCapability{Name: cap.Name, Provider: cap.Provider} resp.Capabilities = append(resp.Capabilities, rcap) } return } -func (s *GRPCProviderCapabilitiesServer) ProviderCapability(ctx context.Context, req *vagrant_caps.ProviderCapabilityRequest) (resp *vagrant_caps.ProviderCapabilityResponse, err error) { - resp = &vagrant_caps.ProviderCapabilityResponse{} +func (s *GRPCProviderCapabilitiesServer) ProviderCapability(ctx context.Context, req *vagrant_proto.ProviderCapabilityRequest) (resp *vagrant_proto.GenericResponse, err error) { + resp = &vagrant_proto.GenericResponse{} var args, r interface{} err = json.Unmarshal([]byte(req.Arguments), &args) if err != nil { @@ -384,14 +384,14 @@ func (s *GRPCProviderCapabilitiesServer) ProviderCapability(ctx context.Context, type GRPCProviderCapabilitiesClient struct { GRPCCoreClient GRPCIOClient - client vagrant_caps.ProviderCapabilitiesClient + client vagrant_proto.ProviderCapabilitiesClient doneCtx context.Context } func (c *GRPCProviderCapabilitiesClient) ProviderCapabilities() (caps []vagrant.ProviderCapability, err error) { ctx := context.Background() jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.ProviderCapabilities(jctx, &vagrant_common.NullRequest{}) + resp, err := c.client.ProviderCapabilities(jctx, &vagrant_proto.Empty{}) if err != nil { return nil, handleGrpcError(err, c.doneCtx, ctx) } @@ -415,8 +415,8 @@ func (c *GRPCProviderCapabilitiesClient) ProviderCapability(ctx context.Context, return } jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.ProviderCapability(jctx, &vagrant_caps.ProviderCapabilityRequest{ - Capability: &vagrant_caps.ProviderCapability{ + resp, err := c.client.ProviderCapability(jctx, &vagrant_proto.ProviderCapabilityRequest{ + Capability: &vagrant_proto.ProviderCapability{ Name: cap.Name, Provider: cap.Provider}, Machine: m, diff --git a/ext/go-plugin/vagrant/plugin/config.go b/ext/go-plugin/vagrant/plugin/config.go index 7dccdadab..74d33c488 100644 --- a/ext/go-plugin/vagrant/plugin/config.go +++ b/ext/go-plugin/vagrant/plugin/config.go @@ -8,8 +8,7 @@ import ( go_plugin "github.com/hashicorp/go-plugin" "github.com/hashicorp/vagrant/ext/go-plugin/vagrant" - "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_common" - "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_config" + "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto" "github.com/LK4D4/joincontext" ) @@ -26,7 +25,7 @@ type ConfigPlugin struct { func (c *ConfigPlugin) GRPCServer(broker *go_plugin.GRPCBroker, s *grpc.Server) error { c.Impl.Init() - vagrant_config.RegisterConfigServer(s, &GRPCConfigServer{ + vagrant_proto.RegisterConfigServer(s, &GRPCConfigServer{ Impl: c.Impl, GRPCIOServer: GRPCIOServer{ Impl: c.Impl}}) @@ -34,7 +33,7 @@ func (c *ConfigPlugin) GRPCServer(broker *go_plugin.GRPCBroker, s *grpc.Server) } func (c *ConfigPlugin) GRPCClient(ctx context.Context, broker *go_plugin.GRPCBroker, con *grpc.ClientConn) (interface{}, error) { - client := vagrant_config.NewConfigClient(con) + client := vagrant_proto.NewConfigClient(con) return &GRPCConfigClient{ client: client, doneCtx: ctx, @@ -48,11 +47,11 @@ type GRPCConfigServer struct { Impl Config } -func (s *GRPCConfigServer) ConfigAttributes(ctx context.Context, req *vagrant_common.NullRequest) (resp *vagrant_config.AttributesResponse, err error) { - resp = &vagrant_config.AttributesResponse{} +func (s *GRPCConfigServer) ConfigAttributes(ctx context.Context, req *vagrant_proto.Empty) (resp *vagrant_proto.ListResponse, err error) { + resp = &vagrant_proto.ListResponse{} n := make(chan struct{}, 1) go func() { - resp.Attributes, err = s.Impl.ConfigAttributes() + resp.Items, err = s.Impl.ConfigAttributes() n <- struct{}{} }() select { @@ -62,14 +61,14 @@ func (s *GRPCConfigServer) ConfigAttributes(ctx context.Context, req *vagrant_co return } -func (s *GRPCConfigServer) ConfigLoad(ctx context.Context, req *vagrant_config.LoadRequest) (resp *vagrant_config.LoadResponse, err error) { - resp = &vagrant_config.LoadResponse{} +func (s *GRPCConfigServer) ConfigLoad(ctx context.Context, req *vagrant_proto.Configuration) (resp *vagrant_proto.Configuration, err error) { + resp = &vagrant_proto.Configuration{} var data, r map[string]interface{} err = json.Unmarshal([]byte(req.Data), &data) if err != nil { return } - n := make(chan struct{}, 1) + n := make(chan struct{}) go func() { r, err = s.Impl.ConfigLoad(ctx, data) n <- struct{}{} @@ -93,8 +92,8 @@ func (s *GRPCConfigServer) ConfigLoad(ctx context.Context, req *vagrant_config.L return } -func (s *GRPCConfigServer) ConfigValidate(ctx context.Context, req *vagrant_config.ValidateRequest) (resp *vagrant_config.ValidateResponse, err error) { - resp = &vagrant_config.ValidateResponse{} +func (s *GRPCConfigServer) ConfigValidate(ctx context.Context, req *vagrant_proto.Configuration) (resp *vagrant_proto.ListResponse, err error) { + resp = &vagrant_proto.ListResponse{} var data map[string]interface{} err = json.Unmarshal([]byte(req.Data), &data) if err != nil { @@ -104,9 +103,9 @@ func (s *GRPCConfigServer) ConfigValidate(ctx context.Context, req *vagrant_conf if err != nil { return } - n := make(chan struct{}, 1) + n := make(chan struct{}) go func() { - resp.Errors, err = s.Impl.ConfigValidate(ctx, data, m) + resp.Items, err = s.Impl.ConfigValidate(ctx, data, m) n <- struct{}{} }() @@ -118,14 +117,14 @@ func (s *GRPCConfigServer) ConfigValidate(ctx context.Context, req *vagrant_conf return } -func (s *GRPCConfigServer) ConfigFinalize(ctx context.Context, req *vagrant_config.FinalizeRequest) (resp *vagrant_config.FinalizeResponse, err error) { - resp = &vagrant_config.FinalizeResponse{} +func (s *GRPCConfigServer) ConfigFinalize(ctx context.Context, req *vagrant_proto.Configuration) (resp *vagrant_proto.Configuration, err error) { + resp = &vagrant_proto.Configuration{} var data, r map[string]interface{} err = json.Unmarshal([]byte(req.Data), &data) if err != nil { return } - n := make(chan struct{}, 1) + n := make(chan struct{}) go func() { r, err = s.Impl.ConfigFinalize(ctx, data) n <- struct{}{} @@ -151,18 +150,18 @@ func (s *GRPCConfigServer) ConfigFinalize(ctx context.Context, req *vagrant_conf type GRPCConfigClient struct { GRPCCoreClient GRPCIOClient - client vagrant_config.ConfigClient + client vagrant_proto.ConfigClient doneCtx context.Context } func (c *GRPCConfigClient) ConfigAttributes() (attrs []string, err error) { ctx := context.Background() jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.ConfigAttributes(jctx, &vagrant_common.NullRequest{}) + resp, err := c.client.ConfigAttributes(jctx, &vagrant_proto.Empty{}) if err != nil { return nil, handleGrpcError(err, c.doneCtx, nil) } - attrs = resp.Attributes + attrs = resp.Items return } @@ -172,7 +171,7 @@ func (c *GRPCConfigClient) ConfigLoad(ctx context.Context, data map[string]inter return } jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.ConfigLoad(jctx, &vagrant_config.LoadRequest{ + resp, err := c.client.ConfigLoad(jctx, &vagrant_proto.Configuration{ Data: string(mdata)}) if err != nil { return nil, handleGrpcError(err, c.doneCtx, ctx) @@ -191,13 +190,13 @@ func (c *GRPCConfigClient) ConfigValidate(ctx context.Context, data map[string]i return } jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.ConfigValidate(jctx, &vagrant_config.ValidateRequest{ + resp, err := c.client.ConfigValidate(jctx, &vagrant_proto.Configuration{ Data: string(mdata), Machine: machData}) if err != nil { return nil, handleGrpcError(err, c.doneCtx, ctx) } - errs = resp.Errors + errs = resp.Items return } @@ -207,7 +206,7 @@ func (c *GRPCConfigClient) ConfigFinalize(ctx context.Context, data map[string]i return } jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.ConfigFinalize(jctx, &vagrant_config.FinalizeRequest{ + resp, err := c.client.ConfigFinalize(jctx, &vagrant_proto.Configuration{ Data: string(mdata)}) if err != nil { return nil, handleGrpcError(err, c.doneCtx, ctx) diff --git a/ext/go-plugin/vagrant/plugin/io.go b/ext/go-plugin/vagrant/plugin/io.go index 3ea8eda29..f90d51a29 100644 --- a/ext/go-plugin/vagrant/plugin/io.go +++ b/ext/go-plugin/vagrant/plugin/io.go @@ -7,7 +7,7 @@ import ( go_plugin "github.com/hashicorp/go-plugin" "github.com/hashicorp/vagrant/ext/go-plugin/vagrant" - "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_io" + "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto" "github.com/LK4D4/joincontext" ) @@ -25,11 +25,11 @@ type GRPCIOServer struct { Impl vagrant.StreamIO } -func (s *GRPCIOServer) Read(ctx context.Context, req *vagrant_io.ReadRequest) (r *vagrant_io.ReadResponse, err error) { - r = &vagrant_io.ReadResponse{} - n := make(chan struct{}, 1) +func (s *GRPCIOServer) Read(ctx context.Context, req *vagrant_proto.Identifier) (r *vagrant_proto.Content, err error) { + r = &vagrant_proto.Content{} + n := make(chan struct{}) go func() { - r.Content, err = s.Impl.Read(req.Target) + r.Value, err = s.Impl.Read(req.Name) n <- struct{}{} }() select { @@ -39,12 +39,12 @@ func (s *GRPCIOServer) Read(ctx context.Context, req *vagrant_io.ReadRequest) (r return } -func (s *GRPCIOServer) Write(ctx context.Context, req *vagrant_io.WriteRequest) (r *vagrant_io.WriteResponse, err error) { - r = &vagrant_io.WriteResponse{} - n := make(chan struct{}, 1) +func (s *GRPCIOServer) Write(ctx context.Context, req *vagrant_proto.Content) (r *vagrant_proto.WriteResponse, err error) { + r = &vagrant_proto.WriteResponse{} + n := make(chan struct{}) bytes := 0 go func() { - bytes, err = s.Impl.Write(req.Content, req.Target) + bytes, err = s.Impl.Write(req.Value, req.Target) n <- struct{}{} }() select { @@ -57,28 +57,28 @@ func (s *GRPCIOServer) Write(ctx context.Context, req *vagrant_io.WriteRequest) } type GRPCIOClient struct { - client vagrant_io.IOClient + client vagrant_proto.IOClient doneCtx context.Context } func (c *GRPCIOClient) Read(target string) (content string, err error) { ctx := context.Background() jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.Read(jctx, &vagrant_io.ReadRequest{ - Target: target}) + resp, err := c.client.Read(jctx, &vagrant_proto.Identifier{ + Name: target}) if err != nil { return content, handleGrpcError(err, c.doneCtx, ctx) } - content = resp.Content + content = resp.Value return } func (c *GRPCIOClient) Write(content, target string) (length int, err error) { ctx := context.Background() jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.Write(jctx, &vagrant_io.WriteRequest{ - Content: content, - Target: target}) + resp, err := c.client.Write(jctx, &vagrant_proto.Content{ + Value: content, + Target: target}) if err != nil { return length, handleGrpcError(err, c.doneCtx, ctx) } @@ -87,12 +87,12 @@ func (c *GRPCIOClient) Write(content, target string) (length int, err error) { } func (i *IOPlugin) GRPCServer(broker *go_plugin.GRPCBroker, s *grpc.Server) error { - vagrant_io.RegisterIOServer(s, &GRPCIOServer{Impl: i.Impl}) + vagrant_proto.RegisterIOServer(s, &GRPCIOServer{Impl: i.Impl}) return nil } func (i *IOPlugin) GRPCClient(ctx context.Context, broker *go_plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) { return &GRPCIOClient{ - client: vagrant_io.NewIOClient(c), + client: vagrant_proto.NewIOClient(c), doneCtx: ctx}, nil } diff --git a/ext/go-plugin/vagrant/plugin/proto/genproto b/ext/go-plugin/vagrant/plugin/proto/genproto index 4c2eb562a..503a867b5 100755 --- a/ext/go-plugin/vagrant/plugin/proto/genproto +++ b/ext/go-plugin/vagrant/plugin/proto/genproto @@ -6,7 +6,18 @@ for i in * do if [ -d "${i}" ]; then protoc --proto_path=`go env GOPATH`/src --proto_path=. --go_out=plugins=grpc:. "${i}"/*.proto; + if [ $? -ne 0 ]; then + echo "failed!" + exit 1 + fi fi done +protoc --proto_path=`go env GOPATH`/src --proto_path=. --go_out=plugins=grpc:. *.proto; + +if [ $? -ne 0 ]; then + echo "failed!" + exit 1 +fi + echo "done!" diff --git a/ext/go-plugin/vagrant/plugin/proto/vagrant.pb.go b/ext/go-plugin/vagrant/plugin/proto/vagrant.pb.go new file mode 100644 index 000000000..1999b4ee8 --- /dev/null +++ b/ext/go-plugin/vagrant/plugin/proto/vagrant.pb.go @@ -0,0 +1,3152 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: vagrant.proto + +package vagrant_proto + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +type Empty struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Empty) Reset() { *m = Empty{} } +func (m *Empty) String() string { return proto.CompactTextString(m) } +func (*Empty) ProtoMessage() {} +func (*Empty) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{0} +} +func (m *Empty) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Empty.Unmarshal(m, b) +} +func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Empty.Marshal(b, m, deterministic) +} +func (m *Empty) XXX_Merge(src proto.Message) { + xxx_messageInfo_Empty.Merge(m, src) +} +func (m *Empty) XXX_Size() int { + return xxx_messageInfo_Empty.Size(m) +} +func (m *Empty) XXX_DiscardUnknown() { + xxx_messageInfo_Empty.DiscardUnknown(m) +} + +var xxx_messageInfo_Empty proto.InternalMessageInfo + +type Machine struct { + Machine string `protobuf:"bytes,1,opt,name=machine,proto3" json:"machine,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Machine) Reset() { *m = Machine{} } +func (m *Machine) String() string { return proto.CompactTextString(m) } +func (*Machine) ProtoMessage() {} +func (*Machine) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{1} +} +func (m *Machine) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Machine.Unmarshal(m, b) +} +func (m *Machine) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Machine.Marshal(b, m, deterministic) +} +func (m *Machine) XXX_Merge(src proto.Message) { + xxx_messageInfo_Machine.Merge(m, src) +} +func (m *Machine) XXX_Size() int { + return xxx_messageInfo_Machine.Size(m) +} +func (m *Machine) XXX_DiscardUnknown() { + xxx_messageInfo_Machine.DiscardUnknown(m) +} + +var xxx_messageInfo_Machine proto.InternalMessageInfo + +func (m *Machine) GetMachine() string { + if m != nil { + return m.Machine + } + return "" +} + +type Valid struct { + Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Valid) Reset() { *m = Valid{} } +func (m *Valid) String() string { return proto.CompactTextString(m) } +func (*Valid) ProtoMessage() {} +func (*Valid) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{2} +} +func (m *Valid) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Valid.Unmarshal(m, b) +} +func (m *Valid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Valid.Marshal(b, m, deterministic) +} +func (m *Valid) XXX_Merge(src proto.Message) { + xxx_messageInfo_Valid.Merge(m, src) +} +func (m *Valid) XXX_Size() int { + return xxx_messageInfo_Valid.Size(m) +} +func (m *Valid) XXX_DiscardUnknown() { + xxx_messageInfo_Valid.DiscardUnknown(m) +} + +var xxx_messageInfo_Valid proto.InternalMessageInfo + +func (m *Valid) GetResult() bool { + if m != nil { + return m.Result + } + return false +} + +type Identifier struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Identifier) Reset() { *m = Identifier{} } +func (m *Identifier) String() string { return proto.CompactTextString(m) } +func (*Identifier) ProtoMessage() {} +func (*Identifier) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{3} +} +func (m *Identifier) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Identifier.Unmarshal(m, b) +} +func (m *Identifier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Identifier.Marshal(b, m, deterministic) +} +func (m *Identifier) XXX_Merge(src proto.Message) { + xxx_messageInfo_Identifier.Merge(m, src) +} +func (m *Identifier) XXX_Size() int { + return xxx_messageInfo_Identifier.Size(m) +} +func (m *Identifier) XXX_DiscardUnknown() { + xxx_messageInfo_Identifier.DiscardUnknown(m) +} + +var xxx_messageInfo_Identifier proto.InternalMessageInfo + +func (m *Identifier) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type PluginInfo struct { + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + Priority int64 `protobuf:"varint,2,opt,name=priority,proto3" json:"priority,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PluginInfo) Reset() { *m = PluginInfo{} } +func (m *PluginInfo) String() string { return proto.CompactTextString(m) } +func (*PluginInfo) ProtoMessage() {} +func (*PluginInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{4} +} +func (m *PluginInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PluginInfo.Unmarshal(m, b) +} +func (m *PluginInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PluginInfo.Marshal(b, m, deterministic) +} +func (m *PluginInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_PluginInfo.Merge(m, src) +} +func (m *PluginInfo) XXX_Size() int { + return xxx_messageInfo_PluginInfo.Size(m) +} +func (m *PluginInfo) XXX_DiscardUnknown() { + xxx_messageInfo_PluginInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_PluginInfo proto.InternalMessageInfo + +func (m *PluginInfo) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *PluginInfo) GetPriority() int64 { + if m != nil { + return m.Priority + } + return 0 +} + +type Content struct { + Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Content) Reset() { *m = Content{} } +func (m *Content) String() string { return proto.CompactTextString(m) } +func (*Content) ProtoMessage() {} +func (*Content) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{5} +} +func (m *Content) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Content.Unmarshal(m, b) +} +func (m *Content) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Content.Marshal(b, m, deterministic) +} +func (m *Content) XXX_Merge(src proto.Message) { + xxx_messageInfo_Content.Merge(m, src) +} +func (m *Content) XXX_Size() int { + return xxx_messageInfo_Content.Size(m) +} +func (m *Content) XXX_DiscardUnknown() { + xxx_messageInfo_Content.DiscardUnknown(m) +} + +var xxx_messageInfo_Content proto.InternalMessageInfo + +func (m *Content) GetTarget() string { + if m != nil { + return m.Target + } + return "" +} + +func (m *Content) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +type WriteResponse struct { + Length int32 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *WriteResponse) Reset() { *m = WriteResponse{} } +func (m *WriteResponse) String() string { return proto.CompactTextString(m) } +func (*WriteResponse) ProtoMessage() {} +func (*WriteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{6} +} +func (m *WriteResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_WriteResponse.Unmarshal(m, b) +} +func (m *WriteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_WriteResponse.Marshal(b, m, deterministic) +} +func (m *WriteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_WriteResponse.Merge(m, src) +} +func (m *WriteResponse) XXX_Size() int { + return xxx_messageInfo_WriteResponse.Size(m) +} +func (m *WriteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_WriteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_WriteResponse proto.InternalMessageInfo + +func (m *WriteResponse) GetLength() int32 { + if m != nil { + return m.Length + } + return 0 +} + +type SystemCapability struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Platform string `protobuf:"bytes,2,opt,name=platform,proto3" json:"platform,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SystemCapability) Reset() { *m = SystemCapability{} } +func (m *SystemCapability) String() string { return proto.CompactTextString(m) } +func (*SystemCapability) ProtoMessage() {} +func (*SystemCapability) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{7} +} +func (m *SystemCapability) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SystemCapability.Unmarshal(m, b) +} +func (m *SystemCapability) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SystemCapability.Marshal(b, m, deterministic) +} +func (m *SystemCapability) XXX_Merge(src proto.Message) { + xxx_messageInfo_SystemCapability.Merge(m, src) +} +func (m *SystemCapability) XXX_Size() int { + return xxx_messageInfo_SystemCapability.Size(m) +} +func (m *SystemCapability) XXX_DiscardUnknown() { + xxx_messageInfo_SystemCapability.DiscardUnknown(m) +} + +var xxx_messageInfo_SystemCapability proto.InternalMessageInfo + +func (m *SystemCapability) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *SystemCapability) GetPlatform() string { + if m != nil { + return m.Platform + } + return "" +} + +type ProviderCapability struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProviderCapability) Reset() { *m = ProviderCapability{} } +func (m *ProviderCapability) String() string { return proto.CompactTextString(m) } +func (*ProviderCapability) ProtoMessage() {} +func (*ProviderCapability) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{8} +} +func (m *ProviderCapability) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ProviderCapability.Unmarshal(m, b) +} +func (m *ProviderCapability) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ProviderCapability.Marshal(b, m, deterministic) +} +func (m *ProviderCapability) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProviderCapability.Merge(m, src) +} +func (m *ProviderCapability) XXX_Size() int { + return xxx_messageInfo_ProviderCapability.Size(m) +} +func (m *ProviderCapability) XXX_DiscardUnknown() { + xxx_messageInfo_ProviderCapability.DiscardUnknown(m) +} + +var xxx_messageInfo_ProviderCapability proto.InternalMessageInfo + +func (m *ProviderCapability) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ProviderCapability) GetProvider() string { + if m != nil { + return m.Provider + } + return "" +} + +type SystemCapabilityList struct { + Capabilities []*SystemCapability `protobuf:"bytes,1,rep,name=capabilities,proto3" json:"capabilities,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SystemCapabilityList) Reset() { *m = SystemCapabilityList{} } +func (m *SystemCapabilityList) String() string { return proto.CompactTextString(m) } +func (*SystemCapabilityList) ProtoMessage() {} +func (*SystemCapabilityList) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{9} +} +func (m *SystemCapabilityList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SystemCapabilityList.Unmarshal(m, b) +} +func (m *SystemCapabilityList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SystemCapabilityList.Marshal(b, m, deterministic) +} +func (m *SystemCapabilityList) XXX_Merge(src proto.Message) { + xxx_messageInfo_SystemCapabilityList.Merge(m, src) +} +func (m *SystemCapabilityList) XXX_Size() int { + return xxx_messageInfo_SystemCapabilityList.Size(m) +} +func (m *SystemCapabilityList) XXX_DiscardUnknown() { + xxx_messageInfo_SystemCapabilityList.DiscardUnknown(m) +} + +var xxx_messageInfo_SystemCapabilityList proto.InternalMessageInfo + +func (m *SystemCapabilityList) GetCapabilities() []*SystemCapability { + if m != nil { + return m.Capabilities + } + return nil +} + +type ProviderCapabilityList struct { + Capabilities []*ProviderCapability `protobuf:"bytes,1,rep,name=capabilities,proto3" json:"capabilities,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProviderCapabilityList) Reset() { *m = ProviderCapabilityList{} } +func (m *ProviderCapabilityList) String() string { return proto.CompactTextString(m) } +func (*ProviderCapabilityList) ProtoMessage() {} +func (*ProviderCapabilityList) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{10} +} +func (m *ProviderCapabilityList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ProviderCapabilityList.Unmarshal(m, b) +} +func (m *ProviderCapabilityList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ProviderCapabilityList.Marshal(b, m, deterministic) +} +func (m *ProviderCapabilityList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProviderCapabilityList.Merge(m, src) +} +func (m *ProviderCapabilityList) XXX_Size() int { + return xxx_messageInfo_ProviderCapabilityList.Size(m) +} +func (m *ProviderCapabilityList) XXX_DiscardUnknown() { + xxx_messageInfo_ProviderCapabilityList.DiscardUnknown(m) +} + +var xxx_messageInfo_ProviderCapabilityList proto.InternalMessageInfo + +func (m *ProviderCapabilityList) GetCapabilities() []*ProviderCapability { + if m != nil { + return m.Capabilities + } + return nil +} + +type GenericResponse struct { + Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GenericResponse) Reset() { *m = GenericResponse{} } +func (m *GenericResponse) String() string { return proto.CompactTextString(m) } +func (*GenericResponse) ProtoMessage() {} +func (*GenericResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{11} +} +func (m *GenericResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GenericResponse.Unmarshal(m, b) +} +func (m *GenericResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GenericResponse.Marshal(b, m, deterministic) +} +func (m *GenericResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenericResponse.Merge(m, src) +} +func (m *GenericResponse) XXX_Size() int { + return xxx_messageInfo_GenericResponse.Size(m) +} +func (m *GenericResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GenericResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GenericResponse proto.InternalMessageInfo + +func (m *GenericResponse) GetResult() string { + if m != nil { + return m.Result + } + return "" +} + +type GuestCapabilityRequest struct { + Capability *SystemCapability `protobuf:"bytes,1,opt,name=capability,proto3" json:"capability,omitempty"` + Machine string `protobuf:"bytes,2,opt,name=machine,proto3" json:"machine,omitempty"` + Arguments string `protobuf:"bytes,3,opt,name=arguments,proto3" json:"arguments,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GuestCapabilityRequest) Reset() { *m = GuestCapabilityRequest{} } +func (m *GuestCapabilityRequest) String() string { return proto.CompactTextString(m) } +func (*GuestCapabilityRequest) ProtoMessage() {} +func (*GuestCapabilityRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{12} +} +func (m *GuestCapabilityRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GuestCapabilityRequest.Unmarshal(m, b) +} +func (m *GuestCapabilityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GuestCapabilityRequest.Marshal(b, m, deterministic) +} +func (m *GuestCapabilityRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GuestCapabilityRequest.Merge(m, src) +} +func (m *GuestCapabilityRequest) XXX_Size() int { + return xxx_messageInfo_GuestCapabilityRequest.Size(m) +} +func (m *GuestCapabilityRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GuestCapabilityRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GuestCapabilityRequest proto.InternalMessageInfo + +func (m *GuestCapabilityRequest) GetCapability() *SystemCapability { + if m != nil { + return m.Capability + } + return nil +} + +func (m *GuestCapabilityRequest) GetMachine() string { + if m != nil { + return m.Machine + } + return "" +} + +func (m *GuestCapabilityRequest) GetArguments() string { + if m != nil { + return m.Arguments + } + return "" +} + +type HostCapabilityRequest struct { + Capability *SystemCapability `protobuf:"bytes,1,opt,name=capability,proto3" json:"capability,omitempty"` + Environment string `protobuf:"bytes,2,opt,name=environment,proto3" json:"environment,omitempty"` + Arguments string `protobuf:"bytes,3,opt,name=arguments,proto3" json:"arguments,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HostCapabilityRequest) Reset() { *m = HostCapabilityRequest{} } +func (m *HostCapabilityRequest) String() string { return proto.CompactTextString(m) } +func (*HostCapabilityRequest) ProtoMessage() {} +func (*HostCapabilityRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{13} +} +func (m *HostCapabilityRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HostCapabilityRequest.Unmarshal(m, b) +} +func (m *HostCapabilityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HostCapabilityRequest.Marshal(b, m, deterministic) +} +func (m *HostCapabilityRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_HostCapabilityRequest.Merge(m, src) +} +func (m *HostCapabilityRequest) XXX_Size() int { + return xxx_messageInfo_HostCapabilityRequest.Size(m) +} +func (m *HostCapabilityRequest) XXX_DiscardUnknown() { + xxx_messageInfo_HostCapabilityRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_HostCapabilityRequest proto.InternalMessageInfo + +func (m *HostCapabilityRequest) GetCapability() *SystemCapability { + if m != nil { + return m.Capability + } + return nil +} + +func (m *HostCapabilityRequest) GetEnvironment() string { + if m != nil { + return m.Environment + } + return "" +} + +func (m *HostCapabilityRequest) GetArguments() string { + if m != nil { + return m.Arguments + } + return "" +} + +type ProviderCapabilityRequest struct { + Capability *ProviderCapability `protobuf:"bytes,1,opt,name=capability,proto3" json:"capability,omitempty"` + Machine string `protobuf:"bytes,2,opt,name=machine,proto3" json:"machine,omitempty"` + Arguments string `protobuf:"bytes,3,opt,name=arguments,proto3" json:"arguments,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProviderCapabilityRequest) Reset() { *m = ProviderCapabilityRequest{} } +func (m *ProviderCapabilityRequest) String() string { return proto.CompactTextString(m) } +func (*ProviderCapabilityRequest) ProtoMessage() {} +func (*ProviderCapabilityRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{14} +} +func (m *ProviderCapabilityRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ProviderCapabilityRequest.Unmarshal(m, b) +} +func (m *ProviderCapabilityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ProviderCapabilityRequest.Marshal(b, m, deterministic) +} +func (m *ProviderCapabilityRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProviderCapabilityRequest.Merge(m, src) +} +func (m *ProviderCapabilityRequest) XXX_Size() int { + return xxx_messageInfo_ProviderCapabilityRequest.Size(m) +} +func (m *ProviderCapabilityRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ProviderCapabilityRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ProviderCapabilityRequest proto.InternalMessageInfo + +func (m *ProviderCapabilityRequest) GetCapability() *ProviderCapability { + if m != nil { + return m.Capability + } + return nil +} + +func (m *ProviderCapabilityRequest) GetMachine() string { + if m != nil { + return m.Machine + } + return "" +} + +func (m *ProviderCapabilityRequest) GetArguments() string { + if m != nil { + return m.Arguments + } + return "" +} + +type Configuration struct { + Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Machine string `protobuf:"bytes,2,opt,name=machine,proto3" json:"machine,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Configuration) Reset() { *m = Configuration{} } +func (m *Configuration) String() string { return proto.CompactTextString(m) } +func (*Configuration) ProtoMessage() {} +func (*Configuration) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{15} +} +func (m *Configuration) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Configuration.Unmarshal(m, b) +} +func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Configuration.Marshal(b, m, deterministic) +} +func (m *Configuration) XXX_Merge(src proto.Message) { + xxx_messageInfo_Configuration.Merge(m, src) +} +func (m *Configuration) XXX_Size() int { + return xxx_messageInfo_Configuration.Size(m) +} +func (m *Configuration) XXX_DiscardUnknown() { + xxx_messageInfo_Configuration.DiscardUnknown(m) +} + +var xxx_messageInfo_Configuration proto.InternalMessageInfo + +func (m *Configuration) GetData() string { + if m != nil { + return m.Data + } + return "" +} + +func (m *Configuration) GetMachine() string { + if m != nil { + return m.Machine + } + return "" +} + +type ListResponse struct { + Items []string `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListResponse) Reset() { *m = ListResponse{} } +func (m *ListResponse) String() string { return proto.CompactTextString(m) } +func (*ListResponse) ProtoMessage() {} +func (*ListResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{16} +} +func (m *ListResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListResponse.Unmarshal(m, b) +} +func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListResponse.Marshal(b, m, deterministic) +} +func (m *ListResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListResponse.Merge(m, src) +} +func (m *ListResponse) XXX_Size() int { + return xxx_messageInfo_ListResponse.Size(m) +} +func (m *ListResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListResponse proto.InternalMessageInfo + +func (m *ListResponse) GetItems() []string { + if m != nil { + return m.Items + } + return nil +} + +type SyncedFolders struct { + Machine string `protobuf:"bytes,1,opt,name=machine,proto3" json:"machine,omitempty"` + Folders string `protobuf:"bytes,2,opt,name=folders,proto3" json:"folders,omitempty"` + Options string `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SyncedFolders) Reset() { *m = SyncedFolders{} } +func (m *SyncedFolders) String() string { return proto.CompactTextString(m) } +func (*SyncedFolders) ProtoMessage() {} +func (*SyncedFolders) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{17} +} +func (m *SyncedFolders) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SyncedFolders.Unmarshal(m, b) +} +func (m *SyncedFolders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SyncedFolders.Marshal(b, m, deterministic) +} +func (m *SyncedFolders) XXX_Merge(src proto.Message) { + xxx_messageInfo_SyncedFolders.Merge(m, src) +} +func (m *SyncedFolders) XXX_Size() int { + return xxx_messageInfo_SyncedFolders.Size(m) +} +func (m *SyncedFolders) XXX_DiscardUnknown() { + xxx_messageInfo_SyncedFolders.DiscardUnknown(m) +} + +var xxx_messageInfo_SyncedFolders proto.InternalMessageInfo + +func (m *SyncedFolders) GetMachine() string { + if m != nil { + return m.Machine + } + return "" +} + +func (m *SyncedFolders) GetFolders() string { + if m != nil { + return m.Folders + } + return "" +} + +func (m *SyncedFolders) GetOptions() string { + if m != nil { + return m.Options + } + return "" +} + +type GenericAction struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Machine string `protobuf:"bytes,2,opt,name=machine,proto3" json:"machine,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GenericAction) Reset() { *m = GenericAction{} } +func (m *GenericAction) String() string { return proto.CompactTextString(m) } +func (*GenericAction) ProtoMessage() {} +func (*GenericAction) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{18} +} +func (m *GenericAction) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GenericAction.Unmarshal(m, b) +} +func (m *GenericAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GenericAction.Marshal(b, m, deterministic) +} +func (m *GenericAction) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenericAction.Merge(m, src) +} +func (m *GenericAction) XXX_Size() int { + return xxx_messageInfo_GenericAction.Size(m) +} +func (m *GenericAction) XXX_DiscardUnknown() { + xxx_messageInfo_GenericAction.DiscardUnknown(m) +} + +var xxx_messageInfo_GenericAction proto.InternalMessageInfo + +func (m *GenericAction) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *GenericAction) GetMachine() string { + if m != nil { + return m.Machine + } + return "" +} + +type ExecuteAction struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Machine string `protobuf:"bytes,3,opt,name=machine,proto3" json:"machine,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExecuteAction) Reset() { *m = ExecuteAction{} } +func (m *ExecuteAction) String() string { return proto.CompactTextString(m) } +func (*ExecuteAction) ProtoMessage() {} +func (*ExecuteAction) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{19} +} +func (m *ExecuteAction) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExecuteAction.Unmarshal(m, b) +} +func (m *ExecuteAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExecuteAction.Marshal(b, m, deterministic) +} +func (m *ExecuteAction) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExecuteAction.Merge(m, src) +} +func (m *ExecuteAction) XXX_Size() int { + return xxx_messageInfo_ExecuteAction.Size(m) +} +func (m *ExecuteAction) XXX_DiscardUnknown() { + xxx_messageInfo_ExecuteAction.DiscardUnknown(m) +} + +var xxx_messageInfo_ExecuteAction proto.InternalMessageInfo + +func (m *ExecuteAction) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ExecuteAction) GetData() string { + if m != nil { + return m.Data + } + return "" +} + +func (m *ExecuteAction) GetMachine() string { + if m != nil { + return m.Machine + } + return "" +} + +type MachineSshInfo struct { + Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` + Port int64 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` + PrivateKeyPath string `protobuf:"bytes,3,opt,name=private_key_path,json=privateKeyPath,proto3" json:"private_key_path,omitempty"` + Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MachineSshInfo) Reset() { *m = MachineSshInfo{} } +func (m *MachineSshInfo) String() string { return proto.CompactTextString(m) } +func (*MachineSshInfo) ProtoMessage() {} +func (*MachineSshInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{20} +} +func (m *MachineSshInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MachineSshInfo.Unmarshal(m, b) +} +func (m *MachineSshInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MachineSshInfo.Marshal(b, m, deterministic) +} +func (m *MachineSshInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_MachineSshInfo.Merge(m, src) +} +func (m *MachineSshInfo) XXX_Size() int { + return xxx_messageInfo_MachineSshInfo.Size(m) +} +func (m *MachineSshInfo) XXX_DiscardUnknown() { + xxx_messageInfo_MachineSshInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_MachineSshInfo proto.InternalMessageInfo + +func (m *MachineSshInfo) GetHost() string { + if m != nil { + return m.Host + } + return "" +} + +func (m *MachineSshInfo) GetPort() int64 { + if m != nil { + return m.Port + } + return 0 +} + +func (m *MachineSshInfo) GetPrivateKeyPath() string { + if m != nil { + return m.PrivateKeyPath + } + return "" +} + +func (m *MachineSshInfo) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +type MachineState struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ShortDescription string `protobuf:"bytes,2,opt,name=short_description,json=shortDescription,proto3" json:"short_description,omitempty"` + LongDescription string `protobuf:"bytes,3,opt,name=long_description,json=longDescription,proto3" json:"long_description,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MachineState) Reset() { *m = MachineState{} } +func (m *MachineState) String() string { return proto.CompactTextString(m) } +func (*MachineState) ProtoMessage() {} +func (*MachineState) Descriptor() ([]byte, []int) { + return fileDescriptor_05d5fddafc02be38, []int{21} +} +func (m *MachineState) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MachineState.Unmarshal(m, b) +} +func (m *MachineState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MachineState.Marshal(b, m, deterministic) +} +func (m *MachineState) XXX_Merge(src proto.Message) { + xxx_messageInfo_MachineState.Merge(m, src) +} +func (m *MachineState) XXX_Size() int { + return xxx_messageInfo_MachineState.Size(m) +} +func (m *MachineState) XXX_DiscardUnknown() { + xxx_messageInfo_MachineState.DiscardUnknown(m) +} + +var xxx_messageInfo_MachineState proto.InternalMessageInfo + +func (m *MachineState) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *MachineState) GetShortDescription() string { + if m != nil { + return m.ShortDescription + } + return "" +} + +func (m *MachineState) GetLongDescription() string { + if m != nil { + return m.LongDescription + } + return "" +} + +func init() { + proto.RegisterType((*Empty)(nil), "vagrant.proto.Empty") + proto.RegisterType((*Machine)(nil), "vagrant.proto.Machine") + proto.RegisterType((*Valid)(nil), "vagrant.proto.Valid") + proto.RegisterType((*Identifier)(nil), "vagrant.proto.Identifier") + proto.RegisterType((*PluginInfo)(nil), "vagrant.proto.PluginInfo") + proto.RegisterType((*Content)(nil), "vagrant.proto.Content") + proto.RegisterType((*WriteResponse)(nil), "vagrant.proto.WriteResponse") + proto.RegisterType((*SystemCapability)(nil), "vagrant.proto.SystemCapability") + proto.RegisterType((*ProviderCapability)(nil), "vagrant.proto.ProviderCapability") + proto.RegisterType((*SystemCapabilityList)(nil), "vagrant.proto.SystemCapabilityList") + proto.RegisterType((*ProviderCapabilityList)(nil), "vagrant.proto.ProviderCapabilityList") + proto.RegisterType((*GenericResponse)(nil), "vagrant.proto.GenericResponse") + proto.RegisterType((*GuestCapabilityRequest)(nil), "vagrant.proto.GuestCapabilityRequest") + proto.RegisterType((*HostCapabilityRequest)(nil), "vagrant.proto.HostCapabilityRequest") + proto.RegisterType((*ProviderCapabilityRequest)(nil), "vagrant.proto.ProviderCapabilityRequest") + proto.RegisterType((*Configuration)(nil), "vagrant.proto.Configuration") + proto.RegisterType((*ListResponse)(nil), "vagrant.proto.ListResponse") + proto.RegisterType((*SyncedFolders)(nil), "vagrant.proto.SyncedFolders") + proto.RegisterType((*GenericAction)(nil), "vagrant.proto.GenericAction") + proto.RegisterType((*ExecuteAction)(nil), "vagrant.proto.ExecuteAction") + proto.RegisterType((*MachineSshInfo)(nil), "vagrant.proto.MachineSshInfo") + proto.RegisterType((*MachineState)(nil), "vagrant.proto.MachineState") +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// IOClient is the client API for IO service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type IOClient interface { + Read(ctx context.Context, in *Identifier, opts ...grpc.CallOption) (*Content, error) + Write(ctx context.Context, in *Content, opts ...grpc.CallOption) (*WriteResponse, error) +} + +type iOClient struct { + cc *grpc.ClientConn +} + +func NewIOClient(cc *grpc.ClientConn) IOClient { + return &iOClient{cc} +} + +func (c *iOClient) Read(ctx context.Context, in *Identifier, opts ...grpc.CallOption) (*Content, error) { + out := new(Content) + err := c.cc.Invoke(ctx, "/vagrant.proto.IO/Read", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *iOClient) Write(ctx context.Context, in *Content, opts ...grpc.CallOption) (*WriteResponse, error) { + out := new(WriteResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.IO/Write", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// IOServer is the server API for IO service. +type IOServer interface { + Read(context.Context, *Identifier) (*Content, error) + Write(context.Context, *Content) (*WriteResponse, error) +} + +func RegisterIOServer(s *grpc.Server, srv IOServer) { + s.RegisterService(&_IO_serviceDesc, srv) +} + +func _IO_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Identifier) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IOServer).Read(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.IO/Read", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IOServer).Read(ctx, req.(*Identifier)) + } + return interceptor(ctx, in, info, handler) +} + +func _IO_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Content) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IOServer).Write(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.IO/Write", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IOServer).Write(ctx, req.(*Content)) + } + return interceptor(ctx, in, info, handler) +} + +var _IO_serviceDesc = grpc.ServiceDesc{ + ServiceName: "vagrant.proto.IO", + HandlerType: (*IOServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Read", + Handler: _IO_Read_Handler, + }, + { + MethodName: "Write", + Handler: _IO_Write_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "vagrant.proto", +} + +// GuestCapabilitiesClient is the client API for GuestCapabilities service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type GuestCapabilitiesClient interface { + GuestCapabilities(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SystemCapabilityList, error) + GuestCapability(ctx context.Context, in *GuestCapabilityRequest, opts ...grpc.CallOption) (*GenericResponse, error) + // IO helpers for streaming (copied from Stream service) + Read(ctx context.Context, in *Identifier, opts ...grpc.CallOption) (*Content, error) + Write(ctx context.Context, in *Content, opts ...grpc.CallOption) (*WriteResponse, error) +} + +type guestCapabilitiesClient struct { + cc *grpc.ClientConn +} + +func NewGuestCapabilitiesClient(cc *grpc.ClientConn) GuestCapabilitiesClient { + return &guestCapabilitiesClient{cc} +} + +func (c *guestCapabilitiesClient) GuestCapabilities(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SystemCapabilityList, error) { + out := new(SystemCapabilityList) + err := c.cc.Invoke(ctx, "/vagrant.proto.GuestCapabilities/GuestCapabilities", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *guestCapabilitiesClient) GuestCapability(ctx context.Context, in *GuestCapabilityRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + out := new(GenericResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.GuestCapabilities/GuestCapability", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *guestCapabilitiesClient) Read(ctx context.Context, in *Identifier, opts ...grpc.CallOption) (*Content, error) { + out := new(Content) + err := c.cc.Invoke(ctx, "/vagrant.proto.GuestCapabilities/Read", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *guestCapabilitiesClient) Write(ctx context.Context, in *Content, opts ...grpc.CallOption) (*WriteResponse, error) { + out := new(WriteResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.GuestCapabilities/Write", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// GuestCapabilitiesServer is the server API for GuestCapabilities service. +type GuestCapabilitiesServer interface { + GuestCapabilities(context.Context, *Empty) (*SystemCapabilityList, error) + GuestCapability(context.Context, *GuestCapabilityRequest) (*GenericResponse, error) + // IO helpers for streaming (copied from Stream service) + Read(context.Context, *Identifier) (*Content, error) + Write(context.Context, *Content) (*WriteResponse, error) +} + +func RegisterGuestCapabilitiesServer(s *grpc.Server, srv GuestCapabilitiesServer) { + s.RegisterService(&_GuestCapabilities_serviceDesc, srv) +} + +func _GuestCapabilities_GuestCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GuestCapabilitiesServer).GuestCapabilities(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.GuestCapabilities/GuestCapabilities", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GuestCapabilitiesServer).GuestCapabilities(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _GuestCapabilities_GuestCapability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GuestCapabilityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GuestCapabilitiesServer).GuestCapability(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.GuestCapabilities/GuestCapability", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GuestCapabilitiesServer).GuestCapability(ctx, req.(*GuestCapabilityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GuestCapabilities_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Identifier) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GuestCapabilitiesServer).Read(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.GuestCapabilities/Read", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GuestCapabilitiesServer).Read(ctx, req.(*Identifier)) + } + return interceptor(ctx, in, info, handler) +} + +func _GuestCapabilities_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Content) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GuestCapabilitiesServer).Write(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.GuestCapabilities/Write", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GuestCapabilitiesServer).Write(ctx, req.(*Content)) + } + return interceptor(ctx, in, info, handler) +} + +var _GuestCapabilities_serviceDesc = grpc.ServiceDesc{ + ServiceName: "vagrant.proto.GuestCapabilities", + HandlerType: (*GuestCapabilitiesServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GuestCapabilities", + Handler: _GuestCapabilities_GuestCapabilities_Handler, + }, + { + MethodName: "GuestCapability", + Handler: _GuestCapabilities_GuestCapability_Handler, + }, + { + MethodName: "Read", + Handler: _GuestCapabilities_Read_Handler, + }, + { + MethodName: "Write", + Handler: _GuestCapabilities_Write_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "vagrant.proto", +} + +// HostCapabilitiesClient is the client API for HostCapabilities service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type HostCapabilitiesClient interface { + HostCapabilities(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SystemCapabilityList, error) + HostCapability(ctx context.Context, in *HostCapabilityRequest, opts ...grpc.CallOption) (*GenericResponse, error) + // IO helpers for streaming (copied from Stream service) + Read(ctx context.Context, in *Identifier, opts ...grpc.CallOption) (*Content, error) + Write(ctx context.Context, in *Content, opts ...grpc.CallOption) (*WriteResponse, error) +} + +type hostCapabilitiesClient struct { + cc *grpc.ClientConn +} + +func NewHostCapabilitiesClient(cc *grpc.ClientConn) HostCapabilitiesClient { + return &hostCapabilitiesClient{cc} +} + +func (c *hostCapabilitiesClient) HostCapabilities(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SystemCapabilityList, error) { + out := new(SystemCapabilityList) + err := c.cc.Invoke(ctx, "/vagrant.proto.HostCapabilities/HostCapabilities", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostCapabilitiesClient) HostCapability(ctx context.Context, in *HostCapabilityRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + out := new(GenericResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.HostCapabilities/HostCapability", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostCapabilitiesClient) Read(ctx context.Context, in *Identifier, opts ...grpc.CallOption) (*Content, error) { + out := new(Content) + err := c.cc.Invoke(ctx, "/vagrant.proto.HostCapabilities/Read", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostCapabilitiesClient) Write(ctx context.Context, in *Content, opts ...grpc.CallOption) (*WriteResponse, error) { + out := new(WriteResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.HostCapabilities/Write", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HostCapabilitiesServer is the server API for HostCapabilities service. +type HostCapabilitiesServer interface { + HostCapabilities(context.Context, *Empty) (*SystemCapabilityList, error) + HostCapability(context.Context, *HostCapabilityRequest) (*GenericResponse, error) + // IO helpers for streaming (copied from Stream service) + Read(context.Context, *Identifier) (*Content, error) + Write(context.Context, *Content) (*WriteResponse, error) +} + +func RegisterHostCapabilitiesServer(s *grpc.Server, srv HostCapabilitiesServer) { + s.RegisterService(&_HostCapabilities_serviceDesc, srv) +} + +func _HostCapabilities_HostCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostCapabilitiesServer).HostCapabilities(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.HostCapabilities/HostCapabilities", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostCapabilitiesServer).HostCapabilities(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostCapabilities_HostCapability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HostCapabilityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostCapabilitiesServer).HostCapability(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.HostCapabilities/HostCapability", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostCapabilitiesServer).HostCapability(ctx, req.(*HostCapabilityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostCapabilities_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Identifier) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostCapabilitiesServer).Read(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.HostCapabilities/Read", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostCapabilitiesServer).Read(ctx, req.(*Identifier)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostCapabilities_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Content) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostCapabilitiesServer).Write(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.HostCapabilities/Write", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostCapabilitiesServer).Write(ctx, req.(*Content)) + } + return interceptor(ctx, in, info, handler) +} + +var _HostCapabilities_serviceDesc = grpc.ServiceDesc{ + ServiceName: "vagrant.proto.HostCapabilities", + HandlerType: (*HostCapabilitiesServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HostCapabilities", + Handler: _HostCapabilities_HostCapabilities_Handler, + }, + { + MethodName: "HostCapability", + Handler: _HostCapabilities_HostCapability_Handler, + }, + { + MethodName: "Read", + Handler: _HostCapabilities_Read_Handler, + }, + { + MethodName: "Write", + Handler: _HostCapabilities_Write_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "vagrant.proto", +} + +// ProviderCapabilitiesClient is the client API for ProviderCapabilities service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ProviderCapabilitiesClient interface { + ProviderCapabilities(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ProviderCapabilityList, error) + ProviderCapability(ctx context.Context, in *ProviderCapabilityRequest, opts ...grpc.CallOption) (*GenericResponse, error) + // IO helpers for streaming (copied from Stream service) + Read(ctx context.Context, in *Identifier, opts ...grpc.CallOption) (*Content, error) + Write(ctx context.Context, in *Content, opts ...grpc.CallOption) (*WriteResponse, error) +} + +type providerCapabilitiesClient struct { + cc *grpc.ClientConn +} + +func NewProviderCapabilitiesClient(cc *grpc.ClientConn) ProviderCapabilitiesClient { + return &providerCapabilitiesClient{cc} +} + +func (c *providerCapabilitiesClient) ProviderCapabilities(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ProviderCapabilityList, error) { + out := new(ProviderCapabilityList) + err := c.cc.Invoke(ctx, "/vagrant.proto.ProviderCapabilities/ProviderCapabilities", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerCapabilitiesClient) ProviderCapability(ctx context.Context, in *ProviderCapabilityRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + out := new(GenericResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.ProviderCapabilities/ProviderCapability", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerCapabilitiesClient) Read(ctx context.Context, in *Identifier, opts ...grpc.CallOption) (*Content, error) { + out := new(Content) + err := c.cc.Invoke(ctx, "/vagrant.proto.ProviderCapabilities/Read", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerCapabilitiesClient) Write(ctx context.Context, in *Content, opts ...grpc.CallOption) (*WriteResponse, error) { + out := new(WriteResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.ProviderCapabilities/Write", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ProviderCapabilitiesServer is the server API for ProviderCapabilities service. +type ProviderCapabilitiesServer interface { + ProviderCapabilities(context.Context, *Empty) (*ProviderCapabilityList, error) + ProviderCapability(context.Context, *ProviderCapabilityRequest) (*GenericResponse, error) + // IO helpers for streaming (copied from Stream service) + Read(context.Context, *Identifier) (*Content, error) + Write(context.Context, *Content) (*WriteResponse, error) +} + +func RegisterProviderCapabilitiesServer(s *grpc.Server, srv ProviderCapabilitiesServer) { + s.RegisterService(&_ProviderCapabilities_serviceDesc, srv) +} + +func _ProviderCapabilities_ProviderCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderCapabilitiesServer).ProviderCapabilities(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.ProviderCapabilities/ProviderCapabilities", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderCapabilitiesServer).ProviderCapabilities(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProviderCapabilities_ProviderCapability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ProviderCapabilityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderCapabilitiesServer).ProviderCapability(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.ProviderCapabilities/ProviderCapability", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderCapabilitiesServer).ProviderCapability(ctx, req.(*ProviderCapabilityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProviderCapabilities_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Identifier) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderCapabilitiesServer).Read(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.ProviderCapabilities/Read", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderCapabilitiesServer).Read(ctx, req.(*Identifier)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProviderCapabilities_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Content) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderCapabilitiesServer).Write(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.ProviderCapabilities/Write", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderCapabilitiesServer).Write(ctx, req.(*Content)) + } + return interceptor(ctx, in, info, handler) +} + +var _ProviderCapabilities_serviceDesc = grpc.ServiceDesc{ + ServiceName: "vagrant.proto.ProviderCapabilities", + HandlerType: (*ProviderCapabilitiesServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ProviderCapabilities", + Handler: _ProviderCapabilities_ProviderCapabilities_Handler, + }, + { + MethodName: "ProviderCapability", + Handler: _ProviderCapabilities_ProviderCapability_Handler, + }, + { + MethodName: "Read", + Handler: _ProviderCapabilities_Read_Handler, + }, + { + MethodName: "Write", + Handler: _ProviderCapabilities_Write_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "vagrant.proto", +} + +// ConfigClient is the client API for Config service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ConfigClient interface { + ConfigAttributes(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListResponse, error) + ConfigLoad(ctx context.Context, in *Configuration, opts ...grpc.CallOption) (*Configuration, error) + ConfigValidate(ctx context.Context, in *Configuration, opts ...grpc.CallOption) (*ListResponse, error) + ConfigFinalize(ctx context.Context, in *Configuration, opts ...grpc.CallOption) (*Configuration, error) + // IO helpers for streaming (copied from Stream service) + Read(ctx context.Context, in *Identifier, opts ...grpc.CallOption) (*Content, error) + Write(ctx context.Context, in *Content, opts ...grpc.CallOption) (*WriteResponse, error) +} + +type configClient struct { + cc *grpc.ClientConn +} + +func NewConfigClient(cc *grpc.ClientConn) ConfigClient { + return &configClient{cc} +} + +func (c *configClient) ConfigAttributes(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListResponse, error) { + out := new(ListResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.Config/ConfigAttributes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configClient) ConfigLoad(ctx context.Context, in *Configuration, opts ...grpc.CallOption) (*Configuration, error) { + out := new(Configuration) + err := c.cc.Invoke(ctx, "/vagrant.proto.Config/ConfigLoad", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configClient) ConfigValidate(ctx context.Context, in *Configuration, opts ...grpc.CallOption) (*ListResponse, error) { + out := new(ListResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.Config/ConfigValidate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configClient) ConfigFinalize(ctx context.Context, in *Configuration, opts ...grpc.CallOption) (*Configuration, error) { + out := new(Configuration) + err := c.cc.Invoke(ctx, "/vagrant.proto.Config/ConfigFinalize", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configClient) Read(ctx context.Context, in *Identifier, opts ...grpc.CallOption) (*Content, error) { + out := new(Content) + err := c.cc.Invoke(ctx, "/vagrant.proto.Config/Read", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *configClient) Write(ctx context.Context, in *Content, opts ...grpc.CallOption) (*WriteResponse, error) { + out := new(WriteResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.Config/Write", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ConfigServer is the server API for Config service. +type ConfigServer interface { + ConfigAttributes(context.Context, *Empty) (*ListResponse, error) + ConfigLoad(context.Context, *Configuration) (*Configuration, error) + ConfigValidate(context.Context, *Configuration) (*ListResponse, error) + ConfigFinalize(context.Context, *Configuration) (*Configuration, error) + // IO helpers for streaming (copied from Stream service) + Read(context.Context, *Identifier) (*Content, error) + Write(context.Context, *Content) (*WriteResponse, error) +} + +func RegisterConfigServer(s *grpc.Server, srv ConfigServer) { + s.RegisterService(&_Config_serviceDesc, srv) +} + +func _Config_ConfigAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServer).ConfigAttributes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Config/ConfigAttributes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServer).ConfigAttributes(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Config_ConfigLoad_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Configuration) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServer).ConfigLoad(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Config/ConfigLoad", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServer).ConfigLoad(ctx, req.(*Configuration)) + } + return interceptor(ctx, in, info, handler) +} + +func _Config_ConfigValidate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Configuration) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServer).ConfigValidate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Config/ConfigValidate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServer).ConfigValidate(ctx, req.(*Configuration)) + } + return interceptor(ctx, in, info, handler) +} + +func _Config_ConfigFinalize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Configuration) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServer).ConfigFinalize(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Config/ConfigFinalize", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServer).ConfigFinalize(ctx, req.(*Configuration)) + } + return interceptor(ctx, in, info, handler) +} + +func _Config_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Identifier) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServer).Read(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Config/Read", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServer).Read(ctx, req.(*Identifier)) + } + return interceptor(ctx, in, info, handler) +} + +func _Config_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Content) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServer).Write(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Config/Write", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServer).Write(ctx, req.(*Content)) + } + return interceptor(ctx, in, info, handler) +} + +var _Config_serviceDesc = grpc.ServiceDesc{ + ServiceName: "vagrant.proto.Config", + HandlerType: (*ConfigServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ConfigAttributes", + Handler: _Config_ConfigAttributes_Handler, + }, + { + MethodName: "ConfigLoad", + Handler: _Config_ConfigLoad_Handler, + }, + { + MethodName: "ConfigValidate", + Handler: _Config_ConfigValidate_Handler, + }, + { + MethodName: "ConfigFinalize", + Handler: _Config_ConfigFinalize_Handler, + }, + { + MethodName: "Read", + Handler: _Config_Read_Handler, + }, + { + MethodName: "Write", + Handler: _Config_Write_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "vagrant.proto", +} + +// SyncedFolderClient is the client API for SyncedFolder service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type SyncedFolderClient interface { + Cleanup(ctx context.Context, in *SyncedFolders, opts ...grpc.CallOption) (*Empty, error) + Disable(ctx context.Context, in *SyncedFolders, opts ...grpc.CallOption) (*Empty, error) + Enable(ctx context.Context, in *SyncedFolders, opts ...grpc.CallOption) (*Empty, error) + Info(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PluginInfo, error) + IsUsable(ctx context.Context, in *Machine, opts ...grpc.CallOption) (*Valid, error) + Name(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Identifier, error) + Prepare(ctx context.Context, in *SyncedFolders, opts ...grpc.CallOption) (*Empty, error) + // IO helpers for streaming (copied from Stream service) + Read(ctx context.Context, in *Identifier, opts ...grpc.CallOption) (*Content, error) + Write(ctx context.Context, in *Content, opts ...grpc.CallOption) (*WriteResponse, error) + // Guest capabilities helpers (copied from GuestCapabilities service) + GuestCapabilities(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SystemCapabilityList, error) + GuestCapability(ctx context.Context, in *GuestCapabilityRequest, opts ...grpc.CallOption) (*GenericResponse, error) + // Host capabilities helpers (copied from GuestCapabilities service) + HostCapabilities(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SystemCapabilityList, error) + HostCapability(ctx context.Context, in *HostCapabilityRequest, opts ...grpc.CallOption) (*GenericResponse, error) +} + +type syncedFolderClient struct { + cc *grpc.ClientConn +} + +func NewSyncedFolderClient(cc *grpc.ClientConn) SyncedFolderClient { + return &syncedFolderClient{cc} +} + +func (c *syncedFolderClient) Cleanup(ctx context.Context, in *SyncedFolders, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, "/vagrant.proto.SyncedFolder/Cleanup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncedFolderClient) Disable(ctx context.Context, in *SyncedFolders, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, "/vagrant.proto.SyncedFolder/Disable", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncedFolderClient) Enable(ctx context.Context, in *SyncedFolders, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, "/vagrant.proto.SyncedFolder/Enable", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncedFolderClient) Info(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PluginInfo, error) { + out := new(PluginInfo) + err := c.cc.Invoke(ctx, "/vagrant.proto.SyncedFolder/Info", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncedFolderClient) IsUsable(ctx context.Context, in *Machine, opts ...grpc.CallOption) (*Valid, error) { + out := new(Valid) + err := c.cc.Invoke(ctx, "/vagrant.proto.SyncedFolder/IsUsable", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncedFolderClient) Name(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Identifier, error) { + out := new(Identifier) + err := c.cc.Invoke(ctx, "/vagrant.proto.SyncedFolder/Name", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncedFolderClient) Prepare(ctx context.Context, in *SyncedFolders, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, "/vagrant.proto.SyncedFolder/Prepare", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncedFolderClient) Read(ctx context.Context, in *Identifier, opts ...grpc.CallOption) (*Content, error) { + out := new(Content) + err := c.cc.Invoke(ctx, "/vagrant.proto.SyncedFolder/Read", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncedFolderClient) Write(ctx context.Context, in *Content, opts ...grpc.CallOption) (*WriteResponse, error) { + out := new(WriteResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.SyncedFolder/Write", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncedFolderClient) GuestCapabilities(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SystemCapabilityList, error) { + out := new(SystemCapabilityList) + err := c.cc.Invoke(ctx, "/vagrant.proto.SyncedFolder/GuestCapabilities", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncedFolderClient) GuestCapability(ctx context.Context, in *GuestCapabilityRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + out := new(GenericResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.SyncedFolder/GuestCapability", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncedFolderClient) HostCapabilities(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SystemCapabilityList, error) { + out := new(SystemCapabilityList) + err := c.cc.Invoke(ctx, "/vagrant.proto.SyncedFolder/HostCapabilities", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncedFolderClient) HostCapability(ctx context.Context, in *HostCapabilityRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + out := new(GenericResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.SyncedFolder/HostCapability", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SyncedFolderServer is the server API for SyncedFolder service. +type SyncedFolderServer interface { + Cleanup(context.Context, *SyncedFolders) (*Empty, error) + Disable(context.Context, *SyncedFolders) (*Empty, error) + Enable(context.Context, *SyncedFolders) (*Empty, error) + Info(context.Context, *Empty) (*PluginInfo, error) + IsUsable(context.Context, *Machine) (*Valid, error) + Name(context.Context, *Empty) (*Identifier, error) + Prepare(context.Context, *SyncedFolders) (*Empty, error) + // IO helpers for streaming (copied from Stream service) + Read(context.Context, *Identifier) (*Content, error) + Write(context.Context, *Content) (*WriteResponse, error) + // Guest capabilities helpers (copied from GuestCapabilities service) + GuestCapabilities(context.Context, *Empty) (*SystemCapabilityList, error) + GuestCapability(context.Context, *GuestCapabilityRequest) (*GenericResponse, error) + // Host capabilities helpers (copied from GuestCapabilities service) + HostCapabilities(context.Context, *Empty) (*SystemCapabilityList, error) + HostCapability(context.Context, *HostCapabilityRequest) (*GenericResponse, error) +} + +func RegisterSyncedFolderServer(s *grpc.Server, srv SyncedFolderServer) { + s.RegisterService(&_SyncedFolder_serviceDesc, srv) +} + +func _SyncedFolder_Cleanup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncedFolders) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncedFolderServer).Cleanup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.SyncedFolder/Cleanup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncedFolderServer).Cleanup(ctx, req.(*SyncedFolders)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncedFolder_Disable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncedFolders) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncedFolderServer).Disable(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.SyncedFolder/Disable", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncedFolderServer).Disable(ctx, req.(*SyncedFolders)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncedFolder_Enable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncedFolders) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncedFolderServer).Enable(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.SyncedFolder/Enable", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncedFolderServer).Enable(ctx, req.(*SyncedFolders)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncedFolder_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncedFolderServer).Info(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.SyncedFolder/Info", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncedFolderServer).Info(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncedFolder_IsUsable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Machine) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncedFolderServer).IsUsable(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.SyncedFolder/IsUsable", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncedFolderServer).IsUsable(ctx, req.(*Machine)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncedFolder_Name_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncedFolderServer).Name(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.SyncedFolder/Name", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncedFolderServer).Name(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncedFolder_Prepare_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncedFolders) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncedFolderServer).Prepare(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.SyncedFolder/Prepare", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncedFolderServer).Prepare(ctx, req.(*SyncedFolders)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncedFolder_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Identifier) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncedFolderServer).Read(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.SyncedFolder/Read", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncedFolderServer).Read(ctx, req.(*Identifier)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncedFolder_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Content) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncedFolderServer).Write(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.SyncedFolder/Write", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncedFolderServer).Write(ctx, req.(*Content)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncedFolder_GuestCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncedFolderServer).GuestCapabilities(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.SyncedFolder/GuestCapabilities", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncedFolderServer).GuestCapabilities(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncedFolder_GuestCapability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GuestCapabilityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncedFolderServer).GuestCapability(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.SyncedFolder/GuestCapability", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncedFolderServer).GuestCapability(ctx, req.(*GuestCapabilityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncedFolder_HostCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncedFolderServer).HostCapabilities(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.SyncedFolder/HostCapabilities", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncedFolderServer).HostCapabilities(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncedFolder_HostCapability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HostCapabilityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncedFolderServer).HostCapability(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.SyncedFolder/HostCapability", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncedFolderServer).HostCapability(ctx, req.(*HostCapabilityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _SyncedFolder_serviceDesc = grpc.ServiceDesc{ + ServiceName: "vagrant.proto.SyncedFolder", + HandlerType: (*SyncedFolderServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Cleanup", + Handler: _SyncedFolder_Cleanup_Handler, + }, + { + MethodName: "Disable", + Handler: _SyncedFolder_Disable_Handler, + }, + { + MethodName: "Enable", + Handler: _SyncedFolder_Enable_Handler, + }, + { + MethodName: "Info", + Handler: _SyncedFolder_Info_Handler, + }, + { + MethodName: "IsUsable", + Handler: _SyncedFolder_IsUsable_Handler, + }, + { + MethodName: "Name", + Handler: _SyncedFolder_Name_Handler, + }, + { + MethodName: "Prepare", + Handler: _SyncedFolder_Prepare_Handler, + }, + { + MethodName: "Read", + Handler: _SyncedFolder_Read_Handler, + }, + { + MethodName: "Write", + Handler: _SyncedFolder_Write_Handler, + }, + { + MethodName: "GuestCapabilities", + Handler: _SyncedFolder_GuestCapabilities_Handler, + }, + { + MethodName: "GuestCapability", + Handler: _SyncedFolder_GuestCapability_Handler, + }, + { + MethodName: "HostCapabilities", + Handler: _SyncedFolder_HostCapabilities_Handler, + }, + { + MethodName: "HostCapability", + Handler: _SyncedFolder_HostCapability_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "vagrant.proto", +} + +// ProviderClient is the client API for Provider service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ProviderClient interface { + Action(ctx context.Context, in *GenericAction, opts ...grpc.CallOption) (*ListResponse, error) + Info(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PluginInfo, error) + IsInstalled(ctx context.Context, in *Machine, opts ...grpc.CallOption) (*Valid, error) + IsUsable(ctx context.Context, in *Machine, opts ...grpc.CallOption) (*Valid, error) + MachineIdChanged(ctx context.Context, in *Machine, opts ...grpc.CallOption) (*Machine, error) + Name(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Identifier, error) + RunAction(ctx context.Context, in *ExecuteAction, opts ...grpc.CallOption) (*GenericResponse, error) + SshInfo(ctx context.Context, in *Machine, opts ...grpc.CallOption) (*MachineSshInfo, error) + State(ctx context.Context, in *Machine, opts ...grpc.CallOption) (*MachineState, error) + // IO helpers for streaming (copied from Stream service) + Read(ctx context.Context, in *Identifier, opts ...grpc.CallOption) (*Content, error) + Write(ctx context.Context, in *Content, opts ...grpc.CallOption) (*WriteResponse, error) + // Config helpers (copied from Config service) + ConfigAttributes(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListResponse, error) + ConfigLoad(ctx context.Context, in *Configuration, opts ...grpc.CallOption) (*Configuration, error) + ConfigValidate(ctx context.Context, in *Configuration, opts ...grpc.CallOption) (*ListResponse, error) + ConfigFinalize(ctx context.Context, in *Configuration, opts ...grpc.CallOption) (*Configuration, error) + // Guest capabilities helpers (copied from GuestCapabilities service) + GuestCapabilities(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SystemCapabilityList, error) + GuestCapability(ctx context.Context, in *GuestCapabilityRequest, opts ...grpc.CallOption) (*GenericResponse, error) + // Host capabilities helpers (copied from HostCapabilities service) + HostCapabilities(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SystemCapabilityList, error) + HostCapability(ctx context.Context, in *HostCapabilityRequest, opts ...grpc.CallOption) (*GenericResponse, error) + // Provider capabilities helpers (copied from ProviderCapabilities service) + ProviderCapabilities(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ProviderCapabilityList, error) + ProviderCapability(ctx context.Context, in *ProviderCapabilityRequest, opts ...grpc.CallOption) (*GenericResponse, error) +} + +type providerClient struct { + cc *grpc.ClientConn +} + +func NewProviderClient(cc *grpc.ClientConn) ProviderClient { + return &providerClient{cc} +} + +func (c *providerClient) Action(ctx context.Context, in *GenericAction, opts ...grpc.CallOption) (*ListResponse, error) { + out := new(ListResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/Action", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) Info(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PluginInfo, error) { + out := new(PluginInfo) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/Info", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) IsInstalled(ctx context.Context, in *Machine, opts ...grpc.CallOption) (*Valid, error) { + out := new(Valid) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/IsInstalled", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) IsUsable(ctx context.Context, in *Machine, opts ...grpc.CallOption) (*Valid, error) { + out := new(Valid) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/IsUsable", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) MachineIdChanged(ctx context.Context, in *Machine, opts ...grpc.CallOption) (*Machine, error) { + out := new(Machine) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/MachineIdChanged", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) Name(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Identifier, error) { + out := new(Identifier) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/Name", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) RunAction(ctx context.Context, in *ExecuteAction, opts ...grpc.CallOption) (*GenericResponse, error) { + out := new(GenericResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/RunAction", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) SshInfo(ctx context.Context, in *Machine, opts ...grpc.CallOption) (*MachineSshInfo, error) { + out := new(MachineSshInfo) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/SshInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) State(ctx context.Context, in *Machine, opts ...grpc.CallOption) (*MachineState, error) { + out := new(MachineState) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/State", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) Read(ctx context.Context, in *Identifier, opts ...grpc.CallOption) (*Content, error) { + out := new(Content) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/Read", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) Write(ctx context.Context, in *Content, opts ...grpc.CallOption) (*WriteResponse, error) { + out := new(WriteResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/Write", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) ConfigAttributes(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListResponse, error) { + out := new(ListResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/ConfigAttributes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) ConfigLoad(ctx context.Context, in *Configuration, opts ...grpc.CallOption) (*Configuration, error) { + out := new(Configuration) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/ConfigLoad", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) ConfigValidate(ctx context.Context, in *Configuration, opts ...grpc.CallOption) (*ListResponse, error) { + out := new(ListResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/ConfigValidate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) ConfigFinalize(ctx context.Context, in *Configuration, opts ...grpc.CallOption) (*Configuration, error) { + out := new(Configuration) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/ConfigFinalize", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) GuestCapabilities(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SystemCapabilityList, error) { + out := new(SystemCapabilityList) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/GuestCapabilities", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) GuestCapability(ctx context.Context, in *GuestCapabilityRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + out := new(GenericResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/GuestCapability", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) HostCapabilities(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SystemCapabilityList, error) { + out := new(SystemCapabilityList) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/HostCapabilities", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) HostCapability(ctx context.Context, in *HostCapabilityRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + out := new(GenericResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/HostCapability", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) ProviderCapabilities(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ProviderCapabilityList, error) { + out := new(ProviderCapabilityList) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/ProviderCapabilities", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *providerClient) ProviderCapability(ctx context.Context, in *ProviderCapabilityRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + out := new(GenericResponse) + err := c.cc.Invoke(ctx, "/vagrant.proto.Provider/ProviderCapability", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ProviderServer is the server API for Provider service. +type ProviderServer interface { + Action(context.Context, *GenericAction) (*ListResponse, error) + Info(context.Context, *Empty) (*PluginInfo, error) + IsInstalled(context.Context, *Machine) (*Valid, error) + IsUsable(context.Context, *Machine) (*Valid, error) + MachineIdChanged(context.Context, *Machine) (*Machine, error) + Name(context.Context, *Empty) (*Identifier, error) + RunAction(context.Context, *ExecuteAction) (*GenericResponse, error) + SshInfo(context.Context, *Machine) (*MachineSshInfo, error) + State(context.Context, *Machine) (*MachineState, error) + // IO helpers for streaming (copied from Stream service) + Read(context.Context, *Identifier) (*Content, error) + Write(context.Context, *Content) (*WriteResponse, error) + // Config helpers (copied from Config service) + ConfigAttributes(context.Context, *Empty) (*ListResponse, error) + ConfigLoad(context.Context, *Configuration) (*Configuration, error) + ConfigValidate(context.Context, *Configuration) (*ListResponse, error) + ConfigFinalize(context.Context, *Configuration) (*Configuration, error) + // Guest capabilities helpers (copied from GuestCapabilities service) + GuestCapabilities(context.Context, *Empty) (*SystemCapabilityList, error) + GuestCapability(context.Context, *GuestCapabilityRequest) (*GenericResponse, error) + // Host capabilities helpers (copied from HostCapabilities service) + HostCapabilities(context.Context, *Empty) (*SystemCapabilityList, error) + HostCapability(context.Context, *HostCapabilityRequest) (*GenericResponse, error) + // Provider capabilities helpers (copied from ProviderCapabilities service) + ProviderCapabilities(context.Context, *Empty) (*ProviderCapabilityList, error) + ProviderCapability(context.Context, *ProviderCapabilityRequest) (*GenericResponse, error) +} + +func RegisterProviderServer(s *grpc.Server, srv ProviderServer) { + s.RegisterService(&_Provider_serviceDesc, srv) +} + +func _Provider_Action_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GenericAction) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).Action(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/Action", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).Action(ctx, req.(*GenericAction)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).Info(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/Info", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).Info(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_IsInstalled_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Machine) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).IsInstalled(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/IsInstalled", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).IsInstalled(ctx, req.(*Machine)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_IsUsable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Machine) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).IsUsable(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/IsUsable", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).IsUsable(ctx, req.(*Machine)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_MachineIdChanged_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Machine) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).MachineIdChanged(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/MachineIdChanged", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).MachineIdChanged(ctx, req.(*Machine)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_Name_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).Name(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/Name", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).Name(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_RunAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExecuteAction) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).RunAction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/RunAction", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).RunAction(ctx, req.(*ExecuteAction)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_SshInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Machine) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).SshInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/SshInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).SshInfo(ctx, req.(*Machine)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_State_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Machine) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).State(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/State", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).State(ctx, req.(*Machine)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Identifier) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).Read(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/Read", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).Read(ctx, req.(*Identifier)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Content) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).Write(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/Write", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).Write(ctx, req.(*Content)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_ConfigAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).ConfigAttributes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/ConfigAttributes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).ConfigAttributes(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_ConfigLoad_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Configuration) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).ConfigLoad(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/ConfigLoad", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).ConfigLoad(ctx, req.(*Configuration)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_ConfigValidate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Configuration) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).ConfigValidate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/ConfigValidate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).ConfigValidate(ctx, req.(*Configuration)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_ConfigFinalize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Configuration) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).ConfigFinalize(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/ConfigFinalize", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).ConfigFinalize(ctx, req.(*Configuration)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_GuestCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).GuestCapabilities(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/GuestCapabilities", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).GuestCapabilities(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_GuestCapability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GuestCapabilityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).GuestCapability(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/GuestCapability", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).GuestCapability(ctx, req.(*GuestCapabilityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_HostCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).HostCapabilities(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/HostCapabilities", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).HostCapabilities(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_HostCapability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HostCapabilityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).HostCapability(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/HostCapability", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).HostCapability(ctx, req.(*HostCapabilityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_ProviderCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).ProviderCapabilities(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/ProviderCapabilities", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).ProviderCapabilities(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Provider_ProviderCapability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ProviderCapabilityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProviderServer).ProviderCapability(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vagrant.proto.Provider/ProviderCapability", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProviderServer).ProviderCapability(ctx, req.(*ProviderCapabilityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Provider_serviceDesc = grpc.ServiceDesc{ + ServiceName: "vagrant.proto.Provider", + HandlerType: (*ProviderServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Action", + Handler: _Provider_Action_Handler, + }, + { + MethodName: "Info", + Handler: _Provider_Info_Handler, + }, + { + MethodName: "IsInstalled", + Handler: _Provider_IsInstalled_Handler, + }, + { + MethodName: "IsUsable", + Handler: _Provider_IsUsable_Handler, + }, + { + MethodName: "MachineIdChanged", + Handler: _Provider_MachineIdChanged_Handler, + }, + { + MethodName: "Name", + Handler: _Provider_Name_Handler, + }, + { + MethodName: "RunAction", + Handler: _Provider_RunAction_Handler, + }, + { + MethodName: "SshInfo", + Handler: _Provider_SshInfo_Handler, + }, + { + MethodName: "State", + Handler: _Provider_State_Handler, + }, + { + MethodName: "Read", + Handler: _Provider_Read_Handler, + }, + { + MethodName: "Write", + Handler: _Provider_Write_Handler, + }, + { + MethodName: "ConfigAttributes", + Handler: _Provider_ConfigAttributes_Handler, + }, + { + MethodName: "ConfigLoad", + Handler: _Provider_ConfigLoad_Handler, + }, + { + MethodName: "ConfigValidate", + Handler: _Provider_ConfigValidate_Handler, + }, + { + MethodName: "ConfigFinalize", + Handler: _Provider_ConfigFinalize_Handler, + }, + { + MethodName: "GuestCapabilities", + Handler: _Provider_GuestCapabilities_Handler, + }, + { + MethodName: "GuestCapability", + Handler: _Provider_GuestCapability_Handler, + }, + { + MethodName: "HostCapabilities", + Handler: _Provider_HostCapabilities_Handler, + }, + { + MethodName: "HostCapability", + Handler: _Provider_HostCapability_Handler, + }, + { + MethodName: "ProviderCapabilities", + Handler: _Provider_ProviderCapabilities_Handler, + }, + { + MethodName: "ProviderCapability", + Handler: _Provider_ProviderCapability_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "vagrant.proto", +} + +func init() { proto.RegisterFile("vagrant.proto", fileDescriptor_05d5fddafc02be38) } + +var fileDescriptor_05d5fddafc02be38 = []byte{ + // 1119 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xdf, 0x6e, 0x1b, 0x45, + 0x17, 0x97, 0x1d, 0xff, 0x89, 0x8f, 0x63, 0xc7, 0x1d, 0xf9, 0x8b, 0x5c, 0x37, 0x1f, 0x35, 0xdb, + 0x56, 0xb8, 0x42, 0xca, 0x45, 0xb8, 0x08, 0x88, 0x46, 0x90, 0x3a, 0x6e, 0x6b, 0x9a, 0x96, 0xb0, + 0x11, 0x05, 0x09, 0x41, 0x34, 0xf1, 0x8e, 0xed, 0x11, 0xeb, 0xd9, 0x65, 0x76, 0xd6, 0xc2, 0x5c, + 0x54, 0xbc, 0x02, 0x37, 0x88, 0xa7, 0xe0, 0x86, 0x0b, 0x9e, 0x80, 0x27, 0xe2, 0x05, 0xd0, 0xce, + 0xce, 0x3a, 0xbb, 0xeb, 0x5d, 0xdb, 0xb8, 0x45, 0x69, 0xa4, 0xde, 0xcd, 0x39, 0x33, 0xbf, 0x33, + 0xe7, 0x9c, 0x39, 0xf3, 0x3b, 0x33, 0x50, 0x99, 0xe0, 0x21, 0xc7, 0x4c, 0xec, 0xd9, 0xdc, 0x12, + 0x16, 0x8a, 0x8a, 0x5a, 0x11, 0xf2, 0xdd, 0xb1, 0x2d, 0xa6, 0xda, 0x1d, 0x28, 0x3e, 0xc3, 0xfd, + 0x11, 0x65, 0x04, 0x35, 0xa0, 0x38, 0xf6, 0x87, 0x8d, 0x4c, 0x2b, 0xd3, 0x2e, 0xe9, 0x81, 0xa8, + 0xdd, 0x86, 0xfc, 0x0b, 0x6c, 0x52, 0x03, 0xed, 0x40, 0x81, 0x13, 0xc7, 0x35, 0x85, 0x5c, 0xb1, + 0xa9, 0x2b, 0x49, 0x6b, 0x01, 0xf4, 0x0c, 0xc2, 0x04, 0x1d, 0x50, 0xc2, 0x11, 0x82, 0x1c, 0xc3, + 0xe3, 0xc0, 0x8a, 0x1c, 0x6b, 0x9f, 0x01, 0x9c, 0x9a, 0xee, 0x90, 0xb2, 0x1e, 0x1b, 0x58, 0xa8, + 0x05, 0x65, 0x83, 0x38, 0x7d, 0x4e, 0x6d, 0x41, 0x2d, 0xa6, 0x16, 0x86, 0x55, 0xa8, 0x09, 0x9b, + 0x36, 0xa7, 0x16, 0xa7, 0x62, 0xda, 0xc8, 0xb6, 0x32, 0xed, 0x0d, 0x7d, 0x26, 0x6b, 0x07, 0x50, + 0xec, 0x58, 0x4c, 0x10, 0x26, 0x3c, 0x87, 0x04, 0xe6, 0x43, 0x22, 0x94, 0x0d, 0x25, 0xa1, 0x3a, + 0xe4, 0x27, 0xd8, 0x74, 0x89, 0xc4, 0x96, 0x74, 0x5f, 0xd0, 0xde, 0x83, 0xca, 0x57, 0x9c, 0x0a, + 0xa2, 0x13, 0xc7, 0xb6, 0x98, 0x43, 0x3c, 0xb8, 0x49, 0xd8, 0x50, 0x8c, 0x24, 0x3c, 0xaf, 0x2b, + 0x49, 0x7b, 0x08, 0xb5, 0xb3, 0xa9, 0x23, 0xc8, 0xb8, 0x83, 0x6d, 0x7c, 0x41, 0x4d, 0x2a, 0xa6, + 0x49, 0x51, 0x49, 0x2f, 0x4d, 0x2c, 0x06, 0x16, 0x1f, 0xab, 0x9d, 0x66, 0xb2, 0x76, 0x0c, 0xe8, + 0x94, 0x5b, 0x13, 0x6a, 0x10, 0xbe, 0x82, 0x15, 0xb5, 0x72, 0x66, 0x45, 0xc9, 0xda, 0x37, 0x50, + 0x8f, 0x7b, 0x72, 0x42, 0x1d, 0x81, 0x3a, 0xb0, 0xd5, 0x0f, 0x34, 0x94, 0x38, 0x8d, 0x4c, 0x6b, + 0xa3, 0x5d, 0xde, 0xbf, 0xbd, 0x17, 0x39, 0xe6, 0xbd, 0x38, 0x54, 0x8f, 0x80, 0xb4, 0x73, 0xd8, + 0x99, 0x77, 0x51, 0x9a, 0xef, 0x26, 0x9a, 0x7f, 0x37, 0x66, 0x7e, 0x1e, 0x1c, 0xdb, 0xe0, 0x3e, + 0x6c, 0x3f, 0x26, 0x8c, 0x70, 0xda, 0x0f, 0xa7, 0x3c, 0x54, 0x42, 0xa5, 0x59, 0x09, 0xfd, 0x92, + 0x81, 0x9d, 0xc7, 0x2e, 0x71, 0x44, 0xc8, 0x18, 0xf9, 0xc1, 0x53, 0xa0, 0x4f, 0x00, 0x66, 0x56, + 0xa7, 0x12, 0xb6, 0x42, 0xa4, 0x21, 0x48, 0xb8, 0xb2, 0xb3, 0x91, 0xca, 0x46, 0xbb, 0x50, 0xc2, + 0x7c, 0xe8, 0x8e, 0x09, 0x13, 0x4e, 0x63, 0x43, 0xce, 0x5d, 0x2a, 0xb4, 0xdf, 0x32, 0xf0, 0xbf, + 0x27, 0xd6, 0x7f, 0xe2, 0x52, 0x0b, 0xca, 0x84, 0x4d, 0x28, 0xb7, 0x98, 0xb7, 0x95, 0x72, 0x2b, + 0xac, 0x5a, 0xe2, 0xda, 0xaf, 0x19, 0xb8, 0x99, 0x90, 0x7e, 0xe5, 0xde, 0x51, 0x82, 0x7b, 0x2b, + 0x1c, 0xde, 0xeb, 0xc8, 0xd9, 0x21, 0x54, 0x3a, 0x16, 0x1b, 0xd0, 0xa1, 0xcb, 0xb1, 0xbc, 0xc9, + 0x08, 0x72, 0x06, 0x16, 0x38, 0xa8, 0x78, 0x6f, 0x9c, 0x6e, 0x5c, 0xbb, 0x0b, 0x5b, 0x5e, 0x01, + 0xce, 0xca, 0xa5, 0x0e, 0x79, 0x2a, 0xc8, 0xd8, 0xaf, 0xc0, 0x92, 0xee, 0x0b, 0xda, 0xb7, 0x50, + 0x39, 0x9b, 0xb2, 0x3e, 0x31, 0x1e, 0x59, 0xa6, 0x41, 0xb8, 0x93, 0xce, 0x5d, 0xde, 0xcc, 0xc0, + 0x5f, 0x14, 0x6c, 0x35, 0xb8, 0xc4, 0x58, 0x92, 0x6c, 0x82, 0x28, 0x02, 0xd1, 0x8b, 0x41, 0x95, + 0xed, 0x51, 0x3f, 0x88, 0x61, 0xee, 0xd6, 0xa6, 0xc7, 0xf0, 0x05, 0x54, 0xba, 0x3f, 0x92, 0xbe, + 0x2b, 0xc8, 0x02, 0x78, 0x90, 0x96, 0x6c, 0x72, 0x5a, 0x36, 0xa2, 0x26, 0x5f, 0x42, 0x55, 0xd1, + 0xf4, 0x99, 0x33, 0x92, 0x14, 0x8a, 0x20, 0x37, 0xb2, 0x9c, 0xe0, 0x16, 0xc9, 0xb1, 0xa7, 0xb3, + 0x2d, 0x2e, 0x14, 0x61, 0xca, 0x31, 0x6a, 0x43, 0xcd, 0xe6, 0x74, 0x82, 0x05, 0x39, 0xff, 0x9e, + 0x4c, 0xcf, 0x6d, 0x2c, 0x46, 0xca, 0x78, 0x55, 0xe9, 0x9f, 0x92, 0xe9, 0x29, 0x16, 0x23, 0x8f, + 0x86, 0x5c, 0x87, 0x70, 0xe9, 0x69, 0xce, 0xa7, 0xa1, 0x40, 0xd6, 0x26, 0xb0, 0x15, 0xec, 0x2f, + 0xb0, 0x20, 0xa8, 0x0a, 0x59, 0x6a, 0xa8, 0xbd, 0xb3, 0xd4, 0x40, 0xef, 0xc3, 0x0d, 0x67, 0x64, + 0x71, 0x71, 0x1e, 0xa6, 0x75, 0x3f, 0xb4, 0x9a, 0x9c, 0x38, 0x0e, 0x71, 0xfb, 0x7d, 0xa8, 0x99, + 0x16, 0x1b, 0x46, 0xd6, 0xfa, 0x2e, 0x6d, 0x7b, 0xfa, 0xd0, 0xd2, 0xfd, 0x97, 0x90, 0xed, 0x7d, + 0x8e, 0x3e, 0x82, 0x9c, 0x4e, 0xb0, 0x81, 0x6e, 0xc6, 0x4a, 0xf8, 0xb2, 0xe7, 0x34, 0x77, 0x62, + 0x53, 0x41, 0x83, 0x38, 0x84, 0xbc, 0xa4, 0x7c, 0x94, 0xb2, 0xa0, 0xb9, 0x1b, 0xd3, 0x47, 0x1a, + 0xc4, 0xfe, 0x9f, 0x59, 0xb8, 0x11, 0x65, 0x25, 0x4a, 0x1c, 0xf4, 0x3c, 0x49, 0x59, 0x8f, 0x19, + 0x92, 0xfd, 0xb5, 0x79, 0x67, 0x09, 0x29, 0x48, 0xb6, 0xfd, 0x1a, 0xb6, 0x63, 0xd4, 0x87, 0xee, + 0xc5, 0x70, 0xc9, 0xd4, 0xd8, 0x7c, 0x27, 0xbe, 0x2c, 0xc6, 0xb6, 0x57, 0x97, 0xb9, 0x3f, 0xb2, + 0x50, 0x8b, 0x70, 0xa7, 0x97, 0xa3, 0x67, 0x09, 0xba, 0x57, 0xc8, 0xdb, 0x0b, 0xa8, 0x46, 0xe9, + 0x19, 0xdd, 0x8d, 0xc1, 0x12, 0xd9, 0xfb, 0x0d, 0xce, 0xda, 0x5f, 0x59, 0xa8, 0xcf, 0x11, 0xb3, + 0x97, 0xa5, 0xb3, 0x14, 0x7d, 0x72, 0xf6, 0xee, 0x2d, 0xe5, 0x7a, 0x99, 0xbf, 0xef, 0x12, 0x9f, + 0x28, 0xed, 0xe5, 0x8d, 0xe2, 0x8d, 0xcf, 0xe3, 0xef, 0x1b, 0x50, 0xf0, 0xdb, 0x10, 0xea, 0x42, + 0xcd, 0x1f, 0x1d, 0x09, 0xc1, 0xe9, 0x85, 0x2b, 0x52, 0xb3, 0x76, 0x2b, 0xa6, 0x8d, 0x34, 0xa2, + 0x27, 0x00, 0xbe, 0x99, 0x13, 0x0b, 0x1b, 0x68, 0x77, 0xde, 0xab, 0xcb, 0x96, 0xd7, 0x5c, 0x38, + 0x8b, 0x9e, 0x42, 0xd5, 0x57, 0xc8, 0x37, 0xb5, 0xc7, 0xa6, 0x8b, 0xad, 0x2d, 0x74, 0xeb, 0x24, + 0x30, 0xf6, 0x88, 0x32, 0x6c, 0xd2, 0x9f, 0xc8, 0x2b, 0xb9, 0x76, 0x75, 0x07, 0xf6, 0x73, 0x11, + 0xb6, 0xc2, 0x2d, 0x1d, 0x1d, 0x42, 0xb1, 0x63, 0x12, 0xcc, 0x5c, 0x7b, 0x2e, 0xa2, 0x48, 0xeb, + 0x6f, 0x26, 0x9e, 0xa5, 0x07, 0x3f, 0xa6, 0x0e, 0xbe, 0x30, 0xc9, 0x5a, 0xf0, 0x07, 0x50, 0xe8, + 0xb2, 0xb5, 0xd1, 0x07, 0x90, 0x93, 0x3d, 0x3a, 0xb9, 0xcc, 0xe2, 0xc9, 0x0d, 0xfd, 0x8b, 0x3e, + 0x84, 0xcd, 0x9e, 0xf3, 0xa5, 0xef, 0x76, 0x3c, 0x8f, 0xaa, 0xff, 0xce, 0x6d, 0xe9, 0xff, 0xcc, + 0x0e, 0x20, 0xf7, 0xdc, 0x7b, 0x56, 0xac, 0xb6, 0x65, 0xe8, 0xb3, 0x76, 0x08, 0xc5, 0x53, 0x4e, + 0x6c, 0xcc, 0xd7, 0x0b, 0xf5, 0xca, 0x2a, 0xe6, 0x1a, 0x35, 0xe1, 0xeb, 0xd1, 0xf5, 0xf6, 0xff, + 0x2e, 0xc3, 0x66, 0xc0, 0xf5, 0xa8, 0x03, 0x05, 0xf5, 0x78, 0xdd, 0x4d, 0x86, 0xf9, 0xb3, 0x8b, + 0xc9, 0x69, 0xed, 0x7b, 0xf0, 0x31, 0x94, 0x7b, 0x4e, 0x8f, 0x39, 0x02, 0x9b, 0x26, 0x31, 0xfe, + 0xe5, 0x55, 0x58, 0xff, 0x12, 0x3d, 0x84, 0x9a, 0x5a, 0xd0, 0x33, 0x3a, 0x23, 0xcc, 0x86, 0x0b, + 0xf6, 0x4e, 0xd1, 0xaf, 0x7f, 0x11, 0x7b, 0x50, 0xd2, 0x5d, 0x96, 0x92, 0xf4, 0xc8, 0x7f, 0x62, + 0x69, 0xc1, 0x7d, 0x0a, 0xc5, 0xe0, 0x9b, 0x90, 0xe6, 0xfe, 0xff, 0x93, 0xf5, 0x01, 0xec, 0x01, + 0xe4, 0xfd, 0x87, 0x7e, 0x1a, 0xfe, 0x56, 0x0a, 0x5e, 0x82, 0xae, 0x8e, 0x14, 0xde, 0x36, 0xfb, + 0xd5, 0x5d, 0x7b, 0x4b, 0xa0, 0xaf, 0xf9, 0xdb, 0x70, 0x1d, 0xdf, 0xe8, 0x17, 0x05, 0xa9, 0xfe, + 0xe0, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x65, 0xa8, 0x70, 0xea, 0x30, 0x16, 0x00, 0x00, +} diff --git a/ext/go-plugin/vagrant/plugin/proto/vagrant.proto b/ext/go-plugin/vagrant/plugin/proto/vagrant.proto new file mode 100644 index 000000000..902be05b7 --- /dev/null +++ b/ext/go-plugin/vagrant/plugin/proto/vagrant.proto @@ -0,0 +1,196 @@ +syntax = "proto3"; +package vagrant.proto; + +message Empty{} + +message Machine { + string machine = 1; +} + +message Valid { + bool result = 1; +} + +message Identifier { + string name = 1; +} + +message PluginInfo { + string description = 1; + int64 priority = 2; +} + +message Content { + string target = 1; + string value = 2; +} + +message WriteResponse { + int32 length = 1; +} + +service IO { + rpc Read(Identifier) returns (Content); + rpc Write(Content) returns (WriteResponse); +} + +message SystemCapability { + string name = 1; + string platform = 2; +} + +message ProviderCapability { + string name = 1; + string provider = 2; +} + +message SystemCapabilityList { + repeated SystemCapability capabilities = 1; +} + +message ProviderCapabilityList { + repeated ProviderCapability capabilities = 1; +} + +message GenericResponse { + string result = 1; +} + +message GuestCapabilityRequest { + SystemCapability capability = 1; + string machine = 2; + string arguments = 3; +} + +message HostCapabilityRequest { + SystemCapability capability = 1; + string environment = 2; + string arguments = 3; +} + +message ProviderCapabilityRequest { + ProviderCapability capability = 1; + string machine = 2; + string arguments = 3; +} + +service GuestCapabilities { + rpc GuestCapabilities(Empty) returns (SystemCapabilityList); + rpc GuestCapability(GuestCapabilityRequest) returns (GenericResponse); + // IO helpers for streaming (copied from Stream service) + rpc Read(Identifier) returns (Content); + rpc Write(Content) returns (WriteResponse); +} + +service HostCapabilities { + rpc HostCapabilities(Empty) returns (SystemCapabilityList); + rpc HostCapability(HostCapabilityRequest) returns (GenericResponse); + // IO helpers for streaming (copied from Stream service) + rpc Read(Identifier) returns (Content); + rpc Write(Content) returns (WriteResponse); +} + +service ProviderCapabilities { + rpc ProviderCapabilities (Empty) returns (ProviderCapabilityList); + rpc ProviderCapability (ProviderCapabilityRequest) returns (GenericResponse); + // IO helpers for streaming (copied from Stream service) + rpc Read(Identifier) returns (Content); + rpc Write(Content) returns (WriteResponse); +} + +message Configuration { + string data = 1; + string machine = 2; +} + +message ListResponse { + repeated string items = 1; +} + +service Config { + rpc ConfigAttributes(Empty) returns (ListResponse); + rpc ConfigLoad(Configuration) returns (Configuration); + rpc ConfigValidate(Configuration) returns (ListResponse); + rpc ConfigFinalize(Configuration) returns (Configuration); + // IO helpers for streaming (copied from Stream service) + rpc Read(Identifier) returns (Content); + rpc Write(Content) returns (WriteResponse); +} + +message SyncedFolders { + string machine = 1; + string folders = 2; + string options = 3; +} + +service SyncedFolder { + rpc Cleanup(SyncedFolders) returns (Empty); + rpc Disable(SyncedFolders) returns (Empty); + rpc Enable(SyncedFolders) returns (Empty); + rpc Info(Empty) returns (PluginInfo); + rpc IsUsable(Machine) returns (Valid); + rpc Name(Empty) returns (Identifier); + rpc Prepare(SyncedFolders) returns (Empty); + // IO helpers for streaming (copied from Stream service) + rpc Read(Identifier) returns (Content); + rpc Write(Content) returns (WriteResponse); + // Guest capabilities helpers (copied from GuestCapabilities service) + rpc GuestCapabilities(Empty) returns (SystemCapabilityList); + rpc GuestCapability(GuestCapabilityRequest) returns (GenericResponse); + // Host capabilities helpers (copied from GuestCapabilities service) + rpc HostCapabilities(Empty) returns (SystemCapabilityList); + rpc HostCapability(HostCapabilityRequest) returns (GenericResponse); +} + +message GenericAction { + string name = 1; + string machine = 2; +} + +message ExecuteAction { + string name = 1; + string data = 2; + string machine = 3; +} + +message MachineSshInfo { + string host = 1; + int64 port = 2; + string private_key_path = 3; + string username = 4; +} + +message MachineState { + string id = 1; + string short_description = 2; + string long_description = 3; +} + +service Provider { + rpc Action(GenericAction) returns (ListResponse); + rpc Info(Empty) returns (PluginInfo); + rpc IsInstalled(Machine) returns (Valid); + rpc IsUsable(Machine) returns (Valid); + rpc MachineIdChanged(Machine) returns (Machine); + rpc Name(Empty) returns (Identifier); + rpc RunAction(ExecuteAction) returns (GenericResponse); + rpc SshInfo(Machine) returns (MachineSshInfo); + rpc State(Machine) returns (MachineState); + // IO helpers for streaming (copied from Stream service) + rpc Read(Identifier) returns (Content); + rpc Write(Content) returns (WriteResponse); + // Config helpers (copied from Config service) + rpc ConfigAttributes(Empty) returns (ListResponse); + rpc ConfigLoad(Configuration) returns (Configuration); + rpc ConfigValidate(Configuration) returns (ListResponse); + rpc ConfigFinalize(Configuration) returns (Configuration); + // Guest capabilities helpers (copied from GuestCapabilities service) + rpc GuestCapabilities(Empty) returns (SystemCapabilityList); + rpc GuestCapability(GuestCapabilityRequest) returns (GenericResponse); + // Host capabilities helpers (copied from HostCapabilities service) + rpc HostCapabilities(Empty) returns (SystemCapabilityList); + rpc HostCapability(HostCapabilityRequest) returns (GenericResponse); + // Provider capabilities helpers (copied from ProviderCapabilities service) + rpc ProviderCapabilities (Empty) returns (ProviderCapabilityList); + rpc ProviderCapability (ProviderCapabilityRequest) returns (GenericResponse); +} diff --git a/ext/go-plugin/vagrant/plugin/proto/vagrant_caps/capabilities.pb.go b/ext/go-plugin/vagrant/plugin/proto/vagrant_caps/capabilities.pb.go deleted file mode 100644 index 6843cb728..000000000 --- a/ext/go-plugin/vagrant/plugin/proto/vagrant_caps/capabilities.pb.go +++ /dev/null @@ -1,1067 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: vagrant_caps/capabilities.proto - -package vagrant_caps - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import vagrant_common "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_common" -import vagrant_io "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_io" - -import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type Capability struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Platform string `protobuf:"bytes,2,opt,name=platform,proto3" json:"platform,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Capability) Reset() { *m = Capability{} } -func (m *Capability) String() string { return proto.CompactTextString(m) } -func (*Capability) ProtoMessage() {} -func (*Capability) Descriptor() ([]byte, []int) { - return fileDescriptor_591a3013bd09a9cb, []int{0} -} -func (m *Capability) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Capability.Unmarshal(m, b) -} -func (m *Capability) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Capability.Marshal(b, m, deterministic) -} -func (m *Capability) XXX_Merge(src proto.Message) { - xxx_messageInfo_Capability.Merge(m, src) -} -func (m *Capability) XXX_Size() int { - return xxx_messageInfo_Capability.Size(m) -} -func (m *Capability) XXX_DiscardUnknown() { - xxx_messageInfo_Capability.DiscardUnknown(m) -} - -var xxx_messageInfo_Capability proto.InternalMessageInfo - -func (m *Capability) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Capability) GetPlatform() string { - if m != nil { - return m.Platform - } - return "" -} - -type ProviderCapability struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ProviderCapability) Reset() { *m = ProviderCapability{} } -func (m *ProviderCapability) String() string { return proto.CompactTextString(m) } -func (*ProviderCapability) ProtoMessage() {} -func (*ProviderCapability) Descriptor() ([]byte, []int) { - return fileDescriptor_591a3013bd09a9cb, []int{1} -} -func (m *ProviderCapability) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProviderCapability.Unmarshal(m, b) -} -func (m *ProviderCapability) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProviderCapability.Marshal(b, m, deterministic) -} -func (m *ProviderCapability) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProviderCapability.Merge(m, src) -} -func (m *ProviderCapability) XXX_Size() int { - return xxx_messageInfo_ProviderCapability.Size(m) -} -func (m *ProviderCapability) XXX_DiscardUnknown() { - xxx_messageInfo_ProviderCapability.DiscardUnknown(m) -} - -var xxx_messageInfo_ProviderCapability proto.InternalMessageInfo - -func (m *ProviderCapability) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *ProviderCapability) GetProvider() string { - if m != nil { - return m.Provider - } - return "" -} - -type ProviderCapabilitiesResponse struct { - Capabilities []*ProviderCapability `protobuf:"bytes,1,rep,name=capabilities,proto3" json:"capabilities,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ProviderCapabilitiesResponse) Reset() { *m = ProviderCapabilitiesResponse{} } -func (m *ProviderCapabilitiesResponse) String() string { return proto.CompactTextString(m) } -func (*ProviderCapabilitiesResponse) ProtoMessage() {} -func (*ProviderCapabilitiesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_591a3013bd09a9cb, []int{2} -} -func (m *ProviderCapabilitiesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProviderCapabilitiesResponse.Unmarshal(m, b) -} -func (m *ProviderCapabilitiesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProviderCapabilitiesResponse.Marshal(b, m, deterministic) -} -func (m *ProviderCapabilitiesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProviderCapabilitiesResponse.Merge(m, src) -} -func (m *ProviderCapabilitiesResponse) XXX_Size() int { - return xxx_messageInfo_ProviderCapabilitiesResponse.Size(m) -} -func (m *ProviderCapabilitiesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ProviderCapabilitiesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ProviderCapabilitiesResponse proto.InternalMessageInfo - -func (m *ProviderCapabilitiesResponse) GetCapabilities() []*ProviderCapability { - if m != nil { - return m.Capabilities - } - return nil -} - -func (m *ProviderCapabilitiesResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -type ProviderCapabilityRequest struct { - Capability *ProviderCapability `protobuf:"bytes,1,opt,name=capability,proto3" json:"capability,omitempty"` - Machine string `protobuf:"bytes,2,opt,name=machine,proto3" json:"machine,omitempty"` - Arguments string `protobuf:"bytes,3,opt,name=arguments,proto3" json:"arguments,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ProviderCapabilityRequest) Reset() { *m = ProviderCapabilityRequest{} } -func (m *ProviderCapabilityRequest) String() string { return proto.CompactTextString(m) } -func (*ProviderCapabilityRequest) ProtoMessage() {} -func (*ProviderCapabilityRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_591a3013bd09a9cb, []int{3} -} -func (m *ProviderCapabilityRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProviderCapabilityRequest.Unmarshal(m, b) -} -func (m *ProviderCapabilityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProviderCapabilityRequest.Marshal(b, m, deterministic) -} -func (m *ProviderCapabilityRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProviderCapabilityRequest.Merge(m, src) -} -func (m *ProviderCapabilityRequest) XXX_Size() int { - return xxx_messageInfo_ProviderCapabilityRequest.Size(m) -} -func (m *ProviderCapabilityRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ProviderCapabilityRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ProviderCapabilityRequest proto.InternalMessageInfo - -func (m *ProviderCapabilityRequest) GetCapability() *ProviderCapability { - if m != nil { - return m.Capability - } - return nil -} - -func (m *ProviderCapabilityRequest) GetMachine() string { - if m != nil { - return m.Machine - } - return "" -} - -func (m *ProviderCapabilityRequest) GetArguments() string { - if m != nil { - return m.Arguments - } - return "" -} - -type ProviderCapabilityResponse struct { - Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ProviderCapabilityResponse) Reset() { *m = ProviderCapabilityResponse{} } -func (m *ProviderCapabilityResponse) String() string { return proto.CompactTextString(m) } -func (*ProviderCapabilityResponse) ProtoMessage() {} -func (*ProviderCapabilityResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_591a3013bd09a9cb, []int{4} -} -func (m *ProviderCapabilityResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProviderCapabilityResponse.Unmarshal(m, b) -} -func (m *ProviderCapabilityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProviderCapabilityResponse.Marshal(b, m, deterministic) -} -func (m *ProviderCapabilityResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProviderCapabilityResponse.Merge(m, src) -} -func (m *ProviderCapabilityResponse) XXX_Size() int { - return xxx_messageInfo_ProviderCapabilityResponse.Size(m) -} -func (m *ProviderCapabilityResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ProviderCapabilityResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ProviderCapabilityResponse proto.InternalMessageInfo - -func (m *ProviderCapabilityResponse) GetResult() string { - if m != nil { - return m.Result - } - return "" -} - -func (m *ProviderCapabilityResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -type CapabilitiesResponse struct { - Capabilities []*Capability `protobuf:"bytes,1,rep,name=capabilities,proto3" json:"capabilities,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CapabilitiesResponse) Reset() { *m = CapabilitiesResponse{} } -func (m *CapabilitiesResponse) String() string { return proto.CompactTextString(m) } -func (*CapabilitiesResponse) ProtoMessage() {} -func (*CapabilitiesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_591a3013bd09a9cb, []int{5} -} -func (m *CapabilitiesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CapabilitiesResponse.Unmarshal(m, b) -} -func (m *CapabilitiesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CapabilitiesResponse.Marshal(b, m, deterministic) -} -func (m *CapabilitiesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CapabilitiesResponse.Merge(m, src) -} -func (m *CapabilitiesResponse) XXX_Size() int { - return xxx_messageInfo_CapabilitiesResponse.Size(m) -} -func (m *CapabilitiesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CapabilitiesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CapabilitiesResponse proto.InternalMessageInfo - -func (m *CapabilitiesResponse) GetCapabilities() []*Capability { - if m != nil { - return m.Capabilities - } - return nil -} - -func (m *CapabilitiesResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -type GuestCapabilityRequest struct { - Capability *Capability `protobuf:"bytes,1,opt,name=capability,proto3" json:"capability,omitempty"` - Machine string `protobuf:"bytes,2,opt,name=machine,proto3" json:"machine,omitempty"` - Arguments string `protobuf:"bytes,3,opt,name=arguments,proto3" json:"arguments,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GuestCapabilityRequest) Reset() { *m = GuestCapabilityRequest{} } -func (m *GuestCapabilityRequest) String() string { return proto.CompactTextString(m) } -func (*GuestCapabilityRequest) ProtoMessage() {} -func (*GuestCapabilityRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_591a3013bd09a9cb, []int{6} -} -func (m *GuestCapabilityRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GuestCapabilityRequest.Unmarshal(m, b) -} -func (m *GuestCapabilityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GuestCapabilityRequest.Marshal(b, m, deterministic) -} -func (m *GuestCapabilityRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GuestCapabilityRequest.Merge(m, src) -} -func (m *GuestCapabilityRequest) XXX_Size() int { - return xxx_messageInfo_GuestCapabilityRequest.Size(m) -} -func (m *GuestCapabilityRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GuestCapabilityRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GuestCapabilityRequest proto.InternalMessageInfo - -func (m *GuestCapabilityRequest) GetCapability() *Capability { - if m != nil { - return m.Capability - } - return nil -} - -func (m *GuestCapabilityRequest) GetMachine() string { - if m != nil { - return m.Machine - } - return "" -} - -func (m *GuestCapabilityRequest) GetArguments() string { - if m != nil { - return m.Arguments - } - return "" -} - -type GuestCapabilityResponse struct { - Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GuestCapabilityResponse) Reset() { *m = GuestCapabilityResponse{} } -func (m *GuestCapabilityResponse) String() string { return proto.CompactTextString(m) } -func (*GuestCapabilityResponse) ProtoMessage() {} -func (*GuestCapabilityResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_591a3013bd09a9cb, []int{7} -} -func (m *GuestCapabilityResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GuestCapabilityResponse.Unmarshal(m, b) -} -func (m *GuestCapabilityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GuestCapabilityResponse.Marshal(b, m, deterministic) -} -func (m *GuestCapabilityResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GuestCapabilityResponse.Merge(m, src) -} -func (m *GuestCapabilityResponse) XXX_Size() int { - return xxx_messageInfo_GuestCapabilityResponse.Size(m) -} -func (m *GuestCapabilityResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GuestCapabilityResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GuestCapabilityResponse proto.InternalMessageInfo - -func (m *GuestCapabilityResponse) GetResult() string { - if m != nil { - return m.Result - } - return "" -} - -func (m *GuestCapabilityResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -type HostCapabilityRequest struct { - Capability *Capability `protobuf:"bytes,1,opt,name=capability,proto3" json:"capability,omitempty"` - Environment string `protobuf:"bytes,2,opt,name=environment,proto3" json:"environment,omitempty"` - Arguments string `protobuf:"bytes,3,opt,name=arguments,proto3" json:"arguments,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HostCapabilityRequest) Reset() { *m = HostCapabilityRequest{} } -func (m *HostCapabilityRequest) String() string { return proto.CompactTextString(m) } -func (*HostCapabilityRequest) ProtoMessage() {} -func (*HostCapabilityRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_591a3013bd09a9cb, []int{8} -} -func (m *HostCapabilityRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HostCapabilityRequest.Unmarshal(m, b) -} -func (m *HostCapabilityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HostCapabilityRequest.Marshal(b, m, deterministic) -} -func (m *HostCapabilityRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_HostCapabilityRequest.Merge(m, src) -} -func (m *HostCapabilityRequest) XXX_Size() int { - return xxx_messageInfo_HostCapabilityRequest.Size(m) -} -func (m *HostCapabilityRequest) XXX_DiscardUnknown() { - xxx_messageInfo_HostCapabilityRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_HostCapabilityRequest proto.InternalMessageInfo - -func (m *HostCapabilityRequest) GetCapability() *Capability { - if m != nil { - return m.Capability - } - return nil -} - -func (m *HostCapabilityRequest) GetEnvironment() string { - if m != nil { - return m.Environment - } - return "" -} - -func (m *HostCapabilityRequest) GetArguments() string { - if m != nil { - return m.Arguments - } - return "" -} - -type HostCapabilityResponse struct { - Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HostCapabilityResponse) Reset() { *m = HostCapabilityResponse{} } -func (m *HostCapabilityResponse) String() string { return proto.CompactTextString(m) } -func (*HostCapabilityResponse) ProtoMessage() {} -func (*HostCapabilityResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_591a3013bd09a9cb, []int{9} -} -func (m *HostCapabilityResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HostCapabilityResponse.Unmarshal(m, b) -} -func (m *HostCapabilityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HostCapabilityResponse.Marshal(b, m, deterministic) -} -func (m *HostCapabilityResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_HostCapabilityResponse.Merge(m, src) -} -func (m *HostCapabilityResponse) XXX_Size() int { - return xxx_messageInfo_HostCapabilityResponse.Size(m) -} -func (m *HostCapabilityResponse) XXX_DiscardUnknown() { - xxx_messageInfo_HostCapabilityResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_HostCapabilityResponse proto.InternalMessageInfo - -func (m *HostCapabilityResponse) GetResult() string { - if m != nil { - return m.Result - } - return "" -} - -func (m *HostCapabilityResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -func init() { - proto.RegisterType((*Capability)(nil), "vagrant.caps.Capability") - proto.RegisterType((*ProviderCapability)(nil), "vagrant.caps.ProviderCapability") - proto.RegisterType((*ProviderCapabilitiesResponse)(nil), "vagrant.caps.ProviderCapabilitiesResponse") - proto.RegisterType((*ProviderCapabilityRequest)(nil), "vagrant.caps.ProviderCapabilityRequest") - proto.RegisterType((*ProviderCapabilityResponse)(nil), "vagrant.caps.ProviderCapabilityResponse") - proto.RegisterType((*CapabilitiesResponse)(nil), "vagrant.caps.CapabilitiesResponse") - proto.RegisterType((*GuestCapabilityRequest)(nil), "vagrant.caps.GuestCapabilityRequest") - proto.RegisterType((*GuestCapabilityResponse)(nil), "vagrant.caps.GuestCapabilityResponse") - proto.RegisterType((*HostCapabilityRequest)(nil), "vagrant.caps.HostCapabilityRequest") - proto.RegisterType((*HostCapabilityResponse)(nil), "vagrant.caps.HostCapabilityResponse") -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// GuestCapabilitiesClient is the client API for GuestCapabilities service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type GuestCapabilitiesClient interface { - GuestCapabilities(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*CapabilitiesResponse, error) - GuestCapability(ctx context.Context, in *GuestCapabilityRequest, opts ...grpc.CallOption) (*GuestCapabilityResponse, error) - // These are IO helpers for streaming - Read(ctx context.Context, in *vagrant_io.ReadRequest, opts ...grpc.CallOption) (*vagrant_io.ReadResponse, error) - Write(ctx context.Context, in *vagrant_io.WriteRequest, opts ...grpc.CallOption) (*vagrant_io.WriteResponse, error) -} - -type guestCapabilitiesClient struct { - cc *grpc.ClientConn -} - -func NewGuestCapabilitiesClient(cc *grpc.ClientConn) GuestCapabilitiesClient { - return &guestCapabilitiesClient{cc} -} - -func (c *guestCapabilitiesClient) GuestCapabilities(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*CapabilitiesResponse, error) { - out := new(CapabilitiesResponse) - err := c.cc.Invoke(ctx, "/vagrant.caps.GuestCapabilities/GuestCapabilities", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guestCapabilitiesClient) GuestCapability(ctx context.Context, in *GuestCapabilityRequest, opts ...grpc.CallOption) (*GuestCapabilityResponse, error) { - out := new(GuestCapabilityResponse) - err := c.cc.Invoke(ctx, "/vagrant.caps.GuestCapabilities/GuestCapability", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guestCapabilitiesClient) Read(ctx context.Context, in *vagrant_io.ReadRequest, opts ...grpc.CallOption) (*vagrant_io.ReadResponse, error) { - out := new(vagrant_io.ReadResponse) - err := c.cc.Invoke(ctx, "/vagrant.caps.GuestCapabilities/Read", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *guestCapabilitiesClient) Write(ctx context.Context, in *vagrant_io.WriteRequest, opts ...grpc.CallOption) (*vagrant_io.WriteResponse, error) { - out := new(vagrant_io.WriteResponse) - err := c.cc.Invoke(ctx, "/vagrant.caps.GuestCapabilities/Write", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// GuestCapabilitiesServer is the server API for GuestCapabilities service. -type GuestCapabilitiesServer interface { - GuestCapabilities(context.Context, *vagrant_common.NullRequest) (*CapabilitiesResponse, error) - GuestCapability(context.Context, *GuestCapabilityRequest) (*GuestCapabilityResponse, error) - // These are IO helpers for streaming - Read(context.Context, *vagrant_io.ReadRequest) (*vagrant_io.ReadResponse, error) - Write(context.Context, *vagrant_io.WriteRequest) (*vagrant_io.WriteResponse, error) -} - -func RegisterGuestCapabilitiesServer(s *grpc.Server, srv GuestCapabilitiesServer) { - s.RegisterService(&_GuestCapabilities_serviceDesc, srv) -} - -func _GuestCapabilities_GuestCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.NullRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuestCapabilitiesServer).GuestCapabilities(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.caps.GuestCapabilities/GuestCapabilities", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuestCapabilitiesServer).GuestCapabilities(ctx, req.(*vagrant_common.NullRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuestCapabilities_GuestCapability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GuestCapabilityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuestCapabilitiesServer).GuestCapability(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.caps.GuestCapabilities/GuestCapability", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuestCapabilitiesServer).GuestCapability(ctx, req.(*GuestCapabilityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuestCapabilities_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_io.ReadRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuestCapabilitiesServer).Read(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.caps.GuestCapabilities/Read", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuestCapabilitiesServer).Read(ctx, req.(*vagrant_io.ReadRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GuestCapabilities_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_io.WriteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GuestCapabilitiesServer).Write(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.caps.GuestCapabilities/Write", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GuestCapabilitiesServer).Write(ctx, req.(*vagrant_io.WriteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _GuestCapabilities_serviceDesc = grpc.ServiceDesc{ - ServiceName: "vagrant.caps.GuestCapabilities", - HandlerType: (*GuestCapabilitiesServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GuestCapabilities", - Handler: _GuestCapabilities_GuestCapabilities_Handler, - }, - { - MethodName: "GuestCapability", - Handler: _GuestCapabilities_GuestCapability_Handler, - }, - { - MethodName: "Read", - Handler: _GuestCapabilities_Read_Handler, - }, - { - MethodName: "Write", - Handler: _GuestCapabilities_Write_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "vagrant_caps/capabilities.proto", -} - -// HostCapabilitiesClient is the client API for HostCapabilities service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type HostCapabilitiesClient interface { - HostCapabilities(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*CapabilitiesResponse, error) - HostCapability(ctx context.Context, in *HostCapabilityRequest, opts ...grpc.CallOption) (*HostCapabilityResponse, error) - // These are IO helpers for streaming - Read(ctx context.Context, in *vagrant_io.ReadRequest, opts ...grpc.CallOption) (*vagrant_io.ReadResponse, error) - Write(ctx context.Context, in *vagrant_io.WriteRequest, opts ...grpc.CallOption) (*vagrant_io.WriteResponse, error) -} - -type hostCapabilitiesClient struct { - cc *grpc.ClientConn -} - -func NewHostCapabilitiesClient(cc *grpc.ClientConn) HostCapabilitiesClient { - return &hostCapabilitiesClient{cc} -} - -func (c *hostCapabilitiesClient) HostCapabilities(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*CapabilitiesResponse, error) { - out := new(CapabilitiesResponse) - err := c.cc.Invoke(ctx, "/vagrant.caps.HostCapabilities/HostCapabilities", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hostCapabilitiesClient) HostCapability(ctx context.Context, in *HostCapabilityRequest, opts ...grpc.CallOption) (*HostCapabilityResponse, error) { - out := new(HostCapabilityResponse) - err := c.cc.Invoke(ctx, "/vagrant.caps.HostCapabilities/HostCapability", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hostCapabilitiesClient) Read(ctx context.Context, in *vagrant_io.ReadRequest, opts ...grpc.CallOption) (*vagrant_io.ReadResponse, error) { - out := new(vagrant_io.ReadResponse) - err := c.cc.Invoke(ctx, "/vagrant.caps.HostCapabilities/Read", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hostCapabilitiesClient) Write(ctx context.Context, in *vagrant_io.WriteRequest, opts ...grpc.CallOption) (*vagrant_io.WriteResponse, error) { - out := new(vagrant_io.WriteResponse) - err := c.cc.Invoke(ctx, "/vagrant.caps.HostCapabilities/Write", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// HostCapabilitiesServer is the server API for HostCapabilities service. -type HostCapabilitiesServer interface { - HostCapabilities(context.Context, *vagrant_common.NullRequest) (*CapabilitiesResponse, error) - HostCapability(context.Context, *HostCapabilityRequest) (*HostCapabilityResponse, error) - // These are IO helpers for streaming - Read(context.Context, *vagrant_io.ReadRequest) (*vagrant_io.ReadResponse, error) - Write(context.Context, *vagrant_io.WriteRequest) (*vagrant_io.WriteResponse, error) -} - -func RegisterHostCapabilitiesServer(s *grpc.Server, srv HostCapabilitiesServer) { - s.RegisterService(&_HostCapabilities_serviceDesc, srv) -} - -func _HostCapabilities_HostCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.NullRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HostCapabilitiesServer).HostCapabilities(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.caps.HostCapabilities/HostCapabilities", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HostCapabilitiesServer).HostCapabilities(ctx, req.(*vagrant_common.NullRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _HostCapabilities_HostCapability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(HostCapabilityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HostCapabilitiesServer).HostCapability(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.caps.HostCapabilities/HostCapability", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HostCapabilitiesServer).HostCapability(ctx, req.(*HostCapabilityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _HostCapabilities_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_io.ReadRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HostCapabilitiesServer).Read(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.caps.HostCapabilities/Read", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HostCapabilitiesServer).Read(ctx, req.(*vagrant_io.ReadRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _HostCapabilities_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_io.WriteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HostCapabilitiesServer).Write(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.caps.HostCapabilities/Write", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HostCapabilitiesServer).Write(ctx, req.(*vagrant_io.WriteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _HostCapabilities_serviceDesc = grpc.ServiceDesc{ - ServiceName: "vagrant.caps.HostCapabilities", - HandlerType: (*HostCapabilitiesServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "HostCapabilities", - Handler: _HostCapabilities_HostCapabilities_Handler, - }, - { - MethodName: "HostCapability", - Handler: _HostCapabilities_HostCapability_Handler, - }, - { - MethodName: "Read", - Handler: _HostCapabilities_Read_Handler, - }, - { - MethodName: "Write", - Handler: _HostCapabilities_Write_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "vagrant_caps/capabilities.proto", -} - -// ProviderCapabilitiesClient is the client API for ProviderCapabilities service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ProviderCapabilitiesClient interface { - ProviderCapabilities(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*ProviderCapabilitiesResponse, error) - ProviderCapability(ctx context.Context, in *ProviderCapabilityRequest, opts ...grpc.CallOption) (*ProviderCapabilityResponse, error) - // These are IO helpers for streaming - Read(ctx context.Context, in *vagrant_io.ReadRequest, opts ...grpc.CallOption) (*vagrant_io.ReadResponse, error) - Write(ctx context.Context, in *vagrant_io.WriteRequest, opts ...grpc.CallOption) (*vagrant_io.WriteResponse, error) -} - -type providerCapabilitiesClient struct { - cc *grpc.ClientConn -} - -func NewProviderCapabilitiesClient(cc *grpc.ClientConn) ProviderCapabilitiesClient { - return &providerCapabilitiesClient{cc} -} - -func (c *providerCapabilitiesClient) ProviderCapabilities(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*ProviderCapabilitiesResponse, error) { - out := new(ProviderCapabilitiesResponse) - err := c.cc.Invoke(ctx, "/vagrant.caps.ProviderCapabilities/ProviderCapabilities", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerCapabilitiesClient) ProviderCapability(ctx context.Context, in *ProviderCapabilityRequest, opts ...grpc.CallOption) (*ProviderCapabilityResponse, error) { - out := new(ProviderCapabilityResponse) - err := c.cc.Invoke(ctx, "/vagrant.caps.ProviderCapabilities/ProviderCapability", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerCapabilitiesClient) Read(ctx context.Context, in *vagrant_io.ReadRequest, opts ...grpc.CallOption) (*vagrant_io.ReadResponse, error) { - out := new(vagrant_io.ReadResponse) - err := c.cc.Invoke(ctx, "/vagrant.caps.ProviderCapabilities/Read", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerCapabilitiesClient) Write(ctx context.Context, in *vagrant_io.WriteRequest, opts ...grpc.CallOption) (*vagrant_io.WriteResponse, error) { - out := new(vagrant_io.WriteResponse) - err := c.cc.Invoke(ctx, "/vagrant.caps.ProviderCapabilities/Write", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ProviderCapabilitiesServer is the server API for ProviderCapabilities service. -type ProviderCapabilitiesServer interface { - ProviderCapabilities(context.Context, *vagrant_common.NullRequest) (*ProviderCapabilitiesResponse, error) - ProviderCapability(context.Context, *ProviderCapabilityRequest) (*ProviderCapabilityResponse, error) - // These are IO helpers for streaming - Read(context.Context, *vagrant_io.ReadRequest) (*vagrant_io.ReadResponse, error) - Write(context.Context, *vagrant_io.WriteRequest) (*vagrant_io.WriteResponse, error) -} - -func RegisterProviderCapabilitiesServer(s *grpc.Server, srv ProviderCapabilitiesServer) { - s.RegisterService(&_ProviderCapabilities_serviceDesc, srv) -} - -func _ProviderCapabilities_ProviderCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.NullRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderCapabilitiesServer).ProviderCapabilities(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.caps.ProviderCapabilities/ProviderCapabilities", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderCapabilitiesServer).ProviderCapabilities(ctx, req.(*vagrant_common.NullRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProviderCapabilities_ProviderCapability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ProviderCapabilityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderCapabilitiesServer).ProviderCapability(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.caps.ProviderCapabilities/ProviderCapability", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderCapabilitiesServer).ProviderCapability(ctx, req.(*ProviderCapabilityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProviderCapabilities_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_io.ReadRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderCapabilitiesServer).Read(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.caps.ProviderCapabilities/Read", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderCapabilitiesServer).Read(ctx, req.(*vagrant_io.ReadRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProviderCapabilities_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_io.WriteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderCapabilitiesServer).Write(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.caps.ProviderCapabilities/Write", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderCapabilitiesServer).Write(ctx, req.(*vagrant_io.WriteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ProviderCapabilities_serviceDesc = grpc.ServiceDesc{ - ServiceName: "vagrant.caps.ProviderCapabilities", - HandlerType: (*ProviderCapabilitiesServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ProviderCapabilities", - Handler: _ProviderCapabilities_ProviderCapabilities_Handler, - }, - { - MethodName: "ProviderCapability", - Handler: _ProviderCapabilities_ProviderCapability_Handler, - }, - { - MethodName: "Read", - Handler: _ProviderCapabilities_Read_Handler, - }, - { - MethodName: "Write", - Handler: _ProviderCapabilities_Write_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "vagrant_caps/capabilities.proto", -} - -func init() { proto.RegisterFile("vagrant_caps/capabilities.proto", fileDescriptor_591a3013bd09a9cb) } - -var fileDescriptor_591a3013bd09a9cb = []byte{ - // 560 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x95, 0x4d, 0x6f, 0xd3, 0x30, - 0x18, 0xc7, 0x95, 0xee, 0x05, 0xf6, 0x6c, 0xe2, 0xc5, 0x2a, 0x5d, 0x16, 0x26, 0x51, 0x85, 0x21, - 0x2a, 0x24, 0x12, 0xa9, 0x5c, 0x40, 0xda, 0x01, 0x89, 0x89, 0x21, 0x0e, 0x08, 0x75, 0x48, 0x1c, - 0x26, 0x31, 0xb9, 0x9d, 0x49, 0x8d, 0x12, 0x3b, 0xd8, 0x4e, 0xc5, 0xf8, 0x08, 0xdc, 0x38, 0xf0, - 0x71, 0xb8, 0xf0, 0x2d, 0xf8, 0x36, 0x28, 0x89, 0x93, 0x25, 0x8b, 0xbb, 0x8c, 0xad, 0xd2, 0x4e, - 0xed, 0xf3, 0xf8, 0x79, 0xfb, 0xff, 0xec, 0xd8, 0xf0, 0x60, 0x86, 0x03, 0x81, 0x99, 0x3a, 0x9a, - 0xe0, 0x58, 0xfa, 0x13, 0x1c, 0xe3, 0x31, 0x0d, 0xa9, 0xa2, 0x44, 0x7a, 0xb1, 0xe0, 0x8a, 0xa3, - 0x0d, 0x1d, 0xe0, 0xa5, 0x01, 0xce, 0x61, 0x40, 0xd5, 0x34, 0x19, 0x7b, 0x13, 0x1e, 0xf9, 0x53, - 0x2c, 0xa7, 0x74, 0xc2, 0x45, 0xec, 0xeb, 0x10, 0x9f, 0x7c, 0x53, 0x7e, 0xc0, 0x9f, 0xc6, 0x61, - 0x12, 0x50, 0x56, 0x7a, 0xb5, 0x99, 0x95, 0xf3, 0xcb, 0x76, 0x3c, 0x8a, 0x38, 0xf3, 0xf3, 0x9f, - 0xbc, 0x95, 0x73, 0xb0, 0xa8, 0xe2, 0x94, 0xfb, 0x94, 0xe7, 0x45, 0xdd, 0x5d, 0x80, 0x57, 0x85, - 0xaa, 0x13, 0x84, 0x60, 0x99, 0xe1, 0x88, 0xd8, 0x56, 0xdf, 0x1a, 0xac, 0x8d, 0xb2, 0xff, 0xc8, - 0x81, 0x9b, 0x71, 0x88, 0xd5, 0x67, 0x2e, 0x22, 0xbb, 0x93, 0xf9, 0x4b, 0xdb, 0xdd, 0x03, 0xf4, - 0x5e, 0xf0, 0x19, 0x3d, 0x26, 0xe2, 0x02, 0x55, 0x74, 0x64, 0x59, 0x45, 0xdb, 0xee, 0x77, 0xd8, - 0x6e, 0x54, 0xa1, 0x44, 0x8e, 0x88, 0x8c, 0x39, 0x93, 0x04, 0xed, 0xc1, 0x46, 0x95, 0xbc, 0x6d, - 0xf5, 0x97, 0x06, 0xeb, 0xc3, 0xbe, 0x57, 0x45, 0xef, 0x35, 0xe7, 0x18, 0xd5, 0xb2, 0x50, 0x17, - 0x56, 0x88, 0x10, 0xbc, 0x68, 0x9f, 0x1b, 0xee, 0x2f, 0x0b, 0xb6, 0x0c, 0xa9, 0xe4, 0x6b, 0x42, - 0xa4, 0x42, 0x2f, 0x01, 0xca, 0x1a, 0x27, 0x99, 0x9e, 0x8b, 0xf4, 0xad, 0xe4, 0x20, 0x1b, 0x6e, - 0x44, 0x78, 0x32, 0xa5, 0x8c, 0xe8, 0xbe, 0x85, 0x89, 0xb6, 0x61, 0x0d, 0x8b, 0x20, 0x89, 0x08, - 0x53, 0xd2, 0x5e, 0xca, 0xd6, 0x4e, 0x1d, 0xee, 0x5b, 0x70, 0x4c, 0x63, 0x69, 0x22, 0x3d, 0x58, - 0x15, 0x44, 0x26, 0xa1, 0xd2, 0x8c, 0xb5, 0x35, 0x47, 0xe3, 0x17, 0xe8, 0x1a, 0xb9, 0xee, 0x1a, - 0xb9, 0xda, 0x75, 0x7d, 0xff, 0xc9, 0xf3, 0x87, 0x05, 0xbd, 0xfd, 0x94, 0x5d, 0x13, 0xe6, 0x73, - 0x03, 0xcc, 0xf9, 0xcd, 0x16, 0x01, 0x71, 0x1f, 0x36, 0x1b, 0xb3, 0x5c, 0x8a, 0xe0, 0x4f, 0x0b, - 0xee, 0xbd, 0xe1, 0x8b, 0x15, 0xd5, 0x87, 0x75, 0xc2, 0x66, 0x54, 0x70, 0x96, 0x0e, 0xab, 0xfb, - 0x55, 0x5d, 0x2d, 0xe2, 0x5e, 0x43, 0xef, 0xec, 0x48, 0x97, 0xd1, 0x36, 0xfc, 0xd3, 0x81, 0xbb, - 0x75, 0x4a, 0xe9, 0xee, 0x7e, 0x30, 0x39, 0xef, 0x9f, 0x0a, 0xcb, 0x2f, 0xa6, 0x77, 0x49, 0x18, - 0x6a, 0x12, 0x8e, 0x3b, 0x47, 0x75, 0xf5, 0xc4, 0x7d, 0x82, 0xdb, 0x67, 0x36, 0x04, 0xed, 0xd4, - 0xd3, 0xcc, 0x67, 0xc7, 0x79, 0xd4, 0x12, 0xa5, 0xeb, 0xbf, 0x80, 0xe5, 0x11, 0xc1, 0xc7, 0x68, - 0xb3, 0x0c, 0xa7, 0xdc, 0x4b, 0x3d, 0x45, 0x1d, 0xbb, 0xb9, 0x50, 0x7e, 0x0c, 0x2b, 0x1f, 0x05, - 0x55, 0x04, 0xd5, 0x42, 0x32, 0x57, 0x91, 0xbc, 0x65, 0x58, 0xc9, 0xb3, 0x87, 0xbf, 0x3b, 0x70, - 0xa7, 0xb6, 0x1b, 0x29, 0xae, 0x03, 0x83, 0xef, 0xca, 0x08, 0x0f, 0xe1, 0x56, 0x7d, 0xdb, 0xd1, - 0xc3, 0x7a, 0x96, 0xf1, 0x9c, 0x3a, 0x3b, 0xe7, 0x07, 0x5d, 0x37, 0xbf, 0xbf, 0x1d, 0xe8, 0x9a, - 0xde, 0x00, 0x74, 0x34, 0xc7, 0x7f, 0x2e, 0xc7, 0x27, 0x2d, 0x57, 0x74, 0x95, 0x67, 0x60, 0x7c, - 0xc2, 0x1e, 0xb7, 0x5e, 0xf2, 0xba, 0xd5, 0xa0, 0x3d, 0xf0, 0x9a, 0xd9, 0x8e, 0x57, 0xb3, 0x97, - 0xfe, 0xd9, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x37, 0xe6, 0x14, 0x9d, 0xcc, 0x08, 0x00, 0x00, -} diff --git a/ext/go-plugin/vagrant/plugin/proto/vagrant_caps/capabilities.proto b/ext/go-plugin/vagrant/plugin/proto/vagrant_caps/capabilities.proto deleted file mode 100644 index 36932098e..000000000 --- a/ext/go-plugin/vagrant/plugin/proto/vagrant_caps/capabilities.proto +++ /dev/null @@ -1,82 +0,0 @@ -syntax = "proto3"; -package vagrant.caps; - -import "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_common/common.proto"; -import "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_io/io.proto"; - -message Capability { - string name = 1; - string platform = 2; -} - -message ProviderCapability { - string name = 1; - string provider = 2; -} - -message ProviderCapabilitiesResponse { - repeated ProviderCapability capabilities = 1; - string error = 2; -} - -message ProviderCapabilityRequest { - ProviderCapability capability = 1; - string machine = 2; - string arguments = 3; -} - -message ProviderCapabilityResponse { - string result = 1; - string error = 2; -} - -message CapabilitiesResponse { - repeated Capability capabilities = 1; - string error = 2; -} - -message GuestCapabilityRequest { - Capability capability = 1; - string machine = 2; - string arguments = 3; -} - -message GuestCapabilityResponse { - string result = 1; - string error = 2; -} - -message HostCapabilityRequest { - Capability capability = 1; - string environment = 2; - string arguments = 3; -} - -message HostCapabilityResponse { - string result = 1; - string error = 2; -} - -service GuestCapabilities { - rpc GuestCapabilities(vagrant.common.NullRequest) returns (CapabilitiesResponse); - rpc GuestCapability(GuestCapabilityRequest) returns (GuestCapabilityResponse); - // These are IO helpers for streaming - rpc Read(vagrant.io.ReadRequest) returns (vagrant.io.ReadResponse); - rpc Write(vagrant.io.WriteRequest) returns (vagrant.io.WriteResponse); -} - -service HostCapabilities { - rpc HostCapabilities(vagrant.common.NullRequest) returns (CapabilitiesResponse); - rpc HostCapability(HostCapabilityRequest) returns (HostCapabilityResponse); - // These are IO helpers for streaming - rpc Read(vagrant.io.ReadRequest) returns (vagrant.io.ReadResponse); - rpc Write(vagrant.io.WriteRequest) returns (vagrant.io.WriteResponse); -} - -service ProviderCapabilities { - rpc ProviderCapabilities(vagrant.common.NullRequest) returns (ProviderCapabilitiesResponse); - rpc ProviderCapability(ProviderCapabilityRequest) returns (ProviderCapabilityResponse); - // These are IO helpers for streaming - rpc Read(vagrant.io.ReadRequest) returns (vagrant.io.ReadResponse); - rpc Write(vagrant.io.WriteRequest) returns (vagrant.io.WriteResponse); -} \ No newline at end of file diff --git a/ext/go-plugin/vagrant/plugin/proto/vagrant_common/common.pb.go b/ext/go-plugin/vagrant/plugin/proto/vagrant_common/common.pb.go deleted file mode 100644 index 741b5990e..000000000 --- a/ext/go-plugin/vagrant/plugin/proto/vagrant_common/common.pb.go +++ /dev/null @@ -1,235 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: vagrant_common/common.proto - -package vagrant_common - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type NullRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NullRequest) Reset() { *m = NullRequest{} } -func (m *NullRequest) String() string { return proto.CompactTextString(m) } -func (*NullRequest) ProtoMessage() {} -func (*NullRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_86eb89499a7c6603, []int{0} -} -func (m *NullRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NullRequest.Unmarshal(m, b) -} -func (m *NullRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NullRequest.Marshal(b, m, deterministic) -} -func (m *NullRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NullRequest.Merge(m, src) -} -func (m *NullRequest) XXX_Size() int { - return xxx_messageInfo_NullRequest.Size(m) -} -func (m *NullRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NullRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_NullRequest proto.InternalMessageInfo - -type EmptyRequest struct { - Machine string `protobuf:"bytes,1,opt,name=machine,proto3" json:"machine,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EmptyRequest) Reset() { *m = EmptyRequest{} } -func (m *EmptyRequest) String() string { return proto.CompactTextString(m) } -func (*EmptyRequest) ProtoMessage() {} -func (*EmptyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_86eb89499a7c6603, []int{1} -} -func (m *EmptyRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EmptyRequest.Unmarshal(m, b) -} -func (m *EmptyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EmptyRequest.Marshal(b, m, deterministic) -} -func (m *EmptyRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_EmptyRequest.Merge(m, src) -} -func (m *EmptyRequest) XXX_Size() int { - return xxx_messageInfo_EmptyRequest.Size(m) -} -func (m *EmptyRequest) XXX_DiscardUnknown() { - xxx_messageInfo_EmptyRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_EmptyRequest proto.InternalMessageInfo - -func (m *EmptyRequest) GetMachine() string { - if m != nil { - return m.Machine - } - return "" -} - -type EmptyResponse struct { - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EmptyResponse) Reset() { *m = EmptyResponse{} } -func (m *EmptyResponse) String() string { return proto.CompactTextString(m) } -func (*EmptyResponse) ProtoMessage() {} -func (*EmptyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_86eb89499a7c6603, []int{2} -} -func (m *EmptyResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EmptyResponse.Unmarshal(m, b) -} -func (m *EmptyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EmptyResponse.Marshal(b, m, deterministic) -} -func (m *EmptyResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_EmptyResponse.Merge(m, src) -} -func (m *EmptyResponse) XXX_Size() int { - return xxx_messageInfo_EmptyResponse.Size(m) -} -func (m *EmptyResponse) XXX_DiscardUnknown() { - xxx_messageInfo_EmptyResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_EmptyResponse proto.InternalMessageInfo - -func (m *EmptyResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -type IsResponse struct { - Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IsResponse) Reset() { *m = IsResponse{} } -func (m *IsResponse) String() string { return proto.CompactTextString(m) } -func (*IsResponse) ProtoMessage() {} -func (*IsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_86eb89499a7c6603, []int{3} -} -func (m *IsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IsResponse.Unmarshal(m, b) -} -func (m *IsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IsResponse.Marshal(b, m, deterministic) -} -func (m *IsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_IsResponse.Merge(m, src) -} -func (m *IsResponse) XXX_Size() int { - return xxx_messageInfo_IsResponse.Size(m) -} -func (m *IsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_IsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_IsResponse proto.InternalMessageInfo - -func (m *IsResponse) GetResult() bool { - if m != nil { - return m.Result - } - return false -} - -func (m *IsResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -type NameResponse struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NameResponse) Reset() { *m = NameResponse{} } -func (m *NameResponse) String() string { return proto.CompactTextString(m) } -func (*NameResponse) ProtoMessage() {} -func (*NameResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_86eb89499a7c6603, []int{4} -} -func (m *NameResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NameResponse.Unmarshal(m, b) -} -func (m *NameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NameResponse.Marshal(b, m, deterministic) -} -func (m *NameResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_NameResponse.Merge(m, src) -} -func (m *NameResponse) XXX_Size() int { - return xxx_messageInfo_NameResponse.Size(m) -} -func (m *NameResponse) XXX_DiscardUnknown() { - xxx_messageInfo_NameResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_NameResponse proto.InternalMessageInfo - -func (m *NameResponse) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func init() { - proto.RegisterType((*NullRequest)(nil), "vagrant.common.NullRequest") - proto.RegisterType((*EmptyRequest)(nil), "vagrant.common.EmptyRequest") - proto.RegisterType((*EmptyResponse)(nil), "vagrant.common.EmptyResponse") - proto.RegisterType((*IsResponse)(nil), "vagrant.common.IsResponse") - proto.RegisterType((*NameResponse)(nil), "vagrant.common.NameResponse") -} - -func init() { proto.RegisterFile("vagrant_common/common.proto", fileDescriptor_86eb89499a7c6603) } - -var fileDescriptor_86eb89499a7c6603 = []byte{ - // 178 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0x4b, 0x4c, 0x2f, - 0x4a, 0xcc, 0x2b, 0x89, 0x4f, 0xce, 0xcf, 0xcd, 0xcd, 0xcf, 0xd3, 0x87, 0x50, 0x7a, 0x05, 0x45, - 0xf9, 0x25, 0xf9, 0x42, 0x7c, 0x50, 0x49, 0x3d, 0x88, 0xa8, 0x12, 0x2f, 0x17, 0xb7, 0x5f, 0x69, - 0x4e, 0x4e, 0x50, 0x6a, 0x61, 0x69, 0x6a, 0x71, 0x89, 0x92, 0x06, 0x17, 0x8f, 0x6b, 0x6e, 0x41, - 0x49, 0x25, 0x94, 0x2f, 0x24, 0xc1, 0xc5, 0x9e, 0x9b, 0x98, 0x9c, 0x91, 0x99, 0x97, 0x2a, 0xc1, - 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0xe3, 0x2a, 0xa9, 0x72, 0xf1, 0x42, 0x55, 0x16, 0x17, 0xe4, - 0xe7, 0x15, 0xa7, 0x0a, 0x89, 0x70, 0xb1, 0xa6, 0x16, 0x15, 0xe5, 0x17, 0x41, 0x15, 0x42, 0x38, - 0x4a, 0x56, 0x5c, 0x5c, 0x9e, 0xc5, 0x70, 0x35, 0x62, 0x5c, 0x6c, 0x45, 0xa9, 0xc5, 0xa5, 0x39, - 0x25, 0x60, 0x45, 0x1c, 0x41, 0x50, 0x1e, 0x42, 0x2f, 0x13, 0xb2, 0x5e, 0x25, 0x2e, 0x1e, 0xbf, - 0xc4, 0xdc, 0x54, 0xb8, 0x6e, 0x21, 0x2e, 0x96, 0xbc, 0xc4, 0x5c, 0x98, 0x4b, 0xc0, 0xec, 0x24, - 0x36, 0xb0, 0xb7, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x02, 0xed, 0x61, 0x90, 0xf5, 0x00, - 0x00, 0x00, -} diff --git a/ext/go-plugin/vagrant/plugin/proto/vagrant_common/common.proto b/ext/go-plugin/vagrant/plugin/proto/vagrant_common/common.proto deleted file mode 100644 index 9bf15b58e..000000000 --- a/ext/go-plugin/vagrant/plugin/proto/vagrant_common/common.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; -package vagrant.common; - -message NullRequest {} - -message EmptyRequest { - string machine = 1; -} - -message EmptyResponse { - string error = 1; -} - -message IsResponse { - bool result = 1; - string error = 2; -} - -message NameResponse { string name = 1; } diff --git a/ext/go-plugin/vagrant/plugin/proto/vagrant_config/config.pb.go b/ext/go-plugin/vagrant/plugin/proto/vagrant_config/config.pb.go deleted file mode 100644 index 8d6f9a87e..000000000 --- a/ext/go-plugin/vagrant/plugin/proto/vagrant_config/config.pb.go +++ /dev/null @@ -1,613 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: vagrant_config/config.proto - -package vagrant_config - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import vagrant_common "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_common" -import vagrant_io "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_io" - -import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type AttributesResponse struct { - Attributes []string `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AttributesResponse) Reset() { *m = AttributesResponse{} } -func (m *AttributesResponse) String() string { return proto.CompactTextString(m) } -func (*AttributesResponse) ProtoMessage() {} -func (*AttributesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_952629f1a9a7438c, []int{0} -} -func (m *AttributesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AttributesResponse.Unmarshal(m, b) -} -func (m *AttributesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AttributesResponse.Marshal(b, m, deterministic) -} -func (m *AttributesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttributesResponse.Merge(m, src) -} -func (m *AttributesResponse) XXX_Size() int { - return xxx_messageInfo_AttributesResponse.Size(m) -} -func (m *AttributesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AttributesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AttributesResponse proto.InternalMessageInfo - -func (m *AttributesResponse) GetAttributes() []string { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *AttributesResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -type LoadRequest struct { - Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LoadRequest) Reset() { *m = LoadRequest{} } -func (m *LoadRequest) String() string { return proto.CompactTextString(m) } -func (*LoadRequest) ProtoMessage() {} -func (*LoadRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_952629f1a9a7438c, []int{1} -} -func (m *LoadRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LoadRequest.Unmarshal(m, b) -} -func (m *LoadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LoadRequest.Marshal(b, m, deterministic) -} -func (m *LoadRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LoadRequest.Merge(m, src) -} -func (m *LoadRequest) XXX_Size() int { - return xxx_messageInfo_LoadRequest.Size(m) -} -func (m *LoadRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LoadRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LoadRequest proto.InternalMessageInfo - -func (m *LoadRequest) GetData() string { - if m != nil { - return m.Data - } - return "" -} - -type LoadResponse struct { - Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LoadResponse) Reset() { *m = LoadResponse{} } -func (m *LoadResponse) String() string { return proto.CompactTextString(m) } -func (*LoadResponse) ProtoMessage() {} -func (*LoadResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_952629f1a9a7438c, []int{2} -} -func (m *LoadResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LoadResponse.Unmarshal(m, b) -} -func (m *LoadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LoadResponse.Marshal(b, m, deterministic) -} -func (m *LoadResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LoadResponse.Merge(m, src) -} -func (m *LoadResponse) XXX_Size() int { - return xxx_messageInfo_LoadResponse.Size(m) -} -func (m *LoadResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LoadResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LoadResponse proto.InternalMessageInfo - -func (m *LoadResponse) GetData() string { - if m != nil { - return m.Data - } - return "" -} - -func (m *LoadResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -type ValidateRequest struct { - Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Machine string `protobuf:"bytes,2,opt,name=machine,proto3" json:"machine,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidateRequest) Reset() { *m = ValidateRequest{} } -func (m *ValidateRequest) String() string { return proto.CompactTextString(m) } -func (*ValidateRequest) ProtoMessage() {} -func (*ValidateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_952629f1a9a7438c, []int{3} -} -func (m *ValidateRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidateRequest.Unmarshal(m, b) -} -func (m *ValidateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidateRequest.Marshal(b, m, deterministic) -} -func (m *ValidateRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidateRequest.Merge(m, src) -} -func (m *ValidateRequest) XXX_Size() int { - return xxx_messageInfo_ValidateRequest.Size(m) -} -func (m *ValidateRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ValidateRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidateRequest proto.InternalMessageInfo - -func (m *ValidateRequest) GetData() string { - if m != nil { - return m.Data - } - return "" -} - -func (m *ValidateRequest) GetMachine() string { - if m != nil { - return m.Machine - } - return "" -} - -type ValidateResponse struct { - Errors []string `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidateResponse) Reset() { *m = ValidateResponse{} } -func (m *ValidateResponse) String() string { return proto.CompactTextString(m) } -func (*ValidateResponse) ProtoMessage() {} -func (*ValidateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_952629f1a9a7438c, []int{4} -} -func (m *ValidateResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidateResponse.Unmarshal(m, b) -} -func (m *ValidateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidateResponse.Marshal(b, m, deterministic) -} -func (m *ValidateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidateResponse.Merge(m, src) -} -func (m *ValidateResponse) XXX_Size() int { - return xxx_messageInfo_ValidateResponse.Size(m) -} -func (m *ValidateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ValidateResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidateResponse proto.InternalMessageInfo - -func (m *ValidateResponse) GetErrors() []string { - if m != nil { - return m.Errors - } - return nil -} - -func (m *ValidateResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -type FinalizeRequest struct { - Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FinalizeRequest) Reset() { *m = FinalizeRequest{} } -func (m *FinalizeRequest) String() string { return proto.CompactTextString(m) } -func (*FinalizeRequest) ProtoMessage() {} -func (*FinalizeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_952629f1a9a7438c, []int{5} -} -func (m *FinalizeRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FinalizeRequest.Unmarshal(m, b) -} -func (m *FinalizeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FinalizeRequest.Marshal(b, m, deterministic) -} -func (m *FinalizeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_FinalizeRequest.Merge(m, src) -} -func (m *FinalizeRequest) XXX_Size() int { - return xxx_messageInfo_FinalizeRequest.Size(m) -} -func (m *FinalizeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_FinalizeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_FinalizeRequest proto.InternalMessageInfo - -func (m *FinalizeRequest) GetData() string { - if m != nil { - return m.Data - } - return "" -} - -type FinalizeResponse struct { - Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FinalizeResponse) Reset() { *m = FinalizeResponse{} } -func (m *FinalizeResponse) String() string { return proto.CompactTextString(m) } -func (*FinalizeResponse) ProtoMessage() {} -func (*FinalizeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_952629f1a9a7438c, []int{6} -} -func (m *FinalizeResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FinalizeResponse.Unmarshal(m, b) -} -func (m *FinalizeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FinalizeResponse.Marshal(b, m, deterministic) -} -func (m *FinalizeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_FinalizeResponse.Merge(m, src) -} -func (m *FinalizeResponse) XXX_Size() int { - return xxx_messageInfo_FinalizeResponse.Size(m) -} -func (m *FinalizeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_FinalizeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_FinalizeResponse proto.InternalMessageInfo - -func (m *FinalizeResponse) GetData() string { - if m != nil { - return m.Data - } - return "" -} - -func (m *FinalizeResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -func init() { - proto.RegisterType((*AttributesResponse)(nil), "vagrant.config.AttributesResponse") - proto.RegisterType((*LoadRequest)(nil), "vagrant.config.LoadRequest") - proto.RegisterType((*LoadResponse)(nil), "vagrant.config.LoadResponse") - proto.RegisterType((*ValidateRequest)(nil), "vagrant.config.ValidateRequest") - proto.RegisterType((*ValidateResponse)(nil), "vagrant.config.ValidateResponse") - proto.RegisterType((*FinalizeRequest)(nil), "vagrant.config.FinalizeRequest") - proto.RegisterType((*FinalizeResponse)(nil), "vagrant.config.FinalizeResponse") -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ConfigClient is the client API for Config service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ConfigClient interface { - ConfigAttributes(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*AttributesResponse, error) - ConfigLoad(ctx context.Context, in *LoadRequest, opts ...grpc.CallOption) (*LoadResponse, error) - ConfigValidate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error) - ConfigFinalize(ctx context.Context, in *FinalizeRequest, opts ...grpc.CallOption) (*FinalizeResponse, error) - // These are IO helpers for streaming - Read(ctx context.Context, in *vagrant_io.ReadRequest, opts ...grpc.CallOption) (*vagrant_io.ReadResponse, error) - Write(ctx context.Context, in *vagrant_io.WriteRequest, opts ...grpc.CallOption) (*vagrant_io.WriteResponse, error) -} - -type configClient struct { - cc *grpc.ClientConn -} - -func NewConfigClient(cc *grpc.ClientConn) ConfigClient { - return &configClient{cc} -} - -func (c *configClient) ConfigAttributes(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*AttributesResponse, error) { - out := new(AttributesResponse) - err := c.cc.Invoke(ctx, "/vagrant.config.Config/ConfigAttributes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configClient) ConfigLoad(ctx context.Context, in *LoadRequest, opts ...grpc.CallOption) (*LoadResponse, error) { - out := new(LoadResponse) - err := c.cc.Invoke(ctx, "/vagrant.config.Config/ConfigLoad", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configClient) ConfigValidate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error) { - out := new(ValidateResponse) - err := c.cc.Invoke(ctx, "/vagrant.config.Config/ConfigValidate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configClient) ConfigFinalize(ctx context.Context, in *FinalizeRequest, opts ...grpc.CallOption) (*FinalizeResponse, error) { - out := new(FinalizeResponse) - err := c.cc.Invoke(ctx, "/vagrant.config.Config/ConfigFinalize", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configClient) Read(ctx context.Context, in *vagrant_io.ReadRequest, opts ...grpc.CallOption) (*vagrant_io.ReadResponse, error) { - out := new(vagrant_io.ReadResponse) - err := c.cc.Invoke(ctx, "/vagrant.config.Config/Read", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *configClient) Write(ctx context.Context, in *vagrant_io.WriteRequest, opts ...grpc.CallOption) (*vagrant_io.WriteResponse, error) { - out := new(vagrant_io.WriteResponse) - err := c.cc.Invoke(ctx, "/vagrant.config.Config/Write", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ConfigServer is the server API for Config service. -type ConfigServer interface { - ConfigAttributes(context.Context, *vagrant_common.NullRequest) (*AttributesResponse, error) - ConfigLoad(context.Context, *LoadRequest) (*LoadResponse, error) - ConfigValidate(context.Context, *ValidateRequest) (*ValidateResponse, error) - ConfigFinalize(context.Context, *FinalizeRequest) (*FinalizeResponse, error) - // These are IO helpers for streaming - Read(context.Context, *vagrant_io.ReadRequest) (*vagrant_io.ReadResponse, error) - Write(context.Context, *vagrant_io.WriteRequest) (*vagrant_io.WriteResponse, error) -} - -func RegisterConfigServer(s *grpc.Server, srv ConfigServer) { - s.RegisterService(&_Config_serviceDesc, srv) -} - -func _Config_ConfigAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.NullRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServer).ConfigAttributes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.config.Config/ConfigAttributes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServer).ConfigAttributes(ctx, req.(*vagrant_common.NullRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Config_ConfigLoad_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LoadRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServer).ConfigLoad(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.config.Config/ConfigLoad", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServer).ConfigLoad(ctx, req.(*LoadRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Config_ConfigValidate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ValidateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServer).ConfigValidate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.config.Config/ConfigValidate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServer).ConfigValidate(ctx, req.(*ValidateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Config_ConfigFinalize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FinalizeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServer).ConfigFinalize(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.config.Config/ConfigFinalize", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServer).ConfigFinalize(ctx, req.(*FinalizeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Config_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_io.ReadRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServer).Read(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.config.Config/Read", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServer).Read(ctx, req.(*vagrant_io.ReadRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Config_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_io.WriteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServer).Write(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.config.Config/Write", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServer).Write(ctx, req.(*vagrant_io.WriteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Config_serviceDesc = grpc.ServiceDesc{ - ServiceName: "vagrant.config.Config", - HandlerType: (*ConfigServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ConfigAttributes", - Handler: _Config_ConfigAttributes_Handler, - }, - { - MethodName: "ConfigLoad", - Handler: _Config_ConfigLoad_Handler, - }, - { - MethodName: "ConfigValidate", - Handler: _Config_ConfigValidate_Handler, - }, - { - MethodName: "ConfigFinalize", - Handler: _Config_ConfigFinalize_Handler, - }, - { - MethodName: "Read", - Handler: _Config_Read_Handler, - }, - { - MethodName: "Write", - Handler: _Config_Write_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "vagrant_config/config.proto", -} - -func init() { proto.RegisterFile("vagrant_config/config.proto", fileDescriptor_952629f1a9a7438c) } - -var fileDescriptor_952629f1a9a7438c = []byte{ - // 415 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xdf, 0x6b, 0xdb, 0x30, - 0x10, 0xc7, 0xc9, 0xf2, 0x63, 0xe4, 0x36, 0x92, 0x20, 0xc6, 0xe6, 0x39, 0x63, 0xcb, 0x0c, 0x83, - 0xbc, 0xcc, 0x82, 0xed, 0x65, 0x83, 0xc0, 0x56, 0x0a, 0x2d, 0x94, 0xd2, 0x07, 0x07, 0xda, 0x87, - 0x3e, 0x14, 0xc5, 0x56, 0x6d, 0x81, 0x6d, 0xb9, 0xb2, 0x5c, 0x4a, 0xff, 0xc3, 0xfe, 0x57, 0x25, - 0x92, 0x1c, 0x27, 0xb6, 0x13, 0x28, 0xf4, 0xc9, 0xba, 0xbb, 0xef, 0x7d, 0x4e, 0xba, 0x3b, 0xc3, - 0xf4, 0x9e, 0x84, 0x82, 0xa4, 0xf2, 0xc6, 0xe7, 0xe9, 0x2d, 0x0b, 0xb1, 0xfe, 0xb8, 0x99, 0xe0, - 0x92, 0xa3, 0x91, 0x09, 0xba, 0xda, 0x6b, 0x5f, 0x87, 0x4c, 0x46, 0xc5, 0xca, 0xf5, 0x79, 0x82, - 0x23, 0x92, 0x47, 0xcc, 0xe7, 0x22, 0xc3, 0x46, 0x84, 0xe9, 0x83, 0xc4, 0x21, 0xff, 0x99, 0xc5, - 0x45, 0xc8, 0xd2, 0x8d, 0xd7, 0x98, 0x0a, 0x88, 0xab, 0x62, 0x49, 0xc2, 0x53, 0xac, 0x3f, 0xba, - 0x98, 0xbd, 0x7c, 0x2d, 0x38, 0xe3, 0x98, 0x71, 0x0d, 0x75, 0xce, 0x00, 0x1d, 0x49, 0x29, 0xd8, - 0xaa, 0x90, 0x34, 0xf7, 0x68, 0x9e, 0xf1, 0x34, 0xa7, 0xe8, 0x2b, 0x00, 0xd9, 0x78, 0xad, 0xce, - 0xac, 0x3b, 0x1f, 0x7a, 0x5b, 0x1e, 0xf4, 0x01, 0xfa, 0x54, 0x08, 0x2e, 0xac, 0x37, 0xb3, 0xce, - 0x7c, 0xe8, 0x69, 0xc3, 0xf9, 0x0e, 0xef, 0xce, 0x39, 0x09, 0x3c, 0x7a, 0x57, 0xd0, 0x5c, 0x22, - 0x04, 0xbd, 0x80, 0x48, 0x62, 0x75, 0x94, 0x46, 0x9d, 0x9d, 0x3f, 0xf0, 0x5e, 0x4b, 0x4c, 0xa1, - 0x16, 0xcd, 0x1e, 0xf8, 0x3f, 0x18, 0x5f, 0x92, 0x98, 0x05, 0x44, 0xd2, 0x03, 0x05, 0x90, 0x05, - 0x6f, 0x13, 0xe2, 0x47, 0x2c, 0xa5, 0x26, 0xbd, 0x34, 0x9d, 0xff, 0x30, 0xa9, 0x00, 0xa6, 0xfc, - 0x47, 0x18, 0x28, 0x7a, 0xf9, 0x46, 0x63, 0xed, 0xb9, 0xc2, 0x0f, 0x18, 0x9f, 0xb0, 0x94, 0xc4, - 0xec, 0xf1, 0xd0, 0x15, 0x9c, 0x05, 0x4c, 0x2a, 0xd9, 0x4b, 0xdf, 0xf9, 0xeb, 0xa9, 0x0b, 0x83, - 0x63, 0xb5, 0x4d, 0x68, 0x09, 0x13, 0x7d, 0xaa, 0x26, 0x84, 0xa6, 0x6e, 0xb5, 0x72, 0x6a, 0x37, - 0x2e, 0x8a, 0x38, 0x36, 0xb7, 0xb1, 0x1d, 0x77, 0x77, 0x1f, 0xdd, 0x96, 0xd1, 0x9e, 0x02, 0x68, - 0xe8, 0x7a, 0x0e, 0x3b, 0x38, 0x95, 0xb1, 0x35, 0x40, 0xfb, 0x4b, 0x7b, 0xd0, 0x80, 0x96, 0x30, - 0xd2, 0xa0, 0xb2, 0xab, 0xe8, 0x5b, 0x5d, 0x5f, 0x1b, 0x98, 0x3d, 0xdb, 0x2f, 0xa8, 0x43, 0xcb, - 0x0e, 0x36, 0xa1, 0xb5, 0x11, 0x34, 0xa1, 0x8d, 0xe6, 0xff, 0x85, 0x9e, 0x47, 0x49, 0x80, 0x3e, - 0x6d, 0x94, 0x8c, 0xbb, 0x6b, 0x4f, 0x89, 0xb0, 0x9a, 0x01, 0x93, 0xba, 0x80, 0xfe, 0x95, 0x60, - 0x92, 0xa2, 0x1d, 0x89, 0x72, 0x95, 0xc9, 0x9f, 0x5b, 0x22, 0x3a, 0x7b, 0x35, 0x50, 0xff, 0xd8, - 0xef, 0xe7, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x44, 0xad, 0xc6, 0x44, 0x04, 0x00, 0x00, -} diff --git a/ext/go-plugin/vagrant/plugin/proto/vagrant_config/config.proto b/ext/go-plugin/vagrant/plugin/proto/vagrant_config/config.proto deleted file mode 100644 index 13145c839..000000000 --- a/ext/go-plugin/vagrant/plugin/proto/vagrant_config/config.proto +++ /dev/null @@ -1,48 +0,0 @@ -syntax = "proto3"; -package vagrant.config; - -import "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_common/common.proto"; -import "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_io/io.proto"; - -message AttributesResponse { - repeated string attributes = 1; - string error = 2; -} - -message LoadRequest { - string data = 1; -} - -message LoadResponse { - string data = 1; - string error = 2; -} - -message ValidateRequest { - string data = 1; - string machine = 2; -} - -message ValidateResponse { - repeated string errors = 1; - string error = 2; -} - -message FinalizeRequest { - string data = 1; -} - -message FinalizeResponse { - string data = 1; - string error = 2; -} - -service Config { - rpc ConfigAttributes(vagrant.common.NullRequest) returns (AttributesResponse); - rpc ConfigLoad(LoadRequest) returns (LoadResponse); - rpc ConfigValidate(ValidateRequest) returns (ValidateResponse); - rpc ConfigFinalize(FinalizeRequest) returns (FinalizeResponse); - // These are IO helpers for streaming - rpc Read(vagrant.io.ReadRequest) returns (vagrant.io.ReadResponse); - rpc Write(vagrant.io.WriteRequest) returns (vagrant.io.WriteResponse); -} \ No newline at end of file diff --git a/ext/go-plugin/vagrant/plugin/proto/vagrant_folder/synced_folder.pb.go b/ext/go-plugin/vagrant/plugin/proto/vagrant_folder/synced_folder.pb.go deleted file mode 100644 index 6222c9585..000000000 --- a/ext/go-plugin/vagrant/plugin/proto/vagrant_folder/synced_folder.pb.go +++ /dev/null @@ -1,688 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: vagrant_folder/synced_folder.proto - -package vagrant_folder - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import vagrant_caps "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_caps" -import vagrant_common "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_common" -import vagrant_io "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_io" - -import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type Request struct { - Machine string `protobuf:"bytes,1,opt,name=machine,proto3" json:"machine,omitempty"` - Folders string `protobuf:"bytes,2,opt,name=folders,proto3" json:"folders,omitempty"` - Options string `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Request) Reset() { *m = Request{} } -func (m *Request) String() string { return proto.CompactTextString(m) } -func (*Request) ProtoMessage() {} -func (*Request) Descriptor() ([]byte, []int) { - return fileDescriptor_8a01e482b349ecb1, []int{0} -} -func (m *Request) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Request.Unmarshal(m, b) -} -func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Request.Marshal(b, m, deterministic) -} -func (m *Request) XXX_Merge(src proto.Message) { - xxx_messageInfo_Request.Merge(m, src) -} -func (m *Request) XXX_Size() int { - return xxx_messageInfo_Request.Size(m) -} -func (m *Request) XXX_DiscardUnknown() { - xxx_messageInfo_Request.DiscardUnknown(m) -} - -var xxx_messageInfo_Request proto.InternalMessageInfo - -func (m *Request) GetMachine() string { - if m != nil { - return m.Machine - } - return "" -} - -func (m *Request) GetFolders() string { - if m != nil { - return m.Folders - } - return "" -} - -func (m *Request) GetOptions() string { - if m != nil { - return m.Options - } - return "" -} - -type CleanupRequest struct { - Machine string `protobuf:"bytes,1,opt,name=machine,proto3" json:"machine,omitempty"` - Options string `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CleanupRequest) Reset() { *m = CleanupRequest{} } -func (m *CleanupRequest) String() string { return proto.CompactTextString(m) } -func (*CleanupRequest) ProtoMessage() {} -func (*CleanupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8a01e482b349ecb1, []int{1} -} -func (m *CleanupRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CleanupRequest.Unmarshal(m, b) -} -func (m *CleanupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CleanupRequest.Marshal(b, m, deterministic) -} -func (m *CleanupRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CleanupRequest.Merge(m, src) -} -func (m *CleanupRequest) XXX_Size() int { - return xxx_messageInfo_CleanupRequest.Size(m) -} -func (m *CleanupRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CleanupRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CleanupRequest proto.InternalMessageInfo - -func (m *CleanupRequest) GetMachine() string { - if m != nil { - return m.Machine - } - return "" -} - -func (m *CleanupRequest) GetOptions() string { - if m != nil { - return m.Options - } - return "" -} - -type InfoResponse struct { - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - Priority int64 `protobuf:"varint,2,opt,name=priority,proto3" json:"priority,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *InfoResponse) Reset() { *m = InfoResponse{} } -func (m *InfoResponse) String() string { return proto.CompactTextString(m) } -func (*InfoResponse) ProtoMessage() {} -func (*InfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8a01e482b349ecb1, []int{2} -} -func (m *InfoResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InfoResponse.Unmarshal(m, b) -} -func (m *InfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InfoResponse.Marshal(b, m, deterministic) -} -func (m *InfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_InfoResponse.Merge(m, src) -} -func (m *InfoResponse) XXX_Size() int { - return xxx_messageInfo_InfoResponse.Size(m) -} -func (m *InfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_InfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_InfoResponse proto.InternalMessageInfo - -func (m *InfoResponse) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *InfoResponse) GetPriority() int64 { - if m != nil { - return m.Priority - } - return 0 -} - -func init() { - proto.RegisterType((*Request)(nil), "vagrant.folder.Request") - proto.RegisterType((*CleanupRequest)(nil), "vagrant.folder.CleanupRequest") - proto.RegisterType((*InfoResponse)(nil), "vagrant.folder.InfoResponse") -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// SyncedFolderClient is the client API for SyncedFolder service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type SyncedFolderClient interface { - Cleanup(ctx context.Context, in *CleanupRequest, opts ...grpc.CallOption) (*vagrant_common.EmptyResponse, error) - Disable(ctx context.Context, in *Request, opts ...grpc.CallOption) (*vagrant_common.EmptyResponse, error) - Enable(ctx context.Context, in *Request, opts ...grpc.CallOption) (*vagrant_common.EmptyResponse, error) - Info(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*InfoResponse, error) - IsUsable(ctx context.Context, in *vagrant_common.EmptyRequest, opts ...grpc.CallOption) (*vagrant_common.IsResponse, error) - Name(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*vagrant_common.NameResponse, error) - Prepare(ctx context.Context, in *Request, opts ...grpc.CallOption) (*vagrant_common.EmptyResponse, error) - // These are IO helpers for streaming - Read(ctx context.Context, in *vagrant_io.ReadRequest, opts ...grpc.CallOption) (*vagrant_io.ReadResponse, error) - Write(ctx context.Context, in *vagrant_io.WriteRequest, opts ...grpc.CallOption) (*vagrant_io.WriteResponse, error) - // Capabilities - GuestCapabilities(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*vagrant_caps.CapabilitiesResponse, error) - GuestCapability(ctx context.Context, in *vagrant_caps.GuestCapabilityRequest, opts ...grpc.CallOption) (*vagrant_caps.GuestCapabilityResponse, error) - HostCapabilities(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*vagrant_caps.CapabilitiesResponse, error) - HostCapability(ctx context.Context, in *vagrant_caps.HostCapabilityRequest, opts ...grpc.CallOption) (*vagrant_caps.HostCapabilityResponse, error) -} - -type syncedFolderClient struct { - cc *grpc.ClientConn -} - -func NewSyncedFolderClient(cc *grpc.ClientConn) SyncedFolderClient { - return &syncedFolderClient{cc} -} - -func (c *syncedFolderClient) Cleanup(ctx context.Context, in *CleanupRequest, opts ...grpc.CallOption) (*vagrant_common.EmptyResponse, error) { - out := new(vagrant_common.EmptyResponse) - err := c.cc.Invoke(ctx, "/vagrant.folder.SyncedFolder/Cleanup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *syncedFolderClient) Disable(ctx context.Context, in *Request, opts ...grpc.CallOption) (*vagrant_common.EmptyResponse, error) { - out := new(vagrant_common.EmptyResponse) - err := c.cc.Invoke(ctx, "/vagrant.folder.SyncedFolder/Disable", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *syncedFolderClient) Enable(ctx context.Context, in *Request, opts ...grpc.CallOption) (*vagrant_common.EmptyResponse, error) { - out := new(vagrant_common.EmptyResponse) - err := c.cc.Invoke(ctx, "/vagrant.folder.SyncedFolder/Enable", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *syncedFolderClient) Info(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*InfoResponse, error) { - out := new(InfoResponse) - err := c.cc.Invoke(ctx, "/vagrant.folder.SyncedFolder/Info", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *syncedFolderClient) IsUsable(ctx context.Context, in *vagrant_common.EmptyRequest, opts ...grpc.CallOption) (*vagrant_common.IsResponse, error) { - out := new(vagrant_common.IsResponse) - err := c.cc.Invoke(ctx, "/vagrant.folder.SyncedFolder/IsUsable", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *syncedFolderClient) Name(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*vagrant_common.NameResponse, error) { - out := new(vagrant_common.NameResponse) - err := c.cc.Invoke(ctx, "/vagrant.folder.SyncedFolder/Name", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *syncedFolderClient) Prepare(ctx context.Context, in *Request, opts ...grpc.CallOption) (*vagrant_common.EmptyResponse, error) { - out := new(vagrant_common.EmptyResponse) - err := c.cc.Invoke(ctx, "/vagrant.folder.SyncedFolder/Prepare", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *syncedFolderClient) Read(ctx context.Context, in *vagrant_io.ReadRequest, opts ...grpc.CallOption) (*vagrant_io.ReadResponse, error) { - out := new(vagrant_io.ReadResponse) - err := c.cc.Invoke(ctx, "/vagrant.folder.SyncedFolder/Read", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *syncedFolderClient) Write(ctx context.Context, in *vagrant_io.WriteRequest, opts ...grpc.CallOption) (*vagrant_io.WriteResponse, error) { - out := new(vagrant_io.WriteResponse) - err := c.cc.Invoke(ctx, "/vagrant.folder.SyncedFolder/Write", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *syncedFolderClient) GuestCapabilities(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*vagrant_caps.CapabilitiesResponse, error) { - out := new(vagrant_caps.CapabilitiesResponse) - err := c.cc.Invoke(ctx, "/vagrant.folder.SyncedFolder/GuestCapabilities", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *syncedFolderClient) GuestCapability(ctx context.Context, in *vagrant_caps.GuestCapabilityRequest, opts ...grpc.CallOption) (*vagrant_caps.GuestCapabilityResponse, error) { - out := new(vagrant_caps.GuestCapabilityResponse) - err := c.cc.Invoke(ctx, "/vagrant.folder.SyncedFolder/GuestCapability", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *syncedFolderClient) HostCapabilities(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*vagrant_caps.CapabilitiesResponse, error) { - out := new(vagrant_caps.CapabilitiesResponse) - err := c.cc.Invoke(ctx, "/vagrant.folder.SyncedFolder/HostCapabilities", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *syncedFolderClient) HostCapability(ctx context.Context, in *vagrant_caps.HostCapabilityRequest, opts ...grpc.CallOption) (*vagrant_caps.HostCapabilityResponse, error) { - out := new(vagrant_caps.HostCapabilityResponse) - err := c.cc.Invoke(ctx, "/vagrant.folder.SyncedFolder/HostCapability", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// SyncedFolderServer is the server API for SyncedFolder service. -type SyncedFolderServer interface { - Cleanup(context.Context, *CleanupRequest) (*vagrant_common.EmptyResponse, error) - Disable(context.Context, *Request) (*vagrant_common.EmptyResponse, error) - Enable(context.Context, *Request) (*vagrant_common.EmptyResponse, error) - Info(context.Context, *vagrant_common.NullRequest) (*InfoResponse, error) - IsUsable(context.Context, *vagrant_common.EmptyRequest) (*vagrant_common.IsResponse, error) - Name(context.Context, *vagrant_common.NullRequest) (*vagrant_common.NameResponse, error) - Prepare(context.Context, *Request) (*vagrant_common.EmptyResponse, error) - // These are IO helpers for streaming - Read(context.Context, *vagrant_io.ReadRequest) (*vagrant_io.ReadResponse, error) - Write(context.Context, *vagrant_io.WriteRequest) (*vagrant_io.WriteResponse, error) - // Capabilities - GuestCapabilities(context.Context, *vagrant_common.NullRequest) (*vagrant_caps.CapabilitiesResponse, error) - GuestCapability(context.Context, *vagrant_caps.GuestCapabilityRequest) (*vagrant_caps.GuestCapabilityResponse, error) - HostCapabilities(context.Context, *vagrant_common.NullRequest) (*vagrant_caps.CapabilitiesResponse, error) - HostCapability(context.Context, *vagrant_caps.HostCapabilityRequest) (*vagrant_caps.HostCapabilityResponse, error) -} - -func RegisterSyncedFolderServer(s *grpc.Server, srv SyncedFolderServer) { - s.RegisterService(&_SyncedFolder_serviceDesc, srv) -} - -func _SyncedFolder_Cleanup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CleanupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncedFolderServer).Cleanup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.folder.SyncedFolder/Cleanup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncedFolderServer).Cleanup(ctx, req.(*CleanupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SyncedFolder_Disable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncedFolderServer).Disable(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.folder.SyncedFolder/Disable", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncedFolderServer).Disable(ctx, req.(*Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _SyncedFolder_Enable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncedFolderServer).Enable(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.folder.SyncedFolder/Enable", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncedFolderServer).Enable(ctx, req.(*Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _SyncedFolder_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.NullRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncedFolderServer).Info(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.folder.SyncedFolder/Info", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncedFolderServer).Info(ctx, req.(*vagrant_common.NullRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SyncedFolder_IsUsable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.EmptyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncedFolderServer).IsUsable(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.folder.SyncedFolder/IsUsable", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncedFolderServer).IsUsable(ctx, req.(*vagrant_common.EmptyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SyncedFolder_Name_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.NullRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncedFolderServer).Name(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.folder.SyncedFolder/Name", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncedFolderServer).Name(ctx, req.(*vagrant_common.NullRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SyncedFolder_Prepare_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncedFolderServer).Prepare(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.folder.SyncedFolder/Prepare", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncedFolderServer).Prepare(ctx, req.(*Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _SyncedFolder_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_io.ReadRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncedFolderServer).Read(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.folder.SyncedFolder/Read", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncedFolderServer).Read(ctx, req.(*vagrant_io.ReadRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SyncedFolder_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_io.WriteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncedFolderServer).Write(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.folder.SyncedFolder/Write", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncedFolderServer).Write(ctx, req.(*vagrant_io.WriteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SyncedFolder_GuestCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.NullRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncedFolderServer).GuestCapabilities(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.folder.SyncedFolder/GuestCapabilities", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncedFolderServer).GuestCapabilities(ctx, req.(*vagrant_common.NullRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SyncedFolder_GuestCapability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_caps.GuestCapabilityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncedFolderServer).GuestCapability(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.folder.SyncedFolder/GuestCapability", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncedFolderServer).GuestCapability(ctx, req.(*vagrant_caps.GuestCapabilityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SyncedFolder_HostCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.NullRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncedFolderServer).HostCapabilities(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.folder.SyncedFolder/HostCapabilities", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncedFolderServer).HostCapabilities(ctx, req.(*vagrant_common.NullRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SyncedFolder_HostCapability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_caps.HostCapabilityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncedFolderServer).HostCapability(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.folder.SyncedFolder/HostCapability", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncedFolderServer).HostCapability(ctx, req.(*vagrant_caps.HostCapabilityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _SyncedFolder_serviceDesc = grpc.ServiceDesc{ - ServiceName: "vagrant.folder.SyncedFolder", - HandlerType: (*SyncedFolderServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Cleanup", - Handler: _SyncedFolder_Cleanup_Handler, - }, - { - MethodName: "Disable", - Handler: _SyncedFolder_Disable_Handler, - }, - { - MethodName: "Enable", - Handler: _SyncedFolder_Enable_Handler, - }, - { - MethodName: "Info", - Handler: _SyncedFolder_Info_Handler, - }, - { - MethodName: "IsUsable", - Handler: _SyncedFolder_IsUsable_Handler, - }, - { - MethodName: "Name", - Handler: _SyncedFolder_Name_Handler, - }, - { - MethodName: "Prepare", - Handler: _SyncedFolder_Prepare_Handler, - }, - { - MethodName: "Read", - Handler: _SyncedFolder_Read_Handler, - }, - { - MethodName: "Write", - Handler: _SyncedFolder_Write_Handler, - }, - { - MethodName: "GuestCapabilities", - Handler: _SyncedFolder_GuestCapabilities_Handler, - }, - { - MethodName: "GuestCapability", - Handler: _SyncedFolder_GuestCapability_Handler, - }, - { - MethodName: "HostCapabilities", - Handler: _SyncedFolder_HostCapabilities_Handler, - }, - { - MethodName: "HostCapability", - Handler: _SyncedFolder_HostCapability_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "vagrant_folder/synced_folder.proto", -} - -func init() { proto.RegisterFile("vagrant_folder/synced_folder.proto", fileDescriptor_8a01e482b349ecb1) } - -var fileDescriptor_8a01e482b349ecb1 = []byte{ - // 488 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x5f, 0x6f, 0xd3, 0x30, - 0x14, 0xc5, 0xb5, 0x3f, 0x2c, 0xe3, 0x32, 0x15, 0xf0, 0x0b, 0x21, 0x0c, 0x34, 0x95, 0x21, 0xf1, - 0x42, 0x22, 0xc1, 0x13, 0x12, 0x0f, 0x4c, 0xeb, 0x60, 0x95, 0xd0, 0x84, 0x52, 0xd0, 0x1e, 0x26, - 0x51, 0xb9, 0xa9, 0xd7, 0x5a, 0x4a, 0x6c, 0x63, 0x3b, 0x88, 0x7c, 0x48, 0xbe, 0x13, 0x4a, 0x6c, - 0x87, 0x38, 0x40, 0xa9, 0x58, 0x9f, 0xaa, 0x7b, 0xcf, 0x3d, 0x3f, 0x9f, 0xde, 0x38, 0x81, 0xe1, - 0x37, 0xbc, 0x90, 0x98, 0xe9, 0xe9, 0x35, 0xcf, 0xe7, 0x44, 0x26, 0xaa, 0x62, 0x19, 0x99, 0xdb, - 0x2a, 0x16, 0x92, 0x6b, 0x8e, 0x06, 0x76, 0x26, 0x36, 0xdd, 0xe8, 0x6a, 0x41, 0xf5, 0xb2, 0x9c, - 0xc5, 0x19, 0x2f, 0x92, 0x25, 0x56, 0x4b, 0x9a, 0x71, 0x29, 0x12, 0x3b, 0x94, 0x90, 0xef, 0x3a, - 0x59, 0xf0, 0x17, 0x22, 0x2f, 0x17, 0x94, 0xb5, 0x5d, 0x5b, 0x36, 0x40, 0xd7, 0x9c, 0x66, 0xbc, - 0x28, 0x38, 0x4b, 0xcc, 0x8f, 0x39, 0x2c, 0x9a, 0x6c, 0x0a, 0x4e, 0x79, 0x42, 0xb9, 0x85, 0x4e, - 0x37, 0x96, 0x18, 0x0b, 0x95, 0x64, 0x58, 0xe0, 0x19, 0xcd, 0xa9, 0xa6, 0x44, 0x99, 0x03, 0x86, - 0x97, 0x10, 0xa4, 0xe4, 0x6b, 0x49, 0x94, 0x46, 0x21, 0x04, 0x05, 0xce, 0x96, 0x94, 0x91, 0x70, - 0xeb, 0x68, 0xeb, 0xf9, 0xed, 0xd4, 0x95, 0xb5, 0x62, 0x36, 0xa8, 0xc2, 0x6d, 0xa3, 0xd8, 0xb2, - 0x56, 0xb8, 0xd0, 0x94, 0x33, 0x15, 0xee, 0x18, 0xc5, 0x96, 0xc3, 0x11, 0x0c, 0x4e, 0x73, 0x82, - 0x59, 0x29, 0xd6, 0xe2, 0x3b, 0xca, 0xb6, 0x4f, 0xf9, 0x00, 0x07, 0x63, 0x76, 0xcd, 0x53, 0xa2, - 0x04, 0x67, 0x8a, 0xa0, 0x23, 0xb8, 0x33, 0x27, 0x2a, 0x93, 0xb4, 0xd1, 0x2d, 0xa7, 0xdb, 0x42, - 0x11, 0xec, 0x0b, 0x49, 0xb9, 0xa4, 0xba, 0x6a, 0x60, 0x3b, 0x69, 0x5b, 0xbf, 0xfc, 0x11, 0xc0, - 0xc1, 0xa4, 0xb9, 0x27, 0xef, 0x9a, 0xfc, 0xe8, 0x1c, 0x02, 0x1b, 0x12, 0x3d, 0x89, 0xfd, 0xcb, - 0x12, 0xfb, 0xe9, 0xa3, 0xc7, 0xad, 0x6e, 0x9f, 0xfa, 0x59, 0x21, 0x74, 0xd5, 0x06, 0x3b, 0x81, - 0x60, 0x44, 0x15, 0x9e, 0xe5, 0x04, 0x3d, 0xe8, 0x93, 0xd6, 0x44, 0xbc, 0x85, 0xbd, 0x33, 0x76, - 0x23, 0xc2, 0x09, 0xec, 0xd6, 0xdb, 0x42, 0x8f, 0xfa, 0x63, 0x17, 0x65, 0x9e, 0x3b, 0xc6, 0x61, - 0x1f, 0xee, 0x2d, 0x78, 0x04, 0xfb, 0x63, 0xf5, 0xd9, 0xfc, 0x91, 0xc3, 0xbf, 0x9c, 0x66, 0x38, - 0x51, 0x5f, 0x1d, 0xab, 0x6e, 0x90, 0x0b, 0x5c, 0x90, 0x75, 0x83, 0x38, 0x11, 0x17, 0xa4, 0xbb, - 0xd0, 0x8f, 0x92, 0x08, 0x2c, 0xff, 0x7f, 0x1d, 0xaf, 0x61, 0x37, 0x25, 0x78, 0xde, 0xf1, 0x53, - 0x1e, 0xd7, 0x1d, 0xe7, 0x0f, 0x7f, 0x17, 0xac, 0xf5, 0x0d, 0xdc, 0xba, 0x94, 0x54, 0x13, 0xe4, - 0x8d, 0x34, 0x2d, 0x67, 0x7e, 0xf8, 0x07, 0xc5, 0xba, 0x3f, 0xc1, 0xfd, 0xf7, 0xf5, 0xcc, 0x69, - 0xe7, 0x7d, 0x5b, 0xbd, 0x8b, 0xe1, 0x2f, 0x11, 0x0b, 0x15, 0x77, 0x8d, 0x2d, 0xf5, 0x0b, 0xdc, - 0xf5, 0xa9, 0x15, 0x3a, 0xf6, 0x6d, 0x3d, 0xd9, 0xc1, 0x9f, 0xfd, 0x63, 0xca, 0xf2, 0x27, 0x70, - 0xef, 0x9c, 0x6f, 0x3a, 0xf4, 0x15, 0x0c, 0x3c, 0x68, 0x85, 0x9e, 0xfa, 0x2e, 0x5f, 0x75, 0xe8, - 0xe3, 0xd5, 0x43, 0x06, 0x3e, 0xdb, 0x6b, 0xbe, 0x61, 0xaf, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, - 0x89, 0x36, 0xb1, 0x5c, 0x0c, 0x06, 0x00, 0x00, -} diff --git a/ext/go-plugin/vagrant/plugin/proto/vagrant_folder/synced_folder.proto b/ext/go-plugin/vagrant/plugin/proto/vagrant_folder/synced_folder.proto deleted file mode 100644 index e192cab0a..000000000 --- a/ext/go-plugin/vagrant/plugin/proto/vagrant_folder/synced_folder.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; -package vagrant.folder; - -import "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_common/common.proto"; -import "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_io/io.proto"; -import "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_caps/capabilities.proto"; - -message Request { - string machine = 1; - string folders = 2; - string options = 3; -} - -message CleanupRequest { - string machine = 1; - string options = 2; -} - -message InfoResponse { - string description = 1; - int64 priority = 2; -} - -service SyncedFolder { - rpc Cleanup(CleanupRequest) returns (vagrant.common.EmptyResponse); - rpc Disable(Request) returns (vagrant.common.EmptyResponse); - rpc Enable(Request) returns (vagrant.common.EmptyResponse); - rpc Info(vagrant.common.NullRequest) returns (InfoResponse); - rpc IsUsable(vagrant.common.EmptyRequest) returns (vagrant.common.IsResponse); - rpc Name(vagrant.common.NullRequest) returns (vagrant.common.NameResponse); - rpc Prepare(Request) returns (vagrant.common.EmptyResponse); - // These are IO helpers for streaming - rpc Read(vagrant.io.ReadRequest) returns (vagrant.io.ReadResponse); - rpc Write(vagrant.io.WriteRequest) returns (vagrant.io.WriteResponse); - // Capabilities - rpc GuestCapabilities(vagrant.common.NullRequest) returns (vagrant.caps.CapabilitiesResponse); - rpc GuestCapability(vagrant.caps.GuestCapabilityRequest) returns (vagrant.caps.GuestCapabilityResponse); - rpc HostCapabilities(vagrant.common.NullRequest) returns (vagrant.caps.CapabilitiesResponse); - rpc HostCapability(vagrant.caps.HostCapabilityRequest) returns (vagrant.caps.HostCapabilityResponse); -} \ No newline at end of file diff --git a/ext/go-plugin/vagrant/plugin/proto/vagrant_io/io.pb.go b/ext/go-plugin/vagrant/plugin/proto/vagrant_io/io.pb.go deleted file mode 100644 index 2793c66fa..000000000 --- a/ext/go-plugin/vagrant/plugin/proto/vagrant_io/io.pb.go +++ /dev/null @@ -1,332 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: vagrant_io/io.proto - -package vagrant_io - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type ReadRequest struct { - Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ReadRequest) Reset() { *m = ReadRequest{} } -func (m *ReadRequest) String() string { return proto.CompactTextString(m) } -func (*ReadRequest) ProtoMessage() {} -func (*ReadRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d46affeac7affd9e, []int{0} -} -func (m *ReadRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ReadRequest.Unmarshal(m, b) -} -func (m *ReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ReadRequest.Marshal(b, m, deterministic) -} -func (m *ReadRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReadRequest.Merge(m, src) -} -func (m *ReadRequest) XXX_Size() int { - return xxx_messageInfo_ReadRequest.Size(m) -} -func (m *ReadRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ReadRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ReadRequest proto.InternalMessageInfo - -func (m *ReadRequest) GetTarget() string { - if m != nil { - return m.Target - } - return "" -} - -type ReadResponse struct { - Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ReadResponse) Reset() { *m = ReadResponse{} } -func (m *ReadResponse) String() string { return proto.CompactTextString(m) } -func (*ReadResponse) ProtoMessage() {} -func (*ReadResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d46affeac7affd9e, []int{1} -} -func (m *ReadResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ReadResponse.Unmarshal(m, b) -} -func (m *ReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ReadResponse.Marshal(b, m, deterministic) -} -func (m *ReadResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReadResponse.Merge(m, src) -} -func (m *ReadResponse) XXX_Size() int { - return xxx_messageInfo_ReadResponse.Size(m) -} -func (m *ReadResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ReadResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ReadResponse proto.InternalMessageInfo - -func (m *ReadResponse) GetContent() string { - if m != nil { - return m.Content - } - return "" -} - -func (m *ReadResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -type WriteRequest struct { - Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` - Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WriteRequest) Reset() { *m = WriteRequest{} } -func (m *WriteRequest) String() string { return proto.CompactTextString(m) } -func (*WriteRequest) ProtoMessage() {} -func (*WriteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d46affeac7affd9e, []int{2} -} -func (m *WriteRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WriteRequest.Unmarshal(m, b) -} -func (m *WriteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WriteRequest.Marshal(b, m, deterministic) -} -func (m *WriteRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_WriteRequest.Merge(m, src) -} -func (m *WriteRequest) XXX_Size() int { - return xxx_messageInfo_WriteRequest.Size(m) -} -func (m *WriteRequest) XXX_DiscardUnknown() { - xxx_messageInfo_WriteRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_WriteRequest proto.InternalMessageInfo - -func (m *WriteRequest) GetContent() string { - if m != nil { - return m.Content - } - return "" -} - -func (m *WriteRequest) GetTarget() string { - if m != nil { - return m.Target - } - return "" -} - -type WriteResponse struct { - Length int32 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WriteResponse) Reset() { *m = WriteResponse{} } -func (m *WriteResponse) String() string { return proto.CompactTextString(m) } -func (*WriteResponse) ProtoMessage() {} -func (*WriteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d46affeac7affd9e, []int{3} -} -func (m *WriteResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WriteResponse.Unmarshal(m, b) -} -func (m *WriteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WriteResponse.Marshal(b, m, deterministic) -} -func (m *WriteResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_WriteResponse.Merge(m, src) -} -func (m *WriteResponse) XXX_Size() int { - return xxx_messageInfo_WriteResponse.Size(m) -} -func (m *WriteResponse) XXX_DiscardUnknown() { - xxx_messageInfo_WriteResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_WriteResponse proto.InternalMessageInfo - -func (m *WriteResponse) GetLength() int32 { - if m != nil { - return m.Length - } - return 0 -} - -func (m *WriteResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -func init() { - proto.RegisterType((*ReadRequest)(nil), "vagrant.io.ReadRequest") - proto.RegisterType((*ReadResponse)(nil), "vagrant.io.ReadResponse") - proto.RegisterType((*WriteRequest)(nil), "vagrant.io.WriteRequest") - proto.RegisterType((*WriteResponse)(nil), "vagrant.io.WriteResponse") -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// IOClient is the client API for IO service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type IOClient interface { - Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) - Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error) -} - -type iOClient struct { - cc *grpc.ClientConn -} - -func NewIOClient(cc *grpc.ClientConn) IOClient { - return &iOClient{cc} -} - -func (c *iOClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) { - out := new(ReadResponse) - err := c.cc.Invoke(ctx, "/vagrant.io.IO/Read", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *iOClient) Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error) { - out := new(WriteResponse) - err := c.cc.Invoke(ctx, "/vagrant.io.IO/Write", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// IOServer is the server API for IO service. -type IOServer interface { - Read(context.Context, *ReadRequest) (*ReadResponse, error) - Write(context.Context, *WriteRequest) (*WriteResponse, error) -} - -func RegisterIOServer(s *grpc.Server, srv IOServer) { - s.RegisterService(&_IO_serviceDesc, srv) -} - -func _IO_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReadRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IOServer).Read(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.io.IO/Read", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IOServer).Read(ctx, req.(*ReadRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _IO_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(WriteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IOServer).Write(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.io.IO/Write", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IOServer).Write(ctx, req.(*WriteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _IO_serviceDesc = grpc.ServiceDesc{ - ServiceName: "vagrant.io.IO", - HandlerType: (*IOServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Read", - Handler: _IO_Read_Handler, - }, - { - MethodName: "Write", - Handler: _IO_Write_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "vagrant_io/io.proto", -} - -func init() { proto.RegisterFile("vagrant_io/io.proto", fileDescriptor_d46affeac7affd9e) } - -var fileDescriptor_d46affeac7affd9e = []byte{ - // 219 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2e, 0x4b, 0x4c, 0x2f, - 0x4a, 0xcc, 0x2b, 0x89, 0xcf, 0xcc, 0xd7, 0xcf, 0xcc, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, - 0xe2, 0x82, 0x0a, 0xea, 0x65, 0xe6, 0x2b, 0xa9, 0x72, 0x71, 0x07, 0xa5, 0x26, 0xa6, 0x04, 0xa5, - 0x16, 0x96, 0xa6, 0x16, 0x97, 0x08, 0x89, 0x71, 0xb1, 0x95, 0x24, 0x16, 0xa5, 0xa7, 0x96, 0x48, - 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x41, 0x79, 0x4a, 0x76, 0x5c, 0x3c, 0x10, 0x65, 0xc5, 0x05, - 0xf9, 0x79, 0xc5, 0xa9, 0x42, 0x12, 0x5c, 0xec, 0xc9, 0xf9, 0x79, 0x25, 0xa9, 0x79, 0x30, 0x85, - 0x30, 0xae, 0x90, 0x08, 0x17, 0x6b, 0x6a, 0x51, 0x51, 0x7e, 0x91, 0x04, 0x13, 0x58, 0x1c, 0xc2, - 0x51, 0x72, 0xe0, 0xe2, 0x09, 0x2f, 0xca, 0x2c, 0x49, 0x85, 0xd9, 0x83, 0x5b, 0x3f, 0xc2, 0x05, - 0x4c, 0x28, 0x2e, 0xb0, 0xe5, 0xe2, 0x85, 0x9a, 0x00, 0x75, 0x82, 0x18, 0x17, 0x5b, 0x4e, 0x6a, - 0x5e, 0x7a, 0x49, 0x06, 0xd8, 0x04, 0xd6, 0x20, 0x28, 0x0f, 0xbb, 0x03, 0x8c, 0x6a, 0xb9, 0x98, - 0x3c, 0xfd, 0x85, 0x2c, 0xb9, 0x58, 0x40, 0xde, 0x10, 0x12, 0xd7, 0x43, 0x04, 0x81, 0x1e, 0x92, - 0xff, 0xa5, 0x24, 0x30, 0x25, 0xa0, 0xd6, 0xd9, 0x70, 0xb1, 0x82, 0xed, 0x17, 0x42, 0x51, 0x82, - 0xec, 0x29, 0x29, 0x49, 0x2c, 0x32, 0x10, 0xdd, 0x49, 0x6c, 0xe0, 0x90, 0x37, 0x06, 0x04, 0x00, - 0x00, 0xff, 0xff, 0x47, 0x7e, 0x0b, 0xe4, 0x90, 0x01, 0x00, 0x00, -} diff --git a/ext/go-plugin/vagrant/plugin/proto/vagrant_io/io.proto b/ext/go-plugin/vagrant/plugin/proto/vagrant_io/io.proto deleted file mode 100644 index b61b503bf..000000000 --- a/ext/go-plugin/vagrant/plugin/proto/vagrant_io/io.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; -package vagrant.io; - -message ReadRequest { - string target = 1; -} - -message ReadResponse { - string content = 1; - string error = 2; -} - -message WriteRequest { - string content = 1; - string target = 2; -} - -message WriteResponse { - int32 length = 1; - string error = 2; -} - -service IO { - rpc Read(ReadRequest) returns (ReadResponse); - rpc Write(WriteRequest) returns (WriteResponse); -} \ No newline at end of file diff --git a/ext/go-plugin/vagrant/plugin/proto/vagrant_provider/provider.pb.go b/ext/go-plugin/vagrant/plugin/proto/vagrant_provider/provider.pb.go deleted file mode 100644 index 50cd4e580..000000000 --- a/ext/go-plugin/vagrant/plugin/proto/vagrant_provider/provider.pb.go +++ /dev/null @@ -1,1212 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: vagrant_provider/provider.proto - -package vagrant_provider - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import vagrant_caps "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_caps" -import vagrant_common "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_common" -import vagrant_config "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_config" -import vagrant_io "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_io" - -import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type ActionRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Machine string `protobuf:"bytes,2,opt,name=machine,proto3" json:"machine,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ActionRequest) Reset() { *m = ActionRequest{} } -func (m *ActionRequest) String() string { return proto.CompactTextString(m) } -func (*ActionRequest) ProtoMessage() {} -func (*ActionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_28396c8d66e1a9b4, []int{0} -} -func (m *ActionRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ActionRequest.Unmarshal(m, b) -} -func (m *ActionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ActionRequest.Marshal(b, m, deterministic) -} -func (m *ActionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActionRequest.Merge(m, src) -} -func (m *ActionRequest) XXX_Size() int { - return xxx_messageInfo_ActionRequest.Size(m) -} -func (m *ActionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ActionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ActionRequest proto.InternalMessageInfo - -func (m *ActionRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *ActionRequest) GetMachine() string { - if m != nil { - return m.Machine - } - return "" -} - -type ActionResponse struct { - Result []string `protobuf:"bytes,1,rep,name=result,proto3" json:"result,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ActionResponse) Reset() { *m = ActionResponse{} } -func (m *ActionResponse) String() string { return proto.CompactTextString(m) } -func (*ActionResponse) ProtoMessage() {} -func (*ActionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_28396c8d66e1a9b4, []int{1} -} -func (m *ActionResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ActionResponse.Unmarshal(m, b) -} -func (m *ActionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ActionResponse.Marshal(b, m, deterministic) -} -func (m *ActionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActionResponse.Merge(m, src) -} -func (m *ActionResponse) XXX_Size() int { - return xxx_messageInfo_ActionResponse.Size(m) -} -func (m *ActionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ActionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ActionResponse proto.InternalMessageInfo - -func (m *ActionResponse) GetResult() []string { - if m != nil { - return m.Result - } - return nil -} - -func (m *ActionResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -type InfoResponse struct { - Capabilities []string `protobuf:"bytes,1,rep,name=capabilities,proto3" json:"capabilities,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Priority int64 `protobuf:"varint,3,opt,name=priority,proto3" json:"priority,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *InfoResponse) Reset() { *m = InfoResponse{} } -func (m *InfoResponse) String() string { return proto.CompactTextString(m) } -func (*InfoResponse) ProtoMessage() {} -func (*InfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_28396c8d66e1a9b4, []int{2} -} -func (m *InfoResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InfoResponse.Unmarshal(m, b) -} -func (m *InfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InfoResponse.Marshal(b, m, deterministic) -} -func (m *InfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_InfoResponse.Merge(m, src) -} -func (m *InfoResponse) XXX_Size() int { - return xxx_messageInfo_InfoResponse.Size(m) -} -func (m *InfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_InfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_InfoResponse proto.InternalMessageInfo - -func (m *InfoResponse) GetCapabilities() []string { - if m != nil { - return m.Capabilities - } - return nil -} - -func (m *InfoResponse) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *InfoResponse) GetPriority() int64 { - if m != nil { - return m.Priority - } - return 0 -} - -type RunActionRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Machine string `protobuf:"bytes,3,opt,name=machine,proto3" json:"machine,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RunActionRequest) Reset() { *m = RunActionRequest{} } -func (m *RunActionRequest) String() string { return proto.CompactTextString(m) } -func (*RunActionRequest) ProtoMessage() {} -func (*RunActionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_28396c8d66e1a9b4, []int{3} -} -func (m *RunActionRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RunActionRequest.Unmarshal(m, b) -} -func (m *RunActionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RunActionRequest.Marshal(b, m, deterministic) -} -func (m *RunActionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RunActionRequest.Merge(m, src) -} -func (m *RunActionRequest) XXX_Size() int { - return xxx_messageInfo_RunActionRequest.Size(m) -} -func (m *RunActionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RunActionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_RunActionRequest proto.InternalMessageInfo - -func (m *RunActionRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *RunActionRequest) GetData() string { - if m != nil { - return m.Data - } - return "" -} - -func (m *RunActionRequest) GetMachine() string { - if m != nil { - return m.Machine - } - return "" -} - -type RunActionResponse struct { - Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RunActionResponse) Reset() { *m = RunActionResponse{} } -func (m *RunActionResponse) String() string { return proto.CompactTextString(m) } -func (*RunActionResponse) ProtoMessage() {} -func (*RunActionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_28396c8d66e1a9b4, []int{4} -} -func (m *RunActionResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RunActionResponse.Unmarshal(m, b) -} -func (m *RunActionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RunActionResponse.Marshal(b, m, deterministic) -} -func (m *RunActionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RunActionResponse.Merge(m, src) -} -func (m *RunActionResponse) XXX_Size() int { - return xxx_messageInfo_RunActionResponse.Size(m) -} -func (m *RunActionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RunActionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_RunActionResponse proto.InternalMessageInfo - -func (m *RunActionResponse) GetData() string { - if m != nil { - return m.Data - } - return "" -} - -func (m *RunActionResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -type SshInfoResponse struct { - Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` - Port int64 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` - PrivateKeyPath string `protobuf:"bytes,3,opt,name=private_key_path,json=privateKeyPath,proto3" json:"private_key_path,omitempty"` - Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` - Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SshInfoResponse) Reset() { *m = SshInfoResponse{} } -func (m *SshInfoResponse) String() string { return proto.CompactTextString(m) } -func (*SshInfoResponse) ProtoMessage() {} -func (*SshInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_28396c8d66e1a9b4, []int{5} -} -func (m *SshInfoResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SshInfoResponse.Unmarshal(m, b) -} -func (m *SshInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SshInfoResponse.Marshal(b, m, deterministic) -} -func (m *SshInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SshInfoResponse.Merge(m, src) -} -func (m *SshInfoResponse) XXX_Size() int { - return xxx_messageInfo_SshInfoResponse.Size(m) -} -func (m *SshInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SshInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SshInfoResponse proto.InternalMessageInfo - -func (m *SshInfoResponse) GetHost() string { - if m != nil { - return m.Host - } - return "" -} - -func (m *SshInfoResponse) GetPort() int64 { - if m != nil { - return m.Port - } - return 0 -} - -func (m *SshInfoResponse) GetPrivateKeyPath() string { - if m != nil { - return m.PrivateKeyPath - } - return "" -} - -func (m *SshInfoResponse) GetUsername() string { - if m != nil { - return m.Username - } - return "" -} - -func (m *SshInfoResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -type StateResponse struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ShortDescription string `protobuf:"bytes,2,opt,name=short_description,json=shortDescription,proto3" json:"short_description,omitempty"` - LongDescription string `protobuf:"bytes,3,opt,name=long_description,json=longDescription,proto3" json:"long_description,omitempty"` - Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *StateResponse) Reset() { *m = StateResponse{} } -func (m *StateResponse) String() string { return proto.CompactTextString(m) } -func (*StateResponse) ProtoMessage() {} -func (*StateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_28396c8d66e1a9b4, []int{6} -} -func (m *StateResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StateResponse.Unmarshal(m, b) -} -func (m *StateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StateResponse.Marshal(b, m, deterministic) -} -func (m *StateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_StateResponse.Merge(m, src) -} -func (m *StateResponse) XXX_Size() int { - return xxx_messageInfo_StateResponse.Size(m) -} -func (m *StateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_StateResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_StateResponse proto.InternalMessageInfo - -func (m *StateResponse) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *StateResponse) GetShortDescription() string { - if m != nil { - return m.ShortDescription - } - return "" -} - -func (m *StateResponse) GetLongDescription() string { - if m != nil { - return m.LongDescription - } - return "" -} - -func (m *StateResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -func init() { - proto.RegisterType((*ActionRequest)(nil), "vagrant.provider.ActionRequest") - proto.RegisterType((*ActionResponse)(nil), "vagrant.provider.ActionResponse") - proto.RegisterType((*InfoResponse)(nil), "vagrant.provider.InfoResponse") - proto.RegisterType((*RunActionRequest)(nil), "vagrant.provider.RunActionRequest") - proto.RegisterType((*RunActionResponse)(nil), "vagrant.provider.RunActionResponse") - proto.RegisterType((*SshInfoResponse)(nil), "vagrant.provider.SshInfoResponse") - proto.RegisterType((*StateResponse)(nil), "vagrant.provider.StateResponse") -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ProviderClient is the client API for Provider service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ProviderClient interface { - Action(ctx context.Context, in *ActionRequest, opts ...grpc.CallOption) (*ActionResponse, error) - Info(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*InfoResponse, error) - IsInstalled(ctx context.Context, in *vagrant_common.EmptyRequest, opts ...grpc.CallOption) (*vagrant_common.IsResponse, error) - IsUsable(ctx context.Context, in *vagrant_common.EmptyRequest, opts ...grpc.CallOption) (*vagrant_common.IsResponse, error) - MachineIdChanged(ctx context.Context, in *vagrant_common.EmptyRequest, opts ...grpc.CallOption) (*vagrant_common.EmptyResponse, error) - Name(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*vagrant_common.NameResponse, error) - RunAction(ctx context.Context, in *RunActionRequest, opts ...grpc.CallOption) (*RunActionResponse, error) - SshInfo(ctx context.Context, in *vagrant_common.EmptyRequest, opts ...grpc.CallOption) (*SshInfoResponse, error) - State(ctx context.Context, in *vagrant_common.EmptyRequest, opts ...grpc.CallOption) (*StateResponse, error) - // These are IO helpers for streaming - Read(ctx context.Context, in *vagrant_io.ReadRequest, opts ...grpc.CallOption) (*vagrant_io.ReadResponse, error) - Write(ctx context.Context, in *vagrant_io.WriteRequest, opts ...grpc.CallOption) (*vagrant_io.WriteResponse, error) - // These are Config helpers - ConfigAttributes(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*vagrant_config.AttributesResponse, error) - ConfigLoad(ctx context.Context, in *vagrant_config.LoadRequest, opts ...grpc.CallOption) (*vagrant_config.LoadResponse, error) - ConfigValidate(ctx context.Context, in *vagrant_config.ValidateRequest, opts ...grpc.CallOption) (*vagrant_config.ValidateResponse, error) - ConfigFinalize(ctx context.Context, in *vagrant_config.FinalizeRequest, opts ...grpc.CallOption) (*vagrant_config.FinalizeResponse, error) - // Capabilities - GuestCapabilities(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*vagrant_caps.CapabilitiesResponse, error) - GuestCapability(ctx context.Context, in *vagrant_caps.GuestCapabilityRequest, opts ...grpc.CallOption) (*vagrant_caps.GuestCapabilityResponse, error) - HostCapabilities(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*vagrant_caps.CapabilitiesResponse, error) - HostCapability(ctx context.Context, in *vagrant_caps.HostCapabilityRequest, opts ...grpc.CallOption) (*vagrant_caps.HostCapabilityResponse, error) - ProviderCapabilities(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*vagrant_caps.ProviderCapabilitiesResponse, error) - ProviderCapability(ctx context.Context, in *vagrant_caps.ProviderCapabilityRequest, opts ...grpc.CallOption) (*vagrant_caps.ProviderCapabilityResponse, error) -} - -type providerClient struct { - cc *grpc.ClientConn -} - -func NewProviderClient(cc *grpc.ClientConn) ProviderClient { - return &providerClient{cc} -} - -func (c *providerClient) Action(ctx context.Context, in *ActionRequest, opts ...grpc.CallOption) (*ActionResponse, error) { - out := new(ActionResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/Action", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) Info(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*InfoResponse, error) { - out := new(InfoResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/Info", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) IsInstalled(ctx context.Context, in *vagrant_common.EmptyRequest, opts ...grpc.CallOption) (*vagrant_common.IsResponse, error) { - out := new(vagrant_common.IsResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/IsInstalled", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) IsUsable(ctx context.Context, in *vagrant_common.EmptyRequest, opts ...grpc.CallOption) (*vagrant_common.IsResponse, error) { - out := new(vagrant_common.IsResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/IsUsable", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) MachineIdChanged(ctx context.Context, in *vagrant_common.EmptyRequest, opts ...grpc.CallOption) (*vagrant_common.EmptyResponse, error) { - out := new(vagrant_common.EmptyResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/MachineIdChanged", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) Name(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*vagrant_common.NameResponse, error) { - out := new(vagrant_common.NameResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/Name", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) RunAction(ctx context.Context, in *RunActionRequest, opts ...grpc.CallOption) (*RunActionResponse, error) { - out := new(RunActionResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/RunAction", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) SshInfo(ctx context.Context, in *vagrant_common.EmptyRequest, opts ...grpc.CallOption) (*SshInfoResponse, error) { - out := new(SshInfoResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/SshInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) State(ctx context.Context, in *vagrant_common.EmptyRequest, opts ...grpc.CallOption) (*StateResponse, error) { - out := new(StateResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/State", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) Read(ctx context.Context, in *vagrant_io.ReadRequest, opts ...grpc.CallOption) (*vagrant_io.ReadResponse, error) { - out := new(vagrant_io.ReadResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/Read", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) Write(ctx context.Context, in *vagrant_io.WriteRequest, opts ...grpc.CallOption) (*vagrant_io.WriteResponse, error) { - out := new(vagrant_io.WriteResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/Write", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) ConfigAttributes(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*vagrant_config.AttributesResponse, error) { - out := new(vagrant_config.AttributesResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/ConfigAttributes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) ConfigLoad(ctx context.Context, in *vagrant_config.LoadRequest, opts ...grpc.CallOption) (*vagrant_config.LoadResponse, error) { - out := new(vagrant_config.LoadResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/ConfigLoad", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) ConfigValidate(ctx context.Context, in *vagrant_config.ValidateRequest, opts ...grpc.CallOption) (*vagrant_config.ValidateResponse, error) { - out := new(vagrant_config.ValidateResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/ConfigValidate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) ConfigFinalize(ctx context.Context, in *vagrant_config.FinalizeRequest, opts ...grpc.CallOption) (*vagrant_config.FinalizeResponse, error) { - out := new(vagrant_config.FinalizeResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/ConfigFinalize", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) GuestCapabilities(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*vagrant_caps.CapabilitiesResponse, error) { - out := new(vagrant_caps.CapabilitiesResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/GuestCapabilities", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) GuestCapability(ctx context.Context, in *vagrant_caps.GuestCapabilityRequest, opts ...grpc.CallOption) (*vagrant_caps.GuestCapabilityResponse, error) { - out := new(vagrant_caps.GuestCapabilityResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/GuestCapability", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) HostCapabilities(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*vagrant_caps.CapabilitiesResponse, error) { - out := new(vagrant_caps.CapabilitiesResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/HostCapabilities", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) HostCapability(ctx context.Context, in *vagrant_caps.HostCapabilityRequest, opts ...grpc.CallOption) (*vagrant_caps.HostCapabilityResponse, error) { - out := new(vagrant_caps.HostCapabilityResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/HostCapability", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) ProviderCapabilities(ctx context.Context, in *vagrant_common.NullRequest, opts ...grpc.CallOption) (*vagrant_caps.ProviderCapabilitiesResponse, error) { - out := new(vagrant_caps.ProviderCapabilitiesResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/ProviderCapabilities", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *providerClient) ProviderCapability(ctx context.Context, in *vagrant_caps.ProviderCapabilityRequest, opts ...grpc.CallOption) (*vagrant_caps.ProviderCapabilityResponse, error) { - out := new(vagrant_caps.ProviderCapabilityResponse) - err := c.cc.Invoke(ctx, "/vagrant.provider.Provider/ProviderCapability", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ProviderServer is the server API for Provider service. -type ProviderServer interface { - Action(context.Context, *ActionRequest) (*ActionResponse, error) - Info(context.Context, *vagrant_common.NullRequest) (*InfoResponse, error) - IsInstalled(context.Context, *vagrant_common.EmptyRequest) (*vagrant_common.IsResponse, error) - IsUsable(context.Context, *vagrant_common.EmptyRequest) (*vagrant_common.IsResponse, error) - MachineIdChanged(context.Context, *vagrant_common.EmptyRequest) (*vagrant_common.EmptyResponse, error) - Name(context.Context, *vagrant_common.NullRequest) (*vagrant_common.NameResponse, error) - RunAction(context.Context, *RunActionRequest) (*RunActionResponse, error) - SshInfo(context.Context, *vagrant_common.EmptyRequest) (*SshInfoResponse, error) - State(context.Context, *vagrant_common.EmptyRequest) (*StateResponse, error) - // These are IO helpers for streaming - Read(context.Context, *vagrant_io.ReadRequest) (*vagrant_io.ReadResponse, error) - Write(context.Context, *vagrant_io.WriteRequest) (*vagrant_io.WriteResponse, error) - // These are Config helpers - ConfigAttributes(context.Context, *vagrant_common.NullRequest) (*vagrant_config.AttributesResponse, error) - ConfigLoad(context.Context, *vagrant_config.LoadRequest) (*vagrant_config.LoadResponse, error) - ConfigValidate(context.Context, *vagrant_config.ValidateRequest) (*vagrant_config.ValidateResponse, error) - ConfigFinalize(context.Context, *vagrant_config.FinalizeRequest) (*vagrant_config.FinalizeResponse, error) - // Capabilities - GuestCapabilities(context.Context, *vagrant_common.NullRequest) (*vagrant_caps.CapabilitiesResponse, error) - GuestCapability(context.Context, *vagrant_caps.GuestCapabilityRequest) (*vagrant_caps.GuestCapabilityResponse, error) - HostCapabilities(context.Context, *vagrant_common.NullRequest) (*vagrant_caps.CapabilitiesResponse, error) - HostCapability(context.Context, *vagrant_caps.HostCapabilityRequest) (*vagrant_caps.HostCapabilityResponse, error) - ProviderCapabilities(context.Context, *vagrant_common.NullRequest) (*vagrant_caps.ProviderCapabilitiesResponse, error) - ProviderCapability(context.Context, *vagrant_caps.ProviderCapabilityRequest) (*vagrant_caps.ProviderCapabilityResponse, error) -} - -func RegisterProviderServer(s *grpc.Server, srv ProviderServer) { - s.RegisterService(&_Provider_serviceDesc, srv) -} - -func _Provider_Action_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ActionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).Action(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/Action", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).Action(ctx, req.(*ActionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.NullRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).Info(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/Info", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).Info(ctx, req.(*vagrant_common.NullRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_IsInstalled_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.EmptyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).IsInstalled(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/IsInstalled", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).IsInstalled(ctx, req.(*vagrant_common.EmptyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_IsUsable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.EmptyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).IsUsable(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/IsUsable", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).IsUsable(ctx, req.(*vagrant_common.EmptyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_MachineIdChanged_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.EmptyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).MachineIdChanged(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/MachineIdChanged", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).MachineIdChanged(ctx, req.(*vagrant_common.EmptyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_Name_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.NullRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).Name(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/Name", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).Name(ctx, req.(*vagrant_common.NullRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_RunAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RunActionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).RunAction(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/RunAction", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).RunAction(ctx, req.(*RunActionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_SshInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.EmptyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).SshInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/SshInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).SshInfo(ctx, req.(*vagrant_common.EmptyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_State_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.EmptyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).State(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/State", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).State(ctx, req.(*vagrant_common.EmptyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_io.ReadRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).Read(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/Read", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).Read(ctx, req.(*vagrant_io.ReadRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_io.WriteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).Write(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/Write", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).Write(ctx, req.(*vagrant_io.WriteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_ConfigAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.NullRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).ConfigAttributes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/ConfigAttributes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).ConfigAttributes(ctx, req.(*vagrant_common.NullRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_ConfigLoad_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_config.LoadRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).ConfigLoad(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/ConfigLoad", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).ConfigLoad(ctx, req.(*vagrant_config.LoadRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_ConfigValidate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_config.ValidateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).ConfigValidate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/ConfigValidate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).ConfigValidate(ctx, req.(*vagrant_config.ValidateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_ConfigFinalize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_config.FinalizeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).ConfigFinalize(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/ConfigFinalize", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).ConfigFinalize(ctx, req.(*vagrant_config.FinalizeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_GuestCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.NullRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).GuestCapabilities(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/GuestCapabilities", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).GuestCapabilities(ctx, req.(*vagrant_common.NullRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_GuestCapability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_caps.GuestCapabilityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).GuestCapability(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/GuestCapability", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).GuestCapability(ctx, req.(*vagrant_caps.GuestCapabilityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_HostCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.NullRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).HostCapabilities(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/HostCapabilities", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).HostCapabilities(ctx, req.(*vagrant_common.NullRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_HostCapability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_caps.HostCapabilityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).HostCapability(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/HostCapability", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).HostCapability(ctx, req.(*vagrant_caps.HostCapabilityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_ProviderCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_common.NullRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).ProviderCapabilities(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/ProviderCapabilities", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).ProviderCapabilities(ctx, req.(*vagrant_common.NullRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Provider_ProviderCapability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(vagrant_caps.ProviderCapabilityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProviderServer).ProviderCapability(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/vagrant.provider.Provider/ProviderCapability", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProviderServer).ProviderCapability(ctx, req.(*vagrant_caps.ProviderCapabilityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Provider_serviceDesc = grpc.ServiceDesc{ - ServiceName: "vagrant.provider.Provider", - HandlerType: (*ProviderServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Action", - Handler: _Provider_Action_Handler, - }, - { - MethodName: "Info", - Handler: _Provider_Info_Handler, - }, - { - MethodName: "IsInstalled", - Handler: _Provider_IsInstalled_Handler, - }, - { - MethodName: "IsUsable", - Handler: _Provider_IsUsable_Handler, - }, - { - MethodName: "MachineIdChanged", - Handler: _Provider_MachineIdChanged_Handler, - }, - { - MethodName: "Name", - Handler: _Provider_Name_Handler, - }, - { - MethodName: "RunAction", - Handler: _Provider_RunAction_Handler, - }, - { - MethodName: "SshInfo", - Handler: _Provider_SshInfo_Handler, - }, - { - MethodName: "State", - Handler: _Provider_State_Handler, - }, - { - MethodName: "Read", - Handler: _Provider_Read_Handler, - }, - { - MethodName: "Write", - Handler: _Provider_Write_Handler, - }, - { - MethodName: "ConfigAttributes", - Handler: _Provider_ConfigAttributes_Handler, - }, - { - MethodName: "ConfigLoad", - Handler: _Provider_ConfigLoad_Handler, - }, - { - MethodName: "ConfigValidate", - Handler: _Provider_ConfigValidate_Handler, - }, - { - MethodName: "ConfigFinalize", - Handler: _Provider_ConfigFinalize_Handler, - }, - { - MethodName: "GuestCapabilities", - Handler: _Provider_GuestCapabilities_Handler, - }, - { - MethodName: "GuestCapability", - Handler: _Provider_GuestCapability_Handler, - }, - { - MethodName: "HostCapabilities", - Handler: _Provider_HostCapabilities_Handler, - }, - { - MethodName: "HostCapability", - Handler: _Provider_HostCapability_Handler, - }, - { - MethodName: "ProviderCapabilities", - Handler: _Provider_ProviderCapabilities_Handler, - }, - { - MethodName: "ProviderCapability", - Handler: _Provider_ProviderCapability_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "vagrant_provider/provider.proto", -} - -func init() { proto.RegisterFile("vagrant_provider/provider.proto", fileDescriptor_28396c8d66e1a9b4) } - -var fileDescriptor_28396c8d66e1a9b4 = []byte{ - // 830 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x5d, 0x6f, 0xf3, 0x34, - 0x14, 0xc7, 0xd5, 0x35, 0xdd, 0xcb, 0xd9, 0xd6, 0x75, 0xd6, 0x04, 0xa5, 0xbc, 0xac, 0x74, 0x43, - 0x14, 0x10, 0x8d, 0x04, 0x57, 0x48, 0x0c, 0x69, 0xea, 0xd8, 0x28, 0x83, 0x31, 0xb5, 0x03, 0x2e, - 0x26, 0x51, 0xb9, 0x8d, 0x97, 0x58, 0xa4, 0x71, 0xb0, 0x9d, 0x89, 0xf2, 0x1d, 0xb8, 0xe4, 0x8e, - 0x0f, 0xfb, 0x28, 0x89, 0xed, 0xe6, 0xa5, 0x6b, 0x27, 0x3d, 0xbd, 0xaa, 0x7d, 0xce, 0xff, 0xfc, - 0x7c, 0x7c, 0xec, 0x13, 0x17, 0x4e, 0x9f, 0xb1, 0xcb, 0x71, 0x20, 0xc7, 0x21, 0x67, 0xcf, 0xd4, - 0x21, 0xdc, 0xd6, 0x83, 0x5e, 0xc8, 0x99, 0x64, 0xa8, 0xa1, 0x04, 0x3d, 0x6d, 0x6f, 0x8d, 0x5d, - 0x2a, 0xbd, 0x68, 0xd2, 0x9b, 0xb2, 0x99, 0xed, 0x61, 0xe1, 0xd1, 0x29, 0xe3, 0xa1, 0xad, 0x64, - 0x36, 0xf9, 0x5b, 0xda, 0x2e, 0xfb, 0x32, 0xf4, 0x23, 0x97, 0x06, 0xc6, 0xaa, 0xa6, 0x09, 0x52, - 0x1b, 0xc7, 0x53, 0x1c, 0x0a, 0x7b, 0x8a, 0x43, 0x3c, 0xa1, 0x3e, 0x95, 0x94, 0x88, 0x74, 0xc9, - 0xd6, 0xe3, 0xc6, 0x16, 0x60, 0xb3, 0x19, 0x0b, 0xec, 0xf4, 0x67, 0xf3, 0xf0, 0xe0, 0x89, 0xba, - 0x76, 0xfa, 0xa3, 0xe0, 0xa3, 0x4d, 0xc1, 0x29, 0xb3, 0x29, 0x4b, 0xa1, 0x9d, 0x0b, 0x38, 0xbc, - 0x9c, 0x4a, 0xca, 0x82, 0x21, 0xf9, 0x2b, 0x22, 0x42, 0x22, 0x04, 0x56, 0x80, 0x67, 0xa4, 0x59, - 0x69, 0x57, 0xba, 0x7b, 0xc3, 0x64, 0x8c, 0x9a, 0xb0, 0x33, 0xc3, 0x53, 0x8f, 0x06, 0xa4, 0xb9, - 0x95, 0x98, 0xf5, 0xb4, 0xf3, 0x1d, 0xd4, 0x75, 0xb8, 0x08, 0x59, 0x20, 0x08, 0x7a, 0x07, 0xb6, - 0x39, 0x11, 0x91, 0x2f, 0x9b, 0x95, 0x76, 0xb5, 0xbb, 0x37, 0x54, 0x33, 0x74, 0x02, 0x35, 0xc2, - 0x39, 0xe3, 0x8a, 0x90, 0x4e, 0x3a, 0x21, 0x1c, 0x0c, 0x82, 0x27, 0x66, 0xa2, 0x3b, 0x70, 0x90, - 0x3d, 0x33, 0xc5, 0xc8, 0xd9, 0x50, 0x1b, 0xf6, 0x1d, 0x22, 0xa6, 0x9c, 0x86, 0xf1, 0xc2, 0x8a, - 0x97, 0x35, 0xa1, 0x16, 0xec, 0x86, 0x9c, 0x32, 0x4e, 0xe5, 0xbc, 0x59, 0x6d, 0x57, 0xba, 0xd5, - 0xa1, 0x99, 0x77, 0x1e, 0xa0, 0x31, 0x8c, 0x82, 0xf5, 0x7b, 0x46, 0x60, 0x39, 0x58, 0x62, 0x85, - 0x4f, 0xc6, 0xd9, 0x3a, 0x54, 0xf3, 0x75, 0xb8, 0x80, 0xe3, 0x0c, 0x55, 0x6d, 0x46, 0x23, 0x2a, - 0x19, 0xc4, 0xf2, 0x32, 0xfc, 0x57, 0x81, 0xa3, 0x91, 0xf0, 0x72, 0xa5, 0x40, 0x60, 0x79, 0x4c, - 0x48, 0x1d, 0x1d, 0x8f, 0x63, 0x5b, 0xc8, 0xb8, 0x4c, 0x82, 0xab, 0xc3, 0x64, 0x8c, 0xba, 0xd0, - 0x08, 0x39, 0x7d, 0xc6, 0x92, 0x8c, 0xff, 0x24, 0xf3, 0x71, 0x88, 0xa5, 0xa7, 0xb2, 0xab, 0x2b, - 0xfb, 0x2d, 0x99, 0xdf, 0x63, 0xe9, 0xc5, 0x65, 0x89, 0x04, 0xe1, 0xc9, 0x56, 0xad, 0x44, 0x61, - 0xe6, 0x8b, 0xbc, 0x6a, 0xd9, 0xbc, 0xfe, 0xad, 0xc0, 0xe1, 0x48, 0x62, 0x49, 0x4c, 0x56, 0x75, - 0xd8, 0xa2, 0x8e, 0xca, 0x69, 0x8b, 0x3a, 0xe8, 0x0b, 0x38, 0x16, 0x1e, 0xe3, 0x72, 0x5c, 0x3e, - 0x92, 0x46, 0xe2, 0xb8, 0xca, 0x9c, 0xcb, 0x67, 0xd0, 0xf0, 0x59, 0xe0, 0xe6, 0xb4, 0x69, 0xaa, - 0x47, 0xb1, 0x3d, 0x2b, 0x35, 0xf9, 0x58, 0x99, 0x7c, 0xbe, 0xfa, 0xff, 0x10, 0x76, 0xef, 0xd5, - 0xa7, 0x02, 0xdd, 0xc2, 0x76, 0x5a, 0x70, 0x74, 0xda, 0x2b, 0x7e, 0x47, 0x7a, 0xb9, 0x03, 0x6e, - 0xb5, 0x5f, 0x16, 0xa8, 0x7d, 0xf5, 0xc1, 0x8a, 0xab, 0x8f, 0xde, 0x37, 0x4a, 0xd5, 0xd8, 0x77, - 0x91, 0xef, 0x6b, 0xcc, 0x47, 0x65, 0x4c, 0xee, 0xc8, 0x6e, 0x60, 0x7f, 0x20, 0x06, 0x81, 0x90, - 0xd8, 0xf7, 0x89, 0x83, 0x3e, 0x28, 0xb2, 0xbe, 0x9f, 0x85, 0x72, 0xae, 0x61, 0xad, 0xa2, 0x77, - 0x20, 0x0c, 0xe8, 0x0a, 0x76, 0x07, 0xe2, 0x57, 0x81, 0x27, 0x3e, 0x79, 0x0b, 0xca, 0x2f, 0xd0, - 0xf8, 0x39, 0xbd, 0x9f, 0x03, 0xa7, 0xef, 0xe1, 0xc0, 0x5d, 0x9b, 0xd3, 0x87, 0x2f, 0x78, 0x15, - 0xf0, 0x12, 0xac, 0xbb, 0xf8, 0xb2, 0xac, 0x2c, 0x52, 0x69, 0x85, 0x38, 0xc4, 0x20, 0x1e, 0x60, - 0xcf, 0x34, 0x0a, 0xea, 0x94, 0xeb, 0x59, 0xec, 0xcd, 0xd6, 0xd9, 0x4a, 0x8d, 0xa2, 0xfe, 0x08, - 0x3b, 0xaa, 0x7d, 0xd6, 0x6c, 0xf0, 0xe3, 0x32, 0xad, 0xd8, 0x77, 0xd7, 0x50, 0x4b, 0xae, 0xfc, - 0x1a, 0xd2, 0x92, 0x3b, 0x97, 0xef, 0x94, 0x6f, 0xc0, 0x1a, 0x12, 0xec, 0xa0, 0x77, 0x8d, 0x90, - 0xb2, 0x5e, 0x6c, 0xd1, 0x84, 0x66, 0xd9, 0xa1, 0x42, 0xbf, 0x85, 0xda, 0xef, 0x9c, 0x4a, 0x82, - 0x72, 0x92, 0xc4, 0xa4, 0x83, 0xdf, 0x5b, 0xe2, 0x51, 0xd1, 0x23, 0x68, 0xf4, 0x93, 0x77, 0xe3, - 0x52, 0x4a, 0x4e, 0x27, 0x91, 0x24, 0x62, 0xf5, 0x89, 0x75, 0x32, 0xce, 0xe4, 0xbd, 0x59, 0x04, - 0x66, 0xae, 0x36, 0xa4, 0xd0, 0x9f, 0x18, 0x76, 0x72, 0xb8, 0x24, 0x22, 0xb6, 0x2e, 0xbb, 0x00, - 0x19, 0xa7, 0xc9, 0xae, 0x9e, 0x82, 0x7e, 0xc3, 0x3e, 0x75, 0xe2, 0x3a, 0x9f, 0x16, 0xf5, 0xda, - 0x53, 0xee, 0xde, 0x92, 0xa0, 0x08, 0xbd, 0xa6, 0x01, 0xf6, 0xe9, 0x3f, 0x4b, 0xa0, 0xda, 0xf3, - 0x22, 0x74, 0x21, 0x30, 0x57, 0xf5, 0xf8, 0x26, 0x96, 0xf6, 0xb3, 0x8f, 0xcf, 0x6b, 0x0b, 0x89, - 0x43, 0xd1, 0xcb, 0x06, 0x1a, 0xea, 0x1f, 0x70, 0x94, 0xa7, 0xce, 0xd1, 0x79, 0x3e, 0xac, 0xe0, - 0xd6, 0xf0, 0x4f, 0xd6, 0xa8, 0x16, 0xa7, 0xff, 0x03, 0xdb, 0x74, 0xd2, 0x8f, 0x50, 0xcf, 0x41, - 0xe7, 0xe8, 0x2c, 0x1f, 0x95, 0xf7, 0x6a, 0xf4, 0xf9, 0x6a, 0x91, 0x82, 0x8f, 0xe1, 0x44, 0x7f, - 0xd3, 0x5f, 0x9f, 0xf5, 0xe7, 0x79, 0xf4, 0x32, 0x80, 0x59, 0xc0, 0x05, 0x54, 0xf2, 0xcf, 0xd1, - 0xa7, 0x6b, 0x08, 0x66, 0x17, 0xdd, 0xf5, 0xc2, 0x74, 0xa1, 0xc9, 0x76, 0xf2, 0x9f, 0xea, 0xeb, - 0x37, 0x01, 0x00, 0x00, 0xff, 0xff, 0x68, 0xce, 0xef, 0x16, 0xf8, 0x0a, 0x00, 0x00, -} diff --git a/ext/go-plugin/vagrant/plugin/proto/vagrant_provider/provider.proto b/ext/go-plugin/vagrant/plugin/proto/vagrant_provider/provider.proto deleted file mode 100644 index 6580fae84..000000000 --- a/ext/go-plugin/vagrant/plugin/proto/vagrant_provider/provider.proto +++ /dev/null @@ -1,74 +0,0 @@ -syntax = "proto3"; -package vagrant.provider; - -import "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_caps/capabilities.proto"; -import "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_common/common.proto"; -import "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_config/config.proto"; -import "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_io/io.proto"; - -message ActionRequest { - string name = 1; - string machine = 2; -} -message ActionResponse { - repeated string result = 1; - string error = 2; -} - -message InfoResponse { - repeated string capabilities = 1; - string description = 2; - int64 priority = 3; -} - -message RunActionRequest { - string name = 1; - string data = 2; - string machine = 3; -} - -message RunActionResponse { - string data = 1; - string error = 2; -} - -message SshInfoResponse { - string host = 1; - int64 port = 2; - string private_key_path = 3; - string username = 4; - string error = 5; -} -message StateResponse { - string id = 1; - string short_description = 2; - string long_description = 3; - string error = 4; -} - -service Provider { - rpc Action(ActionRequest) returns (ActionResponse); - rpc Info(vagrant.common.NullRequest) returns (InfoResponse); - rpc IsInstalled(vagrant.common.EmptyRequest) returns (vagrant.common.IsResponse); - rpc IsUsable(vagrant.common.EmptyRequest) returns (vagrant.common.IsResponse); - rpc MachineIdChanged(vagrant.common.EmptyRequest) returns (vagrant.common.EmptyResponse); - rpc Name(vagrant.common.NullRequest) returns (vagrant.common.NameResponse); - rpc RunAction(RunActionRequest) returns (RunActionResponse); - rpc SshInfo(vagrant.common.EmptyRequest) returns (SshInfoResponse); - rpc State(vagrant.common.EmptyRequest) returns (StateResponse); - // These are IO helpers for streaming - rpc Read(vagrant.io.ReadRequest) returns (vagrant.io.ReadResponse); - rpc Write(vagrant.io.WriteRequest) returns (vagrant.io.WriteResponse); - // These are Config helpers - rpc ConfigAttributes(vagrant.common.NullRequest) returns (vagrant.config.AttributesResponse); - rpc ConfigLoad(vagrant.config.LoadRequest) returns (vagrant.config.LoadResponse); - rpc ConfigValidate(vagrant.config.ValidateRequest) returns (vagrant.config.ValidateResponse); - rpc ConfigFinalize(vagrant.config.FinalizeRequest) returns (vagrant.config.FinalizeResponse); - // Capabilities - rpc GuestCapabilities(vagrant.common.NullRequest) returns (vagrant.caps.CapabilitiesResponse); - rpc GuestCapability(vagrant.caps.GuestCapabilityRequest) returns (vagrant.caps.GuestCapabilityResponse); - rpc HostCapabilities(vagrant.common.NullRequest) returns (vagrant.caps.CapabilitiesResponse); - rpc HostCapability(vagrant.caps.HostCapabilityRequest) returns (vagrant.caps.HostCapabilityResponse); - rpc ProviderCapabilities(vagrant.common.NullRequest) returns (vagrant.caps.ProviderCapabilitiesResponse); - rpc ProviderCapability(vagrant.caps.ProviderCapabilityRequest) returns (vagrant.caps.ProviderCapabilityResponse); -} \ No newline at end of file diff --git a/ext/go-plugin/vagrant/plugin/provider.go b/ext/go-plugin/vagrant/plugin/provider.go index d8c617a58..268bc6e84 100644 --- a/ext/go-plugin/vagrant/plugin/provider.go +++ b/ext/go-plugin/vagrant/plugin/provider.go @@ -8,8 +8,7 @@ import ( go_plugin "github.com/hashicorp/go-plugin" "github.com/hashicorp/vagrant/ext/go-plugin/vagrant" - "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_common" - "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_provider" + "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto" "github.com/LK4D4/joincontext" ) @@ -31,7 +30,7 @@ type GRPCProviderClient struct { GRPCHostCapabilitiesClient GRPCProviderCapabilitiesClient GRPCIOClient - client vagrant_provider.ProviderClient + client vagrant_proto.ProviderClient doneCtx context.Context } @@ -42,20 +41,20 @@ func (c *GRPCProviderClient) Action(ctx context.Context, actionName string, m *v } jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.Action(jctx, &vagrant_provider.ActionRequest{ + resp, err := c.client.Action(jctx, &vagrant_proto.GenericAction{ Name: actionName, Machine: machData}) if err != nil { return nil, handleGrpcError(err, c.doneCtx, ctx) } - r = resp.Result + r = resp.Items return } func (c *GRPCProviderClient) Info() *vagrant.ProviderInfo { ctx := context.Background() jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.Info(jctx, &vagrant_common.NullRequest{}) + resp, err := c.client.Info(jctx, &vagrant_proto.Empty{}) if err != nil { return &vagrant.ProviderInfo{} } @@ -70,7 +69,7 @@ func (c *GRPCProviderClient) IsInstalled(ctx context.Context, m *vagrant.Machine return } jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.IsInstalled(jctx, &vagrant_common.EmptyRequest{ + resp, err := c.client.IsInstalled(jctx, &vagrant_proto.Machine{ Machine: machData}) if err != nil { return false, handleGrpcError(err, c.doneCtx, ctx) @@ -85,7 +84,7 @@ func (c *GRPCProviderClient) IsUsable(ctx context.Context, m *vagrant.Machine) ( return } jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.IsUsable(jctx, &vagrant_common.EmptyRequest{ + resp, err := c.client.IsUsable(jctx, &vagrant_proto.Machine{ Machine: machData}) if err != nil { return false, handleGrpcError(err, c.doneCtx, ctx) @@ -100,7 +99,7 @@ func (c *GRPCProviderClient) MachineIdChanged(ctx context.Context, m *vagrant.Ma return } jctx, _ := joincontext.Join(ctx, c.doneCtx) - _, err = c.client.MachineIdChanged(jctx, &vagrant_common.EmptyRequest{ + _, err = c.client.MachineIdChanged(jctx, &vagrant_proto.Machine{ Machine: machData}) if err != nil { return handleGrpcError(err, c.doneCtx, ctx) @@ -118,14 +117,14 @@ func (c *GRPCProviderClient) RunAction(ctx context.Context, actName string, args return } jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.RunAction(jctx, &vagrant_provider.RunActionRequest{ + resp, err := c.client.RunAction(jctx, &vagrant_proto.ExecuteAction{ Name: actName, Data: string(runData), Machine: machData}) if err != nil { return nil, handleGrpcError(err, c.doneCtx, ctx) } - err = json.Unmarshal([]byte(resp.Data), &r) + err = json.Unmarshal([]byte(resp.Result), &r) if err != nil { return } @@ -138,7 +137,7 @@ func (c *GRPCProviderClient) SshInfo(ctx context.Context, m *vagrant.Machine) (r return } jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.SshInfo(jctx, &vagrant_common.EmptyRequest{ + resp, err := c.client.SshInfo(jctx, &vagrant_proto.Machine{ Machine: machData}) if err != nil { return nil, handleGrpcError(err, c.doneCtx, ctx) @@ -157,7 +156,7 @@ func (c *GRPCProviderClient) State(ctx context.Context, m *vagrant.Machine) (r * return } jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.State(jctx, &vagrant_common.EmptyRequest{ + resp, err := c.client.State(jctx, &vagrant_proto.Machine{ Machine: machData}) if err != nil { return nil, handleGrpcError(err, c.doneCtx, ctx) @@ -172,7 +171,7 @@ func (c *GRPCProviderClient) State(ctx context.Context, m *vagrant.Machine) (r * func (c *GRPCProviderClient) Name() string { ctx := context.Background() jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.Name(jctx, &vagrant_common.NullRequest{}) + resp, err := c.client.Name(jctx, &vagrant_proto.Empty{}) if err != nil { return "" } @@ -180,7 +179,7 @@ func (c *GRPCProviderClient) Name() string { } func (p *ProviderPlugin) GRPCClient(ctx context.Context, broker *go_plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) { - client := vagrant_provider.NewProviderClient(c) + client := vagrant_proto.NewProviderClient(c) return &GRPCProviderClient{ GRPCConfigClient: GRPCConfigClient{ client: client, @@ -204,7 +203,7 @@ func (p *ProviderPlugin) GRPCClient(ctx context.Context, broker *go_plugin.GRPCB func (p *ProviderPlugin) GRPCServer(broker *go_plugin.GRPCBroker, s *grpc.Server) error { p.Impl.Init() - vagrant_provider.RegisterProviderServer(s, &GRPCProviderServer{ + vagrant_proto.RegisterProviderServer(s, &GRPCProviderServer{ Impl: p.Impl, GRPCConfigServer: GRPCConfigServer{ Impl: p.Impl}, @@ -228,10 +227,10 @@ type GRPCProviderServer struct { Impl Provider } -func (s *GRPCProviderServer) Action(ctx context.Context, req *vagrant_provider.ActionRequest) (resp *vagrant_provider.ActionResponse, err error) { - resp = &vagrant_provider.ActionResponse{} +func (s *GRPCProviderServer) Action(ctx context.Context, req *vagrant_proto.GenericAction) (resp *vagrant_proto.ListResponse, err error) { + resp = &vagrant_proto.ListResponse{} var r []string - n := make(chan struct{}, 1) + n := make(chan struct{}) m, err := vagrant.LoadMachine(req.Machine, s.Impl) if err != nil { return @@ -249,14 +248,14 @@ func (s *GRPCProviderServer) Action(ctx context.Context, req *vagrant_provider.A if err != nil { return } - resp.Result = r + resp.Items = r return } -func (s *GRPCProviderServer) RunAction(ctx context.Context, req *vagrant_provider.RunActionRequest) (resp *vagrant_provider.RunActionResponse, err error) { - resp = &vagrant_provider.RunActionResponse{} +func (s *GRPCProviderServer) RunAction(ctx context.Context, req *vagrant_proto.ExecuteAction) (resp *vagrant_proto.GenericResponse, err error) { + resp = &vagrant_proto.GenericResponse{} var args, r interface{} - n := make(chan struct{}, 1) + n := make(chan struct{}) m, err := vagrant.LoadMachine(req.Machine, s.Impl) if err != nil { return @@ -282,13 +281,13 @@ func (s *GRPCProviderServer) RunAction(ctx context.Context, req *vagrant_provide if err != nil { return } - resp.Data = string(result) + resp.Result = string(result) return } -func (s *GRPCProviderServer) Info(ctx context.Context, req *vagrant_common.NullRequest) (*vagrant_provider.InfoResponse, error) { +func (s *GRPCProviderServer) Info(ctx context.Context, req *vagrant_proto.Empty) (*vagrant_proto.PluginInfo, error) { var r *vagrant.ProviderInfo - n := make(chan struct{}, 1) + n := make(chan struct{}) go func() { r = s.Impl.Info() n <- struct{}{} @@ -299,15 +298,15 @@ func (s *GRPCProviderServer) Info(ctx context.Context, req *vagrant_common.NullR case <-n: } - return &vagrant_provider.InfoResponse{ + return &vagrant_proto.PluginInfo{ Description: r.Description, Priority: r.Priority}, nil } -func (s *GRPCProviderServer) IsInstalled(ctx context.Context, req *vagrant_common.EmptyRequest) (resp *vagrant_common.IsResponse, err error) { - resp = &vagrant_common.IsResponse{} +func (s *GRPCProviderServer) IsInstalled(ctx context.Context, req *vagrant_proto.Machine) (resp *vagrant_proto.Valid, err error) { + resp = &vagrant_proto.Valid{} var r bool - n := make(chan struct{}, 1) + n := make(chan struct{}) m, err := vagrant.LoadMachine(req.Machine, s.Impl) if err != nil { return @@ -328,10 +327,10 @@ func (s *GRPCProviderServer) IsInstalled(ctx context.Context, req *vagrant_commo return } -func (s *GRPCProviderServer) IsUsable(ctx context.Context, req *vagrant_common.EmptyRequest) (resp *vagrant_common.IsResponse, err error) { - resp = &vagrant_common.IsResponse{} +func (s *GRPCProviderServer) IsUsable(ctx context.Context, req *vagrant_proto.Machine) (resp *vagrant_proto.Valid, err error) { + resp = &vagrant_proto.Valid{} var r bool - n := make(chan struct{}, 1) + n := make(chan struct{}) m, err := vagrant.LoadMachine(req.Machine, s.Impl) if err != nil { return @@ -352,8 +351,8 @@ func (s *GRPCProviderServer) IsUsable(ctx context.Context, req *vagrant_common.E return } -func (s *GRPCProviderServer) SshInfo(ctx context.Context, req *vagrant_common.EmptyRequest) (resp *vagrant_provider.SshInfoResponse, err error) { - resp = &vagrant_provider.SshInfoResponse{} +func (s *GRPCProviderServer) SshInfo(ctx context.Context, req *vagrant_proto.Machine) (resp *vagrant_proto.MachineSshInfo, err error) { + resp = &vagrant_proto.MachineSshInfo{} var r *vagrant.SshInfo n := make(chan struct{}, 1) m, err := vagrant.LoadMachine(req.Machine, s.Impl) @@ -373,7 +372,7 @@ func (s *GRPCProviderServer) SshInfo(ctx context.Context, req *vagrant_common.Em if err != nil { return } - resp = &vagrant_provider.SshInfoResponse{ + resp = &vagrant_proto.MachineSshInfo{ Host: r.Host, Port: r.Port, Username: r.Username, @@ -381,10 +380,10 @@ func (s *GRPCProviderServer) SshInfo(ctx context.Context, req *vagrant_common.Em return } -func (s *GRPCProviderServer) State(ctx context.Context, req *vagrant_common.EmptyRequest) (resp *vagrant_provider.StateResponse, err error) { - resp = &vagrant_provider.StateResponse{} +func (s *GRPCProviderServer) State(ctx context.Context, req *vagrant_proto.Machine) (resp *vagrant_proto.MachineState, err error) { + resp = &vagrant_proto.MachineState{} var r *vagrant.MachineState - n := make(chan struct{}, 1) + n := make(chan struct{}) m, err := vagrant.LoadMachine(req.Machine, s.Impl) if err != nil { return @@ -402,16 +401,15 @@ func (s *GRPCProviderServer) State(ctx context.Context, req *vagrant_common.Empt if err != nil { return } - resp = &vagrant_provider.StateResponse{ + resp = &vagrant_proto.MachineState{ Id: r.Id, ShortDescription: r.ShortDesc, LongDescription: r.LongDesc} return } -func (s *GRPCProviderServer) MachineIdChanged(ctx context.Context, req *vagrant_common.EmptyRequest) (resp *vagrant_common.EmptyResponse, err error) { - resp = &vagrant_common.EmptyResponse{} - n := make(chan struct{}, 1) +func (s *GRPCProviderServer) MachineIdChanged(ctx context.Context, req *vagrant_proto.Machine) (resp *vagrant_proto.Machine, err error) { + n := make(chan struct{}) m, err := vagrant.LoadMachine(req.Machine, s.Impl) if err != nil { return @@ -424,9 +422,14 @@ func (s *GRPCProviderServer) MachineIdChanged(ctx context.Context, req *vagrant_ case <-ctx.Done(): case <-n: } + mdata, err := vagrant.DumpMachine(m) + if err != nil { + return + } + resp = &vagrant_proto.Machine{Machine: mdata} return } -func (s *GRPCProviderServer) Name(ctx context.Context, req *vagrant_common.NullRequest) (*vagrant_common.NameResponse, error) { - return &vagrant_common.NameResponse{Name: s.Impl.Name()}, nil +func (s *GRPCProviderServer) Name(ctx context.Context, req *vagrant_proto.Empty) (*vagrant_proto.Identifier, error) { + return &vagrant_proto.Identifier{Name: s.Impl.Name()}, nil } diff --git a/ext/go-plugin/vagrant/plugin/synced_folder.go b/ext/go-plugin/vagrant/plugin/synced_folder.go index 064e3aa1b..1eda362c5 100644 --- a/ext/go-plugin/vagrant/plugin/synced_folder.go +++ b/ext/go-plugin/vagrant/plugin/synced_folder.go @@ -8,8 +8,7 @@ import ( go_plugin "github.com/hashicorp/go-plugin" "github.com/hashicorp/vagrant/ext/go-plugin/vagrant" - "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_common" - "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto/vagrant_folder" + "github.com/hashicorp/vagrant/ext/go-plugin/vagrant/plugin/proto" "github.com/LK4D4/joincontext" ) @@ -29,7 +28,7 @@ type GRPCSyncedFolderClient struct { GRPCGuestCapabilitiesClient GRPCHostCapabilitiesClient GRPCIOClient - client vagrant_folder.SyncedFolderClient + client vagrant_proto.SyncedFolderClient doneCtx context.Context } @@ -43,7 +42,7 @@ func (c *GRPCSyncedFolderClient) Cleanup(ctx context.Context, m *vagrant.Machine return } jctx, _ := joincontext.Join(ctx, c.doneCtx) - _, err = c.client.Cleanup(jctx, &vagrant_folder.CleanupRequest{ + _, err = c.client.Cleanup(jctx, &vagrant_proto.SyncedFolders{ Machine: machine, Options: string(opts)}) return handleGrpcError(err, c.doneCtx, ctx) @@ -63,7 +62,7 @@ func (c *GRPCSyncedFolderClient) Disable(ctx context.Context, m *vagrant.Machine return } jctx, _ := joincontext.Join(ctx, c.doneCtx) - _, err = c.client.Disable(jctx, &vagrant_folder.Request{ + _, err = c.client.Disable(jctx, &vagrant_proto.SyncedFolders{ Machine: machine, Folders: string(folders), Options: string(opts)}) @@ -84,7 +83,7 @@ func (c *GRPCSyncedFolderClient) Enable(ctx context.Context, m *vagrant.Machine, return } jctx, _ := joincontext.Join(ctx, c.doneCtx) - _, err = c.client.Enable(jctx, &vagrant_folder.Request{ + _, err = c.client.Enable(jctx, &vagrant_proto.SyncedFolders{ Machine: machine, Folders: string(folders), Options: string(opts)}) @@ -92,7 +91,7 @@ func (c *GRPCSyncedFolderClient) Enable(ctx context.Context, m *vagrant.Machine, } func (c *GRPCSyncedFolderClient) Info() *vagrant.SyncedFolderInfo { - resp, err := c.client.Info(context.Background(), &vagrant_common.NullRequest{}) + resp, err := c.client.Info(context.Background(), &vagrant_proto.Empty{}) if err != nil { return &vagrant.SyncedFolderInfo{} } @@ -107,7 +106,7 @@ func (c *GRPCSyncedFolderClient) IsUsable(ctx context.Context, m *vagrant.Machin return } jctx, _ := joincontext.Join(ctx, c.doneCtx) - resp, err := c.client.IsUsable(jctx, &vagrant_common.EmptyRequest{ + resp, err := c.client.IsUsable(jctx, &vagrant_proto.Machine{ Machine: machine}) if err != nil { return false, handleGrpcError(err, c.doneCtx, ctx) @@ -117,7 +116,7 @@ func (c *GRPCSyncedFolderClient) IsUsable(ctx context.Context, m *vagrant.Machin } func (c *GRPCSyncedFolderClient) Name() string { - resp, err := c.client.Name(context.Background(), &vagrant_common.NullRequest{}) + resp, err := c.client.Name(context.Background(), &vagrant_proto.Empty{}) if err != nil { return "" } @@ -138,7 +137,7 @@ func (c *GRPCSyncedFolderClient) Prepare(ctx context.Context, m *vagrant.Machine return } jctx, _ := joincontext.Join(ctx, c.doneCtx) - _, err = c.client.Prepare(jctx, &vagrant_folder.Request{ + _, err = c.client.Prepare(jctx, &vagrant_proto.SyncedFolders{ Machine: machine, Folders: string(folders), Options: string(opts)}) @@ -152,8 +151,8 @@ type GRPCSyncedFolderServer struct { Impl SyncedFolder } -func (s *GRPCSyncedFolderServer) Cleanup(ctx context.Context, req *vagrant_folder.CleanupRequest) (resp *vagrant_common.EmptyResponse, err error) { - resp = &vagrant_common.EmptyResponse{} +func (s *GRPCSyncedFolderServer) Cleanup(ctx context.Context, req *vagrant_proto.SyncedFolders) (resp *vagrant_proto.Empty, err error) { + resp = &vagrant_proto.Empty{} machine, err := vagrant.LoadMachine(req.Machine, s.Impl) if err != nil { return @@ -175,8 +174,8 @@ func (s *GRPCSyncedFolderServer) Cleanup(ctx context.Context, req *vagrant_folde return } -func (s *GRPCSyncedFolderServer) Disable(ctx context.Context, req *vagrant_folder.Request) (resp *vagrant_common.EmptyResponse, err error) { - resp = &vagrant_common.EmptyResponse{} +func (s *GRPCSyncedFolderServer) Disable(ctx context.Context, req *vagrant_proto.SyncedFolders) (resp *vagrant_proto.Empty, err error) { + resp = &vagrant_proto.Empty{} machine, err := vagrant.LoadMachine(req.Machine, s.Impl) if err != nil { return @@ -203,8 +202,8 @@ func (s *GRPCSyncedFolderServer) Disable(ctx context.Context, req *vagrant_folde return } -func (s *GRPCSyncedFolderServer) Enable(ctx context.Context, req *vagrant_folder.Request) (resp *vagrant_common.EmptyResponse, err error) { - resp = &vagrant_common.EmptyResponse{} +func (s *GRPCSyncedFolderServer) Enable(ctx context.Context, req *vagrant_proto.SyncedFolders) (resp *vagrant_proto.Empty, err error) { + resp = &vagrant_proto.Empty{} machine, err := vagrant.LoadMachine(req.Machine, s.Impl) if err != nil { return @@ -231,7 +230,7 @@ func (s *GRPCSyncedFolderServer) Enable(ctx context.Context, req *vagrant_folder return } -func (s *GRPCSyncedFolderServer) Info(ctx context.Context, req *vagrant_common.NullRequest) (*vagrant_folder.InfoResponse, error) { +func (s *GRPCSyncedFolderServer) Info(ctx context.Context, req *vagrant_proto.Empty) (*vagrant_proto.PluginInfo, error) { n := make(chan struct{}) var r *vagrant.SyncedFolderInfo go func() { @@ -243,13 +242,13 @@ func (s *GRPCSyncedFolderServer) Info(ctx context.Context, req *vagrant_common.N return nil, nil case <-n: } - return &vagrant_folder.InfoResponse{ + return &vagrant_proto.PluginInfo{ Description: r.Description, Priority: r.Priority}, nil } -func (s *GRPCSyncedFolderServer) IsUsable(ctx context.Context, req *vagrant_common.EmptyRequest) (resp *vagrant_common.IsResponse, err error) { - resp = &vagrant_common.IsResponse{} +func (s *GRPCSyncedFolderServer) IsUsable(ctx context.Context, req *vagrant_proto.Machine) (resp *vagrant_proto.Valid, err error) { + resp = &vagrant_proto.Valid{} var r bool machine, err := vagrant.LoadMachine(req.Machine, s.Impl) if err != nil { @@ -272,12 +271,12 @@ func (s *GRPCSyncedFolderServer) IsUsable(ctx context.Context, req *vagrant_comm return } -func (s *GRPCSyncedFolderServer) Name(_ context.Context, req *vagrant_common.NullRequest) (*vagrant_common.NameResponse, error) { - return &vagrant_common.NameResponse{Name: s.Impl.Name()}, nil +func (s *GRPCSyncedFolderServer) Name(_ context.Context, req *vagrant_proto.Empty) (*vagrant_proto.Identifier, error) { + return &vagrant_proto.Identifier{Name: s.Impl.Name()}, nil } -func (s *GRPCSyncedFolderServer) Prepare(ctx context.Context, req *vagrant_folder.Request) (resp *vagrant_common.EmptyResponse, err error) { - resp = &vagrant_common.EmptyResponse{} +func (s *GRPCSyncedFolderServer) Prepare(ctx context.Context, req *vagrant_proto.SyncedFolders) (resp *vagrant_proto.Empty, err error) { + resp = &vagrant_proto.Empty{} machine, err := vagrant.LoadMachine(req.Machine, s.Impl) if err != nil { return @@ -306,7 +305,7 @@ func (s *GRPCSyncedFolderServer) Prepare(ctx context.Context, req *vagrant_folde func (f *SyncedFolderPlugin) GRPCServer(broker *go_plugin.GRPCBroker, s *grpc.Server) error { f.Impl.Init() - vagrant_folder.RegisterSyncedFolderServer(s, + vagrant_proto.RegisterSyncedFolderServer(s, &GRPCSyncedFolderServer{ Impl: f.Impl, GRPCIOServer: GRPCIOServer{ @@ -319,7 +318,7 @@ func (f *SyncedFolderPlugin) GRPCServer(broker *go_plugin.GRPCBroker, s *grpc.Se } func (f *SyncedFolderPlugin) GRPCClient(ctx context.Context, broker *go_plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) { - client := vagrant_folder.NewSyncedFolderClient(c) + client := vagrant_proto.NewSyncedFolderClient(c) return &GRPCSyncedFolderClient{ GRPCIOClient: GRPCIOClient{ client: client, diff --git a/ext/go-plugin/vagrant/plugin/synced_folder_test.go b/ext/go-plugin/vagrant/plugin/synced_folder_test.go index 67c1a394c..342b2a28b 100644 --- a/ext/go-plugin/vagrant/plugin/synced_folder_test.go +++ b/ext/go-plugin/vagrant/plugin/synced_folder_test.go @@ -27,7 +27,7 @@ func TestSyncedFolder_Cleanup(t *testing.T) { err = impl.Cleanup(context.Background(), &vagrant.Machine{}, nil) if err != nil { - t.Fatalf("bad resp: %s", err) + t.Fatalf("bad resp: %#v", err) } }