Strip "\n" character from result

domain-create command never succeed when the backend is NSD4.

"self._command(command)" returns not "ok" but "ok\n".

Result is now stripped of the "\n" character
Closes-Bug: #1537688

Change-Id: Iddd4f4abc1cdd116f8b7b1e50dcff134c6f2214b
This commit is contained in:
twm2016 2016-03-10 13:26:31 -06:00 committed by Federico Ceratto
parent 35e1b35b17
commit cadfb1d721
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ class NSD4Backend(base.Backend):
except (ssl.SSLError, socket.error) as e:
LOG.debug('NSD4 control call failure: %s' % e)
raise exceptions.Backend(e)
if result != 'ok':
if result.rstrip("\n") != 'ok':
raise exceptions.Backend(result)
def create_domain(self, context, domain):