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, “owner”: 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 “end_date”: date, “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, “owner”: 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 “end_date”: date, “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
Create a VNC console and show connection information
Create a server (aka Virtual Machine)
Delete a virtual server
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: 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 remove 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)
Resolve pithos URI, return in the form pithos://uuid/container[/path]
UPDATE: URLs without a path are also resolvable. Therefore, caller methods should check if there is a path or not
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: 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
alias of CycladesComputeClient
Bases: kamaki.clients.cyclades.rest_api.CycladesComputeRestClient, kamaki.clients.Waiter
Synnefo Cyclades Compute API client
Submit request to create a new server
Parameters: |
|
---|---|
Returns: | a dict with the new virtual server details |
Raises ClientError: | |
wraps request errors |
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) |
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
Parameters: |
|
---|---|
Max_wait: | (int) timeout in secconds |
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: |
|
---|---|
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: |
|
---|
Bases: astakosclient.AstakosClient
Wrap Original AstakosClient to ensure compatibility in kamaki clients
Bases: kamaki.clients.ClientError, astakosclient.errors.AstakosClientException
Join AstakosClientException as ClientError in one class
Bases: kamaki.clients.Client
Synnefo Astakos cached client wraper
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
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.