CN107547263A - A kind of method realized network element device automation and search template configuration - Google Patents
A kind of method realized network element device automation and search template configuration Download PDFInfo
- Publication number
- CN107547263A CN107547263A CN201710623167.7A CN201710623167A CN107547263A CN 107547263 A CN107547263 A CN 107547263A CN 201710623167 A CN201710623167 A CN 201710623167A CN 107547263 A CN107547263 A CN 107547263A
- Authority
- CN
- China
- Prior art keywords
- configuration
- template
- work order
- network element
- element device
- 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.)
- Pending
Links
Landscapes
- Stored Programmes (AREA)
Abstract
The invention discloses a kind of method realized network element device automation and search template configuration.A set of configuration template for being applied to a kind equipment is configured first, and corresponding configuration function is called to different configuration needs, corresponding configuration template is found out by work order number, device type, type of service, task type, template type etc..Corresponding value and structured value character string are found out using Java reflex mechanisms to the parameter in template, the parameter in script is replaced using Freemarker mould plate techniques, generate script file, pass through Commandline perform scripts, the remote interaction of equipment is realized using Telnet, judgement to configuration result is realized with the use of Python pexpect grammers, and configuration process and result are recorded in journal file, work order state is changed according to configuration result.The present invention is obtained in terms of template is configured to network element device in automation remarkable result.
Description
Technical field
The present invention relates to a kind of method realized network element device automation and search template configuration, belong to internet data configuration
Technical field.
Background technology
Configuration management is the fundamental functional modules in network element managing, is occupied very importantly in the network operation
Position.However, because network becomes increasingly complex, how the effectively configuration that carried out to network element device of efficiently and accurately is the task of top priority.
With the development of mobile communication, operator may require that to be carried out specifically according to the particular demands of network element device in network
Data configuration.Requirement of traditional collocation method for keeper is very high, not only needs skillfully to grasp substantial amounts of configuration order, also
It is especially noted that the relation of interdependence between device configuration, for more complicated configuration task, it is necessary to which parameter is more
Configuration order, configuration work amount is very big, configures the probability of error and can also greatly increase.Largely configured to tackle network element device
Demand and the growing trend of configuration complexity, we are directed to the research that network element device automatically configures.Automatically configuring is
A part for internet configuration management research field, purpose are exactly that the automation for farthest realizing network element device configuration is held
OK, the manually operated of keeper is reduced, reduces the possibility of configuration error.
Java reflex mechanisms are in running status, for any one class, can know all properties of this class
And method;For any one object, its any attribute and method can be called.
FreeMarker is a template engine:It is i.e. a kind of based on template and the data to be changed, and for generating output
The general utility tool of text (html web page, Email, configuration file, source code etc.).
Telnet is a VTP in TCP/IP protocol suite, and it allows attachment to distance host.Telnet
The application layer of OSI Reference Model is operated in, is ensured using TCP correct between client and server and transmits number in an orderly manner
According to.In daily webmaster work, the most important effects of Telnet are for being connected remotely to the network equipment, carrying out equipment
Configuration modification and status checkout work.
Pexpect is to be used to realize that the orders such as SSH, FTP, Telnet carry out automation interaction in Python, without
Third party's expansion module of automation O&M is realized in manual intervention.
The content of the invention
The technical problems to be solved by the invention are that providing a kind of network element device automates the method for searching template configuration,
The problem of Wire Parameters in existing collocation method is difficult, and manual operations is too many, and device configuration interdependency is too high is overcome, it is real
Now to the versatility automatic configuration process of network element device.
To achieve these goals, the method for searching template configuration is automated the invention provides a kind of network element device, is used
In realizing BAS Broadband Access Server BRAS, full-service router to network element devices such as optical line terminal OLT, optical network unit ONUs
The configuration of SR, convergence switch etc., comprises the following steps.
Step 1:Specific unit type is separated with corresponding configuration template, taking out a kind of device type can make
Template.
Step 2:Data during for the newly-built work order of the network element devices such as OLT, ONU preserve.
Step 3:Button is configured according to the corresponding work order of selection is actually needed;Three parts are included in configuration, can be achieved to convergence,
BRAS, SR configuration, in addition, in order to facilitate the operation of keeper, additionally provide the button that a key configures, it is possible to achieve converge
Poly-, BRAS, SR continuous configuration.
Step 3.1:After clicking on configuration button, the requisite information corresponding to the work order can be sent to backstage function;Transmit
Information mainly include work order number corresponding to work order, device type, type of service, template type, task type etc..
Step 3.2:Corresponding topology information is found into topology table according to work order number.
Step 4:Judge whether current work order is being handled;Processed work order number is mainly stored by HashTable, is made
The simultaneously operating of work order is realized with synchronized keywords.
Step 5:Judge task type of the current work order in work order state table, and called according to device type and matched somebody with somebody accordingly
Put function.Because different task type needs the data source that obtains different, it is necessary to the step of performing is also different,
A kind of task type needs to call a kind of single function acquisition data to be configured.
Step 6:Find the template that current work order should be called;The task record according to corresponding to searching work order number, then root
Device name is searched according to device type, type of service, is finally found correctly according to device name, type of service, template type
Template record.
Step 7:Script argument in template is subjected to instantiation replacement.
Step 7.1:Content in the template that needs are used during instantiation.
Step 7.2:Gone in database to find corresponding value, and the value character string of constructing variable according to selection parameter.
Step 7.3:The value according to corresponding to obtaining reflex mechanism.
Step 7.4:The parameter in script is replaced according to the value character string of the parameter of construction.
Step 8:Build work order journal file.
Step 9:Script file path is built, the script template of instantiation is saved in temporary file.
Step 10:Commandline is called to realize the execution of script.
Step 11:The remote interaction of equipment is realized using Telnet, with the use of Python pexpect grammers realization pair
The judgement of configuration result, and log.
Step 12:Change work order state.
To solve the above problems, the scheme that the present invention uses is as follows:One kind realizes that network element device automation is searched template and matched somebody with somebody
The method put, it is characterised in that define the template that a kind of device configuration can be called, for according to network element device convergence,
Called when BRAS, SR different configuration requirements, the parameter in script template is instantiated according to different data sources, entered
And Commandline perform scripts are called, the remote interaction of equipment is realized by Telnet, is realized using pecpect to configuration
As a result judgement, generation log information and output result.
Further, the method that template configuration is searched in network element device automation is realized according to above-mentioned design, it is special
Sign is, comprises the following steps:
1) selection need device type, type of service, template type, task type create corresponding to script template, pin
The script and parameter information that can be used in network element device configuration process are contained in this template;
2) data during work order newly-built to network element device preserve;
3) configuration function corresponding to being provided according to network element device convergence, BRAS, SR configuration requirement, and according to current
The work order transmission corresponding informance of configuration, finds corresponding essential information, topology information and the network information;
4) work order configured is preserved, while realizes that the synchronous of work order is grasped using synchronized keywords
Make, avoid the occurrence of while the multiple configuration to same work order operates;
5) judge task type of the current work order in work order state table, and called according to current device type in (3)
Corresponding configuration function is configured;
6) created according to work order number, device type, type of service, template type, task type information searching in (1)
Correct script template;
7) the script template parameter in (6) is used, according to selection parameter and the corresponding relation of actual parameter, uses Java's
Reflex mechanism finds corresponding value, and the value character string of constructing variable from database;Using Freemarker technologies by (6)
Script argument in the script template got replaces with value character string;
8) journal file corresponding to current work order is generated, and the path of journal file is stored in journal file record,
And it is added in the script template got in (6);
9) script file path is built, the script template that parameter is replaced with to value character string is saved in script file;
10) Commandline is called to perform the script file preserved in (9);
11) remote interactive work of network element device is realized in script file using Telnet technologies, corresponding network element device
The pexpect grammers of logical process and result matching using Python are configured, to the flow in configuration and result in (8)
Recorded in journal file;
12) state of work order is changed accordingly according to the result of configuration.
Further, the method that template configuration is searched in network element device automation is realized according to above-mentioned design, it is special
Sign is, in the step (1), the script template that a kind of network element device configuration can call is created, by for templating species
Classified, can according to different device types, type of service, template type, task type create corresponding to template, according to not
Same task type chooses different parameters, and fills in actual parameter according to corresponding corresponding relation, when actual parameter and script
When script argument in template is identical, while the separator between selected parameter.
Further, the method that template configuration is searched in network element device automation is realized according to above-mentioned design, it is special
Sign is that the data in the step (2) during work order newly-built to network element device preserve, and its data source includes:Upstream is set
It is standby to be transmitted by MQ interfaces, and artificial addition work order data;Data message includes corresponding essential information data, network letter
Cease data and topology information data.
Further, the method that template configuration is searched in network element device automation is realized according to above-mentioned design, it is special
Sign is, provided in the step (3) corresponding to configuration function:Network element device is provided to required for convergence, BRAS, SR configuration
Configuration function, and send the requisite information corresponding to the current work order for performing configuration to configuration function.
Further, the method that template configuration is searched in network element device automation is realized according to above-mentioned design, it is special
Sign is that synchronous work order configures in the step (4), including the work order number of the work order configured is entered using HashTable
Row preserves, and realizes the simultaneously operating of work order using synchronized keywords simultaneously.
Further, the method that template configuration is searched in network element device automation is realized according to above-mentioned design, it is special
Sign is, judges task type of the current work order in work order state table in the step (5), and according to current device type
Corresponding configuration function is called, the configuration function includes BRAS configuration functions, SR configuration functions, convergence configuration function.
Further, the method that template configuration is searched in network element device automation is realized according to above-mentioned design, it is special
Sign is, corresponding value is found from database using Java reflex mechanism in the step (7), for that may be present more
Bar records, and the form of the list arrays by being configured to Python, is conducted interviews according to index, uses HashMap key-value pairs
Mode stores the relation of actual parameter and value character string, at the same check selection parameter with generate value character string number whether phase
Together.
Further, the method that template configuration is searched in network element device automation is realized according to above-mentioned design, it is special
Sign is that network element device orders completion remote by piece together order, matching expectation and the transmission of script file in the step (11)
Journey interworking;Wherein use the pexpect grammers of Python that the desired value to result is set the order pieced together, lead to
Index value matching result is crossed, different operations is carried out to different results;Pexpect grammers can be in the day above created simultaneously
The procedure information and result of configuration are recorded in will file.
Further, the method that template configuration is searched in network element device automation is realized according to above-mentioned design, it is special
Sign is that the result in the step (12) according to configuration is changed accordingly to the state of work order:If running succeeded, more
It is configuration successful to change work order state;If configuration failure, change work order state is configuration failure;The work order of configuration failure can be in root
Configuration is re-started after investigating bug patch according to log recording.
Further, a kind of method realized network element device automation and search template configuration, it is characterised in that define one kind and set
The template that standby configuration can call, for according to the convergence to network element device, BRAS, SR different configuration requirements when call, it is main
Will be in being instantiated according to different data sources to the parameter in script template, and then call Commandline to perform
Script, the remote interaction of equipment is realized by Telnet, the judgement to configuration result, generation daily record letter are realized using pecpect
Cease simultaneously output result.
Further, the method realized network element device automation and search template configuration according to above-mentioned design, its
It is characterized in comprising the following steps:
1) selection needs device type, type of service, template type, template corresponding to task type definition, in template
Contain the script and parameter information that can be used during device configuration;
2) data when for the newly-built work order of the network element devices such as OLT, ONU preserve;
3) configuration function corresponding to being provided according to network element device convergence, BRAS, SR configuration requirement, while a key is provided
Configuration feature.Corresponding informance is transmitted according to the work order of current configuration, and finds corresponding essential information, topology information and net
Network information;
4) work order configured is preserved, while realizes that the synchronous of work order is grasped using synchronized keywords
Make, avoid the occurrence of while the multiple configuration to same work order operates;
5) task type of the current work order in work order state table is judged, and phase in being called 3) according to current device type
The configuration function answered is configured;
6) it is correct to being created in 1) according to information searchings such as work order number, device type, type of service, template types
Template;
7) template parameter in using 6), according to selection parameter and the corresponding relation of actual parameter, uses Java reflection
Mechanism finds corresponding value, and the value character string of constructing variable into database.Obtained using Freemarker technologies by 6) middle
To template in script argument replace with value character string;
8) a journal file record corresponding to current work order is generated, and the path of journal file is stored in log recording
In, and in the script template got in being added to 6);
9) script file path is built, the script template of instantiation is saved in temporary file;
10) script file for calling Commandline to be preserved in performing 9);
11) remote interactive work of equipment, the configuration logic of corresponding device are realized in script file using Telnet technologies
Processing and result matching use Python pexpect grammers, to the journal file of the flow in configuration and result in 8)
In recorded;
12) state of work order is changed accordingly according to the result of configuration.
Further, the method realized network element device automation and search template configuration according to above-mentioned design, its
It is characterized in step 1), creates the template that a kind of device configuration can be called, i.e.,:
Classify for templating species, can be according to different device types, type of service, template type, task type
Template corresponding to establishment, different parameters is chosen according to different task types, and reality is filled according to corresponding corresponding relation
Parameter, actual parameter is identical with the script argument in template, while the separator between selected parameter.
Further, the method realized network element device automation and search template configuration according to above-mentioned design, its
It is characterized in step 2), preserves the data of the network element devices such as OLT, ONU:
Work order data source includes two ways, and one kind is that upstream equipment is transmitted by MQ interfaces, and one kind is artificial
Work order data are added, it is main to include corresponding essential information data, network information data and topology information data.
Further, the method realized network element device automation and search template configuration according to above-mentioned design, its
It is characterized in step 3), there is provided corresponding configuration function:
Network element device is provided to the configuration function required for convergence, BRAS, SR configuration, and the work that current execution is configured
Requisite information corresponding to list sends configuration function to.
Further, the method realized network element device automation and search template configuration according to above-mentioned design, its
It is characterized in step 4), synchronous work order configuration:
In order to avoid there is the situation of the multiple configuration to same work order simultaneously, the work order number of the work order configured is made
Preserved with HashTable, while the simultaneously operating of work order is realized using synchronized keywords;
Further, the method realized network element device automation and search template configuration according to above-mentioned design, its
It is characterized in step 5), judges task type of the current work order in work order state table, and call according to current device type
Corresponding configuration function, including BRAS configuration functions, SR configuration functions, convergence configuration function.
Further, the method realized network element device automation and search template configuration according to above-mentioned design, its
It is characterized in step 6), searches correct template:
Template is classified according to device type, type of service, template type, task type, according to current work order
Number corresponding data is searched into task list, in Basic Information Table and topology table, so as to template note corresponding to being found in template table
Record.
Further, the method realized network element device automation and search template configuration according to above-mentioned design, its
It is characterized in step 7), the instantiation and script argument for realizing parameter are replaced:
For obtaining value corresponding to each parameter field from database, we used Java reflex mechanisms.For can
A plurality of record existing for energy, the form of the list arrays by being configured to Python, conducts interviews according to index.Use
The mode of HashMap key-value pairs stores the relation of actual parameter and value character string.Selection parameter and the value word of generation are checked simultaneously
Whether the number for according with string is identical.Value character string corresponding to being substituted for the parameter in script uses Freemarker template engine skills
Art.
Further, the method realized network element device automation and search template configuration according to above-mentioned design, its
It is characterized in step 8), generates a journal file record corresponding to current work order, the path that journal file preserves is stored in
In script template, record performs flow during for perform script, is easy to later stage error investigation.
Further, the method realized network element device automation and search template configuration according to above-mentioned design, its
It is characterized in step 9), structure script file path, the script template that parameter is replaced with to value character string is saved in temporary file
In, script file classification is carried out according to work order number, the different script files generated in each work order number file are according to generation
The time of script is named, and reads and uses for subsequent configuration.
Further, the method realized network element device automation and search template configuration according to above-mentioned design, its
It is characterized in step 10), for the script file of generation, order line parses class Commandline execute in calling Java
() method performs configuration order.
Further, the method realized network element device automation and search template configuration according to above-mentioned design, its
It is characterized in step 11), because the network equipment all supports Telnet agreements, so remotely being handed over the network equipment using Telnet
Mutually, the core procedure of script is ordered to piece together order, matching expectation and sending.Python is used to the order pieced together
Pexpect grammers set the desired value to result, and by index value matching result, different operations is carried out to different results.
Pexpect grammers additionally provide the operation to daily record simultaneously, thus can remember in the journal file above created
The procedure information and result of the lower configuration of record.
Further, the method realized network element device automation and search template configuration according to above-mentioned design, its
It is characterized in step 12), the state of work order is changed accordingly according to the result of configuration:
If running succeeded, change work order state is configuration successful, if configuration failure, change work order state is lost for configuration
Lose.The work order of configuration failure can re-start configuration after bug patch is investigated according to log recording.
Brief description of the drawings
Fig. 1 is that user performs the flow chart once automatically configured to a network element device.
Fig. 2 is to judge the flow chart whether current work order is being handled.
Fig. 3 is the flow chart instantiated to the script in template.
Embodiment
The present invention is described in further details below in conjunction with the accompanying drawings.
Step 1:Template workable for taking out a kind of device type.
Classify for templating species, can be according to different device types, type of service, template type, task type
Corresponding template is found, the script and parameter information that can be used during device configuration are contained in template.
Step 2:Data during for the newly-built work order of the network element devices such as OLT, ONU preserve.
Work order data source includes two ways, and one kind is that upstream equipment is transmitted by MQ interfaces, and one kind is artificial
Work order data are added, it is main to include corresponding essential information data, network information data and topology information data.
Step 3:Button is configured according to the corresponding work order of selection is actually needed.
Step 3.1:After clicking on configuration button, the requisite information corresponding to the work order can be sent to backstage function
Including work order number, the device type (species includes convergence, BRAS, SR) of current work order, the service class of current work order
Type (species includes convergence dilatation, management, business, voice, ITV etc.), (species includes configuration to the template type that current work order needs
Template and examination template, are currently at configuration phase, it should option and installment template), the task type of current work order.
Step 3.2:Corresponding topology information is found into topology table according to work order number, each work is mainly stored in topology table
Single up and down port and up and down facility information.
Step 4:Judge whether current work order is being handled.
As shown in Fig. 2 preserve processing work order group, wherein work order number conduct by establishing a HashTable
HashTable key, if including current work order in HashTable key, show that current work order is handled and return to True;Such as
Fruit does not include current work order, shows that current work order is not being handled, then by current work order number add enter processing work order group, continue into
Row subsequent configuration.
If current work order is not found in work order state table, current work order is removed from work order group, and returns
Failure.
If current work order can be found in work order state table, but the state of current work order be not configuration failure or
It is to be configured, then current work order is removed from work order group, and return to work order configuration status mistake.
Step 5:Judge task type of the current work order in work order state table, and called according to device type and matched somebody with somebody accordingly
Put function.
Judging task type of the current work order in work order state table, different task types calls different functions, under
Related data is searched in face by taking newly-built OLT states as an example, according in the topology information table of work order number to OLT, if do not found, returns
Return configuration failure.One OLT work order may have a plurality of topology information data, and each topology information data of searching loop are entered
Row configuration.
Corresponding configuration function, including BRAS configuration functions, SR configuration functions, convergence are called according to current device type
Configuration function.The process that different configuration functions performs is similar, and key is that the parameter value of incoming parameter list is otherwise varied.
The main work of configuration function is to find the template that current work order should be called, the script argument in template carried out real
Exampleization is replaced, and generates executable script, calls automatic configuration process perform script to be configured, and daily record note corresponding to generation
Record file.
Step 6:Find the template that current work order should be called.
Task record corresponding to being searched according to current work order number into task list, if not finding task record, return
Search task record failure.
Corresponding device name in topology table is searched according to work order number, device type, type of service, if do not found pair
The device name answered, return and search device name failure.
Corresponding template record in template table is searched according to device name, type of service, template type, if do not found
Corresponding template record, return and search template record failure.
Step 7:Script argument in template is subjected to instantiation replacement.
Step 7.1:Content in the template that needs are used during instantiation.
As shown in Figure 3, it is necessary to which the Python scripts performed, contain the parameter shaped like { parameter } in Python scripts
Need to be replaced.
The parameter name for needing to replace in Python scripts is stored in the field of entitled actual parameter, corresponding to the parameter name
The field for obtaining actual value in database is stored in the field of entitled selection parameter, the corresponding pass of selection parameter and actual parameter
Just choose to fill in when tying up to newly-built template and finished.
Separator is further comprises in Python scripts, the separator is also stored separately in a field, for by each parameter
Name is split, and separator provides a variety of options, and meaning is after preventing from being split from fixed character, if addition is newly set
It is standby, cause the unexpected situation of segmentation error in its parameter name comprising the character.
Step 7.2:Gone in database to find corresponding value, and the value character string of constructing variable according to selection parameter
Multiple parameters field may be included in selection parameter, each parameter field may be from essential information tables of data, net
Network information data table or topology information tables of data.What is stored in topology information tables of data is up and down facility information corresponding to equipment
(such as first line of a couplet device type, first line of a couplet port type etc.), it may be found for the up and down information of each work order corresponding device
A plurality of record.
Step 7.3:The value according to corresponding to obtaining reflex mechanism
For obtaining value corresponding to each parameter field, we used Java reflex mechanisms.We are by being passed to object
Call the characteristic of its attribute.Because it can not determine which data form parameter field comes from, therefore we will believe substantially
Cease all incoming sphere value function of object of tables of data, network information data table and the generation of topology information tables of data.It is incoming one
Object, if the sphere value function of the object can get value, the value is returned, splices parameter value character string, if not obtaining
To value, then continue to be passed to next object, perform the sphere value function of the object.
Obtain what is stated in the object correspondent entity class by using getDeclaredFields () method of reflective object
Each field, each field is stored in Field arrays, travels through array, word is obtained by Field getName () method
The field name of section, if the field name currently traveled through is identical with the field name that we are searched, passes through Field get
(object) method obtains the value of the field, if the field is private attributes in statement, can not now access, then can lead to
The method for crossing Field setAccessible (true) sets the field may have access to.
For a plurality of record that may be present, the form of the list arrays by being configured to Python, carried out according to index
Access.Value1 is such as found, two field values of value2, then result can be configured to list [' value1 ', ' value2 ']
Form, can pass through list [0] obtain value1, list [1] obtain value2.
Step 7.4:The parameter in script is replaced according to the value character string of the parameter of construction.
Value character string now is the value character string of selection parameter, according to selection parameter and the corresponding relation of actual parameter,
Stored using the mode of HashMap key-value pairs, the key of the field name of actual parameter as HashMap, therewith corresponding selection
The value character string of parameter is as value.Simultaneously it is noted that checking whether the number of value character string of the selection parameter with generating is identical, if
Differ, then explanation does not search respective value in the presence of some parameter in database, returns to configuration failure.
Replace that we used Freemarker template engine technologies, core code are as follows herein:
Template process (Object dataModel, Writer out) methods are called to close data and template
And the template of generation instantiation is handled, wherein dataModel is the container for the variable that can be obtained from template, typically one
Individual Map<String,Object>An either JavaBean (JavaBean attribute will turn into variable), we used
HashMap is stored.Writer herein caches the institute read we used StringWriter classes in internal memory
There is character string, then using the disposable whole output template character strings of toString () method.
Step 8:Build work order journal file.
A log recording corresponding to current work order is generated, including starts the time of operation, work order number, current operation people's
Id and name, malfunction and investigate for the later stage.The path of journal file is stored in log recording, and is added to what is currently called
In script template, record performs flow during for perform script.
Step 9:Script file path is built, the script template of instantiation is saved in temporary file.
Carry out script file classification according to work order number, in each work order number file the different script files of generation according to
The time of generation script is named, and avoids repeating while is easy to search.
Step 10:Commandline is called to realize the execution of script.
" python " is spliced with script file path, generates executable order line command, call instruction row solution
Analysis class Commandline execute () method performs the order and configured.
Step 11:The remote interaction of equipment is realized using Telnet, with the use of Python pexpect grammers realization pair
The judgement of configuration result.
Because the network equipment all supports Telnet agreements, so being interacted using Telnet and the network equipment.The core of script
Heart step is pieces together order, matching it is expected and sends order.
Telnet command is pieced together first, the parameter by the use of telnet command as spawn class constructors, generates one
The object of spawn classes, form are:Child=pexpect.spawn (cmd), desired character result is set, such as:index
=child.expect ([" Username ", " (i)Unknown host",pexpect.EOF,pexpect.TIMEOUT])
In, show it is expected the appearance of " Username " character string, the result for judging to occur by index value, if index value is 0, table
Bright matching " Username " character string success, then input user name by child.sendline (username).If index
Value be 1,2,3, then can print out corresponding error message.
Meanwhile the function of pexpect record support daily records, for by each procedure information performed during device configuration and
Error message is recorded, and is easy to error to investigate.Specific code is as follows:
Step 12:Change work order state.
The result performed to script judges, if running succeeded, change work order state is configuration successful, if configuration is lost
Lose, then it is configuration failure to change work order state.The work order of configuration failure can be after bug patch be investigated according to log recording again
Configured.
The invention is not restricted to examples detailed above, all technical schemes formed using equivalent substitution or equivalence replacement belong to this
The claimed scope of invention.
Claims (10)
- A kind of 1. method realized network element device automation and search template configuration, it is characterised in that defining a kind of device configuration can With the template of calling, for according to the convergence to network element device, BRAS, SR different configuration requirements when call, according to different Data source instantiates to the parameter in script template, and then calls Commandline perform scripts, real by Telnet The remote interaction of existing equipment, the judgement to configuration result, generation log information and output result are realized using pecpect.
- 2. realize according to claim 1 network element device automation search template configuration method, it is characterised in that including with Lower step:(1) selection need device type, type of service, template type, task type create corresponding to script template, script mould The script and parameter information that can be used in network element device configuration process are contained in plate;(2) data during work order newly-built to network element device preserve;(3) configuration function corresponding to being provided according to network element device convergence, BRAS, SR configuration requirement, and matched somebody with somebody according to current The work order transmission corresponding informance put, finds corresponding essential information, topology information and the network information;(4) work order configured is preserved, while the simultaneously operating of work order is realized using synchronized keywords, Avoid the occurrence of while the multiple configuration to same work order operates;(5) judge task type of the current work order in work order state table, and called according to current device type in (3) accordingly Configuration function configured;(6) created according to work order number, device type, type of service, template type, task type information searching in (1) Correct script template;(7) the script template parameter in (6) is used, according to selection parameter and the corresponding relation of actual parameter, uses the anti-of Java Penetrate mechanism and corresponding value, and the value character string of constructing variable are found from database;It will be obtained using Freemarker technologies in (6) Script argument in the script template got replaces with value character string;(8) journal file corresponding to current work order is generated, and the path of journal file is stored in journal file record, and is added It is added in the script template got in (6);(9) script file path is built, the script template that parameter is replaced with to value character string is saved in script file;(10) Commandline is called to perform the script file preserved in (9);(11) remote interactive work of network element device, the configuration of corresponding network element device are realized in script file using Telnet technologies Logical process and result matching use Python pexpect grammers, to the daily record of the flow in configuration and result in (8) Recorded in file;(12) state of work order is changed accordingly according to the result of configuration.
- 3. the method that template configuration is searched in network element device automation is realized according to claim 2, it is characterised in that the step Suddenly in (1), the script template that a kind of network element device configuration can call is created, can root by classifying for templating species According to template corresponding to different device types, type of service, template type, task type establishment, according to different task types Different parameters is chosen, and actual parameter is filled according to corresponding corresponding relation, the script in actual parameter and script template When parameter is identical, while the separator between selected parameter.
- 4. the method that template configuration is searched in network element device automation is realized according to claim 2, it is characterised in that the step Suddenly the data in (2) during work order newly-built to network element device preserve, and its data source includes:Upstream equipment is entered by MQ interfaces Row transmission, and artificial addition work order data;Data message includes corresponding essential information data, network information data and topology letter Cease data.
- 5. the method that template configuration is searched in network element device automation is realized according to claim 2, it is characterised in that the step Suddenly configuration function corresponding to being provided in (3):Network element device is provided to the configuration function required for convergence, BRAS, SR configuration, and Send the requisite information corresponding to the current work order for performing configuration to configuration function.
- 6. the method that template configuration is searched in network element device automation is realized according to claim 2, it is characterised in that the step Suddenly synchronous work order configuration in (4), including the work order number of the work order configured is preserved using HashTable, and simultaneously The simultaneously operating of work order is realized using synchronized keywords.
- 7. the method that template configuration is searched in network element device automation is realized according to claim 2, it is characterised in that the step Suddenly task type of the current work order in work order state table is judged in (5), and is called according to current device type and matched somebody with somebody accordingly Function is put, the configuration function includes BRAS configuration functions, SR configuration functions, convergence configuration function.
- 8. the method that template configuration is searched in network element device automation is realized according to claim 2, it is characterised in that the step Suddenly corresponding value is found from database using Java reflex mechanism in (7), for a plurality of record that may be present, passes through structure The form of Python list arrays is caused, is conducted interviews according to index, actual ginseng is stored using the mode of HashMap key-value pairs Number and the relation of value character string, while check whether the number of value character string of the selection parameter with generating is identical.
- 9. the method that template configuration is searched in network element device automation is realized according to claim 2, it is characterised in that the step Suddenly network element device piecing together order, matching it is expected and sending order completion remote interactive work by script file in (11);Its In the order pieced together is set to the desired value of result using the pexpect grammers of Python, matched by index value As a result, different operations is carried out to different results;Pexpect grammers can record in the journal file above created simultaneously The procedure information and result of lower configuration.
- 10. the method that template configuration is searched in network element device automation is realized according to claim 2, it is characterised in that described The state of work order is changed accordingly according to the result of configuration in step (12):If running succeeded, work order state is changed For configuration successful;If configuration failure, change work order state is configuration failure;The work order of configuration failure can be according to log recording Configuration is re-started after investigation bug patch.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710623167.7A CN107547263A (en) | 2017-07-26 | 2017-07-26 | A kind of method realized network element device automation and search template configuration |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710623167.7A CN107547263A (en) | 2017-07-26 | 2017-07-26 | A kind of method realized network element device automation and search template configuration |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107547263A true CN107547263A (en) | 2018-01-05 |
Family
ID=60970268
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710623167.7A Pending CN107547263A (en) | 2017-07-26 | 2017-07-26 | A kind of method realized network element device automation and search template configuration |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107547263A (en) |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108365974A (en) * | 2018-01-17 | 2018-08-03 | 南京邮电大学 | A method of it is configured for network element device multi-service automatized script |
CN108418704A (en) * | 2018-01-17 | 2018-08-17 | 南京邮电大学 | A kind of network element device method of network entry based on automation template configuration |
CN109788052A (en) * | 2019-01-02 | 2019-05-21 | 郑州云海信息技术有限公司 | A kind of server configuration remote inquiry method, apparatus, terminal and storage medium |
CN109947444A (en) * | 2019-02-18 | 2019-06-28 | 南京邮电大学 | A kind of method that dynamic updates establishment for network element device configuration script |
CN110261701A (en) * | 2019-06-27 | 2019-09-20 | 西安西拓电气股份有限公司 | The configuration method of power equipment, apparatus and system |
CN110505100A (en) * | 2019-08-30 | 2019-11-26 | 浙江岩华文化传媒有限公司 | Network work order configuration method, device, electronic equipment and computer-readable medium |
CN111106948A (en) * | 2019-10-28 | 2020-05-05 | 中国通信服务股份有限公司 | Configuration-based instruction adaptation method |
CN111130864A (en) * | 2019-12-13 | 2020-05-08 | 南京邮电大学 | Method for collecting formatted network element data using template |
CN111555915A (en) * | 2020-04-24 | 2020-08-18 | 科大国创云网科技有限公司 | Dynamic network element control system based on plug-in configuration |
CN111786841A (en) * | 2020-07-30 | 2020-10-16 | 中盈优创资讯科技有限公司 | Automatic operation method, system and device for optical network GPON equipment |
CN112398683A (en) * | 2020-10-27 | 2021-02-23 | 烽火通信科技股份有限公司 | Configuration method and device of multi-device hybrid networking supporting yang protocol |
CN112543120A (en) * | 2020-12-02 | 2021-03-23 | 中盈优创资讯科技有限公司 | OLT (optical line terminal) opening automation configuration method and device |
CN112565937A (en) * | 2019-09-25 | 2021-03-26 | 华为技术有限公司 | Method, device and system for selecting BNG-UP device |
CN112737802A (en) * | 2019-10-28 | 2021-04-30 | 中盈优创资讯科技有限公司 | Internet private line management method and system |
CN113938378A (en) * | 2021-09-17 | 2022-01-14 | 浪潮思科网络科技有限公司 | Method, device and medium for verifying network device configuration in cloud network environment |
CN113992510A (en) * | 2021-10-14 | 2022-01-28 | 杭州东方通信软件技术有限公司 | Wireless device parameter modification method and system |
CN114095350A (en) * | 2021-11-22 | 2022-02-25 | 中国电信股份有限公司 | Equipment configuration method, service configuration method, device, equipment and medium |
CN114629807A (en) * | 2020-12-11 | 2022-06-14 | 中国移动通信集团湖南有限公司 | Work order processing method, device and equipment |
CN115118589A (en) * | 2022-06-29 | 2022-09-27 | 广东电网有限责任公司 | Grid-connected rapid configuration method and system for power distribution network switch |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1956394A (en) * | 2006-11-13 | 2007-05-02 | 杭州华为三康技术有限公司 | Method and device for service configuration of network equipment |
CN101383871A (en) * | 2007-09-06 | 2009-03-11 | 中兴通讯股份有限公司 | Network element configuration implementing method and apparatus |
EP2106175A1 (en) * | 2008-03-26 | 2009-09-30 | Alcatel Lucent | Method for optimizing the configuration of a network element, network element of a communication network and computing device in a communication network |
CN101902363A (en) * | 2010-08-16 | 2010-12-01 | 中兴通讯股份有限公司 | Method and device for managing network element equipment |
CN103544016A (en) * | 2013-10-28 | 2014-01-29 | 珠海许继芝电网自动化有限公司 | Service registering configuration method and system based on JAVA reflection technology |
CN106453517A (en) * | 2016-09-20 | 2017-02-22 | 郑州云海信息技术有限公司 | Configuration file generation method based on freemarker |
-
2017
- 2017-07-26 CN CN201710623167.7A patent/CN107547263A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1956394A (en) * | 2006-11-13 | 2007-05-02 | 杭州华为三康技术有限公司 | Method and device for service configuration of network equipment |
CN101383871A (en) * | 2007-09-06 | 2009-03-11 | 中兴通讯股份有限公司 | Network element configuration implementing method and apparatus |
EP2106175A1 (en) * | 2008-03-26 | 2009-09-30 | Alcatel Lucent | Method for optimizing the configuration of a network element, network element of a communication network and computing device in a communication network |
CN101902363A (en) * | 2010-08-16 | 2010-12-01 | 中兴通讯股份有限公司 | Method and device for managing network element equipment |
CN103544016A (en) * | 2013-10-28 | 2014-01-29 | 珠海许继芝电网自动化有限公司 | Service registering configuration method and system based on JAVA reflection technology |
CN106453517A (en) * | 2016-09-20 | 2017-02-22 | 郑州云海信息技术有限公司 | Configuration file generation method based on freemarker |
Non-Patent Citations (1)
Title |
---|
牟亿: ""基于模板的网络设备配置系统"", 《软件》 * |
Cited By (27)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108418704A (en) * | 2018-01-17 | 2018-08-17 | 南京邮电大学 | A kind of network element device method of network entry based on automation template configuration |
CN108365974A (en) * | 2018-01-17 | 2018-08-03 | 南京邮电大学 | A method of it is configured for network element device multi-service automatized script |
CN109788052A (en) * | 2019-01-02 | 2019-05-21 | 郑州云海信息技术有限公司 | A kind of server configuration remote inquiry method, apparatus, terminal and storage medium |
CN109788052B (en) * | 2019-01-02 | 2021-11-26 | 郑州云海信息技术有限公司 | Server configuration remote query method, device, terminal and storage medium |
CN109947444A (en) * | 2019-02-18 | 2019-06-28 | 南京邮电大学 | A kind of method that dynamic updates establishment for network element device configuration script |
CN110261701A (en) * | 2019-06-27 | 2019-09-20 | 西安西拓电气股份有限公司 | The configuration method of power equipment, apparatus and system |
CN110261701B (en) * | 2019-06-27 | 2021-08-13 | 西安西拓电气股份有限公司 | Configuration method, device and system of power equipment |
CN110505100A (en) * | 2019-08-30 | 2019-11-26 | 浙江岩华文化传媒有限公司 | Network work order configuration method, device, electronic equipment and computer-readable medium |
CN112565937A (en) * | 2019-09-25 | 2021-03-26 | 华为技术有限公司 | Method, device and system for selecting BNG-UP device |
CN112565937B (en) * | 2019-09-25 | 2021-11-19 | 华为技术有限公司 | Method, device and system for selecting BNG-UP device |
CN111106948A (en) * | 2019-10-28 | 2020-05-05 | 中国通信服务股份有限公司 | Configuration-based instruction adaptation method |
CN112737802B (en) * | 2019-10-28 | 2023-04-07 | 中盈优创资讯科技有限公司 | Internet private line management method and system |
CN112737802A (en) * | 2019-10-28 | 2021-04-30 | 中盈优创资讯科技有限公司 | Internet private line management method and system |
CN111130864A (en) * | 2019-12-13 | 2020-05-08 | 南京邮电大学 | Method for collecting formatted network element data using template |
CN111555915A (en) * | 2020-04-24 | 2020-08-18 | 科大国创云网科技有限公司 | Dynamic network element control system based on plug-in configuration |
CN111786841B (en) * | 2020-07-30 | 2023-04-21 | 中盈优创资讯科技有限公司 | Automatic operation method, system and device for optical network GPON equipment |
CN111786841A (en) * | 2020-07-30 | 2020-10-16 | 中盈优创资讯科技有限公司 | Automatic operation method, system and device for optical network GPON equipment |
CN112398683A (en) * | 2020-10-27 | 2021-02-23 | 烽火通信科技股份有限公司 | Configuration method and device of multi-device hybrid networking supporting yang protocol |
CN112543120A (en) * | 2020-12-02 | 2021-03-23 | 中盈优创资讯科技有限公司 | OLT (optical line terminal) opening automation configuration method and device |
CN114629807A (en) * | 2020-12-11 | 2022-06-14 | 中国移动通信集团湖南有限公司 | Work order processing method, device and equipment |
CN113938378A (en) * | 2021-09-17 | 2022-01-14 | 浪潮思科网络科技有限公司 | Method, device and medium for verifying network device configuration in cloud network environment |
CN113938378B (en) * | 2021-09-17 | 2024-05-28 | 浪潮思科网络科技有限公司 | Method, equipment and medium for checking network equipment configuration in cloud network environment |
CN113992510A (en) * | 2021-10-14 | 2022-01-28 | 杭州东方通信软件技术有限公司 | Wireless device parameter modification method and system |
CN113992510B (en) * | 2021-10-14 | 2024-05-28 | 杭州东方通信软件技术有限公司 | Wireless device parameter modification method and system |
CN114095350A (en) * | 2021-11-22 | 2022-02-25 | 中国电信股份有限公司 | Equipment configuration method, service configuration method, device, equipment and medium |
CN115118589A (en) * | 2022-06-29 | 2022-09-27 | 广东电网有限责任公司 | Grid-connected rapid configuration method and system for power distribution network switch |
CN115118589B (en) * | 2022-06-29 | 2023-09-22 | 广东电网有限责任公司 | Grid-connected rapid configuration method and system for power distribution network switch |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107547263A (en) | A kind of method realized network element device automation and search template configuration | |
CN108418704A (en) | A kind of network element device method of network entry based on automation template configuration | |
CN108365974A (en) | A method of it is configured for network element device multi-service automatized script | |
CN105809248B (en) | A kind of configuration and exchange method of the distribution artificial neural network on SDN | |
US20060190579A1 (en) | Assisted command script template creation | |
CN103425462B (en) | A kind of method and apparatus of workflow data persistence | |
CN106155906B (en) | A kind of bank's host close beta system and method | |
CN106022007B (en) | The cloud platform system and method learning big data and calculating is organized towards biology | |
US8601091B2 (en) | Method and system for automating network engineering | |
US20080120521A1 (en) | Automated Testing and Control of Networked Devices | |
US20120253728A1 (en) | Method and system for intelligent automated testing in a multi-vendor, multi-protocol heterogeneous environment | |
CN105141441B (en) | A kind of method that IP network graphically configures | |
CN109753532A (en) | Interface service system and its implementation method for browser end access database | |
CN109240688A (en) | Interface development method, electronic device and readable storage medium storing program for executing | |
US10439887B2 (en) | Generic test framework for service interfaces | |
CN109522321A (en) | A kind of data base query method, device, server and storage medium | |
CN107911251A (en) | A kind of method for configuring network equipment, device and medium | |
CN108134690A (en) | Network service deployment flow control method, apparatus and system | |
CN110198254A (en) | A kind of communication protocol inline diagnosis method and diagnostic system | |
CN113760730A (en) | Automatic testing method and device | |
Yang et al. | Smart intent-driven network management | |
CN111104181A (en) | Webpage data filling system for visually editing task flow | |
CN114371851A (en) | Network equipment automation realization method based on compiling | |
CN108021431A (en) | Method and its system based on web data interactive maintenance Hive | |
CN112583663B (en) | Automatic network performance testing method based on domestic operating system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20180105 |
|
WD01 | Invention patent application deemed withdrawn after publication |