mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 03:42:52 +09:00
F #4393: Added resize operation for running VMs
This commit is contained in:
1 parent
6f3066ddd1
commit
43df8151ff
7 files changed
+176
-12
No files matched your search
@@ -67,7 +67,8 @@ public:
|
||||
SNAPSHOT_CREATE,
|
||||
SNAPSHOT_REVERT,
|
||||
SNAPSHOT_DELETE,
|
||||
DISK_SNAPSHOT_CREATE
|
||||
DISK_SNAPSHOT_CREATE,
|
||||
DISK_RESIZE
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -409,13 +410,20 @@ private:
|
||||
void detach_nic_action(
|
||||
int vid);
|
||||
|
||||
/**
|
||||
* This function cancels the current driver operation
|
||||
*/
|
||||
void driver_cancel_action(
|
||||
int vid);
|
||||
|
||||
/**
|
||||
* Creates a new system snapshot. The VM must have a snapshot with the
|
||||
* attribute ACTIVE = YES
|
||||
*
|
||||
* @param vid the id of the VM.
|
||||
*/
|
||||
void snapshot_create_action(int vid);
|
||||
void snapshot_create_action(
|
||||
int vid);
|
||||
|
||||
/**
|
||||
* Reverts to a snapshot. The VM must have a snapshot with the
|
||||
@@ -423,7 +431,8 @@ private:
|
||||
*
|
||||
* @param vid the id of the VM.
|
||||
*/
|
||||
void snapshot_revert_action(int vid);
|
||||
void snapshot_revert_action(
|
||||
int vid);
|
||||
|
||||
/**
|
||||
* Deletes a snapshot. The VM must have a snapshot with the
|
||||
@@ -431,19 +440,23 @@ private:
|
||||
*
|
||||
* @param vid the id of the VM.
|
||||
*/
|
||||
void snapshot_delete_action(int vid);
|
||||
void snapshot_delete_action(
|
||||
int vid);
|
||||
|
||||
/**
|
||||
* Creates a new disk system snapshot.
|
||||
*
|
||||
* @param vid the id of the VM.
|
||||
*/
|
||||
void disk_snapshot_create_action(int vid);
|
||||
void disk_snapshot_create_action(
|
||||
int vid);
|
||||
|
||||
/**
|
||||
* This function cancels the current driver operation
|
||||
* Resize a VM disk
|
||||
*
|
||||
* @param vid the id of the VM.
|
||||
*/
|
||||
void driver_cancel_action(
|
||||
void disk_resize_action(
|
||||
int vid);
|
||||
};
|
||||
|
||||
|
||||
@@ -401,6 +401,19 @@ private:
|
||||
write_drv("DISKSNAPSHOTCREATE", oid, drv_msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a disk resize request to the MAD:
|
||||
* "RESIZE ID XML_DRV_MSG"
|
||||
* @param oid the virtual machine id.
|
||||
* @param drv_msg xml data for the mad operation
|
||||
*/
|
||||
void disk_resize (
|
||||
const int oid,
|
||||
const string& drv_msg) const
|
||||
{
|
||||
write_drv("RESIZEDISK", oid, drv_msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a request to update the VM security groups:
|
||||
* "UPDATESG ID XML_DRV_MSG"
|
||||
|
||||
Reference in new issue
Block a user