Closed chen23 closed 1 year ago
The following appears to address the issue above.
diff --git a/scripts/updateAutoScaleUcs b/scripts/updateAutoScaleUcs
index c8b73bf..9c5f4da 100755
--- a/scripts/updateAutoScaleUcs
+++ b/scripts/updateAutoScaleUcs
@@ -119,7 +119,8 @@ def replace(source_file_path, pattern, substring):
with open(target_file_path, 'w') as target_file:
with open(source_file_path, 'r') as source_file:
for line in source_file:
- target_file.write(line.replace(pattern, substring))
+ newline = re.sub("(%s)$" %(pattern),substring,line)
+ newline = re.sub("(%s)\/" %(pattern),substring+'/',newline)
+ target_file.write(newline)
os.remove(source_file_path)
shutil.move(target_file_path, source_file_path)
output
*** new/config/bigip.conf 2020-10-22 02:20:25.000000000 +0000
--- tmp/config/bigip.conf 2020-10-22 01:02:25.000000000 +0000
***************
*** 97,99 ****
net route /Common/default {
! gw 10.1.1.1
network default
--- 97,99 ----
net route /Common/default {
! gw 10.1.10.1
network default
***************
*** 101,103 ****
net route /Common/dhclient_route1 {
! gw 10.1.1.1
network 168.63.129.16/32
--- 101,103 ----
net route /Common/dhclient_route1 {
! gw 10.1.10.1
network 168.63.129.16/32
Closing. This issue was resolved with a previous release.
When loading a Ucs file the updateAutoScaleUCs file will replace values that it should not.
The following is an example where it is also updating ltm nodes (it should not).
and compare bigip.conf