# Now insert global parameter instances of ddns-use-conflict-resolution.
sql=\
"set @disable_audit = 1; \
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('ddns-use-conflict-resolution', 'false', current_time(),2);
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('ddns-use-conflict-resolution', 'true', current_time(),2);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('ddns-use-conflict-resolution', 'false', current_time(),2);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('ddns-use-conflict-resolution', 'true', current_time(),2);"
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('ddns-use-conflict-resolution','0',current_time(),2);
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('ddns-use-conflict-resolution','1',current_time(),2);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('ddns-use-conflict-resolution','0',current_time(),2);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('ddns-use-conflict-resolution','1',current_time(),2);"
run_statement "insert ddns_conflict_resolution_mode" "$sql"
# Now insert global parameter instances of dhcp-ddns.
sql=\
"set @disable_audit = 1; \
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.generated-prefix', 'my-host', current_time(),4);
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.qualifying-suffix', '', current_time(),4);
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.override-no-update', 'true', current_time(),2);
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.override-client-update', 'true', current_time(),2);
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.replace-client-name', 'never', current_time(),4);
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.hostname-char-replacement', '', current_time(),4);
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.hostname-char-set', '[^A-Za-z0-9.-]', current_time(),4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.generated-prefix', 'my-host', current_time(),4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.qualifying-suffix', '', current_time(),4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.override-no-update', 'true', current_time(),2);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.override-client-update', 'true', current_time(),2);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.replace-client-name', 'never', current_time(),4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.hostname-char-replacement', '', current_time(),4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.hostname-char-set', '[^A-Za-z0-9.-]', current_time(),4);"
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.generated-prefix','my-host',current_time(),4);
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.qualifying-suffix','',current_time(),4);
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.override-no-update','1',current_time(),2);
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.override-client-update','1',current_time(),2);
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.replace-client-name','never',current_time(),4);
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.hostname-char-replacement','',current_time(),4);
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.hostname-char-set','[^A-Za-z0-9.-]',current_time(),4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.generated-prefix','my-host',current_time(),4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.qualifying-suffix','',current_time(),4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.override-no-update','1',current_time(),2);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.override-client-update','1',current_time(),2);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.replace-client-name','never',current_time(),4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.hostname-char-replacement','',current_time(),4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.hostname-char-set','[^A-Za-z0-9.-]',current_time(),4);"
run_statement "insert dhcp-ddns map parameters" "$sql"
# Now insert global parameter instances of reservation_mode.
sql=\
"set @disable_audit = 1; \
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'disabled', current_time(),4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'disabled', current_time(),4);"
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','disabled',current_time(),4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','disabled',current_time(),4);"
run_statement "insert reservation_mode parameters" "$sql"
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count before update" "$qry" 1
- qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='false' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='0' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count before update" "$qry" 0
- qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='false' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='0' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count before update" "$qry" 0
# Upgrade to schema 22.0
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count after update" "$qry" 0
- qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='false' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='0' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count after update" "$qry" 1
- qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='false' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='0' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count after update" "$qry" 1
# Let's wipe the whole database
# Now insert global parameter instances of reservation_mode.
sql=\
"set @disable_audit = 1; \
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'off', current_time(),4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'off', current_time(),4);"
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','off',current_time(),4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','off',current_time(),4);"
run_statement "insert reservation_mode parameters" "$sql"
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count before update" "$qry" 1
- qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='false' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='0' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count before update" "$qry" 0
- qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='false' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='0' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count before update" "$qry" 0
# Upgrade to schema 22.0
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count after update" "$qry" 0
- qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='false' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='0' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count after update" "$qry" 1
- qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='false' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='0' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count after update" "$qry" 1
# Let's wipe the whole database
# Now insert global parameter instances of reservation_mode.
sql=\
"set @disable_audit = 1; \
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'all', current_time(),4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'all', current_time(),4);"
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','all',current_time(),4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','all',current_time(),4);"
run_statement "insert reservation_mode parameters" "$sql"
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count before update" "$qry" 1
- qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='1' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count before update" "$qry" 0
- qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='1' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count before update" "$qry" 0
# Upgrade to schema 22.0
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count after update" "$qry" 0
- qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='1' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count after update" "$qry" 1
- qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='1' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count after update" "$qry" 1
# Let's wipe the whole database
# Now insert global parameter instances of reservation_mode.
sql=\
"set @disable_audit = 1; \
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'global', current_time(),4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'global', current_time(),4);"
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','global',current_time(),4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','global',current_time(),4);"
run_statement "insert reservation_mode parameters" "$sql"
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count before update" "$qry" 1
- qry="select count(*) from dhcp4_global_parameter where name='reservations-global' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-global' AND value='1' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count before update" "$qry" 0
- qry="select count(*) from dhcp6_global_parameter where name='reservations-global' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-global' AND value='1' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count before update" "$qry" 0
# Upgrade to schema 22.0
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count after update" "$qry" 0
- qry="select count(*) from dhcp4_global_parameter where name='reservations-global' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-global' AND value='1' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count after update" "$qry" 1
- qry="select count(*) from dhcp6_global_parameter where name='reservations-global' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-global' AND value='1' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count after update" "$qry" 1
# Let's wipe the whole database
# Now insert global parameter instances of reservation_mode.
sql=\
"set @disable_audit = 1; \
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'out-of-pool', current_time(),4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'out-of-pool', current_time(),4);"
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','out-of-pool',current_time(),4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','out-of-pool',current_time(),4);"
run_statement "insert reservation_mode parameters" "$sql"
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count before update" "$qry" 1
- qry="select count(*) from dhcp4_global_parameter where name='reservations-out-of-pool' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-out-of-pool' AND value='1' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count before update" "$qry" 0
- qry="select count(*) from dhcp6_global_parameter where name='reservations-out-of-pool' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-out-of-pool' AND value='1' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count before update" "$qry" 0
# Upgrade to schema 22.0
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count after update" "$qry" 0
- qry="select count(*) from dhcp4_global_parameter where name='reservations-out-of-pool' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-out-of-pool' AND value='1' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count after update" "$qry" 1
- qry="select count(*) from dhcp6_global_parameter where name='reservations-out-of-pool' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-out-of-pool' AND value='1' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count after update" "$qry" 1
# Let's wipe the whole database
# Now we need insert some subnets and shared networks.
sql=\
"select set_config('kea.disable_audit', 'true', false);\
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('ddns-use-conflict-resolution', 'false', current_timestamp, 2);
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('ddns-use-conflict-resolution', 'true', current_timestamp, 2);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('ddns-use-conflict-resolution', 'false', current_timestamp,2);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('ddns-use-conflict-resolution', 'true', current_timestamp, 2);"
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('ddns-use-conflict-resolution','0',current_timestamp,2);
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('ddns-use-conflict-resolution','1',current_timestamp,2);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('ddns-use-conflict-resolution','0',current_timestamp,2);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('ddns-use-conflict-resolution','1',current_timestamp,2);"
run_statement "insert ddns_conflict_resolution_mode" "$sql"
# Now insert global parameter instances of dhcp-ddns.
sql=\
"select set_config('kea.disable_audit', 'true', false);\
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.generated-prefix', 'my-host', current_timestamp,4);
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.qualifying-suffix', '', current_timestamp,4);
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.override-no-update', 'true', current_timestamp,2);
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.override-client-update', 'true', current_timestamp,2);
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.replace-client-name', 'never', current_timestamp,4);
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.hostname-char-replacement', '', current_timestamp,4);
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.hostname-char-set', '[^A-Za-z0-9.-]', current_timestamp,4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.generated-prefix', 'my-host', current_timestamp,4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.qualifying-suffix', '', current_timestamp,4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.override-no-update', 'true', current_timestamp,2);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.override-client-update', 'true', current_timestamp,2);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.replace-client-name', 'never', current_timestamp,4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.hostname-char-replacement', '', current_timestamp,4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('dhcp-ddns.hostname-char-set', '[^A-Za-z0-9.-]', current_timestamp,4);"
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.generated-prefix','my-host',current_timestamp,4);
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.qualifying-suffix','',current_timestamp,4);
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.override-no-update','1',current_timestamp,2);
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.override-client-update','1',current_timestamp,2);
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.replace-client-name','never',current_timestamp,4);
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.hostname-char-replacement','',current_timestamp,4);
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.hostname-char-set','[^A-Za-z0-9.-]',current_timestamp,4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.generated-prefix','my-host',current_timestamp,4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.qualifying-suffix','',current_timestamp,4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.override-no-update','1',current_timestamp,2);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.override-client-update','1',current_timestamp,2);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.replace-client-name','never',current_timestamp,4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.hostname-char-replacement','',current_timestamp,4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('dhcp-ddns.hostname-char-set','[^A-Za-z0-9.-]',current_timestamp,4);"
run_statement "insert dhcp-ddns map parameters" "$sql"
# Now insert global parameter instances of reservation_mode.
sql=\
"select set_config('kea.disable_audit', 'true', false);\
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'disabled', current_timestamp,4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'disabled', current_timestamp,4);"
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','disabled',current_timestamp,4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','disabled',current_timestamp,4);"
run_statement "insert reservation_mode parameters" "$sql"
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count before update" "$qry" 1
- qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='false' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='0' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count before update" "$qry" 0
- qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='false' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='0' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count before update" "$qry" 0
# Upgrade to schema 22.0
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count after update" "$qry" 0
- qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='false' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='0' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count after update" "$qry" 1
- qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='false' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='0' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count after update" "$qry" 1
# Let's wipe the whole database
# Now insert global parameter instances of reservation_mode.
sql=\
"select set_config('kea.disable_audit', 'true', false);\
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'off', current_timestamp,4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'off', current_timestamp,4);"
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','off',current_timestamp,4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','off',current_timestamp,4);"
run_statement "insert reservation_mode parameters" "$sql"
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count before update" "$qry" 1
- qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='false' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='0' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count before update" "$qry" 0
- qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='false' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='0' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count before update" "$qry" 0
# Upgrade to schema 22.0
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count after update" "$qry" 0
- qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='false' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='0' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count after update" "$qry" 1
- qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='false' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='0' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count after update" "$qry" 1
# Let's wipe the whole database
# Now insert global parameter instances of reservation_mode.
sql=\
"select set_config('kea.disable_audit', 'true', false);\
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'all', current_timestamp,4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'all', current_timestamp,4);"
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','all',current_timestamp,4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','all',current_timestamp,4);"
run_statement "insert reservation_mode parameters" "$sql"
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count before update" "$qry" 1
- qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='1' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count before update" "$qry" 0
- qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='1' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count before update" "$qry" 0
# Upgrade to schema 22.0
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count after update" "$qry" 0
- qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-in-subnet' AND value='1' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count after update" "$qry" 1
- qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-in-subnet' AND value='1' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count after update" "$qry" 1
# Let's wipe the whole database
# Now insert global parameter instances of reservation_mode.
sql=\
"select set_config('kea.disable_audit', 'true', false);\
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'global', current_timestamp,4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'global', current_timestamp,4);"
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','global',current_timestamp,4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','global',current_timestamp,4);"
run_statement "insert reservation_mode parameters" "$sql"
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count before update" "$qry" 1
- qry="select count(*) from dhcp4_global_parameter where name='reservations-global' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-global' AND value='1' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count before update" "$qry" 0
- qry="select count(*) from dhcp6_global_parameter where name='reservations-global' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-global' AND value='1' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count before update" "$qry" 0
# Upgrade to schema 22.0
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count after update" "$qry" 0
- qry="select count(*) from dhcp4_global_parameter where name='reservations-global' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-global' AND value='1' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count after update" "$qry" 1
- qry="select count(*) from dhcp6_global_parameter where name='reservations-global' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-global' AND value='1' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count after update" "$qry" 1
# Let's wipe the whole database
# Now insert global parameter instances of reservation_mode.
sql=\
"select set_config('kea.disable_audit', 'true', false);\
- insert into dhcp4_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'out-of-pool', current_timestamp,4);
- insert into dhcp6_global_parameter (name,value, modification_ts,parameter_type)\
- values ('reservation-mode', 'out-of-pool', current_timestamp,4);"
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','out-of-pool',current_timestamp,4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('reservation-mode','out-of-pool',current_timestamp,4);"
run_statement "insert reservation_mode parameters" "$sql"
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count before update" "$qry" 1
- qry="select count(*) from dhcp4_global_parameter where name='reservations-out-of-pool' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-out-of-pool' AND value='1' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count before update" "$qry" 0
- qry="select count(*) from dhcp6_global_parameter where name='reservations-out-of-pool' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-out-of-pool' AND value='1' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count before update" "$qry" 0
# Upgrade to schema 22.0
qry="select count(*) from dhcp6_global_parameter where name like '%reservation-mode%';"
run_statement "#get 6_global parameter count after update" "$qry" 0
- qry="select count(*) from dhcp4_global_parameter where name='reservations-out-of-pool' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp4_global_parameter where name='reservations-out-of-pool' AND value='1' AND parameter_type=2;"
run_statement "#get exact 4_global parameter count after update" "$qry" 1
- qry="select count(*) from dhcp6_global_parameter where name='reservations-out-of-pool' AND value='true' AND parameter_type=2;"
+ qry="select count(*) from dhcp6_global_parameter where name='reservations-out-of-pool' AND value='1' AND parameter_type=2;"
run_statement "#get exact 6_global parameter count after update" "$qry" 1
# Let's wipe the whole database