Add tenant parameter for swift - fixes #13

This commit is contained in:
Nick Craig-Wood 2014-11-24 12:05:10 +00:00
parent 839133c5e1
commit ee6b39aa6c
1 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,9 @@ func init() {
Help: "Memset Memstore UK v2",
Value: "https://auth.storage.memset.com/v2.0",
}},
}, {
Name: "tenant",
Help: "Tenant name - optional",
},
// snet = flag.Bool("swift-snet", false, "Use internal service network") // FIXME not implemented
},
@ -111,6 +114,7 @@ func swiftConnection(name string) (*swift.Connection, error) {
ApiKey: apiKey,
AuthUrl: authUrl,
UserAgent: fs.UserAgent,
Tenant: fs.ConfigFile.MustValue(name, "tenant"),
}
err := c.Authenticate()
if err != nil {