summaryrefslogtreecommitdiffstats
path: root/adapter/acumos
diff options
context:
space:
mode:
authorAndrew Gauld <agauld@att.com>2020-02-26 15:48:32 +0000
committerAndrew Gauld <agauld@att.com>2020-03-20 12:33:47 +0000
commit2d1528b34c45a650e2407bbc90737cc4ca6ec042 (patch)
tree76bebbb36a444963353dee17cc294c40fa8cb0d0 /adapter/acumos
parent45341fa5e6e64e86286254d49ca951c43726ab94 (diff)
Link DCAE MOD design tool to Acumos Adapter
Add import item to global menu with choices of import models, component specs, and data formats. Add prefix to acumos adapter API for consistency with rest of DCAE MOD and to allow adding acumos adapter to k8s/rancher ingress or other reverse proxy mechanism so it can be accessed by browser javascript in the design tool. Remove dcae mod hostname mechanism for callbacks from browser javascript since browser security only allows javascript to call back to the originating host port. Clean up indentation only differences between original NiFi code and ONAP versions. Remove 3 ONAP java files that are now identical to original NiFi versions. Change-Id: I23bbd98d5b171d624ef35088cd821aff2918fc1b Issue-ID: DCAEGEN2-1860 Signed-off-by: Andrew Gauld <agauld@att.com>
Diffstat (limited to 'adapter/acumos')
-rw-r--r--adapter/acumos/Changelog.md2
-rw-r--r--adapter/acumos/aoconversion/index.html8
-rw-r--r--adapter/acumos/aoconversion/scanner.py10
-rw-r--r--adapter/acumos/pom.xml2
-rw-r--r--adapter/acumos/setup.py2
5 files changed, 13 insertions, 11 deletions
diff --git a/adapter/acumos/Changelog.md b/adapter/acumos/Changelog.md
index 0823a8e..e900ad7 100644
--- a/adapter/acumos/Changelog.md
+++ b/adapter/acumos/Changelog.md
@@ -4,5 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
+## [1.0.1] - 3/20/2020
+ * Adjust URL paths for consistency with DCAE GEN design tool
## [1.0.0] - 11/13/2019
* Onboard models from Acumos - initial version
diff --git a/adapter/acumos/aoconversion/index.html b/adapter/acumos/aoconversion/index.html
index c94621a..31f2372 100644
--- a/adapter/acumos/aoconversion/index.html
+++ b/adapter/acumos/aoconversion/index.html
@@ -156,7 +156,7 @@ function esc(s) {
function onBoard() {
fcomp("onboardingInProgress").style.display = "block";
- var url = "/onboard.js?acumos=" + uecvalue("furl");
+ var url = "/acumos-adapter/onboard.js?acumos=" + uecvalue("furl");
if (cvalue("catMenu") != "*") {
url += "&catalogId=" + uecvalue("catMenu");
if (cvalue("solMenu") != "*") {
@@ -178,19 +178,19 @@ function chooseSolution() {
if (cvalue("solMenu") == "*") {
updatevis();
} else {
- lookupItem("acRevs", "revMenu", "/listRevisions.js?acumos=" + uecvalue("furl") + "&solutionId=" + uecvalue("solMenu"));
+ lookupItem("acRevs", "revMenu", "/acumos-adapter/listRevisions.js?acumos=" + uecvalue("furl") + "&solutionId=" + uecvalue("solMenu"));
}
}
function chooseCatalog() {
if (cvalue("catMenu") == "*") {
updatevis();
} else {
- lookupItem("acSols", "solMenu", "/listSolutions.js?acumos=" + uecvalue("furl") + "&catalogId=" + uecvalue("catMenu"));
+ lookupItem("acSols", "solMenu", "/acumos-adapter/listSolutions.js?acumos=" + uecvalue("furl") + "&catalogId=" + uecvalue("catMenu"));
}
}
function lookupCatalogs() {
fcomp("onboard").style.display = "block";
- lookupItem("cAcumos", "catMenu", "/listCatalogs.js?acumos=" + uecvalue("furl"));
+ lookupItem("cAcumos", "catMenu", "/acumos-adapter/listCatalogs.js?acumos=" + uecvalue("furl"));
}
function lookupItem(dblock, smenu, url) {
fcomp(dblock).style.display = "block";
diff --git a/adapter/acumos/aoconversion/scanner.py b/adapter/acumos/aoconversion/scanner.py
index 22a5922..41f18de 100644
--- a/adapter/acumos/aoconversion/scanner.py
+++ b/adapter/acumos/aoconversion/scanner.py
@@ -251,23 +251,23 @@ class Apihandler(BaseHTTPRequestHandler):
def do_GET(self):
self.doqp()
- if self.path == '/' or self.path == '/index.html':
+ if self.path == '/' or self.path == '/index.html' or self.path == '/acumos-adapter/' or self.path == '/acumos-adapter/index.html':
self.replyraw(self.server.index, 'text/html')
return
if 'acumos' not in self.qparams:
self.send_error(400)
return
aa = _AcumosAccess(self.server.config, self.qparams['acumos'])
- if self.path == '/listCatalogs.js':
+ if self.path == '/acumos-adapter/listCatalogs.js':
self.replyjson([{'name': x['name'], 'id': x['catalogId']} for x in aa.jsonget('/catalogs')])
return
- if self.path == '/listSolutions.js':
+ if self.path == '/acumos-adapter/listSolutions.js':
if 'catalogId' not in self.qparams:
self.send_error(400)
return
self.replyjson([{'name': x['name'], 'id': x['solutionId']} for x in aa.jsonget('/solutions?catalogId={}', self.qparams['catalogId'])])
return
- if self.path == '/listRevisions.js':
+ if self.path == '/acumos-adapter/listRevisions.js':
if 'solutionId' not in self.qparams:
self.send_error(400)
return
@@ -277,7 +277,7 @@ class Apihandler(BaseHTTPRequestHandler):
def do_POST(self):
self.doqp()
- if self.path == '/onboard.js':
+ if self.path == '/acumos-adapter/onboard.js':
if 'acumos' not in self.qparams:
self.send_error(400)
return
diff --git a/adapter/acumos/pom.xml b/adapter/acumos/pom.xml
index 8495ee6..4d5facd 100644
--- a/adapter/acumos/pom.xml
+++ b/adapter/acumos/pom.xml
@@ -23,7 +23,7 @@ limitations under the License.
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.dcaegen2.platform.adapter</groupId>
<artifactId>dcaegen2-platform-adapter-acumos</artifactId>
- <version>1.0.0</version>
+ <version>1.0.1</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sonar.sources>.</sonar.sources>
diff --git a/adapter/acumos/setup.py b/adapter/acumos/setup.py
index 1845b9e..9001cd5 100644
--- a/adapter/acumos/setup.py
+++ b/adapter/acumos/setup.py
@@ -20,7 +20,7 @@ from setuptools import setup, find_packages
setup(
name="aoconversion",
- version="1.0.0",
+ version="1.0.1",
packages=find_packages(exclude=["tests.*", "tests"]),
author="Tommy Carpenter, Andrew Gauld",
author_email="tommy@research.att.com, agauld@att.com",