~openstack-charmers/charms/trusty/nova-cell/next

« back to all changes in this revision

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

  • Committer: Liam Young
  • Date: 2015-01-29 13:02:55 UTC
  • Revision ID: liam.young@canonical.com-20150129130255-x5kmerk9e0jw81ql
[gnuoy] sync charm-helpers

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2014-2015 Canonical Limited.
 
2
#
 
3
# This file is part of charm-helpers.
 
4
#
 
5
# charm-helpers is free software: you can redistribute it and/or modify
 
6
# it under the terms of the GNU Lesser General Public License version 3 as
 
7
# published by the Free Software Foundation.
 
8
#
 
9
# charm-helpers is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
# GNU Lesser General Public License for more details.
 
13
#
 
14
# You should have received a copy of the GNU Lesser General Public License
 
15
# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
 
16
 
1
17
import amulet
2
 
 
3
18
import os
 
19
import six
4
20
 
5
21
 
6
22
class AmuletDeployment(object):
52
68
 
53
69
    def _add_relations(self, relations):
54
70
        """Add all of the relations for the services."""
55
 
        for k, v in relations.iteritems():
 
71
        for k, v in six.iteritems(relations):
56
72
            self.d.relate(k, v)
57
73
 
58
74
    def _configure_services(self, configs):
59
75
        """Configure all of the services."""
60
 
        for service, config in configs.iteritems():
 
76
        for service, config in six.iteritems(configs):
61
77
            self.d.configure(service, config)
62
78
 
63
79
    def _deploy(self):