def _redirect_eliot_logs_for_trial(): """ Enable Eliot logging to the ``_trial/test.log`` file. This wrapper function allows flocker/__version__.py to be imported by packaging tools without them having to install all the Flocker Eliot dependencies. E.g in ``Flocker/admin/vagrant.py``. """ import os import sys if os.path.basename(sys.argv[0]) == "trial": from eliot.twisted import redirectLogsForTrial redirectLogsForTrial()
# Copyright ClusterHQ Inc. See LICENSE file for details. """ Tests for :py:mod:`flocker.route`. """ from eliot.twisted import redirectLogsForTrial redirectLogsForTrial() del redirectLogsForTrial
# under the License. """EMC Block Device Driver for Unity.""" import os import sys from uuid import uuid4 import yaml from bitmath import GiB from emc_unity_flocker_plugin import api_factory from flocker.node.agents.test import test_blockdevice if os.path.basename(sys.argv[0]) == "trial": from eliot.twisted import redirectLogsForTrial redirectLogsForTrial() def emcblockdeviceapi_for_test(cluster_id, test_case): """Create ``EMCUnityBlockAPI`` instance. :returns: A ``EMCUnityBlockAPI`` instance """ config_file_path = os.environ.get('UNITY_CONFIG_FILE') config_file = open(config_file_path) # configure file parameter: # [Mandatory] # backend: ``emc_unity_flocker_plugin`` # ip: IP address of storage # user: User name to login storage # password: Password to login storage