|  | @@ -22,21 +22,14 @@ import (
 | 
	
		
			
				|  |  |  	"github.com/pkg/errors"
 | 
	
		
			
				|  |  |  	"github.com/spf13/cobra"
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +	"github.com/docker/api/azure"
 | 
	
		
			
				|  |  |  	"github.com/docker/api/client"
 | 
	
		
			
				|  |  |  	"github.com/docker/api/context/store"
 | 
	
		
			
				|  |  |  	"github.com/docker/api/errdefs"
 | 
	
		
			
				|  |  |  )
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -// AciCreateOpts options for creating ACI context
 | 
	
		
			
				|  |  | -type AciCreateOpts struct {
 | 
	
		
			
				|  |  | -	Description    string
 | 
	
		
			
				|  |  | -	Location       string
 | 
	
		
			
				|  |  | -	SubscriptionID string
 | 
	
		
			
				|  |  | -	ResourceGroup  string
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  func createAciCommand() *cobra.Command {
 | 
	
		
			
				|  |  | -	var opts AciCreateOpts
 | 
	
		
			
				|  |  | +	var opts azure.ContextParams
 | 
	
		
			
				|  |  |  	cmd := &cobra.Command{
 | 
	
		
			
				|  |  |  		Use:   "aci CONTEXT [flags]",
 | 
	
		
			
				|  |  |  		Short: "Create a context for Azure Container Instances",
 | 
	
	
		
			
				|  | @@ -54,7 +47,7 @@ func createAciCommand() *cobra.Command {
 | 
	
		
			
				|  |  |  	return cmd
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -func runCreateAci(ctx context.Context, contextName string, opts AciCreateOpts) error {
 | 
	
		
			
				|  |  | +func runCreateAci(ctx context.Context, contextName string, opts azure.ContextParams) error {
 | 
	
		
			
				|  |  |  	if contextExists(ctx, contextName) {
 | 
	
		
			
				|  |  |  		return errors.Wrapf(errdefs.ErrAlreadyExists, "context %s", contextName)
 | 
	
		
			
				|  |  |  	}
 | 
	
	
		
			
				|  | @@ -66,7 +59,7 @@ func runCreateAci(ctx context.Context, contextName string, opts AciCreateOpts) e
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -func getAciContextData(ctx context.Context, opts AciCreateOpts) (interface{}, string, error) {
 | 
	
		
			
				|  |  | +func getAciContextData(ctx context.Context, opts azure.ContextParams) (interface{}, string, error) {
 | 
	
		
			
				|  |  |  	cs, err := client.GetCloudService(ctx, store.AciContextType)
 | 
	
		
			
				|  |  |  	if err != nil {
 | 
	
		
			
				|  |  |  		return nil, "", errors.Wrap(err, "cannot connect to ACI backend")
 |