-
Notifications
You must be signed in to change notification settings - Fork 279
rgw/admin: support default-placement #1133
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
Conversation
|
@thejoeejoee Is there a reason why you have kept this is in draft state? |
|
@Mergifyio rebase |
✅ Branch has been successfully rebased |
f3cfc0b to
3adc34f
Compare
|
@thejoeejoee Are you planning to take this further? |
|
@thejoeejoee We would like to consider the change but the commit message lacks the |
a37f734 to
c2aadd7
Compare
|
@Mergifyio rebase |
✅ Branch has been successfully rebased |
c2aadd7 to
fe94903
Compare
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.
There's even more that we could do to test default-placement other than the MockClient.
index 452fbba..82ef701 100644
--- a/rgw/admin/user.go
+++ b/rgw/admin/user.go
@@ -19,7 +19,7 @@ type User struct {
SwiftKeys []SwiftKeySpec `json:"swift_keys" url:"-"`
Caps []UserCapSpec `json:"caps"`
OpMask string `json:"op_mask" url:"op-mask"`
- DefaultPlacement string `json:"default_placement"`
+ DefaultPlacement string `json:"default_placement" url:"default-placement"`
DefaultStorageClass string `json:"default_storage_class"`
PlacementTags []interface{} `json:"placement_tags"`
BucketQuota QuotaSpec `json:"bucket_quota"`
diff --git a/rgw/admin/user_test.go b/rgw/admin/user_test.go
index adc4f1f..7f2deab 100644
--- a/rgw/admin/user_test.go
+++ b/rgw/admin/user_test.go
@@ -107,7 +107,7 @@ func (suite *RadosGWTestSuite) TestUser() {
suite.T().Run("user creation success", func(_ *testing.T) {
usercaps := "users=read"
- user, err := co.CreateUser(context.Background(), User{ID: "leseb", DisplayName: "This is leseb", Email: "leseb@example.com", UserCaps: usercaps, OpMask: "delete"})
+ user, err := co.CreateUser(context.Background(), User{ID: "leseb", DisplayName: "This is leseb", Email: "leseb@example.com", UserCaps: usercaps, OpMask: "delete", DefaultPlacement: "default-placement"})
assert.NoError(suite.T(), err)
assert.Equal(suite.T(), "leseb@example.com", user.Email)
})
@@ -119,6 +119,7 @@ func (suite *RadosGWTestSuite) TestUser() {
assert.Equal(suite.T(), "users", user.Caps[0].Type)
assert.Equal(suite.T(), "read", user.Caps[0].Perm)
assert.Equal(suite.T(), "delete", user.OpMask)
+ assert.Equal(suite.T(), "default-placement", user.DefaultPlacement)
os.Setenv("LESEB_ACCESS_KEY", user.Keys[0].AccessKey)
})@thejoeejoee What do you think?
Would you mind including the additional change from #1133 (review)? |
Signed-off-by: Josef Kolář <josef.kolar@firma.seznam.cz>
5467a06 to
372f7ec
Compare
anoopcs9
left a comment
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.
lgtm, thanks.
phlogistonjohn
left a comment
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.
Checklist
//go:build ceph_previewmake api-updateto record new APIsNew or infrequent contributors may want to review the go-ceph Developer's Guide including the section on how we track API Status and the API Stability Plan.
The go-ceph project uses mergify. View the mergify command guide for information on how to interact with mergify. Add a comment with
@Mergifyiorebaseto rebase your PR when github indicates that the PR is out of date with the base branch.