Adds support for Pause and Unpause of xenserver instances.
Pause freezes the vm, keeping resources in-memory. I used this version of python cloudservers to test with: https://github.com/SandyWalsh/python-cloudservers url's are http://a.b.c.d/v1.0/servers/#######/pause and http://a.b.c.d/v1.0/servers/#######/unpause Note: no support for libvirt.
This commit is contained in:
@@ -194,6 +194,7 @@ class HostInfo(object):
|
||||
|
||||
|
||||
class NovaAdminClient(object):
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
clc_url=DEFAULT_CLC_URL,
|
||||
|
@@ -127,6 +127,14 @@ class ComputeTestCase(test.TestCase):
|
||||
self.assert_(instance_ref['launched_at'] < terminate)
|
||||
self.assert_(instance_ref['deleted_at'] > terminate)
|
||||
|
||||
def test_pause(self):
|
||||
"""Ensure instance can be paused"""
|
||||
instance_id = self._create_instance()
|
||||
self.compute.run_instance(self.context, instance_id)
|
||||
self.compute.pause_instance(self.context, instance_id)
|
||||
self.compute.unpause_instance(self.context, instance_id)
|
||||
self.compute.terminate_instance(self.context, instance_id)
|
||||
|
||||
def test_reboot(self):
|
||||
"""Ensure instance can be rebooted"""
|
||||
instance_id = self._create_instance()
|
||||
|
Reference in New Issue
Block a user