run_statement "dhcp4_option_def_server" "$qry"
# table: dhcp4_shared_network
- qry="select id, name, client_class, interface, match_client_id, modification_ts, rebind_timer, relay, renew_timer, require_client_classes, reservation_mode, user_context, valid_lifetime, calculate_tee_times, t1_percent, t2_percent from dhcp4_shared_network"
+ qry="select id, name, client_class, interface, match_client_id, modification_ts, rebind_timer, relay, renew_timer, require_client_classes, reservation_mode, user_context, valid_lifetime, authoritative, calculate_tee_times, t1_percent, t2_percent from dhcp4_shared_network"
run_statement "dhcp4_shared_network" "$qry"
# table: dhcp4_shared_network_server
run_statement "dhcp4_shared_network_server" "$qry"
# table: dhcp4_subnet
- qry="select subnet_prefix, 4o6_interface, 4o6_interface_id, 4o6_subnet, boot_file_name, client_class, interface, match_client_id, modification_ts, next_server, rebind_timer, relay, renew_timer, require_client_classes, reservation_mode, server_hostname, shared_network_name, subnet_id, user_context, valid_lifetime, calculate_tee_times, t1_percent, t2_percent from dhcp4_subnet"
+ qry="select subnet_prefix, 4o6_interface, 4o6_interface_id, 4o6_subnet, boot_file_name, client_class, interface, match_client_id, modification_ts, next_server, rebind_timer, relay, renew_timer, require_client_classes, reservation_mode, server_hostname, shared_network_name, subnet_id, user_context, valid_lifetime, authoritative, calculate_tee_times, t1_percent, t2_percent from dhcp4_subnet"
run_statement "dhcp4_subnet" "$qry"
# table: dhcp4_pool
MySqlBinding::createTimestamp(), //option: modification_ts
MySqlBinding::createInteger<uint8_t>(), // calculate_tee_times
MySqlBinding::createInteger<float>(), // t1_percent
- MySqlBinding::createInteger<float>() // t2_percent
+ MySqlBinding::createInteger<float>(), // t2_percent
+ MySqlBinding::createInteger<uint8_t>() // authoritative
};
uint64_t last_pool_id = 0;
last_subnet->setT2Percent(out_bindings[51]->getFloat());
}
+ // authoritative
+ if (!out_bindings[52]->amNull()) {
+ last_subnet->setAuthoritative(out_bindings[52]->getBool());
+ }
+
// Subnet ready. Add it to the list.
subnets.push_back(last_subnet);
}
createBinding(subnet->getValid()),
MySqlBinding::condCreateBool(subnet->getCalculateTeeTimes()),
MySqlBinding::condCreateFloat(subnet->getT1Percent()),
- MySqlBinding::condCreateFloat(subnet->getT2Percent())
+ MySqlBinding::condCreateFloat(subnet->getT2Percent()),
+ MySqlBinding::condCreateBool(subnet->getAuthoritative())
};
MySqlTransaction transaction(conn_);
MySqlBinding::createTimestamp(), //option: modification_ts
MySqlBinding::createInteger<uint8_t>(), // calculate_tee_times
MySqlBinding::createInteger<float>(), // t1_percent
- MySqlBinding::createInteger<float>() // t2_percent
+ MySqlBinding::createInteger<float>(), // t2_percent
+ MySqlBinding::createInteger<uint8_t>() // authoritative
};
uint64_t last_network_id = 0;
last_network->setT2Percent(out_bindings[27]->getFloat());
}
+ // authoritative
+ if (!out_bindings[28]->amNull()) {
+ last_network->setAuthoritative(out_bindings[28]->getBool());
+ }
+
shared_networks.push_back(last_network);
}
createBinding(shared_network->getValid()),
MySqlBinding::condCreateBool(shared_network->getCalculateTeeTimes()),
MySqlBinding::condCreateFloat(shared_network->getT1Percent()),
- MySqlBinding::condCreateFloat(shared_network->getT2Percent())
+ MySqlBinding::condCreateFloat(shared_network->getT2Percent()),
+ MySqlBinding::condCreateBool(shared_network->getAuthoritative())
};
MySqlTransaction transaction(conn_);
" valid_lifetime,"
" calculate_tee_times,"
" t1_percent,"
- " t2_percent"
+ " t2_percent,"
+ " authoritative"
") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,"
- "?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" },
+ "?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" },
// Insert association of the subnet with a server.
{ MySqlConfigBackendDHCPv4Impl::INSERT_SUBNET4_SERVER,
" valid_lifetime,"
" calculate_tee_times,"
" t1_percent,"
- " t2_percent"
- ") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" },
+ " t2_percent,"
+ " authoritative"
+ ") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" },
// Insert association of the shared network with a server.
{ MySqlConfigBackendDHCPv4Impl::INSERT_SHARED_NETWORK4_SERVER,
" valid_lifetime = ?,"
" calculate_tee_times = ?,"
" t1_percent = ?,"
- " t2_percent = ? "
+ " t2_percent = ?,"
+ " authoritative = ? "
"WHERE subnet_id = ?" },
// Update existing shared network.
" valid_lifetime = ?,"
" calculate_tee_times = ?,"
" t1_percent = ?,"
- " t2_percent = ? "
+ " t2_percent = ?,"
+ " authoritative = ? "
"WHERE name = ?" },
// Update existing option definition.