摘要 |
Embodiments of the present invention provide a method and an apparatus for clearing a configuration command in a communication equipment. The method mainly includes: acquiring hierarchy information of each network element and information of a configuration command deployed on each network element in a communication equipment, determining the hierarchy information of each network element as hierarchy information of the configuration command deployed on each network element, and constructing a configuration command tree in an initial status according to hierarchy information of configuration commands deployed on all network elements; obtaining a target status of the configuration command tree according to a specific configuration status that is specified by a user and the communication equipment needs to recover to, comparing the initial status and the target status of the configuration command tree, determining, according to a comparison result, a node that needs to be cleared from the configuration command tree, and clearing, according to a default clearing rule of the communication equipment and/or a customized clearing rule, the node that needs to be cleared. According to the embodiments of the present invention, the configuration command in the communication equipment may be cleared effectively and rapidly. |