def test_deleted_ignored(self):
        local_state = self.ONE_DATASET_STATE.transform(
            # Remove the dataset.  This reflects its deletedness.
            ["manifestations", unicode(self.DATASET_ID)], discard,
            # Remove its device too.
            ["devices", self.DATASET_ID], discard,
            # Remove its mountpoint too.
            ["paths", unicode(self.DATASET_ID)], discard,
        )

        local_config = to_node(self.ONE_DATASET_STATE).transform(
            ["manifestations", unicode(self.DATASET_ID), "dataset"],
            lambda d: d.set(
                # Mark it as deleted in the configuration.
                deleted=True,
                # Change a bunch of other things too.  They shouldn't matter.
                maximum_size=d.maximum_size * 2,
                metadata={u"foo": u"bar"},
            )
        )

        # Upon deletion, datasets to not get unregistered, so they will still
        # be in the discovered datasets.

        registered_dataset = DiscoveredDataset(
            dataset_id=self.DATASET_ID,
            blockdevice_id=self.BLOCKDEVICE_ID,
            state=DatasetStates.REGISTERED,
        )

        # Foreign deleted datasets show up as REGISTERED, but they are not in
        # our config.
        foreign_registered_dataset_id = uuid4()
        foreign_registered_dataset = DiscoveredDataset(
            dataset_id=foreign_registered_dataset_id,
            blockdevice_id=_create_blockdevice_id_for_test(
                foreign_registered_dataset_id
            ),
            state=DatasetStates.REGISTERED,
        )

        assert_calculated_changes(
            self, local_state, local_config,
            nonmanifest_datasets={},
            expected_changes=in_parallel(changes=[]),
            discovered_datasets=[
                registered_dataset,
                foreign_registered_dataset
            ],
        )
Deleted datasets for which no corresponding volumes exist do not result
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/test/test_blockdevice.py/BlockDeviceDeployerAlreadyConvergedCalculateChangesTests.test_deleted_ignored