def retrieve(self, entity, extras):
        """
        Add OpenStack related actions.
        """
        uid = entity.attributes['occi.core.id']
        context = extras['nova_ctx']

        # set additional actions
        if entity.attributes in 'occi.compute.state' and entity.attributes[
                'occi.compute.state'] == 'active':
            entity.actions.append(os_addon.OS_CREATE_IMAGE)
            entity.actions.append(os_addon.OS_CHG_PWD)

        # add VNC link if available
        console = vm.get_vnc(uid, context)
        if console:
            entity.attributes['org.openstack.compute.console.vnc'] =\
                console['url']
        else:
            entity.attributes['org.openstack.compute.console.vnc'] = 'N/A'

        # also expose the exact openstack state
        entity.attributes['org.openstack.compute.state'] = \
            vm.get_vm(uid, context)['vm_state']
dataset/ETHPy150Open tmetsch/occi-os/occi_os_api/backends/openstack.py/OsComputeBackend.retrieve/swapped operands of `in`