diff options
Diffstat (limited to 'tests/cloud_tests/platforms')
-rw-r--r-- | tests/cloud_tests/platforms/ec2/image.py | 10 | ||||
-rw-r--r-- | tests/cloud_tests/platforms/images.py | 3 | ||||
-rw-r--r-- | tests/cloud_tests/platforms/nocloudkvm/image.py | 10 |
3 files changed, 2 insertions, 21 deletions
diff --git a/tests/cloud_tests/platforms/ec2/image.py b/tests/cloud_tests/platforms/ec2/image.py index 53706b1d..7bedf59d 100644 --- a/tests/cloud_tests/platforms/ec2/image.py +++ b/tests/cloud_tests/platforms/ec2/image.py @@ -33,16 +33,6 @@ class EC2Image(Image): self._img_instance.start(wait=True, wait_for_cloud_init=True) return self._img_instance - @property - def properties(self): - """Dictionary containing: 'arch', 'os', 'version', 'release'.""" - return { - 'arch': self.config['arch'], - 'os': self.config['family'], - 'release': self.config['release'], - 'version': self.config['version'], - } - def destroy(self): """Delete the instance used to create a custom image.""" if self._img_instance: diff --git a/tests/cloud_tests/platforms/images.py b/tests/cloud_tests/platforms/images.py index d503108a..557a5cf6 100644 --- a/tests/cloud_tests/platforms/images.py +++ b/tests/cloud_tests/platforms/images.py @@ -26,7 +26,8 @@ class Image(TargetBase): @property def properties(self): """{} containing: 'arch', 'os', 'version', 'release'.""" - raise NotImplementedError + return {k: self.config[k] + for k in ('arch', 'os', 'release', 'version')} @property def features(self): diff --git a/tests/cloud_tests/platforms/nocloudkvm/image.py b/tests/cloud_tests/platforms/nocloudkvm/image.py index 09ff2a3b..bc2b6e75 100644 --- a/tests/cloud_tests/platforms/nocloudkvm/image.py +++ b/tests/cloud_tests/platforms/nocloudkvm/image.py @@ -35,16 +35,6 @@ class NoCloudKVMImage(Image): super(NoCloudKVMImage, self).__init__(platform, config) - @property - def properties(self): - """Dictionary containing: 'arch', 'os', 'version', 'release'.""" - return { - 'arch': self.config['arch'], - 'os': self.config['family'], - 'release': self.config['release'], - 'version': self.config['version'], - } - def _execute(self, command, stdin=None, env=None): """Execute command in image, modifying image.""" return self.mount_image_callback(command, stdin=stdin, env=env) |