Index: server/lib/gutenbach/server/requests.py
===================================================================
--- server/lib/gutenbach/server/requests.py	(revision b828a96dac6143596be1f8d07d8f319288fde70d)
+++ server/lib/gutenbach/server/requests.py	(revision 793432f59cc3f6d9a34ba213d3911b9cb3b86b05)
@@ -1,5 +1,4 @@
 from gutenbach.server.printer import GutenbachPrinter
 import gutenbach.ipp as ipp
-import gutenbach.ipp.constants as consts
 import logging
 import traceback
@@ -54,5 +53,5 @@
             exctype, excval, exctb = sys.exc_info()
             logger.error("%s: %s" % (exctype.__name__, excval.message))
-            response = ipp.ops.make_empty_response(request)
+            response = ipp.operations.make_empty_response(request)
             excval.update_response(response)
 
@@ -61,5 +60,5 @@
         except Exception:
             logger.error(traceback.format_exc())
-            response = ipp.ops.make_empty_response(request)
+            response = ipp.operations.make_empty_response(request)
             response.operation_id = ipp.StatusCodes.INTERNAL_ERROR
 
@@ -68,11 +67,11 @@
     def unknown_operation(self, request):
         logger.warning("Received unknown operation 0x%x" % request.operation_id)
-        response = ipp.ops.make_empty_response(request)
-        response.operation_id = consts.StatusCodes.OPERATION_NOT_SUPPORTED
+        response = ipp.operations.make_empty_response(request)
+        response.operation_id = ipp.StatusCodes.OPERATION_NOT_SUPPORTED
         return response
         
     ##### Printer Commands
 
-    @handler_for(consts.Operations.PRINT_JOB)
+    @handler_for(ipp.OperationCodes.PRINT_JOB)
     def print_job(self, request):
         """RFC 2911: 3.2.1 Print-Job Operation
@@ -88,10 +87,10 @@
         raise ipp.errors.ServerErrorOperationNotSupported
 
-    @handler_for(consts.Operations.VALIDATE_JOB)
+    @handler_for(ipp.OperationCodes.VALIDATE_JOB)
     def validate_job(self, request):
 
         raise ipp.errors.ServerErrorOperationNotSupported
 
-    @handler_for(consts.Operations.GET_JOBS)
+    @handler_for(ipp.OperationCodes.GET_JOBS)
     def get_jobs(self, request):
         """RFC 2911: 3.2.6 Get-Jobs Operation
@@ -110,5 +109,5 @@
 
         # verify the request and get an attribute dictionary
-        req_dict = ipp.ops.verify_get_jobs_request(request)
+        req_dict = ipp.operations.verify_get_jobs_request(request)
 
         # lookup printer name
@@ -124,12 +123,12 @@
 
         # build the response
-        response = ipp.ops.make_get_jobs_response(jobs, request)
-        return response
-
-    @handler_for(consts.Operations.PRINT_URI)
+        response = ipp.operations.make_get_jobs_response(jobs, request)
+        return response
+
+    @handler_for(ipp.OperationCodes.PRINT_URI)
     def print_uri(self, request):
         raise ipp.errors.ServerErrorOperationNotSupported
 
-    @handler_for(consts.Operations.CREATE_JOB)
+    @handler_for(ipp.OperationCodes.CREATE_JOB)
     def create_job(self, request):
         """RFC 2911: 3.2.4 Create-Job Operation
@@ -183,13 +182,13 @@
         raise ipp.errors.ServerErrorOperationNotSupported
     
-    @handler_for(consts.Operations.PAUSE_PRINTER)
+    @handler_for(ipp.OperationCodes.PAUSE_PRINTER)
     def pause_printer(self, request):
         raise ipp.errors.ServerErrorOperationNotSupported
 
-    @handler_for(consts.Operations.RESUME_PRINTER)
+    @handler_for(ipp.OperationCodes.RESUME_PRINTER)
     def resume_printer(self, request):
         raise ipp.errors.ServerErrorOperationNotSupported
 
-    @handler_for(consts.Operations.GET_PRINTER_ATTRIBUTES)
+    @handler_for(ipp.OperationCodes.GET_PRINTER_ATTRIBUTES)
     def get_printer_attributes(self, request):
         """RFC 2911: 3.2.5 Get-Printer-Attributes Operation
@@ -236,5 +235,5 @@
 
         # verify the request and get the attributes dictionary
-        req_dict = ipp.ops.verify_get_printer_attributes_request(request)
+        req_dict = ipp.operations.verify_get_printer_attributes_request(request)
 
         # lookup the printer name
@@ -246,9 +245,9 @@
 
         # bulid response
