Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

PEP8 compliance check, minor fixes.

  • Loading branch information...
commit a5d2acebc20234522cbd7d612c51b2eca1e6e2fe 1 parent 9823997
Steve Brown jpgeek authored
34 test_backup_schedules.py
View
@@ -31,16 +31,24 @@ def test_backup_schedules(self):
This is not yet implemented in Nova.
"""
-# try:
-# server = self.createServer(self.randName(prefix="create_schedule"))
-# server.backup_schedule.create(enabled=True,
-# weekly=novaclient.BACKUP_WEEKLY_SUNDAY,
-# daily=novaclient.BACKUP_DAILY_DISABLED)
-# new_sched = server.backup_schedule.get()
-# dtutil.assert_equal(new_sched.enabled, True)
-# dtutil.assert_equal(new_sched.weekly, weekly=novaclient.BACKUP_WEEKLY_SUNDAY)
-# dtutil.assert_equal(new_sched.daily, novaclient.BACKUP_DAILY_DISABLED)
-# except Exception as ex:
-# pass
-# finally:
-# server.delete()
+ server = self.createServer(
+ self.randName(prefix="backup_schedule"))
+
+ try:
+ # Create a server and a schedule
+ server.backup_schedule.create(
+ enabled=True,
+ weekly=novaclient.BACKUP_WEEKLY_SUNDAY,
+ daily=novaclient.BACKUP_DAILY_DISABLED)
+
+ # Get the schedule and verify it is correct
+ new_sched = server.backup_schedule.get()
+ dtutil.assert_equal(new_sched.enabled, True)
+ dtutil.assert_equal(new_sched.weekly,
+ weekly=novaclient.BACKUP_WEEKLY_SUNDAY)
+ dtutil.assert_equal(new_sched.daily,
+ novaclient.BACKUP_DAILY_DISABLED)
+ except Exception as ex:
+ pass
+ finally:
+ server.delete()
2  test_server_images.py
View
@@ -79,5 +79,5 @@ def test_snap_and_restore(self):
except Exception:
pass
finally:
- # delete the image
+ # delete the image
self.glance_connection.delete_image(backup_image)
2  test_servers.py
View
@@ -80,8 +80,8 @@ def test_create_from_bad_image(self):
new_server))
finally:
# Cleanup
- self.os.servers.delete(new_server)
self.glance_connection.delete_image(new_meta['id'])
+ self.os.servers.delete(new_server)
@dtest.attr(longtest=True)
@dtest.timed(FLAGS.timeout * 60)
5 utils.py
View
@@ -96,8 +96,9 @@ def waitForState(self, call, attr, *args, **kwargs):
in a loop until the state either changes to the final state of
the tracker (in which case waitForState() returns True) or an
invalid state is entered (in which case waitForState() returns
- the name of the invalid state). The state of the StatusTracker
- is modified, so the StatusTracker may not be reused.
+ the name of the invalid state). The state of the
+ StatusTracker is modified, so the StatusTracker may not be
+ reused.
"""
def getState():
Please sign in to comment.
Something went wrong with that request. Please try again.