Add None value to service.description attribute

When using kolla_keystone_service module, if
description attribute is not created(example Keystone).
Service update will fail due missing attribute.

This change adds a None value to description in order to
allow service update when description was not added.

Change-Id: I568db4559428525ac6c5083cfc20cffc20be6342
This commit is contained in:
Eduardo Gonzalez 2017-03-15 14:43:04 +00:00
parent e3504d06f9
commit fb9e416a36
1 changed files with 2 additions and 1 deletions

View File

@ -55,8 +55,9 @@ def main():
for _service in cloud.keystone_client.services.list():
if _service.type == service_type:
service = _service
service_description = getattr(service, 'description', None)
if service.name != service_name or \
service.description != description:
service_description != description:
changed = True
cloud.keystone_client.services.update(
service,