driver: allow setting driver opts

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2019-07-31 17:25:25 -07:00
parent 096d1befc9
commit 75b80c277f
5 changed files with 40 additions and 10 deletions

View File

@ -21,6 +21,7 @@ type Node struct {
Platforms []specs.Platform
Flags []string
ConfigFile string
DriverOpts map[string]string
}
func (ng *NodeGroup) Leave(name string) error {
@ -35,7 +36,7 @@ func (ng *NodeGroup) Leave(name string) error {
return nil
}
func (ng *NodeGroup) Update(name, endpoint string, platforms []string, endpointsSet bool, actionAppend bool, flags []string, configFile string) error {
func (ng *NodeGroup) Update(name, endpoint string, platforms []string, endpointsSet bool, actionAppend bool, flags []string, configFile string, do map[string]string) error {
i := ng.findNode(name)
if i == -1 && !actionAppend {
if len(ng.Nodes) > 0 {
@ -82,6 +83,7 @@ func (ng *NodeGroup) Update(name, endpoint string, platforms []string, endpoints
Platforms: pp,
ConfigFile: configFile,
Flags: flags,
DriverOpts: do,
}
ng.Nodes = append(ng.Nodes, n)