1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-22 13:33:52 +03:00

B #2913: Add an option for updating the vnc bitmap without updating the whole cluster

This commit is contained in:
Christian González 2019-02-14 14:57:16 +01:00 committed by Ruben S. Montero
parent 97aacc3b34
commit 461def304e
2 changed files with 23 additions and 3 deletions

View File

@ -241,6 +241,16 @@ private:
return rc;
}
/**
* Writes/updates the vnc_bitmap data in the database.
* @param db pointer to the db
* @return 0 on success
*/
int update_vnc_bitmap(SqlDB *db)
{
return vnc_bitmap.update(db);
}
/**
* Reads the PoolObjectSQL (identified by its OID) from the database.
* @param db pointer to the db

View File

@ -73,7 +73,7 @@ public:
{
rc = cluster->get_vnc_port(vm_id, port);
update(cluster);
update_vnc_bitmap(cluster);
cluster->unlock();
}
@ -94,7 +94,7 @@ public:
{
cluster->release_vnc_port(port);
update(cluster);
update_vnc_bitmap(cluster);
cluster->unlock();
}
@ -117,7 +117,7 @@ public:
{
rc = cluster->set_vnc_port(port);
update(cluster);
update_vnc_bitmap(cluster);
cluster->unlock();
}
@ -258,6 +258,16 @@ public:
int del_from_cluster(PoolObjectSQL::ObjectType type, Cluster* cluster,
int resource_id, string& error_msg);
/**
* Updates the cluster vnc bitmap.
* @cluster the cluster to be updated.
* @return 0 on success
*/
int update_vnc_bitmap(Cluster* cluster)
{
return cluster->update_vnc_bitmap(db);
}
private:
/**
* VNC configuration for clusters