Method and apparatus for re-generating configuration commands of a network device using an object-based approach
First Claim
1. A method, comprising the computer-implemented steps of:
- receiving, by a network device, a command definition file that defines the syntax of one or more network device configuration commands;
receiving, by the network device, a network device configuration command;
creating and storing one or more particular objects in a database for one or more argument values of the network device configuration command;
receiving, by the network device, a request to re-generate the network device configuration command previously issued to the same network device, wherein the configuration command has one or more parameters, each of which is associated with a value;
in response to receiving the request;
determining, for the network device configuration command, a pattern that represents a first storage location in the database on the network device for the one or more particular objects associated with the network device configuration command;
determining, based on the pattern and a mapping between patterns and storage locations, a second storage location on the network device for a template representing a syntax for the network device configuration command;
retrieving from the first and second storage locations on the network device, based on the pattern, both;
the template representing the syntax for the network device configuration command, and one or more particular objects containing values for all the one or more parameters;
creating a re-generated configuration command, equivalent to the previously issued network device configuration command, by substituting the values of the one or more objects into the template;
wherein the method is performed by one or more network devices.
0 Assignments
0 Petitions
Accused Products
Abstract
Embodiments disclose re-generating a configuration command of a network device. A method includes receiving a request to re-generate a configuration command previously issued to a network device, wherein the configuration command has one or more parameters; retrieving a template and a pattern associated with the configuration command, wherein the template represents a syntax for the configuration command, wherein the pattern represents a storage location for the configuration command; based on the pattern, retrieving from an object database all objects containing values for all the particular parameters from the storage location specified by the pattern; and creating a re-generated configuration command by substituting the values of the retrieved objects into the template.
26 Citations
20 Claims
-
1. A method, comprising the computer-implemented steps of:
-
receiving, by a network device, a command definition file that defines the syntax of one or more network device configuration commands; receiving, by the network device, a network device configuration command; creating and storing one or more particular objects in a database for one or more argument values of the network device configuration command; receiving, by the network device, a request to re-generate the network device configuration command previously issued to the same network device, wherein the configuration command has one or more parameters, each of which is associated with a value; in response to receiving the request; determining, for the network device configuration command, a pattern that represents a first storage location in the database on the network device for the one or more particular objects associated with the network device configuration command; determining, based on the pattern and a mapping between patterns and storage locations, a second storage location on the network device for a template representing a syntax for the network device configuration command; retrieving from the first and second storage locations on the network device, based on the pattern, both;
the template representing the syntax for the network device configuration command, and one or more particular objects containing values for all the one or more parameters;creating a re-generated configuration command, equivalent to the previously issued network device configuration command, by substituting the values of the one or more objects into the template; wherein the method is performed by one or more network devices. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A computer-readable storage device storing one or more sequences of instructions, which instructions, when executed by one or more processors, cause:
-
receiving, by a network device, a command definition file that defines the syntax of one or more network device configuration commands; receiving, by the network device, a network device configuration command; creating and storing one or more particular objects in a database for one or more argument values of the network device configuration command; receiving, by the network device, a request to re-generate the network device configuration command previously issued to the same network device, wherein the configuration command has one or more parameters, each of which is associated with a value; in response to receiving the request; determining, for the network device configuration command, a pattern that represents a first storage location in the database on the network device for the one or more particular objects associated with the network device configuration command; determining, based on the pattern and a mapping between patterns and storage locations, a second storage location on the network device for a template representing a syntax for the network device configuration command; retrieving from the first and second storage locations on the network device, based on the pattern, both;
the template representing the syntax for the network device configuration command, and one or more particular objects containing values for all the one or more parameters;creating a re-generated configuration command, equivalent to the previously issued network device configuration command, by substituting the values of the one or more objects into the template; wherein the method is performed by one or more network devices. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
-
Specification