METHOD AND SYSTEM FOR FACILITATING AUTOMATIC ANNOTATION AND DYNAMIC DISPLAY OF SWITCH CONFIGURATIONS

The configuration management system addresses the challenge of navigating large switch configuration files by annotating and grouping commands, enhancing efficiency and reducing errors in configuration management.

DE102021127675B4Active Publication Date: 2025-01-09HEWLETT PACKARD ENTERPRISE DEV LP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
DE102021127675
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-04-29
Filing Date
2021-10-25
Publication Date
2025-01-09
Estimated Expiration
2041-10-25

AI Technical Summary

Technical Problem

Navigating and configuring large switch configuration files is tedious and error-prone due to the lack of efficient methods for grouping and labeling configuration commands, making it difficult for administrators to locate relevant commands.

Method used

A configuration management system that annotates configuration files with labels based on switch grammar, dynamically generates a table of contents (ToC), and groups similar commands, allowing administrators to efficiently navigate and edit switch configurations.

Benefits of technology

Enables quick and accurate navigation through switch configuration files by summarizing and overlaying views, reducing manual intervention and minimizing errors during configuration changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

Method for dynamically managing a switch configuration file, wherein the method comprises: Determination of one or more groups of line specifications in a specification file by a computer system, wherein each line specification specifies a format of a respective variant of a configuration command of the switch; The computer system annotates a corresponding group in the specification file with a corresponding label; Linking a corresponding configuration command in the configuration file to a group label by the computer system based on a comparison of the configuration command with the group; Linking the configuration command to an entry in a table of contents for the configuration file by the computer system, where the entry corresponds to the group; and Selective display by the computer system of one or more configuration commands associated with the label in the configuration file in a graphical user interface (GUI) in response to input in the table of contents entry.
Need to check novelty before this filing date? Find Prior Art

Description

BACKGROUNDField of the invention

[0001] The present disclosure relates to communications networks. More specifically, the present disclosure relates to a method and system for facilitating automated annotation and dynamic display of switch configurations.

[0002] DE 11 2020 005 268 T5 describes rule-based systems that convert natural language queries into a structured query language.

[0003] DE 10 2019 133 197 A1 describes a computer system comprising a network communication interface, a memory, and one or more processing units communicatively connected to the memory and the network communication interface.

[0004] US 2020 / 0 175 103 A1 describes systems and methods for dynamic grammar extension provided to process multiple network switch configuration files as a single file.

[0005] Against this background, the invention relates to a method and a computer system for dynamically managing a configuration file of a switch of the computer system with the features of independent claims 1 and 10. Embodiments of the invention are the subject of the respective dependent claims. BRIEF DESCRIPTION OF THE CHARACTERS Fig. 1 shows an exemplary network that facilitates automatic annotation and dynamic display of switch configurations according to an embodiment of the present application. Fig. 2A shows an example of automatically annotating a switch configuration file and generating a dynamic table of contents (ToC) of the switch configuration in accordance with an embodiment of the present application. Fig. 2B shows an exemplary generation of sub-labels for the automatic annotation of a switch configuration file and the generation of a dynamic entry in the ToC, according to an embodiment of the present application. Fig. 2C shows an example generation of reference labels in a switch configuration file according to an embodiment of the present application. Fig. 2D shows an exemplary generation of distributed labels for the automatic annotation of a switch configuration file and the generation of dynamic entries in the ToC according to an embodiment of the present application. Fig. 2E shows an exemplary selective display of a switch configuration file and the ToC based on annotations and references according to an embodiment of the present application. Fig. 3A shows an exemplary label-based representation of switch configurations according to an embodiment of the present application. Fig. 3B shows an exemplary regular expression-based representation of switch configurations in accordance with an embodiment of the present application. Fig. 4A shows a flowchart illustrating the process of a configuration management system that analyzes a switch configuration file for automatic annotation and dynamically generates corresponding entries in the ToC, in accordance with an embodiment of the present application. Fig. 4B shows a flowchart illustrating the process of a configuration management system that parses a switch configuration file based on regular expressions and dynamically generates corresponding entries in the ToC, in accordance with an embodiment of the present application. Fig. 4C shows a flowchart illustrating the process of a configuration management system for generating reference labels in a switch configuration file according to an embodiment of the present application. Fig. Figure 4D shows a flowchart illustrating the process of a configuration management system selectively displaying a switch configuration file and the corresponding entries in the ToC, in accordance with an embodiment of the present application. Fig. 5A shows a flowchart illustrating the process of a configuration management system that creates linespec groups for the grammar of a switch according to an embodiment of the present application. Fig. 5B shows a flowchart illustrating the process of a configuration management system that generates regular expressions for the switch grammar of a switch in accordance with an embodiment of the present application. Fig. 6 shows an exemplary computer system enabling a configuration management system according to an embodiment of the present application. Fig. 7 shows an exemplary device enabling a configuration management system according to an embodiment of the present application.

[0006] In the figures, like numbers refer to the same elements of the figure. DETAILED DESCRIPTION

[0007] The following description is intended to enable one skilled in the art to make and use the invention and is given in the context of a particular application and its requirements. Overview

[0008] The internet is the transmission medium for a wide variety of applications running on physical and virtual devices. Such applications have led to an increasing demand for data traffic. As a result, device manufacturers are striving to develop switches with versatile functions. For this purpose, a switch can handle various protocols and services. A network administrator must configure the protocols and services, each of which may require a large number of configuration commands. Typically, a switch configuration file can be used to store the configuration commands. The lines in the configuration file can correspond to the configuration commands (e.g., the configuration commands in text form). When a switch is powered up, the switch can parse the configuration file and configure the protocols and services based on the lines in the configuration file.In this way, the switch can facilitate the control and data plane based on the configuration file.

[0009] Because a configuration file can contain a large number of configuration commands, the switch configuration file can become very large. For example, it is not uncommon for a configuration file to contain thousands of lines of configuration commands. To review or change a switch's configuration, the administrator may prefer to view the contents of the configuration file. The administrator can use an interface (such as a graphical user interface (GUI)) that can display the configuration file. However, the configuration commands in the configuration file are not necessarily clearly laid out. Navigating through a large number of lines of text can therefore be tedious. Even if the configuration commands are organized, the administrator may need to know the individual phrases of the command to search the configuration file.Although a graphical user interface can provide many desirable features for displaying the configuration file, some problems regarding locating the relevant commands in the switch's configuration file remain unsolved.

[0010] One embodiment of the present technology provides a system for dynamically managing a switch configuration file. During operation, the system may determine one or more groups of line specifications within a specification file. Each line specification may specify a format of a respective variant of a switch configuration command. The system may then label a corresponding group within the specification file. The system may then assign a corresponding configuration command of the configuration file to a label of a group based on the configuration command's compliance with the group.

