~ubuntu-branches/ubuntu/natty/landscape-client/natty-proposed

« back to all changes in this revision

Viewing changes to landscape/broker/service.py

  • Committer: Package Import Robot
  • Author(s): Andreas Hasenack
  • Date: 2011-07-22 12:49:00 UTC
  • mfrom: (1.2.9 upstream)
  • Revision ID: package-import@ubuntu.com-20110722124900-jvfq819ekbtnac61
Tags: 11.07.1.1-0ubuntu0.11.04.0
* Try to load the old persist file if the current one doesn't exist or is
  empty (LP: #809210).
* Fallback to gethostname to get something interesting out of get_fqdn.
* Fix wrong ownership and permissions when the reporter is run as a result
  of applying a repository profile (LP: #804008).
* Keep original sources.list ownership (LP: #804548).
* Refactored tests (LP: #805746).
* Preserve permissions of sources.list (LP: #804548).
* Added a broker command line option (--record) that saves exchanges with the
  server to the filesystem 
* Detect if running in a vmware guest (LP: #795794).
* Report VM type when run in the cloud (LP: #797069).
* Report VM type in non-cloud registration (LP: #795752).
* Report the package reporter result even in case of success, not just in
  case of failure (LP: #780406).
* Report package reporter errors (LP: #732490).
* Fix dependencies for hardy removing references to python 2.4 packages for
  pycurl and dbus (LP: #759764).
* The landscape client now reports whether it is running on a virtual machine
  or not.
* Add a plugin which manages APT sources.list and the associated GPG keys
  (LP: #758928).
* Limit the number of items in a network message to 200, to prevent problems
  when communication is interrupted with the server and the client
  accumulates too many network items, thus overloading the server when it's
  available again (LP: #760486).
* Updated version number in __init__.py so that the client reports the
  correct one in its user-agent string.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
from landscape.service import LandscapeService, run_landscape_service
6
6
from landscape.broker.registration import RegistrationHandler, Identity
7
7
from landscape.broker.config import BrokerConfiguration
8
 
from landscape.broker.transport import HTTPTransport
 
8
from landscape.broker.transport import HTTPTransport, PayloadRecorder
9
9
from landscape.broker.exchange import MessageExchange
10
10
from landscape.broker.exchangestore import ExchangeStore
11
11
from landscape.broker.ping import Pinger
48
48
        self.persist_filename = os.path.join(
49
49
            config.data_path, "%s.bpickle" % (self.service_name,))
50
50
        super(BrokerService, self).__init__(config)
51
 
        self.transport = self.transport_factory(config.url,
52
 
                                                config.ssl_public_key)
 
51
 
 
52
        if config.record is not None:
 
53
            self.payload_recorder = PayloadRecorder(config.record_directory)
 
54
        else:
 
55
            self.payload_recorder = None
 
56
        self.transport = self.transport_factory(
 
57
            config.url, config.ssl_public_key, self.payload_recorder)
53
58
        self.message_store = get_default_message_store(
54
59
            self.persist, config.message_store_path)
55
60
        self.identity = Identity(self.config, self.persist)
56
61
        exchange_store = ExchangeStore(self.config.exchange_store_path)
57
62
        self.exchanger = MessageExchange(
58
63
            self.reactor, self.message_store, self.transport, self.identity,
59
 
            exchange_store, config.exchange_interval,
60
 
            config.urgent_exchange_interval)
 
64
            exchange_store, config)
61
65
        self.pinger = self.pinger_factory(self.reactor, config.ping_url,
62
66
                                          self.identity, self.exchanger)
63
67
        self.registration = RegistrationHandler(