From 99e3061f7bad73db49c2917986e7f97ee38bfb53 Mon Sep 17 00:00:00 2001 From: Marta Carbone Date: Wed, 22 Apr 2009 15:41:05 +0000 Subject: [PATCH] Return base64 encoded image. --- PLC/Methods/GetDummyBoxMedium.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/PLC/Methods/GetDummyBoxMedium.py b/PLC/Methods/GetDummyBoxMedium.py index 2fb4e55f..785c0654 100644 --- a/PLC/Methods/GetDummyBoxMedium.py +++ b/PLC/Methods/GetDummyBoxMedium.py @@ -109,6 +109,7 @@ class GetDummyBoxMedium(Method): raise PLCInvalidArgument, "No primary network configured on %s" % dummybox_hostname dummybox = interface_info + dummybox['hostname']=dummybox_hostname # Select the base image, default to bin image if type != 'iso': @@ -120,10 +121,6 @@ class GetDummyBoxMedium(Method): # Permission checks assert self.caller is not None - if 'admin' not in self.caller['roles']: - if dummybox['site_id'] not in self.caller['site_ids']: - raise PLCPermissionDenied, "Not allowed to generate an iso image for %s %s" % \ - (dummybox['hostname'], dummybox_id) # Start the generation of the image # Generate a new key @@ -164,5 +161,5 @@ class GetDummyBoxMedium(Method): dummybox.sync() # return the file - return IMAGE_NAME + #return IMAGE_NAME return base64.b64encode(file(IMAGE_NAME).read()) -- 2.47.0