Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
1736d934
Commit
1736d934
authored
6 years ago
by
Alex Dadgar
Browse files
Options
Download
Email Patches
Plain Diff
Review comments
parent
cfc6992e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
plugins/base/base.go
+1
-1
plugins/base/base.go
plugins/base/client.go
+2
-4
plugins/base/client.go
plugins/base/mock.go
+1
-1
plugins/base/mock.go
plugins/base/plugin.go
+4
-5
plugins/base/plugin.go
plugins/base/plugin_test.go
+46
-24
plugins/base/plugin_test.go
plugins/base/proto/base.pb.go
+40
-43
plugins/base/proto/base.pb.go
plugins/base/proto/base.proto
+0
-1
plugins/base/proto/base.proto
plugins/base/server.go
+1
-3
plugins/base/server.go
with
95 additions
and
82 deletions
+95
-82
plugins/base/base.go
+
1
-
1
View file @
1736d934
package
shared
package
base
import
(
"github.com/hashicorp/nomad/plugins/shared/hclspec"
...
...
This diff is collapsed.
Click to expand it.
plugins/base/client.go
+
2
-
4
View file @
1736d934
package
shared
package
base
import
(
"context"
"fmt"
"github.com/hashicorp/nomad/plugins/base/proto"
"github.com/hashicorp/nomad/plugins/shared/hclspec"
"golang.org/x/net/context"
)
// basePluginClient implements the client side of a remote base plugin, using
...
...
@@ -22,8 +22,6 @@ func (b *basePluginClient) PluginInfo() (*PluginInfoResponse, error) {
var
ptype
string
switch
presp
.
GetType
()
{
case
proto
.
PluginType_BASE
:
ptype
=
PluginTypeBase
case
proto
.
PluginType_DRIVER
:
ptype
=
PluginTypeDriver
case
proto
.
PluginType_DEVICE
:
...
...
This diff is collapsed.
Click to expand it.
plugins/base/mock.go
+
1
-
1
View file @
1736d934
package
shared
package
base
import
(
"github.com/hashicorp/nomad/plugins/shared/hclspec"
...
...
This diff is collapsed.
Click to expand it.
plugins/base/plugin.go
+
4
-
5
View file @
1736d934
package
shared
package
base
import
(
"
golang.org/x/net/
context"
"context"
plugin
"github.com/hashicorp/go-plugin"
"github.com/hashicorp/nomad/plugins/base/proto"
...
...
@@ -9,9 +9,6 @@ import (
)
const
(
// PluginTypeBase implements the base plugin driver interface
PluginTypeBase
=
"base"
// PluginTypeDriver implements the driver plugin interface
PluginTypeDriver
=
"driver"
...
...
@@ -28,6 +25,8 @@ var (
}
)
// PluginBase is wraps a BasePlugin and implements go-plugins GRPCPlugin
// interface to expose the interface over gRPC.
type
PluginBase
struct
{
plugin
.
NetRPCUnsupportedPlugin
impl
BasePlugin
...
...
This diff is collapsed.
Click to expand it.
plugins/base/plugin_test.go
+
46
-
24
View file @
1736d934
package
shared
package
base
import
(
"testing"
...
...
@@ -6,12 +6,10 @@ import (
pb
"github.com/golang/protobuf/proto"
plugin
"github.com/hashicorp/go-plugin"
"github.com/hashicorp/nomad/nomad/structs"
"github.com/hashicorp/nomad/plugins/base/proto"
"github.com/hashicorp/nomad/plugins/shared/hclspec"
"github.com/stretchr/testify/require"
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/msgpack"
"google.golang.org/grpc"
)
var
(
...
...
@@ -68,7 +66,7 @@ func TestBasePlugin_PluginInfo_GRPC(t *testing.T) {
knownType
:=
func
()
(
*
PluginInfoResponse
,
error
)
{
info
:=
&
PluginInfoResponse
{
Type
:
PluginType
Base
,
Type
:
PluginType
Driver
,
PluginApiVersion
:
apiVersion
,
PluginVersion
:
pluginVersion
,
Name
:
pluginName
,
...
...
@@ -89,24 +87,32 @@ func TestBasePlugin_PluginInfo_GRPC(t *testing.T) {
PluginInfoF
:
knownType
,
}
c
onn
,
server
:=
plugin
.
TestGRPCConn
(
t
,
func
(
s
*
grpc
.
Server
)
{
proto
.
RegisterBasePluginServer
(
s
,
&
basePluginServer
{
impl
:
mock
}
)
c
lient
,
server
:=
plugin
.
Test
Plugin
GRPCConn
(
t
,
map
[
string
]
plugin
.
Plugin
{
"base"
:
&
PluginBase
{
impl
:
mock
}
,
})
defer
conn
.
Close
()
defer
server
.
Stop
()
grpcClient
:=
proto
.
NewBasePluginClient
(
conn
)
client
:=
basePluginClient
{
client
:
grpcClient
}
defer
client
.
Close
()
resp
,
err
:=
client
.
PluginInfo
()
raw
,
err
:=
client
.
Dispense
(
"base"
)
if
err
!=
nil
{
t
.
Fatalf
(
"err: %s"
,
err
)
}
impl
,
ok
:=
raw
.
(
BasePlugin
)
if
!
ok
{
t
.
Fatalf
(
"bad: %#v"
,
raw
)
}
resp
,
err
:=
impl
.
PluginInfo
()
require
.
NoError
(
err
)
require
.
Equal
(
apiVersion
,
resp
.
PluginApiVersion
)
require
.
Equal
(
pluginVersion
,
resp
.
PluginVersion
)
require
.
Equal
(
pluginName
,
resp
.
Name
)
require
.
Equal
(
PluginType
Base
,
resp
.
Type
)
require
.
Equal
(
PluginType
Driver
,
resp
.
Type
)
// Swap the implementation to return an unknown type
mock
.
PluginInfoF
=
unknownType
_
,
err
=
client
.
PluginInfo
()
_
,
err
=
impl
.
PluginInfo
()
require
.
Error
(
err
)
require
.
Contains
(
err
.
Error
(),
"unknown type"
)
}
...
...
@@ -121,15 +127,23 @@ func TestBasePlugin_ConfigSchema(t *testing.T) {
},
}
c
onn
,
server
:=
plugin
.
TestGRPCConn
(
t
,
func
(
s
*
grpc
.
Server
)
{
proto
.
RegisterBasePluginServer
(
s
,
&
basePluginServer
{
impl
:
mock
}
)
c
lient
,
server
:=
plugin
.
Test
Plugin
GRPCConn
(
t
,
map
[
string
]
plugin
.
Plugin
{
"base"
:
&
PluginBase
{
impl
:
mock
}
,
})
defer
conn
.
Close
()
defer
server
.
Stop
()
grpcClient
:=
proto
.
NewBasePluginClient
(
conn
)
client
:=
basePluginClient
{
client
:
grpcClient
}
defer
client
.
Close
()
raw
,
err
:=
client
.
Dispense
(
"base"
)
if
err
!=
nil
{
t
.
Fatalf
(
"err: %s"
,
err
)
}
specOut
,
err
:=
client
.
ConfigSchema
()
impl
,
ok
:=
raw
.
(
BasePlugin
)
if
!
ok
{
t
.
Fatalf
(
"bad: %#v"
,
raw
)
}
specOut
,
err
:=
impl
.
ConfigSchema
()
require
.
NoError
(
err
)
require
.
True
(
pb
.
Equal
(
testSpec
,
specOut
))
}
...
...
@@ -149,13 +163,21 @@ func TestBasePlugin_SetConfig(t *testing.T) {
},
}
c
onn
,
server
:=
plugin
.
TestGRPCConn
(
t
,
func
(
s
*
grpc
.
Server
)
{
proto
.
RegisterBasePluginServer
(
s
,
&
basePluginServer
{
impl
:
mock
}
)
c
lient
,
server
:=
plugin
.
Test
Plugin
GRPCConn
(
t
,
map
[
string
]
plugin
.
Plugin
{
"base"
:
&
PluginBase
{
impl
:
mock
}
,
})
defer
conn
.
Close
()
defer
server
.
Stop
()
grpcClient
:=
proto
.
NewBasePluginClient
(
conn
)
client
:=
basePluginClient
{
client
:
grpcClient
}
defer
client
.
Close
()
raw
,
err
:=
client
.
Dispense
(
"base"
)
if
err
!=
nil
{
t
.
Fatalf
(
"err: %s"
,
err
)
}
impl
,
ok
:=
raw
.
(
BasePlugin
)
if
!
ok
{
t
.
Fatalf
(
"bad: %#v"
,
raw
)
}
config
:=
cty
.
ObjectVal
(
map
[
string
]
cty
.
Value
{
"foo"
:
cty
.
StringVal
(
"v1"
),
...
...
@@ -164,7 +186,7 @@ func TestBasePlugin_SetConfig(t *testing.T) {
})
cdata
,
err
:=
msgpack
.
Marshal
(
config
,
config
.
Type
())
require
.
NoError
(
err
)
require
.
NoError
(
client
.
SetConfig
(
cdata
))
require
.
NoError
(
impl
.
SetConfig
(
cdata
))
require
.
Equal
(
cdata
,
receivedData
)
// Decode the value back
...
...
This diff is collapsed.
Click to expand it.
plugins/base/proto/base.pb.go
+
40
-
43
View file @
1736d934
...
...
@@ -29,20 +29,17 @@ type PluginType int32
const
(
PluginType_UNKNOWN
PluginType
=
0
PluginType_BASE
PluginType
=
1
PluginType_DRIVER
PluginType
=
2
PluginType_DEVICE
PluginType
=
3
)
var
PluginType_name
=
map
[
int32
]
string
{
0
:
"UNKNOWN"
,
1
:
"BASE"
,
2
:
"DRIVER"
,
3
:
"DEVICE"
,
}
var
PluginType_value
=
map
[
string
]
int32
{
"UNKNOWN"
:
0
,
"BASE"
:
1
,
"DRIVER"
:
2
,
"DEVICE"
:
3
,
}
...
...
@@ -51,7 +48,7 @@ func (x PluginType) String() string {
return
proto
.
EnumName
(
PluginType_name
,
int32
(
x
))
}
func
(
PluginType
)
EnumDescriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_base_
d24a6a23488adb59
,
[]
int
{
0
}
return
fileDescriptor_base_
9cc78dc32b158b08
,
[]
int
{
0
}
}
// PluginInfoRequest is used to request the plugins basic information.
...
...
@@ -65,7 +62,7 @@ func (m *PluginInfoRequest) Reset() { *m = PluginInfoRequest{} }
func
(
m
*
PluginInfoRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
PluginInfoRequest
)
ProtoMessage
()
{}
func
(
*
PluginInfoRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_base_
d24a6a23488adb59
,
[]
int
{
0
}
return
fileDescriptor_base_
9cc78dc32b158b08
,
[]
int
{
0
}
}
func
(
m
*
PluginInfoRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_PluginInfoRequest
.
Unmarshal
(
m
,
b
)
...
...
@@ -107,7 +104,7 @@ func (m *PluginInfoResponse) Reset() { *m = PluginInfoResponse{} }
func
(
m
*
PluginInfoResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
PluginInfoResponse
)
ProtoMessage
()
{}
func
(
*
PluginInfoResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_base_
d24a6a23488adb59
,
[]
int
{
1
}
return
fileDescriptor_base_
9cc78dc32b158b08
,
[]
int
{
1
}
}
func
(
m
*
PluginInfoResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_PluginInfoResponse
.
Unmarshal
(
m
,
b
)
...
...
@@ -166,7 +163,7 @@ func (m *ConfigSchemaRequest) Reset() { *m = ConfigSchemaRequest{} }
func
(
m
*
ConfigSchemaRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ConfigSchemaRequest
)
ProtoMessage
()
{}
func
(
*
ConfigSchemaRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_base_
d24a6a23488adb59
,
[]
int
{
2
}
return
fileDescriptor_base_
9cc78dc32b158b08
,
[]
int
{
2
}
}
func
(
m
*
ConfigSchemaRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ConfigSchemaRequest
.
Unmarshal
(
m
,
b
)
...
...
@@ -199,7 +196,7 @@ func (m *ConfigSchemaResponse) Reset() { *m = ConfigSchemaResponse{} }
func
(
m
*
ConfigSchemaResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ConfigSchemaResponse
)
ProtoMessage
()
{}
func
(
*
ConfigSchemaResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_base_
d24a6a23488adb59
,
[]
int
{
3
}
return
fileDescriptor_base_
9cc78dc32b158b08
,
[]
int
{
3
}
}
func
(
m
*
ConfigSchemaResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ConfigSchemaResponse
.
Unmarshal
(
m
,
b
)
...
...
@@ -239,7 +236,7 @@ func (m *SetConfigRequest) Reset() { *m = SetConfigRequest{} }
func
(
m
*
SetConfigRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
SetConfigRequest
)
ProtoMessage
()
{}
func
(
*
SetConfigRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_base_
d24a6a23488adb59
,
[]
int
{
4
}
return
fileDescriptor_base_
9cc78dc32b158b08
,
[]
int
{
4
}
}
func
(
m
*
SetConfigRequest
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_SetConfigRequest
.
Unmarshal
(
m
,
b
)
...
...
@@ -277,7 +274,7 @@ func (m *SetConfigResponse) Reset() { *m = SetConfigResponse{} }
func
(
m
*
SetConfigResponse
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
SetConfigResponse
)
ProtoMessage
()
{}
func
(
*
SetConfigResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_base_
d24a6a23488adb59
,
[]
int
{
5
}
return
fileDescriptor_base_
9cc78dc32b158b08
,
[]
int
{
5
}
}
func
(
m
*
SetConfigResponse
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_SetConfigResponse
.
Unmarshal
(
m
,
b
)
...
...
@@ -452,37 +449,37 @@ var _BasePlugin_serviceDesc = grpc.ServiceDesc{
}
func
init
()
{
proto
.
RegisterFile
(
"github.com/hashicorp/nomad/plugins/base/proto/base.proto"
,
fileDescriptor_base_
d24a6a23488adb59
)
}
var
fileDescriptor_base_
d24a6a23488adb59
=
[]
byte
{
// 4
4
6 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0x94
,
0x92
,
0x
d
f
,
0x8b
,
0xd3
,
0x40
,
0x1
0
,
0xc7
,
0x
2f
,
0xd
7
,
0x
7
8
,
0x
e7
,
0x
cd
,
0x
f
d
,
0x2
0
,
0x
ee
,
0x
29
,
0x
94
,
0x
3c
,
0x
1d
,
0x01
,
0x
e
1
,
0x
90
,
0x
63
,
0x0
3
,
0x
d
5
,
0x
d3
,
0x
13
,
0x5
f
,
0x
ae
,
0x
a9
,
0x
79
,
0x
28
,
0x4
2
,
0x
9
5
,
0x
44
,
0x
ab
,
0x
f8
,
0x
12
,
0x
b6
,
0x
db
,
0x6
d
,
0x
12
,
0x
6c
,
0x
b2
,
0x
6b
,
0x
36
,
0x1
5
,
0x
2a
,
0x
f8
,
0x
e4
,
0x
b3
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
,
0x
f5
,
0x
fb
,
0x
89
,
0x
b5
,
0x
87
,
0x
ee
,
0x
82
,
0x
e9
,
0x0
d
,
0x
43
,
0x
df
,
0x
32
,
0x
10
,
0x
c0
,
0x
c1
,
0x
cb
,
0x6
0
,
0x
3c
,
0x
f
5
,
0x
03
,
0x
6b
,
0x
5f
,
0xc
5
,
0x
fe
,
0x
7
4
,
0x
3c
,
0x
f2
,
0x
ad
,
0x
de
,
0xe
0
,
0x
47
,
0x
0
f
,
0x
c0
,
0x
23
,
0x
92
,
0x
69
,
0x
05
,
0xf
4
,
0x
ad
,
0xd
1
,
0x
aa
,
0x
ee
,
0x
8
9
,
0x
a
e
,
0x
bb
,
0x
5f
,
0x
ae
,
0xf
5
,
0x
57
,
0x
d
8
,
0x
4f
,
0x
77
,
0x
6d
,
0xd
3
,
0x
8
b
,
0x3
8
,
0x
7b
,
0x
e8
,
0x
bb
,
0x
01
,
0x
27
,
0x
6d
,
0xd
7
,
0x
d1
,
0x
b3
,
0x
2
e
,
0x
5
2
,
0x
7f
,
0x
39
,
0x
9f
,
0x
7d
,
0x
b3
,
0x
7b
,
0x
e
3
,
0x
66
,
0x8a
,
0x
a
f
,
0x
7
0
,
0x
b
4
,
0x
71
,
0x
1
9
,
0x
3d
,
0xe9
,
0x
22
,
0xf
4
,
0xe
7
,
0x
3
d
,
0x
ed
,
0x
eb
,
0x
1
d
,
0x
bb
,
0x
9a
,
0x
b7
,
0x
bd
,
0x
c3
,
0x
8f
,
0x
77
,
0x
54
,
0x
71
,
0x
76
,
0x
a0
,
0x
3e
,
0x
8f
,
0x
7f
,
0x05
,
0x00
,
0x00
,
0xff
,
0xff
,
0x73
,
0x54
,
0x60
,
0xaa
,
0x18
,
0x04
,
0x00
,
0x00
,
proto
.
RegisterFile
(
"github.com/hashicorp/nomad/plugins/base/proto/base.proto"
,
fileDescriptor_base_
9cc78dc32b158b08
)
}
var
fileDescriptor_base_
9cc78dc32b158b08
=
[]
byte
{
// 4
3
6 bytes of a g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
0x
76
,
0x
8b
,
0x
9e
,
0x
d4
,
0x3
1
,
0x
fa
,
0xf3
,
0x8a
,
0xf
6
,
0x
e
0
,
0x
4
4
,
0x
55
,
0x
f
9
,
0x
f6
,
0x
f8
,
0xf
2
,
0xe
3
,
0x
1
d
,
0x
55
,
0x
5c
,
0x
5
d
,
0x
a8
,
0x
cf
,
0x
e3
,
0x
5f
,
0x
01
,
0x
00
,
0x
00
,
0x
ff
,
0x
ff
,
0x
0b
,
0x
29
,
0x
9a
,
0x
b0
,
0x
0e
,
0x04
,
0x00
,
0x00
,
}
This diff is collapsed.
Click to expand it.
plugins/base/proto/base.proto
+
0
-
1
View file @
1736d934
...
...
@@ -20,7 +20,6 @@ service BasePlugin {
// PluginType enumerates the type of plugins Nomad supports
enum
PluginType
{
UNKNOWN
=
0
;
BASE
=
1
;
DRIVER
=
2
;
DEVICE
=
3
;
}
...
...
This diff is collapsed.
Click to expand it.
plugins/base/server.go
+
1
-
3
View file @
1736d934
package
shared
package
base
import
(
"fmt"
...
...
@@ -23,8 +23,6 @@ func (b *basePluginServer) PluginInfo(context.Context, *proto.PluginInfoRequest)
var
ptype
proto
.
PluginType
switch
resp
.
Type
{
case
PluginTypeBase
:
ptype
=
proto
.
PluginType_BASE
case
PluginTypeDriver
:
ptype
=
proto
.
PluginType_DRIVER
case
PluginTypeDevice
:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment