def flocker_deploy(self, cluster, deployment_config, application_config):
        """
        Run ``flocker-deploy`` with given configuration files.

        :param cluster: The ``Cluster`` to which the supplied config should
            be applied.
        :param dict deployment_config: The desired deployment configuration.
        :param dict application_config: The desired application configuration.
        """
        # Construct an expected deployment mapping of IP addresses
        # to a set of ``Application`` instances.
        applications_to_parse = deepcopy(application_config)
        expected_deployment = dict()
        applications_map = FlockerConfiguration(
            applications_to_parse).applications()
        for node in deployment_config['nodes']:
            node_applications = []
            for node_app in deployment_config['nodes'][node]:
                if node_app in applications_map:
                    node_applications.append(applications_map[node_app])
            expected_deployment[node] = set(node_applications)
        temp = FilePath(self.mktemp())
        temp.makedirs()

        deployment = temp.child(b"deployment.yml")
        deployment.setContent(safe_dump(deployment_config))

        application = temp.child(b"application.yml")
        application.setContent(safe_dump(application_config))
        check_call([b"flocker-deploy",
                    b"--certificates-directory",
                    cluster.certificates_path.path,
                    cluster.control_node.public_address,
                    deployment.path, application.path])
        # Wait for the cluster state to match the new deployment.
        da = self.assert_expected_deployment(cluster, expected_deployment)
        return da
dataset/ETHPy150Open ClusterHQ/flocker/flocker/acceptance/obsolete/test_cli.py/FlockerDeployTests.flocker_deploy/original