Backlog #3573

Add a configuration file for cLI

Added by Daniel Dehennin over 6 years ago. Updated over 6 years ago.

Status:PendingStart date:02/07/2015
Priority:LowDue date:
Assignee:-% Done:


Target version:-



I'm using 3 distinct OpenNebula:

  • one for testing new OpenNebula releases
  • one for developers
  • one for production

I setup my ~/.one directory as following:

├── dev_auth
├── prod_auth
└── test_auth

Then I need to define my environment variable accordingly to my needs.

It could be easier to have something like a --config option to use a configuration file under ~/.one looking like:

endpoint =
auth_file = test_auth
pool_page_size = 1000
cert_dir = ~/.one/certificates
ssl_verify = true

Then I can have 3 configuration files and call commands with the --config option:

me@work:~$ onevm --config prod list
me@work:~$ onehost --config test list

As an admin and a user, I can quickly switch between my roles and my cluster by organizing my configuration like this:

├── admin_dev.conf
├── admin_prod.conf
├── admin_test.conf
├── auth
│   ├── admin_dev_auth
│   ├── admin_prod_auth
│   ├── admin_test_auth
│   ├── dev_auth
│   ├── prod_auth
│   └── test_auth
├── dev.conf
├── prod.conf
└── test.conf
me@work:~$ onevm --config prod list # Simple user
me@work:~$ onehost --config admin_test list # Admin on the test infrastructure

The ~/.one/one.conf is the default configuration and user ~/.one/one_auth by default.



#1 Updated by Ruben S. Montero over 6 years ago

  • Tracker changed from Request to Backlog
  • Priority changed from Normal to High

#2 Updated by Ruben S. Montero over 6 years ago

  • Priority changed from High to Normal

#3 Updated by Ruben S. Montero over 6 years ago

  • Priority changed from Normal to Low

While this is interesting, using multiple envs is not really common use case. We'll keep it in backlog and catch it in a future release. Maybe this could be implemented as an external tool oneevn that changes and automates the user environemnt... A good candidate for IMHO.

Also available in: Atom PDF