Feature #3934
Design and support a new config file structure and address compatibility issues
Status: | Closed | Start date: | 06/04/2013 | |
---|---|---|---|---|
Priority: | Medium | Due date: | 06/06/2013 | |
Assignee: | Stavros Sachtouris | % Done: | 100% |
|
Category: | kamaki | Spent time: | 16.00 hours | |
Target version: | v0.9 | Estimated time: | 14.00 hours |
Description
New config file structure¶
# kamaki config file v3 - full options [global] colors = off max_threads = 7 log_token = off log_data = off history_file = ~/.kamaki.history file_cli = pithos user_cli = astakos server_cli = cyclades network_cli = cyclades flavor_cli = cyclades image_cli = image config_cli = config history_cli = history [remote "default"] url = http.... token = t0k3n... compute_url = htpp... OPTIONAL image_url = ... OPTIONAL ... cyclades_type = compute OPTIONAL cyclades_version = v1.0 OPTIONAL ... [remote "custom_name"] url = http://... token = t0k3n... ...
Users should set at least remote.default.url and remote0.token to have a working client
Support the new config format¶
Kamaki will check the config file format and will guide the user to a new configuration, preserving as much of the old values as possible
Kamaki will not set a default remote url (or token)
Kamaki will fail to run if no remotes are configured in an accepted way, except if running kamaki-only commands (config, history)
Related issues
Associated revisions
A. Hardcode the new kamaki config file
Refs: #3934
Breaks compatibility, implements a remotes-based config file
Plan Config changes (rescue_old_file, translates)
Refs: #3934
rescue_old_file: mines info from old config file to use them in new file
translates:
remote "smth" --> 'remote': {'smth': ...
global.{url, token} --> remote.default.{url, token}
<command>.cli --> global.command_cli
some commands are maped to other names, e.g. pithos --> file
<command>.url --> remote.defailt.<command>_url
Implement remotes support in Config and cli init
Refs: #3934
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 back
Implement rescue_old_file to convert config files to v3.0
In kamaki.cli:
Implement method _check_config_version
Decide a cloud term, use it if no cloud.url
Refs: #3934
Adjust config cli commands to serve remotes
Refs: #3934
config set remote.smth.option value
inserts option=value in remote smth
config get remote.smth
lists the contents (key=val) of remote smth
config delete remote.smth.option
deletes this specific option from the remote smth
config delete remote.smth
completely erased the remote smth
Make sure user and history commands work fine
Refs: #3934
Adjust all command specs to multicloud/singleauth
Refs: #3934
Adjust help messages to configuration changes
Refs:#3934
Adjust help messages to configuration changes
Refs:#3934
Change term "remote" to "cloud" when proper
Refs: #3934
Change term "remote" to "cloud" when proper
Refs: #3934
History
#1 Updated by Stavros Sachtouris over 10 years ago
- % Done changed from 0 to 40
#2 Updated by Stavros Sachtouris over 10 years ago
- % Done changed from 40 to 80
#3 Updated by Stavros Sachtouris over 10 years ago
- % Done changed from 80 to 100
#4 Updated by Stavros Sachtouris over 10 years ago
- Status changed from New to Resolved
#5 Updated by Stavros Sachtouris over 10 years ago
Use the term "cloud" instead of remote.
#6 Updated by Stavros Sachtouris over 10 years ago
- Status changed from Resolved to Closed