-
Notifications
You must be signed in to change notification settings - Fork 76
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
add object storage functions #74
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly just a few unchecked errors and missing newlines after formatted print statements.
cmd/objectStorage.go
Outdated
objstorage, err := client.ObjectStorage.Create(context.TODO(), objectStoreClusterID, label) | ||
|
||
if err != nil { | ||
fmt.Printf("error creating object storage : %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt.Printf("error creating object storage : %v", err) | |
fmt.Printf("error creating object storage : %v\n", err) |
cmd/objectStorage.go
Outdated
os.Exit(1) | ||
} | ||
|
||
fmt.Printf("created object storage - ID : %v", objstorage.ID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt.Printf("created object storage - ID : %v", objstorage.ID) | |
fmt.Printf("created object storage - ID : %v\n", objstorage.ID) |
cmd/objectStorage.go
Outdated
var objStorageLabelSet = &cobra.Command{ | ||
Use: "label <objectStorageID>", | ||
Short: "change the label for object storage subscription", | ||
Long: ``, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
cmd/objectStorage.go
Outdated
|
||
err := client.ObjectStorage.SetLabel(context.TODO(), id, label) | ||
if err != nil { | ||
fmt.Printf("error setting label : %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt.Printf("error setting label : %v", err) | |
fmt.Printf("error setting label : %v\n", err) |
cmd/objectStorage.go
Outdated
cluster, err := client.ObjectStorage.ListCluster(context.TODO()) | ||
|
||
if err != nil { | ||
fmt.Printf("error getting object storage clusters : %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt.Printf("error getting object storage clusters : %v", err) | |
fmt.Printf("error getting object storage clusters : %v\n", err) |
cmd/objectStorage.go
Outdated
Short: "regenerate the S3 API keys of an object storage subscription", | ||
Long: ``, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
id, _ := strconv.Atoi(args[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't checked either.
cmd/objectStorage.go
Outdated
s3Keys, err := client.ObjectStorage.RegenerateKeys(context.TODO(), id, s3AccessKey) | ||
|
||
if err != nil { | ||
fmt.Printf("error regenerating object storage keys : %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt.Printf("error regenerating object storage keys : %v", err) | |
fmt.Printf("error regenerating object storage keys : %v\n", err) |
cmd/objectStorage.go
Outdated
err := client.ObjectStorage.Delete(context.TODO(), id) | ||
|
||
if err != nil { | ||
fmt.Printf("error destroying object storage subscription : %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt.Printf("error destroying object storage subscription : %v", err) | |
fmt.Printf("error destroying object storage subscription : %v\n", err) |
cmd/objectStorage.go
Outdated
Short: "destroys an object storage subscription", | ||
Long: ``, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
id, _ := strconv.Atoi(args[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too.
|
Description
Related Issues
Checklist: