Commit 05e144e2 authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

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
parent 6fdb3576
......@@ -50,39 +50,47 @@ HISTORY_PATH = os.path.expanduser('~/.kamaki.history')
CONFIG_ENV = 'KAMAKI_CONFIG'
HEADER = """
# Kamaki configuration file v2
# Kamaki configuration file v3
"""
DEFAULTS = {
'global': {
'colors': 'off',
'account': '',
'token': '',
'log_file': os.path.expanduser('~/.kamaki.log'),
'log_token': 'off',
'log_data': 'off',
'max_threads': 7
'max_threads': 7,
'url': 'https://accounts.okeanos.grnet.gr/astakos/identity/v2.0/'
},
'cli': {
'user': 'astakos',
'file': 'pithos',
'server': 'cyclades',
'flavor': 'cyclades',
'network': 'cyclades',
'image': 'image',
'config': 'config',
'history': 'history'
},
'config': {'cli': 'config'},
'history': {
'cli': 'history',
'file': HISTORY_PATH
},
'file': {
'cli': 'pithos',
'url': 'https://pithos.okeanos.grnet.gr/v1'
'pithos': {
'type': 'object-storage',
'version': 'v2'
},
'compute': {'url': 'https://cyclades.okeanos.grnet.gr/api/v1.1'},
'server': {'cli': 'cyclades'},
'flavor': {'cli': 'cyclades'},
'network': {'cli': 'cyclades'},
'image': {
'cli': 'image',
'url': 'https://cyclades.okeanos.grnet.gr/plankton'
'cyclades': {
'type': 'compute',
'version': 'v2.0'
},
'plankton': {
'type': 'image',
'version': 'v2.0'
},
'user': {
'cli': 'astakos',
'url': 'https://accounts.okeanos.grnet.gr'
'astakos': {
'type': 'identity',
'version': 'v2.0'
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment