Skip to content

fix: allow spaces in gtm topology region object names - #2530

Merged
joelkeener merged 1 commit into
develfrom
AUTOTOOL-5338-space-in-topology-region
Aug 28, 2026
Merged

joelkeener merged 1 commit into
develfrom
AUTOTOOL-5338-space-in-topology-region

Conversation

@joelkeener

@joelkeener joelkeener commented Aug 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fix inconsistent handling of spaces in GTM topology region names and members. The module now properly escape-quotes all region member types (state, region, pool, datacenter, continent, country, geoip-isp, isp) when passed to bash/tmsh commands, ensuring regions with spaces can be reliably created, modified, and deleted. Documentation updated to clarify full support for spaces across all member value types.

Changes

Module Changes

  • Enhanced UsableChanges.escape_spaces() method in plugins/modules/bigip_gtm_topology_region.py to handle spaces in all region member value types, not just state values
  • Previously only state values were escape-quoted; all other member types (region, pool, datacenter, etc.) were returned unmodified, causing bash/tmsh to interpret spaces as separators
  • Updated method to iterate through all member type prefixes and escape-quote values containing spaces

Documentation Updates

  • Updated name option description to clarify: "Spaces in region names are supported and will be properly handled by the module."
  • Updated region_members option description to document: "Spaces are supported in all member value types (state, region, pool, datacenter, continent, country, geoip-isp, isp)."
  • Added new example demonstrating creation of a topology region with spaces in region name, state, datacenter, and pool values

Test Coverage

  • Added 3 new parameter tests to TestParameters class covering spaces in datacenter, state, and pool names
  • Added new TestEscapeSpaces test class with 10 comprehensive tests validating:
    • Proper escape-quoting of all member types with spaces
    • No escaping for values without spaces (backward compatibility)
    • Handling of unrecognized key prefixes
  • All tests verify the fix behavior and ensure consistency across create/modify/delete operations

Testing

  • ✅ Unit tests added covering all member types with/without spaces
  • ✅ All 34 ansible-test sanity checks pass across Python 3.10, 3.12, 3.13, 3.14
  • ✅ Module and test files compile without syntax errors
  • ✅ Backward compatible — regions without spaces remain unchanged

Checklist

  • Unit tests pass (34/34 sanity checks)
  • Code follows project conventions
  • No security concerns identified
  • Comprehensive test coverage for the fix
  • Documentation updated with space support clarification and examples

@joelkeener joelkeener changed the title todo: amend message w/feature description fix: allow spaces in gtm topology region object names Aug 27, 2026
@joelkeener
joelkeener force-pushed the AUTOTOOL-5338-space-in-topology-region branch from 40b04e2 to 013733c Compare August 27, 2026 02:35
@joelkeener
joelkeener merged commit 6375c2e into devel Aug 28, 2026
9 checks passed
@joelkeener
joelkeener deleted the AUTOTOOL-5338-space-in-topology-region branch August 28, 2026 16:56
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