~niedbalski/charms/trusty/quantum-gateway/lp-1366598

« back to all changes in this revision

Viewing changes to tests/charmhelpers/contrib/openstack/amulet/deployment.py

  • Committer: james.page at ubuntu
  • Date: 2014-07-28 11:33:12 UTC
  • Revision ID: james.page@ubuntu.com-20140728113312-nzew0x1rn4ogh1g9
Resync helpers

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
    """This class inherits from AmuletDeployment and has additional support
8
8
       that is specifically for use by OpenStack charms."""
9
9
 
10
 
    def __init__(self, series, openstack=None, source=None):
 
10
    def __init__(self, series=None, openstack=None, source=None):
11
11
        """Initialize the deployment environment."""
12
12
        super(OpenStackAmuletDeployment, self).__init__(series)
13
13
        self.openstack = openstack
24
24
 
25
25
        if self.openstack:
26
26
            for svc in services:
27
 
                charm_name = self._get_charm_name(svc[name])
28
 
                if charm_name not in use_source:
 
27
                if svc[name] not in use_source:
29
28
                    config = {'openstack-origin': self.openstack}
30
29
                    self.d.configure(svc[name], config)
31
30
 
32
31
        if self.source:
33
32
            for svc in services:
34
 
                charm_name = self._get_charm_name(svc[name])
35
 
                if charm_name in use_source:
 
33
                if svc[name] in use_source:
36
34
                    config = {'source': self.source}
37
35
                    self.d.configure(svc[name], config)
38
36