Disclosure of Invention
Aiming at the defects of the related prior art, the invention provides an automatic networking environment setting-up method and device based on a TDMA satellite network management, wherein in the TDMA satellite network management, manual piece-by-piece configuration is changed into program automatic configuration on the premise of large-scale equipment networking, so that networking efficiency is improved, and the probability of error occurrence is reduced.
In order to achieve the object of the invention, the following scheme is adopted:
a method for automatically setting up networking environment based on TDMA satellite network management comprises the following steps:
responding to the input of a user interface of a satellite network manager, storing the positioning information of each page element on the network manager into a configuration file of a Java item, wherein each page element comprises configuration items of added equipment, such as equipment names, SN, IP addresses, equipment types and the like, satellites, repeaters, frequency bands, carriers and the like;
storing information of various devices on a network manager into a configuration file, wherein the information of the devices comprises: a device name value, an SN number value, an IP address value, a data value of a device attribute, and the like;
the program is realized: analyzing and processing codes of positioning information of each page in the configuration file and information of various devices on the network manager by utilizing Java, webdriver and Selenium, layering programs, including: baseDriver, page, handle, business, test.
Further, the format of the positioning information is a positioning mode > specific value.
Further, the step of layering the program includes the steps of:
BaseDriver: the method comprises the steps of obtaining Driver drivers of different browsers, creating a driving object, and packaging a basic operation method;
page layer: inheriting the BaseDriver, reading the positioning information of each page element in the configuration file, and realizing the positioning of each interface element;
handle layer: introducing a Page layer object, operating the positioned information of the Page layer, and realizing the operation of elements of the whole network Page;
bussiness layer: introducing a handle layer object, operating a method for packaging in the handle layer, realizing adding, deleting and modifying the object, and acquiring input data sources from a configuration file;
test layer: the addition, deletion and modification in the serial business layer automatically builds the networking environment, such as adding satellite resources, network controllers, subnets, equipment and building chain allocation resources in sequence, so that the networking environment can be built.
Further, the basic operation method of the package includes: opening or closing a browser, switching windows, and finding element positions.
Further, the information that the Page layer has located includes the input of the input box, the clicking of the button.
Further, the step of layering the program further comprises: the configuration parameters call the Test layer method, and the equipment can be automatically on line and allocate resources after the deployment environment is completed.
An automatic networking environment setting up device based on a TDMA satellite network manager, comprising:
the configuration module is used for storing the positioning information of each page element on the network manager into a configuration file of a Java item and storing the information of various devices on the network manager into the configuration file;
the analysis processing module is configured to analyze and process code on positioning information of each page in the configuration file and information of various devices on the network manager by using Java, webdriver and Selenium, and layer the program, and includes: baseDriver, page, handle, business, test.
A computer readable storage medium having stored thereon a computer program which, when executed by a processor, controls a device in which the storage medium is located to perform the TDMA satellite network management based automatic networking environment method as described above.
An electronic device, comprising: at least one processor and memory; the memory stores computer-executable instructions, wherein the computer-executable instructions stored in the memory are executed by the at least one processor, so that the at least one processor executes the automatic networking environment setting-up method based on the TDMA satellite network management as described above.
The invention has the beneficial effects that:
in the TDMA satellite network management, compared with the manual configuration networking environment, the method has the advantages that the networking environment is planned in advance, the installation, deployment and automatic networking environment establishment are integrated, so that maintenance cost can be reduced.
Description of the embodiments
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the following detailed description of the embodiments of the present invention will be given with reference to the accompanying drawings, but the described embodiments of the present invention are some, but not all embodiments of the present invention.
In one aspect of the embodiments of the present application, a method for automatically setting up a networking environment based on TDMA satellite network management is provided, as shown in fig. 1, including the steps of:
s01, responding to the input of a user interface of a satellite network manager, storing the positioning information of each page element on the network manager into a configuration file of a Java item, wherein each page element comprises added equipment, attributes related to equipment names, SN, IP addresses, equipment types and the like, configuration items of satellites, transponders, frequency bands, carriers and the like,
examples:
# login
username=name>login_name
password=name>login_password
loginButton=name>login_submit;
S02, saving information of various devices on the network manager into a configuration file, wherein the information of the devices comprises: a device name value, an SN number value, an IP address value, a data value of a device attribute, etc.,
examples:
username =admin
Password =888888
satellite with the same number
satName= China6ASat
satLongitude=125;
S03, program implementation: analyzing and processing codes of positioning information of each page in the configuration file and information of various devices on the network manager by utilizing Java, webdriver and Selenium, layering programs, including: baseDriver, page, handle, business, test.
Specifically, the format of the positioning information is a positioning manner > specific value.
Specifically, as shown in fig. 2, the step of layering the program includes the steps of:
s301, baseDriver: the method comprises the steps of obtaining Driver drivers of different browsers, creating a driving object, and packaging a basic operation method;
s302, page layer: inheriting the BaseDriver, mainly reading the positioning information of each page element in the configuration file, realizing the positioning of each interface element as shown in the example of the step S02,
examples:
/**
* Input box for obtaining user name
* */
public webElement getuserElement(){
return element(GetBylocator . getlocator( key:”username”));
};
S303, handle layer: introducing the Page layer object, mainly operating the information positioned by the Page layer, realizing the operation of the elements of the whole network Page,
examples:
/**
* Input box for obtaining user name
* */
public void sendkeysUser(String username){
lp . sendkeys(lp . getUserElement( ),username);
};
S304, business layer: introducing a handle layer object, mainly operating a method of encapsulation in the handle layer, realizing addition, deletion and modification of the object, acquiring input data sources from configuration files, such as adding equipment in step S01, relating to equipment names, SN, IP addresses, equipment types and other attributes, satellite, transponder, frequency band, carrier wave and other configuration items,
examples:
public void login(){
String username = value .getValueByPro( key:”username”);
String password = value .getValueByPro( key:”password”);
If(lph . assertLoginPage( ) ){
lph . sendkeysUser(username);
lph . sendkeysPassword(paassword);
Lph . clickLoginButton();
}else{
system, out println ("page not present or status incorrect");
}
sleep(num:1000);
s305, test layer: the network environment can be built automatically by adding, deleting and modifying the network layer, such as adding, deleting and modifying the equipment, the subnet, the satellite and other modules, for example, satellite resources, network controllers, subnets, equipment and building chains are added in sequence to allocate resources, so that the network environment can be built;
s06, the configuration parameters call a Test layer method, and after the deployment environment is completed, the equipment is automatically on line and allocates resources.
Specifically, the basic operation method of the package includes: open or close a browser, switch windows, find element locations, etc.
Specifically, the information that the Page layer has located includes input of an input box, clicking of a button, and the like.
As shown in fig. 3, in one aspect of this embodiment, an automatic networking environment setting device based on TDMA satellite network management is provided, including:
the configuration module is used for storing the positioning information of each page element on the network manager into a configuration file of a Java item and storing the information of various devices on the network manager into the configuration file;
the analysis processing module is configured to analyze and process code on positioning information of each page in the configuration file and information of various devices on the network manager by using Java, webdriver and Selenium, and layer the program, and includes:
BaseDriver: the method comprises the steps of obtaining Driver drivers of different browsers, creating a driving object, and packaging basic operation methods such as opening or closing the browser, switching windows, finding element positions and the like;
page layer: inheriting the BaseDriver, and reading the positioning information of each page element in the configuration file;
handle layer: the Page layer object is introduced, and the information positioned by the Page layer is mainly operated, such as the input of an input box, the clicking of a button and the like, so that the operation of elements of the whole web Page is realized;
bussiness layer: introducing a handle layer object, operating a method for packaging in the handle layer, realizing adding, deleting and modifying the object, and acquiring input data sources from a configuration file;
test layer: the addition, deletion and modification in the serial business layer automatically builds the networking environment, such as adding satellite resources, network controllers, subnets, equipment and building chain allocation resources in sequence, so that the networking environment can be built.
In yet another aspect of the embodiments of the present application, a computer readable storage medium is provided, on which a computer program is stored, which when executed by a processor controls a device in which the storage medium is located to execute the method for automatically setting up a networking environment based on TDMA satellite network management as described above.
In yet another aspect of the embodiments of the present application, there is provided an electronic device, including: at least one processor and memory; the memory stores computer-executable instructions, wherein the computer-executable instructions stored in the memory are executed by the at least one processor, so that the at least one processor executes the automatic networking environment setting-up method based on the TDMA satellite network management as described above.
In the TDMA satellite network management, on the premise of large-scale equipment networking, manual networking configuration is changed into automatic networking environment establishment according to configuration files, so that networking efficiency can be improved, and error occurrence probability can be reduced.
The foregoing is merely a preferred embodiment of the present invention and is not meant to be the only or limiting of the present invention. It will be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof without departing from the scope of the invention.