Example #1
0
def main(zone_bundle, deployment_name, irods_core_packages_root_directory,
         plugin_package_root_directory, plugin_package_prefix,
         ansible_module_to_run, python_test_module_to_run, output_directory):
    zone_bundle_output_file = os.path.join(output_directory,
                                           'deployed_zone.json')
    version_to_packages_map = {
        'deployment-determined': irods_core_packages_root_directory,
    }
    deployed_zone_bundle = library.deploy(zone_bundle, deployment_name,
                                          version_to_packages_map,
                                          zone_bundle_output_file)
    with library.deployed_zone_bundle_manager(deployed_zone_bundle):
        icat_ip = deployed_zone_bundle['zones'][0]['icat_server'][
            'deployment_information']['ip_address']

        complex_args = {
            'plugin_package_root_directory': plugin_package_root_directory,
            'plugin_package_prefix': plugin_package_prefix,
            'python_test_module_to_run': python_test_module_to_run,
            'output_directory': output_directory
        }

        try:
            library.run_ansible(module_name=ansible_module_to_run,
                                complex_args=complex_args,
                                host_list=[icat_ip],
                                sudo=True)
        finally:
            library.gather(deployed_zone_bundle, output_directory)
def main(zone_bundle, deployment_name, packages_root_directory, output_directory, python_client_git_repository, python_client_git_commitish):
    logger = logging.getLogger(__name__)
    zone_bundle_output_file = os.path.join(output_directory, 'deployed_zone.json')
    version_to_packages_map = {
        'deployment-determined': packages_root_directory,
    }
    deployed_zone_bundle = library.deploy(zone_bundle, deployment_name, version_to_packages_map, zone_bundle_output_file)
    with library.deployed_zone_bundle_manager(deployed_zone_bundle):
        icat_ip = deployed_zone_bundle['zones'][0]['icat_server']['deployment_information']['ip_address']

        complex_args = {
            'output_directory': output_directory,
            'python_client_git_repository': python_client_git_repository,
            'python_client_git_commitish': python_client_git_commitish,
        }

        data = library.run_ansible(module_name='irods_test_python_client', complex_args=complex_args, host_list=[icat_ip])
Example #3
0
def main(zone_bundle, deployment_name, irods_core_packages_root_directory, plugin_package_root_directory, plugin_package_prefix, ansible_module_to_run, python_test_module_to_run, output_directory):
    logger = logging.getLogger(__name__)
    zone_bundle_output_file = os.path.join(output_directory, 'deployed_zone.json')
    version_to_packages_map = {
        'deployment-determined': irods_core_packages_root_directory,
    }
    deployed_zone_bundle = library.deploy(zone_bundle, deployment_name, version_to_packages_map, zone_bundle_output_file)
    with library.deployed_zone_bundle_manager(deployed_zone_bundle):
        icat_ip = deployed_zone_bundle['zones'][0]['icat_server']['deployment_information']['ip_address']

        complex_args = {
            'plugin_package_root_directory': plugin_package_root_directory,
            'plugin_package_prefix': plugin_package_prefix,
            'python_test_module_to_run': python_test_module_to_run,
            'output_directory': output_directory
        }

        try:
            library.run_ansible(module_name=ansible_module_to_run, complex_args=complex_args, host_list=[icat_ip], sudo=True)
        finally:
            library.gather(deployed_zone_bundle, output_directory)