# US 2022/0291914 A1 · Updating grammar file to configure deployment of updates of network devices

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0291914 A1
- Document ID: US20220291914A1
- Status: Published application
- Kind: A1
- Application number: 17/200,684
- Filed: 2021-03-12
- Published: 2022-09-15
- Earliest claimed: 2021-03-12
- Assignees: Hewlett Packard Enterprise Development LP
- Applicants: Hewlett Packard Enterprise Development LP
- Inventors: PADIYAR GURU PRASANNA; Vivek Gunasekaran
- Web page: https://patentgrep.com/patent/US20220291914A1

## CPC

- G06F 8/65: Updates (security arrangements therefor G06F21/57)
- G06F 40/14: Tree-structured documents (parsing G06F40/205; validation G06F40/226)
- G06F 40/211: Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
- G06F 40/253: Grammatical analysis; Style critique
- H04L 41/082: the condition being updates or upgrades of network functionality
- H04L 41/0869: Validating the configuration within one network element
- H04L 41/22: comprising specially adapted graphical user interfaces [GUI]
- H04L 43/10: Active monitoring, e.g. heartbeat, ping or trace-route
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Systems and methods are provided for extracting grammar data from a network device, the grammar data being used to validate syntax of commands provided to the network device, determining that the server lacks an existing grammar file corresponding to the network device, and generating a new grammar file including a base grammar file and secondary grammar files based on the extracted grammar data.

## Claims

### Claim 1

A computer-implemented method of a server comprising:
extracting grammar data from a network device, the grammar data being used to validate syntax of commands provided to the network device;
determining that the server lacks an existing grammar file corresponding to the network device;
generating a base grammar file from the extracted grammar data;
parsing the base grammar file to extract segments of the base grammar file; and
generating secondary grammar files based on the extracted segments, wherein the parsing is conducted in parallel with the generation of the secondary grammar files.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein the secondary grammar files comprise a mask and a patch, the mask including a condensed version of the base grammar file and the patch including instructions regarding how one or more commands appear in a running configuration.

### Claim 3 (depends on 2)

The computer-implemented method of claim 2, wherein the mask is generated by extracting, from the network device, ordering data of CLI (command-line interface) commands and rules of dependencies between the CLI commands.

### Claim 4 (depends on 2)

The computer-implemented method of claim 2, wherein the mask includes rules to sort commands.

### Claim 5 (depends on 2)

The computer-implemented method of claim 2, wherein the base grammar file is generated at the server in a JSON (JavaScript Object Notation) format.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, further comprising:
rolling back the network device to a previous configuration to enable an interface that was disabled from the previous configuration.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, wherein the extraction of grammar data is via a REST (Representational State Transfer) API (Application Programming Interface).

### Claim 8 (depends on 1)

The computer-implemented method of claim 1, wherein the extraction of grammar data is in response to a firmware update at the network device.

### Claim 9

A computing system comprising:
a server that implements updates to a network device;
one or more processors; and
a memory storing instructions that, when executed by the one or more processors, cause the one or more processors to:
detect a presence of the network device;
determine that the network device fails to map to any grammar files stored in the server;
extract grammar data of the network device; and
generate a new grammar file based on the extracted grammar data, the new grammar file being used to implement updates to the network device.

### Claim 10 (depends on 9)

The computing system of claim 9, wherein the instructions further cause the one or more processors to:
in response to a determination that the network device fails to map to any grammar files, determine a grammar file that maps to a previous firmware version of the device; wherein the generation of the new grammar file comprises:
determining a difference between the grammar file mapping to the previous firmware version and a grammar file of the network device; and
generating the new grammar file based on the grammar file mapping to the previous firmware version and the difference.

### Claim 11 (depends on 9)

The computing system of claim 9, wherein the generation of the new grammar file comprises:
generating a base grammar file and secondary grammar files.

### Claim 12 (depends on 9)

The computing system of claim 9, wherein the secondary grammar files comprise a mask and a patch, the mask including a condensed version of the base grammar file and the patch including instructions regarding how one or more commands appear in a running configuration.

### Claim 13 (depends on 12)

The computing system of claim 12, wherein the mask is generated by extracting, from the network device, ordering data of CLI (command-line interface) commands and rules of dependencies between the CLI commands.

### Claim 14 (depends on 12)

The computing system of claim 12, wherein the mask includes rules to sort commands.

### Claim 15 (depends on 12)

The computing system of claim 12, wherein the base grammar file is generated at the server in a JSON (JavaScript Object Notation) format.

### Claim 16 (depends on 9)

The computing system of claim 9, wherein the instructions further cause the one or more processors to roll back the network device to a previous configuration to enable an interface that was disabled from the previous configuration.

### Claim 17

A non-transitory computer-readable storage medium including instructions that, when executed by at least one processor of a computing system, cause the computing system to perform a method comprising:
extracting grammar data from a network device, the grammar data being used to validate syntax of commands provided to the network device;
determining that the server lacks an existing grammar file corresponding to the network device;
generating a base grammar file from the extracted grammar data;
parsing the base grammar file to extract segments of the base grammar file; and
generating secondary grammar files based on the extracted segments, wherein the parsing is conducted in parallel with the generation of the secondary grammar files.

### Claim 18 (depends on 17)

The non-transitory computer-readable storage medium of claim 17, wherein the secondary grammar files comprise a mask and a patch, the mask including a condensed version of the base grammar file and the patch including instructions regarding how one or more commands appear in a running configuration.

### Claim 19 (depends on 18)

The non-transitory computer-readable storage medium of claim 18, wherein the mask is generated by extracting, from the network device, ordering data of CLI (command-line interface) commands and rules of dependencies between the CLI commands.

### Claim 20 (depends on 18)

The non-transitory computer-readable storage medium of claim 18, wherein the mask includes rules to sort commands.
