-
Notifications
You must be signed in to change notification settings - Fork 415
feat(storage): add support for bucket ip filter #15250
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15250 +/- ##
==========================================
+ Coverage 92.93% 92.94% +0.01%
==========================================
Files 2394 2396 +2
Lines 215384 215803 +419
==========================================
+ Hits 200163 200574 +411
- Misses 15221 15229 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -192,6 +192,49 @@ Status ParseIamConfiguration(BucketMetadata& meta, nlohmann::json const& json) { | |||
return Status{}; | |||
} | |||
|
|||
Status ParseIpFilter(BucketMetadata& meta, nlohmann::json const& json) { |
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 code can be made more readable by using from_json semantics.
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.
Going to leave this for the time being as it follows the coding patterns in the rest of the file. Longer term we may want to refactor to use to/from_json.
@@ -402,6 +445,38 @@ void ToJsonIamConfiguration(nlohmann::json& json, BucketMetadata const& meta) { | |||
json["iamConfiguration"] = std::move(value); | |||
} | |||
|
|||
void ToJsonIpFilter(nlohmann::json& json, BucketMetadata const& meta) { |
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.
Ditto, to_json semantics seems to be potential candidate here.
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.
Going to leave this for the time being as it follows the coding patterns in the rest of the file. Longer term we may want to refactor to use to/from_json.
@@ -209,6 +209,45 @@ Status PatchIamConfig(Bucket& b, nlohmann::json const& i) { | |||
return Status{}; | |||
} | |||
|
|||
Status PatchIpFilter(Bucket& b, nlohmann::json const& p) { | |||
if (p.is_null()) { |
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.
from_json
seems more suitable
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.
Going to leave this for the time being as it follows the coding patterns in the rest of the file. Longer term we may want to refactor to use to/from_json.
1d58a67
to
20e6563
Compare
20e6563
to
8c3d624
Compare
8c3d624
to
7b8b0e3
Compare
This change is