Commit d4805251 authored by Marcin Siodelski's avatar Marcin Siodelski

[#93,!63] Added logical servers to dhcp4_server and dhcp6_server MySQL.

parent 9ac2ad52
...@@ -482,6 +482,10 @@ EOF ...@@ -482,6 +482,10 @@ EOF
qry="select id, tag, description, modification_ts from dhcp4_server" qry="select id, tag, description, modification_ts from dhcp4_server"
run_statement "dhcp4_server" "$qry" run_statement "dhcp4_server" "$qry"
# table: dhcp4_server - check if it contains default entries
qry="select count(*) from dhcp4_server"
run_statement "dhcp4_server" "$qry" 2
# table: dhcp4_audit # table: dhcp4_audit
qry="select id, object_type, object_id, modification_type, modification_ts, log_message from dhcp4_audit" qry="select id, object_type, object_id, modification_type, modification_ts, log_message from dhcp4_audit"
run_statement "dhcp4_audit" "$qry" run_statement "dhcp4_audit" "$qry"
...@@ -534,6 +538,10 @@ EOF ...@@ -534,6 +538,10 @@ EOF
qry="select id, tag, description, modification_ts from dhcp6_server" qry="select id, tag, description, modification_ts from dhcp6_server"
run_statement "dhcp6_server" "$qry" run_statement "dhcp6_server" "$qry"
# table: dhcp6_server - check if it contains default entries
qry="select count(*) from dhcp6_server"
run_statement "dhcp6_server" "$qry" 2
# table: dhcp6_audit # table: dhcp6_audit
qry="select id, object_type, object_id, modification_type, modification_ts, log_message from dhcp6_audit" qry="select id, object_type, object_id, modification_type, modification_ts, log_message from dhcp6_audit"
run_statement "dhcp6_audit" "$qry" run_statement "dhcp6_audit" "$qry"
......
...@@ -812,6 +812,18 @@ CREATE TABLE IF NOT EXISTS dhcp4_server ( ...@@ -812,6 +812,18 @@ CREATE TABLE IF NOT EXISTS dhcp4_server (
KEY key_dhcp4_server_modification_ts (modification_ts) KEY key_dhcp4_server_modification_ts (modification_ts)
) ENGINE=InnoDB; ) ENGINE=InnoDB;
# Special server entry meaning "unassigned server". This refers
# to configuration entries that shouldn't be used by any of the
# servers, e.g. when configuration entry is created but an
# administrator doesn't want the servers to start using it yet.
INSERT INTO dhcp4_server(id, tag, description, modification_ts)
VALUES(1, "unassigned", "special type: unassigned server", NOW());
# Special server entry meaning "all servers". This refers to
# the configuration entries owned by all servers.
INSERT INTO dhcp4_server(id, tag, description, modification_ts)
VALUES(2, "all", "special type: all servers", NOW());
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `dhcp4_audit` -- Table `dhcp4_audit`
-- ----------------------------------------------------- -- -----------------------------------------------------
...@@ -1065,6 +1077,18 @@ CREATE TABLE IF NOT EXISTS dhcp6_server ( ...@@ -1065,6 +1077,18 @@ CREATE TABLE IF NOT EXISTS dhcp6_server (
KEY key_dhcp6_server_modification_ts (modification_ts) KEY key_dhcp6_server_modification_ts (modification_ts)
) ENGINE=InnoDB; ) ENGINE=InnoDB;
# Special server entry meaning "unassigned server". This refers
# to configuration entries that shouldn't be used by any of the
# servers, e.g. when configuration entry is created but an
# administrator doesn't want the servers to start using it yet.
INSERT INTO dhcp6_server(id, tag, description, modification_ts)
VALUES(1, "unassigned", "special type: unassigned server", NOW());
# Special server entry meaning "all servers". This refers to
# the configuration entries owned by all servers.
INSERT INTO dhcp6_server(id, tag, description, modification_ts)
VALUES(2, "all", "special type: all servers", NOW());
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `dhcp6_audit` -- Table `dhcp6_audit`
-- ----------------------------------------------------- -- -----------------------------------------------------
......
...@@ -152,6 +152,18 @@ CREATE TABLE IF NOT EXISTS dhcp4_server ( ...@@ -152,6 +152,18 @@ CREATE TABLE IF NOT EXISTS dhcp4_server (
KEY key_dhcp4_server_modification_ts (modification_ts) KEY key_dhcp4_server_modification_ts (modification_ts)
) ENGINE=InnoDB; ) ENGINE=InnoDB;
# Special server entry meaning "unassigned server". This refers
# to configuration entries that shouldn't be used by any of the
# servers, e.g. when configuration entry is created but an
# administrator doesn't want the servers to start using it yet.
INSERT INTO dhcp4_server(id, tag, description, modification_ts)
VALUES(1, "unassigned", "special type: unassigned server", NOW());
# Special server entry meaning "all servers". This refers to
# the configuration entries owned by all servers.
INSERT INTO dhcp4_server(id, tag, description, modification_ts)
VALUES(2, "all", "special type: all servers", NOW());
# Create table dhcp4_audit # Create table dhcp4_audit
# #
CREATE TABLE IF NOT EXISTS dhcp4_audit ( CREATE TABLE IF NOT EXISTS dhcp4_audit (
...@@ -390,6 +402,18 @@ CREATE TABLE IF NOT EXISTS dhcp6_server ( ...@@ -390,6 +402,18 @@ CREATE TABLE IF NOT EXISTS dhcp6_server (
KEY key_dhcp6_server_modification_ts (modification_ts) KEY key_dhcp6_server_modification_ts (modification_ts)
) ENGINE=InnoDB; ) ENGINE=InnoDB;
# Special server entry meaning "unassigned server". This refers
# to configuration entries that shouldn't be used by any of the
# servers, e.g. when configuration entry is created but an
# administrator doesn't want the servers to start using it yet.
INSERT INTO dhcp6_server(id, tag, description, modification_ts)
VALUES(1, "unassigned", "special type: unassigned server", NOW());
# Special server entry meaning "all servers". This refers to
# the configuration entries owned by all servers.
INSERT INTO dhcp6_server(id, tag, description, modification_ts)
VALUES(2, "all", "special type: all servers", NOW());
# Create table dhcp6_audit # Create table dhcp6_audit
# #
CREATE TABLE IF NOT EXISTS dhcp6_audit ( CREATE TABLE IF NOT EXISTS dhcp6_audit (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment