Adjust help messages to configuration changes
Refs:#3934
Merge branch 'feature-endpoints' into release-0.9
Conflicts: Changelog kamaki/cli/__init__.py kamaki/cli/commands/astakos.py kamaki/cli/commands/cyclades.py kamaki/cli/commands/image.py kamaki/cli/commands/pithos.py kamaki/cli/commands/snf-astakos.py...
Fix a PEP8 issue
Use os-specific path seperators in up/down-load -R
Refs: #3954
Adjust all command specs to multicloud/singleauth
Refs: #3934
Make sure user and history commands work fine
Adjust config cli commands to serve remotes
config set remote.smth.option value inserts option=value in remote smthconfig get remote.smth lists the contents (key=val) of remote smthconfig delete remote.smth.option deletes this specific option from the remote smth...
Decide a cloud term, use it if no cloud.url
Implement remotes support in Config and cli init
In Config:
Simplify guess_version heuristics (check if the following exist: global.url/token, remote-defaults)Trasnlate files 'remote "name"' to 3-level dict and backImplement rescue_old_file to convert config files to v3.0...
Plan Config changes (rescue_old_file, translates)
rescue_old_file: mines info from old config file to use them in new filetranslates: remote "smth" --> 'remote': {'smth': ... global.{url, token} --> remote.default.{url, token} <command>.cli --> global.command_cli...
Implement Config.guess_version for config files
Implement the Config.guess_version method
A. Hardcode the new kamaki config file
Breaks compatibility, implements a remotes-based config file
Backwards compatibility for configuraiton file
Compatible with kamaki config files v2
user.url, file.url, compute.url and image.urlare now valid and of higher priority toastakos.url, pithos.url, cyclades.url, plankton.urlwhich are also valid
All these are ignored iff [global].auth_url is given
Fix typos in default and expected values
Handle url proccessing even if url is unicode
Also, fix typos and default values for service configurations
Fix typo in astakos client: version_id-->versionId
Fix typos in user command flow
Apply servce.url options to cross-sercice calls
Refs: #3874
Let cross-service initializations to use explicit service endpoint urls ifthere is no single authentication url.- In Image commands, there are calls that use astakos and pithos clients- In pithos there are calls that use astakos client
Use explicitely set services urls if no auth_url
In current configuration, kamaki checks for auth_url. If that fails,it raises an error. If it is not set, it prints a warning and attemptsto read the <service>.url option from the configuration file....
Implement --cloud arg to switch between clouds
Refs: #3913
Config file can (optionaly) contain:
[remotes] example = https://www.example.org/astakos/identity/v2.0/ old_version = https://www.example.org/astakos/identity/v1.0/ ...
Now, user can explicitely request for a remote cloud authentication URI:...
Get endpoint urls for all CLI operations
Use kamaki.clients.astakos.AstakosClient as a cached astakos client to getuser information and, most importantly, endpoints. Allow users to authenticatemultiple tokens on the same session. In every session there must be at most...
Create config file version 3
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....
Merge branch 'feature-expose-astakosclient' into develop
Merge branch 'feature-osv2-compatibility' into develop
Expose some basix astakosclient methods to cli
Methods exposed:
get_user_info as authenticateget_uuid[s] as uuidget_username[s] as usernameget_quotas as quotasservices_get_uuid[s]/username[s]/quotas as service uuid/username/quotas
Setup a snf-astakos command set
Update config file version tag
Fix typo in kamak.cli.logger import
Rename meta-->metadata and remove values @CLI
Refs: #3633
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...
Merge branch 'feature-json-output' into develop
Conflicts: Changelog kamaki/cli/commands/image.py
Also, take care of pep8 issues
Fix typo in pithos upload output
Implement an optional json output 4 outputing cmds
Refs: #3732
Add json/optional output to astakos cmds
Add json/optional responses to flavor/network cmds
Add json/optional outputs to server commands
Update and enrich error messages in image register
Parse ivalid property file and guide users to correct itGuide users to pass valid container:path parameters
Refs:#3769
Print full and nice response in image register
Make sure registered properties are unique
Refs: #3769
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...
Optionaly load images properties from file
Update documentation to reflect changes in output
Refs: #3756
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...
Apply optional output to kamaki file commands
Apply the feature wherever is applicableGeneralize the feature by moving the corresponding code to _command_init
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...
Add output to file copy/move
Also, kamaki.clients.pithos.copy/move_object returns response headers
Add output support to create methods
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 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
Allow copy of deleted objects by refering to older
Also disallow moving deleted objects by version The later was implemented byaccident, due to the symetry between move and copy
Refs: #3737
Fix typo dst_path instead of ds_path
Refs: 3737
Add enumeration as optional for all list cmds
Refs: #3739
Restore 2nd level command sysntax in shell
Refs: #3736
Cache container info request per upload session
Refs: #3735
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
Implement purging a non-empty container
kamaki file purge <container> -F
will automatically empty a container before purging it
Refs: #3662
Expose image-unregister to cli and unittest it
Allow runtime args when invoking interactive shell
Refs: #3716
Behavior After This:kamaki -XXX -YY ... parses -XXX -YYIf not recognized: syntax errorIf 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...
Raise a descriptive error for misconfigured cmds
Refs: #3663
A command group that is declared in the config file is not supportedby valid command specification code or the specification code is notpointed at by <command>.cli configure variable
Log initial call arguments in first log
Merge branch 'feature-logging' into develop
Move logger module to kamaki.cli
Stop shell from destroying config instance
This caused warnings about preset variables
Allow activation/deactivation of specific loggers
refs: #3715Logger settings are not aborted and will be restored at deactivation
Also, remove all logger creation functionality from kamaki.clientsA file or stream logger should be created an the kamaki.clients caller side...
Use < and > in stream logger for send/recv resp.
Globalize logger usage
Unsolved bug: redudant info in logfile
Make containerlimit set/get aware of 0==unlimited
containerlimit set -h will tell users to use 0 for unlimitedcontainerlimit get will print "unlimited" if received a 0 value
Alow uploading to container with limit 0
Container limit 0 means "unlimited"
Move addproperty from image to image compute
Fix typo with --config and --property args (#3658)
Fix mispeled import cyclades_cli --> cyclades
Set ~/.kamaki.log with mode 0600 as default
Refs: #3610
Make recursive upload non-default, rearange checks
Alloow recursive upload with RRearange pre-upload checks as shown bellow: check first if it is recursive & direcory- check if object exists or forced to overwrite- check container limit and used size...
Take into account container used bytes in upload
Before uploading, check if there is enough remaining space on containerremaning space = container limit - container used bytes
Prevent upload if uploads exceed container limit
Feature #3536
Implement a recursive upload
kamaki file upload <directory> <container>[:remote-dir]
where remote-dir either is a dir or does not exist
Add some client-side filters to image list
--owner=<uuid> : print only images with given owner
--name-prefix=
: print only images with name starting with <prefix> --name-suffix=<suffix> : print only images with name starting with <suffix> --name-like=<part> : print only images with name containing <part>...
Filter image listing results by owner
Introduce the --owner parameter to kamaki image list (was: image public)If given, only images of given owner will be pronted on console. This is aclient side filtering, as oposed to the other filters of the command.
Set a default network type when creating nets
Default type is MAX_FILTERED
Support #3514
Split file-quota semantics for account and contner
kamaki file quota --> only for accountkamaki file quota <container> --> kamaki file containerlimit get [container]
Support #3541
Rename file setquota to file containerlimit set
Also, do not allow user to set account quota
Apply uniform descriptions to all client commands
<GRNET name>/<OS name> API <actuall api> commands
e.g. Cyclades/Compute API server commandsor Pithos+/Storage API commands
Commands file names are named after the API they implement, not the command interface....
Remove quotaholder from kamaki
This affects the cli:- remove the quotaholder commands set- remove the commissioning system (automatic command retrieval)
This affevts the clients:- remove the quotaholder client- remove the clients commissioning system...
Update docs, rename kamaki.cli.commands/*
Documentation updates: reflect the changes in command groups astakos --> user, store --> file
File renaming: remove the _cli suffix from modules in kamaki.cli.commands
Feature #3566
Rename store command group to file
Rename command group astakos to user
The client is still called 'astakos', but the command group is now 'user'
Pametrize log file, make it globaly available
Kamaki logger module is now available to both cli and clients packagesUsers may set the log_file option in configuration file kamaki config set log_file ...
Support #3441
Return image details as headers, in image register
Feature #3512
Increase timeout in upload thread canceling
Make download canceling more responsive
This does not make download canceling faster, if anything, it makes it slowerbut probably more gracefull for end users. Instead of just waiting the threadsto finish, users now see messages that descibe the attempts made by kamaki to...
Make --public and --sharing to work in upload
Bug #3509
Fix typo in commands.errors (self-->this)
This typo caused undesired behavior when deleting a deleted network
Bug #3547