enable images
diff --git a/plstackapi/planetstack/api/images.py b/plstackapi/planetstack/api/images.py
new file mode 100644
index 0000000..042219d
--- /dev/null
+++ b/plstackapi/planetstack/api/images.py
@@ -0,0 +1,21 @@
+from plstackapi.openstack.client import OpenStackClient
+from plstackapi.openstack.driver import OpenStackDriver
+from plstackapi.planetstack.api.auth import auth_check
+from plstackapi.planetstack.models import Image
+ 
+
+def add_image(auth, fields={}):
+    """not implemented"""
+    return 
+
+def delete_image(auth, filter={}):
+    """not implemented"""
+    return 1
+
+def get_images(auth, filter={}):
+    auth_check(auth)   
+    images = Image.objects.filter(**filter)
+    return images             
+        
+
+    
diff --git a/plstackapi/planetstack/serializers.py b/plstackapi/planetstack/serializers.py
index df0b100..b1ea4ec 100644
--- a/plstackapi/planetstack/serializers.py
+++ b/plstackapi/planetstack/serializers.py
@@ -80,7 +80,7 @@
         model = Sliver
         fields = ('id',
                   'slice',
-                 'name')
+                  'name')
 
 class NodeSerializer(serializers.ModelSerializer):
 
@@ -89,6 +89,24 @@
         fields = ('id',
                  'name')
 
+class ImageSerializer(serializers.ModelSerializer):
+
+    class Meta:
+        model = Image
+        fields = ('image_id',
+                  'name',
+                  'disk_format',
+                  'container_format')
+
+class FlavorSerializer(serializers.ModelSerializer):
+
+    class Meta:
+        model = Flavor
+        fields = ('flavor_id',
+                  'name',
+                  'memory_mb',
+                  'disk_gb',
+                  'vcpus')
 
 serializerLookUp = { 
                  Role: RoleSerializer,
@@ -98,5 +116,8 @@
                  Sliver: SliverSerializer,
                  DeploymentNetwork: DeploymentNetworkSerializer,
                  SiteDeploymentNetwork: SiteDeploymentNetworkSerializer,
+                 Image: ImageSerializer,
+                 Flavor: FlavorSerializer, 
                  None: None,
                 }
+
diff --git a/plstackapi/planetstack/urls.py b/plstackapi/planetstack/urls.py
index 33db4f2..ecff5a0 100644
--- a/plstackapi/planetstack/urls.py
+++ b/plstackapi/planetstack/urls.py
@@ -5,6 +5,7 @@
 from plstackapi.planetstack.views.roles import RoleListCreate, RoleRetrieveUpdateDestroy
 from plstackapi.planetstack.views.sites import SiteListCreate, SiteRetrieveUpdateDestroy
 from plstackapi.planetstack.views.deployment_networks import DeploymentNetworkListCreate, DeploymentNetworkRetrieveUpdateDestroy
+from plstackapi.planetstack.views.images import ImageListCreate, ImageRetrieveUpdateDestroy
 from plstackapi.planetstack.views.api_root import api_root
 from plstackapi.planetstack.models import Site
 from rest_framework import generics
@@ -39,12 +40,15 @@
     #url(r'^plstackapi/nodes/$', views.NodeList.as_view(), name='node-list'),
     #url(r'^plstackapi/nodes/(?P<pk>[0-9]+)/$', views.NodeDetail.as_view(), name='node-detail'),
 
+    
     url(r'^plstackapi/deploymentnetworks/$', DeploymentNetworkListCreate.as_view(), name='deploymentnetwork-list'),
     url(r'^plstackapi/deploymentnetworks/(?P<pk>[a-zA-Z0-9]+)/$', DeploymentNetworkRetrieveUpdateDestroy.as_view(), name='deploymentnetwork-detail'),
 
     #url(r'^plstackapi/sitedeploymentnetworks/$', views.SiteDeploymentNetworkList.as_view(), name='sitedeploymentnetwork-list'),
     #url(r'^plstackapi/sitedeploymentnetworks/(?P<pk>[0-9]+)/$', views.SiteDeploymentNetworkDetail.as_view(), name='sitedeploymentnetwork-detail'),
 
+    url(r'^plstackapi/images/$', ImageListCreate.as_view(), name='image-list'),
+    url(r'^plstackapi/images/(?P<pk>[a-zA-Z0-9_]+)/$', ImageRetrieveUpdateDestroy.as_view(), name='image-detail'),
 
     #Adding in rest_framework urls
     url(r'^plstackapi/', include('rest_framework.urls', namespace='rest_framework')),
diff --git a/plstackapi/planetstack/views/api_root.py b/plstackapi/planetstack/views/api_root.py
index ec42198..ff3b8f8 100644
--- a/plstackapi/planetstack/views/api_root.py
+++ b/plstackapi/planetstack/views/api_root.py
@@ -10,4 +10,5 @@
         'sites': reverse('site-list', request=request, format=format),
         'deploymentNetworks': reverse('deploymentnetwork-list', request=request, format=format),
         #'slices': reverse('slice-list', request=request, format=format)
+        'images': reverse('image-list', request=request, format=format),
     })
diff --git a/plstackapi/planetstack/views/images.py b/plstackapi/planetstack/views/images.py
new file mode 100644
index 0000000..af26799
--- /dev/null
+++ b/plstackapi/planetstack/views/images.py
@@ -0,0 +1,55 @@
+from django.http import Http404
+from rest_framework.views import APIView
+from rest_framework.response import Response
+from rest_framework import status
+
+from plstackapi.planetstack.api.images import add_image, delete_image, get_images
+from plstackapi.planetstack.serializers import ImageSerializer
+from plstackapi.util.request import parse_request
+
+
+class ImageListCreate(APIView):
+    """ 
+    List all images or create a new image.
+    """
+
+    def post(self, request, format = None):
+        data = parse_request(request.DATA)  
+        if 'auth' not in data:
+            return Response(status=status.HTTP_400_BAD_REQUEST)        
+        elif 'image' in data:
+            """Not Implemented"""
+            return Response(status=status.HTTP_404_NOT_FOUND)
+        else:
+            images = get_images(data['auth'])
+            serializer = ImageSerializer(images, many=True)
+            return Response(serializer.data)
+        
+            
+class ImageRetrieveUpdateDestroy(APIView):
+    """
+    Retrieve, update or delete an image  
+    """
+
+    def post(self, request, pk, format=None):
+        """Retrieve an image """
+        data = parse_request(request.DATA)
+        if 'auth' not in data:
+            return Response(status=status.HTTP_400_BAD_REQUEST)
+        images = get_images(data['auth'], {'name': pk})
+        if not images:
+            return Response(status=status.HTTP_404_NOT_FOUND)
+        serializer = ImageSerializer(images[0])
+        return Response(serializer.data)                  
+
+    def put(self, request, pk, format=None):
+        """update image not implemnted""" 
+        return Response(status=status.HTTP_404_NOT_FOUND) 
+
+    def delete(self, request, pk, format=None):
+        """delete image not implemnted""" 
+        return Response(status=status.HTTP_404_NOT_FOUND) 
+
+            
+            
+