~ubuntu-branches/ubuntu/vivid/heat/vivid

« back to all changes in this revision

Viewing changes to heat/engine/clients/os/glance.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, Corey Bryant
  • Date: 2015-01-06 08:55:22 UTC
  • mfrom: (1.1.21)
  • Revision ID: package-import@ubuntu.com-20150106085522-4o3hnaff5lacvtrf
Tags: 2015.1~b1-0ubuntu1
[ Chuck Short ]
* Open up for vivid.
* debian/control: Update bzr branch. 
* debian/control: Add python-saharaclient,
  python-osprofiler, python-oslo.middleware, python-oslo.serialization.
* debian/patches/fix-reqirements.patch: Refreshed.
* debian/patches/skip-tests.patch: Updated to skip more tests.
* debian/rules: Skip integration tests.

[ Corey Bryant ]
* New upstream release.
  - d/control: Align requirements with upstream.
  - d/watch: Update uversionmangle for kilo beta naming.
  - d/rules: Generate heat.conf.sample and apply patch before copy.
  - d/rules: Run base tests instead of integration tests.
  - d/p/fix-requirements.patch: Refreshed.
  - d/p/remove-gettextutils-import.patch: Cherry picked from master.
* d/control: Bumped Standards-Version to 3.9.6.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
from heat.common import exception
18
18
from heat.common.i18n import _
 
19
from heat.common.i18n import _LI
19
20
from heat.engine.clients import client_plugin
20
21
from heat.engine import constraints
21
22
from heat.openstack.common import log as logging
40
41
            'project_id': con.tenant,
41
42
            'token': self.auth_token,
42
43
            'endpoint_type': endpoint_type,
43
 
            'ca_file': self._get_client_option('glance', 'ca_file'),
 
44
            'cacert': self._get_client_option('glance', 'ca_file'),
44
45
            'cert_file': self._get_client_option('glance', 'cert_file'),
45
46
            'key_file': self._get_client_option('glance', 'key_file'),
46
47
            'insecure': self._get_client_option('glance', 'insecure')
54
55
    def is_over_limit(self, ex):
55
56
        return isinstance(ex, exc.HTTPOverLimit)
56
57
 
 
58
    def is_conflict(self, ex):
 
59
        return isinstance(ex, exc.HTTPConflict)
 
60
 
57
61
    def get_image_id(self, image_identifier):
58
62
        '''
59
63
        Return an id for the specified image name or identifier.
89
93
                _("Error retrieving image list from glance: %s") % ex)
90
94
        num_matches = len(image_list)
91
95
        if num_matches == 0:
92
 
            LOG.info(_("Image %s was not found in glance") %
 
96
            LOG.info(_LI("Image %s was not found in glance"),
93
97
                     image_identifier)
94
98
            raise exception.ImageNotFound(image_name=image_identifier)
95
99
        elif num_matches > 1:
96
 
            LOG.info(_("Multiple images %s were found in glance with name") %
 
100
            LOG.info(_LI("Multiple images %s were found in glance with name"),
97
101
                     image_identifier)
98
102
            raise exception.PhysicalResourceNameAmbiguity(
99
103
                name=image_identifier)