Browse Source

HPCC-10021 ConfigMgr - Allow esp service to target a default cluster

Signed-off-by: Gleb Aronsky <gleb.aronsky@lexisnexis.com>
Gleb Aronsky 11 years ago
parent
commit
4404181551

+ 6 - 0
deployment/deployutils/deployutils.cpp

@@ -955,6 +955,12 @@ public:
               LoadComboBox(pAppInfo->queryProp(TAG_NAME), bAddBlank, m_pEnv, m_pEnv, strBuf);
               extraInfo = strBuf.str();
             }
+            else if (strcmp(type, "topologyClusterType")==0)
+            {
+              nCtrlType = 4;//LVC_COMBO;
+              LoadComboBox("Software/Topology/Cluster", bAddBlank, m_pEnv, m_pEnv, strBuf);
+              extraInfo = strBuf.str();
+            }
             else if (strcmp(type, "xpathType")==0)
             {
               const char* xpath1 = pAppInfo->queryProp("xpath");

+ 5 - 0
initfiles/componentfiles/configxml/@temp/esp_service_WsSMC.xsl

@@ -174,6 +174,11 @@ This is required by its binding with ESP service '<xsl:value-of select="$espServ
                 <xsl:if test="string(@allowNewRoxieOnDemandQuery) != ''">
                 <AllowNewRoxieOnDemandQuery><xsl:value-of select="@allowNewRoxieOnDemandQuery"/></AllowNewRoxieOnDemandQuery>
             </xsl:if>
+            <xsl:if test="string(@defaultTargetCluster) != ''">
+                      <xsl:variable name="targetClusterName" select="@defaultTargetCluster"/>
+                      <xsl:variable name="targetClusterPrefix" select="/Environment/Software/Topology/Cluster[@name=$targetClusterName]/@prefix"/>
+                      <DefaultTargetCluster  name="{$targetClusterName}" prefix="{$targetClusterPrefix}"/>
+            </xsl:if>
             <xsl:if test="string(@enableSystemUseRewrite) != ''">
                 <SystemUseRewrite><xsl:value-of select="@enableSystemUseRewrite"/></SystemUseRewrite>
             </xsl:if>

+ 3 - 0
initfiles/componentfiles/configxml/Environment.xsd

@@ -1359,4 +1359,7 @@
     <xs:simpleType name="sashaServerType">
         <xs:restriction base="xs:string"/>
     </xs:simpleType>
+    <xs:simpleType name="topologyClusterType">
+        <xs:restriction base="xs:string"/>
+    </xs:simpleType>
 </xs:schema>

+ 7 - 0
initfiles/componentfiles/configxml/espsmcservice.xsd.in

@@ -97,6 +97,13 @@
                     </xs:appinfo>
                 </xs:annotation>
             </xs:attribute>
+            <xs:attribute name="defaultTargetCluster" type="topologyClusterType" use="optional">
+                <xs:annotation>
+                    <xs:appinfo>
+                        <tooltip>Default target for published queries</tooltip>
+                    </xs:appinfo>
+                </xs:annotation>
+            </xs:attribute>
             <xs:attribute name="disableUppercaseTranslation" type="xs:boolean" use="optional" default="false">
                 <xs:annotation>
                     <xs:appinfo>