Make SDNC ip pool insertion idempotent
This ensures that subsequent 'vcpe.py init'
invocations do not complain about duplicate
entry in sdnctl databse (entries are not
reinserted, INSERT statement is just noop in
this case).
Change-Id: I8def8eab1e04026e8ee2206aa11fe2644b35d609
Issue-ID: TEST-222
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
diff --git a/test/vcpe/config_sdnc_so.py b/test/vcpe/config_sdnc_so.py
index 13ac47b..b19c93a 100755
--- a/test/vcpe/config_sdnc_so.py
+++ b/test/vcpe/config_sdnc_so.py
@@ -92,5 +92,5 @@
# Prepare single INSERT statement with all IP values
for ip in range(22,250):
row_values.append("('', 'VGW', 'AVAILABLE','{0}.{1}')".format(vgw_net,ip))
- cmds.append("INSERT INTO IPV4_ADDRESS_POOL VALUES" + ', '.join(row_values) + ';')
+ cmds.append("INSERT IGNORE INTO IPV4_ADDRESS_POOL VALUES" + ', '.join(row_values) + ';')
vcpecommon.execute_cmds_mariadb(cmds)