Skip to content

Conversation

@usmanTheCoder
Copy link
Contributor

• Add BSF service client for PCF binding lifecycle:

  • Create bsf_service.go with CreatePCFBinding, DeletePCFBinding functions
  • Integrate BSF client into consumer.go for binding operations
  • Add BSF service configuration and discovery support

• Enhance UE context management:

  • Update ue.go with BSF binding ID tracking
  • Integrate binding creation/deletion in SM policy lifecycle
  • Add proper cleanup of BSF bindings on session termination

• Update SM policy processor:

  • Modify smpolicy.go to use BSF for binding management
  • Add BSF binding creation during policy establishment
  • Ensure proper binding cleanup on policy deletion

This integration enables PCF to properly manage bindings with BSF according to 3GPP TS 29.521 specifications for enhanced policy control.

• Add BSF service client for PCF binding lifecycle:
  - Create bsf_service.go with CreatePCFBinding, DeletePCFBinding functions
  - Integrate BSF client into consumer.go for binding operations
  - Add BSF service configuration and discovery support

• Enhance UE context management:
  - Update ue.go with BSF binding ID tracking
  - Integrate binding creation/deletion in SM policy lifecycle
  - Add proper cleanup of BSF bindings on session termination

• Update SM policy processor:
  - Modify smpolicy.go to use BSF for binding management
  - Add BSF binding creation during policy establishment
  - Ensure proper binding cleanup on policy deletion

This integration enables PCF to properly manage bindings with BSF
according to 3GPP TS 29.521 specifications for enhanced policy control.
Resolved conflicts in smpolicy.go by preserving BSF integration functionality:
- Maintained RegisterPCFBinding call during SM policy creation
- Kept DeletePCFBinding call during policy deletion
- Preserved UpdatePCFBinding call during policy updates
- Combined both approaches to ensure full BSF lifecycle management

All BSF binding operations are maintained while incorporating
latest changes from the main branch.
- Add context import and convert http.NewRequest to http.NewRequestWithContext
- Fix errcheck issues by adding proper resp.Body.Close() error handling
- Fix lll (line length) issue by formatting long function call
- Ensure all HTTP operations use proper context and error checking

Functions updated:
- RegisterPCFBinding: POST with context and error handling
- UpdatePCFBinding: PATCH with context and error handling
- DeletePCFBinding: DELETE with context and error handling
- BSFSelection: Fixed long line formatting

Fixes: errcheck, noctx, lll linting violations
Tested: golangci-lint returns 0 issues
@ianchen0119
Copy link
Contributor

The others look good to me.

@ianchen0119 ianchen0119 merged commit ff630a9 into free5gc:main Sep 24, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants