Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
426
Issues
426
List
Boards
Labels
Service Desk
Milestones
Merge Requests
63
Merge Requests
63
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
Kea
Commits
5cde4dd5
Commit
5cde4dd5
authored
Oct 25, 2019
by
Francis Dupont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[393-global-search-through-leases-by-mac-or-hostname-w-o-specifying-a-subnet-id] Addressed comments
parent
fab3f89f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
12 deletions
+14
-12
doc/sphinx/arm/hooks-lease-cmds.rst
doc/sphinx/arm/hooks-lease-cmds.rst
+1
-1
src/hooks/dhcp/lease_cmds/lease_cmds.h
src/hooks/dhcp/lease_cmds/lease_cmds.h
+1
-1
src/lib/dhcpsrv/pgsql_lease_mgr.cc
src/lib/dhcpsrv/pgsql_lease_mgr.cc
+2
-2
src/share/database/scripts/pgsql/dhcpdb_create.pgsql
src/share/database/scripts/pgsql/dhcpdb_create.pgsql
+2
-2
src/share/database/scripts/pgsql/upgrade_5.1_to_6.0.sh.in
src/share/database/scripts/pgsql/upgrade_5.1_to_6.0.sh.in
+8
-6
No files found.
doc/sphinx/arm/hooks-lease-cmds.rst
View file @
5cde4dd5
...
...
@@ -65,7 +65,7 @@ This library provides the following commands:
- ``lease4-get-by-client-id`` - return all IPv4 leases with the specified
client id.
- ``lease6-get-by-duid`` - returns all IPv6 leases with the specified
duid
.
- ``lease6-get-by-duid`` - returns all IPv6 leases with the specified
DUID
.
- ``lease4-get-by-hostname`` - return all IPv4 leases with the specified
hostname.
...
...
src/hooks/dhcp/lease_cmds/lease_cmds.h
View file @
5cde4dd5
...
...
@@ -321,7 +321,7 @@ public:
/// @brief lease4-get-by-hostname and lease6-get-by-hostname commands
/// handler
///
/// Thesecommands attempt to retrieve all IPv4 or Ipv6 leases with
/// These
commands attempt to retrieve all IPv4 or Ipv6 leases with
/// a particular hostname.
///
/// Example command for v4:
...
...
src/lib/dhcpsrv/pgsql_lease_mgr.cc
View file @
5cde4dd5
...
...
@@ -145,7 +145,7 @@ PgSqlTaggedStatement tagged_statements[] = {
"fqdn_fwd, fqdn_rev, hostname, "
"state, user_context "
"FROM lease4 "
"WHERE
hostname
= $1"
},
"WHERE
lower(hostname)
= $1"
},
// GET_LEASE4_EXPIRE
{
3
,
{
OID_INT8
,
OID_TIMESTAMP
,
OID_INT8
},
...
...
@@ -247,7 +247,7 @@ PgSqlTaggedStatement tagged_statements[] = {
"hwaddr, hwtype, hwaddr_source, "
"state, user_context "
"FROM lease6 "
"WHERE
hostname
= $1"
},
"WHERE
lower(hostname)
= $1"
},
// GET_LEASE6_EXPIRE
{
3
,
{
OID_INT8
,
OID_TIMESTAMP
,
OID_INT8
},
...
...
src/share/database/scripts/pgsql/dhcpdb_create.pgsql
View file @
5cde4dd5
...
...
@@ -896,11 +896,11 @@ CREATE INDEX hosts_by_hostname ON hosts (lower(hostname))
WHERE hostname IS NOT NULL;
-- Create a hostname index for lease4.
CREATE INDEX lease4_by_hostname ON lease4 (
hostname
)
CREATE INDEX lease4_by_hostname ON lease4 (
lower(hostname)
)
WHERE hostname IS NOT NULL;
-- Create a hostname index for lease6.
CREATE INDEX lease6_by_hostname ON lease6 (
hostname
)
CREATE INDEX lease6_by_hostname ON lease6 (
lower(hostname)
)
WHERE hostname IS NOT NULL;
-- Set 6.0 schema version.
...
...
src/share/database/scripts/pgsql/upgrade_5.1_to_6.0.sh.in
View file @
5cde4dd5
...
...
@@ -25,20 +25,22 @@ CREATE INDEX hosts_by_hostname ON hosts (lower(hostname))
WHERE hostname IS NOT NULL;
-- Create a hostname index for lease4.
CREATE INDEX lease4_by_hostname ON lease4 (
hostname
)
CREATE INDEX lease4_by_hostname ON lease4 (
lower(hostname)
)
WHERE hostname IS NOT NULL;
-- Create a hostname index for lease6.
CREATE INDEX lease6_by_hostname ON lease6 (
hostname
)
CREATE INDEX lease6_by_hostname ON lease6 (
lower(hostname)
)
WHERE hostname IS NOT NULL;
-- Move to lower case hostnames in lease4 table.
UPDATE lease4 SET hostname = lower(hostname)
WHERE lower(hostname) != hostname;
-- Not required so in comment
-- UPDATE lease4 SET hostname = lower(hostname)
-- WHERE lower(hostname) != hostname;
-- Move to lower case hostnames in lease6 table.
UPDATE lease6 SET hostname = lower(hostname)
WHERE lower(hostname) != hostname;
-- Not required so in comment
-- UPDATE lease6 SET hostname = lower(hostname)
-- WHERE lower(hostname) != hostname;
-- Set 6.0 schema version.
UPDATE schema_version
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment