oracle-object-storage: minor docs update

This commit is contained in:
Manoj Ghosh 2022-10-16 23:19:23 -07:00 committed by Nick Craig-Wood
parent 5e59e7f442
commit daf3162bcf
6 changed files with 59 additions and 8 deletions

View file

@ -31,7 +31,7 @@ var commandHelp = []fs.CommandHelp{{
Usage Examples:
rclone backend rename oss:bucket relative-object-path-under-bucket object-new-name
rclone backend rename oos:bucket relative-object-path-under-bucket object-new-name
`,
Opts: nil,
}, {
@ -39,7 +39,7 @@ Usage Examples:
Short: "List the unfinished multipart uploads",
Long: `This command lists the unfinished multipart uploads in JSON format.
rclone backend list-multipart-uploads oss:bucket/path/to/object
rclone backend list-multipart-uploads oos:bucket/path/to/object
It returns a dictionary of buckets with values as lists of unfinished
multipart uploads.
@ -68,8 +68,8 @@ max-age which defaults to 24 hours.
Note that you can use -i/--dry-run with this command to see what it
would do.
rclone backend cleanup oss:bucket/path/to/object
rclone backend cleanup -o max-age=7w oss:bucket/path/to/object
rclone backend cleanup oos:bucket/path/to/object
rclone backend cleanup -o max-age=7w oos:bucket/path/to/object
Durations are parsed as per the rest of rclone, 2h, 7d, 7w etc.
`,

View file

@ -63,6 +63,7 @@ type Options struct {
CopyTimeout fs.Duration `config:"copy_timeout"`
StorageTier string `config:"storage_tier"`
LeavePartsOnError bool `config:"leave_parts_on_error"`
NoCheckBucket bool `config:"no_check_bucket"`
}
func newOptions() []fs.Option {
@ -222,6 +223,18 @@ It should be set to true for resuming uploads across different sessions.
WARNING: Storing parts of an incomplete multipart upload counts towards space usage on object storage and will add
additional costs if not cleaned up.
`,
Default: false,
Advanced: true,
}, {
Name: "no_check_bucket",
Help: `If set, don't attempt to check the bucket exists or create it.
This can be useful when trying to minimise the number of transactions
rclone does if you know the bucket exists already.
It can also be needed if the user you are using does not have bucket
creation permissions.
`,
Default: false,
Advanced: true,

View file

@ -148,12 +148,12 @@ func (f *Fs) Root() string {
// String converts this Fs to a string
func (f *Fs) String() string {
if f.rootBucket == "" {
return "oss:root"
return "oos:root"
}
if f.rootDirectory == "" {
return fmt.Sprintf("oss:bucket %s", f.rootBucket)
return fmt.Sprintf("oos:bucket %s", f.rootBucket)
}
return fmt.Sprintf("oss:bucket %s, path %s", f.rootBucket, f.rootDirectory)
return fmt.Sprintf("oos:bucket %s, path %s", f.rootBucket, f.rootDirectory)
}
// Features returns the optional features of this Fs
@ -473,6 +473,9 @@ func (f *Fs) Mkdir(ctx context.Context, dir string) error {
// makeBucket creates the bucket if it doesn't exist
func (f *Fs) makeBucket(ctx context.Context, bucketName string) error {
if f.opt.NoCheckBucket {
return nil
}
return f.cache.Create(bucketName, func() error {
details := objectstorage.CreateBucketDetails{
Name: common.String(bucketName),