• Thomas Markwalder's avatar
    [4294] PostgreSQL now supports IPv4 lease stats recount · 64c23c76
    Thomas Markwalder authored
    src/lib/dhcpsrv/cfg_subnets4.cc
        CfgSubnets4::updateStatistics() - removed lease mgr instance check
    
    src/lib/dhcpsrv/mysql_lease_mgr.cc
        Added "ORDER by subnet_id" to RECOUNT_LEASE4_STATS
    
    src/lib/dhcpsrv/pgsql_lease_mgr.cc
        Added tagged statement RECOUNT_LEASE4_STATS
        PgSqlAddressStatsQuery4 - new class, PostgreSQL derivation of AddressStatsQuery4
        PgSqlLeaseMgr::startAddressStatsQuery4() - PostgreSQL impl of virtual method
    
    src/lib/dhcpsrv/srv_config.cc -
        SrvConfig::updateStatistics() - Added LeaseMgr singleton check around
        calls subnet statistics updates
    
    src/lib/dhcpsrv/tests/cfgmgr_unittest.cc
        CfgMgrTest:
           ~CfgMgrTest() - now destroys LeaseMgr singleton
           startBackend(int family = AF_INET) -  new method to create memfile lease mgr
    
            TEST_F(CfgMgrTest, commitStats4)
            TEST_F(CfgMgrTest, commitStats6)
        - added call to startBackend()
    
    src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc
        TEST_F(PgSqlLeaseMgrTest, recountAddressStats4) - new test
    64c23c76
cfg_subnets4.cc 9.85 KB