Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first step towards image refactoring #495

Merged
6 commits merged into from
Dec 4, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions mimic/model/rackspace_image_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from __future__ import absolute_import, division, unicode_literals
from characteristic import attributes, Attribute
from six import iteritems
from mimic.model.rackspace_images import (RackspaceWindowsImage, RackspaceArchImage,
from mimic.model.rackspace_images import (RackspaceWindowsImage,
RackspaceCentOSPVImage, RackspaceCentOSPVHMImage,
RackspaceCoreOSImage, RackspaceDebianImage,
RackspaceFedoraImage, RackspaceFreeBSDImage,
Expand All @@ -16,6 +16,8 @@
RackspaceOnMetalDebianImage, RackspaceOnMetalFedoraImage,
RackspaceOnMetalUbuntuImage)

from mimic.model.rackspace_images import create_rackspace_images


@attributes([Attribute("image_list", default_factory=list)])
class RackspaceImageStore(object):
Expand All @@ -27,7 +29,7 @@ def create_image_store(self, tenant_id):
"""
Generates the data for each image in each image class
"""
image_classes = [RackspaceWindowsImage, RackspaceArchImage, RackspaceCentOSPVImage,
image_classes = [RackspaceWindowsImage, RackspaceCentOSPVImage,
RackspaceCentOSPVHMImage, RackspaceCoreOSImage, RackspaceDebianImage,
RackspaceFedoraImage, RackspaceFreeBSDImage, RackspaceGentooImage,
RackspaceOpenSUSEImage, RackspaceRedHatPVImage, RackspaceRedHatPVHMImage,
Expand All @@ -49,6 +51,7 @@ def create_image_store(self, tenant_id):
if 'com.rackspace__1__ui_default_show' in image_spec:
image.set_is_default()
self.image_list.append(image)
self.image_list.extend(create_rackspace_images(tenant_id))
return self.image_list

def get_image_by_id(self, image_id):
Expand Down
Loading