mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-11 05:17:41 +03:00
Merge branch 'feature-1791' of git.opennebula.org:one into feature-1791
This commit is contained in:
commit
d004f4277a
@ -108,7 +108,10 @@
|
|||||||
BOOT_STOPPED = 22,
|
BOOT_STOPPED = 22,
|
||||||
CLEANUP_DELETE = 23,
|
CLEANUP_DELETE = 23,
|
||||||
HOTPLUG_SNAPSHOT = 24,
|
HOTPLUG_SNAPSHOT = 24,
|
||||||
HOTPLUG_NIC = 25
|
HOTPLUG_NIC = 25,
|
||||||
|
HOTPLUG_SAVEAS = 26,
|
||||||
|
HOTPLUG_SAVEAS_POWEROFF = 27,
|
||||||
|
HOTPLUG_SAVEAS_SUSPENDED = 28
|
||||||
-->
|
-->
|
||||||
<xs:element name="LCM_STATE" type="xs:integer"/>
|
<xs:element name="LCM_STATE" type="xs:integer"/>
|
||||||
<xs:element name="RESCHED" type="xs:integer"/>
|
<xs:element name="RESCHED" type="xs:integer"/>
|
||||||
|
@ -70,7 +70,10 @@
|
|||||||
BOOT_STOPPED = 22,
|
BOOT_STOPPED = 22,
|
||||||
CLEANUP_DELETE = 23,
|
CLEANUP_DELETE = 23,
|
||||||
HOTPLUG_SNAPSHOT = 24,
|
HOTPLUG_SNAPSHOT = 24,
|
||||||
HOTPLUG_NIC = 25
|
HOTPLUG_NIC = 25,
|
||||||
|
HOTPLUG_SAVEAS = 26,
|
||||||
|
HOTPLUG_SAVEAS_POWEROFF = 27,
|
||||||
|
HOTPLUG_SAVEAS_SUSPENDED = 28
|
||||||
-->
|
-->
|
||||||
<xs:element name="LCM_STATE" type="xs:integer"/>
|
<xs:element name="LCM_STATE" type="xs:integer"/>
|
||||||
<xs:element name="RESCHED" type="xs:integer"/>
|
<xs:element name="RESCHED" type="xs:integer"/>
|
||||||
|
@ -79,7 +79,7 @@ int Document::insert(SqlDB *db, string& error_str)
|
|||||||
// Check default attributes
|
// Check default attributes
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
|
|
||||||
get_template_attribute("NAME", name);
|
erase_template_attribute("NAME", name);
|
||||||
|
|
||||||
if ( name.empty() == true )
|
if ( name.empty() == true )
|
||||||
{
|
{
|
||||||
@ -199,8 +199,8 @@ string& Document::to_xml(string& xml) const
|
|||||||
<< "<ID>" << oid << "</ID>"
|
<< "<ID>" << oid << "</ID>"
|
||||||
<< "<UID>" << uid << "</UID>"
|
<< "<UID>" << uid << "</UID>"
|
||||||
<< "<GID>" << gid << "</GID>"
|
<< "<GID>" << gid << "</GID>"
|
||||||
<< "<UNAME>" << uname << "</UNAME>"
|
<< "<UNAME>" << uname << "</UNAME>"
|
||||||
<< "<GNAME>" << gname << "</GNAME>"
|
<< "<GNAME>" << gname << "</GNAME>"
|
||||||
<< "<NAME>" << name << "</NAME>"
|
<< "<NAME>" << name << "</NAME>"
|
||||||
<< "<TYPE>" << type << "</TYPE>"
|
<< "<TYPE>" << type << "</TYPE>"
|
||||||
<< perms_to_xml(perm_str)
|
<< perms_to_xml(perm_str)
|
||||||
|
@ -96,7 +96,10 @@ public class VirtualMachine extends PoolElement{
|
|||||||
"BOOT_STOPPED",
|
"BOOT_STOPPED",
|
||||||
"CLEANUP_DELETE",
|
"CLEANUP_DELETE",
|
||||||
"HOTPLUG_SNAPSHOT",
|
"HOTPLUG_SNAPSHOT",
|
||||||
"HOTPLUG_NIC" };
|
"HOTPLUG_NIC",
|
||||||
|
"HOTPLUG_SAVEAS",
|
||||||
|
"HOTPLUG_SAVEAS_POWEROFF",
|
||||||
|
"HOTPLUG_SAVEAS_SUSPENDED" };
|
||||||
|
|
||||||
private static final String[] SHORT_LCM_STATES =
|
private static final String[] SHORT_LCM_STATES =
|
||||||
{
|
{
|
||||||
@ -124,7 +127,11 @@ public class VirtualMachine extends PoolElement{
|
|||||||
"boot",
|
"boot",
|
||||||
"boot",
|
"boot",
|
||||||
"clea",
|
"clea",
|
||||||
"snap" };
|
"snap",
|
||||||
|
"hotp",
|
||||||
|
"hotp",
|
||||||
|
"hotp",
|
||||||
|
"hotp" };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new VM representation.
|
* Creates a new VM representation.
|
||||||
@ -468,9 +475,9 @@ public class VirtualMachine extends PoolElement{
|
|||||||
* @param imageName Name of the new Image that will be created.
|
* @param imageName Name of the new Image that will be created.
|
||||||
* @return If an error occurs the error message contains the reason.
|
* @return If an error occurs the error message contains the reason.
|
||||||
*/
|
*/
|
||||||
public OneResponse savedisk(int diskId, String imageName)
|
public OneResponse savedisk(int diskId, String imageName, boolean hot = false)
|
||||||
{
|
{
|
||||||
return savedisk(diskId, imageName, "");
|
return savedisk(diskId, imageName, "", hot);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -481,11 +488,13 @@ public class VirtualMachine extends PoolElement{
|
|||||||
* @param imageName Name of the new Image that will be created.
|
* @param imageName Name of the new Image that will be created.
|
||||||
* @param imageType Type of the new image. Set to empty string to use
|
* @param imageType Type of the new image. Set to empty string to use
|
||||||
* the default type
|
* the default type
|
||||||
|
* @param hot do not defer saveas operation
|
||||||
* @return If an error occurs the error message contains the reason.
|
* @return If an error occurs the error message contains the reason.
|
||||||
*/
|
*/
|
||||||
public OneResponse savedisk(int diskId, String imageName, String imageType)
|
public OneResponse savedisk(int diskId, String imageName, String imageType,
|
||||||
|
boolean hot)
|
||||||
{
|
{
|
||||||
return client.call(SAVEDISK, id ,diskId, imageName, imageType);
|
return client.call(SAVEDISK, id ,diskId, imageName, imageType, hot);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -104,7 +104,10 @@ var oZones = {
|
|||||||
"BOOT_STOPPED",
|
"BOOT_STOPPED",
|
||||||
"CLEANUP_DELETE",
|
"CLEANUP_DELETE",
|
||||||
"HOTPLUG_SNAPSHOT",
|
"HOTPLUG_SNAPSHOT",
|
||||||
"HOTPLUG_NIC"][value]);
|
"HOTPLUG_NIC",
|
||||||
|
"HOTPLUG_SAVEAS",
|
||||||
|
"HOTPLUG_SAVEAS_POWEROFF",
|
||||||
|
"HOTPLUG_SAVEAS_SUSPENDED"][value]);
|
||||||
break;
|
break;
|
||||||
case "IMAGE":
|
case "IMAGE":
|
||||||
case "image":
|
case "image":
|
||||||
|
@ -112,7 +112,10 @@ var OpenNebula = {
|
|||||||
"BOOT_STOPPED",
|
"BOOT_STOPPED",
|
||||||
"CLEANUP_DELETE",
|
"CLEANUP_DELETE",
|
||||||
"HOTPLUG_SNAPSHOT",
|
"HOTPLUG_SNAPSHOT",
|
||||||
"HOTPLUG_NIC"][value]);
|
"HOTPLUG_NIC",
|
||||||
|
"HOTPLUG_SAVEAS",
|
||||||
|
"HOTPLUG_SAVEAS_POWEROFF",
|
||||||
|
"HOTPLUG_SAVEAS_SUSPENDED"][value]);
|
||||||
break;
|
break;
|
||||||
case "IMAGE":
|
case "IMAGE":
|
||||||
case "image":
|
case "image":
|
||||||
|
@ -49,8 +49,7 @@ var vm_graphs = [
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
var VNCstates=["RUNNING","SHUTDOWN","SHUTDOWN_POWEROFF","UNKNOWN","HOTPLUG","CANCEL","MIGRATE", "HOTPLUG_SNAPSHOT", "HOTPLUG_NIC", "HOTPLUG_SAVEAS", "HOTPLUG_SAVEAS_POWEROFF", "HOTPLUG_SAVEAS_SUSPENDED"];
|
||||||
var VNCstates=["RUNNING","SHUTDOWN","SHUTDOWN_POWEROFF","UNKNOWN","HOTPLUG","CANCEL","MIGRATE", "HOTPLUG_SNAPSHOT", "HOTPLUG_NIC"];
|
|
||||||
|
|
||||||
//Permanent storage for last value of aggregated network usage
|
//Permanent storage for last value of aggregated network usage
|
||||||
//Used to calculate bandwidth
|
//Used to calculate bandwidth
|
||||||
|
@ -81,7 +81,7 @@ int VMTemplate::insert(SqlDB *db, string& error_str)
|
|||||||
// Check default attributes
|
// Check default attributes
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
|
|
||||||
get_template_attribute("NAME", name);
|
erase_template_attribute("NAME", name);
|
||||||
|
|
||||||
if ( name.empty() == true )
|
if ( name.empty() == true )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user