[0011] In a variation of this embodiment, the system may match the configuration command to the group by matching the configuration command to a regular expression of the group.

[0012] In another variant, the system can generate the regular expression based on a keyword and a unique identifier from a line specification of the group. The system can then incorporate the regular expression into the specification file.

[0013] In a variation of this embodiment, the system can match the configuration command with the group by comparing the configuration command to a format specified by the group. The system can then annotate the configuration command in the configuration file with the label.

[0014] In another variant, the system can identify a plurality of configuration commands with the group and annotate the majority of configuration commands with the label.

[0015] In a variant of this embodiment, the system can assign the configuration command to an entry in a directory for the configuration file. The entry can correspond to the group.

[0016] In a further variation, the system may selectively display in a graphical user interface (GUI) one or more configuration commands associated with the label in the configuration file in response to input in the table of contents entry.

[0017] In another variant, the system can identify a subcommand of the configuration command. The system can also assign a sublabel to the subcommand in the context of the label. The system can then create a subentry under the table of contents entry.

[0018] In a variation of this embodiment, the system may group a plurality of non-contiguous configuration commands associated with the label into adjacent lines of the configuration file.

[0019] In a variant of this embodiment, the system can annotate a first configuration command that declares a configuration object with a first label. The system can also annotate a second configuration command that refers to the configuration object with a second label. The system can then link the first label to the second label.

[0020] In a variation of this embodiment, the system may determine the one or more groups by determining the degree of match of one or more terms in a line specification with one or more other line specifications. If the degree of match is greater than a threshold, the system may group the line specification with the one or more other line specifications.

[0021] The embodiments described herein solve the problem of efficient navigation through different sections of a configuration file by (i) annotating the configuration file with labels based on the switch grammar and (ii) dynamically generating tables of contents (ToC) based on the labels. The switch grammar can specify the format of a corresponding line of the configuration file (e.g., a configuration command). A configuration management system can allow an administrator to navigate through different sections of the configuration file using the table of contents.

