'If a dataset with a primary manifestation on one node is marked as
deleted in the configuration, the ``BlockDeviceDeployer`` for a
different node does not return a ``DestroyVolume`` from its
``calculate_necessary_state_changes`` for that dataset.'

def test_deleted_dataset_belongs_to_other_node(self):

    other_node = u'192.0.2.2'
    node_state = self.ONE_DATASET_STATE
    cluster_state = DeploymentState(nodes={node_state})
    node_config = to_node(node_state).transform(['manifestations', unicode(self.DATASET_ID), 'dataset', 'deleted'], True)
    cluster_configuration = Deployment(nodes={node_config})
    api = loopbackblockdeviceapi_for_test(self)
    volume = api.create_volume(dataset_id=self.DATASET_ID, size=LOOPBACK_MINIMUM_ALLOCATABLE_SIZE)
    api.attach_volume(volume.blockdevice_id, self.NODE)
    other_node_uuid = uuid4()
    deployer = BlockDeviceDeployer(hostname=other_node, node_uuid=other_node_uuid, block_device_api=api)
    local_state = local_state_from_shared_state(node_state=cluster_state.get_node(other_node_uuid, hostname=other_node), nonmanifest_datasets={})
    changes = deployer.calculate_changes(cluster_configuration, cluster_state, local_state)
    self.assertEqual(in_parallel(changes=[]), changes, 'Wrong    changes    for    node    {}    when    dataset    {}    attached    to    node    {}'.format(other_node_uuid, self.DATASET_ID, self.NODE_UUID))
