Reviewed: https://review.openstack.org/30969 Committed: http://github.com/openstack/nova/commit/94d87df93d82626a8f7d5e60f364fdbd411f6c6c Submitter: Jenkins Branch: milestone-proposed
commit 94d87df93d82626a8f7d5e60f364fdbd411f6c6c Author: Yaguang Tang <[email protected]> Date: Mon May 20 18:05:30 2013 +0800 Fix config drive code logical error. Image id has changed to uuid, so bool value can't be a image ID any more, remove unnecessary test code. fix bug #1181991 Change-Id: I420e4cdb848401375b347d43e06343efaa7bf5fc (cherry picked from commit 4f44cd9129f094d88dfddfa5885c453590ac847c) ** Changed in: nova Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1181991 Title: config drive is broken by one commit Status in OpenStack Compute (Nova): Fix Released Bug description: config drive feature is broken by the follow commit commit 715435c816b51b6ec8d38453326eecd35c339fd9 Author: Rick Harris <[email protected]> Date: Tue May 14 15:23:55 2013 +0000 Use strict=True instead of `is_valid_boolstr` Oslo's `bool_from_string` learned the `strict` keyword which allows callers to detect invalid boolean values, so we can use that instead of having a new Nova-specific function. Change-Id: I61bfa4029897c7304bd54d6cdae9f9a9bc4c1f78 + def _check_config_drive(self, context, config_drive): + bool_like = True + try: + strutils.bool_from_string(config_drive, strict=True) + except ValueError: + bool_like = False + + if config_drive is None: + return None, None + elif bool_like and config_drive not in (0, 1, '0', '1'): + # NOTE(sirp): '0' and '1' could be a bool value or an ID. Since + # there are many other ways to specify bools (e.g. 't', 'f'), it's + # better to treat as an ID. + return None, config_drive when config_drive is True or False, from the code logic above, it is treated as an ID . To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1181991/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

