yet another rebase

Signed-off-by: aiordache <anca.iordache@docker.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
aiordache 2020-04-28 15:11:12 +02:00 committed by Nicolas De Loof
parent cec44fbb7b
commit 4a6fec63d2
No known key found for this signature in database
GPG Key ID: 9858809D6F8F6E7E
1 changed files with 3 additions and 6 deletions

View File

@ -1,11 +1,8 @@
package amazon
import (
<<<<<<< HEAD
"context"
=======
"errors"
>>>>>>> a0701b8... move to sdk
"fmt"
"strings"
@ -87,12 +84,12 @@ func (c client) Convert(ctx context.Context, project *compose.Project) (*cloudfo
return template, nil
}
func (c client) GetVPC(project *compose.Project) (string, error) {
func (c client) GetVPC(ctx context.Context, project *compose.Project) (string, error) {
//check compose file for the default external network
if net, ok := project.Networks["default"]; ok {
if net.External.External {
vpc := net.Name
ok, err := c.api.VpcExists(vpc)
ok, err := c.api.VpcExists(ctx, vpc)
if err != nil {
return "", err
}
@ -102,7 +99,7 @@ func (c client) GetVPC(project *compose.Project) (string, error) {
return vpc, nil
}
}
defaultVPC, err := c.api.GetDefaultVPC()
defaultVPC, err := c.api.GetDefaultVPC(ctx)
if err != nil {
return "", err
}