From c493781208fdf1e59103be27d71221ebadeb70e7 Mon Sep 17 00:00:00 2001 From: Nikolai Starodubtsev Date: Thu, 4 Feb 2016 13:44:34 +0300 Subject: [PATCH] Skip description from service transformation Previously we transforms murano package description to Cloud Foundry service description and never check it length. It cause error on one of the CF implementations because it has restriction for the table length. Change-Id: Ia5d4e71af19c11033d86873574f17a0d3a15b0c4 Closes-Bug: #1540843 --- murano/api/v1/cloudfoundry/cfapi.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/murano/api/v1/cloudfoundry/cfapi.py b/murano/api/v1/cloudfoundry/cfapi.py index 8054ffb3..c33614b5 100644 --- a/murano/api/v1/cloudfoundry/cfapi.py +++ b/murano/api/v1/cloudfoundry/cfapi.py @@ -48,7 +48,10 @@ class Controller(object): srv = {} srv['id'] = package.id srv['name'] = package.name - srv['description'] = package.description + if len(package.description) > 256: + srv['description'] = u"{0} ...".format(package.description[:253]) + else: + srv['description'] = package.description srv['bindable'] = True srv['tags'] = [] for tag in package.tags: