diff options
author | 2019-10-24 12:49:04 +0200 | |
---|---|---|
committer | 2019-10-24 17:55:21 +0000 | |
commit | ab9b1d5c42336356cfa40e44503c34f8d0e1f251 (patch) | |
tree | 5b5c5d9f0e41e7016596afdad8f4ed9b6406e790 /test | |
parent | 8b409a1f8ba66476246eb32162c50260aec4b2ce (diff) |
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>
Diffstat (limited to 'test')
-rwxr-xr-x | test/vcpe/config_sdnc_so.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/vcpe/config_sdnc_so.py b/test/vcpe/config_sdnc_so.py index 13ac47bee..b19c93acf 100755 --- a/test/vcpe/config_sdnc_so.py +++ b/test/vcpe/config_sdnc_so.py @@ -92,5 +92,5 @@ def insert_sdnc_ip_pool(vcpecommon): # 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) |