Skip to content

feat: comprehensive security group firewall rules management system#2065

Merged
cb-github-robot merged 1 commit intocloud-barista:mainfrom
seokho-son:main
Aug 2, 2025
Merged

feat: comprehensive security group firewall rules management system#2065
cb-github-robot merged 1 commit intocloud-barista:mainfrom
seokho-son:main

Conversation

@seokho-son
Copy link
Copy Markdown
Member

image

Core Model Redesign:

  • Add TbFirewallRuleReq struct with Ports field supporting comma-separated multiple ports/ranges
  • Refactor TbFirewallRuleInfo to use single Port field for individual rule representation
  • Add comprehensive response models: TbSecurityGroupUpdateResponse, TbRestWrapperSecurityGroupUpdateResponse, TbUpdateSummary
  • Add MciAssociatedResourceList struct for complete MCI-resource relationship tracking

Backend Logic Enhancement:

  • Implement ConvertFirewallRuleRequestObjToInfoObjs for flexible multi-port request conversion
  • Major UpdateFirewallRules refactor with CSP-aware conditional processing (sequential for NCP, parallel for others)
  • Add UpdateMultipleFirewallRules with goroutine-based parallel processing and comprehensive error handling
  • Enhance diffFirewallRules with duplicate removal and default rule protection logic
  • Improve ICMP protocol handling and port validation with proper empty port support
  • Add GetMciAssociatedResources for complete MCI resource dependency analysis

REST API Complete Redesign:

  • Remove TbFirewallRulesWrapper, standardize on TbSecurityGroupUpdateReq across all endpoints
  • Comprehensive POST/DELETE firewall rule API redesign with detailed Swagger documentation
  • Add RestGetMciAssociatedResources and RestPutMciAssociatedSecurityGroups for MCI-level operations
  • Implement unified response format with TbSecurityGroupUpdateResponse for consistency
  • Add clear REST semantics: POST for adding rules, DELETE for removing specific rules, PUT for replacing all rules

Infrastructure & Documentation:

  • Add new API endpoint routing and comprehensive Swagger documentation updates
  • Support batch operations with detailed success/failure tracking and summary reporting
  • Enhanced error handling with provider-specific processing strategies for improved stability

…verhaul

Core Model Redesign:
- Add TbFirewallRuleReq struct with Ports field supporting comma-separated multiple ports/ranges
- Refactor TbFirewallRuleInfo to use single Port field for individual rule representation
- Add comprehensive response models: TbSecurityGroupUpdateResponse, TbRestWrapperSecurityGroupUpdateResponse, TbUpdateSummary
- Add MciAssociatedResourceList struct for complete MCI-resource relationship tracking

Backend Logic Enhancement:
- Implement ConvertFirewallRuleRequestObjToInfoObjs for flexible multi-port request conversion
- Major UpdateFirewallRules refactor with CSP-aware conditional processing (sequential for NCP, parallel for others)
- Add UpdateMultipleFirewallRules with goroutine-based parallel processing and comprehensive error handling
- Enhance diffFirewallRules with duplicate removal and default rule protection logic
- Improve ICMP protocol handling and port validation with proper empty port support
- Add GetMciAssociatedResources for complete MCI resource dependency analysis

REST API Complete Redesign:
- Remove TbFirewallRulesWrapper, standardize on TbSecurityGroupUpdateReq across all endpoints
- Comprehensive POST/DELETE firewall rule API redesign with detailed Swagger documentation
- Add RestGetMciAssociatedResources and RestPutMciAssociatedSecurityGroups for MCI-level operations
- Implement unified response format with TbSecurityGroupUpdateResponse for consistency
- Add clear REST semantics: POST for adding rules, DELETE for removing specific rules, PUT for replacing all rules

Infrastructure & Documentation:
- Add new API endpoint routing and comprehensive Swagger documentation updates
- Support batch operations with detailed success/failure tracking and summary reporting
- Enhanced error handling with provider-specific processing strategies for improved stability

Signed-off-by: Seokho Son <shsongist@gmail.com>
@seokho-son seokho-son requested a review from yunkon-kim as a code owner August 1, 2025 10:15
@seokho-son
Copy link
Copy Markdown
Member Author

/approve

@github-actions github-actions bot added the approved This PR is approved and will be merged soon. label Aug 2, 2025
@cb-github-robot cb-github-robot merged commit 53beafc into cloud-barista:main Aug 2, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved This PR is approved and will be merged soon.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants