@@ -0,0 +1,1922 @@
+%22%22%22Create a conduit from the available information.%0A%0ACan try to examine './.arcconfig' and '~/.arcrc' if not enough information is%0Aprovided.%0A%0A%22%22%22%0A%0Aimport phlsys_arcconfig%0Aimport phlsys_arcrc%0Aimport phlsys_conduit%0A%0A%0Adef makeConduit():%0A    uri, user, cert = getUriUserCertificate()%0A    return phlsys_conduit.Conduit(uri, user, cert)%0A%0A%0Adef getUriUserCertificate():%0A    arcrc = phlsys_arcrc.getArcrc()%0A    arcconfig = phlsys_arcconfig.getArcconfig()%0A    uri = arcconfig%5B%22conduit_uri%22%5D%0A    uri = phlsys_conduit.makeConduitUri(uri)%0A    credentials = phlsys_arcrc.getHost(arcrc, uri)%0A    user = credentials%5B%22user%22%5D%0A    cert = credentials%5B%22cert%22%5D%0A    return uri, user, cert%0A%0A%0A#------------------------------------------------------------------------------%0A# Copyright (C) 2012 Bloomberg L.P.%0A#%0A# Permission is hereby granted, free of charge, to any person obtaining a copy%0A# of this software and associated documentation files (the %22Software%22), to%0A# deal in the Software without restriction, including without limitation the%0A# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or%0A# sell copies of the Software, and to permit persons to whom the Software is%0A# furnished to do so, subject to the following conditions:%0A#%0A# The above copyright notice and this permission notice shall be included in%0A# all copies or substantial portions of the Software.%0A#%0A# THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,%0A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE%0A# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER%0A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING%0A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS%0A# IN THE SOFTWARE.%0A#------------------------------- END-OF-FILE ----------------------------------%0A

add conduit factory