sasctl.services.projects#

class sasctl._services.projects.Projects[source]#

Bases: Service

Methods

create_project(name[, description, image])

Parameters:

delete(*args, **kwargs)

Send a DELETE request.

delete_project(item)

Delete a project instance.

get(*args, **kwargs)

Send a GET request.

get_link(obj, rel)

Get link information from a resource.

get_project(item[, refresh])

Return a project instance.

head(*args, **kwargs)

Send a HEAD request.

info()

Version and build information for the service.

is_available()

Check if the service is currently available.

list_projects([filter, start, limit])

List all projects available in the environment.

post(*args, **kwargs)

Send a POST request.

put(*args, **kwargs)

Send a PUT request.

request(verb, path[, session, format_])

Send an HTTP request with a session.

request_link(obj, rel, **kwargs)

Request a link from a resource.

update_project(item)

Update a project instance.

is_uuid

classmethod create_project(name, description=None, image=None)[source]#
Parameters:
namestr
descriptionstr
imagestr

URI of an image to use as the project avatar

Returns:
RestObj
classmethod delete_project(item)#

Delete a project instance.

Parameters:
item
Returns:
None
classmethod get_project(item, refresh=False)#

Return a project instance.

Parameters:
itemstr or dict

Name, ID, or dictionary representation of the project.

refreshbool, optional

Obtain an updated copy of the project.

Returns:
RestObj or None

A dictionary containing the project attributes or None.

Notes

If item is a complete representation of the project it will be returned unless refresh is set. This prevents unnecessary REST calls when data is already available on the client.

classmethod list_projects(filter=None, start=None, limit=None, **kwargs)#

List all projects available in the environment.

Parameters:
filterstr, optional
startint, optional

Zero-based index of the first item to return. Defaults to 0.

limitint, optional

The maximum number of items to return. Defaults to 20.

Returns:
list

A list of dictionaries containing the projects.

Notes

See the filtering reference for details on the filter parameter.

classmethod update_project(item)#

Update a project instance.

Parameters:
itemdict
Returns:
None