CN117375915A - Network card data nano-tube method, device, equipment and readable storage medium - Google Patents

Network card data nano-tube method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN117375915A
CN117375915A CN202311316804.8A CN202311316804A CN117375915A CN 117375915 A CN117375915 A CN 117375915A CN 202311316804 A CN202311316804 A CN 202311316804A CN 117375915 A CN117375915 A CN 117375915A
Authority
CN
China
Prior art keywords
network card
data
elastic network
cloud host
elastic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311316804.8A
Other languages
Chinese (zh)
Inventor
马雪敏
李彦君
胡章丰
任秋峥
孙兴艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Cloud Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Cloud Information Technology Co Ltd filed Critical Inspur Cloud Information Technology Co Ltd
Priority to CN202311316804.8A priority Critical patent/CN117375915A/en
Publication of CN117375915A publication Critical patent/CN117375915A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a network card data nano-tube method, a device, equipment and a readable storage medium, which are applied to the technical field of computers and comprise the following steps: creating a virtual private network and a subnet, and creating a cloud host according to the virtual private network and the subnet; acquiring a tenant ID of the cloud host, and judging whether to start a synchronous switch according to the tenant ID; when the synchronous switch is started, judging whether the network card data are received according to the synchronous mark record in the elastic network card list; and if the network interface is a nano tube, synchronizing the port data bound by the cloud host to the elastic network card database. According to the method, port data are synchronized to elastic network card data, the elastic network card is utilized to manage network card data of the cloud host, the requirements of customers on different network cards are met, and the users can flexibly receive network card data; and whether the nanotube authority for binding the port data to the cloud host exists or not is determined through the ID, so that the safety is ensured.

Description

Network card data nano-tube method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a network card data nanotube method, device, apparatus and readable storage medium.
Background
Currently, all industries begin to integrate service systems through cloud computing platforms gradually, for safety reasons, a VPC (Virtual Private Cloud ) technology is used for carrying out security isolation on a network, the VPC technology can enable a tenant to have a logically isolated area with other tenants in the cloud, various cloud resources are used in the area, and the tenant can completely and freely control a virtual network on the cloud.
In the present stage, since OpenStack (OpenStack is an open-source cloud computing management platform item, is a combination of a series of software open-source items, openStack provides extensible and elastic cloud computing services for private cloud and public cloud) cloud hosts on the OpenStack can bind multiple ports, and all network card data of the cloud hosts are stored in an OpenStack database, so that a main network card or an auxiliary network card cannot be distinguished, and management is inconvenient when a user accesses a cloud host list.
Disclosure of Invention
Therefore, the present invention aims to provide a network card data nano-tube method, a device and a readable storage medium, which solve the problem of inconvenient management when a user accesses a cloud host list in the prior art.
In order to solve the technical problems, the invention provides a network card data nano-tube method, which comprises the following steps:
creating a virtual private network and a subnet, and creating a cloud host according to the virtual private network and the subnet;
acquiring a tenant ID of the cloud host, and judging whether to start a synchronous switch according to the tenant ID;
when the synchronous switch is started, judging whether the network card data are received according to the synchronous mark record in the elastic network card list;
and if the network interface is a nano tube, synchronizing the port data bound by the cloud host to the elastic network card database.
Optionally, the synchronizing the port data bound by the cloud host to the elastic network card database includes:
and if a plurality of accounts exist in the tenant of the cloud host, synchronizing the port data bound by the cloud host to an elastic network card database under the main account.
Optionally, the synchronizing the port data bound by the cloud host to the elastic network card database includes:
calling an OpenStack interface to acquire a target port list of the tenant ID;
and synchronizing the port data of the target port list to the elastic network card database.
Optionally, after the synchronizing the port data bound by the cloud host into the elastic network card database, the method further includes:
and when the elastic network card data in the elastic network card database is not consistent with the port data bound by the cloud host, updating the elastic network card data in the elastic network card database.
Optionally, when it is detected that the elastic network card data in the elastic network card database is inconsistent with the port data bound by the cloud host, updating the elastic network card data in the elastic network card database includes:
when the elastic network card data in the elastic network card database is compared with the port data bound by the cloud host, deleting the redundant data in the elastic network card database when the elastic network card database has the redundant data;
and updating the elastic network card data in the elastic network card database when the elastic network card data in the elastic network card database is different from the port data bound by the cloud host.
Optionally, when the elastic network card data in the elastic network card database is compared with the port data bound by the cloud host, and redundant data in the elastic network card database exists, deleting the redundant data in the elastic network card database includes:
judging the synchronous time point of the redundant data when the redundant data exists in the elastic network card database when the elastic network card data in the elastic network card database is compared with the port data bound by the cloud host;
if the synchronous time point of the redundant data is within a preset time period, not deleting the redundant data; the preset time period is a preset time from the current time point;
and if the synchronous time point of the redundant data is not within the preset time period, deleting the redundant data.
The invention also provides a network card data nanotube device, which comprises:
the cloud host creation module is used for creating a virtual private network and a subnet, and creating a cloud host according to the virtual private network and the subnet;
the acquisition module is used for acquiring the tenant ID of the cloud host and judging whether to start the synchronous switch according to the tenant ID;
the judging module is used for judging whether the network card data are received according to the synchronous mark record in the elastic network card list when the synchronous switch is started;
and the nano tube module is used for nano tubes, and synchronizing the port data bound by the cloud host into the elastic network card database.
Optionally, the nanotube module includes:
and the synchronization unit is used for synchronizing the port data bound by the cloud host to the elastic network card database under the main account if the tenant of the cloud host has a plurality of accounts.
The invention also provides a network card data nanotube device, which comprises:
a memory for storing a computer program;
and the processor is used for realizing the steps of the network card data nano-tube method when executing the computer program.
The invention also provides a readable storage medium, wherein the readable storage medium stores computer executable instructions, and when the computer executable instructions are loaded and executed by a processor, the steps of the network card data nano-tube method are realized.
Therefore, the cloud host is created according to the virtual private network and the subnet by creating the virtual private network and the subnet; acquiring a tenant ID of the cloud host, and judging whether to start a synchronous switch according to the tenant ID; when the synchronous switch is started, judging whether the network card data are received according to the synchronous mark record in the elastic network card list; and if the network interface is a nano tube, synchronizing the port data bound by the cloud host to the elastic network card database. Aiming at the situation that an elastic network card product is not planned in the early stage of a cloud platform, but the elastic network card data under a virtual machine is needed in the later stage, the method synchronizes the port data to the elastic network card data, manages the network card data of a cloud host by utilizing the elastic network card, meets the requirements of customers on different network cards, and is convenient for the users to flexibly receive the network card data; in addition, whether the authority of the port data nanotube bound to the cloud host exists or not is determined through the user ID, so that the safety is ensured; the elastic network card list stores the synchronous mark of the tenant, and when the user accesses the elastic network card list again, the synchronous mark record exists, and the elastic network card data is not needed to be synchronized again; the method does not depend on a certain independent physical hardware device, can flexibly manage configuration, configures the synchronous switch of the elastic network card according to requirements, and has higher safety.
In addition, the invention also provides a network card data nanotube device, equipment and a readable storage medium, which have the same beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a network card data nanotube method provided in an embodiment of the present invention;
fig. 2 is a schematic diagram of a network card data nanotube method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a network card data nanotube method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a network card data nanotube device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a network card data nanotube device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, 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, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Currently, all industries begin to integrate service systems through cloud computing platforms gradually, and for safety reasons, they can use a VPC (Virtual Private Cloud ) technology to perform security isolation on a network, the VPC technology can enable a tenant to have a logically isolated area with other tenants in the cloud, and various cloud resources are used in the area, so that the tenant can completely and freely control a virtual network on the cloud. With the popularization of cloud services, the demand for the cloud host to use the elastic network card has also grown. The elastic network card (ENI, elastic Network Interface) is a virtual network card that can be bound to a proprietary network VPC type ECS instance (which is a virtual computing environment). Through the elastic network card, high-availability cluster establishment, low-cost fault transfer and refined network management can be realized. The elastic network card is an independent virtual network card, can migrate among a plurality of cloud servers, and realizes flexible expansion and migration of services. The elastic network card can be established and bound with the ECS instance, or can be independently established to assist the elastic network card to be bound with the ECS instance. If the elastic network card product is not planned in the early stage of the cloud platform, the elastic network card data under the virtual machine needs to be managed later, and a synchronization mechanism of the elastic network card needs to be considered. As previously planned virtual private network types are VLAN (virtual local area network) networks, cloud hosts need to change network types into VxLAN (virtual extensible local area network) networks, and network information and intranet IP of a cloud host list also need to be synchronously modified, namely operation of synchronous elastic network cards.
The invention provides a network card data nano-tube method which can ensure the consistency of the elastic network card data stored in an elastic network card database and the OpenStack port data. The elastic network card is used for managing the network card data of the cloud host, so that the main network card or the auxiliary network card can be distinguished, the requirements of customers on different network cards are met, for example, the main network card is used for realizing intranet communication, the auxiliary network card is used for realizing extranet communication, flexible management can be realized, the elastic network card supports binding and unbinding of an elastic public network IP (Internet Protocol ), the intranet IP is modified, the cloud host is bound and unbinding, and the like. Referring to fig. 1 specifically, fig. 1 is a flowchart of a network card data nanotube method according to an embodiment of the present invention. The method may include:
s101: creating a virtual private network and a subnet, and creating a cloud host according to the virtual private network and the subnet.
The virtual private network is created by using the administrator authority in the network management platform, and the type of the virtual private network in the embodiment may be a VLAN network or may also be a VxLAN network. When the tenant logs in the console interface and views the virtual private network list, the virtual private network list and the subnet list can be seen, the cloud host list is accessed, the virtual private network and the subnet are selected, the elastic network card creation interface is called to create a cloud host, and after the cloud host is successfully created, the tenant ID (Identity document, identity) of the cloud host, the cloud host name, the network, the subnet and the intranet IP of the cloud host can be obtained from the elastic network card list interface.
S102: and acquiring the tenant ID of the cloud host, and judging whether to start the synchronous switch according to the tenant ID.
The network management platform in this embodiment has a function of resetting the synchronization mark of the elastic network card for a designated tenant, and can reset the synchronization marks of all tenants by one key. And judging whether to turn on the synchronous switch according to the created tenant ID of the cloud host.
S103: when the synchronous switch is started, judging whether the network card data are received according to the synchronous mark record in the elastic network card list.
Specifically, when the elastic network card list has no synchronous mark, a nano tube is needed; when the synchronous mark exists in the elastic network card list, the operation of the nano-tube elastic network card is not performed any more. In general, if the first access synchronization switch is turned on by default, the synchronization flag in the data table is queried according to the tenant ID to indicate that the tenant has not synchronized the elastic network card data, and then the nanotubes can be performed. When the tenant revisits the cloud server list next time, the synchronization mark is added at this time, and the operation of the nano tube elastic network card is not performed any more.
S104: and if the network interface is a nano tube, synchronizing the port data bound by the cloud host to the elastic network card database.
Specifically, if the network card synchronization mark data can be put in the network card database, the port data bound by the cloud host is synchronized to the elastic network card database, and when the elastic network card is put in the network card database, whether the device ID bound by the port is the example ID inquired in the cloud host list is required to be judged, if so, the data synchronization is performed.
Further, the synchronizing the port data bound by the cloud host to the elastic network card database may include the following steps:
if the tenant of the cloud host has a plurality of accounts, synchronizing the port data bound by the cloud host to an elastic network card database under the main account.
Specifically, because the console distinguishes the main account and the sub account to log in, in order to ensure that the synchronous network card data cannot be repeated, the main account and the sub account under the tenant share one synchronous mark, the elastic network card data of the nano tube is stored under the main account, and after the main account authorizes the sub account, the network card resources can be operated.
Further, the synchronizing the port data bound by the cloud host to the elastic network card database may include the following steps:
calling an OpenStack interface to acquire a target port list of the tenant ID;
and synchronizing port data of the target port list into the elastic network card database.
Specifically, when the nanotubes are managed, data synchronization can be performed according to user requirements. There are many uses of cloud hosts, which are distinguished by a label, such as: ECS (cloud server) and CPS (cloud physical host), etc. For example, when port data marked as ECS (i.e., cloud hosts of a cloud server type) binding needs to be managed, the OpenStack interface may be invoked to obtain a cloud host list and a port list marked as ECS under the tenant. Among them, port data under a network has many uses, such as ports on a router (routing) are bound to the router, and dhcp (Dynamic Host Configuration Protocol ) ports are used for network allocation IP, so port list data needs to filter out ports on the router and dhcp ports. And synchronizing the port data corresponding to the cloud host marked as the ECS and the filtered data into an elastic network card database.
Further, after the synchronization of the port data bound by the cloud host to the elastic network card database, the method may further include the following steps:
and when the elastic network card data in the elastic network card database is not consistent with the port data bound by the cloud host, updating the elastic network card data in the elastic network card database.
Specifically, when the OpenStack port data and the database are inconsistent or redundant data exists in the database, the data can be updated or deleted when the tenant inquires the elastic network card list, so that the consistency of the elastic network card data stored in the elastic network card database and the OpenStack port data is ensured. For example, when the created cloud host needs to change the network type, the operation and maintenance manager unbinds the old port bound by the cloud host from the OpenStack platform operation, creates the port of the new network again, deletes the old port, and at this time, the console cloud host list interface displays the port information of the old network. At this time, the network card synchronous switch of the designated tenant can be reset on the network management platform, and the program monitors that the port data on the OpenStack is inconsistent with the elastic network card data in the database or that redundant data in the database can be updated or deleted when the user inquires the elastic network card list, so that the consistency of the elastic network card data stored in the database and the OpenStack port data is ensured.
Further, when it is detected that the elastic network card data in the elastic database is inconsistent with the port data bound by the cloud host, updating the elastic network card data in the elastic network card database may include the following steps:
when the elastic network card data in the elastic network card database is compared with the port data bound by the cloud host, deleting the redundant data in the elastic network card database when the elastic network card database has the redundant data;
and updating the elastic network card data in the elastic network card data when the elastic network card data in the elastic network card database is different from the port data bound by the cloud host.
Specifically, when the port data in the elastic network card database is compared, there may be redundancy of the elastic network card data compared with the port data, and at this time, the redundant data in the elastic network card database needs to be deleted; or there may be inconsistency between the elastic data and the port data, and the data in the elastic network card database needs to be updated according to the port data.
Further, when the elastic network card data in the elastic network card database is compared with the port data bound by the cloud host, deleting the redundant data in the elastic network card database when the elastic network card database has the redundant data, may include the following steps:
when the elastic network card data in the elastic network card database is compared with the port data bound by the cloud host, judging the synchronous time point of the redundant data when the elastic network card database has the redundant data;
if the synchronous time point of the redundant data is within the preset time period, not deleting the redundant data; the preset time period is a preset time from the current time point;
and if the synchronous time point of the redundant data is not within the preset time period, deleting the redundant data.
Specifically, the program asynchronously cleans redundant data, for example, because of network fluctuation of the underlying environment, data redundancy occurs in the network card table, and compared with the OpenStack underlying layer, redundant port data in the database is deleted. In order to prevent the network card from being created on the OpenStack but not yet put in storage in the process of creating the cloud host, the operation of clearing redundant data and the creation resources have conflict, so that the data set for processing the redundant data is calculated for the current time for a certain time, the normal creation of the cloud host is ensured, the newly built resources are not cleared, and only redundant historical data is cleared.
By applying the network card data nano-management method provided by the embodiment of the invention, a cloud host is created according to the virtual private network and the subnet by creating the virtual private network and the subnet; acquiring a tenant ID of the cloud host, and judging whether to start a synchronous switch according to the tenant ID; when the synchronous switch is started, judging whether the network card data are received according to the synchronous mark record in the elastic network card list; and if the network interface is a nano tube, synchronizing the port data bound by the cloud host to the elastic network card database. Aiming at the situation that an elastic network card product is not planned in the early stage of a cloud platform, but the elastic network card data under a virtual machine is needed in the later stage, the method synchronizes the port data to the elastic network card data, manages the network card data of a cloud host by utilizing the elastic network card, meets the requirements of customers on different network cards, and is convenient for the users to flexibly receive the network card data; in addition, whether the authority of the port data nanotube bound to the cloud host exists or not is determined through the user ID, so that the safety is ensured; the elastic network card list stores the synchronous mark of the tenant, and when the user accesses the elastic network card list again, the synchronous mark record exists, and the elastic network card data is not needed to be synchronized again; the method does not depend on a certain independent physical hardware device, can flexibly manage configuration, configures the synchronous switch of the elastic network card according to requirements, and has higher safety. In addition, the process of creating the cloud host and the process of cleaning redundant data are guaranteed not to conflict; moreover, the consistency of the elastic network card data stored in the database and the OpenStack port data is ensured; in addition, the elastic network card table stores the synchronization mark of the tenant, so that the synchronization efficiency is improved; and the regular cleaning of redundant network card data is realized, and the operation is simple and quick.
In order to facilitate understanding of the present invention, referring to fig. 2 specifically, fig. 2 is a schematic diagram of a network card data nanotube method according to an embodiment of the present invention, which may specifically include:
1) The northbound interface is mainly used for providing a rest api (rest api is an architecture style of an application program interface) outwards, so as to provide functions of creating a network by a tenant, creating a cloud host and managing an elastic network card. For example, the tenant ID, the network segment CIDR (classification less Inter-Domain Routing) and the area are provided to realize functions of creating a virtual private network, creating a subnet, deleting a virtual private network, creating an elastic network card, deleting the elastic network card, resetting an elastic network card synchronization switch, and the like.
2) The database is used for storing information such as relevant tenants, virtual private networks, subnets, elastic network cards, elastic network card synchronous marks and the like. And all relevant information established by the tenant through the network management platform and the elastic network card management platform is stored in the database.
3) The network management platform is mainly used for managing the virtual private network and configuring the elastic network card synchronous switch. The synchronous switch can set whether to start the operation of the synchronous network card according to the tenant ID, and can also set all tenants to start synchronization. Because the main account and the sub account are distinguished on the console, one tenant may correspond to a plurality of login accounts on the console, and in order to prevent the synchronous network card data from repeating, the main account and the sub account share a synchronous mark, and the synchronous elastic network card data is started for the first time and is synchronized to the lower side of the main account by default.
4) The elastic network card management platform is used for managing the elastic network cards and comprises the steps of inquiring an elastic network card list, checking the details of the elastic network cards, creating the elastic network cards, deleting the elastic network cards, updating the names of the elastic network cards, binding the elastic network cards to a cloud host, binding the elastic network cards Jie Bangyun host and modifying the intranet IP of the elastic network cards. When the tenant accesses the elastic network card list function, the primary account ID corresponding to the current login account is obtained according to token information, and whether the synchronous network card mark record exists in the elastic network card database is queried according to the primary account ID. Taking synchronous ECS data as an example for illustration: if the mark record does not exist, the tenant does not synchronize the elastic network card data, firstly, one network card synchronization mark data is put in the library, then the OpenStack interface is called to obtain a cloud host list and a port list marked as ECS under the tenant, and the port list data needs to filter out the ports and the dhcp ports on the router. If the mark record exists, the tenant is indicated to have already received the elastic network card data. When the elastic network card is put in storage, whether the device ID bound to the port is the instance ID inquired in the cloud host list or not needs to be judged, and if the device ID bound to the port is not the cloud host marked as ECS, the device ID is not in the elastic network card database.
After the elastic network card opens the nano tube data function, the user can call the creation interface of the elastic network card to store the network card data when clicking the cloud host from the control console, and when accessing the elastic network card list again, the network card synchronous mark is added at the moment, so that the nano tube operation of the network card is not performed any more. The program asynchronously cleans redundant data, for example, because of network fluctuation of the bottom layer environment, data redundancy occurs in the network card table, and compared with the OpenStack bottom layer, redundant port data in the elastic network card database is deleted. In order to prevent port data from being created on the OpenStack but not synchronized to the elastic network card database in the process of creating the cloud host, the operation of clearing redundant data and the creation resources conflict, so that the data set for processing the redundant data is data calculated for ten minutes forward at the current time, normal creation of the cloud host is ensured, newly built resources are not cleared, and only redundant historical data is cleared.
Fig. 3 is a schematic diagram of a network card data nanotube method according to an embodiment of the present invention, which may specifically include:
the preconditions are that: a subnet1 and a subnet2 are arranged under a VLAN network1, a virtual machine vm1 and a virtual machine vm2 are respectively established under two subnets by a user a and a user b, the user a belongs to a primary account, and the user b belongs to a sub account of the user a. The method comprises the following specific steps: the network management platform creates VLAN networks and subnets using administrator privileges. Invoking the northbound interface to query the virtual private network list and the subnet list, enabling the user a and the user b to see VLAN network and subnet information, invoking APIs (an invoking interface reserved for an application program by an operating system) by the user a and the user b to create a cloud host. The northbound interface first writes the network (VLAN network), subnet (subnet) into the database. The elastic network card management platform checks the elastic network card list, stores port data bound by the cloud host into the elastic network card list, stores the network card data under the main account number, can grant operation authority of resources through the sub-account number, and the user a and the user b inquire that the cloud host list network, the sub-network and the intranet IP information are displayed normally. After the network card data synchronization is completed, the network card synchronization identification record is stored in the database, and the user calls the elastic network card interface to store the network card data when the console newly builds the cloud host. So far, the configuration of the synchronous switching nano tube elastic network card data is completed.
The network card data nanotube device provided by the embodiment of the invention is introduced below, and the network card data nanotube device described below and the network card data nanotube method described above can be correspondingly referred to each other.
Referring to fig. 4 specifically, fig. 4 is a schematic structural diagram of a network card data nanotube device according to an embodiment of the present invention, which may include:
a cloud host creation module 100, configured to create a virtual private network and a subnet, and create a cloud host according to the virtual private network and the subnet;
the acquiring module 200 is configured to acquire a tenant ID of the cloud host, and determine whether to turn on a synchronous switch according to the tenant ID;
the judging module 300 is configured to judge whether to receive the network card data according to the synchronization mark record in the elastic network card list when the synchronization switch is turned on;
and the nanotube module 400 is used for synchronizing the port data bound by the cloud host into the elastic network card database.
Further, based on the above embodiment, the nanotube module 400 may include:
and the multi-account nano-tube unit is used for synchronizing the port data bound by the cloud host to the elastic network card database under the main account if a plurality of accounts exist for the tenant of the cloud host.
Further, based on the above embodiment, the nanotube module 400 may include:
the acquisition unit is used for calling an OpenStack interface to acquire a target port list of the tenant ID;
and the synchronization unit is used for synchronizing the port data of the target port list into the elastic network card database.
Further, based on the above embodiment, the network card data nanotube device may further include:
and the detection updating module is used for updating the elastic network card data in the elastic network card database when the fact that the elastic network card data in the elastic network card database is inconsistent with the port data bound by the cloud host is detected after the port data bound by the cloud host are synchronized into the elastic network card database.
Further, based on the above embodiment, the detecting the update module may include:
the redundant data deleting unit is used for deleting the redundant data in the elastic network card database when the elastic network card data in the elastic network card database is compared with the port data bound by the cloud host and the redundant data exists in the elastic network card database;
and the difference data updating unit is used for updating the elastic network card data in the elastic network card data when the elastic network card data in the elastic network card database is compared with the port data bound by the cloud host.
Further, based on the above embodiment, the redundant data deleting unit may include:
the judging subunit is used for judging the synchronous time point of the redundant data when the redundant data exists in the elastic network card database when the elastic network card data in the elastic network card database is compared with the port data bound by the cloud host;
the first updating subunit is used for not deleting the redundant data if the synchronous time point of the redundant data is within a preset time period; the preset time period is a preset time from the current time point;
and the second updating subunit is used for deleting the redundant data if the synchronous time point of the redundant data is not within the preset time period.
The network card data nanotube device provided by the embodiment of the invention is used for creating a virtual private network and a subnet through the cloud host creation module 100, and creating a cloud host according to the virtual private network and the subnet; the acquiring module 200 is configured to acquire a tenant ID of the cloud host, and determine whether to turn on the synchronous switch according to the tenant ID; the judging module 300 is configured to judge whether to receive the network card data according to the synchronization mark record in the elastic network card list when the synchronization switch is turned on; the nanotube module 400 is configured to synchronize the port data bound by the cloud host to the elastic network card database if the nanotubes are present. Aiming at the situation that an elastic network card product is not planned in the early stage of a cloud platform, but the elastic network card data under a virtual machine is needed in the later stage, the device utilizes the elastic network card to manage the network card data of a cloud host by synchronizing port data to the elastic network card data, so that the requirements of customers on different network cards are met, and the users can flexibly receive the network card data; in addition, whether the authority of the port data nanotube bound to the cloud host exists or not is determined through the user ID, so that the safety is ensured; the elastic network card list stores the synchronous mark of the tenant, and when the user accesses the elastic network card list again, the synchronous mark record exists, and the elastic network card data is not needed to be synchronized again; the method does not depend on a certain independent physical hardware device, can flexibly manage configuration, configures the synchronous switch of the elastic network card according to requirements, and has higher safety. In addition, the process of creating the cloud host and the process of cleaning redundant data are guaranteed not to conflict; moreover, the consistency of the elastic network card data stored in the database and the OpenStack port data is ensured; in addition, the elastic network card table stores the synchronization mark of the tenant, so that the synchronization efficiency is improved; and the regular cleaning of redundant network card data is realized, and the operation is simple and quick.
The network card data nanotube device provided by the embodiment of the invention is introduced below, and the network card data nanotube device described below and the network card data nanotube method described above can be correspondingly referred to each other.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a network card data nanotube device according to an embodiment of the present invention, which may include:
a memory 10 for storing a computer program;
the processor 20 is configured to execute a computer program to implement the network card data nanotube method described above.
The memory 10, the processor 20, and the communication interface 31 all communicate with each other via a communication bus 32.
In the embodiment of the present invention, the memory 10 is used for storing one or more programs, the programs may include program codes, the program codes include computer operation instructions, and in the embodiment of the present invention, the memory 10 may store programs for implementing the following functions:
creating a virtual private network and a subnet, and creating a cloud host according to the virtual private network and the subnet;
acquiring a tenant ID of the cloud host, and judging whether to start a synchronous switch according to the tenant ID;
when the synchronous switch is started, judging whether the network card data are received according to the synchronous mark record in the elastic network card list;
and if the network interface is a nano tube, synchronizing the port data bound by the cloud host to the elastic network card database.
In one possible implementation, the memory 10 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, and at least one application program required for functions, etc.; the storage data area may store data created during use.
In addition, memory 10 may include read only memory and random access memory and provide instructions and data to the processor. A portion of the memory may also include NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, where the operating instructions may include various operating instructions for performing various operations. The operating system may include various system programs for implementing various basic tasks as well as handling hardware-based tasks.
The processor 20 may be a central processing unit (Central Processing Unit, CPU), an asic, a dsp, a fpga or other programmable logic device, and the processor 20 may be a microprocessor or any conventional processor. The processor 20 may call a program stored in the memory 10.
The communication interface 31 may be an interface of a communication module for connecting with other devices or systems.
Of course, it should be noted that the structure shown in fig. 5 is not limited to the network card data nanotube device in the embodiment of the present invention, and the network card data nanotube device may include more or less components than those shown in fig. 5 or may be combined with some components in practical application.
The following describes a readable storage medium provided by an embodiment of the present invention, where the readable storage medium described below and the network card data nanotube method described above may be referred to correspondingly.
The invention also provides a readable storage medium, wherein the readable storage medium stores a computer program, and the computer program realizes the steps of the network card data nano-tube method when being executed by a processor.
The readable storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. 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 present invention.
Finally, it is further noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The above detailed description of the method, the device, the equipment and the readable storage medium for network card data nanotubes provided by the invention applies specific examples to illustrate the principle and the implementation of the invention, and the description of the above examples is only used for helping to understand the method and the core idea of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (10)

