mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
conf: s/virNetworkFindByUUID/virNetworkObjFindByUUID/
It's returning virNetworkObjPtr after all. And it matches the pattern laid out by domain_conf.h. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
2ea3ce332b
commit
82f240ae56
@ -86,7 +86,7 @@ virNetworkObjTaint(virNetworkObjPtr obj,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
virNetworkObjPtr virNetworkFindByUUID(virNetworkObjListPtr nets,
|
virNetworkObjPtr virNetworkObjFindByUUID(virNetworkObjListPtr nets,
|
||||||
const unsigned char *uuid)
|
const unsigned char *uuid)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
@ -4150,7 +4150,7 @@ virNetworkObjIsDuplicate(virNetworkObjListPtr nets,
|
|||||||
virNetworkObjPtr net = NULL;
|
virNetworkObjPtr net = NULL;
|
||||||
|
|
||||||
/* See if a network with matching UUID already exists */
|
/* See if a network with matching UUID already exists */
|
||||||
net = virNetworkFindByUUID(nets, def->uuid);
|
net = virNetworkObjFindByUUID(nets, def->uuid);
|
||||||
if (net) {
|
if (net) {
|
||||||
/* UUID matches, but if names don't match, refuse it */
|
/* UUID matches, but if names don't match, refuse it */
|
||||||
if (STRNEQ(net->def->name, def->name)) {
|
if (STRNEQ(net->def->name, def->name)) {
|
||||||
|
@ -301,7 +301,7 @@ virNetworkObjIsActive(const virNetworkObj *net)
|
|||||||
bool virNetworkObjTaint(virNetworkObjPtr obj,
|
bool virNetworkObjTaint(virNetworkObjPtr obj,
|
||||||
virNetworkTaintFlags taint);
|
virNetworkTaintFlags taint);
|
||||||
|
|
||||||
virNetworkObjPtr virNetworkFindByUUID(virNetworkObjListPtr nets,
|
virNetworkObjPtr virNetworkObjFindByUUID(virNetworkObjListPtr nets,
|
||||||
const unsigned char *uuid);
|
const unsigned char *uuid);
|
||||||
virNetworkObjPtr virNetworkFindByName(virNetworkObjListPtr nets,
|
virNetworkObjPtr virNetworkFindByName(virNetworkObjListPtr nets,
|
||||||
const char *name);
|
const char *name);
|
||||||
|
@ -558,13 +558,13 @@ virNetworkDefParseString;
|
|||||||
virNetworkDefUpdateSection;
|
virNetworkDefUpdateSection;
|
||||||
virNetworkDeleteConfig;
|
virNetworkDeleteConfig;
|
||||||
virNetworkFindByName;
|
virNetworkFindByName;
|
||||||
virNetworkFindByUUID;
|
|
||||||
virNetworkForwardTypeToString;
|
virNetworkForwardTypeToString;
|
||||||
virNetworkIpDefNetmask;
|
virNetworkIpDefNetmask;
|
||||||
virNetworkIpDefPrefix;
|
virNetworkIpDefPrefix;
|
||||||
virNetworkLoadAllConfigs;
|
virNetworkLoadAllConfigs;
|
||||||
virNetworkLoadAllState;
|
virNetworkLoadAllState;
|
||||||
virNetworkObjAssignDef;
|
virNetworkObjAssignDef;
|
||||||
|
virNetworkObjFindByUUID;
|
||||||
virNetworkObjFree;
|
virNetworkObjFree;
|
||||||
virNetworkObjGetPersistentDef;
|
virNetworkObjGetPersistentDef;
|
||||||
virNetworkObjIsDuplicate;
|
virNetworkObjIsDuplicate;
|
||||||
|
@ -130,7 +130,7 @@ networkObjFromNetwork(virNetworkPtr net)
|
|||||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
||||||
|
|
||||||
networkDriverLock();
|
networkDriverLock();
|
||||||
network = virNetworkFindByUUID(driver->networks, net->uuid);
|
network = virNetworkObjFindByUUID(driver->networks, net->uuid);
|
||||||
networkDriverUnlock();
|
networkDriverUnlock();
|
||||||
|
|
||||||
if (!network) {
|
if (!network) {
|
||||||
@ -2476,7 +2476,7 @@ static virNetworkPtr networkLookupByUUID(virConnectPtr conn,
|
|||||||
virNetworkPtr ret = NULL;
|
virNetworkPtr ret = NULL;
|
||||||
|
|
||||||
networkDriverLock();
|
networkDriverLock();
|
||||||
network = virNetworkFindByUUID(driver->networks, uuid);
|
network = virNetworkObjFindByUUID(driver->networks, uuid);
|
||||||
networkDriverUnlock();
|
networkDriverUnlock();
|
||||||
if (!network) {
|
if (!network) {
|
||||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
||||||
@ -3071,7 +3071,7 @@ networkUndefine(virNetworkPtr net)
|
|||||||
|
|
||||||
networkDriverLock();
|
networkDriverLock();
|
||||||
|
|
||||||
network = virNetworkFindByUUID(driver->networks, net->uuid);
|
network = virNetworkObjFindByUUID(driver->networks, net->uuid);
|
||||||
if (!network) {
|
if (!network) {
|
||||||
virReportError(VIR_ERR_NO_NETWORK,
|
virReportError(VIR_ERR_NO_NETWORK,
|
||||||
"%s", _("no network with matching uuid"));
|
"%s", _("no network with matching uuid"));
|
||||||
@ -3144,7 +3144,7 @@ networkUpdate(virNetworkPtr net,
|
|||||||
|
|
||||||
networkDriverLock();
|
networkDriverLock();
|
||||||
|
|
||||||
network = virNetworkFindByUUID(driver->networks, net->uuid);
|
network = virNetworkObjFindByUUID(driver->networks, net->uuid);
|
||||||
if (!network) {
|
if (!network) {
|
||||||
virReportError(VIR_ERR_NO_NETWORK,
|
virReportError(VIR_ERR_NO_NETWORK,
|
||||||
"%s", _("no network with matching uuid"));
|
"%s", _("no network with matching uuid"));
|
||||||
@ -3301,7 +3301,7 @@ static int networkCreate(virNetworkPtr net)
|
|||||||
virObjectEventPtr event = NULL;
|
virObjectEventPtr event = NULL;
|
||||||
|
|
||||||
networkDriverLock();
|
networkDriverLock();
|
||||||
network = virNetworkFindByUUID(driver->networks, net->uuid);
|
network = virNetworkObjFindByUUID(driver->networks, net->uuid);
|
||||||
|
|
||||||
if (!network) {
|
if (!network) {
|
||||||
virReportError(VIR_ERR_NO_NETWORK,
|
virReportError(VIR_ERR_NO_NETWORK,
|
||||||
@ -3336,7 +3336,7 @@ static int networkDestroy(virNetworkPtr net)
|
|||||||
virObjectEventPtr event = NULL;
|
virObjectEventPtr event = NULL;
|
||||||
|
|
||||||
networkDriverLock();
|
networkDriverLock();
|
||||||
network = virNetworkFindByUUID(driver->networks, net->uuid);
|
network = virNetworkObjFindByUUID(driver->networks, net->uuid);
|
||||||
|
|
||||||
if (!network) {
|
if (!network) {
|
||||||
virReportError(VIR_ERR_NO_NETWORK,
|
virReportError(VIR_ERR_NO_NETWORK,
|
||||||
@ -3462,7 +3462,7 @@ static int networkSetAutostart(virNetworkPtr net,
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
networkDriverLock();
|
networkDriverLock();
|
||||||
network = virNetworkFindByUUID(driver->networks, net->uuid);
|
network = virNetworkObjFindByUUID(driver->networks, net->uuid);
|
||||||
|
|
||||||
if (!network) {
|
if (!network) {
|
||||||
virReportError(VIR_ERR_NO_NETWORK,
|
virReportError(VIR_ERR_NO_NETWORK,
|
||||||
|
@ -472,7 +472,7 @@ static virNetworkPtr parallelsNetworkLookupByUUID(virConnectPtr conn,
|
|||||||
virNetworkPtr ret = NULL;
|
virNetworkPtr ret = NULL;
|
||||||
|
|
||||||
parallelsDriverLock(privconn);
|
parallelsDriverLock(privconn);
|
||||||
network = virNetworkFindByUUID(privconn->networks, uuid);
|
network = virNetworkObjFindByUUID(privconn->networks, uuid);
|
||||||
parallelsDriverUnlock(privconn);
|
parallelsDriverUnlock(privconn);
|
||||||
if (!network) {
|
if (!network) {
|
||||||
virReportError(VIR_ERR_NO_NETWORK,
|
virReportError(VIR_ERR_NO_NETWORK,
|
||||||
@ -522,7 +522,7 @@ static char *parallelsNetworkGetXMLDesc(virNetworkPtr net,
|
|||||||
virCheckFlags(VIR_NETWORK_XML_INACTIVE, NULL);
|
virCheckFlags(VIR_NETWORK_XML_INACTIVE, NULL);
|
||||||
|
|
||||||
parallelsDriverLock(privconn);
|
parallelsDriverLock(privconn);
|
||||||
network = virNetworkFindByUUID(privconn->networks, net->uuid);
|
network = virNetworkObjFindByUUID(privconn->networks, net->uuid);
|
||||||
parallelsDriverUnlock(privconn);
|
parallelsDriverUnlock(privconn);
|
||||||
|
|
||||||
if (!network) {
|
if (!network) {
|
||||||
@ -546,7 +546,7 @@ static int parallelsNetworkIsActive(virNetworkPtr net)
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
parallelsDriverLock(privconn);
|
parallelsDriverLock(privconn);
|
||||||
obj = virNetworkFindByUUID(privconn->networks, net->uuid);
|
obj = virNetworkObjFindByUUID(privconn->networks, net->uuid);
|
||||||
parallelsDriverUnlock(privconn);
|
parallelsDriverUnlock(privconn);
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
virReportError(VIR_ERR_NO_NETWORK, NULL);
|
virReportError(VIR_ERR_NO_NETWORK, NULL);
|
||||||
@ -567,7 +567,7 @@ static int parallelsNetworkIsPersistent(virNetworkPtr net)
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
parallelsDriverLock(privconn);
|
parallelsDriverLock(privconn);
|
||||||
obj = virNetworkFindByUUID(privconn->networks, net->uuid);
|
obj = virNetworkObjFindByUUID(privconn->networks, net->uuid);
|
||||||
parallelsDriverUnlock(privconn);
|
parallelsDriverUnlock(privconn);
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
virReportError(VIR_ERR_NO_NETWORK, NULL);
|
virReportError(VIR_ERR_NO_NETWORK, NULL);
|
||||||
@ -589,7 +589,7 @@ static int parallelsNetworkGetAutostart(virNetworkPtr net,
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
parallelsDriverLock(privconn);
|
parallelsDriverLock(privconn);
|
||||||
network = virNetworkFindByUUID(privconn->networks, net->uuid);
|
network = virNetworkObjFindByUUID(privconn->networks, net->uuid);
|
||||||
parallelsDriverUnlock(privconn);
|
parallelsDriverUnlock(privconn);
|
||||||
if (!network) {
|
if (!network) {
|
||||||
virReportError(VIR_ERR_NO_NETWORK,
|
virReportError(VIR_ERR_NO_NETWORK,
|
||||||
|
@ -3499,7 +3499,7 @@ static virNetworkPtr testNetworkLookupByUUID(virConnectPtr conn,
|
|||||||
virNetworkPtr ret = NULL;
|
virNetworkPtr ret = NULL;
|
||||||
|
|
||||||
testDriverLock(privconn);
|
testDriverLock(privconn);
|
||||||
net = virNetworkFindByUUID(privconn->networks, uuid);
|
net = virNetworkObjFindByUUID(privconn->networks, uuid);
|
||||||
testDriverUnlock(privconn);
|
testDriverUnlock(privconn);
|
||||||
|
|
||||||
if (net == NULL) {
|
if (net == NULL) {
|
||||||
@ -3654,7 +3654,7 @@ static int testNetworkIsActive(virNetworkPtr net)
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
testDriverLock(privconn);
|
testDriverLock(privconn);
|
||||||
obj = virNetworkFindByUUID(privconn->networks, net->uuid);
|
obj = virNetworkObjFindByUUID(privconn->networks, net->uuid);
|
||||||
testDriverUnlock(privconn);
|
testDriverUnlock(privconn);
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
virReportError(VIR_ERR_NO_NETWORK, NULL);
|
virReportError(VIR_ERR_NO_NETWORK, NULL);
|
||||||
@ -3675,7 +3675,7 @@ static int testNetworkIsPersistent(virNetworkPtr net)
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
testDriverLock(privconn);
|
testDriverLock(privconn);
|
||||||
obj = virNetworkFindByUUID(privconn->networks, net->uuid);
|
obj = virNetworkObjFindByUUID(privconn->networks, net->uuid);
|
||||||
testDriverUnlock(privconn);
|
testDriverUnlock(privconn);
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
virReportError(VIR_ERR_NO_NETWORK, NULL);
|
virReportError(VIR_ERR_NO_NETWORK, NULL);
|
||||||
@ -3812,7 +3812,7 @@ testNetworkUpdate(virNetworkPtr net,
|
|||||||
|
|
||||||
testDriverLock(privconn);
|
testDriverLock(privconn);
|
||||||
|
|
||||||
network = virNetworkFindByUUID(privconn->networks, net->uuid);
|
network = virNetworkObjFindByUUID(privconn->networks, net->uuid);
|
||||||
if (!network) {
|
if (!network) {
|
||||||
virReportError(VIR_ERR_NO_NETWORK,
|
virReportError(VIR_ERR_NO_NETWORK,
|
||||||
"%s", _("no network with matching uuid"));
|
"%s", _("no network with matching uuid"));
|
||||||
|
@ -61,7 +61,7 @@ let lockedObjMethods = [
|
|||||||
"virDomainFindByName";
|
"virDomainFindByName";
|
||||||
"virDomainAssignDef";
|
"virDomainAssignDef";
|
||||||
|
|
||||||
"virNetworkFindByUUID";
|
"virNetworkObjFindByUUID";
|
||||||
"virNetworkFindByName";
|
"virNetworkFindByName";
|
||||||
"virNetworkAssignDef";
|
"virNetworkAssignDef";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user