

@base.remotable
def refresh(self, use_slave=False):
    extra = [field for field in INSTANCE_OPTIONAL_ATTRS if self.obj_attr_is_set(field)]
    current = self.__class__.get_by_uuid(self._context, uuid=self.uuid, expected_attrs=extra, use_slave=use_slave)
    current._context = None
    for field in self.fields:
        if field.obj_attr_is_set(field):
            if (field == 'info_cache'):
                self.info_cache.refresh()
            elif (self[field] != current[field]):
                self[field] = current[field]
    self.obj_reset_changes()

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/objects/instance.py Instance.refresh/VarMisuse@79/101 `self`->`field`