Stavros Sachtouris [Fri, 31 May 2013 10:29:18 +0000 (13:29 +0300)]
Create config file version 3
Refs: #3874
Minimum config file:
[global]
token = <user token>
Changes:
- Only one field "cli" for user command specs, to map command groups to CLIs:
[cli]
user = astakos
file = pithos
server = cyclades
...
- Specify client services/apis and versions.
General format:
[client]
type = <service>
version = <api version>
Example:
[cyclades]
type = compute
version = v2.0
Stavros Sachtouris [Fri, 31 May 2013 07:58:27 +0000 (10:58 +0300)]
Merge commit '
528550d929d5d30009016ae23b2a948d13fe8eb3' into develop
Conflicts:
Changelog
version
Stavros Sachtouris [Thu, 30 May 2013 13:35:02 +0000 (16:35 +0300)]
Enrich/rename astakos client calls with endpoints
Refs: #3874
Kamaki.clients.astakos.AstakosClient is now a high-level client lib that
offers access to token-authenticated astakos-aquired cached information.
Users who need an astakos client should use the snf-astakosclient instead.
Usage:
astakos_cache = AstakosClient(<astakos/base/url/with/identity/api>)
astakos_cache.authenticate(<token>)
user_info = astakos_cache.user_info()
compute_endpoints = astakos_cache.get_service_endpoints('compute', 'v2')
Major changes:
Modify ReST call from /im/authenticate to /tokens
New methods as AstakosClient instance cache accessors:
get_services
get_service_details
get_service_endpoints
Method renaiming for existing AstakosClient instance cache accessors:
info --> user_info
user --> list_users
Stavros Sachtouris [Wed, 29 May 2013 15:01:43 +0000 (18:01 +0300)]
Merge branch 'feature-osv2-compatibility' into release-0.9
Stavros Sachtouris [Wed, 29 May 2013 15:00:47 +0000 (18:00 +0300)]
Merge branch 'release-0.9' into feature-osv2-compatibility
Stavros Sachtouris [Wed, 29 May 2013 10:28:19 +0000 (13:28 +0300)]
Initialize version 0.10
Stavros Sachtouris [Tue, 28 May 2013 08:48:51 +0000 (11:48 +0300)]
Initialize kamaki v0.9rc1
Stavros Sachtouris [Tue, 28 May 2013 08:45:36 +0000 (11:45 +0300)]
Merge branch 'feature-expose-astakosclient' into develop
Stavros Sachtouris [Tue, 28 May 2013 08:45:25 +0000 (11:45 +0300)]
Merge branch 'feature-osv2-compatibility' into develop
Stavros Sachtouris [Mon, 27 May 2013 14:11:46 +0000 (17:11 +0300)]
Update Changelog for latest astakosclient cli
Stavros Sachtouris [Mon, 27 May 2013 14:07:40 +0000 (17:07 +0300)]
Expose some basix astakosclient methods to cli
Methods exposed:
get_user_info as authenticate
get_uuid[s] as uuid
get_username[s] as username
get_quotas as quotas
services_get_uuid[s]/username[s]/quotas as service uuid/username/quotas
Stavros Sachtouris [Mon, 27 May 2013 12:37:24 +0000 (15:37 +0300)]
Update log about astakos authenticate adjustment
Stavros Sachtouris [Mon, 27 May 2013 12:35:22 +0000 (15:35 +0300)]
Adjust astakos authenticate to snf-0.14 url sheme
Stavros Sachtouris [Mon, 27 May 2013 12:23:09 +0000 (15:23 +0300)]
Setup a snf-astakos command set
Stavros Sachtouris [Fri, 24 May 2013 14:40:20 +0000 (17:40 +0300)]
Update config file version tag
Stavros Sachtouris [Fri, 24 May 2013 14:24:53 +0000 (17:24 +0300)]
Fix typo in kamak.cli.logger import
Stavros Sachtouris [Fri, 24 May 2013 13:47:16 +0000 (16:47 +0300)]
Rename meta-->metadata and remove values @CLI
Refs: #3633
Stavros Sachtouris [Thu, 23 May 2013 15:42:25 +0000 (18:42 +0300)]
Rename meta-->metadata and remove values @lib
- Meta-->metadata in some cases, according to the expected cyclades API
- remove values level from requests and responses @ cyclades lib
Refs: #3633
Stavros Sachtouris [Thu, 23 May 2013 14:46:37 +0000 (17:46 +0300)]
Fix expected "public" header params in tests
Stavros Sachtouris [Thu, 23 May 2013 14:27:17 +0000 (17:27 +0300)]
Merge branch 'feature-image-meta-record-format' into develop
Stavros Sachtouris [Thu, 23 May 2013 14:25:02 +0000 (17:25 +0300)]
Add metadata management to image register
- validate image metadata format
- read metadata from file
- merge file-loaded metadata with runtimes
- store metadata file on pithos, check existance, overwrite with -f
- raise helpful error messages when there fail
Refs: #3797
Stavros Sachtouris [Thu, 23 May 2013 11:01:13 +0000 (14:01 +0300)]
Use _format_image_headers: image_register,get_meta
- Ensure uniform image meta output
- Easy to apply the correct meta format
Refs: #3797
Stavros Sachtouris [Wed, 22 May 2013 15:25:07 +0000 (18:25 +0300)]
Restore thread-wait for append
Stavros Sachtouris [Wed, 22 May 2013 15:15:27 +0000 (18:15 +0300)]
Fix typo (permition --> permission)
Stavros Sachtouris [Wed, 22 May 2013 15:05:00 +0000 (18:05 +0300)]
Merge branch 'feature-json-output' into develop
Conflicts:
Changelog
kamaki/cli/commands/image.py
Also, take care of pep8 issues
Stavros Sachtouris [Wed, 22 May 2013 15:01:12 +0000 (18:01 +0300)]
Fix typo in pithos upload output
Stavros Sachtouris [Wed, 22 May 2013 14:48:50 +0000 (17:48 +0300)]
Wait threads to finish in pithos append_object
Stavros Sachtouris [Wed, 22 May 2013 14:26:59 +0000 (17:26 +0300)]
Implement an optional json output 4 outputing cmds
Refs: #3732
Stavros Sachtouris [Wed, 22 May 2013 10:42:41 +0000 (13:42 +0300)]
Add json/optional output to astakos cmds
Refs: #3732
Stavros Sachtouris [Wed, 22 May 2013 10:38:05 +0000 (13:38 +0300)]
Add json/optional responses to flavor/network cmds
Refs: #3732
Stavros Sachtouris [Wed, 22 May 2013 10:07:14 +0000 (13:07 +0300)]
Add json/optional outputs to server commands
Refs: #3732
Stavros Sachtouris [Tue, 21 May 2013 16:47:46 +0000 (19:47 +0300)]
Do not unpublish by default @ pithos rest calls
Refs: #3780
Stavros Sachtouris [Tue, 21 May 2013 16:34:07 +0000 (19:34 +0300)]
Merge branch 'feature-image-meta-record' into develop
Stavros Sachtouris [Tue, 21 May 2013 16:32:23 +0000 (19:32 +0300)]
Update and enrich error messages in image register
Parse ivalid property file and guide users to correct it
Guide users to pass valid container:path parameters
Refs:#3769
Stavros Sachtouris [Tue, 21 May 2013 15:26:13 +0000 (18:26 +0300)]
Print full and nice response in image register
Stavros Sachtouris [Tue, 21 May 2013 15:08:48 +0000 (18:08 +0300)]
Do not recalculate #blocks in upload_from_string
Refs: #3608
Stavros Sachtouris [Tue, 21 May 2013 15:08:48 +0000 (18:08 +0300)]
Do not recalculate #blocks in upload_from_string
Refs: #3608
Stavros Sachtouris [Tue, 21 May 2013 15:04:11 +0000 (18:04 +0300)]
Make sure registered properties are unique
Refs: #3769
Stavros Sachtouris [Tue, 21 May 2013 14:08:34 +0000 (17:08 +0300)]
Store image properties after image registration
Log of changes:
- Properties are stored in a remote file on Pithos+
- File name is <image-file>.meta
- Feature can be switched off with --no-property-file-upload
- If remote property file exists, registration is aborted
- If remote property file exists, force with -f, --fforce-upload-property-file
- Location is given as container:path
- User id can be aquired internaly with an astakos call
Refs: #3769, #3778
Stavros Sachtouris [Tue, 21 May 2013 12:23:20 +0000 (15:23 +0300)]
Optionaly load images properties from file
Refs: #3769
Stavros Sachtouris [Tue, 21 May 2013 09:40:50 +0000 (12:40 +0300)]
Merge branch 'feature-json-output' into feature-image-meta-record
Stavros Sachtouris [Mon, 20 May 2013 15:40:59 +0000 (18:40 +0300)]
Update documentation to reflect changes in output
Refs: #3756
Stavros Sachtouris [Mon, 20 May 2013 14:54:34 +0000 (17:54 +0300)]
Apply option outputs to image commands + renames
- Add image.add_member missing content-length header
- Rename image-[add|del]member commands to members-[add|delete]
- Remove update option from image-register
- In image-compute split properties to properties-list and properties-get
- Add optional output to methods
* image: unregister, members add/delete/set
* image compute: delete, properties delete
- Transliterate methods to list-get-set-delete command groups:
* image: members, member
* image compute: properties
Refs :#3756 #3732
Stavros Sachtouris [Mon, 20 May 2013 10:21:13 +0000 (13:21 +0300)]
Apply optional output to kamaki file commands
Apply the feature wherever is applicable
Generalize the feature by moving the corresponding code to _command_init
Stavros Sachtouris [Fri, 17 May 2013 16:11:42 +0000 (19:11 +0300)]
Update file operations and their output
Refs: #3756 #3732
- Add optional output for file methods: mkdir, touch, create, move, create,
copy, move, append, delete, purge, info, meta, upload
- Transliterate permissions and metadata methods to apear as get/set/delete
command subgroups
e.g. kamaki file metadata set ...
instead of
kamaki file setmeta
- Add method create_container to pithos client, add unit and functional tests
Stavros Sachtouris [Fri, 17 May 2013 12:49:09 +0000 (15:49 +0300)]
Add output to file copy/move
Also, kamaki.clients.pithos.copy/move_object returns response headers
Refs: #3756 #3732
Stavros Sachtouris [Fri, 17 May 2013 11:48:27 +0000 (14:48 +0300)]
Add output support to create methods
Refs: #3756 #3732
In kamaki.clients
-------------------
- storage.create_directory returns response headers
- implement pithos.create_container
In kamaki.cli.pithos
-------------------
- add flag --with_output for optional output
- add (-j, --json) flag for optional json-formated output
- apply these changes to file_mkdir, file_touch, file_create
Stavros Sachtouris [Fri, 17 May 2013 10:48:41 +0000 (13:48 +0300)]
Add json formated output for file list
- Implement a print_json auxiliary method in kamaki.cli.utils
- Add a (-j, --json) flag to file list
- When -j or --json flag is on, only json is printed
Refs: #3732
Stavros Sachtouris [Thu, 16 May 2013 17:26:32 +0000 (20:26 +0300)]
Merge branch 'feature-updownload-fromto-string' into develop
Stavros Sachtouris [Thu, 16 May 2013 17:25:07 +0000 (20:25 +0300)]
Update changelog, unittests for upload_from_string
Refs: #3608
Stavros Sachtouris [Thu, 16 May 2013 17:14:03 +0000 (20:14 +0300)]
Functional test and debug for upload_from_string
Refs: #3608
Stavros Sachtouris [Thu, 16 May 2013 16:27:54 +0000 (19:27 +0300)]
Implement upload_from_string
Implemented with threads
Refs: #3608
Stavros Sachtouris [Thu, 16 May 2013 14:17:58 +0000 (17:17 +0300)]
Optimize download_to_string by using threads
Refs: #3608
Stavros Sachtouris [Thu, 16 May 2013 13:31:40 +0000 (16:31 +0300)]
Implement download_to_string in pithos client
The download_to_string method downloads a remote object from pithos into a
string, which is then returned.
Also, implemented unit and functional tests. Changelog is updated
Refs: #3608
Stavros Sachtouris [Wed, 15 May 2013 16:41:38 +0000 (19:41 +0300)]
Merge branch 'bug-move-copy' into develop
Stavros Sachtouris [Wed, 15 May 2013 16:39:56 +0000 (19:39 +0300)]
Allow copy of deleted objects by refering to older
Also disallow moving deleted objects by version The later was implemented by
accident, due to the symetry between move and copy
Refs: #3737
Stavros Sachtouris [Wed, 15 May 2013 15:32:28 +0000 (18:32 +0300)]
Fix typo dst_path instead of ds_path
Refs: 3737
Stavros Sachtouris [Wed, 15 May 2013 14:37:35 +0000 (17:37 +0300)]
Merge branch 'feature-enumeration' into develop
Stavros Sachtouris [Wed, 15 May 2013 14:36:02 +0000 (17:36 +0300)]
Add enumeration as optional for all list cmds
Refs: #3739
Stavros Sachtouris [Wed, 15 May 2013 13:12:59 +0000 (16:12 +0300)]
Merge branch 'bug-shell-cmd-syntax' into develop
Stavros Sachtouris [Wed, 15 May 2013 13:12:27 +0000 (16:12 +0300)]
Restore 2nd level command sysntax in shell
Refs: #3736
Stavros Sachtouris [Wed, 15 May 2013 12:46:07 +0000 (15:46 +0300)]
Merge branch 'feature-cache-container-info' into develop
Stavros Sachtouris [Wed, 15 May 2013 12:45:25 +0000 (15:45 +0300)]
Upload Changelog for container info upload caching
Refs: #3735
Stavros Sachtouris [Wed, 15 May 2013 12:44:05 +0000 (15:44 +0300)]
Cache container info request per upload session
Refs: #3735
Stavros Sachtouris [Wed, 15 May 2013 12:13:29 +0000 (15:13 +0300)]
Update changelog for upload's container_info_cache
Refs: #3707
Stavros Sachtouris [Wed, 15 May 2013 12:12:04 +0000 (15:12 +0300)]
Adjust pithos livetest to use container_info_cache
Refs: #3707
Stavros Sachtouris [Wed, 15 May 2013 11:23:21 +0000 (14:23 +0300)]
Update unitest to include container_info_cache
Refs: 3707
Stavros Sachtouris [Wed, 15 May 2013 11:06:41 +0000 (14:06 +0300)]
Add a container_infor_cache param to upload_object
Each upload involves a request that retrieves block size and hash information.
In higher level applications, this request is redudant after the first upload.
This feature allows higher level operations to cache retrieved container info
in a session.
Refs: #3707
Stavros Sachtouris [Tue, 14 May 2013 16:34:14 +0000 (19:34 +0300)]
Merge branch 'feature-upload-returns' into develop
Stavros Sachtouris [Tue, 14 May 2013 16:33:00 +0000 (19:33 +0300)]
Update documentation for -l at file upload
Refs: #3730
Stavros Sachtouris [Tue, 14 May 2013 16:30:42 +0000 (19:30 +0300)]
Add a -l option to upload: list uploaded details
If the upload is successfull, if the -l or --details argument is present,
kamaki lists all uploaded objects with all details returned by the server
(e.g. object version, date of creation, etc)
Refs: #3730
Stavros Sachtouris [Tue, 14 May 2013 16:03:21 +0000 (19:03 +0300)]
Update changelog (pithos upload modification)
Refs: #3656
Stavros Sachtouris [Tue, 14 May 2013 16:00:20 +0000 (19:00 +0300)]
Update livetest for upload return modification
Refs: #3656
Stavros Sachtouris [Tue, 14 May 2013 15:52:30 +0000 (18:52 +0300)]
Modify upload methods to return created obj info
Methods affected:
upload_object
upload_object_unchunked
upload_object_by_manifestation
unittests modified accordingly
Refs: #3656
Stavros Sachtouris [Tue, 14 May 2013 15:25:23 +0000 (18:25 +0300)]
Merge branch 'feature-empty-container' into develop
Stavros Sachtouris [Tue, 14 May 2013 15:25:02 +0000 (18:25 +0300)]
Update Changelog for #3662
Stavros Sachtouris [Tue, 14 May 2013 15:22:52 +0000 (18:22 +0300)]
Implement purging a non-empty container
kamaki file purge <container> -F
will automatically empty a container before purging it
Refs: #3662
Stavros Sachtouris [Tue, 14 May 2013 14:40:10 +0000 (17:40 +0300)]
Merge branch 'feature-image-unregister' into develop
Stavros Sachtouris [Tue, 14 May 2013 14:39:31 +0000 (17:39 +0300)]
Implement livetest for image unregister
Refs: #3728
Stavros Sachtouris [Tue, 14 May 2013 14:13:56 +0000 (17:13 +0300)]
Merge branch 'feature-image-unregister' into develop
Stavros Sachtouris [Tue, 14 May 2013 14:13:21 +0000 (17:13 +0300)]
Update Changelog for image unregister feature
Stavros Sachtouris [Tue, 14 May 2013 14:12:22 +0000 (17:12 +0300)]
Expose image-unregister to cli and unittest it
Stavros Sachtouris [Tue, 14 May 2013 13:40:48 +0000 (16:40 +0300)]
Implement image unregister in kamaki.clients
Refs: #3728
Stavros Sachtouris [Mon, 13 May 2013 14:00:27 +0000 (17:00 +0300)]
Merge branch 'feature-shell-arguments' into develop
Stavros Sachtouris [Mon, 13 May 2013 14:00:01 +0000 (17:00 +0300)]
Update Changelog
Stavros Sachtouris [Mon, 13 May 2013 13:53:20 +0000 (16:53 +0300)]
Allow runtime args when invoking interactive shell
Refs: #3716
Behavior After This:
kamaki -XXX -YY ... parses -XXX -YY
If not recognized: syntax error
If recognized, group them into shell args (e.g. -h) and command args (e.g. -d)
Whenever a command is run in this shell instance, apply the command args
Practically, users may pass the -d or -v args to the shell and enjoy streaming
debug or verbosity logs, without having to pass -d or -v args on each command
Stavros Sachtouris [Mon, 13 May 2013 11:17:57 +0000 (14:17 +0300)]
Merge branch 'feature-cli-command-errors' into develop
Stavros Sachtouris [Mon, 13 May 2013 11:13:39 +0000 (14:13 +0300)]
Raise a descriptive error for misconfigured cmds
Refs: #3663
A command group that is declared in the config file is not supported
by valid command specification code or the specification code is not
pointed at by <command>.cli configure variable
Stavros Sachtouris [Mon, 13 May 2013 09:55:01 +0000 (12:55 +0300)]
Log initial call arguments in first log
Stavros Sachtouris [Fri, 10 May 2013 16:25:09 +0000 (19:25 +0300)]
Merge branch 'feature-logging' into develop
Stavros Sachtouris [Fri, 10 May 2013 16:24:47 +0000 (19:24 +0300)]
Move logger module to kamaki.cli
Stavros Sachtouris [Fri, 10 May 2013 16:16:05 +0000 (19:16 +0300)]
Make kamaki.clients unware of kamaki.logger
use logging for getting the loggers
Stavros Sachtouris [Fri, 10 May 2013 15:33:03 +0000 (18:33 +0300)]
Stop shell from destroying config instance
This caused warnings about preset variables
Stavros Sachtouris [Fri, 10 May 2013 14:55:27 +0000 (17:55 +0300)]
Merge branch 'feature-logging' into develop
Stavros Sachtouris [Fri, 10 May 2013 14:51:40 +0000 (17:51 +0300)]
Update Changelog to reflect #3715 changes
Stavros Sachtouris [Fri, 10 May 2013 14:38:02 +0000 (17:38 +0300)]
Allow activation/deactivation of specific loggers
refs: #3715
Logger settings are not aborted and will be restored at deactivation
Also, remove all logger creation functionality from kamaki.clients
A file or stream logger should be created an the kamaki.clients caller side
In this case, the caller is kamaki.cli
Kamaki.cli should handle where and how the loggers will output. Kamaki.clients
will log as __name__ and the two extras: kamaki.clients.send/recv
An external app can now import kamaki and create a logger named "kamaki" and
this will log whatever kamaki is logging. The external app will handle loggers
as they wish.
Stavros Sachtouris [Fri, 10 May 2013 10:54:35 +0000 (13:54 +0300)]
Update changelog for feature #3668
Stavros Sachtouris [Fri, 10 May 2013 10:45:35 +0000 (13:45 +0300)]
Merge branch 'feature-logging' into develop
Stavros Sachtouris [Fri, 10 May 2013 10:45:00 +0000 (13:45 +0300)]
Remove log redaduncy when logging in a file
Stavros Sachtouris [Thu, 9 May 2013 16:18:56 +0000 (19:18 +0300)]
Use < and > in stream logger for send/recv resp.