~gz/juju-ci-tools/lxd_container_networking

« back to all changes in this revision

Viewing changes to jujupy.py

  • Committer: Aaron Bentley
  • Date: 2016-03-15 13:09:10 UTC
  • mto: This revision was merged to the branch mainline in revision 1317.
  • Revision ID: aaron.bentley@canonical.com-20160315130910-cg9qdsdb1sh4zgqo
Use machine id instead of machine number.

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
            'This client does not need to enable JES')
129
129
 
130
130
 
131
 
Machine = namedtuple('Machine', ['number', 'info'])
 
131
Machine = namedtuple('Machine', ['machine_id', 'info'])
132
132
 
133
133
 
134
134
def yaml_loads(yaml_str):
819
819
        """
820
820
        members = []
821
821
        status = self.get_status()
822
 
        for number, machine in status.iter_machines():
 
822
        for machine_id, machine in status.iter_machines():
823
823
            if self.get_controller_member_status(machine):
824
 
                members.append(Machine(number, machine))
 
824
                members.append(Machine(machine_id, machine))
825
825
        if len(members) <= 1:
826
826
            return members
827
827
        # Search for the leader and make it the first in the list.