From 3050b40bddad71071add5eaa6731bf95c9e585ca Mon Sep 17 00:00:00 2001 From: Nikolay Mahotkin Date: Thu, 30 Jun 2016 11:56:08 +0300 Subject: [PATCH] [Gerrit] Adding output Gerrit https URL (with hostname) * Refactored gerrit IP output Change-Id: I793c24cc05b74b5234b8e724415497da524ad3f1 --- murano-apps/Gerrit/package/Classes/Gerrit.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/murano-apps/Gerrit/package/Classes/Gerrit.yaml b/murano-apps/Gerrit/package/Classes/Gerrit.yaml index 12cc074..3d2788e 100644 --- a/murano-apps/Gerrit/package/Classes/Gerrit.yaml +++ b/murano-apps/Gerrit/package/Classes/Gerrit.yaml @@ -80,9 +80,16 @@ Methods: - $.createAccount('', $.ldap.ldapUser, $.ldap.ldapEmail, $.userSSH, $.ldap.ldapUser) - $._environment.reporter.report($this, 'Gerrit is deployed.') + - $linux: new(conf:Linux) + - $gerritHost: $linux.runCommand($.instance.agent, 'hostname -f').stdout + - If: $.instance.assignFloatingIp + Then: + - $gerritIP: $.instance.floatingIpAddress + Else: + - $gerritIP: $.instance.ipAddresses[0] + - $._environment.reporter.report($this, format('Gerrit service is launched on host {0} accessing by IP {1}.', $gerritHost, $gerritIP)) + - $._environment.reporter.report($this, format('Gerrit is available at http://{0}:80 or http://{0}:8081', $gerritIP)) - $.setAttr(deployed, true) - - $._environment.reporter.report($this, format('Gerrit is available at http://{0}:80 or http://{1}:8081', - $.instance.floatingIpAddress, $.instance.floatingIpAddress)) _deployGerrit: Body: