Commit 27e9f06
authored
Truncate NSX DFW rule ID to 255 characters (#1479)
* Truncate NSX DFW rule ID to 255 characters
When a SecurityPolicy contains many ports in a rule, the generated NSX Rule ID
can exceed the maximum limit of 255 characters, leading to NSX API errors during policy creation.
This change uses `util.NormalizeId` in `buildExpandedRuleID` to properly truncate
and hash the rule ID, ensuring it remains within the 255-character limit while avoiding name collisions.1 parent 1dc7884 commit 27e9f06
2 files changed
Lines changed: 33 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
673 | | - | |
| 673 | + | |
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
| |||
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
683 | | - | |
| 683 | + | |
684 | 684 | | |
685 | 685 | | |
686 | 686 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
994 | 994 | | |
995 | 995 | | |
996 | 996 | | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
997 | 1019 | | |
998 | 1020 | | |
999 | 1021 | | |
| |||
1353 | 1375 | | |
1354 | 1376 | | |
1355 | 1377 | | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
1356 | 1387 | | |
1357 | 1388 | | |
1358 | 1389 | | |
| |||
0 commit comments