예제 #1
0
 def GET(self, image_id=''):
 # User needs to authenticate to get details for image(s)
     auth_token = web.ctx.get('environ').get('HTTP_X_AUTH_TOKEN', None)
     auth_tenant_id = web.ctx.get('environ').get('HTTP_X_AUTH_TENANT_ID', None)
     
     if len(image_id) <= 0:
         return json.dumps(image.get_images(auth_token), indent=4)
     else:
         return json.dumps(image.get_image_meta(image_id, auth_token), indent=4)
예제 #2
0
    def __init__(self, **kwargs):
        tk.Tk.__init__(self, **kwargs)
        #self.geometry('2000x2000')
        self.attributes("-fullscreen", True)
        self.wm_attributes('-type', 'splash')  # no title bar
        self.attributes('-zoomed', True)  # fullscreen
        self.window = tk.Label(self, bg='black')
        self.window.pack(fill=tk.BOTH, expand=True)

        # preload all images
        self.cache = get_images()

        self.current = ''  # keep track of currently loaded image
예제 #3
0
 def test_5get_images(self):
     data = image.get_images(token)
     print "\nImage Data:", data
     self.assertIsNotNone(data, 'No data')