~openstack-charmers-archive/charms/trusty/keystone/next

« back to all changes in this revision

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

  • Committer: james.page at ubuntu
  • Date: 2014-07-02 08:19:37 UTC
  • mto: This revision was merged to the branch mainline in revision 72.
  • Revision ID: james.page@ubuntu.com-20140702081937-3uloept2tbj8o5me
Resync helpers

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
                    if ret:
75
75
                        return "unexpected tenant data - {}".format(ret)
76
76
            if not found:
77
 
                return "tenant {} does not exist".format(e.name)
 
77
                return "tenant {} does not exist".format(e['name'])
78
78
        return ret
79
79
 
80
80
    def validate_role_data(self, expected, actual):
91
91
                    if ret:
92
92
                        return "unexpected role data - {}".format(ret)
93
93
            if not found:
94
 
                return "role {} does not exist".format(e.name)
 
94
                return "role {} does not exist".format(e['name'])
95
95
        return ret
96
96
 
97
97
    def validate_user_data(self, expected, actual):
110
110
                    if ret:
111
111
                        return "unexpected user data - {}".format(ret)
112
112
            if not found:
113
 
                return "user {} does not exist".format(e.name)
 
113
                return "user {} does not exist".format(e['name'])
114
114
        return ret
115
115
 
116
116
    def validate_flavor_data(self, expected, actual):
192
192
 
193
193
        count = 1
194
194
        status = instance.status
195
 
        while status == 'BUILD' and count < 10:
196
 
            time.sleep(5)
 
195
        while status != 'ACTIVE' and count < 60:
 
196
            time.sleep(3)
197
197
            instance = nova.servers.get(instance.id)
198
198
            status = instance.status
199
199
            self.log.debug('instance status: {}'.format(status))