Features: user, project, quota, resource, commission, endpoint, service
A Policy argument
“A <resource>=<member_capacity>,<project_capacity> argument e.g., –resource cyclades.cpu=5,1
Accept a pending commission (special privileges required)
Get commission info (special privileges required)
Issue commissions as a json string (special privileges required)
List pending commissions (special privileges required)
Reject a pending commission (special privileges required)
Resolve multiple commissions (special privileges required)
Get endpoints service endpoints
Project membership management commands
Accept a membership for a project you manage
Cancel your (probably pending) membership to a project
Details on a membership
Leave a project you have membership to
List all memberships
Reject a membership for a project you manage
Remove a membership for a project you manage
Approve an application (special privileges needed)
Cancel your application
Apply for a new project { “name”: name.in.domainlike.format, “owner”: user-uuid, # if omitted, request user assumed “homepage”: homepage, # optional “description”: description, # optional “comments”: comments, # optional “max_members”: max_members, # optional “private”: true | false, # optional “start_date”: date, # optional - in ISO8601 format “end_date”: date, # in ISO8601 format e.g., YYYY-MM-DDThh:mm:ssZ “join_policy”: “auto” | “moderated” | “closed”, # default: “moderated” “leave_policy”: “auto” | “moderated” | “closed”, # default: “auto” “resources”: { “cyclades.vm”: {“project_capacity”: int, “member_capacity”: int }}}
Deny an application (special privileges needed)
Dismiss your denied application
Enroll a user to a project
Get details for a project
Join a project
List all projects
Modify properties of a project { “name”: name.in.domainlike.format, “owner”: user-uuid, # if omitted, request user assumed “homepage”: homepage, # optional “description”: description, # optional “comments”: comments, # optional “max_members”: max_members, # optional “private”: true | false, # optional “start_date”: date, # optional - in ISO8601 format “end_date”: date, # in ISO8601 format e.g., YYYY-MM-DDThh:mm:ssZ “join_policy”: “auto” | “moderated” | “closed”, # default: “moderated” “leave_policy”: “auto” | “moderated” | “closed”, # default: “auto” “resources”: { “cyclades.vm”: {“project_capacity”: int, “member_capacity”: int }}}
Reinstate a terminated project (special privileges needed)
Suspend a project (special privileges needed)
Terminate a project (special privileges needed)
Resume a suspended project (special privileges needed)
Show user quotas
List user resources
List available services
Get service quotas
Get service uuid(s) from username(s)
Get service username(s) from uuid(s)
Authenticate a user by token and add to session user list (cache)
Authenticate a user and get all authentication information
Delete a user (token) from the list of session users
Get info for (current) session user
List (cached) session users
Get user uuid(s) from name(s)
Select a user from the (cached) list as the current session user
Features server, flavor
[id=]NETWORK_ID[,[ip=]IP]
Detailed information on a hardware flavor
List available hardware flavors
Attach a volume on a VM
Details on the attachment of a volume This is not information about the volume. To see volume information:
$ kamaki volume info VOLUME_ID
List the volume attachments of a VM
Create a VNC console and show connection information
Create a server (aka Virtual Machine)
Delete a virtual server
Detach a volume from a VM
Detailed information on a Virtual Machine
List virtual servers accessible by user Use filtering arguments (e.g., –name-like) to manage long server lists
Modify attributes of a virtual server
Assign a virtual server to a different project
Reboot a virtual server
Shutdown an active virtual server
Start an existing virtual server
Wait for server to change its status (default: –while BUILD)
Features file, container, sharer, group
Value type: | string of the form <start>-<end> where <start> and <end> are integers |
---|---|
Value returns: | the input string, after type checking <start> and <end> |
Create a new container
Delete a container
Empty a container
Get information about a container
List all containers, or their contents
Modify the properties of a container
Assign a container to a different project
Append local file to (existing) remote object The remote object should exist. If the remote object is a directory, it is transformed into a file. In the later case, objects under the directory remain intact.
Fetch remote file contents
Copy objects, even between different accounts or containers
Create an empty object
Delete a file or directory object
Download a remote file or directory object to local file system
Get information/details about a file
List all objects in a container or a directory
Create a directory object Equivalent to kamaki file create –content-type=’application/directory’
Modify the attributes of a file or directory object
Move objects, even between different accounts or containers
Overwrite part of a remote file
Publish an object (creates a public URL)
Truncate remote file up to size
Unpublish an object
Upload a file
The default destination is /pithos/NAME where NAME is the base name of the source path
Create a group of users
Delete a user group
list all groups and group members
Details on a Pithos+ sharer account (default: current account)
List accounts who share file objects with current user
Features (image, imagecompute)
Get image metadata
List images accessible by user
Add / update metadata and properties for an image Preserves values not explicitly modified
(Re)Register an image file to an Image service The image file must be stored at a pithos repository Some metadata can be set by user (e.g., disk-format) while others are set by the system (e.g., image id). Custom user metadata are termed as “properties”. A register command creates a remote meta file at /CONTAINER/IMAGE_PATH.meta Users may download and edit this file and use it to re-register. In case of a meta file, runtime arguments for metadata or properties override meta file settings.
Unregister an image (does not delete the image file)
Delete an image (WARNING: image file is also removed)
Get detailed information on an image
List images
Modify image properties (metadata)
Features network, port, subnet, ip
Attach an IP on a virtual server
Reserve an IP on a network
Unreserve an IP (also delete the port, if attached)
Detach an IP from a virtual server
Get details on a floating IP
List reserved floating IPs
Assign a floating IP to a different project
Connect a network with a device (server or router)
Create a new network (default type: MAC_FILTERED)
Delete a network
Disconnect a network from a device
Get details about a network
List networks Use filtering arguments (e.g., –name-like) to manage long lists
Modify network attributes
Assign a network to a different project
Create a new port (== connect server to network)
Delete a port (== disconnect server from network)
Get details about a port
List all ports
Modify the attributes of a port
Wait for port to finish (default: –while BUILD)
Create a new subnet
Get details about a subnet
List subnets Use filtering arguments (e.g., –name-like) to manage long server lists
Modify the attributes of a subnet
Delete a configuration option Default values are not removed by default. To alter this behavior in a session, use –default.
Show a configuration option About options: . syntax: [group.]option . example: global.log_file . special case: <option> is equivalent to global.<option> . configuration file syntax: . [group] . option=value . (more options can be set per group) . . special case: named clouds. . example: cloud.demo.url . E.g. for a cloud “demo”: . [cloud “demo”] . url = <http://single/authentication/url/for/demo/site> . token = <auth_token_from_demo_site>
List all configuration options FAQ: Q: I haven’t set any options! A: Defaults are used (override with /config set ) Q: There are more options than I have set A: Default options remain if not explicitly replaced or deleted
Set a configuration option About options: . syntax: [group.]option . example: global.log_file . special case: <option> is equivalent to global.<option> . configuration file syntax: . [group] . option=value . (more options can be set per group) . . special case: named clouds. . example: cloud.demo.url . E.g. for a cloud “demo”: . [cloud “demo”] . url = <http://single/authentication/url/for/demo/site> . token = <auth_token_from_demo_site>
Bases: object
Bases: object
Bases: object
Bases: kamaki.clients.Client
GET endpoint_url[/flavor_id][/command]
Parameters: |
|
---|
— Parameters —
Parameters: |
|
---|---|
Returns: | request response |
DEL ETE endpoint_url/images/<image_id>
Returns: | request response |
---|
GET endpoint_url[/image_id][/command]
Parameters: |
|
---|
— Parameters — :param changes_since: when the image last changed status
Parameters: |
|
---|---|
Returns: | request response |
DEL ETE endpoint_url/images/<image_id>/metadata/key
Returns: | request response |
---|
GET endpoint_url/<image_id>/metadata[/key]
Returns: | request response |
---|
POST endpoint_url/images/<image_id>/metadata
Returns: | request response |
---|
PUT endpoint_url/images/<image_id>/metadata
Returns: | request response |
---|
GET endpoint_url/limits
Parameters: | success – success code or list or tupple of accepted success codes. if server response code is not in this list, a ClientError raises |
---|---|
Returns: | request response |
POST endpoint_url/servers/<server_id>/action
Returns: | request response |
---|
DEL ETE endpoint_url/servers/<server_id>
Parameters: |
|
---|---|
Raises ClientError: | |
if returned code not in success list |
|
Returns: | request response |
GET endpoint_url/servers/[‘detail’ | <server_id>]
Parameters: |
|
---|---|
Returns: | request response |
GET endpoint_url/servers/<server_id>/ips[/network_id]
Parameters: | changes_since – time/date stamp in UNIX/epoch time. Checks for changes since a previous request. |
---|---|
Returns: | request response |
DEL ETE endpoint_url/servers/<server_id>/metadata[/key]
Returns: | request response |
---|
GET endpoint_url/servers/<server_id>/metadata[/key]
Returns: | request response |
---|
POST endpoint_url/servers/<server_id>/metadata
Returns: | request response |
---|
PUT endpoint_url/servers/<server_id>/metadata[/key]
Returns: | request response |
---|
POST endpoint_url/servers
Parameters: |
|
---|---|
Returns: | request response |
PUT endpoint_url/servers/<server_id>
Parameters: |
|
---|---|
Raises ClientError: | |
if returned code not in success list |
|
Returns: | request response |
Bases: kamaki.clients.compute.rest_api.ComputeRestClient
OpenStack Compute API 1.1 client
Parameters: |
|
---|---|
Returns: | (dict) {fixed_ip: . id: . instance_id: . ip: . pool: .} |
Parameters: |
|
---|
Submit request to create a new server
Parameters: |
|
---|---|
Returns: | a dict with the new virtual server details |
Raises ClientError: | |
wraps request errors |
OpenStack method for taking snapshots
Parameters: |
|
---|---|
Returns: | (dict) request headers |
Parameters: |
|
---|---|
Returns: | (dict) response headers |
Submit a deletion request for a server specified by id
Parameters: | server_id – integer (str or int) |
---|---|
Returns: | (dict) response headers |
Parameters: |
|
---|---|
Returns: | (list) [ {fixed_ip: ..., id: ..., instance_id: ..., ip: ..., pool: ...}, ... ] |
Parameters: | tenant_id – (str) |
---|---|
Returns: | (dict) {floating_ip_pools:[{name: ...}, ...]} |
Parameters: | tenant_id – (str) |
---|---|
Returns: | (dict) {floating_ips:[ {fixed_ip: ..., id: ..., instance_id: ..., ip: ..., pool: ...}, ... ]} |
Returns: | dict |
---|---|
Raises ClientError: | |
404 if image not available |
Parameters: |
|
---|
:returns (dict) metadata if key not set, specific metadatum otherwise
Return detailed info for a server
Parameters: | server_id – integer (int or str) |
---|---|
Returns: | dict with server details |
Parameters: |
|
---|---|
Returns: | list of server ids and names |
Parameters: |
|
---|
Parameters: |
|
---|---|
Returns: | (dict) request headers |
Parameters: |
|
---|---|
Returns: | updated metadata |
Bases: kamaki.clients.blockstorage.BlockStorageClient
Synnefo Cyclades Block Storage REST API Client
Bases: kamaki.clients.compute.ComputeClient
Synnefo Cyclades REST API Client
alias of CycladesComputeRestClient
Bases: kamaki.clients.cyclades.rest_api.CycladesBlockStorageRestClient
Cyclades Block Storage REST API Client
Returns: | (dict) new snapshots’ details |
---|
alias of CycladesComputeClient
Bases: kamaki.clients.cyclades.rest_api.CycladesComputeRestClient, kamaki.clients.Waiter
Synnefo Cyclades Compute API client
Attach volume on server :param server_id: (str) :volume_id: (str) :returns: (dict) information on attachment (contains volumeId)
Submit request to create a new server
Parameters: |
|
---|---|
Returns: | a dict with the new virtual server details |
Raises ClientError: | |
wraps request errors |
Delete a volume attachment. The volume will not be deleted. :param server_id: (str) :param attachment_id: (str) :returns: (dict) HTTP response headers
Remove volume attachment(s) for this volume and server This is not an atomic operation. Use “delete_volume_attachment” for an atomic operation with similar semantics. :param server_id: (str) :param volume_id: (str) :returns: (list) the deleted attachments
Parameters: |
|
---|---|
Returns: | (dict) info to set a VNC connection to virtual server |
Parameters: | server_id – integer (str or int) |
---|---|
Returns: | (list) |
Parameters: | server_id – integer (str or int) |
---|---|
Returns: | (dict) auto-generated graphs of statistics (urls) |
Deprecated - will be removed in version 0.15 :returns: (current status, progress percentile if available)
Parameters: |
|
---|---|
Returns: | (dict) details on the volume attachment |
Parameters: | server_id – (str) |
---|---|
Returns: | (list) all volume attachments for this server |
Set the firewall profile for the public interface of a server :param server_id: integer (str or int) :param profile: (str) ENABLED | DISABLED | PROTECTED :param port_id: (str) This port must connect to a public network :returns: (dict) response headers
Submit a shutdown request
Parameters: | server_id – integer (str or int) |
---|---|
Returns: | (dict) response headers |
Submit a startup request
Parameters: | server_id – integer (str or int) |
---|---|
Returns: | (dict) response headers |
Wait for server WHILE its status is current_status :param server_id: integer (str or int) :param current_status: (str) BUILD|ACTIVE|STOPPED|DELETED|REBOOT :param delay: time interval between retries :max_wait: (int) timeout in secconds :param wait_cb: if set a progressbar is used to show progress :returns: (str) the new mode if succesfull, (bool) False if timed out
Wait for server WHILE its status is target_status :param server_id: integer (str or int) :param target_status: (str) BUILD|ACTIVE|STOPPED|DELETED|REBOOT :param delay: time interval between retries :max_wait: (int) timeout in secconds :param wait_cb: if set a progressbar is used to show progress :returns: (str) the new mode if succesfull, (bool) False if timed out
Wait for server WHILE its status is current_status :param server_id: integer (str or int) :param current_status: (str) BUILD|ACTIVE|STOPPED|DELETED|REBOOT :param delay: time interval between retries :max_wait: (int) timeout in secconds :param wait_cb: if set a progressbar is used to show progress :returns: (str) the new mode if succesfull, (bool) False if timed out
Bases: kamaki.clients.network.NetworkClient
Cyclades Network API extentions
Parameters: |
|
---|
Parameters: | fixed_ips – (list of dicts) [{“ip_address”: IPv4}, ...] |
---|
Bases: kamaki.clients.Client
OpenStack Object Storage API 1.0 client
Parameters: |
|
---|
Parameters: | container – (str) |
---|---|
Raises ClientError: | |
202 Container already exists |
Parameters: | obj – (str) directory-object name |
---|---|
Returns: | (dict) request headers |
Parameters: |
|
---|---|
Returns: | (dict) object creation headers |
Parameters: | container – (str) |
---|---|
Raises: |
|
Parameters: | container – (str) |
---|---|
Returns: | (dict) |
Raises ClientError: | |
404 Container does not exist |
Parameters: |
|
---|---|
Returns: | (dict) |
Raises ClientError: | |
404 Invalid account |
Parameters: | path_prefix – (str) |
---|---|
Raises ClientError: | |
404 Invalid account | |
Returns: | (dict) |
Bases: kamaki.clients.storage.StorageClient
Full Pithos+ GET at account level
— request parameters —
Parameters: |
|
---|
— request headers —
Parameters: |
|
---|---|
Returns: | ConnectionResponse |
Full Pithos+ HEAD at account level
— request parameters —
Parameters: | until – (string) optional timestamp |
---|
— request headers —
Parameters: |
|
---|---|
Returns: | ConnectionResponse |
Full Pithos+ POST at account level
— request parameters —
Parameters: | update – (bool) if True, Do not replace metadata/groups |
---|
— request headers —
Parameters: |
|
---|---|
Returns: | ConnectionResponse |
Full Pithos+ DELETE at container level
— request parameters —
Parameters: | until – (timestamp string) if defined, container is purged up to that time |
---|---|
Returns: | ConnectionResponse |
Full Pithos+ GET at container level
— request parameters —
Parameters: |
|
---|
— request headers —
Parameters: |
|
---|---|
Returns: | ConnectionResponse |
Full Pithos+ HEAD at container level
— request params —
Parameters: | until – (string) optional timestamp |
---|
— request headers —
Parameters: |
|
---|---|
Returns: | ConnectionResponse |
Full Pithos+ POST at container level
— request params —
Parameters: |
|
---|
— request headers —
Parameters: |
|
---|---|
Returns: | ConnectionResponse |
Full Pithos+ PUT at container level
— request headers —
Parameters: |
|
---|---|
Returns: | ConnectionResponse |
Full Pithos+ COPY at object level
— request parameters —
Parameters: |
|
---|
— request headers —
Parameters: |
|
---|---|
Returns: | ConnectionResponse |
Full Pithos+ DELETE at object level
— request parameters —
Parameters: | until – (string) Optional timestamp |
---|---|
Returns: | ConnectionResponse |
Full Pithos+ GET at object level
— request parameters —
Parameters: |
|
---|
— request headers —
Parameters: |
|
---|---|
Returns: | ConnectionResponse |
Full Pithos+ HEAD at object level
— request parameters —
Parameters: | version – (string) optional version identified |
---|
— request headers —
Parameters: |
|
---|---|
Returns: | ConnectionResponse |
Full Pithos+ COPY at object level
— request parameters —
Parameters: |
|
---|
— request headers —
Parameters: |
|
---|---|
Returns: | ConnectionResponse |
Full Pithos+ POST at object level
— request parameters —
Parameters: |
|
---|
— request headers —
Parameters: |
|
---|---|
Returns: | ConnectionResponse |
Full Pithos+ PUT at object level
— request parameters —
Parameters: |
|
---|
— request headers —
Parameters: |
|
---|---|
Returns: | ConnectionResponse |
Bases: kamaki.clients.pithos.rest_api.PithosRestClient
Synnefo Pithos+ API client
Parameters: |
|
---|
Parameters: |
|
---|---|
Returns: | (dict) response headers |
Parameters: |
|
---|---|
Returns: | (dict) response headers |
Parameters: |
|
---|---|
Returns: | (dict) created object metadata |
Parameters: |
|
---|---|
Raises: |
|
Parameters: | metakey – (str) metadatum key |
---|---|
Returns: | (dict) response headers |
Parameters: |
|
---|
Parameters: |
|
---|
Download an object (multiple connections, random blocks)
Parameters: |
|
---|
Download an object to a string (multiple connections). This method uses threads for http requests, but stores all content in memory.
Parameters: |
|
---|---|
Returns: | (str) the whole object contents |
Parameters: | until – (str) formated date |
---|---|
Returns: | (dict) |
Raises ClientError: | |
404 Container not found |
Parameters: | until – (str) formated date |
---|---|
Returns: | (dict) |
Parameters: |
|
---|---|
Returns: | (list) |
Parameters: |
|
---|---|
Returns: | (dict) |
Parameters: |
|
---|---|
Returns: | (dict) |
Get accounts that share with self.account
Parameters: |
|
---|---|
Returns: | (dict) |
Parameters: |
|
---|---|
Returns: | (dict) response headers |
Overwrite a part of an object from local source file ATTENTION: content_type must always be application/octet-stream
Parameters: |
|
---|
Parameters: |
|
---|
Give read/write permisions to an object.
Parameters: |
|
---|---|
Returns: | (dict) response headers |
Parameters: |
|
---|
Parameters: |
|
---|---|
Returns: | (dict) response headers |
Upload an object using multiple connections (threads)
Parameters: |
|
---|
Upload an object using multiple connections (threads)
Parameters: |
|
---|
Parameters: |
|
---|---|
Returns: | (dict) created object metadata |
Bases: kamaki.clients.Client
Synnefo Plankton API client
Parameters: |
|
---|
Parameters: | image_id – (str) |
---|---|
Returns: | (list) users who can use current user’s images |
Parameters: |
|
---|---|
Returns: | (list) id,name + full image info if detail |
Parameters: | member – (str) sharers account |
---|---|
Returns: | (list) images shared by member |
Register an image that is uploaded at location
Parameters: |
|
---|---|
Returns: | (dict) metadata of the created image |
Parameters: |
|
---|
Parameters: |
|
---|
Warning
For synnefo, the suggested network implementation is in kamaki.clients.cyclades.CycladesNetworkClient extension
Bases: kamaki.clients.network.rest_api.NetworkRestClient, kamaki.clients.Waiter
OpenStack Network API 2.0 client
Atomic operation for batch network creation (all or nothing)
Parameters: | networks – (list) [ {name: ..(str).., admin_state_up: ..(bool).., shared: ..(bool)..}, {name: ..(str).., admin_state_up: ..(bool).., shared: ..(bool)..}] name is mandatory, the rest is optional e.g., create_networks([ {name: ‘net1’, admin_state_up: True}, {name: ‘net2’}]) |
---|---|
Returns: | (list of dicts) created networks details |
Raises: |
|
Parameters: |
|
---|
Atomic operation for batch port creation (all or nothing)
Parameters: | ports – (list of dicts) {key: ...} with all parameters in the method create_port, where method mandatory / optional paramteres respond to mandatory / optional paramters in ports items |
---|---|
Returns: | (list of dicts) created portss details |
Raises: |
|
Parameters: |
|
---|
Atomic operation for batch subnet creation (all or nothing)
Parameters: | subnets – (list of dicts) {key: ...} with all parameters in the method create_subnet, where method mandatory / optional paramteres respond to mandatory / optional paramters in subnets items |
---|---|
Returns: | (list of dicts) created subnetss details |
Raises: |
|
To nullify something optional, use None
Parameters: |
|
---|
Parameters: |
|
---|
Wait for port while in current_status
Bases: astakosclient.AstakosClient
Wrap Original AstakosClient to ensure compatibility in kamaki clients
Accept a commission (see commission_action)
Perform action on a project application
Arguments: project_id – project identifier app_id – application identifier action – action to perform, one of “approve”, “deny”,
“dismiss”, “cancel”
reason – reason of performing the action
In case of success, return nothing.
Authenticate and get services’ endpoints
Keyword arguments: tenant_name – user’s uniq id (optional)
It returns back the token as well as information about the token holder and the services he/she can access (in json format).
The tenant_name is optional and if it is given it must match the user’s uuid.
In case of error raise an AstakosClientException.
Perform a commission action
Keyword arguments: serial – commission’s id (int) action – action to perform, currently accept/reject (string)
In case of success return nothing.
Submit application to create a new project
Arguments: specs – dict describing a project
In case of success, return project and application identifiers.
Enroll a user in a project
Arguments: project_id – project identifier email – user identified by email
In case of success, return membership identifier.
Get Description of a Commission
Keyword arguments: serial – commission’s id (int)
In case of success return a dict of dicts containing informations (details) about the requested commission
Get services’ endpoints
The extra parameter is to be used by _fill_endpoints. In case of error raise an AstakosClientException.
Retrieve membership description, if accessible
Arguments: memb_id – membership identifier
In case of success, return membership description.
Retrieve all accessible memberships
Arguments: project_id – filter by project (optional) project – backwards compatibility
In case of success, return a list of membership descriptions.
Get Pending Commissions
In case of success return a list of pending commissions’ ids (list of integers)
Retrieve project description, if accessible
Arguments: project_id – project identifier
In case of success, return project description.
Retrieve all accessible projects
Arguments: name – filter by name (optional) state – filter by state (optional) owner – filter by owner (optional) mode – if value is ‘member’, return only active projects in which
the request user is an active member
In case of success, return a list of project descriptions.
Get user’s quotas
In case of success return a dict of dicts with user’s current quotas. Otherwise raise an AstakosClientException
Return a dict of dicts with the available resources
Return a list of dicts with the registered services
Return the user name of a uuid (see get_usernames)
Return a uuid_catalog dictionary for the given uuids
Keyword arguments: uuids – list of user ids (list of strings)
The returned uuid_catalog is a dictionary with uuids as keys and the corresponding user names as values
Return the uuid of a name (see getUUIDs)
Return a displayname_catalog for the given names
Keyword arguments: display_names – list of user names (list of strings)
The returned displayname_catalog is a dictionary with the names as keys and the corresponding uuids as values
Issue commission (for multiple holder/source pairs)
keyword arguments: user_provisions – dict mapping user holdings
(user, project, resource) to integer quantities
name – description of the commission (string) force – force this commission (boolean) auto_accept – auto accept this commission (boolean)
In case of success return commission’s id (int). Otherwise raise an AstakosClientException.
Issue one commission (with specific holder and source)
keyword arguments: holder – user’s id (string) provisions – (source, resource) mapping to quantity name – description of the commission (string) force – force this commission (boolean) auto_accept – auto accept this commission (boolean)
In case of success return commission’s id (int). Otherwise raise an AstakosClientException.
Change resource assignment to another project
Join a project
Arguments: project_id – project identifier
In case of success, return membership identifier.
Perform action on a membership
Arguments: memb_id – membership identifier action – action to perform, one of “leave”, “cancel”, “accept”,
“reject”, “remove”
reason – reason of performing the action
In case of success, return nothing.
Submit application to modify an existing project
Arguments: project_id – project identifier specs – dict describing a project
In case of success, return project and application identifiers.
Perform action on a project
Arguments: project_id – project identifier action – action to perform, one of “suspend”, “unsuspend”,
“terminate”, “reinstate”
reason – reason of performing the action
In case of success, return nothing.
Reject a commission (see commission_action)
Resolve multiple commissions at once
Keyword arguments: accept_serials – commissions to accept (list of ints) reject_serials – commissions to reject (list of ints)
In case of success return a dict of dicts describing which commissions accepted, which rejected and which failed to resolved.
Send feedback to astakos service
keyword arguments: message – Feedback message data – Additional information about service client status
In case of success return nothing. Otherwise raise an AstakosClientException
Get all project quotas for resources associated with the service
Keyword arguments: project – optionally, the uuid of a specific project, or a list
thereof
In case of success return a dict of dicts with current quotas for all projects, or of a specified project, if project argument is set. Otherwise raise an AstakosClientException
Get all quotas for resources associated with the service
Keyword arguments: user – optionally, the uuid of a specific user, or a list thereof project_id – optionally, the uuid of a specific project, or a list
thereof
project – backwards compatibility (replaced by “project_id”)
In case of success return a dict of dicts of dicts with current quotas for all users, or of a specified user, if user argument is set. Otherwise raise an AstakosClientException
Return the displayName of a uuid using a service’s token
Return a uuid_catalog dict using a service’s token
Return the uuid of a name using a service’s token
Return a display_name catalog using a service’s token
Validate a temporary access token (oath2)
Keyword arguments: belongsTo – confirm that token belongs to tenant
It returns back the token as well as information about the token holder.
The belongs_to is optional and if it is given it must be inside the token’s scope.
In case of error raise an AstakosClientException.
Bases: kamaki.clients.ClientError
Bases: kamaki.clients.Client
Synnefo Astakos cached client wraper
Get authentication information and store it in this client As long as the CachedAstakosClient instance is alive, the latest authentication information for this token will be available
Parameters: | token – (str) custom token to authenticate |
---|
Parameters: | service_type – (str) compute, object-store, image, account, etc. |
---|---|
Returns: | (dict) {name:..., type:..., endpoints:[...]} |
Raises AstakosClientError: | |
if service_type not in service catalog |
Parameters: |
|
---|---|
Returns: | (dict) {SNF:uiURL, adminURL, internalURL, publicURL, ...} |
Raises AstakosClientError: | |
if service_type not in service catalog, or if #matching endpoints != 1 |
POST endpoint_url/user_catalogs
Parameters: |
|
---|---|
Returns: | (dict) {uuid1: name1, uuid2: name2, ...} or oposite |
Bases: kamaki.clients.astakos.AstakosClient, kamaki.clients.Logged
An AstakosClient wrapper with modified logging
Logs are adjusted to appear similar to the ones of kamaki clients. No other changes are made to the parent class.