def shared_state_changes(self):
        # XXX The structure of the shared state changes reflects the model
        # currently used by the control service. However, that model doesn't
        # seem to actually match what any consumer wants.
        manifestations = {}
        paths = {}
        devices = {}
        nonmanifest_datasets = {}

        for dataset in self.datasets.values():
            dataset_id = dataset.dataset_id
            if dataset.state == DatasetStates.MOUNTED:
                manifestations[unicode(dataset_id)] = Manifestation(
                    dataset=Dataset(
                        dataset_id=dataset_id,
                        maximum_size=dataset.maximum_size,
                    ),
                    primary=True,
                )
                paths[unicode(dataset_id)] = dataset.mount_point
            elif dataset.state in (
                DatasetStates.NON_MANIFEST, DatasetStates.ATTACHED,
                DatasetStates.ATTACHED_NO_FILESYSTEM,
                DatasetStates.ATTACHED_TO_DEAD_NODE,
            ):
                nonmanifest_datasets[unicode(dataset_id)] = Dataset(
                    dataset_id=dataset_id,
                    maximum_size=dataset.maximum_size,
                )
            if dataset.state in (
                DatasetStates.MOUNTED, DatasetStates.ATTACHED,
                DatasetStates.ATTACHED_NO_FILESYSTEM,
            ):
                devices[dataset_id] = dataset.device_path

        return (
            NodeState(
                uuid=self.node_uuid,
                hostname=self.hostname,
                manifestations=manifestations,
                paths=paths,
                devices=devices,
                applications=None,
            ),
            NonManifestDatasets(
                datasets=nonmanifest_datasets
            ),
        )
Returns the NodeState and the NonManifestDatasets of the local state.
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/blockdevice.py/BlockDeviceDeployerLocalState.shared_state_changes