1. A network card data nanotube method, comprising:
creating a virtual private network and a subnet, and creating a cloud host according to the virtual private network and the subnet;
acquiring a tenant ID of the cloud host, and judging whether to start a synchronous switch according to the tenant ID;
when the synchronous switch is started, judging whether the network card data are received according to the synchronous mark record in the elastic network card list;
and if the network interface is a nano tube, synchronizing the port data bound by the cloud host to the elastic network card database.
2. The network card data nanotube method of claim 1, wherein synchronizing the cloud host bound port data into the elastic network card database comprises:
and if a plurality of accounts exist in the tenant of the cloud host, synchronizing the port data bound by the cloud host to an elastic network card database under the main account.
3. The network card data nanotube method of claim 1, wherein synchronizing the cloud host bound port data into the elastic network card database comprises:
calling an OpenStack interface to acquire a target port list of the tenant ID;
and synchronizing the port data of the target port list to the elastic network card database.
4. The network card data hosting method of claim 1, wherein after synchronizing the cloud host bound port data into the elastic network card database, further comprising:
and when the elastic network card data in the elastic network card database is not consistent with the port data bound by the cloud host, updating the elastic network card data in the elastic network card database.
5. The network card data nanotube method of claim 4, wherein updating the elastic network card data in the elastic network card database when it is detected that the elastic network card data in the elastic network card database is inconsistent with the port data bound by the cloud host comprises:
when the elastic network card data in the elastic network card database is compared with the port data bound by the cloud host, deleting the redundant data in the elastic network card database when the elastic network card database has the redundant data;
and updating the elastic network card data in the elastic network card database when the elastic network card data in the elastic network card database is different from the port data bound by the cloud host.
6. The network card data nanotube method of claim 5, wherein deleting the redundant data in the elastic network card database when the redundant data exists in the elastic network card database compared with the port data bound by the cloud host comprises:
judging the synchronous time point of the redundant data when the redundant data exists in the elastic network card database when the elastic network card data in the elastic network card database is compared with the port data bound by the cloud host;
if the synchronous time point of the redundant data is within a preset time period, not deleting the redundant data; the preset time period is a preset time from the current time point;
and if the synchronous time point of the redundant data is not within the preset time period, deleting the redundant data.
7. A network card data nanotube device, comprising:
the cloud host creation module is used for creating a virtual private network and a subnet, and creating a cloud host according to the virtual private network and the subnet;
the acquisition module is used for acquiring the tenant ID of the cloud host and judging whether to start the synchronous switch according to the tenant ID;
the judging module is used for judging whether the network card data are received according to the synchronous mark record in the elastic network card list when the synchronous switch is started;
and the nano tube module is used for nano tubes, and synchronizing the port data bound by the cloud host into the elastic network card database.
8. The network card data nanotube device of claim 7, wherein the nanotube module comprises:
and the synchronization unit is used for synchronizing the port data bound by the cloud host to the elastic network card database under the main account if the tenant of the cloud host has a plurality of accounts.
9. A network card data nanotube device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the network card data nanotube method according to any one of claims 1 to 6 when executing the computer program.
10. A readable storage medium having stored therein computer executable instructions which when loaded and executed by a processor implement the steps of the network card data hosting method of any of claims 1 to 6.
CN202311316804.8A 2023-10-12 2023-10-12 Network card data nano-tube method, device, equipment and readable storage medium Pending CN117375915A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311316804.8A CN117375915A (en) 2023-10-12 2023-10-12 Network card data nano-tube method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311316804.8A CN117375915A (en) 2023-10-12 2023-10-12 Network card data nano-tube method, device, equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN117375915A true CN117375915A (en) 2024-01-09

