Skip to content

Conversation

@tech-of-all-trades
Copy link
Contributor

This PR adds support for additional logging configuration in the terraform-provider-iosxe.

These improvements enhanced the iosxe_logging resource with comprehensive logging configuration capabilities including message counting, persistent storage, and rate limiting functionality.

CLI Commands Supported:

  • logging count
  • logging persistent url flash:/<path> size <SIZE> filesize <FILESIZE>
  • logging rate-limit all <RATE>

Benefits:

  • Enables message counting and timestamping for operational awareness
  • Supports persistent logging to flash storage for long-term log retention
  • Provides granular rate limiting controls to prevent log flooding
  • Enhances troubleshooting and compliance capabilities

…o logging resource

Enhanced the iosxe_logging resource with comprehensive logging configuration capabilities
including message counting, persistent storage, and rate limiting functionality.

New Attributes (15 total):
- logging_count: Enable message counting with timestamps
- persistent_url: Configure persistent log storage location
- persistent_size: Set disk space for log messages (16384-2147483647 bytes)
- persistent_filesize: Set individual log file size (8192-2147483647 bytes)
- persistent_batch: Configure batch size for storage writes (4096-2147483647 bytes)
- persistent_threshold: Set threshold capacity percentage (1-99%)
- persistent_immediate: Enable immediate write without buffering
- persistent_notify: Enable notifications for persistent logging
- persistent_protected: Protect logging files from manipulation
- rate_limit_all: Set global message rate limit (1-10000 msgs/sec)
- rate_limit_all_except_severity: Configure exception severity for global rate limit
- rate_limit_console: Set console-only message rate limit (1-10000 msgs/sec)
- rate_limit_console_except_severity: Configure exception severity for console rate limit
- rate_limit_console_all: Set console rate limit including debug messages (1-10000 msgs/sec)
- rate_limit_console_all_except_severity: Configure exception severity for console all rate limit

CLI Commands Supported:
- logging count
- logging persistent url flash:/<path> size <SIZE> filesize <FILESIZE>
- logging rate-limit all <RATE>

Benefits:
- Enables message counting and timestamping for operational awareness
- Supports persistent logging to flash storage for long-term log retention
- Provides granular rate limiting controls to prevent log flooding
- Enhances troubleshooting and compliance capabilities

Implementation Details:
- Updated gen/definitions/logging.yaml with YANG mappings
- YANG path: Cisco-IOS-XE-native:native/logging
- Resolved Terraform reserved word conflict (count → logging_count)
- Generated provider code with validation rules and acceptance tests
- All acceptance tests passing (136.41s)

Files Modified:
- gen/definitions/logging.yaml
- docs/data-sources/logging.md
- docs/resources/logging.md
- examples/resources/iosxe_logging/resource.tf
- internal/provider/data_source_iosxe_logging.go
- internal/provider/data_source_iosxe_logging_test.go
- internal/provider/model_iosxe_logging.go
- internal/provider/resource_iosxe_logging.go
- internal/provider/resource_iosxe_logging_test.go
@danischm danischm merged commit eebfc47 into CiscoDevNet:main Nov 4, 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