Fix Azure login : allow getting a backend when no corresponding context already exists with an explicit call from the login command. Will be usefull next for context creation with azure interactive things

This commit is contained in:
Guillaume Tardif 2020-05-28 17:37:59 +02:00
parent 832651b1dc
commit 01aaec2dbe
8 changed files with 84 additions and 62 deletions

View file

@ -26,14 +26,12 @@ func (a *apiService) ComposeService() compose.Service {
return &a.composeService
}
func (a *apiService) CloudService() cloud.Service {
return nil
func init() {
backend.Register("example", "example", service, cloud.NotImplementedCloudService)
}
func init() {
backend.Register("example", "example", func(ctx context.Context) (backend.Service, error) {
return &apiService{}, nil
})
func service(ctx context.Context) (backend.Service, error) {
return &apiService{}, nil
}
type containerService struct{}