~ubuntu-branches/ubuntu/trusty/heat/trusty

« back to all changes in this revision

Viewing changes to heat/engine/clients.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short
  • Date: 2013-08-08 01:08:42 UTC
  • Revision ID: package-import@ubuntu.com-20130808010842-77cni2v4vlib7rus
Tags: 2013.2~b2-0ubuntu4
[ Chuck Short ]
* debian/rules: Enable testsuite during builds.
* debian/patches/fix-sqlalchemy-0.8.patch: Build against sqlalchemy 0.8.
* debian/patches/rename-quantumclient.patch: quantumclient -> neutronclient.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    swiftclient = None
30
30
    logger.info('swiftclient not available')
31
31
try:
32
 
    from quantumclient.v2_0 import client as quantumclient
 
32
    from neutronclient.v2_0 import client as neutronclient
33
33
except ImportError:
34
 
    quantumclient = None
35
 
    logger.info('quantumclient not available')
 
34
    neutronclient = None
 
35
    logger.info('neutronclient not available')
36
36
try:
37
37
    from cinderclient import client as cinderclient
38
38
except ImportError:
58
58
        self._nova = {}
59
59
        self._keystone = None
60
60
        self._swift = None
61
 
        self._quantum = None
 
61
        self._neutron = None
62
62
        self._cinder = None
63
63
 
64
64
    def keystone(self):
130
130
        self._swift = swiftclient.Connection(**args)
131
131
        return self._swift
132
132
 
133
 
    def quantum(self):
134
 
        if quantumclient is None:
 
133
    def neutron(self):
 
134
        if neutronclient is None:
135
135
            return None
136
 
        if self._quantum:
137
 
            logger.debug('using existing _quantum')
138
 
            return self._quantum
 
136
        if self._neutron:
 
137
            logger.debug('using existing _neutron')
 
138
            return self._neutron
139
139
 
140
140
        con = self.context
141
141
        args = {
154
154
            logger.error("Quantum connection failed, "
155
155
                         "no password or auth_token!")
156
156
            return None
157
 
        logger.debug('quantum args %s', args)
158
 
 
159
 
        self._quantum = quantumclient.Client(**args)
160
 
 
161
 
        return self._quantum
 
157
        logger.debug('neutron args %s', args)
 
158
 
 
159
        self._neutron = neutronclient.Client(**args)
 
160
 
 
161
        return self._neutron
162
162
 
163
163
    def cinder(self):
164
164
        if cinderclient is None: