WO2024016726A1 - 设备配置方法、网络设备、芯片及计算机可读存储介质 - Google Patents

设备配置方法、网络设备、芯片及计算机可读存储介质 Download PDF

Info

Publication number
WO2024016726A1
WO2024016726A1 PCT/CN2023/085750 CN2023085750W WO2024016726A1 WO 2024016726 A1 WO2024016726 A1 WO 2024016726A1 CN 2023085750 W CN2023085750 W CN 2023085750W WO 2024016726 A1 WO2024016726 A1 WO 2024016726A1
Authority
WO
WIPO (PCT)
Prior art keywords
configuration
template
configuration template
network device
effective
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2023/085750
Other languages
English (en)
French (fr)
Inventor
吴展
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to EP23841799.2A priority Critical patent/EP4546736A4/en
Publication of WO2024016726A1 publication Critical patent/WO2024016726A1/zh
Priority to US19/028,279 priority patent/US20250158886A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/145Network analysis or design involving simulating, designing, planning or modelling of a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0226Mapping or translating multiple network management protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • H04L41/0843Configuration by using pre-existing information, e.g. using templates or copying from other elements based on generic templates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design

Definitions

  • the present application relates to the field of communications, and in particular, to a device configuration method, network device, chip and computer-readable storage medium.
  • CLI command line interface
  • the first aspect of the embodiment of the present application discloses a device configuration method, which includes: parsing the configuration template based on the Yet Another Next Generation (YANG) model, and determining the parent configuration template inherited by the configuration template and/or the aggregated Child configuration template; if the configuration template inherits the parent configuration template and/or aggregates a child configuration template, based on the configuration template and the configuration template's parent configuration template and/or child configuration template, the effective configuration template is converted, and the configuration template and the configuration template are converted Both the parent configuration template and/or the child configuration template meet the YANG language specification of the YANG model; obtain device configuration parameters, and associate the device configuration parameters with the effective configuration template; convert the effective configuration template associated with the device configuration parameters into a configuration message ;Send configuration packets to network devices.
  • YANG Next Generation
  • configuration templates can have template inheritance relationships and/or template aggregation relationships. Based on the hierarchical template design concept, the configuration templates have a high reuse rate and are easy to maintain. Configuration templates can Flexible combination according to actual network configuration requirements, network configuration requirements are easy to implement.
  • the device configuration method further includes: if the configuration template does not inherit a parent configuration template and aggregate a child configuration template, converting based on the configuration template to obtain the effective configuration template.
  • the configuration template does not inherit the parent configuration template and the aggregation has child configuration templates, it means that the configuration template does not inherit the configuration command set of other configuration templates or reference the configuration command set of other configuration templates.
  • the configuration template can be directly converted. Get the effective configuration template.
  • the method before parsing the configuration template based on the YANG model, the method includes: obtaining the YANG model associated with the configuration template.
  • obtaining the YANG model associated with the configuration template includes: obtaining the device type or device model used by the configuration template; and determining the YANG model associated with the configuration template based on the device type or device model.
  • different device types or device models may correspond to different YANG models.
  • the applicable device types or device models can be set in advance for the configuration template, and then the device type or device model used by the configuration template can be determined.
  • the YANG model associated with the configuration template can be determined.
  • converting the configuration template and the parent configuration template and/or child configuration template of the configuration template to obtain the effective configuration template includes: converting the configuration template and the parent configuration template and/or child configuration template of the configuration template based on the YANG model Perform YANG syntax verification.
  • the parent configuration template and/or aggregated child configuration template inherited by the configuration template are configured based on the model type of the YANG model; if the configuration template and the parent configuration template and/or child configuration of the configuration template If the templates all pass the verification, the effective configuration template will be converted based on the configuration template and the parent configuration template and/or child configuration template.
  • the inheritance and/or aggregation relationship of the model type configuration template based on the YANG model, and the configuration template does not need to contain verification logic.
  • the device that executes the device configuration method automatically verifies the configuration template based on the YANG model, which can reduce The threshold for operation and maintenance personnel to write configuration templates, and when the configuration template and the parent configuration template and/or child configuration template of the configuration template are all verified, the effective configuration is obtained based on the conversion of the configuration template and the parent configuration template and/or child configuration template. Template to avoid YANG syntax errors in the converted effective configuration template.
  • converting the effective configuration template associated with the device configuration parameters into a configuration message includes: performing YANG semantic verification on the effective configuration template associated with the device configuration parameters based on the YANG model; if the effective configuration template passes the verification , convert the effective configuration template associated with the device configuration parameters into the configuration packet.
  • This technical solution is used to perform YANG semantic verification on the effective configuration template based on the YANG model to check whether there are YANG semantic errors in the effective configuration template. After the effective configuration template passes the verification, the effective configuration template associated with the device configuration parameters is converted into configuration messages to reduce possible subsequent network configuration errors and improve network equipment operation and maintenance efficiency.
  • the effective configuration template includes variables
  • converting the effective configuration template associated with device configuration parameters into a configuration message includes: assigning values to variables in the effective configuration template based on the device configuration parameters to obtain a configuration message.
  • the configuration template includes one or more variables
  • the effective configuration template converted based on the configuration template also includes one or more variables.
  • converting the effective configuration template associated with the device configuration parameters into a configuration packet includes: obtaining a network configuration protocol supported by the network device; converting the effective configuration template associated with the device configuration parameters into a configuration packet, configuring The format of the message is determined based on the network configuration protocol.
  • the format of the configuration message sent to the network device is determined based on the network configuration protocol supported by the network device, so that the network device can perform corresponding network configuration based on the configuration message.
  • the format of the configuration message includes JavaScript Object Notation (JSON) format or Extensible Markup Language (Extensive Markup Language, XML) format.
  • JSON JavaScript Object Notation
  • XML Extensible Markup Language
  • the format of the configuration message can include JSON format or XML format.
  • the configuration message delivered can be in JSON format or XML format.
  • the configuration message can be downloaded.
  • the configuration message sent can be in XML format.
  • the device configuration method further includes: in response to the creation instruction of the configuration template, opening a template creation interface, where the template creation interface includes multiple configuration items; and generating a configuration template based on the contents of the multiple configuration items.
  • Configuration template creation is simple and convenient, and can reduce the threshold for operation and maintenance personnel to write configuration templates. .
  • the second aspect of the embodiment of the present application discloses a device configuration method, which is applied to a first network device and a second network device.
  • the device configuration method includes: the first network device parses multiple configuration templates based on the YANG model to obtain effective configurations. Templates, multiple configuration templates include template inheritance relationships and/or template aggregation relationships, multiple configuration templates all meet the YANG language specification of the YANG model; the first network device obtains the device configuration parameters, and compares the device configuration parameters with the effective configuration template Perform association; the first network device converts the effective configuration template associated with the device configuration parameters into a configuration packet; the first network device sends the configuration packet to the second network device; the second network device performs corresponding network operations based on the configuration packet. configuration.
  • Adopting this technical solution and using template technology to perform network configuration on the second network device can improve the operation and maintenance efficiency of the second network device, flexibly customize different network configuration parameters for the second network device, and the configuration template complies with the YANG language of the YANG model Standard, so that configuration templates can be used in network device configuration based on the YANG model.
  • Configuration templates can have template inheritance relationships and/or template aggregation relationships. Based on the hierarchical template design concept, configuration templates have a high reuse rate and are easy to maintain. , configuration templates can be flexibly combined according to actual network configuration requirements, and network configuration requirements are easy to implement.
  • the method before the first network device parses the multiple configuration templates based on the YANG model, the method includes: the first network device obtains the YANG model associated with the multiple configuration templates.
  • the first network device parses the configuration template by using the YANG model associated with the configuration template, which can avoid the situation in which the configuration template cannot be parsed due to the use of incorrect YANG models.
  • the first network device obtains the YANG model associated with multiple configuration templates, including: the first network device obtains the device type or device model used by the multiple configuration templates; the first network device obtains the YANG model based on the device type or device model. , determine the YANG model associated with multiple configuration templates.
  • different device types or device models may correspond to different YANG models.
  • the applicable device types or device models can be set in advance for the configuration template, and then the first network device can obtain the device type used by the configuration template. Or the device model determines the YANG model associated with the configuration template.
  • the first network device parses multiple configuration templates based on the YANG model to obtain the effective configuration template, including: the first network device performs YANG syntax calibration on each configuration template in the multiple configuration templates based on the YANG model. Verification and template inheritance relationship and/or template aggregation relationship analysis, the template inheritance relationship and/or the template aggregation relationship analysis are configured based on the model type of the YANG model; if each configuration template passes the verification, the A network device converts multiple configuration templates into the effective configuration template based on the parsing results.
  • the inheritance and/or aggregation relationship of the model type configuration template is based on the YANG model, and the configuration template does not need to contain verification logic.
  • the first network device automatically verifies the configuration template based on the YANG model, which can reduce operation and maintenance.
  • the threshold for personnel to write configuration templates, and when multiple configuration templates pass verification, the effective configuration template is converted based on multiple configuration templates to avoid YANG syntax errors in the converted effective configuration template.
  • the first network device converts the effective configuration template associated with the device configuration parameters into a configuration message, including: the first network device performs YANG semantics on the effective configuration template associated with the device configuration parameters based on the YANG model. Verification; if the verification of the effective configuration template passes, the first network device converts the effective configuration template associated with the device configuration parameters into a configuration packet.
  • the first network device performs YANG semantic verification on the effective configuration template based on the YANG model to check whether there are YANG semantic errors in the effective configuration template.
  • the effective configuration template passes the verification, it will be associated with the effective configuration of the device configuration parameters.
  • the template is converted into a configuration packet, which reduces possible subsequent network configuration errors and improves the operation and maintenance efficiency of the secondary network equipment.
  • the effective configuration template includes variables
  • the first network device converts the effective configuration template associated with the device configuration parameters into a configuration message, including: the first network device performs operations on the variables in the effective configuration template based on the device configuration parameters. Assignment processing to obtain the configuration message.
  • the configuration template includes one or more variables
  • the effective configuration template converted based on the configuration template also includes one or more variables.
  • the first network device can obtain a configuration report by assigning values to the variables in the effective configuration template. arts.
  • the first network device converts the effective configuration template associated with the device configuration parameters into a configuration message, including: the first network device obtains the network configuration protocol supported by the second network device; the first network device associates the The effective configuration template of the device configuration parameters is converted into the configuration report.
  • the format of the configuration message is determined based on the network configuration protocol.
  • the format of the configuration message sent by the first network device to the second network device is determined based on the network configuration protocol supported by the second network device, so that the second network device can subsequently perform corresponding network configuration based on the configuration message. configuration.
  • the format of the configuration message includes JSON format or XML format
  • the first network device includes a controller
  • the second network device includes one of a switch, a router, and a forwarder.
  • the format of the configuration message sent by the controller to the switch, router, or forwarder can include JSON format or XML format.
  • the configuration message sent can be JSON. format or XML format.
  • the configuration packets delivered can be in XML format.
  • the device configuration method further includes: in response to the creation instruction of the configuration template, the first network device opens a template creation interface, the template creation interface includes multiple configuration items; the first network device generates a template based on the content of the multiple configuration items. Configure templates.
  • Configuration template creation is simple and convenient, and can reduce the threshold for operation and maintenance personnel to write configuration templates. .
  • embodiments of the present application provide a computer-readable storage medium.
  • the computer-readable storage medium stores computer instructions.
  • the network device causes the network device to execute as described in the first aspect. device configuration method.
  • inventions of the present application provide a network device.
  • the network device includes a processor and a memory.
  • the memory is used to store instructions, and the processor is used to call instructions in the memory, so that the network device performs the device configuration as described in the first aspect. method.
  • embodiments of the present application provide a computer program product.
  • the computer program product When the computer program product is run on a computer, it causes the computer to execute the device configuration method as described in the first aspect.
  • a sixth aspect provides a device having the function of realizing the device behavior in the method provided in the first aspect.
  • Functions can be implemented by hardware, or by hardware executing corresponding software.
  • Hardware or software includes one or more modules corresponding to the above functions.
  • the computer-readable storage medium described in the third aspect, the network device described in the fourth aspect, the computer program product described in the fifth aspect, and the device described in the sixth aspect are all the same as the above-mentioned first aspect. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects in the corresponding methods provided above, and will not be described again here.
  • Figure 1 is a schematic diagram of an application scenario of a device configuration method provided by an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of a control device provided by an embodiment of the present application.
  • Figure 3a is a schematic architectural diagram of a template engine provided by an embodiment of the present application.
  • Figure 3b is a schematic flow chart of obtaining a configuration message based on template engine conversion according to an embodiment of the present application
  • Figure 3c is a schematic diagram showing multiple configuration templates provided by an embodiment of the present application.
  • Figure 3d is a schematic diagram of nested calling of a template engine provided by an embodiment of the present application.
  • Figure 4 is a schematic flowchart of a device configuration method provided by an embodiment of the present application.
  • Figure 5 is a schematic diagram of a user interface for creating a configuration template provided by an embodiment of the present application
  • Figure 6 is a schematic diagram of the correlation between multiple configuration templates provided by an embodiment of the present application.
  • Figure 7 is a schematic flowchart of a device configuration method provided by an embodiment of the present application.
  • Figure 8 is a schematic diagram of a control device provided by an embodiment of the present application.
  • NETCONF Network Configuration Protocol is a network management protocol developed and standardized by the Internet Engineering Task Force (IETF). NETCONF provides a mechanism for installing, operating, and deleting network device configurations.
  • IETF Internet Engineering Task Force
  • REST Representational state transfer is a set of architectural constraints and principles. Applications or designs that meet these constraints and principles are called RESTful.
  • RESTCONF REST configuration protocol is another IETF standard that implements some NETCONF functions based on the RESTful interface through the HyperText Transfer Protocol (HTTP)/HyperText Transfer Protocol over SecureSocket Layer, HTTPS) NETCONF using Extensible Markup Language (XML) or JavaScript Object Notation (JavaScript Object Notation) JSON message, but it is missing several key NETCONF components, including multiple data stores, Commit or rollback and configuration locking.
  • HTTP HyperText Transfer Protocol
  • HTTPS HyperText Transfer Protocol over SecureSocket Layer
  • NETCONF using Extensible Markup Language (XML) or JavaScript Object Notation (JavaScript Object Notation) JSON message, but it is missing several key NETCONF components, including multiple data stores, Commit or rollback and configuration locking.
  • the YANG (Yet Another Next Generation) model also known as "Another Next Generation Model" is a data modeling language used to define data sent through network management protocols such as network configuration protocols NETCONF and RESTCONF.
  • the YANG data modeling language is maintained by the NETMOD working group in the Internet Engineering Task Force (IETF) and was released as RFC 6020 in October 2010.
  • the YANG model modularizes the hierarchical structure of data into a tree.
  • Each node in the tree has a name (i.e., node name), has a value (i.e., node value), and can also have a set of child nodes.
  • in the YANG model Module can define a hierarchy of nodes and can be used for NETCONF-based operations. And, along with its definitions, as well as definitions imported or included from elsewhere, a module is independent and compilable. When a module includes multiple nodes, there can be a hierarchical relationship between the multiple nodes.
  • the hierarchical relationship of multiple nodes refers to the relationship of multiple nodes in the tree, and terms such as parent node and child node can be used to describe the hierarchical relationship between nodes.
  • node 1 can be the parent node of node 2
  • node 2 can be the parent node of node 3.
  • node 1 can be the upper-level node of node 2
  • node 2 can be the upper-level node of node 3.
  • node 2 can be the next-level node of node 1
  • node 3 can be the next-level node of node 2.
  • FIG. 1 it is a schematic diagram of an application scenario of a device configuration method provided by an embodiment of the present application.
  • This application scenario may include: control device 10 and network device 20.
  • the control device 10 may send a configuration message to the network device 20 based on the YANG model.
  • the control device 10 can be connected to the service platform 30, and the service platform 30 can send instructions to the control device 10 to perform network configuration on the network device 20.
  • the network device 20 can be connected to the terminal device 40 .
  • the terminal device 40 can access the network through the network device 20 .
  • the control device 10 may be a controller, such as a software-defined network (SDN) controller, or other devices running an element management system (EMS).
  • Network device 20 may be a switch, router, repeater, etc.
  • the business platform 30 may be a user management system, a big data analysis platform, a network management system, etc.
  • the terminal device 40 may be a customer-premises equipment (CPE), a smartphone, a multimedia device, a streaming media device, a personal computer, a tablet computer, a handheld computer, a mobile Internet device (MID), or a wearable smart device. wait.
  • CPE customer-premises equipment
  • the interface between the control device 10 and the network device 20 can be recorded as a southbound interface, and the interface between the control device 10 and the service platform 30 can be recorded as a northbound interface.
  • the southbound interface is used to provide management functions for network elements of other manufacturers, that is, it is an interface provided downward.
  • the northbound interface is an interface provided to other manufacturers or operators for access and management, that is, an upwardly provided interface.
  • FIG. 2 is a schematic structural diagram of a control device provided by an embodiment of the present application.
  • the control device 10 includes a northbound interface 101, a southbound interface 102, a template engine 103 and a YANG model 104.
  • the template engine 103 refers to a program that can parse and convert configuration templates and device configuration parameters based on the YANG model 104 to obtain configuration messages.
  • the template engine 103 can receive the configuration template created by the operation and maintenance personnel (or users) and the device configuration parameters input by the operation and maintenance personnel through the northbound interface 101.
  • the template engine 103 calls the YANG model 104 to parse the configuration template to obtain the effective configuration template, and A configuration message is obtained based on the parsed effective configuration template and device configuration parameters.
  • the configuration packet can be delivered to the network device 20 through the southbound interface, so that the network device 20 can perform corresponding network configuration based on the configuration packet.
  • a configuration template can refer to a template used for network configuration of network devices.
  • the configuration template can be created according to the preset template syntax.
  • the configuration template can include one or more variables. Operation and maintenance personnel can configure variables according to actual network configuration requirements. Assign a value, for example, enter the corresponding device configuration parameter for the variable.
  • Configuration templates may include template inheritance relationships and/or template aggregation relationships.
  • the template inheritance relationship may mean that a configuration template is the parent configuration template of another configuration template.
  • a configuration template The configuration command set of the parent configuration template can be inherited.
  • the configuration command set can refer to a collection of multiple network configuration commands.
  • the template aggregation relationship can mean that a configuration template can have one or more sub-configuration templates, and the configuration template can reference the configuration command set of the sub-configuration templates.
  • the template engine 103 calls the YANG model 104 to parse the configuration template, which may mean that the template engine 103 calls the YANG model 104 to determine whether the configuration template has a parent configuration template and/or a child configuration template, so that it can be based on the configuration template and its parent configuration template and/or Or the sub-configuration template is converted to obtain the effective configuration template.
  • the template engine 103 converts the parsed effective configuration template and the device configuration parameters to obtain the configuration message.
  • the configuration message may be obtained by assigning the device configuration parameters to variables in the effective configuration template (the variables are derived from the configuration template).
  • the operation and maintenance personnel can create a configuration template and input device configuration parameters on the control device 10.
  • the control device 10 supports the creation of configuration templates in the form of a graphical interface or a code text box, and the template engine 103 performs the parsing and conversion of the configuration template. , the configuration message is obtained, and the control device 10 then delivers the configuration message to the network device 20 .
  • Operation and maintenance personnel can also create configuration templates on other devices.
  • the configuration template and device configuration parameters are loaded to the control device 10 in the form of plug-ins.
  • the template engine 103 performs parsing and conversion of the configuration template to obtain the configuration message, and the control device 10 then loads the configuration The message is delivered to the network device 20.
  • the template engine 103 may include a template conversion unit 1031 and a template execution unit 1032.
  • the configuration template a and its associated configuration templates (such as the parent configuration template and/or child configuration template of the configuration template a) may be transmitted to the template conversion unit 1031, and the template conversion Unit 1031 can perform YANG syntax verification and parsing on the input configuration template based on the YANG model, and obtain the effective configuration template b corresponding to the configuration template a.
  • the effective configuration template b and the device configuration parameters can be transmitted to the template execution unit 1032.
  • the template execution unit 1032 can perform YANG semantic verification and conversion on the input effective configuration template b based on the YANG model, and obtain the configuration message c corresponding to the configuration template a. .
  • FIG. 3b it is a schematic flowchart of converting a configuration template into a configuration message based on a template engine according to an embodiment of the present application.
  • operation and maintenance personnel use template technology to perform network configuration on network devices, which can improve the operation and maintenance efficiency of network devices and flexibly customize different network configuration parameters for network devices.
  • the template syntax for configuration templates can be predefined.
  • Configuration templates can have template inheritance relationships and/or template aggregation relationships. Based on the hierarchical template design concept, configuration templates have high reuse rate and flexibility. Good, easy to implement, maintain and expand, which can further reduce the maintenance workload of network equipment.
  • the configuration template may be displayed in text format, for example, the configuration template may be displayed in JSON format.
  • Configuration templates can also be displayed through model-driven interface generation. As shown in Figure 3c, it is a schematic diagram of the display of multiple configuration templates. The left part shows each configuration template and the inheritance relationship and/or aggregation relationship between configuration templates. The lower-level configuration template inherits the upper-level configuration template.
  • the configuration templates are tenant templates and public templates, tenant templates include i zone templates and ii zone templates, i zone templates include i_1 templates and i_2 templates (i_1 templates and i_2 templates inherit the i zone templates), i_1 Templates include i_11 template and i_12 template.
  • i_11 template inherits i_1 template
  • i_12 template inherits i_1 template and aggregates public subtemplate 1.
  • the public template includes public subtemplate 1 and public subtemplate 2.
  • the middle part shows the list of features included in the currently selected configuration template (for example, including account management, time zone, login restrictions, operation and maintenance monitoring, network reliability, security policies, etc.), and the right part shows the content included in the currently selected feature.
  • account management includes user name, user role, service type, user password, etc.).
  • the template conversion unit 1031 verifies and parses the configuration template to obtain an effective configuration template corresponding to the configuration template.
  • the template conversion unit 1031 may first verify the configuration template to confirm whether the configuration template complies with the specification. Verifying the configuration template may include performing YANG syntax verification and template syntax verification on the configuration template, and the verification results can be displayed through the human-computer interaction interface. If there is a syntax error, a prompt can be output to remind the operation and maintenance personnel to modify the configuration template. After the configuration template passes the verification, the configuration template will be parsed to determine whether the configuration template contains a parent configuration template and/or a child configuration template, so as to The effective configuration template can be converted based on the configuration template and its parent configuration template and/or child configuration template.
  • the template execution unit 1032 obtains the device configuration parameters, and converts the device configuration parameters and the effective configuration template to obtain a configuration message corresponding to the configuration template.
  • the template execution unit 1032 can obtain the device configuration parameters input by the operation and maintenance personnel through the northbound interface. Before converting the effective configuration template, the template execution unit 1032 may first perform YANG semantic verification on the effective configuration template to confirm whether the effective configuration template complies with the specification. The semantic verification results can be displayed through the human-computer interaction interface. If there is a semantic error, a prompt can be output to remind the operation and maintenance personnel to modify the configuration template or the effective configuration template. When the effective configuration template passes the verification, the device configuration parameters are written into the variables in the effective configuration template to achieve obtainment and configuration. Configuration packet corresponding to the template.
  • template engines can be called nested, that is, the output of a certain template engine can be used as the input of the next template engine, and again used as device configuration parameters to be applied to other configuration templates.
  • the configuration output by the template engine at the end The message is sent to the network device for network configuration.
  • template engine E1 is used to generate business-level configuration messages
  • template engine E2 is used to generate device-level configuration messages.
  • the input of template engine E1 includes configuration template T1 and device configuration parameter p1
  • the input of template engine E2 includes templates.
  • the output of engine E1 and the configuration template T2 are generated by the template engine E2 based on the output of the template engine E1 and the configuration template T2.
  • FIG. 4 is a schematic flowchart of a device configuration method provided by an embodiment of the present application.
  • the device configuration method provided by this application can be implemented, for example, through S401 to S405 as follows.
  • the first network device parses multiple configuration templates based on the YANG model to obtain the effective configuration template.
  • multiple configuration templates may include template inheritance relationships and/or template aggregation relationships. Multiple configuration templates can be used to configure multiple network device sets at different levels, and each network device set can include one or more network devices. The network configuration parameters required for each network device set can be derived from one or more configuration templates. Network device sets can contain shared networks devices, or contain different network devices respectively.
  • a network system NS1 includes N second network devices.
  • the first network device is used for operation and maintenance management of the network system NS1.
  • N is a positive integer greater than 1.
  • the first network device may be a controller, and the second network device may be a router, a switch, a repeater, and other devices.
  • the first network device corresponds to the control device 10 shown in FIG. 1
  • the second network device corresponds to the network device 20 shown in FIG. 1 .
  • N second network devices may belong to the first network device set
  • M second network devices among the N second network devices belong to the second network device set
  • other P second network devices among the N second network devices may belong to the first network device set.
  • the network devices belong to the third network device set
  • Q network devices among the M second network devices belong to the fourth network device set.
  • the division of the network device set is not limited.
  • the second network device in the network system NS1 can be divided into a network device set according to actual operation and maintenance requirements.
  • the network device set may be divided according to the area where the second network device is distributed or the network node to which it belongs.
  • the multiple configuration templates include configuration template T1, configuration template T2, and configuration template T3.
  • Configuration template T2 inherits the configuration command set of configuration template T1
  • configuration template T3 inherits the configuration command set of configuration template T2.
  • the second network device deployed in province A belongs to the first network device set, and the second network device deployed in province A is configured to obtain the configuration command set of configuration template T1 to configure network parameters;
  • the second network device in province B and city belongs to the second network device set, and is set to the second network device in province A and city B to obtain the configuration command set of configuration template T2 to configure network parameters; it will be deployed in province A and B
  • the second network device in County C of City A belongs to the third network device set, and the second network device set in County C of City B of province A obtains the configuration command set of the configuration template T3 to configure network parameters.
  • configuration template T2 and configuration template T3 can be modified in a coordinated manner.
  • Each configuration template can be created by operation and maintenance personnel according to the actual network configuration requirements of the network device set.
  • Each configuration template meets the YANG language specification of the YANG model, so that each configuration template can support inheritance and aggregation syntax based on the YANG model. , supports YANG semantics, YANG syntax verification, etc.
  • Inheritance based on the YANG model can mean that a configuration template can inherit the configuration command set of the parent configuration template by being aware of the YANG model (perceiving the association between itself and the parent configuration template and the YANG model).
  • YANG-based aggregation can mean that a certain configuration template T3 can realize the configuration command set that references the sub-configuration template by perceiving the YANG model (perceiving the association between itself and the sub-configuration template and the YANG model).
  • the inheritance and/or aggregation relationship of the template can be configured based on the model type of the YANG model.
  • the model type of the YANG model can refer to the type of model defined in the YANG model.
  • the model type of the YANG model can be defined through list, container, etc.
  • multiple configuration templates may be associated with the YANG model in advance.
  • the first network device may include multiple YANG models, and each YANG model may correspond to a different network device type or a different model of network device.
  • the association between the YANG model and the device type or device model may be established in advance, and the configuration template is set to determine the relationship between the YANG model and the device type or device model.
  • the device type or device model used is used to associate the configuration template with the YANG model.
  • operation and maintenance personnel can create configuration templates in a variety of ways and set associations between configuration templates, such as through inheritance or aggregation syntax, so that the first configuration template among multiple configuration templates can inherit or Aggregate a second configuration template among multiple configuration templates.
  • creation method of the configuration template there is no limitation on the creation method of the configuration template.
  • operation and maintenance personnel can create configuration templates by writing code, or operation and maintenance personnel can create configuration templates through the template creation interface.
  • Each configuration template can include one or more configuration commands.
  • the template creation interface can be an interface generated based on the YANG model driver.
  • the template creation interface can include multiple configuration items.
  • the configuration items can support operation and maintenance personnel to input or select content, and then a configuration template can be generated based on the content of multiple configuration items.
  • the first network device can also receive configuration templates sent by other network devices or servers through the northbound interface.
  • the first network device can respond to the creation instruction of the configuration template, open the UI for creating the configuration template, and can create multiple configuration instances for the configuration module in the UI, and each configuration instance can include multiple Attribute items, for example, multiple attribute items may include configuration instance number (vlan-id), configuration instance name (name), configuration instance description (description), etc.
  • This application does not limit the attribute items included in the configuration instance, and can be set according to actual application requirements.
  • the first network device may pre-store a YANG model, and the YANG model may be sent to the first network by other network devices or servers.
  • the first network device of the device may receive the YANG model through the northbound interface.
  • the YANG model includes the following code information:
  • the above YANG model definition uses vlan to identify the configuration instance.
  • list vlan indicates that there can be multiple vlan models, that is, “list vlan” defines the model type of the YANG model as vlan.
  • Key “vlan-id” indicates that a vlan is uniquely identified based on vlan-id.
  • leaf vlan-id indicates that vlan has three attribute items, namely vlan-id, name, description.
  • configuration templates include configuration template T1, configuration template T2, configuration template T3, and configuration template T4.
  • the operation and maintenance personnel expect that the second network devices deployed in country G will all obtain the configuration command set of configuration template T1, and the second network devices deployed in province A of country G will all obtain the configuration command set of configuration template T2; in country A, province B, All second network devices deployed in the city obtain the configuration command set of configuration template T3.
  • configuration template T3 refers to the configuration command set of configuration template T4, that is, configuration template T3 can be set to aggregate configuration template T4.
  • configuration template T1, configuration template T2, configuration template T3, and configuration template T4 can be shown in Figure 6.
  • configuration template T1 includes the following code information:
  • Configuration template T1 defines configuration instance vlan10, in which the field of the attribute item name is variable and is defined as ⁇ vlan_0_name ⁇ in the form of a variable, which can be specified by operation and maintenance personnel later.
  • configuration template T2 includes the following code information:
  • Configuration template T2 uses the keyword "z:extends" to express inheritance, and may also have other grammatical forms to express inheritance, which is not limited in this application.
  • Configuration template T2 inherits configuration template T1, and adds new configuration instances vlan20, vlanif10, and vlanif20.
  • Configuration template T2 needs to be aware of the YANG model to inherit the configuration template T1. If it is not aware of the YANG model, vlan20 in the configuration template T2 will overwrite vlan10 in the configuration template T1. Multiple vlans can be defined by being aware of the YANG model, and each vlan is based on a vlan. -id is used to identify the configuration template T2 to inherit the configuration template T1.
  • configuration template T4 includes the following code information:
  • Configuration template T4 defines static route 10.1.1.0 and configuration instance vlanif30.
  • configuration template T3 includes the following code information:
  • the configuration template T3 inherits the configuration template T2, and the aggregation configuration template T4 uses the keyword "z:include” to indicate aggregation, and may also have other syntax forms to indicate inheritance, which is not limited in this application.
  • the aggregation relationship also needs to be aware of the YANG model. Since the configuration instance vlanif30 exists in the configuration template T4, and the configuration instance vlanif20 exists in the configuration template T2, by sensing the YANG model, it is determined that the instance vlanif30 is added to the configuration template T3 instead of overwriting vlanif20.
  • Configuration template T3 overwrites the configuration instance vlan10 in configuration template T1 with the code "description":"This is vlan 10", and changes the description field to This is vlan 10.
  • configuration template T3 inherits configuration template T2 (configuration template T2 inherits configuration template T1), it senses that the YANG model vlan-id is the key, so that the description field of vlan10 in configuration template T3 covers the description of vlan 10 in configuration template T1. field.
  • the template engine analyzes the inheritance and aggregation relationships and generates an effective configuration template corresponding to the configuration template T3.
  • the template engine can perform syntax verification on each configuration template based on the YANG model. For example, the YANG model defines the vlan-id range as 1-4094, and the template engine will check whether the vlan-id range in each configuration template is within 1-4094.
  • the configuration template T3 inherits the configuration template T2 and aggregates the configuration template T4, the configuration template T2 inherits the configuration template T1.
  • the configuration template T1 When it is necessary to generate the effective configuration template F1 corresponding to the configuration template T3, the configuration template T1, configuration template T2, Configuration template T3 and configuration template T4 are input to the template engine, and are parsed and converted by the template engine to obtain the effective configuration template F1.
  • the effective configuration template F1 includes the following code information:
  • the configuration instance vlan10 is inherited from the configuration template T1
  • the description field is overwritten by the configuration template T3.
  • the configuration instances vlan20 and vlanif20 are inherited from the configuration template T2, and the configuration instance vlanif30 and static route 10.1.1.0 are aggregated and self-configured. Template T4.
  • the first network device obtains device configuration parameters and associates the device configuration parameters with the effective configuration template.
  • device configuration parameters can be input by operation and maintenance personnel, such as variables ⁇ vlan_0_name ⁇ , ⁇ vlan_1_name ⁇ , ⁇ vlan_1_description ⁇ , ⁇ interfaceConfig_1_description ⁇ , ⁇ in the effective configuration template F1 ⁇ interfaceConfig_2_description ⁇ is the device configuration parameters that need to be input by operation and maintenance personnel.
  • the first network device can receive the device configuration parameters through the northbound interface, and associate the device configuration parameters with the effective configuration template F1 to facilitate subsequent assignment of variables in the effective configuration template F1.
  • the template engine can associate the device configuration parameters received by the northbound interface with the effective configuration template F1.
  • Associating the device configuration parameters with the effective configuration template F1 may refer to associating the device configuration parameters with variables in the effective configuration template F1. For example, multiple device configuration parameters entered by operation and maintenance personnel are associated with variables ⁇ vlan_0_name ⁇ , ⁇ vlan_1_name ⁇ , ⁇ vlan_1_description ⁇ , ⁇ interfaceConfig_1_description ⁇ , ⁇ interfaceConfig_2_description ⁇ , and operation and maintenance personnel can On the human-computer interaction interface, assign a value to each variable in the effective configuration template F1 to associate the device configuration parameters with the effective configuration template F1.
  • the device configuration parameter "vlan10” input by the operation and maintenance personnel is associated with the variable ⁇ vlan_0_name ⁇
  • the device configuration parameter "vlan20” is associated with the variable ⁇ vlan_1_name ⁇
  • the device configuration parameter "This is vlan 20" is associated with the variable ⁇ vlan_1_description ⁇ is associated
  • the device configuration parameter "vlanif20” is associated with the variable ⁇ interfaceConfig_1_description ⁇
  • the device configuration parameter "vlanif30” is associated with the variable ⁇ interfaceConfig_2_description ⁇ .
  • the first network device converts the effective configuration template associated with the device configuration parameters into a configuration packet.
  • the first network device may convert the effective configuration template associated with the device configuration parameters into a configuration message through a template engine.
  • the first network device may convert the effective configuration template F1 associated with the device configuration parameters into the configuration message M1 through the template engine.
  • Configuration message M1 includes the following code information:
  • the template engine can perform YANG semantic verification on the effective configuration template F1, and the semantic verification results can be output through the human-computer interaction interface.
  • the effective configuration template F2 When the effective configuration template F2 is associated with the device configuration parameters input by the operation and maintenance personnel, the effective configuration template F2 associated with the device configuration parameters can also be converted to obtain the configuration message M2.
  • the effective configuration template F3 When the effective configuration template F3 is associated with the device configuration parameters input by the operation and maintenance personnel, the effective configuration template F3 associated with the device configuration parameters can also be converted to obtain the configuration message M3.
  • the first network device sends the configuration message to the second network device.
  • the first network device may send the configuration packet to the corresponding second network device.
  • the configuration message M1 corresponds to the configuration template T3, and the configuration message M1 can be sent to the second network device deployed in city A, province B, country G, for network configuration.
  • the configuration message M2 corresponds to the configuration template T1, and the configuration message M2 can be sent to the second network device deployed in country G for network configuration.
  • the configuration message M3 corresponds to the configuration template T2, and the configuration message M3 can be sent to the second network device deployed in province A of country G for network configuration.
  • S405 The second network device performs corresponding network configuration based on the configuration message.
  • the second network device may perform corresponding network configuration based on the configuration packet. For example, the second network device can parse the configuration packet, obtain one or more configuration command lines, and execute one or more configuration command lines.
  • FIG. 7 a schematic flow chart of a device configuration method is provided according to an embodiment of the present application.
  • the device configuration method provided by this application can be implemented, for example, through S701 to S706 as follows.
  • the device configuration method provided by this application can be applied to the control device 10 shown in Figure 1 .
  • S701 parse the configuration template based on the YANG model and determine the parent configuration inherited by the configuration template. Configuration templates and/or aggregated sub-configuration templates.
  • the YANG model defines YANG language specifications that the configuration template needs to meet.
  • different device types or device models can correspond to different YANG models.
  • You can associate the configuration template with the YANG model by setting the device type or device model used by the configuration template, and then obtain the device type used by the configuration template. Or the device model, determine the YANG model associated with the configuration template.
  • the configuration template when the configuration template does not inherit the parent configuration template and aggregates the child configuration template, it means that the configuration template does not inherit the configuration command set of other configuration templates or reference the configuration command set of other configuration templates.
  • the configuration template can be modified. Verification (such as YANG syntax and template syntax verification) and conversion to obtain the effective configuration template.
  • a configuration template inherits a parent configuration template and/or aggregates a child configuration template, it means that the configuration template inherits the configuration command set of other configuration templates and/or refers to the configuration command set of other configuration templates. You can modify the configuration template and the parent configuration template.
  • Configuration templates and/or sub-configuration templates are verified (such as YANG syntax and template syntax verification). When the configuration template and the configuration template's parent configuration template and/or the child configuration template all pass the verification, the configuration template and the configuration template's parent configuration template and/or the child configuration template are converted to obtain the effective configuration template.
  • device configuration parameters can be input by operation and maintenance personnel according to actual configuration requirements.
  • the configuration template includes one or more variables, and the effective configuration template converted based on the configuration template also includes one or more variables.
  • Associating the device configuration parameters with the effective configuration template may refer to associating the device configuration parameters with corresponding variables, so that variables in the effective configuration template can be subsequently assigned values to obtain a configuration message.
  • YANG semantic verification can be performed on the effective configuration template based on the YANG model to determine whether the effective configuration template meets the YANG semantic specification. This prevents subsequent configuration messages sent to the network device 20 from being parsed by the network device 20 .
  • the effective configuration template passes the verification, the effective configuration template associated with the device configuration parameters is converted into a configuration packet. For example, variables in the effective configuration template can be assigned values based on device configuration parameters to obtain a configuration message.
  • S706 Send the configuration message to the network device 20.
  • the configuration packet can be sent to the network device 20 so that the network device 20 can perform corresponding network configuration based on the configuration packet.
  • the format of the configuration message may include JSON format or XML format.
  • the format of the configuration message can be determined based on the network configuration protocol by obtaining the network configuration protocol supported by the network device 20 .
  • the configuration messages delivered can be in JSON format or XML format.
  • the configuration messages delivered can be in XML format.
  • FIG. 8 is a schematic diagram of the hardware structure of the control device 10 provided by an embodiment of the present application.
  • the control device 10 may include a processor 1001, a memory 1002, and a communication interface 1003.
  • Memory 1002 may be used to store one or more computer programs 1004.
  • One or more computer programs 1004 are configured to be executed by processor 1001.
  • One or more computer programs 1004 include instructions, which may be used to implement the device configuration method as shown in FIG. 7 in the control device 10 .
  • control device 10 does not constitute a specific limitation on the control device 10 .
  • the control device 10 may include more or fewer components than shown, or some components may be combined, or some components may be separated, or may be arranged differently.
  • the processor 1001 may be a central processing unit (CPU), a network processor (NP), or a combination of CPU and NP.
  • the processor 1001 may also be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof.
  • ASIC application-specific integrated circuit
  • PLD programmable logic device
  • the above-mentioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL) or any combination thereof.
  • the processor 1001 may refer to one processor or may include multiple processors.
  • the memory 1002 may include volatile memory, such as random-access memory (RAM); the memory may also include non-volatile memory, such as read-only memory (ROM), flash memory ( English: flash memory), hard disk (hard disk drive, HDD) or solid-state drive (solid-state drive, SSD); the memory 1002 may also include a combination of the above types of memory.
  • volatile memory such as random-access memory (RAM)
  • non-volatile memory such as read-only memory (ROM), flash memory ( English: flash memory), hard disk (hard disk drive, HDD) or solid-state drive (solid-state drive, SSD); the memory 1002 may also include a combination of the above types of memory.
  • Communication interface 1003 may be used to communicate with network device 20.
  • communication interface 1003 may include a southbound interface and a northbound interface.
  • This embodiment also provides a computer storage medium.
  • Computer instructions are stored in the computer storage medium.
  • the network device causes the network device to execute the above related method steps to implement the device configuration in the above embodiment. method.
  • This embodiment also provides a computer program product.
  • the computer program product When the computer program product is run on a computer, it causes the computer to perform the above related steps to implement the device configuration method in the above embodiment.
  • inventions of the present application also provide a device.
  • This device may be a chip, a component or a module.
  • the device may include a connected processor and a memory; where the memory is used to store computer execution instructions.
  • the processor can execute the computer execution instructions stored in the memory, so that the chip executes the device configuration method in each of the above method embodiments.
  • control equipment computer storage media, computer program products or chips provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the corresponding methods provided above. The beneficial effects of the method will not be repeated here.
  • the disclosed devices and methods can be implemented in other ways.
  • the device embodiments described above are schematic.
  • the division of modules or units is a logical function division.
  • multiple units or components may be combined or can be integrated into another device, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated.
  • the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed to multiple different places. . Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the above integrated units can be implemented in the form of hardware or software functional units.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium.
  • the storage medium includes several instructions to cause a device (which may be a microcontroller, a chip, etc.) or processor to execute all or part of the steps of the methods described in various embodiments of this application.
  • the aforementioned storage media include: U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请实施例提供了一种设备配置方法,涉及通信领域。第一网络设备基于YANG模型对多个配置模板进行解析,得到生效配置模板,多个配置模板均满足YANG模型语言规范,多个配置模板之间包括模板继承关系和/或模板聚合关系,及将生效配置模板与获取到的设备配置参数进行关联,将关联有设备配置参数的生效配置模板转换为配置报文,配置报文下发至第二网络设备,使得第二网络设备可以基于配置报文进行相应的网络配置。本申请实施例还提供了一种网络设备、芯片及计算机可读存储介质。本申请实施例利用遵守YANG模型语言规范的层次化配置模板生成配置报文,可提升网络设备的运维效率。

Description

设备配置方法、网络设备、芯片及计算机可读存储介质
本申请要求于2022年07月20日提交中国专利局,申请号为202210861716.5、申请名称为“设备配置方法、网络设备、芯片及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,尤其涉及一种设备配置方法、网络设备、芯片及计算机可读存储介质。
背景技术
现有网络自动化运维技术一般是通过命令行接口(comand line interface,CLI)对网络设备进行配置操作。由于网络设备厂商众多,品牌各异,且各厂商之间、品牌之间的管理配置方式不一致,即CLI配置命令不同,导致网络设备的维护难度大。
运维人员为了提升设备运维效率,一般会使用CLI模板技术,实现将配置数据批量复制到多台网络设备。而现有CLI模板之间相互独立,无法实现模板的层次化定制,运维效率仍然较低下。
发明内容
有鉴于此,有必要提供一种设备配置方法,解决现有技术中网络设备运维难度大,效率低下的问题。
本申请实施例第一方面公开了一种设备配置方法,包括:基于另一个下一代(Yet Another Next Generation,YANG)模型对配置模板进行解析,确定配置模板继承的父配置模板和/或聚合的子配置模板;若配置模板继承有父配置模板和/或聚合有子配置模板,基于配置模板及配置模板的父配置模板和/或子配置模板,转换得到生效配置模板,配置模板及配置模板的父配置模板和/或子配置模板均满足YANG模型的YANG语言规范;获取设备配置参数,及将设备配置参数与生效配置模板进行关联;将关联有设备配置参数的生效配置模板转换为配置报文;将配置报文发送至网络设备。
采用该技术方案,使用模板技术对网络设备进行网络配置,可以提升网络设备的运维效率,为网络设备灵活定制不同的网络配置参数,且配置模板遵守YANG模型的YANG语言规范,使得配置模板可以运用于基于YANG模型的网络设备配置中,配置模板之间可以具有模板继承关系和/或模板聚合关系,基于层次化的模板设计理念,配置模板的重用率高、易于维护,配置模板之间可以根据实际网络配置需求进行灵活组合,网络配置需求易于实现。
在一些实施例中,设备配置方法还包括:若配置模板未继承有父配置模板和聚合有子配置模板,基于配置模板转换得到所述生效配置模板。
采用该技术方案,若配置模板未继承有父配置模板和聚合有子配置模板,表明配置模板未继承其他配置模板的配置命令集或者引用其他配置模板的配置命令集,可以直接对配置模板进行转换得到生效配置模板。
在一些实施例中,在基于YANG模型对配置模板进行解析之前,包括:获取与配置模板关联的YANG模型。
采用该技术方案,通过使用与配置模板关联的YANG模型对配置模板进行解析,可避免出现使用不正确的YANG模型导致无法解析配置模板的情形。
在一些实施例中,获取与配置模板关联的YANG模型,包括:获取配置模板运用的设备类型或者设备型号;根据设备类型或者设备型号,确定与配置模板关联的YANG模型。
采用该技术方案,不同的设备类型或者设备型号可能对应不同的YANG模型,可以预先为配置模板设定其可运用的设备类型或者设备型号,进而可以通过获取配置模板运用的设备类型或者设备型号确定与配置模板关联的YANG模型。
在一些实施例中,基于配置模板及配置模板的父配置模板和/或子配置模板,转换得到生效配置模板,包括:基于YANG模型对配置模板及配置模板的父配置模板和/或子配置模板进行YANG语法校验,所述配置模板继承的父配置模板和/或聚合的子配置模板基于所述YANG模型的模型类型进行配置的;若配置模板及配置模板的父配置模板和/或子配置模板均校验通过,基于配置模板及父配置模板和/或子配置模板,转换得到生效配置模板。
采用该技术方案,基于YANG模型的模型类型配置模板的继承和/或聚合关系,且配置模板无需包含校验逻辑,由执行设备配置方法的设备自动基于YANG模型对配置模板进行校验,可以降低运维人员编写配置模板的门槛,及在配置模板及配置模板的父配置模板和/或子配置模板均校验通过时,再基于配置模板及父配置模板和/或子配置模板转换得到生效配置模板,避免转换得到的生效配置模板存在YANG语法错误。
在一些实施例中,将关联有设备配置参数的生效配置模板转换为配置报文,包括:基于YANG模型对关联有设备配置参数的生效配置模板进行YANG语义校验;若生效配置模板校验通过,将关联有设备配置参数的生效配置模板转换为所述配置报文。
采用该技术方案,基于YANG模型对生效配置模板进行YANG语义校验,实现检查生效配置模板是否存在YANG语义错误,在生效配置模板校验通过之后将关联有设备配置参数的生效配置模板转换为配置报文,减少后续可能出现的网络配置错误,提升网络设备运维效率。
在一些实施例中,生效配置模板包括变量,将关联有设备配置参数的生效配置模板转换为配置报文,包括:基于设备配置参数对生效配置模板中的变量进行赋值处理,得到配置报文。
采用该技术方案,配置模板包括一个或多个变量,基于配置模板转换得到生效配置模板亦包括一个或多个变量,通过对生效配置模板中的变量进行赋值处理,可得到配置报文。
在一些实施例中,将关联有设备配置参数的生效配置模板转换为配置报文,包括:获取网络设备支持的网络配置协议;将关联有设备配置参数的生效配置模板转换为配置报文,配置报文的格式基于网络配置协议确定。
采用该技术方案,下发给网络设备的配置报文的格式基于网络设备支持的网络配置协议进行确定,使得网络设备可以基于配置报文进行相应的网络配置。
在一些实施例中,配置报文的格式包括基于JavaScript语言的对象简谱(JavaScript Object Notation,JSON)格式或者可扩展标记语言(Extensive Markup Language,XML)格式。
采用该技术方案,配置报文的格式可以包括JSON格式或者XML格式,例如对于支持RESTCONF协议的网络设备,下发的配置报文可以是JSON格式或者XML格式,对于支持NETCONF协议的网络设备,下发的配置报文可以是XML格式。
在一些实施例中,设备配置方法还包括:响应于配置模板的创建指令,开启模板创建界面,模板创建界面包括多个配置项;基于多个配置项的内容生成配置模板。
采用该技术方案,运维人员可以使用模板创建界面创建配置模板,例如对模板创建界面中的配置项进行内容填写或者内容选择,配置模板创建简单、方便,可以降低运维人员编写配置模板的门槛。
本申请实施例第二方面公开了一种设备配置方法,应用于第一网络设备与第二网络设备,设备配置方法包括:第一网络设备基于YANG模型对多个配置模板进行解析,得到生效配置模板,多个配置模板之间包括模板继承关系和/或模板聚合关系,多个配置模板均满足YANG模型的YANG语言规范;第一网络设备获取设备配置参数,及将设备配置参数与生效配置模板进行关联;第一网络设备将关联有设备配置参数的生效配置模板转换为配置报文;第一网络设备将配置报文发送至第二网络设备;第二网络设备基于配置报文进行相应的网络配置。
采用该技术方案,使用模板技术对第二网络设备进行网络配置,可以提升第二网络设备的运维效率,为第二网络设备灵活定制不同的网络配置参数,且配置模板遵守YANG模型的YANG语言规范,使得配置模板可以运用于基于YANG模型的网络设备配置中,配置模板之间可以具有模板继承关系和/或模板聚合关系,基于层次化的模板设计理念,配置模板的重用率高、易于维护,配置模板之间可以根据实际网络配置需求进行灵活组合,网络配置需求易于实现。
在一些实施例中,在第一网络设备基于YANG模型对多个配置模板进行解析之前,包括:第一网络设备获取与多个配置模板关联的YANG模型。
采用该技术方案,第一网络设备通过使用与配置模板关联的YANG模型对配置模板进行解析,可避免出现使用不正确的YANG模型导致无法解析配置模板的情形。
在一些实施例中,第一网络设备获取与多个配置模板关联的YANG模型,包括:第一网络设备获取多个配置模板运用的设备类型或者设备型号;第一网络设备根据设备类型或者设备型号,确定与多个配置模板关联的YANG模型。
采用该技术方案,不同的设备类型或者设备型号可能对应不同的YANG模型,可以预先为配置模板设定其可运用的设备类型或者设备型号,进而第一网络设备可以通过获取配置模板运用的设备类型或者设备型号确定与配置模板关联的YANG模型。
在一些实施例中,第一网络设备基于YANG模型对多个配置模板进行解析,得到生效配置模板,包括:第一网络设备基于YANG模型对多个配置模板中的每个配置模板进行YANG语法校验与模板继承关系和/或模板聚合关系解析,所述模板继承关系和/或所述模板聚合关系解析基于所述YANG模型的模型类型进行配置的;若每个配置模板均校验通过,第一网络设备基于解析结果将多个配置模板转换为所述生效配置模板。
采用该技术方案,基于YANG模型的模型类型配置模板的继承和/或聚合关系,且配置模板无需包含校验逻辑,由第一网络设备自动基于YANG模型对配置模板进行校验,可以降低运维人员编写配置模板的门槛,及在多个配置模板均校验通过时,再基于多个配置模板转换得到生效配置模板,避免转换得到的生效配置模板存在YANG语法错误。
在一些实施例中,第一网络设备将关联有所述设备配置参数的生效配置模板转换为配置报文,包括:第一网络设备基于YANG模型对关联有设备配置参数的生效配置模板进行YANG语义校验;若生效配置模板校验通过,第一网络设备将关联有设备配置参数的生效配置模板转换为配置报文。
采用该技术方案,第一网络设备基于YANG模型对生效配置模板进行YANG语义校验,实现检查生效配置模板是否存在YANG语义错误,在生效配置模板校验通过之后将关联有设备配置参数的生效配置模板转换为配置报文,减少后续可能出现的网络配置错误,提升第二网络设备运维效率。
在一些实施例中,生效配置模板包括变量,第一网络设备将关联有设备配置参数的生效配置模板转换为配置报文,包括:第一网络设备基于设备配置参数对生效配置模板中的变量进行赋值处理,得到配置报文。
采用该技术方案,配置模板包括一个或多个变量,基于配置模板转换得到生效配置模板亦包括一个或多个变量,第一网络设备通过对生效配置模板中的变量进行赋值处理,可得到配置报文。
在一些实施例中,第一网络设备将关联有设备配置参数的生效配置模板转换为配置报文,包括:第一网络设备获取第二网络设备支持的网络配置协议;第一网络设备将关联有设备配置参数的生效配置模板转换为所述配置报 文,配置报文的格式基于网络配置协议确定。
采用该技术方案,第一网络设备下发给第二网络设备的配置报文的格式基于第二网络设备支持的网络配置协议进行确定,使得第二网络设备后续可以基于配置报文进行相应的网络配置。
在一些实施例中,配置报文的格式包括JSON格式或者XML格式,第一网络设备包括控制器,第二网络设备包括交换机、路由器、转发器中的一个。
采用该技术方案,控制器下发给交换机,或者路由器,或者转发器的配置报文的格式可以包括JSON格式或者XML格式,例如对于支持RESTCONF协议的网络设备,下发的配置报文可以是JSON格式或者XML格式,对于支持NETCONF协议的网络设备,下发的配置报文可以是XML格式。
在一些实施例中,设备配置方法还包括:第一网络设备响应于配置模板的创建指令,开启模板创建界面,模板创建界面包括多个配置项;第一网络设备基于多个配置项的内容生成配置模板。
采用该技术方案,运维人员可以使用模板创建界面创建配置模板,例如对模板创建界面中的配置项进行内容填写或者内容选择,配置模板创建简单、方便,可以降低运维人员编写配置模板的门槛。
第三方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质存储了计算机指令,当计算机指令在网络设备的处理器上运行时,使得网络设备执行如第一方面所述的设备配置方法。
第四方面,本申请实施例提供一种网络设备,网络设备包括处理器和存储器,存储器用于存储指令,处理器用于调用存储器中的指令,使得网络设备执行如第一方面所述的设备配置方法。
第五方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如第一方面所述的设备配置方法。
第六方面,提供一种装置,所述装置具有实现上述第一方面所提供的方法中设备行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块。
可以理解地,上述提供的第三方面所述的计算机可读存储介质,第四方面所述的网络设备,第五方面所述的计算机程序产品,第六方面所述的装置均与上述第一方面的方法对应,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
附图说明
图1为本申请一实施例提供的设备配置方法的应用场景示意图;
图2为本申请一实施例提供的控制设备的架构示意图;
图3a为本申请一实施例提供的模板引擎的架构示意图;
图3b为本申请一实施例提供的基于模板引擎转换得到配置报文的流程示意图;
图3c为本申请一实施例提供的多个配置模板的展示示意图;
图3d为本申请一实施例提供的模板引擎的嵌套调用示意图;
图4为本申请一实施例提供的设备配置方法的流程示意图;
图5为本申请一实施例提供的用于进行配置模板创建的用户界面示意图;
图6为本申请一实施例提供的多个配置模板的关联关系示意图;
图7为本申请一实施例提供的设备配置方法的流程示意图;
图8为本申请一实施例提供的控制设备的示意图。
具体实施方式
需要说明的是,本申请中“至少一个”是指一个或者多个,“多个”是指两个或多于两个。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。本申请的说明书和权利要求书及附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不是用于描述特定的顺序或先后次序。
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
为了便于理解,示例性的给出了部分与本申请实施例相关概念的说明以供参考。
NETCONF:网络配置协议,是由互联网工程任务组(Internet Engineering Task Force,IETF)开发并标准化的网络管理协议,NETCONF提供了安装、操作和删除网络设备配置的机制。
REST:表述性状态传递,是一组架构约束条件和原则,满足这些约束条件和原则的应用程序或设计称为RESTful。
RESTCONF:REST配置协议,是另一个IETF标准,在RESTful接口的基础上实现了一些NETCONF功能,是通过超文本传输协议(HyperText Transfer Protocol,HTTP)/超文本传输安全协议(Hyper Text Transfer Protocol over SecureSocket Layer,HTTPS)使用可扩展标记语言(Extensive Markup Language,XML)或基于JavaScript语言的对象简谱(JavaScript Object Notation)JSON消息的NETCONF,但它缺少了几个关键的NETCONF组件,包括多个数据存储、提交或回滚以及配置锁定。
YANG(Yet Another Next Generation)模型,又称“另一个下一代模型”,是一种数据建模语言,用于定义通过网络配置协议NETCONF、RESTCONF等网络管理协议发送的数据。YANG数据建模语言由互联网工程任务组(Internet Engineering Task Force,IETF)中的NETMOD工作组维护,并在2010年10月作为RFC 6020发布。
YANG模型将数据的层次结构模块化为一棵树,树中每个节点都有名称(即,节点名称),并有一个值(即,节点值),还可以有一个子节点集。YANG模型中的 模块(Module)可以定义节点的层次结构,可用于基于NETCONF的操作。并且,随着其定义,以及从别处引入或包含的定义,一个模块是独立且可编译的。当模块包括多个节点时,多个节点之间可以存在层级关系。这里,多个节点的层级关系是指多个节点在树中的关系,父(parent)节点、子(child)节点等术语可以用于描述节点之间的层级关系。例如,假设节点1可以为节点2的父节点,节点2可以作为节点3的父节点,则节点1可以为节点2的上一级节点,节点2可以为节点3的上一级节点。换言之,节点2可以为节点1的下一级节点,节点3可以为节点2的下一级节点。
如图1所示,为本申请实施例提供的一种设备配置方法的应用场景示意图。该应用场景中可以包括:控制设备10和网络设备20。其中,控制设备10可以基于YANG模型向网络设备20发送配置报文。
控制设备10可以与业务平台30连接,业务平台30可以向控制设备10发送指令,以对网络设备20进行网络配置。网络设备20可以与终端设备40连接。终端设备40可以通过网络设备20接入网络。
控制设备10可以是控制器,例如软件定义网络(software-defined networking,SDN)控制器,或者其他运行网元管理系统(element management system,EMS)的设备。网络设备20可以是交换机、路由器、转发器等。业务平台30可以是用户管理系统、大数据分析平台、网管系统等。终端设备40可以是用户驻地设备(customer-premises equipment,CPE)、智能手机、多媒体设备、流媒体设备、个人电脑、平板电脑、掌上电脑、移动互联网设备(mobile Internetdevices,MID)、穿戴式智能设备等。
控制设备10上与网络设备20之间的接口可以记为南向接口,控制设备10上与业务平台30之间的接口可以记为北向接口。南向接口是用于提供对其他厂家网元的管理功能,即向下提供的接口。北向接口是用于提供给其他厂家或运营商进行接入和管理的接口,即向上提供的接口。
参照图2所示,为本申请一实施例提供的控制设备的架构示意图。
控制设备10包括北向接口101、南向接口102、模板引擎103及YANG模型104。模板引擎103是指可基于YANG模型104对配置模板与设备配置参数进行解析与转换得到配置报文的程序。例如,模板引擎103可以通过北向接口101接收运维人员(或者用户)创建的配置模板及运维人员输入的设备配置参数,模板引擎103调用YANG模型104对配置模板进行解析得到生效配置模板,及基于解析得到的生效配置模板与设备配置参数转换得到配置报文。配置报文可以通过南向接口下发至网络设备20,使得网络设备20可以基于配置报文进行相应的网络配置。
配置模板可以是指用于对网络设备进行网络配置的模板,配置模板可以根据预设模板语法进行创建,配置模板中可以包括一个或多个变量,运维人员可以根据实际网络配置需求为变量进行赋值,例如,为变量输入对应的设备配置参数。配置模板之间可以包括模板继承关系和/或模板聚合关系,模板继承关系可以是指某个配置模板是另一个配置模板的父配置模板,配置模板 可以继承父配置模板的配置命令集,配置命令集可以是指由多个网络配置命令组成的集合。模板聚合关系可以是指某个配置模板可以有一个或者多个子配置模板,配置模板可以引用子配置模板的配置命令集。模板引擎103调用YANG模型104对配置模板进行解析,可以是指模板引擎103调用YANG模型104确定配置模板是否存在父配置模板和/或子配置模板,从而可以基于配置模板及其父配置模板和/或子配置模板转换得到生效配置模板。模板引擎103基于解析得到的生效配置模板与设备配置参数转换得到配置报文,可以是通过将设备配置参数赋值至生效配置模板中的变量(变量来源于配置模板),从而得到配置报文。
例如,运维人员可以在控制设备10上创建配置模板及输入设备配置参数,例如,控制设备10支持以图形化界面或者代码文本框编写形式创建配置模板,模板引擎103执行配置模板的解析与转换,得到配置报文,控制设备10再将配置报文下发至网络设备20。运维人员也可以在其他设备上创建配置模板,配置模板及设备配置参数以插件形式加载至控制设备10,模板引擎103执行配置模板的解析与转换,得到配置报文,控制设备10再将配置报文下发至网络设备20。
如图3a所示,模板引擎103可以包括模板转换单元1031与模板执行单元1032。在生成与配置模板a对应的配置报文c时,可以将配置模板a及其关联的配置模板(例如配置模板a的父配置模板和/或子配置模板)传至模板转换单元1031,模板转换单元1031可以基于YANG模型对输入的配置模板进行YANG语法校验与解析,得到与配置模板a对应的生效配置模板b。生效配置模板b及设备配置参数可以传至模板执行单元1032,模板执行单元1032可以基于YANG模型对输入的生效配置模板b进行YANG语义校验与转换,得到与配置模板a对应的配置报文c。
如图3b所示,为本申请一实施例基于模板引擎将配置模板转换成配置报文的流程示意图。
S31,创建配置模板。
在一些实施例中,运维人员使用模板技术对网络设备进行网络配置,可以提升网络设备的运维效率,为网络设备灵活定制不同的网络配置参数。配置模板的模板语法可以预先定义。
运维人员可以根据实际网络配置需求创建一个或多个配置模板,配置模板之间可以具有模板继承关系和/或模板聚合关系,基于层次化的模板设计理念,配置模板的重用率高,灵活性好,易于实现、维护及扩展,可进一步降低网络设备的维护工作量。
在一些实施例中,配置模板可以以文本格式方式进行显示,例如配置模板以JSON格式进行显示。配置模板也可以通过模型驱动方式生成界面进行显示。如图3c所示,为多个配置模板的显示示意图,左边部分显示各个配置模板以及配置模板之间的继承关系和/或聚合关系,下层的配置模板继承上层的配置模板。例如,配置模板为租户模板与公共模板,租户模板包括i区模板及ii区模板,i区模板包括i_1模板及i_2模板(i_1模板与i_2模板继承i区模板),i_1 模板包括i_11模板及i_12模板,i_11模板继承i_1模板,i_12模板继承i_1模板且聚合公共子模板1,公共模板包括公共子模板1、公开子模板2。中间部分显示当前选择的某个配置模板包含的特性清单(例如包括账号管理、时区、登录限定、运维监控、网络可靠性、安全策略等),右边部分是当前选中的某个特性包含的内容(例如账号管理包含用户名、用户角色、服务类型、用户密码等)。
S32,模板转换单元1031对配置模板进行校验与解析,得到与配置模板对应的生效配置模板。
在一些实施例中,模板转换单元1031在对配置模板进行解析之前,可以先对配置模板进行校验,以确认配置模板是否符合规范。对配置模板进行校验可以包括对配置模板进行YANG语法校验与模板语法校验,校验结果可以通过人机交互界面进行展示。如果存在语法错误,可以输出提示以提醒运维人员对配置模板进行修改,当配置模板校验通过之后,再对配置模板进行解析,确定配置模板是否存在父配置模板和/或子配置模板,从而可以基于配置模板及其父配置模板和/或子配置模板转换得到生效配置模板。
S33,模板执行单元1032获取设备配置参数,及基于设备配置参数与生效配置模板转换得到与配置模板对应的配置报文。
在一些实施例中,模板执行单元1032可以通过北向接口获取运维人员输入的设备配置参数。模板执行单元1032在对生效配置模板进行转换之前,可以先对生效配置模板进行YANG语义校验,以确认生效配置模板是否符合规范。语义校验结果可以通过人机交互界面进行展示。如果存在语义错误,可以输出提示以提醒运维人员对配置模板或者生效配置模板进行修改,当生效配置模板校验通过之后,再将设备配置参数写入生效配置模板中的变量,实现得到与配置模板对应的配置报文。
如图3d所示,模板引擎可以被嵌套调用,即某个模板引擎的输出可以作为下一个模板引擎的输入,再次作为设备配置参数应用在其他配置模板上,处于末端的模板引擎输出的配置报文下发至网络设备进行网络配置。例如,模板引擎E1用于生成业务级别的配置报文,模板引擎E2用于生成设备级别的配置报文,模板引擎E1的输入包括配置模板T1及设备配置参数p1,模板引擎E2的输入包括模板引擎E1的输出及配置模板T2,模板引擎E2基于模板引擎E1的输出及配置模板T2生成配置报文。
参照图4所示,为本申请一实施例提供的一种设备配置方法的流程示意图。本申请提供的设备配置方法,例如可以通过如下S401~S405实现。
S401,第一网络设备基于YANG模型对多个配置模板进行解析,得到生效配置模板。
在一些实施例中,多个配置模板之间可以包括模板继承关系和/或模板聚合关系。多个配置模板可以用于对多个不同层级的网络设备集进行网络配置,每个网络设备集可以包括一个或多个网络设备。每个网络设备集所需的网络配置参数可以来源于一个或多个配置模板。网络设备集之间可以包含共有的网络 设备,或者分别包含不同的网络设备。
例如,多个配置模板用于为多个网络设备集进行网络配置,多个网络设备集之间存在层级关系,基于模板继承关系和/或模板聚合关系可以方便地对多个网络设备集进行运维管理。一个网络系统NS1包括N个第二网络设备,第一网络设备用于对网络系统NS1进行运维管理,N为大于1的正整数。第一网络设备可以是控制器,第二网络设备可以是路由器、交换机、转发器等设备。例如,第一网络设备对应图1所示的控制设备10、第二网络设备对应图1所示的网络设备20。N个第二网络设备可以归属于第一网络设备集,N个第二网络设备中的M个第二网络设备归属于第二网络设备集,N个第二网络设备中的另外P个第二网络设备归属于第三网络设备集,M个第二网络设备中的Q个网络设备归属于第四网络设备集。M、P、Q均为大于1的正整数,且M+P=N,Q小于M。本实施例中对网络设备集的划分并不作限定,可以根据实际运维需求对网络系统NS1中的第二网络设备进行网络设备集划分。例如,可以按照第二网络设备所分布的地区、或者所归属的网络节点进行网络设备集的划分。
举例而言,多个配置模板包括配置模板T1、配置模板T2及配置模板T3,配置模板T2继承了配置模板T1的配置命令集,配置模板T3继承了配置模板T2的配置命令集。例如,将部署在A省中的第二网络设备归属于第一网络设备集,并设定在A省中的第二网络设备获取配置模板T1的配置命令集进行网络参数配置;将部署在A省B市中的第二网络设备归属于第二网络设备集,并设定在A省B市中的第二网络设备获取配置模板T2的配置命令集进行网络参数配置;将部署在A省B市C县中的第二网络设备归属于第三网络设备集,并设定在A省B市C县中的第二网络设备获取配置模板T3的配置命令集进行网络参数配置。当配置模板T1的配置命令被修改时,可以实现联动修改配置模板T2与配置模板T3。
每个配置模板可以由运维人员根据网络设备集的实际网络配置需求进行创建,每个配置模板均满足YANG模型的YANG语言规范,进而使得每个配置模板可以支持基于YANG模型的继承和聚合语法、支持YANG语义、YANG语法校验等。基于YANG模型的继承可以是指某个配置模板可以通过感知YANG模型(感知自身及父配置模板与YANG模型的关联关系)实现继承父配置模板的配置命令集。基于YANG的聚合可以是指某个配置模板T3可以通过感知YANG模型(感知自身及子配置模板与YANG模型的关联关系)实现引用子配置模板的配置命令集。可以基于YANG模型的模型类型配置模板的继承和/或聚合关系,YANG模型的模型类型可以是指在YANG模型中所定义的模型的类型,例如可以通过list、container等定义YANG模型的模型类型。
在一些实施例中,可以预先将多个配置模板与YANG模型进行关联。第一网络设备可以包括多个YANG模型,每个YANG模型可以对应不同的网络设备类型或者不同型号的网络设备,可以预先建立YANG模型与设备类型或者设备型号的关联关系,通过设定配置模板所运用的设备类型或者设备型号,实现将配置模板与YANG模型进行关联。
在一些实施例中,运维人员可以通过多种方式创建配置模板,并设定配置模板之间的关联关系,例如通过继承或聚合语法,使得多个配置模板中的第一配置模板可以继承或者聚合多个配置模板中的第二配置模板。本申请各个实施例中对配置模板的创建方式不作限定。例如,运维人员可以通过代码编写的方式创建配置模板,或者运维人员可以通过模板创建界面创建配置模板。每个配置模板可以包括一个或者多个配置命令。模板创建界面可以是基于YANG模型驱动生成的界面,模板创建界面可以包括多个配置项,配置项可以支持运维人员进行内容输入或者内容选择,进而可以基于多个配置项的内容生成配置模板。第一网络设备还可以通过北向接口接收其他网络设备或者服务器发送的配置模板。
如图5所述,第一网络设备可以响应于配置模板的创建指令,开启用于进行配置模板创建的UI,可以在UI中为配置模块创建多个配置实例,每个配置实例可以包括多个属性项,例如多个属性项可以包括配置实例编号(vlan-id)、配置实例名称(name)、配置实例描述(description)等。本申请对配置实例包含的属性项不作限定,可以根据实际应用需求进行设定。
在一些实施例中,第一网络设备在对一个或多个第二网络设备进行网络配置之前,第一网络设备可以预先存储有YANG模型,YANG模型可以是其他网络设备或者服务器发送给第一网络设备的,例如,第一网络设备可以通过北向接口接收YANG模型。
例如,YANG模型包括如下代码信息:

上述YANG模型定义通过vlan来标识配置实例,“list vlan”表示可以有多个vlan的模型,即通过“list vlan”定义了YANG模型的模型类型是vlan的模型。key"vlan-id"表示一个vlan是基于vlan-id进行唯一标识,“leaf vlan-id”、“leaf name”、“leaf description”表示vlan具有三个属性项,分别是vlan-id、name、description。
假设多个配置模板包括配置模板T1、配置模板T2、配置模板T3、配置模板T4。运维人员期望在G国部署的第二网络设备都获取配置模板T1的配置命令集,在G国A省部署的第二网络设备都获取配置模板T2的配置命令集;在G国A省B市部署的第二网络设备都获取配置模板T3的配置命令集。根据上述需求,可以设定配置模板T2继承配置模板T1的配置命令集,配置模板T3继承配置模板T2的配置命令集。同时假设为了简化配置模板T3的代码量,配置模板T3引用配置模板T4的配置命令集,即可以设定配置模板T3聚合配置模板T4。配置模板T1、配置模板T2、配置模板T3、配置模板T4之间的关系可以如图6所示。
假设配置模板T1包括如下代码信息:
配置模板T1定义了配置实例vlan10,其中属性项name的字段是可变的,以变量形式定义为{{vlan_0_name}},后续可以由运维人员进行具体指定。
假设配置模板T2包括如下代码信息:

配置模板T2通过关键字“z:extends”表示继承,也可以有其他语法形式来表示继承,本申请对此不作限定。配置模板T2继承了配置模板T1,并且新增了配置实例vlan20、vlanif10和vlanif20。配置模板T2需要感知YANG模型实现继承配置模板T1,如果不感知YANG模型,配置模板T2中的vlan20将覆盖配置模板T1中的vlan10,通过感知YANG模型确定可定义多个vlan,每个vlan基于vlan-id进行标识,实现配置模板T2继承配置模板T1。
假设配置模板T4包括如下代码信息:
配置模板T4定义了静态路由10.1.1.0和配置实例vlanif30。
假设配置模板T3包括如下代码信息:

配置模板T3继承了配置模板T2,且聚合配置模板T4,通过关键字“z:include”表示聚合,也可以有其他语法形式来表示继承,本申请对此不作限定。聚合关系也需感知YANG模型,由于配置模板T4存在配置实例vlanif30,配置模板T2存在配置实例vlanif20,通过感知YANG模型,确定在配置模板T3中,是新增了实例vlanif30,而不是覆盖vlanif20。
配置模板T3通过代码"description":"This is vlan 10"复写了配置模板T1中的配置实例vlan10,把description的字段改成了This is vlan 10。配置模板T3继承配置模板T2(配置模板T2继承了配置模板T1)时感知YANG模型vlan-id是key,使得配置模板T3中的vlan10的description的字段覆盖了配置模板T1中的vlan 10的description的字段。配置模板T3通过“//z:template-tag=delete”语法,删除了配置实例vlanif10(继承自配置模板T2),删除操作也需感知YANG模型,感知这个语法操作是对一个配置实例的删除。
当将配置模板T1、配置模板T2、配置模板T3、配置模板T4加载到模板引擎,由模板引擎进行继承和聚合关系的解析,生成与配置模板T3对应的生效配置模板。模板引擎在解析过程中可以基于YANG模型对每个配置模板进行语法校验。比如YANG模型定义了vlan-id范围是1-4094,模板引擎会检查每个配置模板中的vlan-id的范围是否在1-4094之内。
由于配置模板T3继承了配置模板T2,且聚合配置模板T4,配置模板T2继承了配置模板T1,当需要生成与配置模板T3对应的生效配置模板F1时,需要将配置模板T1、配置模板T2、配置模板T3、配置模板T4输入至模板引擎,经由模板引擎进行解析与转换得到生效配置模板F1,生效配置模板F1包括如下代码信息:

在生效配置模板F1中,配置实例vlan10继承自配置模板T1,并且由配置模板T3复写了description的字段,配置实例vlan20、vlanif20继承自配置模板T2,配置实例vlanif30和静态路由10.1.1.0聚合自配置模板T4。
可以理解的,当需要生成与配置模板T1对应的生效配置模板F2时,由于配置模板T1未继承或者聚合其他配置模板,可以只将配置模板T1输入至模板引擎,经由模板引擎进行解析与转换得到生效配置模板F2。当需要生成与配置模板T2对应的生效配置模板F3时,由于配置模板T2继承了配置模板T1,将配置模板T1、配置模板T2输入至模板引擎,经由模板引擎进行解析与转换得到生效配置模板F3。
S402,第一网络设备获取设备配置参数,及将设备配置参数与生效配置模板进行关联。
在一些实施例中,设备配置参数可以由运维人员进行输入,例如生效配置模板F1中的变量{{vlan_0_name}}、{{vlan_1_name}}、{{vlan_1_description}}、{{interfaceConfig_1_description}}、{{interfaceConfig_2_description}}为需要运维人员输入的设备配置参数。第一网络设备可以通过北向接口接收设备配置参数,及将设备配置参数与生效配置模板F1进行关联,便于后续对生效配置模板F1中的变量进行赋值。例如,当对生效配置模板F1进行参数配置时,模板引擎可以将北向接口接收到的设备配置参数与生效配置模板F1进行关联。将设备配置参数与生效配置模板F1进行关联可以是指将设备配置参数与生效配置模板F1中的变量进行关联。例如,运维人员输入的多个设备配置参数与变量{{vlan_0_name}}、{{vlan_1_name}}、{{vlan_1_description}}、{{interfaceConfig_1_description}}、{{interfaceConfig_2_description}}进行关联,运维人员可以在人机交互接界面为生效配置模板F1中的每个变量进行赋值,来实现设备配置参数与生效配置模板F1进行关联。
例如,运维人员输入的设备配置参数“vlan10”与变量{{vlan_0_name}}关联,设备配置参数“vlan20”与变量{{vlan_1_name}}关联,设备配置参数“This is vlan 20”与变量{{vlan_1_description}}关联,设备配置参数“vlanif20”与变量{{interfaceConfig_1_description}}关联,设备配置参数“vlanif30”与变量{{interfaceConfig_2_description}}关联。
S403,第一网络设备将关联有设备配置参数的生效配置模板转换为配置报文。
在一些实施例中,设备配置参数与生效配置模板关联之后,第一网络设备可以通过模板引擎将关联有设备配置参数的生效配置模板转换为配置报文。
例如,第一网络设备可以通过模板引擎将关联有设备配置参数的生效配置模板F1转换为配置报文M1。配置报文M1包括如下代码信息:

