Skip to content

Conversation

@pushkar-gr
Copy link

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Closes #198.

Description of Changes

Schema (netjsonconfig/backends/openvpn/schema.py)

  • Added compress option with support for: lzo, lz4, lz4-v2, stub, stub-v2, empty string
  • Added allow_compression option: asym (default), no, yes
  • Added push_compress option for server-side compression settings
  • Marked comp_lzo as deprecated

Tests (tests/openvpn/)

  • Added rendering tests for all compression algorithms
  • Added parsing tests for native OpenVPN configs
  • Tests for both client and server configurations
  • All 611 tests passing with 99% coverage

Documentation (docs/source/backends/openvpn.rst)

  • Updated general settings table with new options
  • Marked comp_lzo as deprecated
  • Added descriptions for new compression options

Backward Compatibility

  • Fully backward compatible - existing comp_lzo configurations continue to work

Add support for new OpenVPN compression options to the schema:
- compress: modern replacement for comp_lzo with support for
  lzo, lz4, lz4-v2, stub, stub-v2, and empty string for migration
- allow_compression: control compression policy (asym, no, yes)
- push_compress: server-side option to push compression to clients
Mark comp_lzo as deprecated in favor of the new --compress option.
These changes align with recent OpenVPN versions that deprecated
comp-lzo in favor of more flexible compression controls.

Fixes openwisp#198
Add comprehensive test coverage for compress, allow_compression,
and push_compress options including:
- Rendering tests for all compression algorithms
- Parsing tests for native OpenVPN configs
- Tests for coexistence with deprecated comp_lzo option

Tests cover both client and server configurations to ensure
proper functionality of the new compression options.

Fixes openwisp#198
…isp#198

Update OpenVPN backend documentation to reflect the addition of modern
compression options:

- Add compress option documentation with all supported algorithms
  (lzo, lz4, lz4-v2, stub, stub-v2, and empty string for migration)
- Add allow_compression option documentation with policy controls
  (asym, no, yes)
- Add push_compress option documentation for server-side compression
  settings
- Mark comp_lzo as deprecated in favor of the new compress option
- Update general settings table with new compression-related options
- Add notes about compression option compatibility with recent OpenVPN
  versions

The documentation now accurately reflects the schema changes that align
with OpenVPN's modern compression configuration approach, which
deprecated comp-lzo in favor of the more flexible --compress and
--allow-compression options.

Fixes openwisp#198
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.

[feature] OpenVPN new compression options to schema

1 participant