From b7b1da5ee4e7e141d1d1bc2ce3769f9c71860998 Mon Sep 17 00:00:00 2001 From: Luke Meyer Date: Mon, 4 Aug 2014 13:54:46 -0400 Subject: [PATCH] oo-app-info: don't assume rhcloud.com app domain Bug 1123944 - oo-app-info does not find gears / users based on app fqdn https://bugzilla.redhat.com/show_bug.cgi?id=1123944 The search for an app fqdn was poorly implemented, as it assumed the domain on the fqdn is rhcloud.com. This change generalizes the search to use the configured cloud domain in the fqdn. --- broker-util/lib/app_info.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/broker-util/lib/app_info.rb b/broker-util/lib/app_info.rb index f4b63813224..bdde770398a 100755 --- a/broker-util/lib/app_info.rb +++ b/broker-util/lib/app_info.rb @@ -87,7 +87,7 @@ def to_s() end class AppQuery - FQDN_REGEX = /(http:\/\/)?(\w+)-(\w+)(\.\w+)?\.rhcloud.com\Z/ + FQDN_REGEX = /(http:\/\/)?(\w+)-(\w+)(\.\w+)?\.#{Regexp.escape(Rails.application.config.openshift[:domain_suffix])}\Z/ # # Entrypoint for openshift application query methods