def PutPackageInfo(
      self, filename, pkginfo, catalogs=None, manifests=None,
      install_types=None, got_hash=None):
    """Put new/updated package info.

    Args:
      filename: str unique filename for pkginfo.
      pkginfo: str XML pkginfo.
      catalogs: optional, list of str catalogs to target.
      manifests: optional, list of str manifests to target
      install_types: optional, list of str install types.
      got_hash: optional, str, sha256 hash of pkginfo retrieved earlier.
        if supplied, the server will only update the new pkginfo if the
        hash for the current pkginfo on the server matches this hash.
    Returns:
      str body from response.
    Raises:
      SimianServerError: if the Simian server returned an error (status != 200)
    """
    filename = urllib.quote(filename)
    pkginfo = pkginfo.encode('utf-8')
    opts = []
    if catalogs is not None:
      opts.append('catalogs=%s' % ','.join(catalogs))
    if manifests is not None:
      opts.append('manifests=%s' % ','.join(manifests))
    if install_types is not None:
      opts.append('install_types=%s' % ','.join(install_types))
    if got_hash is not None:
      opts.append('hash=%s' % got_hash)
    url = '/pkgsinfo/%s?%s' % (
        filename, '&'.join(opts))
    return self._SimianRequest('PUT', url, pkginfo)
dataset/ETHPy150Open google/simian/src/simian/client/client.py/SimianClient.PutPackageInfo/original