CN113746906A - Method and system for automatically generating topological graph - Google Patents
Method and system for automatically generating topological graph Download PDFInfo
- Publication number
- CN113746906A CN113746906A CN202110932727.3A CN202110932727A CN113746906A CN 113746906 A CN113746906 A CN 113746906A CN 202110932727 A CN202110932727 A CN 202110932727A CN 113746906 A CN113746906 A CN 113746906A
- Authority
- CN
- China
- Prior art keywords
- storage device
- port
- object instance
- server
- device node
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 208000018747 cerebellar ataxia with neuropathy and bilateral vestibular areflexia syndrome Diseases 0.000 claims description 5
- 230000008569 process Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 241000270666 Testudines Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000004744 fabric Substances 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/12—Discovery or management of network topologies
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/50—Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a method and a system for automatically generating a topological graph, wherein the method comprises the following steps: creating a server object instance, an FC port object instance of a server, a cluster object instance, a storage device node object instance and an FC port object instance of a storage device node; adding the FC port object instance of the server into the corresponding server object instance, adding the storage device node object instance into the corresponding cluster object instance, and adding the FC port object instance of the storage device node into the corresponding storage device node object instance; acquiring the connection relation between an FC port of a storage device node and an FC port of a server; the number of FC ports of the server, the number of storage device nodes, the number of FC ports of the storage device nodes and the size of the canvas are obtained, and a topological graph is generated based on the obtained information. According to the scheme of the invention, the object instance is constructed, the drawing coordinates and the size are calculated, the automatic generation of the topological graph is realized, the method is simple and convenient, and the working efficiency is improved.
Description
Technical Field
The invention relates to the technical field of storage networks, in particular to a method and a system for automatically generating a topological graph.
Background
In a Storage device development stage in an SAN (Storage Area Network), it is often necessary to set up an environment, debug a device, and locate a problem found by a test, and in these processes, a connection topology between a server and a Storage, and information such as a WWPN corresponding to an FC port of the server and the Storage device are generally determined first. The current common practice in the industry is to log in a server through SSH, check and record all FC port information on the server, and then log in a storage device through SSH, check all FC port information on the storage device, and fabric (network connection relationship) information. And finally, searching the connection topological relation between the FC port of the server and the FC port through information comparison. Every time an environment is built or colleagues are researched and developed to test the problems in the environment of the colleagues, a lot of workload can be wasted on checking information of a server and a storage device and drawing a topological graph.
Disclosure of Invention
In view of this, the invention provides a method and a system for automatically generating a topological graph, which construct an object instance and calculate drawing coordinates and sizes based on return information obtained by sending query information to a server and a storage device through an SSH, so that the automatic generation of the topological graph is realized, the method and the system are simple and convenient, and the working efficiency is improved.
Based on the above object, an aspect of the embodiments of the present invention provides a method for automatically generating a topological graph, which specifically includes the following steps:
creating a server class, an FC port class of the server, a cluster management class, a storage device node management class and an FC port class of a storage device node, and correspondingly creating a server object instance, an FC port object instance of the server, a cluster object instance, a storage device node object instance and an FC port object instance of the storage device node under each created class respectively;
adding the FC port object instance of the server into the corresponding server object instance, adding the storage device node object instance into the corresponding cluster object instance, and adding the FC port object instance of the storage device node into the corresponding storage device node object instance;
acquiring the connection relation between the FC port of the storage device node and the FC port of the server, and updating an FC port object instance in the server object instance and an FC port object instance in the node management module object instance based on the connection relation;
the method comprises the steps of obtaining the number of FC ports of a server, the number of storage device nodes of a storage device cluster, the number of FC ports in the storage device nodes and the size of canvas, and generating a topological graph based on obtained information.
In some embodiments, generating a topology map based on the obtained information comprises:
calculating respective canvas position coordinates and respective dimensions based on the number of servers, the number of FC ports of the servers, the number of storage device clusters, the number of storage device nodes of the storage device clusters, the number of FC ports in the storage device nodes, and the canvas dimensions;
and calling a drawing library to draw the topological graph based on the position coordinates and the sizes of the respective canvases.
In some embodiments, creating an FC port object instance for a server includes:
sending an FC port information query command to a server through SSH (secure Shell) to acquire all FC port information of the server, and creating an FC port object instance of the server based on the FC port information.
In some embodiments, creating a storage device node object instance comprises:
sending a storage device node information query command to a cluster through SSH (secure Shell) to acquire all storage device node information in the cluster, and creating a storage device node object instance based on the storage device node information.
In some embodiments, creating an FC port object instance for the storage device node comprises:
sending an FC port information query command to the storage device nodes through SSH to acquire FC port information of all the storage device nodes, and creating FC port object instances of the storage device nodes based on the FC port information.
In some embodiments, obtaining the connection relationship between the FC port of the storage device node and the FC port of the server includes:
and sending a network connection relation query command to the storage device node through the SSH so as to acquire the connection relation from the FC port of the storage device node to the FC port of the server.
In some embodiments, updating the FC port object instance in the server object instance and the FC port object instance in the node management module object instance based on the connection relationship includes:
an index is created in each connected FC port object instance to hold the peer FC port information that it meets.
In some embodiments, the FC port information includes a default drawing color;
updating the FC port object instance in the server object instance and the FC port object instance in the node management module object instance based on the connection relationship, comprising:
and updating the default drawing color between the FC port object instances with the connection relation.
In some embodiments, the method further comprises:
a mouse click event is registered so that a logical connection line from the FC port of the server to the FC port of the storage device node is drawn in an animation manner when a mouse click is made.
In another aspect of the embodiments of the present invention, a system for automatically generating a topological graph is further provided, where the system includes:
the system comprises a creating module, a cluster management module and a storage device node management module, wherein the creating module is configured to create a server class, an FC port class of a server, a cluster management class, a storage device node management class and an FC port class of a storage device node, and correspondingly create a server object instance, an FC port object instance of the server, a cluster object instance, a storage device node object instance and an FC port object instance of the storage device node under each created class respectively;
a joining module configured to join the FC port object instance of the server to a corresponding server object instance, join the storage device node object instance to a corresponding cluster object instance, and join the FC port object instance of the storage device node to a corresponding storage device node object instance;
an obtaining module, configured to obtain a connection relationship between an FC port of the storage device node and an FC port of the server, and update an FC port object instance in the server object instance and an FC port object instance in the node management module object instance based on the connection relationship;
the generating module is configured to obtain the number of FC ports of the server, the number of storage device nodes of the storage device cluster, the number of FC ports in the storage device nodes and the size of the canvas, and generate a topological graph based on the obtained information.
In some embodiments, the generation module is further configured to:
calculating respective canvas position coordinates and respective dimensions based on the number of servers, the number of FC ports of the servers, the number of storage device clusters, the number of storage device nodes of the storage device clusters, the number of FC ports in the storage device nodes, and the canvas dimensions;
and calling a drawing library to draw the topological graph based on the position coordinates and the sizes of the respective canvases.
In some embodiments, the creation module is further configured to: sending an FC port information query command to a server through SSH (secure Shell) to acquire all FC port information of the server, and creating an FC port object instance of the server based on the FC port information.
In some embodiments, the creation module is further configured to: sending a storage device node information query command to a cluster through SSH (secure Shell) to acquire all storage device node information in the cluster, and creating a storage device node object instance based on the storage device node information.
In some embodiments the creation module is further configured to: sending an FC port information query command to the storage device nodes through SSH to acquire FC port information of all the storage device nodes, and creating FC port object instances of the storage device nodes based on the FC port information.
In some embodiments, the obtaining module is further configured to: and sending a network connection relation query command to the storage device node through the SSH so as to acquire the connection relation from the FC port of the storage device node to the FC port of the server.
In some embodiments, the obtaining module is further configured to: an index is created in each connected FC port object instance to hold the peer FC port information that it meets.
In some embodiments, the FC port information includes a default drawing color;
the acquisition module is further configured to: and updating the default drawing color between the FC port object instances with the connection relation.
In some embodiments, the system further comprises a registration module configured to register a mouse click event such that upon mouse click, a logical connection line is animated from the FC port of the server to the FC port of the storage device node.
The invention has the following beneficial technical effects: based on the return information obtained by sending the query information to the server and the storage device through SSH, the object instance is constructed and the drawing coordinates and the size are calculated based on the obtained return information, so that the automatic generation of the topological graph is realized, the method is simple and convenient, and the working efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a block diagram of one embodiment of a method for automatically generating a topology graph provided by the present invention;
fig. 2 is a schematic diagram of an embodiment of a system for automatically generating a topology diagram according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
In view of the above, a first aspect of the embodiments of the present invention provides an embodiment of a method for automatically generating a topology map. As shown in fig. 1, it includes the following steps:
step S101, creating a server class, an FC port class of the server, a cluster management class, a storage device node management class and an FC port class of a storage device node, and correspondingly creating a server object instance, an FC port object instance of the server, a cluster object instance, a storage device node object instance and an FC port object instance of the storage device node under each created class respectively;
step S103, adding the FC port object instance of the server to the corresponding server object instance, adding the storage device node object instance to the corresponding cluster object instance, and adding the FC port object instance of the storage device node to the corresponding storage device node object instance;
step S105, obtaining a connection relation from the FC port of the storage device node to the FC port of the server, and updating an FC port object instance in the server object instance and an FC port object instance in the node management module object instance based on the connection relation;
step S107, obtaining the number of FC ports of the server, the number of storage device nodes of the storage device cluster, the number of FC ports in the storage device nodes and the size of the canvas, and generating a topological graph based on the obtained information.
Specifically, the server information may be acquired by, for example, sending a corresponding command to the server through SSH, creating a server class, creating a server object instance in the server class, and adding all server object instances to the server class; acquiring all FC port information of all servers, creating FC port classes of the servers, creating FC port object instances of the servers under the FC port classes of the servers, respectively adding all the FC port object instances to the FC port classes of the corresponding servers, and adding the FC port object instances to the corresponding server object instances.
Acquiring all storage clusters connected with a server, for example, the storage cluster information connected with the server can be acquired by sending corresponding commands to the storage clusters through SSH, creating a cluster management class, creating cluster object instances under the cluster management class, and adding all the cluster object instances to the cluster management class; the storage device node in each storage cluster is acquired, for example, information of the storage device node can be acquired by sending a corresponding command to the storage cluster through SSH, a storage device node management class is created, a storage device node object instance is created in the storage device node class, all the storage device node object instances are added to the corresponding storage device node class, and the storage device node object instance is added to the corresponding cluster object instance.
The method comprises the steps of obtaining FC port information of storage device nodes, creating FC port classes of the storage device nodes, creating FC port object instances of the storage device nodes under the FC port classes of the storage device nodes, adding all the FC port object instances of the storage device nodes to the FC port classes of the corresponding storage device nodes, and adding the FC port object instances of the storage device nodes to the corresponding storage device node object instances.
The method comprises the steps of obtaining the connection relation between an FC port of a storage device node and an FC port of a server, and adding information between two connected FC ports to the corresponding FC ports.
The method comprises the steps of obtaining the number of FC ports of a server, the number of storage device nodes of a storage device cluster and the number of FC ports in the storage device nodes based on the obtained information, obtaining the size of a canvas based on the canvas for generating a topological graph, calculating the size and position coordinates of each object instance according to the number of the FC ports of the server, the number of the storage device nodes of the storage device cluster, the number of the FC ports in the storage device nodes and the size of the canvas, and generating the topological graph based on the size and the position coordinates of each object instance.
The process of computing the generated topology map is illustrated below.
Assuming that the size of the acquisition canvas is 2000 × 2000 pixels, the number of servers is 2, each server includes 2 FC ports, 1 storage cluster is connected to the server 1, and two storage clusters are connected to the server 2, and each storage cluster includes 2 FC ports.
When the topological graph is generated, firstly, the size of a server and drawing coordinates of the server are determined, the size of the server is required to be moderate, the server is reasonably distributed on a canvas, for example, the size of the server is generated to be 50 x 200 pixels, an FC port of the server is generated to be 15 x 50 pixels, the position of the server is symmetrical about the central line of the canvas, the position of the FC port is symmetrical about the central line of the server, then, a corresponding drawing library, for example, a turtle drawing library, is called, and corresponding information is input, so that the graph of the server can be generated.
Then, an FC port map of the storage device cluster, the storage device nodes, and the storage device nodes is generated, for example, the storage device cluster 1 is 100 × 100 pixels, the storage device cluster 2 is 100 × 300 pixels, each storage device node is 50 × 80 pixels, the FC ports of the storage device nodes are 15 × 50 pixels, 4 storage device nodes are arranged at equal intervals, and are symmetrical about two of the canvas center lines, and the FC port positions are symmetrical about the storage device node center lines, then a corresponding drawing library, for example, a virtual drawing library, is called, and corresponding information is input, and a server map can be generated.
And finally, inputting corresponding information in a drawing library, and connecting the FC port of the server with the connection relation with the FC port of the storage device node, so that a complete topological graph is generated.
Based on the return information obtained by sending the query information to the server and the storage device through SSH, the object instance is constructed and the drawing coordinates and the size are calculated based on the obtained return information, so that the automatic generation of the topological graph is realized, the method is simple and convenient, and the working efficiency is improved.
In some embodiments, generating a topology map based on the obtained information comprises:
calculating respective canvas position coordinates and respective dimensions based on the number of servers, the number of FC ports of the servers, the number of storage device clusters, the number of storage device nodes of the storage device clusters, the number of FC ports in the storage device nodes, and the canvas dimensions;
and calling a drawing library to draw the topological graph based on the position coordinates and the sizes of the respective canvases.
In some embodiments, creating an FC port object instance for a server includes:
sending an FC port information query command to a server through SSH (secure Shell) to acquire all FC port information of the server, and creating an FC port object instance of the server based on the FC port information.
In some embodiments, creating a storage device node object instance comprises:
sending a storage device node information query command to a cluster through SSH (secure Shell) to acquire all storage device node information in the cluster, and creating a storage device node object instance based on the storage device node information.
In some embodiments, creating an FC port object instance for the storage device node comprises:
sending an FC port information query command to the storage device nodes through SSH to acquire FC port information of all the storage device nodes, and creating FC port object instances of the storage device nodes based on the FC port information.
In some embodiments, obtaining the connection relationship between the FC port of the storage device node and the FC port of the server includes:
and sending a network connection relation query command to the storage device node through the SSH so as to acquire the connection relation from the FC port of the storage device node to the FC port of the server.
In some embodiments, updating the FC port object instance in the server object instance and the FC port object instance in the node management module object instance based on the connection relationship includes:
an index is created in each connected FC port object instance to hold the peer FC port information that it meets.
In some embodiments, the FC port information includes a default drawing color;
updating the FC port object instance in the server object instance and the FC port object instance in the node management module object instance based on the connection relationship, comprising:
and updating the default drawing color between the FC port object instances with the connection relation.
Specifically, for example, if the default drawing color is gray, the FC port that acquires the server may change the color to another color, such as red, green, black, yellow, purple, and the like, after having a connection relationship with the FC port of the corresponding storage device, because in the process of generating the topology map in this example, the FC port that also acquires the server may also be connected with FC ports of other devices, such as a switch, and the FC port of the switch that connects the FC port of the server with the port has the default color when generating the topology map, but what the tester needs to see is the connection between the FC port of the server and the FC port of the corresponding storage device, the color is distinguished to be the default color, and the topology map that the tester sees can see is clearer.
In some embodiments, the method further comprises:
a mouse click event is registered so that a logical connection line from the FC port of the server to the FC port of the storage device node is drawn in an animation manner when a mouse click is made.
In another aspect of the embodiments of the present invention, a system for automatically generating a topological graph is further provided, which includes:
a creating module 110, configured to create a server class, an FC port class of a server, a cluster management class, a storage device node management class, and an FC port class of a storage device node, and correspondingly create a server object instance, an FC port object instance of a server, a cluster object instance, a storage device node object instance, and an FC port object instance of a storage device node under each created class;
a joining module 120 configured to join the FC port object instance of the server to the corresponding server object instance, join the storage device node object instance to the corresponding cluster object instance, and join the FC port object instance of the storage device node to the corresponding storage device node object instance;
an obtaining module 130, configured to obtain a connection relationship between an FC port of the storage device node and an FC port of the server, and update an FC port object instance in the server object instance and an FC port object instance in the node management module object instance based on the connection relationship;
a generating module 140 configured to obtain the number of FC ports of the server, the number of storage device nodes of the storage device cluster, the number of FC ports in the storage device nodes, and the size of the canvas, and generate the topology map based on the obtained information.
In some embodiments, the generation module 140 is further configured to:
calculating respective canvas position coordinates and respective dimensions based on the number of servers, the number of FC ports of the servers, the number of storage device clusters, the number of storage device nodes of the storage device clusters, the number of FC ports of the storage device nodes, and the canvas dimensions;
and calling a drawing library to draw the topological graph based on the position coordinates and the sizes of the respective canvases.
In some embodiments, the creation module 110 is further configured to: sending an FC port information query command to a server through SSH (secure Shell) to acquire all FC port information of the server, and creating an FC port object instance of the server based on the FC port information.
In some embodiments, the creation module 110 is further configured to: sending a storage device node information query command to a cluster through SSH (secure Shell) to acquire all storage device node information in the cluster, and creating a storage device node object instance based on the storage device node information.
In some embodiments, the creation module 110 is further configured to: sending an FC port information query command to the storage device nodes through SSH to acquire FC port information of all the storage device nodes, and creating FC port object instances of the storage device nodes based on the FC port information.
In some embodiments, the obtaining module 130 is further configured to: and sending a network connection relation query command to the storage device node through the SSH so as to acquire the connection relation from the FC port of the storage device node to the FC port of the server.
In some embodiments, the obtaining module 130 is further configured to: an index is created in each connected FC port object instance to hold the peer FC port information that it meets.
In some embodiments, the FC port information includes a default drawing color;
the acquisition module 130 is further configured to: and updating the default drawing color between the FC port object instances with the connection relation.
In some embodiments, the system further comprises a registration module configured to register a mouse click event such that upon mouse click, a logical connection line is animated from the FC port of the server to the FC port of the storage device node.
Finally, it should be noted that, as will be understood by those skilled in the art, all or part of the processes of the methods of the above embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. The storage medium of the program may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.
Claims (10)
1. A method for automatically generating a topology map, comprising:
creating a server class, an FC port class of the server, a cluster management class, a storage device node management class and an FC port class of a storage device node, and correspondingly creating a server object instance, an FC port object instance of the server, a cluster object instance, a storage device node object instance and an FC port object instance of the storage device node under each created class respectively;
adding the FC port object instance of the server into the corresponding server object instance, adding the storage device node object instance into the corresponding cluster object instance, and adding the FC port object instance of the storage device node into the corresponding storage device node object instance;
acquiring the connection relation between the FC port of the storage device node and the FC port of the server, and updating an FC port object instance in the server object instance and an FC port object instance in the node management module object instance based on the connection relation;
the method comprises the steps of obtaining the number of FC ports of a server, the number of storage device nodes of a storage device cluster, the number of FC ports in the storage device nodes and the size of canvas, and generating a topological graph based on obtained information.
2. The method of claim 1, wherein generating a topology map based on the obtained information comprises:
calculating respective canvas position coordinates and respective dimensions based on the number of servers, the number of FC ports of the servers, the number of storage device clusters, the number of storage device nodes of the storage device clusters, the number of FC ports in the storage device nodes, and the canvas dimensions;
and calling a drawing library to draw the topological graph based on the position coordinates and the sizes of the respective canvases.
3. The method of claim 1, wherein creating the FC port object instance for the server comprises:
sending an FC port information query command to a server through SSH (secure Shell) to acquire all FC port information of the server, and creating an FC port object instance of the server based on the FC port information.
4. The method of claim 1, wherein creating a storage device node object instance comprises:
sending a storage device node information query command to a cluster through SSH (secure Shell) to acquire all storage device node information in the cluster, and creating a storage device node object instance based on the storage device node information.
5. The method of claim 1, wherein creating the FC port object instance for the storage device node comprises:
sending an FC port information query command to the storage device nodes through SSH to acquire FC port information of all the storage device nodes, and creating FC port object instances of the storage device nodes based on the FC port information.
6. The method according to claim 1, wherein obtaining the connection relationship between the FC port of the storage device node and the FC port of the server comprises:
and sending a network connection relation query command to the storage device node through the SSH so as to acquire the connection relation from the FC port of the storage device node to the FC port of the server.
7. The method of claim 1, wherein updating the FC port object instance in the server object instance and the FC port object instance in the node management module object instance based on the connection relationship comprises:
an index is created in each connected FC port object instance to hold the peer FC port information that it meets.
8. The method of claim 3, wherein the FC port information comprises a default drawing color;
updating the FC port object instance in the server object instance and the FC port object instance in the node management module object instance based on the connection relationship, comprising:
and updating the default drawing color between the FC port object instances with the connection relation.
9. The method of claim 1, further comprising:
a mouse click event is registered so that a logical connection line from the FC port of the server to the FC port of the storage device node is drawn in an animation manner when a mouse click is made.
10. A system for automatically generating a topology map, comprising:
the system comprises a creating module, a cluster management module and a storage device node management module, wherein the creating module is configured to create a server class, an FC port class of a server, a cluster management class, a storage device node management class and an FC port class of a storage device node, and correspondingly create a server object instance, an FC port object instance of the server, a cluster object instance, a storage device node object instance and an FC port object instance of the storage device node under each created class respectively;
a joining module configured to join the FC port object instance of the server to a corresponding server object instance, join the storage device node object instance to a corresponding cluster object instance, and join the FC port object instance of the storage device node to a corresponding storage device node object instance;
an obtaining module, configured to obtain a connection relationship between an FC port of the storage device node and an FC port of the server, and update an FC port object instance in the server object instance and an FC port object instance in the node management module object instance based on the connection relationship;
the generating module is configured to obtain the number of FC ports of the server, the number of storage device nodes of the storage device cluster, the number of FC ports in the storage device nodes and the size of the canvas, and generate a topological graph based on the obtained information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110932727.3A CN113746906B (en) | 2021-08-13 | 2021-08-13 | Method and system for automatically generating topological graph |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110932727.3A CN113746906B (en) | 2021-08-13 | 2021-08-13 | Method and system for automatically generating topological graph |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113746906A true CN113746906A (en) | 2021-12-03 |
CN113746906B CN113746906B (en) | 2023-06-02 |
Family
ID=78731207
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110932727.3A Active CN113746906B (en) | 2021-08-13 | 2021-08-13 | Method and system for automatically generating topological graph |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113746906B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040064545A1 (en) * | 2002-09-26 | 2004-04-01 | Hitachi Ltd. | Integrated topology management method for storage and IP networks |
CN1860731A (en) * | 2003-09-30 | 2006-11-08 | 国际商业机器公司 | System and method for generating perspectives of a san topology |
CN101394300A (en) * | 2007-09-21 | 2009-03-25 | 上海思南电力通信有限公司 | Automatically chart forming method for communication system chart |
CN103036692A (en) * | 2011-09-29 | 2013-04-10 | 中国移动通信集团江苏有限公司 | Method and device for generating network topologies aimed at IT supporting networks |
CN103984750A (en) * | 2014-05-28 | 2014-08-13 | 中铁十局集团有限公司 | B/S (Browser/Server) framework model based topological graph generation method |
US20170093645A1 (en) * | 2015-09-21 | 2017-03-30 | Splunk Inc. | Displaying Interactive Topology Maps Of Cloud Computing Resources |
CN112685175A (en) * | 2020-12-24 | 2021-04-20 | 北京浪潮数据技术有限公司 | Method and device for constructing service topological graph and computer readable storage medium |
CN112910696A (en) * | 2021-01-22 | 2021-06-04 | 上海三零卫士信息安全有限公司 | Automatic modeling analysis method for network topology |
-
2021
- 2021-08-13 CN CN202110932727.3A patent/CN113746906B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040064545A1 (en) * | 2002-09-26 | 2004-04-01 | Hitachi Ltd. | Integrated topology management method for storage and IP networks |
CN1860731A (en) * | 2003-09-30 | 2006-11-08 | 国际商业机器公司 | System and method for generating perspectives of a san topology |
CN101394300A (en) * | 2007-09-21 | 2009-03-25 | 上海思南电力通信有限公司 | Automatically chart forming method for communication system chart |
CN103036692A (en) * | 2011-09-29 | 2013-04-10 | 中国移动通信集团江苏有限公司 | Method and device for generating network topologies aimed at IT supporting networks |
CN103984750A (en) * | 2014-05-28 | 2014-08-13 | 中铁十局集团有限公司 | B/S (Browser/Server) framework model based topological graph generation method |
US20170093645A1 (en) * | 2015-09-21 | 2017-03-30 | Splunk Inc. | Displaying Interactive Topology Maps Of Cloud Computing Resources |
CN112685175A (en) * | 2020-12-24 | 2021-04-20 | 北京浪潮数据技术有限公司 | Method and device for constructing service topological graph and computer readable storage medium |
CN112910696A (en) * | 2021-01-22 | 2021-06-04 | 上海三零卫士信息安全有限公司 | Automatic modeling analysis method for network topology |
Also Published As
Publication number | Publication date |
---|---|
CN113746906B (en) | 2023-06-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020048453A1 (en) | Network element management method and apparatus, system and storage medium | |
WO2010101792A2 (en) | Software test bed generation | |
CN113919252B (en) | Component connectivity detection system based on different design data | |
CN109831334B (en) | Network topology construction method and device and terminal equipment | |
CN115225508B (en) | Internet shooting range scene construction method | |
CN111970337B (en) | P2P network communication construction method, system, medium and terminal under cross-cloud environment | |
CN105095044A (en) | SNMP based server monitoring method and apparatus | |
CN115293279A (en) | Key-value pair difference comparison method and device, equipment and medium thereof | |
CN113364681B (en) | Network path determination method, network path determination device, electronic apparatus, network path determination medium, and program product | |
CN109117152B (en) | Service generation system and method | |
CN109840201B (en) | UI test method, device, electronic equipment and computer readable storage medium | |
CN111711532B (en) | Unified management method for heterogeneous network equipment | |
CN117255031A (en) | Network communication authentication method based on multiple mapping | |
CN113746906A (en) | Method and system for automatically generating topological graph | |
US8743736B2 (en) | Inferring connectivity in the presence of conflicting network data | |
CN113691403B (en) | Topology node configuration method, related device and computer program product | |
CN118679724A (en) | Network topology map for properly configuring clustered networks | |
Dalle et al. | Extending DEVS to support multiple occurrence in component-based simulation | |
CN115297027A (en) | Method, system, storage medium and network management server for identifying link between island network devices | |
CN113987725A (en) | Automatic generation method for nuclear power station DCS transparent transmission network variable logic relation | |
CN102075364A (en) | Method and equipment for determining direct link | |
CN114205281B (en) | Metadata-driven end-to-end network topology dynamic generation system and method | |
CN117593406B (en) | Mulberry base graph generation method, device, equipment and computer readable storage medium | |
CN115277437B (en) | Network topology construction method, device, computer equipment and storage medium | |
CN114528266B (en) | Method, system, device and storage medium for realizing database and cache consistency |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |