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

« back to all changes in this revision

Viewing changes to heat/engine/clients/client_plugin.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:
50
50
        return self.clients.client('keystone').url_for(**kwargs)
51
51
 
52
52
    def _get_client_option(self, client, option):
 
53
        # look for the option in the [clients_${client}] section
 
54
        # unknown options raise cfg.NoSuchOptError
53
55
        try:
54
56
            group_name = 'clients_' + client
55
57
            cfg.CONF.import_opt(option, 'heat.common.config',
56
58
                                group=group_name)
57
 
            return getattr(getattr(cfg.CONF, group_name), option)
58
 
        except (cfg.NoSuchGroupError, cfg.NoSuchOptError):
59
 
            cfg.CONF.import_opt(option, 'heat.common.config', group='clients')
60
 
            return getattr(cfg.CONF.clients, option)
 
59
            v = getattr(getattr(cfg.CONF, group_name), option)
 
60
            if v is not None:
 
61
                return v
 
62
        except cfg.NoSuchGroupError:
 
63
            pass  # do not error if the client is unknown
 
64
        # look for the option in the generic [clients] section
 
65
        cfg.CONF.import_opt(option, 'heat.common.config', group='clients')
 
66
        return getattr(cfg.CONF.clients, option)
61
67
 
62
68
    def is_client_exception(self, ex):
63
69
        '''Returns True if the current exception comes from the client.'''