

def _flavor_from_db(self, db_flavor):
    'Load instance flavor information from instance_extra.'
    flavor_info = jsonutils.loads(db_flavor)
    self.flavor = objects.Flavor.obj_from_primitive(flavor_info['cur'])
    if flavor_info['old']:
        self.old_flavor = objects.Flavor.obj_from_primitive(flavor_info['old'])
    else:
        self.old_flavor = None
    if flavor_info['new']:
        db_flavor.new_flavor = objects.Flavor.obj_from_primitive(flavor_info['new'])
    else:
        self.new_flavor = None
    self.obj_reset_changes(['flavor', 'old_flavor', 'new_flavor'])

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/objects/instance.py Instance._flavor_from_db/VarMisuse@83/134 `self`->`db_flavor`