def __read_datasource(jboss_config, name, profile=None):

    operation = '/subsystem=datasources/data-source="{name}":read-resource'.format(name=name)
    if profile is not None:
        operation = '/profile="{profile}"'.format(profile=profile) + operation

    operation_result = __salt__['jboss7_cli.run_operation'](jboss_config, operation)

    return operation_result
dataset/ETHPy150Open saltstack/salt/salt/modules/jboss7.py/__read_datasource/original