~ahasenack/landscape-client/landscape-client-11.02-0ubuntu0.9.10.1

« back to all changes in this revision

Viewing changes to landscape/manager/eucalyptus.py

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2010-06-28 18:07:18 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100628180718-g9l55c9c5bnch03b
Tags: 1.5.2.1-0ubuntu0.9.10.0
Filter duplicate network interfaces in get_active_interfaces (LP: #597000)

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
from twisted.internet.defer import succeed
5
5
 
6
6
from landscape.lib.twisted_util import gather_results
7
 
from landscape.manager.manager import ManagerPlugin
 
7
from landscape.manager.plugin import ManagerPlugin
8
8
 
9
9
 
10
10
class EucalyptusInfo(object):
89
89
            self.message_type, self.send_message)
90
90
 
91
91
    def send_message(self):
 
92
        data_path = self.registry.config.data_path
92
93
        try:
93
 
            data_path = self.registry.config.data_path
94
94
            service_hub = self._service_hub_factory(data_path)
95
95
        except Exception, e:
96
96
            logging.exception(e)
150
150
            error that occurred while trying to retrieve credentials.
151
151
        @return: An error message to send to the server.
152
152
        """
 
153
        from imagestore.eucaservice import EucaToolsError
 
154
 
 
155
        if failure.check(EucaToolsError):
 
156
            self.enabled = False
153
157
        error = failure.getBriefTraceback()
154
158
        return {"type": self.error_message_type, "error": error}
155
159
 
181
185
    @return: A L{EucalyptusInfo} instance.
182
186
    """
183
187
    from imagestore.eucaservice import EucaTools
 
188
 
184
189
    return EucalyptusInfo(EucaTools(credentials))