mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-23 03:42:19 +00:00
hyperv: implement connectNumOfDefinedNetworks and connectListDefinedNetworks
Co-authored-by: Dawid Zamirski <dzamirski@datto.com> Signed-off-by: Matt Coleman <matt@datto.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
4c928220a1
commit
b0615df6bf
@ -76,6 +76,24 @@ hypervNetworkLookup(virConnectPtr conn, const char *property, const char *value)
|
|||||||
* Exported API functions
|
* Exported API functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static int
|
||||||
|
hypervConnectNumOfDefinedNetworks(virConnectPtr conn G_GNUC_UNUSED)
|
||||||
|
{
|
||||||
|
/* Hyper-V networks are always active */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
hypervConnectListDefinedNetworks(virConnectPtr conn G_GNUC_UNUSED,
|
||||||
|
char **const names G_GNUC_UNUSED,
|
||||||
|
int maxnames G_GNUC_UNUSED)
|
||||||
|
{
|
||||||
|
/* Hyper-V networks are always active */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#define MATCH(FLAG) (flags & (FLAG))
|
#define MATCH(FLAG) (flags & (FLAG))
|
||||||
static int
|
static int
|
||||||
hypervConnectListAllNetworks(virConnectPtr conn,
|
hypervConnectListAllNetworks(virConnectPtr conn,
|
||||||
@ -164,6 +182,8 @@ hypervNetworkLookupByName(virConnectPtr conn, const char *name)
|
|||||||
|
|
||||||
virNetworkDriver hypervNetworkDriver = {
|
virNetworkDriver hypervNetworkDriver = {
|
||||||
.connectNumOfNetworks = hypervConnectNumOfNetworks, /* 7.1.0 */
|
.connectNumOfNetworks = hypervConnectNumOfNetworks, /* 7.1.0 */
|
||||||
|
.connectNumOfDefinedNetworks = hypervConnectNumOfDefinedNetworks, /* 7.1.0 */
|
||||||
|
.connectListDefinedNetworks = hypervConnectListDefinedNetworks, /* 7.1.0 */
|
||||||
.connectListAllNetworks = hypervConnectListAllNetworks, /* 7.1.0 */
|
.connectListAllNetworks = hypervConnectListAllNetworks, /* 7.1.0 */
|
||||||
.networkLookupByUUID = hypervNetworkLookupByUUID, /* 7.1.0 */
|
.networkLookupByUUID = hypervNetworkLookupByUUID, /* 7.1.0 */
|
||||||
.networkLookupByName = hypervNetworkLookupByName, /* 7.1.0 */
|
.networkLookupByName = hypervNetworkLookupByName, /* 7.1.0 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user