Skip to content

Commit d5b39c0

Browse files
committed
parse sandbox key for sandbox ID
1 parent 59a3a10 commit d5b39c0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

plugin/driver/driver.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"net/http"
2525
"os/exec"
2626
"runtime"
27+
"strings"
2728

2829
Log "github.com/Sirupsen/logrus"
2930
"github.com/docker/libnetwork/drivers/remote/api"
@@ -346,7 +347,8 @@ func (driver *driver) joinEndpoint(w http.ResponseWriter, r *http.Request) {
346347
}
347348

348349
if push_metaconfig {
349-
AddMetaconfig(domainid, bridgeID, j.SandboxKey[22:], endID, mac)
350+
SandBoxID := strings.Split(j.SandboxKey, "/")
351+
AddMetaconfig(domainid, bridgeID, SandBoxID[len(SandBoxID)-1], endID, mac)
350352
}
351353

352354
objectResponse(w, res)
@@ -415,7 +417,6 @@ func (driver *driver) leaveEndpoint(w http.ResponseWriter, r *http.Request) {
415417
if err := cmd.Run(); err != nil {
416418
Log.Error("Error thrown: ", err)
417419
}
418-
Log.Infof("output: %+v\n", delport.String())
419420
if delport.String() != "" {
420421
Log.Error(fmt.Errorf(delport.String()))
421422
errorResponse(w, "Unable to off-board container from PLUMgrid")

0 commit comments

Comments
 (0)