-        response = ipp.ops.make_get_printer_attributes_response(
+        response = ipp.operations.make_get_printer_attributes_response(
             self.printers[printer_name].get_printer_attributes(request), request)
         return response
 
-    @handler_for(consts.Operations.SET_PRINTER_ATTRIBUTES)
+    @handler_for(ipp.OperationCodes.SET_PRINTER_ATTRIBUTES)
     def set_printer_attributes(self, request):
         raise ipp.errors.ServerErrorOperationNotSupported
@@ -256,21 +255,21 @@
     ##### Job Commands
 
-    @handler_for(consts.Operations.CANCEL_JOB)
+    @handler_for(ipp.OperationCodes.CANCEL_JOB)
     def cancel_job(self, request):
         raise ipp.errors.ServerErrorOperationNotSupported
 
-    @handler_for(consts.Operations.SEND_DOCUMENT)
+    @handler_for(ipp.OperationCodes.SEND_DOCUMENT)
     def send_document(self, request):
         raise ipp.errors.ServerErrorOperationNotSupported
 
-    @handler_for(consts.Operations.SEND_URI)
+    @handler_for(ipp.OperationCodes.SEND_URI)
     def send_uri(self, request):
         raise ipp.errors.ServerErrorOperationNotSupported
 
-    @handler_for(consts.Operations.GET_JOB_ATTRIBUTES)
+    @handler_for(ipp.OperationCodes.GET_JOB_ATTRIBUTES)
     def get_job_attributes(self, request):
         
         # verify the request and get the attributes dictionary
-        req_dict = ipp.ops.verify_get_jobs_request(request)
+        req_dict = ipp.operations.verify_get_jobs_request(request)
         
         # lookup the printer name
@@ -291,17 +290,17 @@
         # XXX: we need to honor the things that the request actually asks for
         # build the response
-        response = ipp.ops.make_get_job_attributes_response(
+        response = ipp.operations.make_get_job_attributes_response(
             job.get_job_attributes(request), request)
         return response
 
-    @handler_for(consts.Operations.SET_JOB_ATTRIBUTES)
+    @handler_for(ipp.OperationCodes.SET_JOB_ATTRIBUTES)
     def set_job_attributes(self, request):
         raise ipp.errors.ServerErrorOperationNotSupported
 
-    @handler_for(consts.Operations.RESTART_JOB)
+    @handler_for(ipp.OperationCodes.RESTART_JOB)
     def restart_job(self, request):
         raise ipp.errors.ServerErrorOperationNotSupported
 
-    @handler_for(consts.Operations.PROMOTE_JOB)
+    @handler_for(ipp.OperationCodes.PROMOTE_JOB)
     def promote_job(self, request):
         raise ipp.errors.ServerErrorOperationNotSupported
@@ -309,9 +308,9 @@
     ##### CUPS Specific Commands
 
-    @handler_for(consts.Operations.CUPS_GET_DOCUMENT)
+    @handler_for(ipp.OperationCodes.CUPS_GET_DOCUMENT)
     def cups_get_document(self, request):
         raise ipp.errors.ServerErrorOperationNotSupported
 
-    @handler_for(consts.Operations.CUPS_GET_DEFAULT)
+    @handler_for(ipp.OperationCodes.CUPS_GET_DEFAULT)
     def cups_get_default(self, request):
         """The CUPS-Get-Default operation (0x4001) returns the default
@@ -323,11 +322,11 @@
 
         # verify the request and get the attributes dictionary
-        req_dict = ipp.ops.verify_cups_get_default_request(request)
-        # build the response
-        response = ipp.ops.make_get_printer_attributes_response(
+        req_dict = ipp.operations.verify_cups_get_default_request(request)
+        # build the response
+        response = ipp.operations.make_get_printer_attributes_response(
             self.printers[self.default].get_printer_attributes(request), request)
         return response
 
-    @handler_for(consts.Operations.CUPS_GET_PRINTERS)
+    @handler_for(ipp.OperationCodes.CUPS_GET_PRINTERS)
     def cups_get_printers(self, request):
         """The CUPS-Get-Printers operation (0x4002) returns the
@@ -341,13 +340,13 @@
 
         # verify the request and get the attributes dictionary
-        req_dict = ipp.ops.verify_cups_get_printers_request(request)
+        req_dict = ipp.operations.verify_cups_get_printers_request(request)
         # get the printer attributes
         attrs = [self.printers[printer].get_printer_attributes(request) \
                  for printer in self.printers]
         # build the response
-        response = ipp.ops.make_cups_get_printers_response(attrs, request)
-        return response
-
-    @handler_for(consts.Operations.CUPS_GET_CLASSES)
+        response = ipp.operations.make_cups_get_printers_response(attrs, request)
+        return response
+
+    @handler_for(ipp.OperationCodes.CUPS_GET_CLASSES)
     def cups_get_classes(self, request):
         """The CUPS-Get-Classes operation (0x4005) returns the printer
@@ -361,6 +360,6 @@
 
         # verify the request and get the attributes dictionaryu
-        req_dict = ipp.ops.verify_cups_get_classes_request(request)
-        # build the response
-        response = ipp.ops.make_cups_get_classes_response(request)
-        return response
+        req_dict = ipp.operations.verify_cups_get_classes_request(request)
+        # build the response
+        response = ipp.operations.make_cups_get_classes_response(request)
+        return response
