Merge "Update time is not updated when metadata of aggregate is updated"

This commit is contained in:
Jenkins 2016-03-04 14:10:56 +00:00 committed by Gerrit Code Review
commit 7e3e92e826
3 changed files with 4 additions and 2 deletions

View File

@ -11,6 +11,6 @@
"key": "value"
},
"name": "name",
"updated_at": null
"updated_at": "2013-08-18T12:17:55.986540"
}
}

View File

@ -3782,6 +3782,7 @@ class AggregateAPI(base.Base):
action_name=AGGREGATE_ACTION_UPDATE)
if values:
aggregate.update_metadata(values)
aggregate.updated_at = timeutils.utcnow()
self.scheduler_client.update_aggregates(context, [aggregate])
# If updated values include availability_zones, then the cache
# which stored availability_zones and host need to be reset
@ -3801,6 +3802,7 @@ class AggregateAPI(base.Base):
# which stored availability_zones and host need to be reset
if metadata and metadata.get('availability_zone'):
availability_zones.reset_cache()
aggregate.updated_at = timeutils.utcnow()
return aggregate
@wrap_exception()

View File

@ -11,6 +11,6 @@
"key": "value"
},
"name": "name",
"updated_at": null
"updated_at": %(strtime)s
}
}