pulp :: server :: webservices :: controllers :: repositories :: RepositoryActions :: Class RepositoryActions
[hide private]
[frames] | no frames]

Class RepositoryActions

source code

         object --+        
                  |        
base.JSONController --+    
                      |    
   base.AsyncController --+
                          |
                         RepositoryActions

Instance Methods [hide private]
 
sync(self, id)
Sync a repository from its feed.
source code
 
upload(self, id)
Upload a package to a repository.
source code
 
add_package(self, id)
Returns: True on successful addition of package to repository
source code
 
get_package(self, id)
Get package info from a repository.
source code
 
add_packages_to_group(self, id)
Add a package to an existing package group
source code
 
delete_package_from_group(self, id)
Removes a package from an existing package group
source code
 
create_packagegroup(self, id)
Creates a packagegroup in the referenced repository
source code
 
delete_packagegroup(self, id)
Removes a packagegroup from a repository
source code
 
add_errata(self, id)
Returns: True on successful addition of errata to repository
source code
 
delete_errata(self, id)
Returns: True on successful deletion of errata from repository
source code
 
list_errata(self, id)
list applicable errata for a given repo.
source code
 
POST(self, id, action_name)
Action dispatcher.
source code

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

    Inherited from base.AsyncController
 
_status_path(self, id)
Construct a URL path that can be used to poll a task's status A status path is constructed as follows: /<collection>/<object id>/<action>/<action id>/ A GET request sent to this path will get a JSON encoded status object
source code
 
_task_to_dict(self, task)
Convert a task to a dictionary (non-destructive) while retaining the pertinent information for a status check but in a more convenient form for JSON serialization.
source code
 
accepted(self, status)
Return an accepted response with status information in the body.
source code
 
cancel_task(self, task)
Cancel the passed in task
source code
 
find_task(self, id)
Find and return a task with the given id
source code
 
start_task(self, func, args=[], kwargs={}, timeout=None, unique=False)
Execute the function and its arguments as an asynchronous task.
source code
 
task_status(self, id)
Get the current status of an asynchronous task.
source code
 
timeout(self, data)
Parse any timeout values out of the passed in data
source code
    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 = 'sync', 'upload', 'add_package', 'get_packag...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

sync(self, id)

source code 

Sync a repository from its feed.

Parameters:
  • id - repository id
Returns:
True on successful sync of repository from feed
Decorators:
  • @JSONController.error_handler
  • @RoleCheck(admin= True)

upload(self, id)

source code 

Upload a package to a repository.

Parameters:
  • id - repository id
Returns:
True on successful upload
Decorators:
  • @JSONController.error_handler
  • @RoleCheck(admin= True)

add_package(self, id)

source code 
Parameters:
  • id - repository id
Returns:
True on successful addition of package to repository
Decorators:
  • @JSONController.error_handler
  • @RoleCheck(admin= True)

get_package(self, id)

source code 

Get package info from a repository.

Parameters:
  • id - repository id
Returns:
matched package object available in corresponding repository
Decorators:
  • @JSONController.error_handler
  • @RoleCheck(admin= True)

Deprecated: user deferred fields: packages with filters instead

add_packages_to_group(self, id)

source code 

Add a package to an existing package group

Parameters:
  • id - repository id
Returns:
True/False
Decorators:
  • @JSONController.error_handler
  • @RoleCheck(admin= True)

delete_package_from_group(self, id)

source code 

Removes a package from an existing package group

Parameters:
  • id - repository id
Returns:
True/False
Decorators:
  • @JSONController.error_handler
  • @RoleCheck(admin= True)

create_packagegroup(self, id)

source code 

Creates a packagegroup in the referenced repository

Parameters:
  • id - repository id
Decorators:
  • @JSONController.error_handler
  • @RoleCheck(admin= True)

delete_packagegroup(self, id)

source code 

Removes a packagegroup from a repository

Parameters:
  • id - repository id
Decorators:
  • @JSONController.error_handler
  • @RoleCheck(admin= True)

add_errata(self, id)

source code 
Parameters:
  • id - repository id
Returns:
True on successful addition of errata to repository
Decorators:
  • @JSONController.error_handler
  • @RoleCheck(admin= True)

delete_errata(self, id)

source code 
Parameters:
  • id - repository id
Returns:
True on successful deletion of errata from repository
Decorators:
  • @JSONController.error_handler
  • @RoleCheck(admin= True)

list_errata(self, id)

source code 

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

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

POST(self, id, action_name)

source code 

Action dispatcher. This method checks to see if the action is exposed, and if so, implemented. It then calls the corresponding method (named the same as the action) to handle the request.

Parameters:
  • id (str) - repository id
  • action_name (str) - name of the action
Returns:
http response
Decorators:
  • @JSONController.error_handler
  • @RoleCheck(admin= True)

Class Variable Details [hide private]

exposed_actions

Value:
'sync', 'upload', 'add_package', 'get_package', 'add_packages_to_group\
', 'delete_package_from_group', 'delete_packagegroup', 'create_package\
group', 'add_errata', 'list_errata', 'delete_errata',