模板引擎在将关联有设备配置参数的生效配置模板F1转换为配置报文M1的过程中,可以对生效配置模板F1进行YANG语义校验,语义校验结果可以通过人机交互界面进行输出。
当生效配置模板F2关联有运维人员输入的设备配置参数时,同样可以对关联有设备配置参数的生效配置模板F2进行转换,得到配置报文M2。当生效配置模板F3关联有运维人员输入的设备配置参数时,同样可以对关联有设备配置参数的生效配置模板F3进行转换,得到配置报文M3。
S404,第一网络设备将配置报文发送至第二网络设备。
当转换得到配置报文之后,第一网络设备可以将配置报文发送至对应的第二网络设备。例如,配置报文M1是与配置模板T3对应的,配置报文M1可以发送至在G国A省B市部署的第二网络设备,以进行网络配置。配置报文M2是与配置模板T1对应的,配置报文M2可以发送至在G国部署的第二网络设备,以进行网络配置。配置报文M3是与配置模板T2对应的,配置报文M3可以发送至在G国A省部署的第二网络设备,以进行网络配置。
S405,第二网络设备基于配置报文进行相应的网络配置。
在一些实施例中,第二网络设备在接收到配置报文之后,可以基于配置报文进行相应的网络配置。例如,第二网络设备可以对配置报文进行解析,得到一个或多个配置命令行,并执行一个或多个配置命令行。
参照图7所示,为本申请一实施例提供一种设备配置方法的流程示意图。本申请提供的设备配置方法,例如可以通过如下S701~S706实现。本申请提供的设备配置方法可以应用于图1所示的控制设备10。
S701,基于YANG模型对配置模板进行解析,确定配置模板继承的父配 置模板和/或聚合的子配置模板。
在一些实施例中,YANG模型定义了配置模板需满足的YANG语言规范。在对配置模板进行解析时,可以先确定配置模板关联的YANG模型,利用与配置模板关联的YANG模型对配置模板进行解析,避免出现无法解析配置模板的情形。例如,不同的设备类型或者设备型号可以对应不同的YANG模型,可以通过设定配置模板运用的设备类型或者设备型号,来将配置模板与YANG模型进行关联,进而可以通过获取配置模板运用的设备类型或者设备型号,确定与配置模板关联的YANG模型。
S702,当配置模板未继承有父配置模板和聚合有子配置模板时,基于配置模板转换得到生效配置模板。
S703,当配置模板继承有父配置模板和/或聚合有子配置模板时,基于配置模板及配置模板的父配置模板和/或子配置模板,转换得到生效配置模板。
在一些实施例中,当配置模板未继承有父配置模板和聚合有子配置模板时,表明配置模板未继承其他配置模板的配置命令集或者引用其他配置模板的配置命令集,可以对配置模板进行校验(如YANG语法与模板语法校验)与转换得到生效配置模板。
当配置模板继承有父配置模板和/或聚合有子配置模板时,表明配置模板继承其他配置模板的配置命令集和/或引用其他配置模板的配置命令集,可以对配置模板以及配置模板的父配置模板和/或子配置模板进行校验(如YANG语法与模板语法校验)。当配置模板以及配置模板的父配置模板和/或所述子配置模板均校验通过时,对配置模板及配置模板的父配置模板和/或子配置模板进行转换得到生效配置模板。
S704,获取设备配置参数,及将设备配置参数与生效配置模板进行关联。
在一些实施例中,设备配置参数可以由运维人员根据实际配置需求进行输入,配置模板中包括一个或多个变量,基于配置模板转换得到的生效配置模板同样包括一个或多个变量。将设备配置参数与生效配置模板进行关联可以是指将设备配置参数与对应的变量进行关联,使得后续可以对生效配置模板中的变量进行赋值处理,得到配置报文。
S705,将关联有设备配置参数的生效配置模板转换为配置报文。
在一些实施例中,在将关联有设备配置参数的生效配置模板转换为配置报文的过程中,可以基于YANG模型对生效配置模板进行YANG语义校验,确定生效配置模板是否满足YANG语义规范,避免后续下发给网络设备20的配置报文无法被网络设备20所解析。当生效配置模板校验通过时,将关联有设备配置参数的生效配置模板转换为配置报文。例如,可以基于设备配置参数对生效配置模板中的变量进行赋值处理,得到配置报文。
S706,将配置报文发送至网络设备20。
在一些实施例中,当转档得到配置报文之后,可以将配置报文发送至网络设备20,使得网络设备20可以基于配置报文进行相应的网络配置。
在一些实施例中,配置报文的格式可以包括JSON格式或者XML格式。 可以通过获取网络设备20支持的网络配置协议,基于网络配置协议确定配置报文的格式。例如对于支持RESTCONF协议的网络设备,下发的配置报文可以是JSON格式或者XML格式,对于支持NETCONF协议的网络设备,下发的配置报文可以是XML格式。
参考图8,为本申请一实施例提供的控制设备10的硬件结构示意图。如图8所示,控制设备10可以包括处理器1001、存储器1002及通信接口1003。存储器1002可用于存储一个或多个计算机程序1004。一个或多个计算机程序1004被配置为被处理器1001执行。一个或多个计算机程序1004包括指令,上述指令可以用于实现在控制设备10中执行如图7所述的设备配置方法。
可以理解的是,本实施例示意的结构并不构成对控制设备10的具体限定。在另一些实施例中,控制设备10可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。
处理器1001可以是中央处理器(central processing unit,CPU),网络处理器(network processor,NP)或者CPU和NP的组合。处理器1001还可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。处理器1001可以是指一个处理器,也可以包括多个处理器。
存储器1002可以包括易失性存储器,例如随机存取存储器(random-access memory,RAM);存储器也可以包括非易失性存储器,例如只读存储器(read-only memory,ROM),快闪存储器(英文:flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器1002还可以包括上述种类的存储器的组合。
通信接口1003可用于与网络设备20通信。例如,通信接口1003可以包括南向接口和北向接口。
本实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机指令,当所述计算机指令在网络设备上运行时,使得网络设备执行上述相关方法步骤实现上述实施例中的设备配置方法。
本实施例还提供了一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的设备配置方法。
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,所述装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的设备配置方法。
其中,本实施例提供的控制设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应所述理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例是示意性的,例如,所述模块或单元的划分,为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者所述技术方案的全部或部分可以以软件产品的形式体现出来,所述软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。

Claims (22)

  1. 一种设备配置方法,其特征在于,所述方法包括:
    基于另一个下一代YANG模型对配置模板进行解析,确定所述配置模板继承的父配置模板和/或聚合的子配置模板;
    若所述配置模板继承有父配置模板和/或聚合有子配置模板,基于所述配置模板及所述配置模板的父配置模板和/或子配置模板,转换得到生效配置模板,所述配置模板及所述配置模板的父配置模板和/或子配置模板均满足所述YANG模型的YANG语言规范;
    获取设备配置参数,及将所述设备配置参数与所述生效配置模板进行关联;
    将关联有所述设备配置参数的生效配置模板转换为配置报文;
    将所述配置报文发送至网络设备。
  2. 如权利要求1所述的设备配置方法,其特征在于,所述方法还包括:
    若所述配置模板未继承有父配置模板和聚合有子配置模板,基于所述配置模板转换得到所述生效配置模板。
  3. 如权利要求1或2所述的设备配置方法,其特征在于,在基于YANG模型对配置模板进行解析之前,包括:
    获取与所述配置模板关联的YANG模型。
  4. 如权利要求3所述的设备配置方法,其特征在于,所述获取与所述配置模板关联的YANG模型,包括:
    获取所述配置模板运用的设备类型或者设备型号;
    根据所述设备类型或者所述设备型号,确定与所述配置模板关联的YANG模型。
  5. 如权利要求1所述的设备配置方法,其特征在于,所述基于所述配置模板及所述配置模板的父配置模板和/或子配置模板,转换得到生效配置模板,包括:
    基于所述YANG模型对所述配置模板及所述配置模板的父配置模板和/或子配置模板进行YANG语法校验,所述配置模板继承的父配置模板和/或聚合的子配置模板基于所述YANG模型的模型类型进行配置的;
    若所述配置模板及所述配置模板的父配置模板和/或子配置模板均校验通过,基于所述配置模板及所述配置模板的父配置模板和/或子配置模板转换得到所述生效配置模板。
  6. 如权利要求1所述的设备配置方法,其特征在于,所述将关联有所述设备配置参数的生效配置模板转换为配置报文,包括:
    基于所述YANG模型对关联有所述设备配置参数的生效配置模板进行YANG语义校验;
    若所述生效配置模板校验通过,将关联有所述设备配置参数的生效配置 模板转换为所述配置报文。
  7. 如权利要求6所述的设备配置方法,其特征在于,所述生效配置模板包括变量,所述将关联有所述设备配置参数的生效配置模板转换为所述配置报文,包括:
    基于所述设备配置参数对所述生效配置模板中的变量进行赋值处理,得到所述配置报文。
  8. 如权利要求6所述的设备配置方法,其特征在于,所述将关联有所述设备配置参数的生效配置模板转换为配置报文,包括:
    获取所述网络设备支持的网络配置协议;
    将关联有所述设备配置参数的生效配置模板转换为所述配置报文,所述配置报文的格式基于所述网络配置协议确定。
  9. 如权利要求8所述的设备配置方法,其特征在于,所述配置报文的格式包括基于JavaScript语言的对象简谱JSON格式或者可扩展标记语言XML格式,所述父配置模板和所述子配置模板基于所述YANG模型的模型类型。
  10. 如权利要求1至9中任意一项所述的设备配置方法,其特征在于,所述方法还包括:
    响应于所述配置模板的创建指令,开启模板创建界面,所述模板创建界面包括多个配置项;
    基于所述多个配置项的内容生成所述配置模板。
  11. 一种设备配置方法,应用于第一网络设备与第二网络设备,其特征在于,所述方法包括:
    所述第一网络设备基于另一个下一代YANG模型对多个配置模板进行解析,得到生效配置模板,所述多个配置模板之间包括模板继承关系和/或模板聚合关系,所述多个配置模板均满足所述YANG模型的YANG语言规范;
    所述第一网络设备获取设备配置参数,及将所述设备配置参数与所述生效配置模板进行关联;
    所述第一网络设备将关联有所述设备配置参数的生效配置模板转换为配置报文;
    所述第一网络设备将所述配置报文发送至所述第二网络设备;
    所述第二网络设备基于所述配置报文进行相应的网络配置。
  12. 如权利要求11所述的设备配置方法,其特征在于,在所述第一网络设备基于YANG模型对多个配置模板进行解析之前,包括:
    所述第一网络设备获取与所述多个配置模板关联的YANG模型。
  13. 如权利要求12所述的设备配置方法,其特征在于,所述第一网络设备获取与所述多个配置模板关联的YANG模型,包括:
    所述第一网络设备获取所述多个配置模板运用的设备类型或者设备型号;
    所述第一网络设备根据所述设备类型或者所述设备型号,确定与所述多 个配置模板关联的YANG模型。
  14. 如权利要求11所述的设备配置方法,其特征在于,所述第一网络设备基于YANG模型对多个配置模板进行解析,得到生效配置模板,包括:
    所述第一网络设备基于所述YANG模型对所述多个配置模板中的每个配置模板进行YANG语法校验与模板继承关系和/或模板聚合关系解析,所述模板继承关系和/或所述模板聚合关系解析基于所述YANG模型的模型类型进行配置的;
    若所述每个配置模板均校验通过,所述第一网络设备基于解析结果将所述多个配置模板转换为所述生效配置模板。
  15. 如权利要求11所述的设备配置方法,其特征在于,所述第一网络设备将关联有所述设备配置参数的生效配置模板转换为配置报文,包括:
    所述第一网络设备基于所述YANG模型对关联有所述设备配置参数的生效配置模板进行YANG语义校验;
    若所述生效配置模板校验通过,所述第一网络设备将关联有所述设备配置参数的生效配置模板转换为所述配置报文。
  16. 如权利要求15所述的设备配置方法,其特征在于,所述生效配置模板包括变量,所述第一网络设备将关联有所述设备配置参数的生效配置模板转换为所述配置报文,包括:
    所述第一网络设备基于所述设备配置参数对所述生效配置模板中的变量进行赋值处理,得到所述配置报文。
  17. 如权利要求15所述的设备配置方法,其特征在于,所述第一网络设备将关联有所述设备配置参数的生效配置模板转换为配置报文,包括:
    所述第一网络设备获取所述第二网络设备支持的网络配置协议;
    所述第一网络设备将关联有所述设备配置参数的生效配置模板转换为所述配置报文,所述配置报文的格式基于所述网络配置协议确定。
  18. 如权利要求17所述的设备配置方法,其特征在于,所述配置报文的格式包括基于JavaScript语言的对象简谱JSON格式或者可扩展标记语言XML格式,所述第一网络设备包括控制器,所述第二网络设备包括交换机、路由器、转发器中的一个。
  19. 如权利要求11至18中任意一项所述的设备配置方法,其特征在于,所述方法还包括:
    所述第一网络设备响应于所述配置模板的创建指令,开启模板创建界面,所述模板创建界面包括多个配置项;
    所述第一网络设备基于所述多个配置项的内容生成所述配置模板。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储了计算机指令,当所述计算机指令在网络设备的处理器上运行时,使得所述网络设备执行如权利要求1至权利要求10中任一项所述的设备配置方法。
  21. 一种网络设备,其特征在于,所述网络设备包括处理器和存储器,所述存储器用于存储指令,所述处理器用于调用所述存储器中的指令,使得所述网 络设备执行权利要求1至权利要求10中任一项所述的设备配置方法。
  22. 一种芯片,与网络设备中的存储器耦合,其特征在于,所述芯片用于控制所述网络设备执行权利要求1至权利要求10中任一项所述的设备配置方法。
PCT/CN2023/085750 2022-07-20 2023-03-31 设备配置方法、网络设备、芯片及计算机可读存储介质 Ceased WO2024016726A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP23841799.2A EP4546736A4 (en) 2022-07-20 2023-03-31 METHOD FOR configuring a device, network device, chip, and computer-readable recording medium
US19/028,279 US20250158886A1 (en) 2022-07-20 2025-01-17 Device configuration method, network device, chip, and computer-readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210861716.5A CN117478508A (zh) 2022-07-20 2022-07-20 设备配置方法、网络设备、芯片及计算机可读存储介质
CN202210861716.5 2022-07-20

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US19/028,279 Continuation US20250158886A1 (en) 2022-07-20 2025-01-17 Device configuration method, network device, chip, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2024016726A1 true WO2024016726A1 (zh) 2024-01-25

Family

ID=89616938

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/085750 Ceased WO2024016726A1 (zh) 2022-07-20 2023-03-31 设备配置方法、网络设备、芯片及计算机可读存储介质

Country Status (4)

Country Link
US (1) US20250158886A1 (zh)
EP (1) EP4546736A4 (zh)
CN (1) CN117478508A (zh)
WO (1) WO2024016726A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118659966A (zh) * 2024-08-14 2024-09-17 杭州海康威视系统技术有限公司 一种设备配置方法、装置、电子设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180329876A1 (en) * 2017-05-15 2018-11-15 Microsoft Technology Licensing, Llc Smart Templates
CN109116828A (zh) * 2017-06-22 2019-01-01 中兴通讯股份有限公司 一种控制器中模型代码配置方法和装置
CN109361550A (zh) * 2018-11-21 2019-02-19 国家计算机网络与信息安全管理中心 网络设备配置管理的方法、装置及设备
CN109951315A (zh) * 2019-02-14 2019-06-28 烽火通信科技股份有限公司 一种实现yang模型到内部模型映射的方法及系统
CN110971438A (zh) * 2018-09-30 2020-04-07 华为技术有限公司 配置数据的方法及装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10229185B2 (en) * 2015-06-30 2019-03-12 Veritas Technologies Llc Method and system for configuration management of hierarchically-organized unstructured data using associative templates

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180329876A1 (en) * 2017-05-15 2018-11-15 Microsoft Technology Licensing, Llc Smart Templates
CN109116828A (zh) * 2017-06-22 2019-01-01 中兴通讯股份有限公司 一种控制器中模型代码配置方法和装置
CN110971438A (zh) * 2018-09-30 2020-04-07 华为技术有限公司 配置数据的方法及装置
CN109361550A (zh) * 2018-11-21 2019-02-19 国家计算机网络与信息安全管理中心 网络设备配置管理的方法、装置及设备
CN109951315A (zh) * 2019-02-14 2019-06-28 烽火通信科技股份有限公司 一种实现yang模型到内部模型映射的方法及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4546736A4

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118659966A (zh) * 2024-08-14 2024-09-17 杭州海康威视系统技术有限公司 一种设备配置方法、装置、电子设备和存储介质

Also Published As

Publication number Publication date
EP4546736A1 (en) 2025-04-30
CN117478508A (zh) 2024-01-30
EP4546736A4 (en) 2025-10-29
US20250158886A1 (en) 2025-05-15

Similar Documents

Publication Publication Date Title
CN114465901B (zh) 通过图分析的模型驱动的意图策略冲突检测方法、设备和介质
US20240259249A1 (en) Supporting graphql based queries on yang based configuration data models
US10999410B1 (en) Configuring and managing network devices using program overlay on Yang-based graph database
US10200248B1 (en) Translating high-level configuration instructions to low-level device configuration
US10278112B1 (en) Resolving out-of-band configuration changes to high-level service configuration for managed network devices
US10476755B1 (en) Multi vendor device support in network management systems
CN106559251A (zh) 一种基于yang模型的编译方法、及对应的接口、组件和系统
CN113381875B (zh) 用于获取配置数据的方法
CN113381870B (zh) 报文处理方法和设备
WO2020062959A1 (zh) 配置数据的方法及装置
CN102231107B (zh) 基于autosar的电控单元通信数据格式的自动生成方法
US11354491B1 (en) Systems and methods for improved data modeling and translation
CN101621401A (zh) 基于北向接口的网管配置方法和装置
CN110138579A (zh) 用户侧设备的配置方法和相关装置
US20250158886A1 (en) Device configuration method, network device, chip, and computer-readable storage medium
CN110855459B (zh) 网络配置方法、装置及系统
CN111723036A (zh) 数据处理方法、相关设备及计算机存储介质
CN114666817B (zh) 基站数据的配置方法和装置、存储介质及电子装置
CN113641352B (zh) 一种自动生成snmp代码的方法及系统
CN106330507B (zh) 一种ctp生成方法和装置、以及网管服务器
CN110134467B (zh) 参数配置的处理方法、装置、存储介质及处理器
CN115529235B (zh) 控制器设备及用于该控制器设备的方法和系统
Agbariah Common policy language for Policy Compliance and Change Detection System in managed service in data networks
CN121056226A (zh) 网络安全策略配置方法、程序产品、电子设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23841799

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2023841799

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2023841799

Country of ref document: EP

Effective date: 20250122

NENP Non-entry into the national phase

Ref country code: DE

WWP Wipo information: published in national office

Ref document number: 2023841799

Country of ref document: EP