mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-23 21:57:43 +03:00
feature #1223: Attach operation name missmatch. attach operations for the dummy driver
This commit is contained in:
parent
214133ebdd
commit
e05dbdb5bd
@ -241,7 +241,7 @@ private:
|
||||
const int oid,
|
||||
const string& drv_msg) const
|
||||
{
|
||||
write_drv("ATTACH", oid, drv_msg);
|
||||
write_drv("ATTACHDISK", oid, drv_msg);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -253,7 +253,7 @@ private:
|
||||
const int oid,
|
||||
const string& drv_msg) const
|
||||
{
|
||||
write_drv("DETACH", oid, drv_msg);
|
||||
write_drv("DETACHDISK", oid, drv_msg);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -335,7 +335,7 @@ void VirtualMachineManagerDriver::protocol(
|
||||
vmpool->update(vm);
|
||||
}
|
||||
}
|
||||
else if ( action == "ATTACH" )
|
||||
else if ( action == "ATTACHDISK" )
|
||||
{
|
||||
Nebula &ne = Nebula::instance();
|
||||
LifeCycleManager *lcm = ne.get_lcm();
|
||||
@ -354,7 +354,7 @@ void VirtualMachineManagerDriver::protocol(
|
||||
lcm->trigger(LifeCycleManager::ATTACH_FAILURE, id);
|
||||
}
|
||||
}
|
||||
else if ( action == "DETACH" )
|
||||
else if ( action == "DETACHDISK" )
|
||||
{
|
||||
Nebula &ne = Nebula::instance();
|
||||
LifeCycleManager *lcm = ne.get_lcm();
|
||||
|
@ -76,6 +76,14 @@ class DummyDriver < VirtualMachineDriver
|
||||
send_message(ACTION[:migrate],RESULT[:success],id)
|
||||
end
|
||||
|
||||
def attach_disk(id, drv_message)
|
||||
send_message(ACTION[:attach_disk],RESULT[:success],id)
|
||||
end
|
||||
|
||||
def detach_disk(id, drv_message)
|
||||
send_message(ACTION[:detach_disk],RESULT[:success],id)
|
||||
end
|
||||
|
||||
def poll(id, drv_message)
|
||||
# monitor_info: string in the form "VAR=VAL VAR=VAL ... VAR=VAL"
|
||||
# known VAR are in POLL_ATTRIBUTES. VM states VM_STATES
|
||||
|
Loading…
x
Reference in New Issue
Block a user