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

Class ConsumerActions

source code

         object --+    
                  |    
base.JSONController --+
                      |
                     ConsumerActions

Instance Methods [hide private]
 
bind(self, id)
Bind (subscribe) a user to a repository.
source code
 
unbind(self, id)
Unbind (unsubscribe) a user to a repository.
source code
 
profile(self, id)
update/add Consumer profile information.
source code
 
installpackages(self, id)
Install packages.
source code
 
installpackagegroups(self, id)
Install package groups.
source code
 
installerrata(self, id)
Install errata Body contains list of errata ids and/or type
source code
 
listerrata(self, id)
list applicable errata for a given repo.
source code
 
history(self, id) source code
 
POST(self, id, action_name)
Consumer action 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_actions = 'bind', 'unbind', 'profile', 'installpackage...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

bind(self, id)

source code 

Bind (subscribe) a user to a repository.

Parameters:
  • id - consumer id
Decorators:
  • @RoleCheck(consumer_id= True, admin= True)

unbind(self, id)

source code 

Unbind (unsubscribe) a user to a repository.

Parameters:
  • id - consumer id
Decorators:
  • @RoleCheck(consumer_id= True, admin= True)

profile(self, id)

source code 

update/add Consumer profile information. eg:package, hardware etc

Decorators:
  • @RoleCheck(consumer_id= True, admin= True)

installpackages(self, id)

source code 

Install packages. Body contains a list of package names.

Decorators:
  • @RoleCheck(consumer_id= True, admin= True)

installpackagegroups(self, id)

source code 

Install package groups. Body contains a list of package ids.

Decorators:
  • @RoleCheck(consumer_id= True, admin= True)

installerrata(self, id)

source code 

Install errata Body contains list of errata ids and/or type

Decorators:
  • @RoleCheck(consumer_id= True, admin= True)

listerrata(self, id)

source code 

list applicable errata for a given repo. filter by errata type if any

Decorators:
  • @JSONController.error_handler
  • @RoleCheck(consumer_id= True, admin= True)

history(self, id)

source code 
Decorators:
  • @JSONController.error_handler
  • @RoleCheck(consumer_id= True, admin= True)

POST(self, id, action_name)

source code 

Consumer action dispatcher

Parameters:
  • id (str) - controller id
  • action_name (str) - action name
Decorators:
  • @JSONController.error_handler

Class Variable Details [hide private]

exposed_actions

Value:
'bind', 'unbind', 'profile', 'installpackages', 'installpackagegroups'\
, 'listerrata', 'installerrata', 'history',