Set gateway for admin network if is NULL

Database field 'gateway' in table 'network_groups' has type
INET. It cannot be an empty sting, thus correct default value
for it set to NULL.

Change-Id: I4cc5ac742a8ddb750cd82a1d15996605cb569bfa
Closes-bug: 1595268
This commit is contained in:
Oleg Gelbukh 2016-06-22 18:09:32 +00:00
parent d76e1ee8ba
commit 10b2ee3388
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ class NailgunArchivator(PostgresArchivator):
select_admin_net_query = ("SELECT id FROM network_groups "
"WHERE name = 'fuelweb_admin'")
set_admin_gateway_query = ("UPDATE network_groups SET gateway = '{0}' "
"WHERE id = '{1}' AND gateway = ''")
"WHERE id = '{1}' AND gateway is NULL")
set_admin_viptype_query = ("UPDATE ip_addrs SET vip_type = NULL "
"WHERE ip_addr = '{0}' "
"AND vip_type = 'harpoxy' "