Efficiently generating configuration operations for network devices
AssigneeJuniper Networks, Inc.
InventorPradeep H. Krishnamurthy
Life of this patent
Estimating the term…
Abstract
An example management device includes memory to store a current set of values and a candidate set of values representing a final state of the current set of values after one or more operations on the current set of values have been performed on the current set of values. The management device also includes a processor to generate operations to be executed by a network device to transform the current set of values into the candidate set of values. The elements may represent collections of objects for which order matters, such as ordering of policies to be enforced by a firewall. The management device generates the operations in an efficient manner, e.g., to reduce the number of steps required to generate the operations, and to reduce the number of operations generated.
Claims22
A method comprising:
- receiving a candidate set of values representing a final state of a current set of values after one or more operations on the current set of values have been performed on the current set of values;
- generating a hashtable having key values that map index values of elements in the current set of values to index values of matching elements in the candidate set of values, comprising:
- adding the index values of the elements in the current set of values to the hashtable;
- and
- for each element in the candidate set of values, adding the element in the candidate set of values to a key value of the hashtable when the hashtable includes the element in the current set of values that matches the element in the candidate set of values;
- generating, using the hashtable, a first set of operations of the one or more operations, the first set of operations comprising add or move operations to add or move elements to the current set of values that are present in an order in the candidate set of values but are not present in the order in the current set of values;
- and
- generating, using the hashtable, a second set of operations of the one or more operations, the second set of operations comprising delete operations to delete elements in the current set of values that are not present in the candidate set of values.
A device comprising:
- one or more memories configured to store a current set of values and a candidate set of values representing a final state of the current set of values after one or more operations on the current set of values have been performed on the current set of values;
- and
- one or more processors implemented in circuitry and configured to:
- generate a hashtable having key values that map index values of elements in the current set of values to index values of matching elements in the candidate set of values, wherein to generate the hashtable, the one or more processors are configured to:
- add the index values of the elements in the current set of values to the hashtable;
- and
- for each element in the candidate set of values, add the element in the candidate set of values to a key value of the hashtable when the hashtable includes the element in the current set of values that matches the element in the candidate set of values;
- generate, using the hashtable, a first set of operations of the one or more operations, the first set of operations comprising add or move operations to add or move elements to the current set of values that are present in an order in the candidate set of values but are not present in the order in the current set of values;
- and
- generate, using the hashtable, a second set of operations of the one or more operations, the second set of operations comprising delete operations to delete elements in the current set of values that are not present in the candidate set of values.
A system comprising:
- a network device;
- and
- a management device comprising:
- one or more memories configured to store a current set of values and a candidate set of values representing a final state of the current set of values after one or more operations on the current set of values have been performed on the current set of values;
- a network interface that communicatively couples the management device to the network device;
- and
- one or more processors implemented in circuitry and configured to:
- generate a hashtable having key values that map index values of elements in the current set of values to index values of matching elements in the candidate set of values, wherein to generate the hashtable, the one or more processors are configured to:
- add the index values of the elements in the current set of values to the hashtable;
- and
- for each element in the candidate set of values, add the element in the candidate set of values to a key value of the hashtable when the hashtable includes the element in the current set of values that matches the element in the candidate set of values;
- generate, using the hashtable, a first set of operations of the one or more operations, the first set of operations comprising add or move operations to add or move elements to the current set of values that are present in an order in the candidate set of values but are not present in the order in the current set of values;
- generate, using the hashtable, a second set of operations of the one or more operations, the second set of operations comprising delete operations to delete elements in the current set of values that are not present in the candidate set of values;
- and
- send the first set of operations and the second set of operations to the network device via the network interface to cause the network device to perform the first set of operations and the second set of operations on a current set of values stored as configuration data of the network device.
A computer-readable storage medium having stored thereon instructions that, when executed, cause a processor to:
- receive a candidate set of values representing a final state of a current set of values after one or more operations on the current set of values have been performed on the current set of values;
- generate a hashtable having key values that map index values of elements in the current set of values to index values of matching elements in the candidate set of values, wherein the instructions that cause the processor to generate the hashtable comprise instructions that cause the processor to:
- add the index values of the elements in the current set of values to the hashtable;
- and
- for each element in the candidate set of values, add the element in the candidate set of values to a key value of the hashtable when the hashtable includes the element in the current set of values that matches the element in the candidate set of values;
- generate, using the hashtable, a first set of operations of the one or more operations, the first set of operations comprising add or move operations to add or move elements to the current set of values that are present in an order in the candidate set of values but are not present in the order in the current set of values;
- and
- generate, using the hashtable, a second set of operations of the one or more operations, the second set of operations comprising delete operations to delete elements in the current set of values that are not present in the candidate set of values.
Dependencies are inferred from the claim text.