[0022] The configuration file can contain several thousand lines relating to various services and protocols provided by a switch. Therefore, navigating the configuration file can be challenging. With existing technologies, an administrator can use a text editor to view the configuration file. The editor can be equipped with a scroll bar that can be used to scroll up or down to view different parts of the configuration file. The scroll bar can be annotated with pop-up help that displays the page number, section heading, or a small thumbnail of the contents of the current view. The editor can also give an administrator the ability to search for specific text in the configuration file. By accessing the matching instances (e.g.The corresponding text can be found in the configuration file by typing. If the configuration file is annotated with markup that specifies headings and subheadings, the editor can also incorporate the annotations into a table of contents. However, some of these techniques may require manual intervention. Furthermore, even with these techniques, navigating the configuration file can remain tedious.

[0023] To solve this problem, the editor can be extended with a configuration management system (CMS). The system can preprocess the configuration file text before presenting it to the administrator. This processing can involve matching a corresponding line of the configuration file with a grammar definition in the switch grammar and creating a summarized and overlaid view for all documents in the session. The grammar of a switch can be stored in a grammar file and can specify the format of a corresponding configuration command supported by the switch. The grammar can contain a set of line specifications, each of which can specify a format for all variants, including unique identifiers (or terms) and keywords, of a configuration command. A line specification can be referred to as a linespec.Since the grammar file stores line specifications, the grammar file can also be called a specification file.

[0024] In some embodiments, the system may parse the grammar and identify similar linespecs that may appear adjacent to each other in the grammar. The system may then assign a common label to the grouped linespecs. The grouped linespecs may be referred to as a linespec group. The system may group multiple linespecs if the number of terms and keywords the corresponding commands have in common exceeds a threshold. The system may maintain an exclusion list to prevent known, similar-looking commands from being grouped together. For example, there may be multiple commands that correspond to a server device (e.g., in terms of port, description, location, and contact associated with the device).

[0025] If the number of terms and keywords associated with server setup commands exceeds a threshold, the system can group the corresponding linespecs into a single linespec group, "Server Setup." The system can then assign a single label to the linespec group. The system can also include other group characteristics in the grammar, such as a group priority (e.g., for priority-based ordering relative to other groups) and a regular expression representing the linespec group. Based on the grouping, a linespec group in the grammar can contain a single linespec marked with a label. A label can therefore correspond to one or more linespecs in the grammar. After the labels are included in the grammar, the system can parse a switch's configuration file.

[0026] To present a preprocessed configuration file to the user, the system can match a corresponding line of the configuration file with a linespec of the grammar. After the match is complete, the editor can display the resulting configuration file as a prepared and editable document for the administrator. In response to a corresponding edit to the configuration file, the system can repeat the preprocessing operations. To further enhance the preprocessing operations, the system can dynamically generate labels (or tags) corresponding to the labels of the matching linespec and annotate the configuration file with the labels. If multiple configuration lines (i.e., the configuration commands) in the configuration file match the same linespec, the system can link the configuration lines with the same label.

[0027] For example, multiple configuration lines associated with different virtual local area networks (VLANs) may match the same line specification associated with a VLAN's configuration. Based on the matching, the system can obtain a label corresponding to the VLAN from the grammar and annotate the configuration lines with the label. If the command lines with the label are sparsely defined in the configuration file, the system can update the configuration file to combine or place the configuration lines side by side. This allows the system to sort the configuration file based on the order of matching to the grammar's line specifications.Consequently, by labeling the first instance of a linespec match, the system can insert a label into the configuration file where subsequent instances of that linespec match can appear.

[0028] In addition, the system can also dynamically generate a heading based on the combination of the text of the annotated configuration lines and the corresponding linespecs in the grammar. The system can use unique phrases to generate a subheading when multiple configuration lines correspond to the same linespec. For example, if the system annotates multiple configuration lines with a label corresponding to VLANs, the system can generate a ToC entry for VLAN. Assume that configuration lines of VLANs x, y, and z are annotated with a label associated with "VLAN." The system can then generate ToC entries with subheadings for VLANs x, y, and z.By annotating the configuration file with labels that match the corresponding line specifications and generating the ToC, the system can enable a user to efficiently navigate through different sections of the configuration file.

[0029] In this disclosure, the term "switch" is used in a general sense and can refer to any standalone or fabric switch operating at any network layer. The term "switch" should not be construed to limit embodiments of the present invention to Layer 2 networks. Any device that can forward traffic to an external device or another switch can be referred to as a "switch." Any physical or virtual device (e.g., a virtual machine or a switch operating on a computer) that can forward traffic to an end device can be referred to as a "switch." Examples of a "switch" include, but are not limited to, a Layer 2 switch, a Layer 3 router, a routing switch, a component of a Gen Z network, or a fabric switch comprising a plurality of similar or heterogeneous smaller physical and / or virtual switches.

[0030] The term "packet" refers to a group of bits that can be transported together over a network. The term "packet" should not be understood to limit embodiments of the present invention to Layer 3 networks. The term "packet" may be replaced with other terms that refer to a group of bits, such as "message," "frame," "cell," "datagram," or "transaction." Additionally, the term "port" may refer to the port that can receive or send data. The term "port" may also refer to the hardware, software, and / or firmware logic that may facilitate the operation of that port. Network architecture

[0031] Fig. 1 shows an example network that facilitates the automatic annotation and dynamic display of switch configurations according to an embodiment of the present application. A network 100 may include switches 102, 104, and 106. The network 100 may also include a management device 108 connected to the switch 104 (e.g., via one or more links and / or nodes). The management device 108 may enable a user 120 (e.g., a network administrator) to configure a corresponding switch of the network 100, such as switch 104. In some embodiments, the network 100 is a Gen-Z network, and a corresponding switch of the network 100, e.g., switch 104, is a Gen-Z component. In such a scenario, communication between the switches in the network 100 is based on memory-semantic communication.A corresponding packet forwarded across network 100 may be referred to as a transaction, and the corresponding data unit may be a flit. In some further embodiments, network 100 may be an Ethernet, InfiniBand, or other network and may use a corresponding communication protocol, such as Internet Protocol (IP), FibreChannel over Ethernet (FCoE), or another protocol.

[0032] A configuration file 112 of switch 104 may contain the configuration upon which switch 104 operates. Configuration file 112 may contain several thousand lines relating to various services and protocols employed by switch 104. Therefore, navigating configuration file 112 may be challenging. With existing technologies, user 120 may use a text editor to view configuration file 112. The editor may be equipped with a scroll bar that allows scrolling up or down to view different parts of configuration file 112. The scroll bar may be annotated with pop-up help that displays the page number, section heading, or a small thumbnail of the contents of the current view of configuration file 112.

[0033] The editor may also allow the user 120 to search for specific text in the configuration file 112. By accessing the matching instances (e.g., by typing them), the corresponding text can be found in the configuration file 112. If the configuration file 112 is annotated with markup indicating headings and subheadings, the editor may also insert the annotations into a table of contents. However, some of these techniques may require manual intervention. Furthermore, even with these techniques, navigating through the configuration file 112 may remain tedious. Consequently, configuring a large number of switches in the network 100 by editing lines of the corresponding configuration files can be error-prone and tedious.

[0034] To solve this problem, a configuration management system 140 may present an enhanced output of a configuration editor on interface 110. Examples of interface 110 may include, but are not limited to, a text interface (e.g., a command-line interface or CLI), a graphical user interface (GUI), a virtual or augmented reality interface, a voice-based interface, and a gesture-based interface. System 140 may operate on switch 104 or management device 108 (e.g., as a configuration server). System 140 may also operate in a client-server mode and be deployed on both switch 104 and management device 108. System 140 may preprocess the text of configuration file 112 before displaying the text to user 120.Processing may include matching a corresponding line of the configuration file 112 with a grammar definition in a switch grammar 114 and creating a summarized and overlaid view for all documents in the session. Because the grammar 114 stores line specifications, the grammar 114 may also be referred to as a specification file.

[0035] Grammar 114 may store the switch grammar, which may specify the format of a corresponding line of configuration file 112 (e.g., a configuration command). In other words, grammar 114 may specify the format of a particular configuration command supported by switch 104. The switch grammar in grammar 114 may include a set of line specifications, each of which may specify a format for all variants, including unique identifiers and keywords, of a configuration command. A line specification of grammar 114 may be referred to as a linespec. For example, a configuration command to configure a VLAN with identifier 100 in switch 104 may be "vlan 100" or "VLAN 100." Here, "VLAN" may be the keyword and "100" the unique identifier, since "100" uniquely identifies the configured VLAN.

[0036] To present a preprocessed version of the configuration file 112 to the user 120, the system 140 may match a corresponding line of the configuration file 112 with a line specification in the grammar 114. The interface 110 may then display the preprocessed configuration file 112 as a prepared and editable document for the user 120. In response to a corresponding edit of the configuration file 112 via the interface 110, the system 140 may repeat the preprocessing operations. To further enhance the preprocessing operations, the system 140 may annotate one or more line specifications with a label. The label may indicate the type of configuration commands specified by the line specifications.For example, if a set of line specifications specifies the format of the configuration commands used to configure a VLAN in switch 104, system 140 may annotate the line specifications with a "VLAN" label. After incorporating the labels into grammar 114, system 140 may parse configuration file 112. System 140 may dynamically generate labels corresponding to the labels of the matching linespecs and annotate configuration file 112 with the labels. If multiple configuration lines (i.e., the configuration commands) in configuration file 112 match the same linespec, system 140 may assign the configuration lines to the same label.

[0037] For example, multiple configuration lines associated with different VLANs configured for switch 104 may match the same linespec associated with a VLAN's configuration. Based on the match, system 140 may retrieve the VLAN label from grammar 114 and annotate the configuration lines with the VLAN label. If the command lines with the VLAN label are sparsely defined in configuration file 112, system 140 may update configuration file 112 to combine or juxtapose the configuration lines in configuration file 112. In this way, system 140 may sort configuration file 112 based on the order of match to the line specifications.Consequently, by labeling the first instance of a linespec match, the system 140 can insert a label into the configuration file 112 in which subsequent instances of that linespec match may occur. Furthermore, the system 140 can also dynamically generate a ToC 116 based on the combination of the text of the annotated configuration line in the configuration file 112 and the corresponding line specification in the grammar 114.

[0038] In some embodiments, system 140 may allow user 120 to define a label (or sub-label) for a configuration line in configuration file 112. System 140 may then record and store the custom label in association with the configuration line. When configuration file 112 is displayed on interface 110, system 140 may use the custom label. For example, user 120 may annotate configuration file 112 with custom labels to identify ports for administrators. With such custom labels, system 140 may sort the labels based on the configuration of switch 104. User 120 may also define labels that can apply to all configuration lines and are associated with the same linespec of grammar 114.

[0039] Fig. Figure 2A shows an example of the automatic annotation of a switch configuration file and the generation of a dynamic entry for a switch configuration ToC in accordance with one embodiment of the present application. To annotate the configuration file 112, the system 140 may determine a set of labels for the annotation. In some embodiments, the system 140 may parse the grammar 114 and identify similar line specifications that may appear adjacent to each other in the grammar 114. The system may then assign a common label to the grouped linespecs (or linespec group). For example, the grammar 114 may contain a plurality of linespecs that refer to different configuration elements, such as: "Commands": [ ...{"Command" : "Hostname WORD", "Group" : " GROUP_ID"}, {"Command" : "ntp-server IP_ADDRESS", "Terms" : [ { "i" : 1, "uid" : true} ], "Group" : "GROUP_NTP"}, {"Command" : "vrf WORD", "Terms" : [ { "i" : 1, "uid" : true} ], "Group" : " GROUP_VRF"}, {"Command" : "vlan <1-4094>", "Terms" : [ { "i" : 1, "uid" : true} ], "Group" : " GROUP_VLAN"}, {"Command" : "Interface PHYSIFNAME", "Terms" : [ { "i" : 1, "uid" : true} ], "Group" : " GROUP_Interface"}, {"Command" : "interface vlan <1-4094>", "Terms" : [ { "i" : 2, "uid" : true} ], "Group" : " GROUP_Interface"}, {"Command" : "snmp-server vrf WORD", "Terms" : [ { "i" : 2, "uid" : true} ], "Group" : " GROUP_SNMP"}, {"Command" : "snmp-server (system-locationlsystem-contact) WORD", "Group" : " GROUP_SNMP"}, ... ].

[0040] The system 140 may determine the linespecs for various configuration commands that can configure the Simple Network Management Protocol (SNMP) on the switch 104. The system 140 may then group these linespecs into a common "GROUP_SNMP" linespecification group that specifies the SNMP configuration command formats and label the linespecification group with a label 206 that corresponds to SNMP.

[0041] System 140 may group a plurality of linespecs of grammar 114 if the number of terms and keywords the corresponding commands have in common exceeds a threshold. System 140 may maintain an exclusion list to prevent known, similar-looking commands from being grouped together. In the example above, since common terms and keywords in the configuration commands associated with SNMP may exceed the threshold, system 140 may group the corresponding linespecs. Accordingly, system 140 may then assign a single label 206 to the linespec group. The system may also include other group characteristics in grammar 114, such as a group priority (e.g., for priority-based ordering relative to other groups) and a regular expression representing the linespec group.

[0042] In some embodiments, system 140 may create a group table in grammar 114 and store information associated with a corresponding linespec group, such as the group name, a corresponding label, and the group properties, in the table. For example, grammar 114 may include the following group table: "Groups: { "GROUP_ID" : { "label" : "ID"}, "GROUP_NTP" : { "label" : "NTP"}, "GROUP_VRF" : { "label" : "VRF"}, "GROUP_VLAN" : { "label" : "VLAN"}, "GROUP_Interface" : { "label" : "Interface"}, "GROUP_SNMP" : { "label" : "SNMP"},}

[0043] Here, the label 206 of the linespec group "GROUP_SNMP" may be "SNMP." Based on the grouping, a linespec group in the grammar 114 may contain a single linespec identified by a label. Thus, a label may correspond to one or more linespecs in the grammar 114. After the labels are incorporated into the grammar 114, the system 140 may parse the configuration file 112.

[0044] The system 140 may then match a corresponding line of the configuration file 112 with a linespec of the grammar 114. The system 140 may dynamically generate labels corresponding to the matching linespec and annotate the configuration file 112 with the labels. If multiple configuration lines in the configuration file 112 match the same group of linespecs in the grammar 114, the system 140 may annotate the configuration lines with the corresponding label. For example, multiple configuration lines in the configuration block 200 of the configuration file 112 may match the same group of line specifications associated with the VLAN configuration. Based on the match, the system 140 may obtain a label 202 from the grammar 114 and annotate the configuration lines in the configuration block 200 with a corresponding label 204.Similarly, system 140 may obtain label 206 from grammar 114 and annotate the matching configuration lines with a corresponding tag 208. In some embodiments, labels 202 and 204 may be the same label. System 140 may also perform a mapping between labels 202 and 204. In this way, interface 110 may enable quick navigation between configuration file 112 and grammar 114.

[0045] If the command lines with the VLAN label 204 are sparsely defined in the configuration file 112, the system 140 may update the configuration file 112 to group or concatenate the configuration lines in the configuration block 200. Similarly, the system 140 may update the configuration file 112 to group or concatenate the configuration lines associated with the interfaces. In this way, the system 140 may sort the configuration file 112 based on the order of matching the line specifications of the grammar 114. For example, if the line specifications for VLANs appear before the line specifications for interfaces in the grammar 114, the configuration lines for VLANs may appear before the configuration lines for interfaces in the configuration file 112.In other words, in the order in which the groups of line specifications appear in the grammar 114, the corresponding configuration lines may appear in the same order in the configuration file 112.

[0046] Consequently, by identifying the first instance of a linespec match, e.g., a VLAN linespec match, the system 140 may insert the label 204 into the configuration file 112 where subsequent instances of the VLAN linespec match may occur (i.e., the subsequent lines of the configuration block 200). Furthermore, the system 140 may also dynamically generate the ToC 116 based on the combination of the text of the configuration file 112 and the corresponding line specification in the grammar 114. For example, the system 140 may retrieve the keyword "VLAN" from the configuration lines associated with label 204 and generate a corresponding ToC entry 200 for VLAN. Similarly, the system 140 may retrieve the keyword "SNMP" from the configuration lines associated with label 208 and create a corresponding ToC entry 212 for SNMP.

[0047] In addition, the system 140 may use unique expressions (e.g., terms and identifiers) to generate a subheading (or subentries) when multiple configuration lines correspond to the same linespec group. For example, if the system 140 annotates multiple configuration lines with label 204 for VLANs, the system 140 may generate a ToC entry 210 for VLAN. In the configuration file 112, label 204 is associated with "VLAN" and annotates the configuration lines of VLANs 100, 200, and 300. Since the unique identifiers for VLANs are 100, 200, and 300, the system 140 may then generate ToC subentries with subheadings for VLANs 100, 200, and 300. For example, since configuration block 200 contains a configuration for VLAN 300, system 140 may create a subentry 214 for VLAN 300 under VLAN entry 210.By annotating the configuration file 210 with labels that match the corresponding line specifications in the grammar 114 and generating a ToC 116, the system 140 can enable the user 120 to efficiently navigate through various sections of the configuration file 112 via the interface 110. For example, the user 120 can select entry 210 from ToC 116, which can shift the current view of the interface 110 to the code block 200. In addition, the system 140 can also highlight the code block 200 in the interface 110.

[0048] System 140 may also match similar but dissimilar terms if the corresponding linespecs in grammar 114 are not completely consistent. For example, system 140 may determine that "vlan ( [ 0-9] +)" may correspond to "vlan \ 1" and "(attribute | advertise | suppress) -map (\w+)" may correspond to "route-map \1". Where, the special character "\1" may refer to "the first linespec group that matches the regular expression" and the special character "\w" may refer to "any string containing [A-Za-z0-9_]".

[0049] Fig. 2B shows an example generation of sublabels for the automatic annotation of a switch configuration file and the dynamic generation of ToC entries in accordance with an embodiment of the present application. A linespec group of grammar 114 may correspond to a large number of configuration lines in configuration file 112. As a result, a single label for a linespec group may not provide sufficient granularity for efficient navigation within configuration file 112. For example, system 140 may annotate configuration file 112 with a label 222 indicating "Interface" based on a corresponding label 220 of a "GROUP_Interface" linespec group of grammar 114. However, user 120 may define a large number of VLAN interfaces for switch 104 in configuration block 228.A respective VLAN interface may correspond to a plurality of configuration lines in the configuration file 112. Consequently, the label 222 may correspond to a large number of configuration lines in the configuration block 228.

[0050] To enable more detailed annotation, system 140 may parse the unique identifiers (e.g., terms or phrases) from the matching linespec to generate a sublabel in the context of a higher-order outer label. A corresponding configuration line of configuration block 228 may match the linespec group "GROUP_Interface" of grammar 114 based on the following linespec: "Commands" : [ ... {"Command" : "interface vlan <1-4094>", "Terms" : [ { "i" : 2, "uid" : true} ], "Group" : "GROUP_Interface"}, ]

[0051] System 140 can automatically create a sublabel definition based on the information from the matching row specification (i.e., the definition of the "GROUP_Interface" row specification group). Since the row specification specifies that the unique identifier should appear at index = 2, system 140 can specify in the sublabel definition that the unique identifier should appear at a position corresponding to an index value of 2. For example, system 140 can generate the following sublabel definition for a corresponding VLAN interface: "Groups: { "GROUP_Interface" : { "Label" : "Interface", "sub-label" : { "format" : "%d", "params" : [ "i" : 2]},

[0052] In this sublabel definition, the "sub-label" field can specify a format for the sublabel. This format can specify that the sublabel should contain the phrase "VLAN" followed by the configuration value at index 2 of the corresponding configuration line.

[0053] Based on this sublabel definition, the system 140 may generate a sublabel 224 labeled "VLAN 1" for the configuration line labeled "interface vlan 1." Similarly, for the configuration line labeled "interface vlan 999," the system 140 may generate a sublabel 226 corresponding to "VLAN 999." For a corresponding sublabel, the system 140 may also generate a subentry with a subheading in ToC 116. For the entry 216 for "interface" in ToC 116, the system 140 may generate a subentry with a corresponding subheading specifying a corresponding VLAN interface in the configuration block 228. For example, for the sublabel 226, the system 140 may generate a subentry 218 for the interface VLAN 999 under the entry 216 for ToC 116.

[0054] In some embodiments, the system 140 may include references in the configuration file 112. Fig. Figure 2C shows an example generation of reference labels in a switch configuration file according to an embodiment of the present application. A configuration line in the configuration file 112 may declare (or define) a configuration object, such as a VLAN or interface, or reference a declared configuration object. The declaration may be defined as a configuration line that declares (or instantiates) a configuration object for configuring the switch 104. A reference may refer to a declaration (i.e., a declaration may be derived from a reference). Note that a reference to an undeclared configuration object may cause a configuration error.

[0055] For example, configuration file 112 may contain a declaration for VLAN 100. Configuration file 112 may then contain a configuration line that may define an interface for VLAN 100, thereby creating a reference to the declaration of VLAN 100. In this way, configuration file 112 may contain a large number of references to a declared configuration object. System 140 may annotate the declaration of VLAN 100 with a declaration label 232. Conversely, system 140 may annotate the declaration of interface VLAN 100 with a reference label 234, which may refer to label 232. As a result, user 120 may navigate from the configuration line of interface VLAN 100 to the declaration of VLAN 100 based on labels 232 and 234 (e.g., by inputting to interface 110).However, if a VLAN interface is defined for a VLAN that has not been declared, the system 140 may indicate a configuration error.

[0056] The line specifications in grammar 114 may not contain distinguishing features that differentiate references from declarations. Therefore, system 140 may compare a corresponding configuration line to a line format to determine whether the configuration is a declaration or a reference. If the configuration line begins with one or more keywords followed by a unique identifier, system 140 may determine that the configuration line is the declaration for the configuration object associated with the unique identifier. Conversely, if the configuration line contains one or more keywords followed by a unique identifier but does not begin with one, system 140 may determine that the configuration line refers to the configuration object associated with the unique identifier. The set of keywords may indicate the type of declaration or reference.

[0057] Fig. Figure 2D shows an example generation of distributed labels for the automatic annotation of a switch configuration file and the generation of dynamic entries in the ToC according to an embodiment of the present application. Some configuration lines in the configuration file 112 may correspond to the same label but may not appear adjacent to each other. As a result, configuration lines corresponding to the same label or sub-label may span multiple non-contiguous configuration lines. In the example in Fig. In Figure 2D, the label 242 labeled "Identification" is associated with configuration lines that appear in non-contiguous configuration lines. To link different segments of the configuration file 112 associated with the label 242, the system 140 may create a sub-label for a corresponding segment of the configuration file 112 and form a chain of links between the sub-labels. Therefore, the label 242 may be a distributed (or split) label.

[0058] In configuration file 112, some configuration lines may correspond to line specifications corresponding to both the SNMP server and the identification. Since some of the system identifications are defined in the context of an SNMP server, system 140 may initially organize these configuration lines based on a label for the SNMP server. System 140 may then assign the configuration lines associated with the identification to label 242. System 140 may link the configuration line segments using sublabels. System 140 may also create a subentry in ToC 116 for each configuration line corresponding to the identifications under entry 244 for "Identification." For example, system 140 may create a subentry 246 with a corresponding subheading indicating an identification of a system contact related to an SNMP server.Note that the text of a subentry does not necessarily have to be the last sentence of a command line. The subentry can contain a combination of phrases from the command and external data not contained in the configuration file 112 (e.g., a network status).

[0059] When user 120 provides input to ToC 116 via interface 110 to select entry 244 (e.g., clicks or taps "Identification"), system 140 may display the configuration lines associated with label 242. Given such input, system 140 may navigate from one sub-label to the next sub-label in the chain. System 140 may also navigate from one segment of configuration lines to the next non-contiguous segment. System 140 may display only the configuration lines associated with label 242 on interface 110 (i.e., the current view of interface 110 is reduced to the configuration lines associated with label 242).In this way, even if some related configuration lines appear as non-contiguous segments in the configuration file 112, the system 140 can facilitate efficient navigation for the non-contiguous segments based on the annotations.

[0060] Fig. 2E shows an exemplary selective display of a switch configuration file and the ToC based on annotations and references in accordance with an embodiment of the present application. To enable user 120 to efficiently navigate configuration file 112, system 140 may selectively display a reduced view of configuration file 112 on interface 110. The reduced view may include only the configuration lines associated with a label or sublabel selected from ToC 116. Such lines may include the labeled configuration lines and the references to the labeled configuration lines. System 140 may also highlight the reference-related information in the selective display. If the selected label corresponds to a declaration, system 140 may also display the references to that declaration.However, if the selected marking is a reference, the system 140 can also display the declaration associated with this reference.

[0061] In this way, the selective display can display the configuration lines relevant to the selected label, sublabel, or configuration line. The user 120 can determine whether the selective display is dynamically updated as new lines are selected. For example, if the user 120 selects entry 254 of the ToC 116 corresponding to VLAN 100, the system 140 can display the configuration lines relevant to VLAN 100 in the selective display 250 on the interface 110. Assume that a label 252 is associated with VLAN 100. The relevant configuration lines can then include the segment of the configuration file 112 labeled with label 252, the configuration lines to which the labeled segment refers, and the configuration lines related to VLAN 100. The system 140 may mark the configuration lines that are labeled 252 (e.g., the declaration of VLAN 100) with a mark 256.Since entry 254 corresponds to the declaration of VLAN 100, system 140 may also display the configuration lines with references to this declaration with a highlight 258 that may highlight the reference to VLAN 100.

[0062] Fig. 3A shows an exemplary label-based representation of switch configurations according to an embodiment of the present application. The operations of system 140 may be performed at a central location (e.g., access device 108 acting as a management server), at switch 104, or a combination of both. Because the same switch grammar for a class of switches may be used for the switches belonging to that class, the switch grammar does not need to be specific to an individual switch. Therefore, system 140 may supplement grammar 114 with labels on device 108 (e.g., on the server side) (operation 302). System 140 may parse configuration file 112 at switch 104 or at device 108 (operation 304). It should be noted that once processing is initiated at switch 104, subsequent steps may be performed at switch 104.

[0063] Based on the parsing, the system 140 may match a corresponding configuration line of the configuration file 112 with a line specification of the grammar 114 (operation 306) and annotate the configuration file 112 with labels accordingly (operation 308), as described in connection with the Fig. 2A and Fig. 2B. The system 140 may also identify the references and declarations in the configuration file 112 (operation 310). Based on the annotations, the system 140 may insert links from the identified references to the corresponding declarations (operation 312), as described in connection with Fig. 2C. System 140 may then render configuration file 112 and ToC 116 (operation 314). The rendering operation includes generating ToC 116 based on the labels and sublabels of configuration file 112. ToC 116 may exclude mismatched labels of grammar 114. Such labels may be present in grammar 114 but may not match a configuration line of configuration file 112.

[0064] In some embodiments, system 140 may use a regular expression (regex) to match configuration lines to line specifications. Fig. Figure 3B shows an example of a regular expression-based representation of switch configurations in accordance with an embodiment of the present application. To facilitate regular expression-based matching and rendering, system 140 may augment grammar 114 with labels (operation 322). System 140 may add a regular expression to a linespec based on the definition specified in the linespec. In other words, the regular expression may be generated from the switch grammar. For example, the regular expression for matching against a linespec associated with a VLAN interface may be "^interface vlan [0-9]+". System 140 may generate this regular expression based on the format of the corresponding configuration command defined in the linespec.

[0065] The system 140 may also include a regular expression in a corresponding label and sublabel (operation 324). To generate a regular expression for a label, the system 140 may include the keywords from the line specifications associated with the label. These keywords may appear verbatim in the regular expression. The regular expressions for the unique identifiers may conform to the format of the unique identifiers. For example, if a unique identifier can be expressed in a numeric format, such as "<1-4094>," the system 140 may specify "[0-9]+" as the corresponding regular expression. Such a regular expression may match more values ​​(e.g., both 4095 and 5000) than a direct match against a line identifier. However, even with multiple matches, the system 140 can efficiently navigate through the configuration file 112.If a unique identifier can be expressed using alphabetic characters (e.g., a "word" format), the system 140 may specify "\w+" as the corresponding regular expression. If multiple line specifications are associated with the same label, the regular expression for the respective line specification may be logically integrated into the regular expression (e.g., with a logical "OR").

[0066] System 140 may parse configuration file 326 (operation 326) and compare a configuration line to the corresponding line specification (or line specifications) based on the regular expressions (operation 328). Because a corresponding line of configuration file 112 can be compared to the regular expressions in grammar 114, configuration file 112 may not need to be supplemented with labels and sub-labels, thereby obviating the need to modify configuration file 112. System 140 may then render configuration file 112 and ToC 116 (operation 330). System 140 may use the regular expression for a corresponding label and sub-label to dynamically create ToC 116. System 140 may then use regular expressions associated with a corresponding ToC 116 entry to navigate configuration file 112.For example, when user 120 selects an entry, system 140 may use the regular expression for that entry to find the instance in configuration file 112. By using regular expressions, system 140 may reduce preprocessing overhead. Operation

[0067] Fig. 4A shows a flowchart illustrating the process of a configuration management system that parses a switch configuration file for automatic annotation and dynamically generates corresponding entries in the ToC, in accordance with an embodiment of the present application. During operation, the system may select a configuration line by analyzing a configuration file (operation 402) and matching the configuration line to the corresponding line specification in the grammar (operation 404). The system may identify the label from the grammar and generate a reference to the corresponding linespec group in the grammar (operation 406). The reference enables the system to navigate to the matching linespec group. The identified label may be a sublabel of another label.

[0068] The system can then determine whether the configuration line exhibits label continuity (operation 408). Label continuity indicates whether the configuration line is associated with the same label as the previous configuration line. If label continuity is identified for the configuration line, the system can associate the configuration line with the label contained in the configuration file (i.e., the label used to label the previous line) (operation 418). Conversely, if the configuration line does not exhibit label continuity, the system can associate the configuration line with the identified label (operation 410). The system can then determine whether organization is required for the configuration line (operation 412).The configuration line may require an organization if a previously parsed configuration line is associated with the same label and the current configuration line is not associated with any other parent label.

[0069] If organization is required, the system can identify the previous configuration line(s) associated with the same label (operation 414) and move the configuration line next to the identified configuration line(s) (operation 416). After associating the configuration line with the label contained in the configuration file (operation 418), or if organization is not required (operation 412), the system can determine whether the configuration line requires a ToC entry (operation 420). If a ToC entry is required, the system can generate a ToC entry for the configuration line (operation 422).

[0070] If a ToC entry is not required, the system can identify a ToC entry for the configuration line (operation 424). After creating or identifying the ToC entry, the system can establish a bidirectional reference between the label and the ToC entry (operation 426) and determine whether parsing is complete (operation 428). The bidirectional reference allows a user to navigate between the configuration line and the entry. For example, one can navigate to the other by clicking or touching one entry. Once parsing is complete, the system can proceed to selecting the next configuration line by parsing the configuration file (operation 402).

[0071] Fig. Figure 4B shows a flowchart illustrating the process of a configuration management system that parses a switch configuration file based on regular expressions and dynamically generates corresponding entries in the ToC, in accordance with an embodiment of the present application. During operation, the system may select a configuration line by parsing a configuration file (operation 432) and compare the configuration line to a corresponding regular expression in the grammar (operation 434). The system may then identify a linespec group and subgroups from the grammar based on the corresponding regular expressions (operation 436).

[0072] The system can then determine whether the configuration line requires a ToC entry (operation 438). If a ToC entry is required, the system can generate a ToC entry for the configuration line (operation 440). If a ToC entry is not required, the system can identify a ToC entry for the configuration line (operation 442). After generating or identifying the ToC entry, the system can establish a bidirectional relationship between the label and the ToC entry (operation 444). The system can then determine whether parsing is complete (operation 446). When parsing is complete, the system can proceed to select the next configuration line by parsing the configuration file (operation 432).

[0073] Fig. 4C shows a flowchart illustrating the process of a configuration management system generating reference labels in a switch configuration file in accordance with an embodiment of the present application. During operation, the system may select a configuration line by analyzing a configuration file (operation 452) and determining whether a reference is detected in the configuration line (operation 454). If no reference is detected, the system may determine whether a declaration is detected (operation 456). If a declaration is detected, the system may annotate the configuration line with a declaration label for the declared configuration object (operation 458). Conversely, if a reference is detected, the system may annotate the configuration line with a reference label for the referenced configuration object (operation 462).

[0074] The system can then determine whether a declaration exists for the reference (operation 464). If a declaration exists for the reference, the system can establish a link between the reference and the declaration (operation 468). The link can be established based on the labels. Conversely, if no declaration exists for the reference, the system can indicate an inconsistency with the reference (for example, an error) (operation 466). After the configuration line has been tagged with a declaration label, an inconsistency has been indicated, or the link has been created, or if no declaration or reference is detected (operation 456, 458, 466, or 468), the system can determine whether parsing is complete (operation 460). When parsing is complete, the system can proceed to select the next configuration line by parsing the configuration file (operation 452).

[0075] Fig. Figure 4D shows a flowchart illustrating the process of a configuration management system selectively displaying a switch configuration file and the corresponding entries in the ToC, in accordance with an embodiment of the present application. During operation, the system may determine a selection from a user interface (e.g., an input to a ToC entry) (operation 482) and determine a configuration line based on a label or regular expression associated with the selection (operation 484). The system may then select the relevant configuration lines in the configuration file and ToC entries (operation 484). Subsequently, the system may selectively display the selected configuration lines and ToC entries via the user interface (operation 488).

[0076] Fig. 5A shows a flowchart illustrating the process of a configuration management system that generates linespec groups for the grammar of a switch in accordance with an embodiment of the present application. During operation, the system may select a linespec by parsing the grammar (operation 502) and comparing the linespec to previous lines (operation 504). The system may then determine if a match is greater than a threshold based on the comparison (operation 506). The threshold may be based, for example, on the number of matching characters or phrases. If the match is greater than the threshold, the system may determine if a linespec group exists for the matching linespec (operation 508).

[0077] If the linespec group does not exist, the system may create a new linespec group in the grammar (operation 510). If the group exists, or if the new linespec group has been created (operation 508 or 510), the system may associate the linespec with the linespec group (operation 512). If the match is not greater than the threshold or associated with the linespec of the linespec group (operation 506 or 512), the system may determine whether parsing is complete (operation 514). When parsing is complete, the system may proceed to selecting the next linespec by parsing the grammar (operation 502).

[0078] Fig. 5B shows a flowchart illustrating the process of a configuration management system generating regular expressions for the switch grammar of a switch according to an embodiment of the present application. During operation, the system may select a linespec by parsing the grammar (operation 552) and determine the linespec group for the linespec (operation 554). The system may then generate a regular expression for the linespec (operation 556) and determine whether multiple regular expressions exist for the linespec group (operation 558). If multiple regular expressions exist, the system may combine the multiple regular expressions with the linespec group with an "OR" condition (operation 560).

[0079] If, however, there are no multiple regular expressions, the system can concatenate the regular expression with the linespec group (operation 562). If another linespec is added to this linespec group, the regular expression of this additional linespec can be concatenated with the linespec group using the OR condition. After concatenating the regular expression(s) with the linespec group (operation 560 or 562), the system can determine whether parsing is complete (operation 564). If parsing is complete, the system can proceed to select the next linespec by parsing the grammar (operation 502). Example system

[0080] Fig. 6 shows an exemplary computer system enabling a configuration management system in accordance with an embodiment of the present application. The computer and communications system 600 includes a processor 602, a memory device 604, and a storage device 608. The storage device 604 may include a volatile memory device (e.g., a dual in-line memory module (DIMM)). Furthermore, the computer and communications system 600 may be connected to a display device 610, a keyboard 612, and a pointing device 614. The storage device 608 may store an operating system 616, a configuration management system 618, and data 636. The configuration management system 618 may facilitate the operation of the system 110.

[0081] The configuration management system 618 may include instructions that, when executed by the computer and communications system 600, may cause the computer and communications system 600 to perform the methods and / or processes described in this disclosure. In particular, the configuration management system 618 may include instructions for labeling a switch configuration file by matching the configuration lines to the line specifications of a switch grammar (labeling logic block 620). Furthermore, the configuration management system 618 may include instructions for grouping line specifications into line specification groups (grouping logic block 622).

[0082] The configuration management system 618 may also include instructions for sub-labeling the configuration file as needed (sub-labeling logic block 624). Furthermore, the configuration management system 618 may include instructions for labeling the configuration file with distributed or shared labels as needed (split label logic block 626). Furthermore, the configuration management system 618 may include instructions for determining declarations and references of configuration objects (reference logic block 628). The configuration management system 618 may then include instructions for linking the references to the corresponding declarations (reference logic block 628).

[0083] The configuration management system 618 may include instructions for generating regular expressions for a corresponding line specification (expression logic block 630). Furthermore, the configuration management system 618 may include instructions for matching a respective configuration line with a line specification based on the corresponding regular expression (expression logic block 630). The configuration management system 618 may also include instructions for selectively displaying a selected segment of the configuration file (display logic block 632). The configuration management system 618 may further include instructions for sending and receiving messages (communication logic block 634).

[0084] The data 636 may contain any data that facilitates the operation of the configuration management system 618. The data 636 may contain, among other things, information about configuration files, switch grammar, ToC, labels, sublabels, regular expressions, declarations, and references.

[0085] Fig. Figure 7 shows an exemplary device that facilitates a configuration management system according to an embodiment of the present application. The event analysis device 700 may include a plurality of units or devices that can communicate with each other via a wired, wireless, quantum light, or electrical communication channel. The device 700 may be a switch in a network. The device 700 may be implemented with one or more integrated circuits and may include fewer or more units or devices than those shown in Fig. 7. Furthermore, the device 700 may be integrated into a computer system or implemented as a separate device that can communicate with other computer systems and / or devices. In particular, the device 700 may include units 702-716 that perform similar functions or operations as the modules 620-634 of the computer and communication system 600 of Fig. 6, including: an annotation unit 702; a grouping unit 704; a sub-label unit 706; a shared label unit 708; a reference unit 710; an expression unit 712; a display unit 714; and a communication unit 716.

[0086] The data structures and code described in this Detailed Description are typically stored on a computer-readable storage medium, which can be any device or medium capable of storing code and / or data for use by a computer system. Computer-readable storage medium includes, but is not limited to, volatile memory, non-volatile memory, magnetic and optical storage devices such as floppy disks, magnetic tapes, CDs (compact discs), DVDs (digital versatile discs or digital video discs), or other media capable of storing computer-readable media now known or later developed.

[0087] The methods and processes described in the "Detailed Description" section may be embodied as code and / or data that may be stored in a computer-readable storage medium, as described above. When a computer system reads and executes the code and / or data stored on the computer-readable storage medium, the computer system executes the methods and processes embodied as data structures and code stored in the computer-readable storage medium.

[0088] The methods and processes described herein may be performed by and / or embodied in hardware modules or devices. These modules or devices may include, but are not limited to, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a dedicated or shared processor that executes a particular software module or piece of code at a particular time, and / or other programmable logic devices known now or later developed. When activated, the hardware modules or devices execute the methods and processes contained within them.

[0089] The foregoing descriptions of embodiments of the present invention have been presented for purposes of illustration and description only. They are not intended to be exhaustive or limiting of this disclosure. Accordingly, many modifications and variations will be apparent to those skilled in the art. The scope of the present invention is defined by the appended claims.

Claims

[1] A method for dynamically managing a configuration file of a switch, the method comprising: Determining, by a computer system, one or more groups of line specifications in a specification file, wherein a respective line specification specifies a format of a respective variant of a configuration command of the switch; Annotating a corresponding group in the specification file with a corresponding label by the computer system; Linking a corresponding configuration command of the configuration file to a label of a group by the computer system based on a comparison of the configuration command with the group; Linking the configuration command to an entry of a table of contents for the configuration file by the computer system, the entry corresponding to the group; and selective display of one or more configuration commands associated with the label in the configuration file in a graphical user interface (GUI) by the computer system in response to an input in the table of contents entry. [2] The method of claim 1, wherein matching the configuration command with the group further comprises matching the configuration command with a regular expression of the group. [3] The method of claim 2, further comprising: Generating the regular expression based on a keyword and a unique identifier of a line specification of the group; and the inclusion of the regular expression in the specification file. [4] The method of claim 1, wherein comparing the configuration command with the group further comprises: Matching the configuration command with a format specified by the group; and Annotate the configuration command with the label in the configuration file. [5] The method of claim 4, further comprising: Identification of a plurality of configuration commands with the group and Annotate the majority of configuration commands with the label. [6] The method of claim 1, further comprising: Identifying a subcommand of the configuration command and annotating the subcommand with a sublabel in a context of the label; and Create a subentry under the table of contents entry. [7] The method of claim 1, further comprising grouping a plurality of non-contiguous configuration commands associated with the label into adjacent lines of the configuration file. [8] The method of claim 1, further comprising: Annotating a first configuration command declaring a configuration object with a first label; Annotating a second configuration command that refers to the configuration object with a second label; and the linking of the second label with the first label. [9] The method of claim 1, wherein the determination of the one or more groups further comprises: Determining the degree of agreement of one or more terms in a line specification with one or more other line specifications and in response to the degree of agreement being greater than a threshold, grouping the row specification with the one or more other row specifications. [10] A computer system comprising: a processor; a non-transitory computer-readable storage medium storing instructions that, when executed by the processor, cause the processor to perform a method for dynamically managing a configuration file of a switch, the method comprising: Determining one or more groups of line specifications in a specification file, each line specification specifying a format of a respective variant of a configuration command of the switch; Annotating a corresponding group in the specification file with a corresponding label by the computer system; Linking a corresponding configuration command of the configuration file to a label of a group by the computer system based on the comparison of the configuration command with the group; Linking the configuration command to an entry of a table of contents for the configuration file by the computer system, the entry corresponding to the group; and selective display of one or more configuration commands associated with the label in the configuration file in a graphical user interface (GUI) by the computer system in response to an input in the table of contents entry. [11] The computer system of claim 10, wherein matching the configuration command with the group further comprises matching the configuration command with a regular expression of the group. [12] The computer system of claim 11, wherein the method further comprises: Generating the regular expression based on a keyword and a unique identifier of a line specification of the group and the inclusion of the regular expression in the specification file. [13] The computer system of claim 10, wherein matching the configuration command with the group further comprises: Matching the configuration command with a format specified by the group and Annotate the configuration command with the label in the configuration file. [14] The computer system of claim 13, wherein the method further comprises: Identification of a plurality of configuration commands with the group and Annotate the majority of configuration commands with the label. [15] The computer system of claim 10, wherein the method further comprises: Identification of a subcommand of the configuration command and Annotating the subcommand with a sublabel in a context of the label; and Create a subentry under the table of contents entry. [16] The computer system of claim 10, wherein the method further comprises grouping a plurality of non-contiguous configuration commands associated with the label into adjacent lines of the configuration file. [17] The computer system of claim 10, wherein the method further comprises: Annotating a first configuration command declaring a configuration object with a first label; Annotate a second configuration command that refers to the configuration object with a second label and the linking of the second label with the first label. [18] The computer system of claim 10, wherein determining the one or more groups further comprises: Determining the degree of agreement of one or more terms in a line specification with one or more other line specifications and in response to the degree of agreement being greater than a threshold, grouping the row specification with the one or more other row specifications.

Citation Information

Patent Citations

  • Client-server model for the multi-document editor

    DE102019133197A1

  • AUTOMATIC GENERATING OF SCHEMA ANNOTATION FILES FOR CONVERTING NATURAL LANGUAGE QUERIES INTO A STRUCTURED QUERY LANGUAGE

    DE112020005268T5

  • Dynamic grammar augmentation for editing multiple network switch configuration files as a single file

    US20200175103A1