Skip to content

v5.2.0

Latest

Choose a tag to compare

@Kani999 Kani999 released this 29 Oct 09:42

CESNET Service Path Plugin – Release Notes for v5.2.0

Highlights

v5.2.0 introduces a major new feature: Financial Information Management for segments, multi-currency support, API/UI enhancements, improved permission controls, and better plugin configuration. This release also includes documentation and dependency updates, streamlines segment/provider fields, and adds robust integration tests.


Added

Financial Information Management

  • New SegmentFinancialInfo model: Track segment costs, monthly charges, non-recurring charges, and commitment periods.
  • Multi-currency support: Configurable currency list and default currency (CZK, EUR, USD, etc.).
  • Automatic cost calculations: Total commitment cost, total cost including setup.
  • Permission-based access: Financial info only visible to users with view permission.
  • Integrated with UI & REST API: Financial info shown on segment detail pages and included in API responses.
  • Dedicated API endpoint: /api/plugins/cesnet-service-path-plugin/segment-financial-info/
  • GraphQL support: Query segment financial info with permission checks.

Plugin Configuration and Metadata

  • Configurable currency list: Specify available currencies and default in plugin settings.
  • Example configuration in README.
  • Added netbox-plugin.yaml: Official plugin registry metadata and compatibility matrix.

UI/UX

  • Financial info card on segment detail: Permission-aware display and quick add/edit/delete actions.
  • "Generate Circuit" button: One-click creation of circuits from segment data, auto-filled form fields.
  • Quick action buttons: Add/Import shortcuts for segments, paths, mappings, circuits.

Development & Testing

  • Integration tests: For financial info API and type-specific segment data.
  • Sample .env for tests.
  • Python requirement updated to >=3.10.

🔄 Changed

Segment Model: Location Fields Now Optional

  • location_a & location_b are now optional for segments.
    • You can create segments without specifying these locations.
    • If provided, locations must belong to their respective sites.
    • API, forms, and documentation updated to reflect this change.

API, Serialization & Permissions

  • Segment serializer: Now includes financial_info field, with permission-aware inclusion.
  • Improved error handling: Detailed logging, better file upload error separation.
  • Cleaner code: Removed unused fields (provider_segment_name, provider_segment_contract).
  • Permission system: Fine-grained control for add/change/delete/view of financial info.

UI & Documentation

  • README: Expanded with financial info details, installation/config, Docker instructions.
  • File path references corrected: Configuration files and plugin paths.
  • Compatibility badge: NetBox 4.4 support highlighted.
  • Bulk operations: Bulk edit/import/delete for segments and mappings.

Development Dependencies

  • Unpinned dev dependencies: More flexibility for pip, black, pytest, etc.
  • License classifier: Now Apache 2.0.

⚙️ Technical Details

  • Financial info uses one-to-one relation with Segment.
  • Currency choices loaded from plugin config.
  • Financial data is optional per segment.
  • API serializers use method fields for conditional inclusion.
  • Redirect-based views for better UX.

🚨 Migration Notes

  • New model: SegmentFinancialInfo table created.
  • Permissions: Four new Django permissions for financial info.
  • Configuration: Optionally add currency config to plugin settings.
  • API change: Segment API includes financial_info (null if missing or no permission).
  • location_a/location_b: These fields are now optional in the database and API.

🧹 Removed/Deprecated

  • Removed provider_segment_contract and provider_segment_name fields from Segment.
  • API examples, documentation, and GraphQL types updated to reflect removal.

📚 Documentation & Examples

  • Step-by-step installation, Docker setup, currency config, and troubleshooting guides updated.
  • API and GraphQL usage examples for segments with financial info.
  • Segment creation API:
    • Required fields: name, status, provider, site_a, site_b
    • Optional: location_a, location_b

🧪 Testing

  • New integration tests for:
    • Creating, updating, deleting, and viewing segment financial info via API.
    • Verifying financial info appears in segment API responses.
    • Segment type-specific data validation and migration between types.

📝 Contributors

Special thanks to all contributors and testers for feedback and code reviews.


For a detailed changelog and migration instructions, see CHANGELOG.md and the expanded README.md.