-
Notifications
You must be signed in to change notification settings - Fork 368
Add organization / space quota audit events #4740
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
c87f139 to
ddf3296
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.
Pull request overview
This pull request adds comprehensive audit event support for organization quota and space quota lifecycle operations in the Cloud Controller API.
Key Changes:
- Introduces 9 new audit event types (4 for organization quotas, 5 for space quotas)
- Creates event repository classes to record audit events for quota operations
- Updates action classes to accept user audit information and record events
- Updates controllers to pass user audit information to action classes
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
app/repositories/event_types.rb |
Adds 9 new event type constants for organization and space quota operations |
app/repositories/organization_quota_event_repository.rb |
New repository for recording organization quota audit events (create, update, delete, apply) |
app/repositories/space_quota_event_repository.rb |
New repository for recording space quota audit events (create, update, delete, apply, remove) |
app/actions/organization_quotas_create.rb |
Updated to accept user_audit_info and record create events |
app/actions/organization_quotas_update.rb |
Updated to accept user_audit_info and record update events |
app/actions/organization_quota_delete.rb |
Updated to accept user_audit_info and record delete events |
app/actions/organization_quota_apply.rb |
Updated to accept user_audit_info and record apply events for each organization |
app/actions/space_quotas_create.rb |
Updated to accept user_audit_info and record create events |
app/actions/space_quota_update.rb |
Updated to accept user_audit_info and record update events |
app/actions/space_quota_delete.rb |
Updated to accept user_audit_info and record delete events |
app/actions/space_quota_apply.rb |
Updated to accept user_audit_info and record apply events for each space |
app/actions/space_quota_unapply.rb |
Updated to accept user_audit_info and record remove events |
app/controllers/v3/organization_quotas_controller.rb |
Updated to pass user_audit_info to all quota action classes |
app/controllers/v3/space_quotas_controller.rb |
Updated to pass user_audit_info to all quota action classes |
spec/unit/repositories/event_types_spec.rb |
Updated expected event types list to include new quota events |
spec/unit/actions/organization_quotas_create_spec.rb |
Added test coverage for audit event creation |
spec/unit/actions/organization_quotas_update_spec.rb |
Updated all test calls and added audit event test coverage |
spec/unit/actions/organization_quota_delete_spec.rb |
Updated initialization and added audit event test coverage |
spec/unit/actions/organization_quota_apply_spec.rb |
Updated initialization and added audit event test coverage including multiple organizations |
spec/unit/actions/space_quotas_create_spec.rb |
Added test coverage for audit event creation |
spec/unit/actions/space_quota_update_spec.rb |
Updated all test calls and added audit event test coverage |
spec/unit/actions/space_quota_delete_spec.rb |
Updated initialization and added audit event test coverage |
spec/unit/actions/space_quota_apply_spec.rb |
Updated initialization and added audit event test coverage including multiple spaces |
spec/unit/actions/space_quota_unapply_spec.rb |
Updated to use instance method and added audit event test coverage |
docs/v3/source/includes/resources/audit_events/_header.md.erb |
Added documentation for new quota audit event types |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Changes in cloud_controller_ng:
- Add organization / space quota audit events
PR: cloudfoundry/cloud_controller_ng#4740
Author: Sam Gunaratne <385176+Samze@users.noreply.github.com>
Thanks for contributing to cloud_controller_ng. To speed up the process of reviewing your pull request please provide us with:
A short explanation of the proposed change:
An explanation of the use cases your change solves
Links to any other associated PRs
I have reviewed the contributing guide
I have viewed, signed, and submitted the Contributor License Agreement
I have made this pull request to the
mainbranchI have run all the unit tests using
bundle exec rakeI have run CF Acceptance Tests