Print this page
305 http_proxy value needs more checking for valid url syntax
2341 Client should be more conservative about closing sockets
4235 Misleading "node name" unknown messages when http_proxy set incorrectly
4495 Want ability to cancel individual file downloads
8902 Need a transport that downloads files by GET
9508 Captive portal test only run during catalog refresh
9613 Implicit refresh should raise InvalidDepotResponseException
9615 EOL clientside search v0
9629 EOL clientside support for filelist
9630 Hostile depot should live with other depot code
9631 HTTPS transport should be more rigorous in verification
9670 More specific error exceptions requested from search
9686 network operations should use accept-encoding when appropriate
9715 The info() operation should use the activity_lock

Split Close
Expand all
Collapse all
          --- old/src/modules/actions/generic.py
          +++ new/src/modules/actions/generic.py
↓ open down ↓ 31 lines elided ↑ open up ↑
  32   32  
  33   33  from cStringIO import StringIO
  34   34  import errno
  35   35  import os
  36   36  try:
  37   37          # Some versions of python don't have these constants.
  38   38          os.SEEK_SET
  39   39  except AttributeError:
  40   40          os.SEEK_SET, os.SEEK_CUR, os.SEEK_END = range(3)
  41   41  import pkg.actions
  42      -import pkg.client.retrieve as retrieve
  43   42  import pkg.portable as portable
  44   43  
  45   44  class Action(object):
  46   45          """Class representing a generic packaging object.
  47   46  
  48   47          An Action is a very simple wrapper around two dictionaries: a named set
  49   48          of data streams and a set of attributes.  Data streams generally
  50   49          represent files on disk, and attributes represent metadata about those
  51   50          files.
  52   51          """
↓ open down ↓ 339 lines elided ↑ open up ↑
 392  391  
 393  392          def get_remote_opener(self, img, fmri):
 394  393                  """Return an opener for the action's datastream which pulls from
 395  394                  the server.  The caller may have to decompress the
 396  395                  datastream."""
 397  396  
 398  397                  if not hasattr(self, "hash"):
 399  398                          return None
 400  399  
 401  400                  def opener():
 402      -                        return retrieve.get_datastream(img, fmri, self.hash)
      401 +                        return img.transport.get_datastream(fmri, self.hash)
 403  402  
 404  403                  return opener
 405  404  
 406  405          def verify(self, img, **args):
 407  406                  """Returns an empty list if correctly installed in the given
 408  407                  image."""
 409  408                  return []
 410  409  
 411  410          def needsdata(self, orig):
 412  411                  """Returns True if the action transition requires a
↓ open down ↓ 50 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX