Browse Source

[2100] cleanup: removed removeZone().

right now it doesn't work, and when we need to implement it, the internal
will need to be substantially updated anyway, so it doesn't make much sense
to keep the nonworkable version.
JINMEI Tatuya 12 years ago
parent
commit
86f3e7053f

+ 0 - 9
src/lib/datasrc/memory/tests/zone_table_unittest.cc

@@ -110,15 +110,6 @@ TEST_F(ZoneTableTest, addZone) {
                  std::bad_alloc);
 }
 
-TEST_F(ZoneTableTest, DISABLED_removeZone) {
-    EXPECT_EQ(result::SUCCESS, zone_table->addZone(mem_sgmt_, zname1).code);
-    EXPECT_EQ(result::SUCCESS, zone_table->addZone(mem_sgmt_, zname2).code);
-    EXPECT_EQ(result::SUCCESS, zone_table->addZone(mem_sgmt_, zname3).code);
-
-    EXPECT_EQ(result::SUCCESS, zone_table->removeZone(Name("example.net")));
-    EXPECT_EQ(result::NOTFOUND, zone_table->removeZone(Name("example.net")));
-}
-
 TEST_F(ZoneTableTest, findZone) {
     const ZoneTable::AddResult add_result1 =
         zone_table->addZone(mem_sgmt_, zname1);

+ 0 - 8
src/lib/datasrc/memory/zone_table.cc

@@ -110,14 +110,6 @@ ZoneTable::addZone(util::MemorySegment& mem_sgmt, const Name& zone_name) {
     }
 }
 
-result::Result
-ZoneTable::removeZone(const Name&) {
-    // TODO Implement
-    assert(false);
-    // This should not ever be returned, the assert should kill us by now
-    return (result::SUCCESS);
-}
-
 ZoneTable::FindResult
 ZoneTable::findZone(const Name& name) const {
     ZoneTableNode* node(NULL);

+ 0 - 11
src/lib/datasrc/memory/zone_table.h

@@ -153,17 +153,6 @@ public:
     AddResult addZone(util::MemorySegment& mem_sgmt,
                       const dns::Name& zone_name);
 
-    /// Remove a zone of the given origin name from the \c ZoneTable.
-    ///
-    /// This method should never throw an exception.
-    ///
-    /// \param origin The origin name of the zone to be removed.
-    /// \return \c result::SUCCESS If the zone is successfully
-    /// removed from the zone table.
-    /// \return \c result::NOTFOUND The zone table does not
-    /// store the zone that matches \c origin.
-    result::Result removeZone(const isc::dns::Name& origin);
-
     /// Find a zone that best matches the given name in the \c ZoneTable.
     ///
     /// It searches the internal storage for a zone that gives the