Fix break in vm_vdi_cleaner after oslo changes.
Added missing imports along with adding a call to config.parser_args as needed to allow vm_vdi_cleaner to work against current master. Corrected spelling error in comment. Change-Id: I4d30d0f7f9718cb29fb8c4c18e9e6fa23f3496ef Closes-Bug: #1279942
This commit is contained in:
1 changed files with 7 additions and 1 deletions
@@ -27,10 +27,15 @@ possible_topdir = os.getcwd()
if os.path.exists(os.path.join(possible_topdir, "nova", "__init__.py")):
sys.path.insert(0, possible_topdir)
from nova import config
from nova import context
from nova import db
from nova import exception
# NOTE(philip-schwartz) Added service import to fix issue where importing
# xenapi service would cause an ArgsAlreadyParsedError exception
from nova import service
from nova.openstack.common import timeutils
from nova.virt import virtapi
from nova.virt.xenapi import driver as xenapi_driver
@@ -285,6 +290,7 @@ def clean_orphaned_instances(xenapi, orphaned_instances):
def main():
"""Main loop."""
config.parse_args(sys.argv)
args = CONF(args=sys.argv[1:], usage='%(prog)s [options] --command={' +
'|'.join(ALLOWED_COMMANDS) + '}')
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.