New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial support for external authentication via Macaroons #3604

Merged
merged 10 commits into from Oct 18, 2017

lxd-benchmark: use NewConfig to get a default configuration

Signed-off-by: Alberto Donato <alberto.donato@canonical.com>
  • Loading branch information...
albertodonato committed Oct 6, 2017
commit 63005bd2efc8db0ee9e46206f183359a0af3defe
@@ -225,7 +225,7 @@ func ensureImage(c lxd.ContainerServer, image string) (string, error) {
var fingerprint string
if strings.Contains(image, ":") {
defaultConfig := config.DefaultConfig
defaultConfig := config.NewConfig("", true)

This comment has been minimized.

@stgraber

stgraber Oct 6, 2017

Member

Does that mean that config.DefaultConfig is no longer going to be working?

If so, that's an API regression in the client library and therefore not acceptable. If NewConfig() is needed to get the new feature but backward compatibility is kept with DefaultConfig, then that's fine.

@stgraber

stgraber Oct 6, 2017

Member

Does that mean that config.DefaultConfig is no longer going to be working?

If so, that's an API regression in the client library and therefore not acceptable. If NewConfig() is needed to get the new feature but backward compatibility is kept with DefaultConfig, then that's fine.

This comment has been minimized.

@albertodonato

albertodonato Oct 6, 2017

Contributor

This should be ok. The reason for NewConfig() is to add the cookiejar, which is only needed if you enable macaroon auth.

Ideally, though, we should deprecate use of DefaultConfig and always go through NewConfig(), in case we need to add logic.

@albertodonato

albertodonato Oct 6, 2017

Contributor

This should be ok. The reason for NewConfig() is to add the cookiejar, which is only needed if you enable macaroon auth.

Ideally, though, we should deprecate use of DefaultConfig and always go through NewConfig(), in case we need to add logic.

defaultConfig.UserAgent = version.UserAgent
remote, fp, err := defaultConfig.ParseRemote(image)
ProTip! Use n and p to navigate between commits in a pull request.