mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-09 09:14:57 +00:00
tests: mock virNetDevSetIPAddress
Now that we can include <interface type='ethernet'> in tests, we could almost test XML that has an <ip> element in an interface. Except that the test fails when it tries to actually set the IP address for the interface's tap device. This patch mocks virNetDevSetIPAddress() to just return success.
This commit is contained in:
parent
bfd2de6eed
commit
e1219b6f3c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2014 Red Hat, Inc.
|
* Copyright (C) 2014-2016 Red Hat, Inc.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
@ -127,6 +127,14 @@ virNetDevSetMAC(const char *ifname ATTRIBUTE_UNUSED,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int virNetDevSetIPAddress(const char *ifname ATTRIBUTE_UNUSED,
|
||||||
|
virSocketAddr *addr ATTRIBUTE_UNUSED,
|
||||||
|
virSocketAddr *peer ATTRIBUTE_UNUSED,
|
||||||
|
unsigned int prefix ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
virNetDevSetOnline(const char *ifname ATTRIBUTE_UNUSED,
|
virNetDevSetOnline(const char *ifname ATTRIBUTE_UNUSED,
|
||||||
bool online ATTRIBUTE_UNUSED)
|
bool online ATTRIBUTE_UNUSED)
|
||||||
|
Loading…
Reference in New Issue
Block a user