~ubuntu-branches/ubuntu/quantal/nova/quantal-proposed

« back to all changes in this revision

Viewing changes to smoketests/test_sysadmin.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-09 14:24:07 UTC
  • mto: This revision was merged to the branch mainline in revision 55.
  • Revision ID: package-import@ubuntu.com-20111209142407-fviz6p5dnictpxsr
Tags: upstream-2012.1~e2~20111208.11721
ImportĀ upstreamĀ versionĀ 2012.1~e2~20111208.11721

Show diffs side-by-side

added added

removed removed

Lines of Context:
166
166
        if not self.wait_for_running(self.data['instance']):
167
167
            self.fail('instance failed to start')
168
168
        self.data['instance'].update()
169
 
        ip = self.data['instance'].private_dns_name
 
169
        ip = self.data['instance'].private_ip_address
170
170
        self.failIf(ip == '0.0.0.0')
171
171
        if FLAGS.use_ipv6:
172
172
            ipv6 = self.data['instance'].dns_name_v6
173
173
            self.failIf(ipv6 is None)
174
174
 
175
175
    def test_004_can_ping_private_ip(self):
176
 
        if not self.wait_for_ping(self.data['instance'].private_dns_name):
 
176
        if not self.wait_for_ping(self.data['instance'].private_ip_address):
177
177
            self.fail('could not ping instance')
178
178
 
179
179
        if FLAGS.use_ipv6:
182
182
                self.fail('could not ping instance v6')
183
183
 
184
184
    def test_005_can_ssh_to_private_ip(self):
185
 
        if not self.wait_for_ssh(self.data['instance'].private_dns_name,
 
185
        if not self.wait_for_ssh(self.data['instance'].private_ip_address,
186
186
                                 TEST_KEY):
187
187
            self.fail('could not ssh to instance')
188
188
 
210
210
        if not self.wait_for_running(self.data['instance']):
211
211
            self.fail('instance failed to start')
212
212
        self.data['instance'].update()
213
 
        if not self.wait_for_ping(self.data['instance'].private_dns_name):
 
213
        if not self.wait_for_ping(self.data['instance'].private_ip_address):
214
214
            self.fail('could not ping instance')
215
 
        if not self.wait_for_ssh(self.data['instance'].private_dns_name,
 
215
        if not self.wait_for_ssh(self.data['instance'].private_ip_address,
216
216
                                 TEST_KEY):
217
217
            self.fail('could not ssh to instance')
218
218
 
253
253
        time.sleep(5)
254
254
 
255
255
    def test_003_can_mount_volume(self):
256
 
        ip = self.data['instance'].private_dns_name
 
256
        ip = self.data['instance'].private_ip_address
257
257
        conn = self.connect_ssh(ip, TEST_KEY)
258
258
        # NOTE(vish): this will create an dev for images that don't have
259
259
        #             udev rules
273
273
            self.fail('Unable to mount: %s %s' % (out, stderr.read()))
274
274
 
275
275
    def test_004_can_write_to_volume(self):
276
 
        ip = self.data['instance'].private_dns_name
 
276
        ip = self.data['instance'].private_ip_address
277
277
        conn = self.connect_ssh(ip, TEST_KEY)
278
278
        # FIXME(devcamcar): This doesn't fail if the volume hasn't been mounted
279
279
        stdin, stdout, stderr = conn.exec_command(
284
284
            self.fail('Unable to write to mount: %s' % (err))
285
285
 
286
286
    def test_005_volume_is_correct_size(self):
287
 
        ip = self.data['instance'].private_dns_name
 
287
        ip = self.data['instance'].private_ip_address
288
288
        conn = self.connect_ssh(ip, TEST_KEY)
289
289
        stdin, stdout, stderr = conn.exec_command(
290
290
            "cat /sys/class/block/%s/size" % self.device.rpartition('/')[2])
297
297
                          (out, stderr.read(), expected_size))
298
298
 
299
299
    def test_006_me_can_umount_volume(self):
300
 
        ip = self.data['instance'].private_dns_name
 
300
        ip = self.data['instance'].private_ip_address
301
301
        conn = self.connect_ssh(ip, TEST_KEY)
302
302
        stdin, stdout, stderr = conn.exec_command('umount /mnt/vol')
303
303
        err = stderr.read()