Index: server/lib/gutenbach/ipp/operations.py
===================================================================
--- server/lib/gutenbach/ipp/operations.py	(revision 71bfce0b333b007df44decc7e73d62251f97b911)
+++ server/lib/gutenbach/ipp/operations.py	(revision f6c6897421d09df51b72b4539328adec41072c46)
@@ -3,8 +3,6 @@
 from .attributegroup import AttributeGroup
 from .request import Request
-from .constants import AttributeTags, operations_attribute_value_tags
+from .constants import AttributeTags, StatusCodes, operations_attribute_value_tags
 import exceptions as err
-
-from collections import OrderedDictionary as odict
 
 def verify_operations(request):
@@ -43,5 +41,4 @@
 
     # check charset
-    charset attribute
     charset_attr = op_attrs.attributes[0]
     if charset_attr.name != 'attributes-charset':
@@ -73,5 +70,5 @@
     if natlang_value.tag != operations_attribute_value_tags['attributes-natural-language']:
         raise err.BadRequest(
-            "Natural language value does not have NATURAL_LANGUAGE tag: 0x%x" natlang_value.tag)
+            "Natural language value does not have NATURAL_LANGUAGE tag: 0x%x" % natlang_value.tag)
     if natlang_value.value != 'en-us':
         raise err.Attributes(
@@ -115,14 +112,14 @@
     # Operation attributes -- typically the same for any request
     attributes = [
-        ipp.Attribute(
+        Attribute(
             'attributes-charset',
-            [(operations_attribute_value_tags['attributes-charset'], 'utf-8')]),
-        ipp.Attribute(
+            [Value(operations_attribute_value_tags['attributes-charset'], 'utf-8')]),
+        Attribute(
             'attributes-natural-language',
-            [(operations_attribute_value_tags['attributes-natural-language'], 'en-us')])
+            [Value(operations_attribute_value_tags['attributes-natural-language'], 'en-us')])
         ]
     # Put the operation attributes in a group
-    attribute_group = ipp.AttributeGroup(
-        const.AttributeTags.OPERATION,
+    attribute_group = AttributeGroup(
+        AttributeTags.OPERATION,
         attributes)
 
@@ -131,8 +128,8 @@
     response_kwargs = {}
     response_kwargs['version']          = request.version
-    response_kwargs['operation_id']     = const.StatusCodes.OK
+    response_kwargs['operation_id']     = StatusCodes.OK
     response_kwargs['request_id']       = request.request_id
     response_kwargs['attribute_groups'] = [attribute_group]
-    response = ipp.Request(**response_kwargs)
+    response = Request(**response_kwargs)
 
     return response
@@ -168,8 +165,8 @@
             if 'which-jobs' or 'my-jobs' constrain which jobs are
             returned. The limit is a 'stateless limit' in that if
-            the value supplied by the client is ’N’, then only the
-            first ’N’ jobs are returned in the Get-Jobs Response.
-            There is no mechanism to allow for the next ’M’ jobs
-            after the first ’N’ jobs. If the client does not
+            the value supplied by the client is 'N', then only the
+            first 'N' jobs are returned in the Get-Jobs Response.
+            There is no mechanism to allow for the next 'M' jobs
+            after the first 'N' jobs. If the client does not
             supply this attribute, the Printer object responds
             with all applicable jobs.
@@ -185,5 +182,5 @@
             the client does not supply this attribute, the Printer
             MUST respond as if the client had supplied this
-            attribute with two values: ’job-uri’ and ’job-id’.
+            attribute with two values: 'job-uri' and 'job-id'.
         'which-jobs' (type2 keyword):
             The client OPTIONALLY supplies this attribute. The
@@ -191,22 +188,22 @@
             indicates which Job objects MUST be returned by the
             Printer object. The values for this attribute are:
-             - ’completed’: This includes any Job object whose
-               state is ’completed’, ’canceled’, or ’aborted’.
-             - ’not-completed’: This includes any Job object whose
-               state is ’pending’, ’processing’,
-               ’processing-stopped’, or ’pending-held’.
+             - 'completed': This includes any Job object whose
+               state is 'completed', 'canceled', or 'aborted'.
+             - 'not-completed': This includes any Job object whose
+               state is 'pending', 'processing',
+               'processing-stopped', or 'pending-held'.
             A Printer object MUST support both values. However, if
             the implementation does not keep jobs in the
-            ’completed’, ’canceled’, and ’aborted’ states, then it
-            returns no jobs when the ’completed’ value is
+            'completed', 'canceled', and 'aborted' states, then it
+            returns no jobs when the 'completed' value is
             supplied.  If a client supplies some other value, the
             Printer object MUST copy the attribute and the
             unsupported value to the Unsupported Attributes
             response group, reject the request, and return the
-            ’client-error-attributes-or-values-not-supported’
+            'client-error-attributes-or-values-not-supported'
             status code.  If the client does not supply this
             attribute, the Printer object MUST respond as if the
             client had supplied the attribute with a value of
-            ’not-completed’.
+            'not-completed'.
         'my-jobs' (boolean):
             The client OPTIONALLY supplies this attribute. The
@@ -218,5 +215,5 @@
             attribute, the Printer object MUST respond as if the
             client had supplied the attribute with a value of
-            ’false’, i.e., jobs from all users. The means for
+            'false', i.e., jobs from all users. The means for
             authenticating the requesting user and matching the
             jobs is described in section 8.
@@ -268,7 +265,7 @@
     response returns 0 jobs because there are no jobs matching the
     criteria, and the request would have returned 1 or more jobs
-    with a status code of ’successful-ok’ if there had been jobs
+    with a status code of 'successful-ok' if there had been jobs
     matching the criteria, then the status code for 0 jobs MUST be
-    ’successful-ok’.
+    'successful-ok'.
 
     Group 1: Operation Attributes
@@ -293,5 +290,5 @@
         referenced in the 'requested-attributes' operation
         attribute and that attribute included group names, such as
-        ’all’, the unsupported attributes MUST NOT include
+        'all', the unsupported attributes MUST NOT include
         attributes described in the standard but not supported by
         the implementation.
@@ -306,5 +303,5 @@
         job (job originating user) or not (see section
         8). However, the Printer object MUST respond with the
-        ’unknown’ value for any supported attribute (including all
+        'unknown' value for any supported attribute (including all
         REQUIRED attributes) for which the Printer object does not
         know the value, unless it would violate the security
@@ -313,11 +310,11 @@
 
         Jobs are returned in the following order:
-        - If the client requests all ’completed’ Jobs (Jobs in the
-          ’completed’, ’aborted’, or ’canceled’ states), then the
+        - If the client requests all 'completed' Jobs (Jobs in the
+          'completed', 'aborted', or 'canceled' states), then the
           Jobs are returned newest to oldest (with respect to
           actual completion time)
-        - If the client requests all ’not-completed’ Jobs (Jobs in
-          the ’pending’, ’processing’, ’pending-held’, and
-          ’processing- stopped’ states), then Jobs are returned in
+        - If the client requests all 'not-completed' Jobs (Jobs in
+          the 'pending', 'processing', 'pending-held', and
+          'processing- stopped' states), then Jobs are returned in
           relative chronological order of expected time to
           complete (based on whatever scheduling algorithm is
