Added support for feature parity with the current Rackspace Cloud Servers practice of "injecting" files into newly-created instances for configuration, etc. However, this is in no way restricted to only writing files to the guest when it is first created.
This commit is contained in:
@@ -202,6 +202,14 @@ class ComputeTestCase(test.TestCase):
|
|||||||
self.compute.set_admin_password(self.context, instance_id)
|
self.compute.set_admin_password(self.context, instance_id)
|
||||||
self.compute.terminate_instance(self.context, instance_id)
|
self.compute.terminate_instance(self.context, instance_id)
|
||||||
|
|
||||||
|
def test_inject_file(self):
|
||||||
|
"""Ensure we can write a file to an instance"""
|
||||||
|
instance_id = self._create_instance()
|
||||||
|
self.compute.run_instance(self.context, instance_id)
|
||||||
|
self.compute.inject_file(self.context, instance_id, "/tmp/test",
|
||||||
|
"File Contents")
|
||||||
|
self.compute.terminate_instance(self.context, instance_id)
|
||||||
|
|
||||||
def test_snapshot(self):
|
def test_snapshot(self):
|
||||||
"""Ensure instance can be snapshotted"""
|
"""Ensure instance can be snapshotted"""
|
||||||
instance_id = self._create_instance()
|
instance_id = self._create_instance()
|
||||||
|
|||||||
Reference in New Issue
Block a user