mirror of
https://github.com/rclone/rclone.git
synced 2025-01-03 12:59:32 +01:00
swift: add OS_TENANT_ID to config
This commit is contained in:
parent
cacae8d12d
commit
f60e2a7aac
@ -83,7 +83,10 @@ func init() {
|
|||||||
Help: "User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME)",
|
Help: "User domain - optional (v3 auth) (OS_USER_DOMAIN_NAME)",
|
||||||
}, {
|
}, {
|
||||||
Name: "tenant",
|
Name: "tenant",
|
||||||
Help: "Tenant name - optional for v1 auth, required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME)",
|
Help: "Tenant name - optional for v1 auth, this or tenant_id required otherwise (OS_TENANT_NAME or OS_PROJECT_NAME)",
|
||||||
|
}, {
|
||||||
|
Name: "tenant_id",
|
||||||
|
Help: "Tenant ID - optional for v1 auth, this or tenant required otherwise (OS_TENANT_ID)",
|
||||||
}, {
|
}, {
|
||||||
Name: "tenant_domain",
|
Name: "tenant_domain",
|
||||||
Help: "Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME)",
|
Help: "Tenant domain - optional (v3 auth) (OS_PROJECT_DOMAIN_NAME)",
|
||||||
@ -191,6 +194,7 @@ func swiftConnection(name string) (*swift.Connection, error) {
|
|||||||
UserId: fs.ConfigFileGet(name, "user_id"),
|
UserId: fs.ConfigFileGet(name, "user_id"),
|
||||||
Domain: fs.ConfigFileGet(name, "domain"),
|
Domain: fs.ConfigFileGet(name, "domain"),
|
||||||
Tenant: fs.ConfigFileGet(name, "tenant"),
|
Tenant: fs.ConfigFileGet(name, "tenant"),
|
||||||
|
TenantId: fs.ConfigFileGet(name, "tenant_id"),
|
||||||
TenantDomain: fs.ConfigFileGet(name, "tenant_domain"),
|
TenantDomain: fs.ConfigFileGet(name, "tenant_domain"),
|
||||||
Region: fs.ConfigFileGet(name, "region"),
|
Region: fs.ConfigFileGet(name, "region"),
|
||||||
// StorageUrl is set below
|
// StorageUrl is set below
|
||||||
@ -372,11 +376,11 @@ func (f *Fs) list(dir string, recurse bool, fn addEntryFn) error {
|
|||||||
d := fs.NewDir(remote, time.Time{}).SetSize(object.Bytes)
|
d := fs.NewDir(remote, time.Time{}).SetSize(object.Bytes)
|
||||||
err = fn(d)
|
err = fn(d)
|
||||||
} else {
|
} else {
|
||||||
|
// newObjectWithInfo does a full metadata read on 0 size objects which might be dynamic large objects
|
||||||
o, err := f.newObjectWithInfo(remote, object)
|
o, err := f.newObjectWithInfo(remote, object)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Storable does a full metadata read on 0 size objects which might be dynamic large objects
|
|
||||||
if o.Storable() {
|
if o.Storable() {
|
||||||
err = fn(o)
|
err = fn(o)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user