Family

ID=89399680

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311316804.8A Pending CN117375915A (en) 2023-10-12 2023-10-12 Network card data nano-tube method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN117375915A (en)

Similar Documents

Publication Publication Date Title
US11740975B2 (en) System and method for managing blockchain nodes
JP6514308B2 (en) Failover and Recovery for Replicated Data Instances
US9930007B2 (en) IP address and domain name automation of virtual infrastructure
US9176829B2 (en) Managing recovery virtual machines in clustered environment
RU2417416C2 (en) Solution deployment in server farm
US9973439B2 (en) Internet protocol address management (IPAM) integration with a plurality of virtualization tiers in the virtual cloud using infrastructure metadata
US11368407B2 (en) Failover management using availability groups
US20110239039A1 (en) Cloud computing enabled robust initialization and recovery of it services
US10666508B2 (en) Unified software defined networking configuration management over multiple hosting environments
CN105094897B (en) A kind of virtual machine starting method, cloud access equipment and cloud computing center
CN107222320A (en) The method and apparatus that Cloud Server cluster sets up High Availabitity connection
CN103677967A (en) Remote data service system of data base and task scheduling method
US20080196029A1 (en) Transaction Manager Virtualization
US20190391831A1 (en) Seamless virtual standard switch to virtual distributed switch migration for hyper-converged infrastructure
CN109845192B (en) Computer system and method for dynamically adapting a network and computer readable medium
US20190372835A1 (en) Private network mirroring
CN105635311A (en) Method for synchronizing resource pool information in cloud management platform
CN108390956A (en) A kind of method and system for virtual machine configuration internet protocol address
CN102917084A (en) Automatic allocation method of IP address of node inside fat tree structure networking data center
CN110391940A (en) Response method, device, system, equipment and the storage medium of address of service
CN104793981B (en) A kind of online snapshot management method and device of cluster virtual machine
US10841163B2 (en) Autoinitialization of clustered storage
CN102577249B (en) The example set of the connection of dynamic addressing main frame
CN117375915A (en) Network card data nano-tube method, device, equipment and readable storage medium
CN111488248A (en) Control method, device and equipment for hosting private cloud system and storage medium

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