mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-5201: Correcting code related to schedule of
recurring snapshot policy
This commit is contained in:
parent
db2ea0a16a
commit
138cee401f
|
|
@ -534,14 +534,8 @@ class TestBaseImageUpdate(cloudstackTestCase):
|
|||
vm_with_reset.rootdeviceid
|
||||
)
|
||||
|
||||
now = datetime.now()
|
||||
delta = timedelta(minutes=15)
|
||||
scheduled_time = now + delta
|
||||
|
||||
self.services["recurring_snapshot"]["schedule"] = scheduled_time.minute
|
||||
|
||||
self.debug("Creating recurring snapshot policy for root disk on vm created with IsVolatile=True")
|
||||
self.debug("Snapshot Policy - Type : %s Scheduled minute : %s" %(
|
||||
self.debug("Snapshot Policy - Type : %s Scheduled Hours : %s" %(
|
||||
self.services["recurring_snapshot"]["intervaltype"],
|
||||
self.services["recurring_snapshot"]["schedule"]))
|
||||
|
||||
|
|
@ -575,7 +569,7 @@ class TestBaseImageUpdate(cloudstackTestCase):
|
|||
self.services["recurring_snapshot"]["maxsnaps"],
|
||||
"Check interval type in list resources call"
|
||||
)
|
||||
sleep_seconds = delta.seconds + 600
|
||||
sleep_seconds = (self.services["recurring_snapshot"]["schedule"]) * 3600 + 600
|
||||
sleep_minutes = sleep_seconds/60
|
||||
self.debug("Sleeping for %s minutes till the volume is snapshoted" %sleep_minutes)
|
||||
time.sleep(sleep_seconds)
|
||||
|
|
|
|||
Loading…
Reference in New Issue