

def obj_load_attr(self, attrname):
    if (attrname not in INSTANCE_OPTIONAL_ATTRS):
        raise exception.ObjectActionError(action='obj_load_attr', reason=('attribute %s not lazy-loadable' % attrname))
    if (not self._context):
        raise exception.OrphanedObjectError(method='obj_load_attr', objtype=self.obj_name())
    LOG.debug("Lazy-loading '%(attr)s' on %(name)s uuid %(uuid)s", {
        'attr': attrname,
        'name': self.obj_name(),
        'uuid': self.uuid,
    })
    if (attrname == 'fault'):
        self._load_fault()
    elif (attrname == 'numa_topology'):
        self._load_numa_topology()
    elif (attrname == 'pci_requests'):
        self._load_pci_requests()
    elif (attrname == 'vcpu_model'):
        self._load_vcpu_model()
    elif (attrname == 'ec2_ids'):
        self._load_ec2_ids()
    elif (attrname == 'migration_context'):
        self._load_migration_context()
    elif (attrname == 'security_groups'):
        self._load_security_groups()
    elif (attrname == 'pci_devices'):
        self._load_pci_devices()
    elif ('flavor' in attrname):
        self._load_flavor()
    elif ((attrname == 'services') and self.deleted):
        self.services = objects.ServiceList(attrname._context)
    else:
        self._load_generic(attrname)
    self.obj_reset_changes([attrname])

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/objects/instance.py Instance.obj_load_attr/VarMisuse@269/431 `self`->`attrname`