Disclosure of Invention
The embodiment of the application provides a method and a device for generating configuration commands of a switch, which are used for solving the problem that a server cannot be connected to the switch in an automatic mode due to different configuration commands of different switches.
In a first aspect, the present application provides a method for generating a configuration command of a switch, which may be executed by a computing device, which may be understood as a memory, a processor, etc. for processing the method for generating a configuration command of a switch of the present application, the present application is not particularly limited herein, and the method is executed as follows:
Acquiring a configuration requirement table, wherein the configuration requirement table comprises position parameters and configuration parameters of a first server; screening a first switch list in the preset configuration library, which is positioned in the same network area as the first server, according to the position parameters; screening a first switch which is matched with the first server function and has the nearest distance in a first switch list according to the configuration parameters and the position parameters; if a first interface meeting the configuration parameters exists in the first switch, generating a first configuration command according to the first interface; the first configuration command is used for indicating the first switch to open a first interface for the connection of the first server; a first configuration command is sent to a first switch.
In the scheme, after the configuration requirement table is obtained, the switch list in the configuration library, which is located in the same network area as the first server, is screened according to the unknown parameters, so that the matching degree of the switch and the server is better ensured, and the management is also more convenient. Further, according to the configuration parameters and unknown parameters, the first switch which is matched with the first server function and is closest to the first server function in the switch list is determined, in this way, network requirements required by the servers are firstly judged, switches meeting the network requirements are screened, and then the switch closest to the first server is selected from the switches. Finally, judging whether a first interface meeting the requirement of a first server exists in the first switch, if so, connecting the first server to the switch through the first interface, and in this way, the application realizes the automation of network wiring, meets the networking requirements between a plurality of different servers and a plurality of different switches through a preset configuration library, can better ensure the networking requirements of the servers, and realizes the automation networking.
In one possible implementation manner, the preset configuration library collects first information of a plurality of switches according to a first station; wherein the first information includes at least one of a name of the switch, a region to which the switch belongs, a physical address, a function type, and a service state; the preset configuration library collects second information of various switches according to a second platform; wherein the second information includes at least one of an interface type, an interface description, and an interface status of the switch.
By the method, various switch information of a plurality of platforms is collected in the preset configuration library, information collection of various switches with different brands is realized, various networking requirements can be met, and automatic generation of switch configuration commands of a hybrid network environment is ensured.
In one possible implementation, the configuration requirement table is acquired through a third platform; the location parameters include the physical address and the area to which the server belongs; the configuration parameters include at least one of an interface type of the server, a network rate.
In this way, the application collects various server information through the third platform, realizes information collection of various servers, can support various networking requirements, and ensures automatic generation of switch configuration commands of the hybrid network environment.
In one possible implementation manner, filtering a first switch list in the first switch list and located in the same network area as the first server according to the location parameter includes: acquiring the area of the first server according to the position parameter; and screening a first switch list which belongs to the same area as the first server in a preset configuration library.
In this way, the application realizes the switch matching the same network area for the server, better ensures the matching degree of the switch and the server, and is more convenient for management.
In one possible implementation, screening the first switch matched with the first server function and closest to the first server function in the first switch list according to the configuration parameter and the location parameter includes: obtaining the interface type and the network rate of the first server according to the configuration parameters; screening a second switch list which meets the interface type and network rate requirements of the first server in the first switch list; obtaining a physical address of a first server according to the position parameter; the second switch list is screened for switches whose physical addresses are closest to the physical address of the first server.
In this way, the application realizes the automation of network wiring, meets the networking requirements between a plurality of different servers and a plurality of different switches through the preset configuration library, can better ensure the networking requirements of the servers, and realizes the automation networking.
In one possible implementation, the first platform is a configuration management database platform; the second platform is an automatic operation and maintenance platform; the third platform is a work order platform.
By means of the method, a plurality of systems and platforms are integrated efficiently, seamless circulation and automatic processing of data are achieved, manual intervention is reduced, and error rate is reduced.
In a second aspect, an embodiment of the present application provides a configuration command generating device of a switch, including: the device comprises an acquisition module, a processing module and a sending module;
the system comprises an acquisition module, a configuration request table and a storage module, wherein the acquisition module is used for acquiring the configuration request table, and the configuration request table comprises position parameters and configuration parameters of a first server; the processing module is used for screening a first switch list which is positioned in the same network area as the first server in the preset configuration library according to the position parameters; screening a first switch which is matched with the first server function and has the nearest distance in a first switch list according to the configuration parameters and the position parameters; if a first interface meeting the configuration parameters exists in the first switch, generating a first configuration command according to the first interface; the first configuration command is used for indicating the first switch to open a first interface for the connection of the first server; and the sending module is used for sending the first configuration command to the first switch.
In a possible implementation manner, the processing module is further configured to: acquiring the area of the first server according to the position parameter; and screening a first switch list which belongs to the same area as the first server in a preset configuration library.
In a third aspect, the present application also provides a computing device comprising: a memory for storing program instructions; and a processor for calling program instructions stored in the memory and executing any method implementing the first aspect according to the obtained program instructions.
In a fourth aspect, the present application also provides a computer readable storage medium having stored therein computer readable instructions which, when read and executed by a computer, implement any of the methods of the first aspect described above.
In a fifth aspect, the present application provides a computer program product comprising a computer program executable by a computer device to cause the computer device to perform any of the methods of the first aspect described above when the program is run on the computer device.
The technical effects achieved by the second to fifth aspects are described with reference to the technical effects achieved by the corresponding possible design schemes in the first aspect, and the description of the present application is not repeated here.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
In the following embodiments of the present application, "and/or" describing the association relationship of the association object indicates that three relationships may exist, for example, a and/or B may indicate: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The character "may be a relationship that generally indicates that the front and rear associated objects are an" or ". "under at least one item(s) or the like, refers to any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural. The singular expressions "a", "an", "the" and "the" are intended to include, for example, also "one or more" such expressions, unless the context clearly indicates to the contrary. And, unless specified to the contrary, references to "first," "second," etc. ordinal words of embodiments of the present application are used for distinguishing between multiple objects and are not used for limiting the order, timing, priority, or importance of the multiple objects.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
Currently, to implement data connections and network configurations, it is often necessary to connect servers into corresponding switches. Different servers typically have different wiring requirements, and correspondingly, different switches also have multiple interfaces that provide different network functions. In making a connection of a server to a switch, consideration is typically given to the requirements of the server, the type of switch, and the distance between the two. Because the types of the servers are numerous and the demands are different, a certain difficulty is increased for searching the corresponding switch; meanwhile, because the types of the switches are numerous, and the configuration commands of each switch are different, the corresponding switch cannot be automatically matched for a server in a hybrid network environment in an automatic mode, network wiring is performed, the pressure and the complexity of manual wiring are increased due to the increase of wiring requirements, inconvenience is brought to the generation of the configuration commands, and the difficulty of network wiring in a large-scale network environment is increased.
Networking in the prior art relies on automation tools such as an automation operation and maintenance platform (Ansible) to manage and configure network devices, but this approach may lack flexibility and adaptability in handling specific, complex network routing requirements, especially in multi-brand, multi-model device environments, often requiring manual intervention to handle complex configuration and specific scenario requirements. Or the prior art may also employ a rules engine to generate network configurations, this approach is still limited in handling specific routing requirements in a multi-brand hybrid network environment, while the basic automated configuration functionality provided by some network management systems is typically limited to a given vendor or device, and these automated networking approaches can only be configured for a single network environment, lacking the necessary flexibility and adaptability in handling complex, diverse network requirements, especially in multi-brand and large-scale network environments.
Based on this, fig. 1 exemplarily shows a system architecture diagram of an embodiment of the present application, which is used to implement a method for generating a configuration command of an exchange provided by the present application, as shown in fig. 1, a configuration library is set, after receiving a request for connecting an exchange with a server 1, a location parameter and a configuration parameter of the server 1 are obtained, a corresponding exchange 1 and an interface corresponding to the exchange 1 are searched in the configuration library according to the location parameter and the configuration parameter, a configuration command is generated according to a configuration command template of the exchange 1, and the corresponding configuration command is issued to the corresponding server 1, so that corresponding connection between the server and the exchange is implemented; by setting the configuration library, the application realizes unified management of different switch information in the mixed network environment, avoids the problem that different connection requirements of different servers cannot be met in the wiring process, realizes automation for issuing the switch configuration command, and can more efficiently carry out networking.
The preferred embodiments of the present invention will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are for illustration and explanation only, and not for limitation of the present invention, and embodiments of the present invention and features of the embodiments may be combined with each other without conflict. Based on the system architecture diagram shown in fig. 1, fig. 2 schematically shows a flow chart provided by an embodiment of the present invention, and as shown in fig. 2, a flow of the method may include:
In step 201, the computing device obtains a location parameter and a configuration parameter of a configuration requirement table where a first server is located.
The configuration requirement table comprises network configuration information required by the first server during networking, such as interface type, network rate, equipment information, network area and the like; the location parameter includes a physical address of the first server and a network area where the first server is located; the configuration parameters include the type of interface, network rate and device information required by the first server.
Specifically, the location parameter is used for determining a switch which is in the same network area as the first server and is closest to the first server; the configuration parameters are used for determining a switch which can meet the wiring requirement required by the first server and an interface corresponding to the switch.
By determining the exchanger which is in the same network area with the first server, the superiority of network performance can be ensured, and the unified management of the same network area in the later period can be facilitated, so that the networking pressure and the follow-up management pressure are reduced; through determining the switch meeting the wiring requirement of the first server and the interface corresponding to the switch, the switch is ensured to provide better service for the server, so that the automatic wiring process is more intelligent; by determining the switch closest to the first server, the network performance may be better guaranteed.
In an optional implementation manner, the configuration requirement table is acquired through a work order platform, and the information in the configuration requirement table further comprises a server number, a functional area to which the server belongs, the number of network cables required by the server, a server application address type, whether the server is in a production environment, an interface bandwidth type, a server name, a physical address of the server, a cabinet where the server is located, an installation height of the server in the cabinet and the like. It should be noted that the content of the configuration requirement table is only a few examples, and other contents may be included in the configuration requirement table, which is not limited in the embodiment of the present invention.
For example, a configuration requirement table of a certain server is obtained through a work order platform, and the obtained result is as follows, so that it can be known that the network area to which the server belongs is an outer high bridge peripheral access area, the address type is NAS connection address, the address function is a peripheral production storage function, the physical address network segment is 10.00.00.0/24, the application environment is a production environment, the number of network lines is 4, the network is an aggregation type, and the network bandwidth is ten megabandwidths. Then, through the information, the position parameters of the server can be obtained, wherein the network area to which the server belongs is an outer high-bridge peripheral access area, and the physical address network segment is 10.00.00.0/24; the configuration parameters of the server are NAS connection addresses, the address function is a peripheral production storage function, the application environment is a production environment, the number of network cables is 4, the network cables are aggregation types, and the network bandwidth is tera bandwidth. It should be noted that the foregoing is merely an example of the content of the configuration requirement table, and other content may exist in the configuration requirement table, and may be presented in other manners, which is not limited by the present application.
Step 202, the computing device screens a first switch list in a preset configuration library, which is located in the same network area as the first server, according to the location parameter.
Specifically, after the position parameters in the configuration requirement table are acquired, screening a switch list which is in the same network area as the first server from a preset configuration library according to the network area of the first server to be a first switch list; then, determining switches with equipment information matched with the equipment information of the first server and consistent with the functional areas of the first server according to the configuration parameters in the configuration requirement table, determining the number of selected switches according to the number of network lines, judging the interfaces corresponding to the switches according to the types of interfaces required by the first server and the network rate, and screening a second switch list meeting the requirements in the first switch list; and finally, determining the switch closest to the position of the first server in the second switch list according to the physical address of the first server.
In an alternative embodiment, a preset configuration library collects first information of a plurality of switches according to a first platform; wherein the first information includes at least one of a name of the switch, an area to which the switch belongs, a physical address, a function type, and a service status.
In an alternative embodiment, the first platform is a configuration management database platform (Configuration Management Database, CMDB), and the CMDB collects basic information of the switch, including a switch name, a switch function type, a switch physical address, a switch service state, a switch logical area, a switch device brand, a machine room model, a switch number, a device model type, an operating system version, a function area name, and the like. The function types of the switch are out-of-band, core, production access, internet link access, heartbeat screenshot and other function types; the service state is also called life cycle, and is used for judging what state the switch is in, and the state can be divided into in-service, non-commissioned and off-line states; the logical area refers to the application area of the switch, including production, testing, office, quasi-production, etc.
In this way, the application collects different information of various different exchanges by means of the CMDB platform and stores the information, so that the exchange which the server needs to be connected to can be rapidly and accurately determined in the matching process, the feasibility of the scheme in the mixed network environment is ensured, and the accuracy of matching the corresponding exchange in wiring is also improved.
In step 203, the computing device screens, according to the configuration parameter and the location parameter, the first switch in the first switch list that matches the first server function and is closest to the first server function.
Specifically, after the first switch list is determined, the interface type and the network rate of the first server are obtained according to the configuration parameters, and a second switch list meeting the interface type and the network rate requirements of the first server is screened from the first switch list.
In an alternative embodiment, after the first switch list is determined, a switch consistent with the functional area of the first server needs to be screened from the first switch list.
In an alternative embodiment, the preset configuration library collects second information of the plurality of switches according to the second platform; wherein the second information includes at least one of an interface type, an interface description, and an interface status of the switch.
In an alternative embodiment, the second platform may be an automated operation and maintenance platform (Ansible), and the Ansible platform may collect information such as device address, device number, interface name, interface description, enabling state, physical state, protocol state, virtual local area network (Virtual Local Area Network, VLAN) information, brand type, network speed, etc. according to brands and systems of different switch devices, and divide the information and add the information into a preset configuration library.
For example, a certain switch a with a brand of westco is collected through a Ansible platform, and the model of the switch a is C3750E Software (C3750E-UNIVERSALK-M), the system version is 15.0 (2) SE6, the command format of the switch a viewing interface is "show IP INTERFACE brief", and the command format of the switch a viewing VLAN information is "show VLAN"; another exchanger B with brand name of Huashi is collected through Ansible platform, the model number of the exchanger B is HUAWEI CE6881-48S6CQ, the system version is 8.191, the command format of the checking interface of the exchanger B is DISPLAY INTERFACE brief, and the command format of the checking VLAN information of the exchanger B is dis VLAN surmmary. It can be found that different configuration command formats of different brands of switches are not the same, so that information and configuration commands of a plurality of different brands of switches can be collected through the Ansible platform, automatic networking can be better performed, and the automatic networking range is more comprehensive. It should be noted that the various information of the switch described above is only an example, and other information may be included, and the information may be presented through other contents, which is not limited by the present application.
Further, after the second switch list is determined, the physical address of the first server is obtained according to the position parameter, and the switch closest to the physical address of the first server in the second switch list is screened.
Specifically, the switch closest to the first server and capable of meeting the networking requirement of the first server is comprehensively judged through the physical address of the first server and the physical address of each switch in the second switch list.
In one possible implementation, when judging the switch with the closest physical address, it needs to judge whether the state of the switch is loaded, if the state of the switch is the loaded state, it is unable to continue accessing the new server, so it needs to screen the switch with the state of no load for connection.
Step 204, if there is a first interface in the first switch that satisfies the configuration parameters, generating a first configuration command according to the first interface.
The first configuration command is used for indicating the first switch to open a first interface for the connection of the first server;
specifically, the interface type of the first server to be accessed and the network rate of the first server are judged according to the configuration parameters, and the interface adapting to the first server in the corresponding switch is screened according to the interface type, the interface description and the interface state of the switch acquired by the second platform.
Further, if the network rate of the first server is lower than the interface network rate of the switch, the first server may access the interface; if the network rate of the first server is higher than the interface network rate of the switch, the first server may not access the interface.
For example, the interface type of a certain switch is "10GE", the interface is described as "10GE electrical interface works in data link layer, process two-layer protocol, implement two-layer fast forwarding, the maximum rate supported by 10GE electrical interface is 10000Mbit/s", the interface state is available, then at this time, if the interface type required to be accessed by the first server is "10GE", and the network rate requirement in the first server is 9000Mbit/s, since the interface can meet the network rate requirement of the first server at this time, the first server is allowed to access the switch through the interface; if the type of interface required by the first server is "10GE", and the network rate of the first server is 10001Mbit/s, the first server is not allowed to access the switch through the interface at this time because the network rate requirement of the first server is greater than the maximum network rate that can be provided by the switch. It should be noted that the interface states described above are only one example, and other interfaces and other implementations are possible, as the application is not limited in this regard.
Furthermore, the computing device performs digital mapping on interfaces with different network rates, and in this way, corresponding selection can be made through the digital mapping result when the server proposes the interface requirements with different network rates, so that the interface matching process is more portable and faster.
In this way, when the screened switch has an interface meeting the requirement of the first server, a first configuration command is generated to inform the switch to open a corresponding interface to the first server, so that a worker accesses the first server to the corresponding interface, and connection between the first server and the switch is realized.
In step 205, the computing device sends a first configuration command to a first switch.
In a possible implementation manner, after the corresponding configuration command is obtained, the embodiment of the application generates the issuing file for the configuration command through the automation platform, and the automation platform issues the configuration command file to the corresponding switch at regular time, so that the automatic issuing of the configuration command is realized. In this way, the embodiment of the application realizes the automatic management and issuing of the configuration command.
In an optional manner, the embodiment of the application can also perform unified management and multidimensional analysis on the switch configuration in the configuration library through an automation platform; meanwhile, the switch information in the configuration library can be updated through the first platform and the second platform in each cycle, so that the switch information integrity in the configuration library is ensured, the automatic generation of the configuration command of the switch is facilitated, the convenience of configuration management is realized, and the pressure of configuration management is reduced.
By means of the method, the device and the system for the configuration command generation, under the condition that the mixed brand server and the switch are connected and networked, the configuration command is rapidly generated. Through the preset configuration library, the embodiment of the application realizes the unified management and the timing update of the information of the server and the switch respectively, so as to realize the rapid generation of the corresponding configuration command for the server to access the switch. And moreover, according to switches of different brands and models, a predefined template is used for generating a configuration command, so that the accuracy and compatibility of the command are ensured.
In implementation, the generation of the configuration command of the switch may be performed according to a flow shown in fig. 3, where the flow shown in fig. 3 is based on a specific embodiment of the flow diagram shown in fig. 2, and the implementation flow shown in fig. 3 includes the following steps:
in step 301, the computing device periodically performs data collection of the switch.
Specifically, the computing device periodically collects interface information from different brands of switches via the first platform CMDB and the second platform Ansible, and stores new information and updates into the preset configuration library.
In this way, the application provides a platform for the hybrid network to match the server and the switch, and the information of the switch and the state update information of the interface can be updated timely by updating the data in the platform at regular time, thereby ensuring the accuracy of the switch configuration process.
In step 302, the computing device obtains a configuration requirement table and analyzes the contents of the configuration requirement table.
Specifically, the computing device receives wiring demands from other departments, collects various information of the corresponding servers through the third platform work order platform, analyzes the information, and determines required network resources such as interface types, network rates, server areas, switches closest to the network resources and the like.
In step 303, the computing device screens the switches that are in the same area as the first server for a first switch list.
Specifically, the computing device judges the network area described by the first server, and screens a first switch list of the area through a preset configuration library. In this way, the network wiring length is reduced and the required performance of the network is ensured to be good.
In step 304, the computing device screens a first switch that matches the first server function and is closest to the first server function.
Specifically, after the first switch list is determined, the interface type and the network rate of the first server are obtained according to the configuration parameters, and a second switch list meeting the interface type and the network rate requirements of the first server is screened from the first switch list.
In an alternative embodiment, after the first switch list is determined, a switch consistent with the functional area of the first server needs to be screened from the first switch list.
In an alternative embodiment, the preset configuration library collects second information of the plurality of switches according to the second platform; wherein the second information includes at least one of an interface type, an interface description, and an interface status of the switch.
In an alternative embodiment, the second platform may be an automated operation and maintenance platform (Ansible), and the Ansible platform may collect information such as device address, device number, interface name, interface description, enabling state, physical state, protocol state, virtual local area network (Virtual Local Area Network, VLAN) information, brand type, network speed, etc. according to brands and systems of different switch devices, and divide the information and add the information into a preset configuration library.
Further, after the second switch list is determined, the physical address of the first server is obtained according to the position parameter, and the switch closest to the physical address of the first server in the second switch list is screened.
Specifically, the switch closest to the first server and capable of meeting the networking requirement of the first server is comprehensively judged through the physical address of the first server and the physical address of each switch in the second switch list.
In one possible implementation, when judging the switch with the closest physical address, it needs to judge whether the state of the switch is loaded, if the state of the switch is the loaded state, it is unable to continue accessing the new server, so it needs to screen the switch with the state of no load for connection.
In step 305, the computing device determines an interface in the first switch adapted to the first server according to the configuration parameters, and generates a first configuration command.
Specifically, the interface type of the first server to be accessed and the network rate of the first server are judged according to the configuration parameters, and the interface adapting to the first server in the corresponding switch is screened according to the interface type, the interface description and the interface state of the switch acquired by the second platform.
Further, if the network rate of the first server is lower than the interface network rate of the switch, the first server may access the interface; if the network rate of the first server is higher than the interface network rate of the switch, the first server may not access the interface.
For example, the generated configuration commands are not identical according to different interfaces of different servers and different switches. For example, a switch in the family of western, manages access configuration commands as follows:
“interface GigabitEthernet1/0/7
description ServerManLink-PCS xxxx
switchport access vlan xxxx
switchport mode access
spanning-tree portfast
no shutdown
quit”
And correspondingly, it produces the access configuration commands as follows:
“interface GigabitEthernet1/0/9
description ServerProLink-PCS xxxx
switchport access vlan xxxx
switchport mode access
spanning-tree portfast
no shutdown
quit”
however, if the switch is an H3C switch, then the management access configuration command is now
“interface GigabitEthernet1/0/2
port link-mode bridge
description ServerManLink-SVR xxxx
port access vlan xxxx
stp edged-port
no shutdown
quit”
And correspondingly, it produces the access configuration commands as follows:
“interface GigabitEthernet1/0/18
description ServerManLink-PCS xxxx
port link-type access
port access vlan xxxx
stp edged-port
undo shutdown
quit”
The application can realize the high-efficiency integration of a plurality of management systems and platforms, improve the efficiency and accuracy of data processing, reduce the need of manual configuration and optimize the wiring flow.
It should be noted that, in the above examples related to the configuration command, "xxxx" is used to refer to different numbers and group names, and different positive integer values are taken in different configuration commands, where the configuration command is just an example, and the present application is not limited to this.
Step 306, a first configuration command is sent to the first switch.
Specifically, the switch opens a corresponding interface to the server according to the first configuration command so as to facilitate the access of the server, realize the automatic wiring design of the server, improve the rate of the server accessing the switch and the switch generating the corresponding configuration command.
In an optional mode, when a plurality of network interfaces with different service types and different functions exist in the same server, the application can also realize the function of accessing interfaces with different service types and different functions into different switches, judge different requirements of different interfaces according to the data of the work order platform, and access the different requirements into different switches, thereby realizing the adaptability to the specific requirements of complex scenes.
Based on the same technical concept, fig. 4 illustrates an exemplary configuration command generating apparatus for a switch according to an embodiment of the present application, which may perform a flow of a configuration command generating method for a switch. The device comprises: an acquisition module 401, a processing module 402 and a sending module 403.
The obtaining module 401 is configured to obtain a configuration requirement table, where the configuration requirement table includes a location parameter and a configuration parameter of the first server; a processing module 402, configured to screen a first switch list in the preset configuration library, which is located in the same network area as the first server, according to the location parameter; screening a first switch which is matched with the first server function and has the nearest distance in a first switch list according to the configuration parameters and the position parameters; if a first interface meeting the configuration parameters exists in the first switch, generating a first configuration command according to the first interface; the first configuration command is used for indicating the first switch to open a first interface for the connection of the first server; a sending module 403, configured to send the first configuration command to the first switch.
In one possible implementation, the processing module 402 is further configured to: acquiring the area of the first server according to the position parameter; and screening a first switch list which belongs to the same area as the first server in a preset configuration library.
Having described a configuration command generating apparatus of a switch in an exemplary embodiment of the present application, next, a computing device of another exemplary embodiment of the present application is described.
Those skilled in the art will appreciate that the various aspects of the application may be implemented as a system, method, or program product. Accordingly, aspects of the application may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
In some possible implementations, a computing device according to the application may include at least one processor, and at least one memory. Wherein the memory stores a computer program which, when executed by the processor, causes the processor to perform the steps in the configuration command generation method of the switch according to various exemplary embodiments of the present application described in the present specification.
A computing device 130 according to such an embodiment of the application is described below with reference to fig. 5. The computing device 130 shown in fig. 5 is merely an example and should not be taken as limiting the functionality and scope of use of embodiments of the present application. As shown in fig. 5, the computing device 130 is in the form of a general purpose smart terminal (or bluetooth headset). Components of computing device 130 may include, but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 connecting the various system components, including the memory 132 and the processor 131.
Bus 133 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, and a local bus using any of a variety of bus architectures. Memory 132 may include readable media in the form of volatile memory such as Random Access Memory (RAM) 1321 and/or cache memory 1322, and may further include Read Only Memory (ROM) 1323. Memory 132 may also include a program/utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Computing device 130 may also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), and/or with any device (e.g., router, modem, etc.) that enables computing device 130 to communicate with one or more other intelligent terminals. Such communication may occur through an input/output (I/O) interface 135. Moreover, computing device 130 may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through network adapter 136. As shown, network adapter 136 communicates with other modules for computing device 130 over bus 133. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in connection with computing device 130, including, but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
In some possible embodiments, aspects of the method for generating a configuration command of a switch provided by the present application may also be implemented in the form of a program product, which includes a computer program for causing a computer device to perform the steps in the method for generating a configuration command of a switch according to the various exemplary embodiments of the present application described in the present specification when the program product is run on the computer device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product for time domain noise processing of embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and comprise a computer program and may run on a smart terminal. The program product of the present application is not limited thereto, but in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave in which a readable computer program is embodied. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such a division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the elements described above may be embodied in one element in accordance with embodiments of the present application. Conversely, the features and functions of one unit described above may be further divided into a plurality of units to be embodied.
Furthermore, although the operations of the methods of the present application are depicted in the drawings in a particular order, this is not required or suggested that these operations must be performed in this particular order or that all of the illustrated operations must be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable access frequency prediction apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable access frequency prediction apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable access frequency prediction apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.