pulp :: server :: webservices :: controllers :: consumers :: ConsumerDeferredFields :: Class ConsumerDeferredFields
[hide private]
[frames] | no frames]

Class ConsumerDeferredFields

source code

         object --+    
                  |    
base.JSONController --+
                      |
                     ConsumerDeferredFields

Instance Methods [hide private]
 
package_profile(self, id)
Get a consumer's set of packages
source code
 
repoids(self, id)
Get the ids of the repositories the consumer is bound to.
source code
 
certificate(self, id)
Get a X509 Certificate for this Consumer.
source code
 
GET(self, id, field_name)
Deferred field dispatcher.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

    Inherited from base.JSONController
 
_output(self, data)
JSON encode the response and set the appropriate headers
source code
 
bad_request(self, msg=None)
Return a not found error.
source code
 
conflict(self, msg=None)
Return a conflict error.
source code
 
created(self, location, data)
Return a created response.
source code
 
filter_results(self, results, filters)
Returns: list of model instances that meat the criteria in the filters
source code
 
filters(self, valid)
Fetch any parameters passed on the url
source code
 
internal_server_error(self, msg=None)
Return an internal server error.
source code
 
method_not_allowed(self, msg=None)
Return a method not allowed error.
source code
 
no_content(self) source code
 
not_acceptable(self, msg=None)
Return a not acceptable error.
source code
 
not_found(self, msg=None)
Return a not found error.
source code
 
ok(self, data)
Return an ok response.
source code
 
params(self)
JSON decode the objects in the requests body and return them
source code
 
unauthorized(self, msg=None) source code
Static Methods [hide private]
    Inherited from base.JSONController
 
error_handler(method)
Static controller method wrapper that catches internal errors and reports them as JSON serialized trace back strings
source code
 
user_auth_required(roles=())
Static Controller method to check user permissions on web service calls
source code
Class Variables [hide private]
  exposed_fields = 'package_profile', 'repoids', 'certificate'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

package_profile(self, id)

source code 

Get a consumer's set of packages

Parameters:
  • id - consumer id
Returns:
consumer's installed packages
Decorators:
  • @RoleCheck(consumer_id= True, admin= True)

repoids(self, id)

source code 

Get the ids of the repositories the consumer is bound to.

Parameters:
  • id (str) - consumer id
Returns:
dict of repository id: uri reference
Decorators:
  • @RoleCheck(consumer_id= True, admin= True)

certificate(self, id)

source code 

Get a X509 Certificate for this Consumer. Useful for uniquely and securely identifying this Consumer later.

Parameters:
  • id (str ID of the Consumer) - consumer id
Returns:
X509 PEM Certificate
Decorators:
  • @RoleCheck(admin= True)

GET(self, id, field_name)

source code 

Deferred field dispatcher.

Decorators:
  • @JSONController.error_handler