knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From su...@apache.org
Subject knox git commit: KNOX-848 Support for Gremlin Server REST (Shi Wang via Sumit Gupta)
Date Tue, 14 Feb 2017 00:02:21 GMT
Repository: knox
Updated Branches:
  refs/heads/master d82f834ce -> 7cb85e28b


KNOX-848 Support for Gremlin Server REST (Shi Wang via Sumit Gupta)


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/7cb85e28
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/7cb85e28
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/7cb85e28

Branch: refs/heads/master
Commit: 7cb85e28bf932a8727d7f794c7ac13ae67591f3f
Parents: d82f834
Author: Sumit Gupta <sumit@apache.org>
Authored: Mon Feb 13 19:01:41 2017 -0500
Committer: Sumit Gupta <sumit@apache.org>
Committed: Mon Feb 13 19:01:41 2017 -0500

----------------------------------------------------------------------
 .../services/gremlin/1.0.0/rewrite.xml          | 34 +++++++++++++++++
 .../services/gremlin/1.0.0/service.xml          | 39 ++++++++++++++++++++
 2 files changed, 73 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/7cb85e28/gateway-service-definitions/src/main/resources/services/gremlin/1.0.0/rewrite.xml
----------------------------------------------------------------------
diff --git a/gateway-service-definitions/src/main/resources/services/gremlin/1.0.0/rewrite.xml
b/gateway-service-definitions/src/main/resources/services/gremlin/1.0.0/rewrite.xml
new file mode 100644
index 0000000..d2f1468
--- /dev/null
+++ b/gateway-service-definitions/src/main/resources/services/gremlin/1.0.0/rewrite.xml
@@ -0,0 +1,34 @@
+<!--
+   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="GREMLIN/gremlin/inbound/query" pattern="*://*:*/**/{**}?{**}">
+        <rewrite template="{$serviceUrl[GREMLIN]}/{**}?{**}"/>
+    </rule>
+
+    <rule dir="IN" name="GREMLIN/gremlin/inbound/query" pattern="*://*:*/**/{**}">
+        <rewrite template="{$serviceUrl[GREMLIN]}/{**}"/>
+    </rule>
+
+    <rule dir="IN" name="GREMLIN/gremlin/inbound/path" pattern="*://*:*/**/{**}">
+        <rewrite template="{$serviceUrl[GREMLIN]}/{**}"/>
+    </rule>
+
+    <rule dir="IN" name="GREMLIN/gremlin/inbound/root" pattern="*://*:*/**/">
+        <rewrite template="{$serviceUrl[GREMLIN]}"/>
+    </rule>
+
+</rules>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/knox/blob/7cb85e28/gateway-service-definitions/src/main/resources/services/gremlin/1.0.0/service.xml
----------------------------------------------------------------------
diff --git a/gateway-service-definitions/src/main/resources/services/gremlin/1.0.0/service.xml
b/gateway-service-definitions/src/main/resources/services/gremlin/1.0.0/service.xml
new file mode 100644
index 0000000..843c54e
--- /dev/null
+++ b/gateway-service-definitions/src/main/resources/services/gremlin/1.0.0/service.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+   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.
+-->
+<service role="GREMLIN" name="gremlin" version="1.0.0">
+    <routes>
+        <route path="/gremlin">
+            <rewrite apply="GREMLIN/gremlin/inbound/root" to="request.url"/>
+        </route>
+        <route path="/gremlin/**">
+            <rewrite apply="GREMLIN/gremlin/inbound/path" to="request.url"/>
+        </route>
+        <route path="/gremlin/?**">
+            <rewrite apply="GREMLIN/gremlin/inbound/query" to="request.url"/>
+        </route>
+        <route path="/gremlin/**?**">
+            <rewrite apply="GREMLIN/gremlin/inbound/query" to="request.url"/>
+        </route>
+    </routes>
+    <testURLs>
+        <testURL>/gremlin/graphs</testURL>
+        <testURL>/gremlin/graphs?gremlin</testURL>
+        <testURL>/gremlin?gremlin</testURL>
+        <testURL>/gremlin</testURL>
+    </testURLs>
+</service>
\ No newline at end of file


Mime
View raw message