knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kris...@apache.org
Subject [knox] branch master updated: KNOX-1855 - Add Service Definition for Cloudera Manager API (#88)
Date Thu, 02 May 2019 13:49:38 GMT
This is an automated email from the ASF dual-hosted git repository.

krisden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git


The following commit(s) were added to refs/heads/master by this push:
     new 95f8c8f  KNOX-1855 - Add Service Definition for Cloudera Manager API (#88)
95f8c8f is described below

commit 95f8c8f8a35b17976b567dffb0dbe8bfa60db7d4
Author: jtran-cloudera <jtran@cloudera.com>
AuthorDate: Thu May 2 06:49:34 2019 -0700

    KNOX-1855 - Add Service Definition for Cloudera Manager API (#88)
    
    This commit adds a basic service definition for Cloudera Manager that supports
    the CM API.
    
    Testing:
    * Manual testing via curl and Python API bindings
    * ant verify
---
 .../resources/services/cm-api/1.0.0/rewrite.xml    | 21 +++++++++++++++
 .../resources/services/cm-api/1.0.0/service.xml    | 30 ++++++++++++++++++++++
 2 files changed, 51 insertions(+)

diff --git a/gateway-service-definitions/src/main/resources/services/cm-api/1.0.0/rewrite.xml
b/gateway-service-definitions/src/main/resources/services/cm-api/1.0.0/rewrite.xml
new file mode 100644
index 0000000..379407e
--- /dev/null
+++ b/gateway-service-definitions/src/main/resources/services/cm-api/1.0.0/rewrite.xml
@@ -0,0 +1,21 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<rules>
+  <rule dir="IN" name="CM-API/cm-api/rest" pattern="*://*:*/**/cm-api/{path=**}?{**}">
+    <rewrite template="{$serviceUrl[CM-API]}/{path=**}?{**}"/>
+  </rule>
+</rules>
diff --git a/gateway-service-definitions/src/main/resources/services/cm-api/1.0.0/service.xml
b/gateway-service-definitions/src/main/resources/services/cm-api/1.0.0/service.xml
new file mode 100644
index 0000000..76c39f1
--- /dev/null
+++ b/gateway-service-definitions/src/main/resources/services/cm-api/1.0.0/service.xml
@@ -0,0 +1,30 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+
+<!--
+   Knox service definition for Cloudera Manager API
+
+   This service definition does not cover the web UI.
+-->
+<service role="CM-API" name="cm-api" version="1.0.0">
+  <routes>
+    <route path="/cm-api/**">
+      <rewrite apply="CM-API/cm-api/rest" to="request.url"/>
+      <rewrite apply="CM-API/cm-api/rest" to="request.body"/>
+    </route>
+  </routes>
+</service>


Mime
View raw message