GetForSession now expects a *types.Session instead of a string

This commit is contained in:
Jonathan Leibiusky @xetorthio
2017-09-20 17:29:58 -03:00
parent 495219cdec
commit 2a261094ff
14 changed files with 106 additions and 36 deletions

View File

@@ -21,7 +21,7 @@ func NewOverlaySessionProvisioner(df docker.FactoryApi) SessionProvisionerApi {
}
func (p *overlaySessionProvisioner) SessionNew(s *types.Session) error {
dockerClient, err := p.dockerFactory.GetForSession(s.Id)
dockerClient, err := p.dockerFactory.GetForSession(s)
if err != nil {
// We assume we are out of capacity
return fmt.Errorf("Out of capacity")
@@ -52,7 +52,7 @@ func (p *overlaySessionProvisioner) SessionNew(s *types.Session) error {
}
func (p *overlaySessionProvisioner) SessionClose(s *types.Session) error {
// Disconnect L2 router from the network
dockerClient, err := p.dockerFactory.GetForSession(s.Id)
dockerClient, err := p.dockerFactory.GetForSession(s)
if err != nil {
log.Println(err)
return err