Changeset 9da7428
- Timestamp:
- Jan 21, 2012, 3:37:15 PM (12 years ago)
- Branches:
- no-cups
- Children:
- c1dc25f
- Parents:
- 72c3fcb
- git-author:
- Jessica B. Hamrick <jhamrick@…> (01/21/12 15:37:09)
- git-committer:
- Jessica B. Hamrick <jhamrick@…> (01/21/12 15:37:15)
- Location:
- server/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
server/lib/TODO
rc1cebbc r9da7428 18 18 [ ] pause printer 19 19 [ ] resume printer 20 [ 20 [\] set printer attributes 21 21 [ ] send uri 22 [ 22 [\] set job attributes 23 23 [X] restart job 24 24 [\] promote job 25 25 26 26 - add support in job.py for: 27 [ 27 [X] restart job 28 28 29 29 - finish test cases for printer.py … … 52 52 - local streaming 53 53 - generic streaming 54 - zephyr control (e.g. youtube link) 54 55 55 56 Tickets that should be fixed by this new version: -
server/lib/gutenbach/server/printer.py
rc1cebbc r9da7428 185 185 def printer_uri_supported(self): 186 186 return ipp.PrinterUriSupported(self.uri) 187 @printer_uri_supported.setter 188 def printer_uri_supported(self, val): 189 raise ipp.errors.AttributesNotSettable("printer-uri-supported") 187 190 188 191 @property 189 192 def uri_authentication_supported(self): 190 193 return ipp.UriAuthenticationSupported("none") 194 @uri_authentication_supported.setter 195 def uri_authentication_supported(self, val): 196 raise ipp.errors.AttributesNotSettable("uri-authentication-supported") 191 197 192 198 @property 193 199 def uri_security_supported(self): 194 200 return ipp.UriSecuritySupported("none") 201 @uri_security_supported.setter 202 def uri_security_supported(self, val): 203 raise ipp.errors.AttributesNotSettable("uri-security-supported") 195 204 196 205 @property 197 206 def printer_name(self): 198 207 return ipp.PrinterName(self.name) 208 @printer_name.setter 209 def printer_name(self, val): 210 raise ipp.errors.AttributesNotSettable("printer-name") 199 211 200 212 @property 201 213 def printer_state(self): 202 214 return ipp.PrinterState(self.state) 215 @printer_state.setter 216 def printer_state(self, val): 217 raise ipp.errors.AttributesNotSettable("printer-state") 203 218 204 219 @property 205 220 def printer_state_reasons(self): 206 221 return ipp.PrinterStateReasons("none") 222 @printer_state_reasons.setter 223 def printer_state_reasons(self, val): 224 raise ipp.errors.AttributesNotSettable("printer-state-reasons") 207 225 208 226 @property 209 227 def ipp_versions_supported(self): 210 228 return ipp.IppVersionsSupported(*self.config['ipp-versions']) 229 @ipp_versions_supported.setter 230 def ipp_versions_supported(self, val): 231 raise ipp.errors.AttributesNotSettable("ipp-versions-supported") 211 232 212 233 # XXX: We should query ourself for the supported operations … … 214 235 def operations_supported(self): 215 236 return ipp.OperationsSupported(ipp.OperationCodes.GET_JOBS) 237 @operations_supported.setter 238 def operations_supported(self, val): 239 raise ipp.errors.AttributesNotSettable("operations-supported") 216 240 217 241 @property 218 242 def charset_configured(self): 219 return ipp.CharsetConfigured("utf-8") 220 243 return ipp.CharsetConfigured("utf-8") # XXX 244 @charset_configured.setter 245 def charset_configured(self, val): 246 raise ipp.errors.AttributesNotSettable("charset-configured") 247 221 248 @property 222 249 def charset_supported(self): 223 return ipp.CharsetSupported("utf-8") 250 return ipp.CharsetSupported("utf-8") # XXX 251 @charset_supported.setter 252 def charset_supported(self, val): 253 raise ipp.errors.AttributesNotSettable("charset-supported") 224 254 225 255 @property 226 256 def natural_language_configured(self): 227 257 return ipp.NaturalLanguageConfigured("en-us") 258 @natural_language_configured.setter 259 def natural_language_configured(self, val): 260 raise ipp.errors.AttributesNotSettable("natural-language-configured") 228 261 229 262 @property 230 263 def generated_natural_language_supported(self): 231 264 return ipp.GeneratedNaturalLanguageSupported("en-us") 265 @generated_natural_language_supported.setter 266 def generated_natural_language_supported(self, val): 267 raise ipp.errors.AttributesNotSettable("generated-natural-language-supported") 232 268 233 269 @property 234 270 def document_format_default(self): 235 271 return ipp.DocumentFormatDefault("application/octet-stream") 272 @document_format_default.setter 273 def document_format_default(self, val): 274 raise ipp.errors.AttributesNotSettable("document-format-default") 236 275 237 276 @property 238 277 def document_format_supported(self): 239 278 return ipp.DocumentFormatSupported("application/octet-stream", "audio/mp3") 279 @document_format_supported.setter 280 def document_format_supported(self, val): 281 raise ipp.errors.AttributesNotSettable("document-format-supported") 240 282 241 283 @property 242 284 def printer_is_accepting_jobs(self): 243 285 return ipp.PrinterIsAcceptingJobs(True) 286 @printer_is_accepting_jobs.setter 287 def printer_is_accepting_jobs(self, val): 288 raise ipp.errors.AttributesNotSettable("printer-is-accepting-jobs") 244 289 245 290 @property 246 291 def queued_job_count(self): 247 292 return ipp.QueuedJobCount(len(self.active_jobs)) 293 @queued_job_count.setter 294 def queued_job_count(self, val): 295 raise ipp.errors.AttributesNotSettable("queued-job-count") 248 296 249 297 @property 250 298 def pdl_override_supported(self): 251 299 return ipp.PdlOverrideSupported("not-attempted") 300 @pdl_override_supported.setter 301 def pdl_override_supported(self, val): 302 raise ipp.errors.AttributesNotSettable("pdl-override-supported") 252 303 253 304 @property 254 305 def printer_up_time(self): 255 306 return ipp.PrinterUpTime(int(time.time()) - self.time_created) 307 @printer_up_time.setter 308 def printer_up_time(self, val): 309 raise ipp.errors.AttributesNotSettable("printer-up-time") 256 310 257 311 @property 258 312 def compression_supported(self): 259 313 return ipp.CompressionSupported("none") 314 @compression_supported.setter 315 def compression_supported(self, val): 316 raise ipp.errors.AttributesNotSettable("compression-supported") 260 317 261 318 @property 262 319 def multiple_operation_time_out(self): 263 320 return ipp.MultipleOperationTimeOut(240) 321 @multiple_operation_time_out.setter 322 def multiple_operation_time_out(self, val): 323 raise ipp.errors.AttributesNotSettable("multiple-operation-time-out") 264 324 265 325 @property 266 326 def multiple_document_jobs_supported(self): 267 327 return ipp.MultipleDocumentJobsSupported(False) 328 @multiple_document_jobs_supported.setter 329 def multiple_document_jobs_supported(self, val): 330 raise ipp.errors.AttributesNotSettable("multiple-document-jobs-supported") 268 331 269 332 ###################################################################### … … 366 429 return attributes 367 430 368 def set_printer_attributes(self): 369 pass 431 def set_printer_attributes(self, job_id, attributes): 432 for attr in attributes: 433 try: 434 setattr(self, attr, attributes[attr]) 435 except AttributeError: 436 raise ipp.errors.ClientErrorAttributes 370 437 371 438 def cancel_job(self, job_id, requesting_user_name=None): … … 399 466 return attributes 400 467 401 def set_job_attributes(self): 402 pass 403 468 def set_job_attributes(self, job_id, attributes): 469 job = self.get_job(job_id) 470 for attr in attributes: 471 if attr in ("job-id", "job-k-octets", "job-state", "job-printer-uri"): 472 raise ipp.errors.ClientErrorAttributesNotSettable(attr) 473 elif attr == "job-name": 474 job.name = attributes[attr] 475 elif attr == "job-originating-user-name": 476 job.creator = attributes[attr] # XXX: do we want this? 477 404 478 def restart_job(self, job_id, requesting_user_name=None): 405 479 job = self.get_job(job_id)
Note: See TracChangeset
for help on using the changeset viewer.