Switch from FLAGS to CONF in nova.compute
Use the global CONF variable instead of FLAGS. This is purely a cleanup since FLAGS is already just another reference to CONF. We leave the nova.flags imports until a later cleanup commit since removing them may cause unpredictable problems due to config options not being registered. Change-Id: I0488b406dcf9f9459810337b62b6932d71a623a9
This commit is contained in:
@@ -18,11 +18,12 @@
|
||||
|
||||
# Importing full names to not pollute the namespace and cause possible
|
||||
# collisions with use of 'from nova.compute import <foo>' elsewhere.
|
||||
import nova.config
|
||||
import nova.flags
|
||||
import nova.openstack.common.importutils
|
||||
|
||||
|
||||
def API(*args, **kwargs):
|
||||
importutils = nova.openstack.common.importutils
|
||||
cls = importutils.import_class(nova.flags.FLAGS.compute_api_class)
|
||||
cls = importutils.import_class(nova.config.CONF.compute_api_class)
|
||||
return cls(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user