@@ -27,7 +27,6 @@ import (
27
27
"github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance"
28
28
"github.com/Azure/go-autorest/autorest"
29
29
"github.com/Azure/go-autorest/autorest/to"
30
- "github.com/compose-spec/compose-go/cli"
31
30
"github.com/compose-spec/compose-go/types"
32
31
"github.com/pkg/errors"
33
32
"github.com/sirupsen/logrus"
@@ -386,11 +385,7 @@ type aciComposeService struct {
386
385
ctx store.AciContext
387
386
}
388
387
389
- func (cs * aciComposeService ) Up (ctx context.Context , opts * cli.ProjectOptions ) error {
390
- project , err := cli .ProjectFromOptions (opts )
391
- if err != nil {
392
- return err
393
- }
388
+ func (cs * aciComposeService ) Up (ctx context.Context , project * types.Project ) error {
394
389
logrus .Debugf ("Up on project with name %q\n " , project .Name )
395
390
groupDefinition , err := convert .ToContainerGroup (ctx , cs .ctx , * project )
396
391
addTag (& groupDefinition , composeContainerTag )
@@ -401,21 +396,10 @@ func (cs *aciComposeService) Up(ctx context.Context, opts *cli.ProjectOptions) e
401
396
return createOrUpdateACIContainers (ctx , cs .ctx , groupDefinition )
402
397
}
403
398
404
- func (cs * aciComposeService ) Down (ctx context.Context , opts * cli.ProjectOptions ) error {
405
- var project types.Project
406
-
407
- if opts .Name != "" {
408
- project = types.Project {Name : opts .Name }
409
- } else {
410
- fullProject , err := cli .ProjectFromOptions (opts )
411
- if err != nil {
412
- return err
413
- }
414
- project = * fullProject
415
- }
416
- logrus .Debugf ("Down on project with name %q\n " , project .Name )
399
+ func (cs * aciComposeService ) Down (ctx context.Context , project string ) error {
400
+ logrus .Debugf ("Down on project with name %q\n " , project )
417
401
418
- cg , err := deleteACIContainerGroup (ctx , cs .ctx , project . Name )
402
+ cg , err := deleteACIContainerGroup (ctx , cs .ctx , project )
419
403
if err != nil {
420
404
return err
421
405
}
@@ -426,15 +410,15 @@ func (cs *aciComposeService) Down(ctx context.Context, opts *cli.ProjectOptions)
426
410
return err
427
411
}
428
412
429
- func (cs * aciComposeService ) Ps (ctx context.Context , opts * cli. ProjectOptions ) ([]compose.ServiceStatus , error ) {
413
+ func (cs * aciComposeService ) Ps (ctx context.Context , project string ) ([]compose.ServiceStatus , error ) {
430
414
return nil , errdefs .ErrNotImplemented
431
415
}
432
416
433
- func (cs * aciComposeService ) Logs (ctx context.Context , opts * cli. ProjectOptions , w io.Writer ) error {
417
+ func (cs * aciComposeService ) Logs (ctx context.Context , project string , w io.Writer ) error {
434
418
return errdefs .ErrNotImplemented
435
419
}
436
420
437
- func (cs * aciComposeService ) Convert (ctx context.Context , opts * cli. ProjectOptions ) ([]byte , error ) {
421
+ func (cs * aciComposeService ) Convert (ctx context.Context , project * types. Project ) ([]byte , error ) {
438
422
return nil , errdefs .ErrNotImplemented
439
423
}
440
424
0 commit comments