distil/artifice/helpers.py
adriant ab75581297 Changes to the config system.
This patch addresses issues with the need for a global config.
Now any module needing config access can simply import the config module.
To facilitate this there were a lot of minor changes to config use throughout artifice,
as well as changes to classes that were passed a config on creation.
Also some changes to constants so that the new config system can work with them easier.

Change-Id: I6e9b4cbf0ff30683dc13e37f13334f7ed7ee7add
2014-04-02 15:55:00 +13:00

13 lines
310 B
Python

from novaclient.v1_1 import client
import config
def flavor_name(f_id):
nova = client.Client(
config.auth['username'],
config.auth['password'],
config.auth['default_tenant'],
config.auth['end_point'],
service_type="compute")
return nova.flavors.get(f_id).name