def test_attach_existing_nonmanifest(self):
        deployer = create_blockdevicedeployer(
            self, hostname=self.NODE, node_uuid=self.NODE_UUID
        )
        # Give it a configuration that says a dataset should have a
        # manifestation on the deployer's node.
        node_config = to_node(self.ONE_DATASET_STATE)
        cluster_config = Deployment(nodes={node_config})

        # Give the node an empty state.
        node_state = self.ONE_DATASET_STATE.transform(
            ["manifestations", unicode(self.DATASET_ID)], discard
        ).transform(
            ["devices", self.DATASET_ID], discard
        )

        # Take the dataset in the configuration and make it part of the
        # cluster's non-manifest datasets state.
        manifestation = node_config.manifestations[unicode(self.DATASET_ID)]
        dataset = manifestation.dataset
        nonmanifest_datasets = {
            unicode(dataset.dataset_id): dataset,
        }
        cluster_state = DeploymentState(
            nodes={node_state},
            nonmanifest_datasets=nonmanifest_datasets,
        )

        local_state = local_state_from_shared_state(
            node_state=node_state,
            nonmanifest_datasets=cluster_state.nonmanifest_datasets,
        )
        changes = deployer.calculate_changes(
            cluster_config, cluster_state, local_state)
        self.assertEqual(
            in_parallel(changes=[
                AttachVolume(
                    dataset_id=UUID(dataset.dataset_id),
                    blockdevice_id=_create_blockdevice_id_for_test(
                        dataset.dataset_id)
                ),
            ]),
            changes
        )
If a dataset exists but is not manifest anywhere in the cluster and the
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/test/test_blockdevice.py/BlockDeviceDeployerAttachCalculateChangesTests.test_attach_existing_nonmanifest