Feature #3934

Design and support a new config file structure and address compatibility issues

Added by Stavros Sachtouris almost 8 years ago. Updated almost 8 years ago.

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

related to ./kamaki - Feature #3913: Add multiple remotes and switch between them Closed 06/03/2013 06/04/2013

Associated revisions

Revision 201baa17
Added by Stavros Sachtouris almost 8 years ago

A. Hardcode the new kamaki config file

Refs: #3934

Breaks compatibility, implements a remotes-based config file

Revision 14b9a185
Added by Stavros Sachtouris almost 8 years ago

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

Revision ce9ccb40
Added by Stavros Sachtouris almost 8 years ago

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

Revision 362adf50
Added by Stavros Sachtouris almost 8 years ago

Decide a cloud term, use it if no cloud.url

Refs: #3934

Revision 844a6bdb
Added by Stavros Sachtouris almost 8 years ago

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

Revision 99085b30
Added by Stavros Sachtouris almost 8 years ago

Make sure user and history commands work fine

Refs: #3934

Revision b4f69041
Added by Stavros Sachtouris almost 8 years ago

Adjust all command specs to multicloud/singleauth

Refs: #3934

Revision c626151a
Added by Stavros Sachtouris almost 8 years ago

Adjust help messages to configuration changes

Refs:#3934

Revision ca5b9261
Added by Stavros Sachtouris almost 8 years ago

Adjust help messages to configuration changes

Refs:#3934

Revision 144b3551
Added by Stavros Sachtouris almost 8 years ago

Change term "remote" to "cloud" when proper

Refs: #3934

Revision 2a4b0a2a
Added by Stavros Sachtouris almost 8 years ago

Change term "remote" to "cloud" when proper

Refs: #3934

Revision c825ddc9
Added by Stavros Sachtouris almost 8 years ago

Use the default_cloud global option

Refs: #3934 #3979

Revision ac5a74b3
Added by Stavros Sachtouris almost 8 years ago

Use the default_cloud global option

Refs: #3934 #3979

Revision 763e7b82
Added by Stavros Sachtouris almost 8 years ago

Use the default_cloud global option

Refs: #3934 #3979

Conflicts:

kamaki/cli/__init__.py

History

#1 Updated by Stavros Sachtouris almost 8 years ago

  • % Done changed from 0 to 40

#2 Updated by Stavros Sachtouris almost 8 years ago

  • % Done changed from 40 to 80

#3 Updated by Stavros Sachtouris almost 8 years ago

  • % Done changed from 80 to 100

#4 Updated by Stavros Sachtouris almost 8 years ago

  • Status changed from New to Resolved

#5 Updated by Stavros Sachtouris almost 8 years ago

Use the term "cloud" instead of remote.

#6 Updated by Stavros Sachtouris almost 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF