def _test_sized_vol_container(self, cluster, node):
        client = get_docker_client(cluster, node.public_address)
        volume_name = random_name(self)
        size = integers(min_value=75, max_value=100).example()
        expression = volume_expression.example()
        size_opt = "".join(str(size)) + expression
        size_bytes = int(GiB(size).to_Byte().value)
        self._create_volume(client, volume_name,
                            driver_opts={'size': size_opt})
        http_port = 8080

        container_identifier = self.run_python_container(
            cluster, node.public_address,
            {"host_config": client.create_host_config(
                binds=["{}:/sizedvoldata".format(volume_name)],
                port_bindings={http_port: 0},
                restart_policy={"Name": "always"},
                privileged=True),
             "ports": [http_port]},
            SCRIPTS.child(b"lsblkhttp.py"),
            [u"/sizedvoldata"], client=client)
        host_port = extract_external_port(
            client, container_identifier, http_port,
        )

        d = assert_http_server(
            self, node.public_address, host_port,
            expected_response=str(size_bytes))

        def _get_datasets(unused_arg):
            return cluster.client.list_datasets_configuration()
        d.addCallback(_get_datasets)

        def _verify_volume_metadata_size(datasets):
            dataset = next(d for d in datasets
                           if d.metadata.get(u'name') == volume_name)
            self.assertEqual(int(dataset.metadata.get(u'maximum_size')),
                             size_bytes)
        d.addCallback(_verify_volume_metadata_size)

        return d
Create a volume with a size, then create a
dataset/ETHPy150Open ClusterHQ/flocker/flocker/acceptance/endtoend/test_dockerplugin.py/DockerPluginTests._test_sized_vol_container