aboutsummaryrefslogtreecommitdiffstats
path: root/ncomp-cdap-adaptor
diff options
context:
space:
mode:
Diffstat (limited to 'ncomp-cdap-adaptor')
-rw-r--r--ncomp-cdap-adaptor/.classpath27
-rw-r--r--ncomp-cdap-adaptor/.gitignore1
-rw-r--r--ncomp-cdap-adaptor/.project35
-rw-r--r--ncomp-cdap-adaptor/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--ncomp-cdap-adaptor/.settings/org.eclipse.jdt.core.prefs2
-rw-r--r--ncomp-cdap-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs2
-rw-r--r--ncomp-cdap-adaptor/.settings/org.eclipse.m2e.core.prefs4
-rw-r--r--ncomp-cdap-adaptor/LICENSE.txt22
-rw-r--r--ncomp-cdap-adaptor/META-INF/MANIFEST.MF14
-rw-r--r--ncomp-cdap-adaptor/build.properties3
-rw-r--r--ncomp-cdap-adaptor/config/cdap.properties9
-rw-r--r--ncomp-cdap-adaptor/pom.xml188
-rw-r--r--ncomp-cdap-adaptor/src/assembly/assemble_zip.xml61
-rw-r--r--ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/cdap/adaptor/tools/Generator.java76
-rw-r--r--ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorProvider.java63
-rw-r--r--ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProvider.java447
-rw-r--r--ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/TestPolling.java51
-rw-r--r--ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiProvider.java78
-rw-r--r--ncomp-cdap-adaptor/src/main/server-gen/bin/cdap-adaptor-controller138
-rw-r--r--ncomp-cdap-adaptor/src/main/server/config/adaptor.properties7
-rw-r--r--ncomp-cdap-adaptor/src/main/server/config/console.properties3
-rw-r--r--ncomp-cdap-adaptor/src/main/server/config/gui.properties0
-rw-r--r--ncomp-cdap-adaptor/src/main/server/config/log4j.properties24
-rw-r--r--ncomp-cdap-adaptor/src/main/server/config/makefile9
-rw-r--r--ncomp-cdap-adaptor/src/main/server/config/pw.sh.sh15
-rw-r--r--ncomp-cdap-adaptor/src/main/server/scripts/console.groovy27
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/CdapAdaptor.yaml3
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/CdapCluster.yaml432
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/GuiClientApi.yaml69
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptor.java76
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorClient.java72
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorConsole.java63
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorProviderTemplate.java63
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorServer.java114
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapCluster.java1056
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterClient.java736
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterConsole.java486
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProviderTemplate.java299
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapFactory.java60
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApi.java256
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiClient.java175
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiConsole.java123
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiProviderTemplate.java78
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapModelFactory.java54
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApi.properties78
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApiMessageEnum.java47
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApiOperationEnum.java41
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptor.properties6
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptorMessageEnum.java35
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptorOperationEnum.java29
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapCluster.properties474
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapClusterMessageEnum.java113
-rw-r--r--ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapClusterOperationEnum.java107
53 files changed, 6453 insertions, 0 deletions
diff --git a/ncomp-cdap-adaptor/.classpath b/ncomp-cdap-adaptor/.classpath
new file mode 100644
index 0000000..d2d34b3
--- /dev/null
+++ b/ncomp-cdap-adaptor/.classpath
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="config"/>
+ <classpathentry kind="src" output="target/classes" path="src/main/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path="src/main/server"/>
+ <classpathentry kind="src" path="src/main/server-gen"/>
+ <classpathentry kind="src" path="src/main/sirius-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>
+ <classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/ncomp-cdap-adaptor/.gitignore b/ncomp-cdap-adaptor/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/ncomp-cdap-adaptor/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/ncomp-cdap-adaptor/.project b/ncomp-cdap-adaptor/.project
new file mode 100644
index 0000000..85d38ce
--- /dev/null
+++ b/ncomp-cdap-adaptor/.project
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>ncomp-cdap-adaptor</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/ncomp-cdap-adaptor/.settings/org.eclipse.core.resources.prefs b/ncomp-cdap-adaptor/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/ncomp-cdap-adaptor/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/ncomp-cdap-adaptor/.settings/org.eclipse.jdt.core.prefs b/ncomp-cdap-adaptor/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..4ede96d
--- /dev/null
+++ b/ncomp-cdap-adaptor/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
diff --git a/ncomp-cdap-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs b/ncomp-cdap-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs
new file mode 100644
index 0000000..ae98fea
--- /dev/null
+++ b/ncomp-cdap-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+groovy.compiler.level=24
diff --git a/ncomp-cdap-adaptor/.settings/org.eclipse.m2e.core.prefs b/ncomp-cdap-adaptor/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/ncomp-cdap-adaptor/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/ncomp-cdap-adaptor/LICENSE.txt b/ncomp-cdap-adaptor/LICENSE.txt
new file mode 100644
index 0000000..30471b5
--- /dev/null
+++ b/ncomp-cdap-adaptor/LICENSE.txt
@@ -0,0 +1,22 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property.
diff --git a/ncomp-cdap-adaptor/META-INF/MANIFEST.MF b/ncomp-cdap-adaptor/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..9da1c17
--- /dev/null
+++ b/ncomp-cdap-adaptor/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: ncomp-cdap-adaptor
+Bundle-SymbolicName: ncomp-cdap-adaptor
+Bundle-Version: 0.1.0.qualifier
+Export-Package: org.openecomp.ncomp.cdap.adaptor.tools,
+ org.openecomp.ncomp.servers.cdap
+Require-Bundle: ncomp-core-types,
+ ncomp-sirius-manager-model,
+ ncomp-sirius-manager-server,
+ ncomp-sirius-manager-console,
+ ncomp-sirius-manager-generator,
+ ncomp-cdap-model;bundle-version="0.1.0",
+ ncomp-utils-java;bundle-version="0.1.0"
diff --git a/ncomp-cdap-adaptor/build.properties b/ncomp-cdap-adaptor/build.properties
new file mode 100644
index 0000000..a1ec8c4
--- /dev/null
+++ b/ncomp-cdap-adaptor/build.properties
@@ -0,0 +1,3 @@
+source.. = src/main/java/
+bin.includes = META-INF/,\
+ .
diff --git a/ncomp-cdap-adaptor/config/cdap.properties b/ncomp-cdap-adaptor/config/cdap.properties
new file mode 100644
index 0000000..f015f96
--- /dev/null
+++ b/ncomp-cdap-adaptor/config/cdap.properties
@@ -0,0 +1,9 @@
+server.dir = data/resources
+metrics.dir = data/metrics
+properties.dir = data/properties
+server.port = 9991
+server.user.console = ZWJlY2RlMjdkN2FlMWUx
+
+cluster.endpoint=foobar
+cluster.user=foo
+cluster.password=bar
diff --git a/ncomp-cdap-adaptor/pom.xml b/ncomp-cdap-adaptor/pom.xml
new file mode 100644
index 0000000..ea48265
--- /dev/null
+++ b/ncomp-cdap-adaptor/pom.xml
@@ -0,0 +1,188 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.openecomp.ncomp.cdap</groupId>
+ <artifactId>ncomp-cdap-adaptor</artifactId>
+ <parent>
+ <groupId>org.openecomp.ncomp.sirius.manager</groupId>
+ <artifactId>ncomp-sirius-manager-base</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <relativePath>../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-base</relativePath>
+ </parent>
+
+
+ <pluginRepositories>
+ <!-- Black Duck plugin dependencies -->
+ <pluginRepository>
+ <id>JCenter</id>
+ <name>JCenter Repository</name>
+ <url>http://jcenter.bintray.com</url>
+ </pluginRepository>
+
+ <pluginRepository>
+ <id>Restlet</id>
+ <name>Restlet Repository</name>
+ <url>http://maven.restlet.com</url>
+ </pluginRepository>
+ </pluginRepositories>
+<build>
+ <plugins>
+ <!-- blackduck maven plugin -->
+ <plugin>
+ <groupId>com.blackducksoftware.integration</groupId>
+ <artifactId>hub-maven-plugin</artifactId>
+ <version>1.4.0</version>
+ <inherited>false</inherited>
+ <configuration>
+ <hubProjectName>${project.name}</hubProjectName>
+ <outputDirectory>${project.basedir}</outputDirectory>
+ </configuration>
+ <executions>
+ <execution>
+ <id>create-bdio-file</id>
+ <phase>package</phase>
+ <goals>
+ <goal>createHubOutput</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- site maven plugin -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>3.6</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav-jackrabbit</artifactId>
+ <version>2.10</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>zipfile</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <attach>false</attach>
+ <finalName>${project.artifactId}-${project.version}</finalName>
+ <descriptors>
+ <descriptor>src/assembly/assemble_zip.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.8</version>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <phase>prepare-package</phase>
+ <configuration>
+ <transitive>false</transitive>
+ <outputDirectory>${project.build.directory}/assembly/lib</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ <useRepositoryLayout>false</useRepositoryLayout>
+ <addParentPoms>false</addParentPoms>
+ <copyPom>false</copyPom>
+ <excludeGroupIds>org.opendaylight,com.brocade.odl,ch.qos.logback</excludeGroupIds>
+ <scope>provided</scope>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>copy-version</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/versions</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/resources/versions</directory>
+ <includes>
+ <include>version.properties</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-resources</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/etc/bvc-extensions</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/resources/etc/bvc-extensions</directory>
+ <includes>
+ <include>feature_config_template.cfg</include>
+ <include>feature_custom.install</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.10</version>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>target/${project.artifactId}-${project.version}-runtime.zip</file>
+ <type>zip</type>
+ <classifier>runtime</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.ncomp.cdap</groupId>
+ <artifactId>ncomp-cdap-model</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/ncomp-cdap-adaptor/src/assembly/assemble_zip.xml b/ncomp-cdap-adaptor/src/assembly/assemble_zip.xml
new file mode 100644
index 0000000..458e844
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/assembly/assemble_zip.xml
@@ -0,0 +1,61 @@
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>runtime</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <!-- we want "system" and related files right at the root level as this
+ file is suppose to be unzip on top of a karaf distro. -->
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>target</directory>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>ncomp-cdap-adaptor-${project.artifactId}.jar</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>target/assembly/</directory>
+ <outputDirectory>.</outputDirectory>
+ <excludes>
+ </excludes>
+ </fileSet>
+ <fileSet>
+ <directory>.</directory>
+ <outputDirectory>lib</outputDirectory>
+ <includes>
+ <include>*.jar</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>src/main/server-gen/bin</directory>
+ <outputDirectory>bin</outputDirectory>
+ <fileMode>0744</fileMode>
+ <excludes>
+ </excludes>
+ </fileSet>
+ <fileSet>
+ <directory>src/main/server/bin</directory>
+ <outputDirectory>bin</outputDirectory>
+ <fileMode>0744</fileMode>
+ <excludes>
+ </excludes>
+ </fileSet>
+ <fileSet>
+ <directory>src/main/server-gen/scripts</directory>
+ <outputDirectory>scripts</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>src/main/server/scripts</directory>
+ <outputDirectory>scripts</outputDirectory>
+ </fileSet>
+ </fileSets>
+
+</assembly>
diff --git a/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/cdap/adaptor/tools/Generator.java b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/cdap/adaptor/tools/Generator.java
new file mode 100644
index 0000000..e61709d
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/cdap/adaptor/tools/Generator.java
@@ -0,0 +1,76 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+package org.openecomp.ncomp.cdap.adaptor.tools;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.openecomp.utils.YamlToJava;
+import org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel;
+import org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelFactory;
+import org.openecomp.ncomp.sirius.manager.generator.ControllerGenerator;
+import org.openecomp.ncomp.gwt.siriusportal.model.*;
+import org.openecomp.ncomp.sirius.manager.server.ServerPackage;
+import org.openecomp.ncomp.cdap.CdapFactory;
+
+
+public class Generator {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ @SuppressWarnings("unused")
+ ServerPackage f = ServerPackage.eINSTANCE;
+ EObject o = CdapFactory.eINSTANCE.createCdapAdaptor();
+ EPackage p = o.eClass().getEPackage();
+ String dir = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix();
+ dir= "src/main/sirius-gen/" + dir.replace('.', '/');
+ ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel();
+ m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates");
+ m.setPrefix("Cdap");
+ m.setPluginName(p.getNsURI());
+ m.setName("Cdap");
+ m.setTitle("Cdap");
+ ControllerGenerator g = new ControllerGenerator(o,m);
+ g.setEnableIRequestHandler(false);
+ g.setEnableISiriusPlugin(false);
+ EObject gui = ModelFactory.eINSTANCE.createGuiClientApi();
+ EObject c = CdapFactory.eINSTANCE.createCdapCluster();
+ g.addApi("cluster", c , m, false, true);
+ g.addObject("gui",gui,m);
+ //EObject e = adaptorFactory.eINSTANCE.createVpnEnterprise();
+ //g.addApi("e",e,m);
+ //g.addFactory("org.openecomp.ncomp.sirius.servers.openstack.OsOpenstackFactory");
+ //g.enableDrools();
+ g.generate(dir);
+ g.generateScripts("src/main/server-gen/bin","cdap-adaptor");
+ String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging";
+// YamlToJava.convert("src/main/resources/DcaeServiceCdapHost.yaml", dir + "/logging", pName);
+ YamlToJava.convert("src/main/sirius-gen/CdapAdaptor.yaml", dir + "/logging", pName);
+ YamlToJava.convert("src/main/sirius-gen/CdapCluster.yaml", dir + "/logging", pName);
+ String pName1 = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".gui.logging";
+ YamlToJava.convert("src/main/sirius-gen/GuiClientApi.yaml", dir + "/gui/logging", pName1);
+ }
+
+
+}
diff --git a/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorProvider.java b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorProvider.java
new file mode 100644
index 0000000..2657124
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorProvider.java
@@ -0,0 +1,63 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+
+package org.openecomp.ncomp.servers.cdap;
+
+
+
+
+
+import java.io.InputStream;
+
+import org.openecomp.ncomp.sirius.manager.IRequestHandler;
+import org.openecomp.ncomp.sirius.manager.ISiriusPlugin;
+import org.openecomp.ncomp.sirius.manager.ISiriusServer;
+import org.openecomp.ncomp.sirius.function.FunctionUtils;
+
+import org.apache.log4j.Logger;
+import org.eclipse.emf.common.util.EList;
+import org.json.JSONObject;
+
+
+
+import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider;
+
+
+import org.openecomp.ncomp.cdap.impl.CdapAdaptorImpl;
+import org.openecomp.ncomp.cdap.CdapAdaptor;
+
+
+public class CdapCdapAdaptorProvider extends BasicAdaptorProvider {
+ private static final Logger logger = Logger.getLogger(CdapCdapAdaptorProvider.class);
+ CdapAdaptor o;
+
+ public CdapCdapAdaptorProvider(ISiriusServer controller, CdapAdaptor o) {
+ super(controller, o);
+ this.o = o;
+ }
+
+
+
+
+
+
+}
diff --git a/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProvider.java b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProvider.java
new file mode 100644
index 0000000..84ce4a3
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProvider.java
@@ -0,0 +1,447 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+package org.openecomp.ncomp.servers.cdap;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import org.openecomp.ncomp.sirius.manager.ISiriusServer;
+import org.openecomp.ncomp.sirius.manager.Jetty8Client;
+import org.openecomp.ncomp.sirius.manager.ManagementServer;
+import org.openecomp.ncomp.sirius.manager.ManagementServerUtils;
+
+import org.apache.log4j.Logger;
+import org.eclipse.emf.common.util.EList;
+import org.json.JSONArray;
+import org.json.JSONObject;
+
+import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider;
+import org.openecomp.ncomp.cdap.CdapApplication;
+import org.openecomp.ncomp.cdap.CdapCluster;
+import org.openecomp.ncomp.cdap.CdapConfiguration;
+import org.openecomp.ncomp.cdap.CdapDataset;
+import org.openecomp.ncomp.cdap.CdapNamespace;
+import org.openecomp.ncomp.cdap.CdapPackage;
+import org.openecomp.ncomp.webservice.utils.FileUtils;
+
+public class CdapCdapClusterProvider extends BasicAdaptorProvider {
+ private static final Logger logger = Logger.getLogger(CdapCdapClusterProvider.class);
+ CdapCluster o;
+ protected Date lastPoll;
+
+ public CdapCdapClusterProvider(ISiriusServer controller, CdapCluster o) {
+ super(controller, o);
+ this.o = o;
+ }
+
+ public void poll() {
+// System.err.println("XXXX poll");
+ lastPoll = new Date();
+ Jetty8Client c = new Jetty8Client("cdap.properties", "cluster");
+ c.setBaseAddress(o.getBaseUrl());
+ c.setDebug(true);
+ HashMap<String, String> headers = new HashMap<String, String>();
+ JSONObject json;
+ // namespaces
+ json = c.httpJsonTransaction("/namespaces", "GET", headers, null);
+// System.err.println("XXXX res:" + json.toString(2));
+ updateNamespaces(json);
+ json = c.httpJsonTransaction("/config/cdap", "GET", headers, null);
+// System.err.println("XXXX res:" + json.toString(2));
+ updateConfig(json);
+ for (CdapNamespace namespace : o.getNamespaces()) {
+ String url = "/namespaces/" + namespace.getName() + "/data/datasets";
+ json = c.httpJsonTransaction(url, "GET", headers, null);
+// System.err.println("XXXX res:" + json.toString(2));
+ updateDatasets(namespace, json);
+ url = "/namespaces/" + namespace.getName() + "/apps";
+ json = c.httpJsonTransaction(url, "GET", headers, null);
+// System.err.println("XXXX res:" + json.toString(2));
+ updateApps(namespace, json);
+ }
+ }
+
+ private void updateConfig(JSONObject json) {
+ JSONArray a = json.getJSONArray("$list");
+ o.getConfigurations().clear();
+ for (int i = 0; i < a.length(); i++) {
+ JSONObject j = a.getJSONObject(i);
+ CdapConfiguration configuration = (CdapConfiguration) controller.getServer().json2ecore(
+ CdapPackage.eINSTANCE.getCdapConfiguration(), j);
+// System.err.println("XXXX " + ManagementServer.ecore2json(configuration, 100, null, true).toString(2));
+ o.getConfigurations().add(configuration);
+ }
+ }
+
+ private void updateApps(CdapNamespace namespace, JSONObject json) {
+ JSONArray a = json.getJSONArray("$list");
+ namespace.getApplications().clear();
+ for (int i = 0; i < a.length(); i++) {
+ JSONObject j = a.getJSONObject(i);
+ CdapApplication application = (CdapApplication) controller.getServer().json2ecore(
+ CdapPackage.eINSTANCE.getCdapApplication(), j);
+// System.err.println("XXXX " + ManagementServer.ecore2json(application, 100, null, true).toString(2));
+ namespace.getApplications().add(application);
+ }
+ }
+
+ private void updateDatasets(CdapNamespace namespace, JSONObject json) {
+ JSONArray a = json.getJSONArray("$list");
+ namespace.getDatasets().clear();
+ for (int i = 0; i < a.length(); i++) {
+ JSONObject j = a.getJSONObject(i);
+ JSONObject jj = j.getJSONObject("properties");
+// System.err.println("XXXX jj:" + jj.toString(2));
+ if (jj.has("schema")) {
+ j.put("schema", new JSONObject(jj.getString("schema")));
+ jj.remove("schema");
+ }
+ else {
+ j.put("schema", new JSONObject());
+ }
+ fixMap(j, "properties");
+// System.err.println("XXXX schema:" + j.getJSONObject("schema").toString(2));
+ CdapDataset dataset = (CdapDataset) controller.getServer().json2ecore(
+ CdapPackage.eINSTANCE.getCdapDataset(), j);
+// System.err.println("XXXX " + ManagementServer.ecore2json(dataset, 100, null, true).toString(2));
+ namespace.getDatasets().add(dataset);
+ }
+ }
+
+ private void updateNamespaces(JSONObject json) {
+ JSONArray a = json.getJSONArray("$list");
+ o.getNamespaces().clear();
+ for (int i = 0; i < a.length(); i++) {
+ JSONObject j = a.getJSONObject(i);
+ fixMap(j, "config");
+ CdapNamespace namespace = (CdapNamespace) controller.getServer().json2ecore(
+ CdapPackage.eINSTANCE.getCdapNamespace(), j);
+// System.err.println("XXXX " + ManagementServer.ecore2json(namespace, 100, null, true).toString(2));
+ o.getNamespaces().add(namespace);
+ }
+ }
+
+ @Override
+ public void start() {
+ if (o.isRemote()) return;
+ Thread t = new Thread("cdap poller: " + o.getName()) {
+ @Override
+ public void run() {
+ while (true) {
+ try {
+ if (lastPoll == null || lastPoll.getTime() + o.getPollingFrequency() < new Date().getTime())
+ o.poll();
+ Thread.sleep(5000); // sleep 5 seconds
+ } catch (Exception e) {
+ ManagementServerUtils.printStackTrace(e);
+ logger.fatal("openstackPoller Thread DIED: " + e);
+ try {
+ Thread.sleep(30000);
+ } catch (InterruptedException e1) {
+ }
+ }
+ }
+ };
+ };
+ t.start();
+ }
+
+ // change JSONObject to a JSONArray with name,value objects
+ private void fixMap(JSONObject j, String key) {
+ JSONArray a = new JSONArray();
+ JSONObject jjj = j.getJSONObject(key);
+ for (Iterator<String> i = jjj.keys(); i.hasNext();) {
+ String k = i.next();
+ Object v = jjj.get(k);
+ JSONObject jj = new JSONObject();
+ jj.put("name", k);
+ jj.put("value", v);
+ a.put(jj);
+ }
+ j.put(key, a);
+ }
+
+
+ private String encode(String s) {
+ return "'" + s.replace(" ", "%SPACE%") + "'";
+ }
+ private String decode(String s) {
+ return s.replace("%SPACE%", " ");
+ }
+ /**
+ * Use local CDAP CLI to invoke commands -- a simpler substitute for curl
+ * requests. Works only for single line commands. Copied from SDNL start
+ * shell script
+ *
+ * Returns the output from the CLI as a String
+ *
+ * TODO: For multi-line commands, send commands via STDIN TODO: Use the code
+ * from ScriptRunner.java
+ */
+ public String customRunCDAPcliCommand(String namespace, String cdapCmdStr) {
+ String cmd = "bin/cdap-cli.sh " + "-u localhost/" + namespace + " " + cdapCmdStr;
+ String[] args = cmd.split(" ");
+ for (int i =0; i<args.length; i++) {
+ args[i] = decode(args[i]);
+ }
+ Runtime run = Runtime.getRuntime();
+ Process pr;
+ try {
+ pr = run.exec(args);
+ pr.waitFor();
+ BufferedReader buf = new BufferedReader(new InputStreamReader(pr.getInputStream()));
+ StringBuilder sb = new StringBuilder(4096);
+ String line;
+
+ while ((line = buf.readLine()) != null) {
+ if (line.startsWith("Error:"))
+ throw new RuntimeException(line);
+ sb.append(line);
+ }
+ return sb.toString();
+ } catch (InterruptedException e) {
+ return (e.getMessage());
+ } catch (IOException e) {
+ return (e.getMessage());
+ }
+ }
+
+ public String createNamespace(String namespace) {
+ return customRunCDAPcliCommand("", "create namespace " + namespace);
+ }
+
+ public String deleteNamespace(String namespace) {
+ return customRunCDAPcliCommand("", "delete namespace " + namespace);
+ }
+
+ public String deploy(String namespace, String jarfile) {
+ return customRunCDAPcliCommand(namespace, "deploy app " + jarfile);
+ }
+
+ public String loadArtifact(String namespace, String artifactName, String jarfile, String version) {
+ return customRunCDAPcliCommand(namespace, "load artifact " + jarfile + " name " + artifactName + " version " + version);
+ }
+
+ public String startFlow(String namespace, String appName, String flowId, String extraArgs) {
+ if (extraArgs != null) {
+ return customRunCDAPcliCommand(namespace, "start flow " + appName + "." + flowId + " \"" + extraArgs + "\"");
+ } else {
+ return customRunCDAPcliCommand(namespace, "start flow " + appName + "." + flowId);
+ }
+ }
+
+ public String startService(String namespace, String appName, String serviceId, String extraArgs) {
+ if (extraArgs != null) {
+ return customRunCDAPcliCommand(namespace, "start service " + appName + "." + serviceId + "\"" + extraArgs
+ + "\"");
+ }
+ return customRunCDAPcliCommand(namespace, "start service " + appName + "." + serviceId);
+ }
+
+ public String startApp(String namespace, String appName) {
+ return customRunCDAPcliCommand(namespace, "start app " + appName);
+ }
+
+ public String deleteApp(String namespace, String appName) {
+ return customRunCDAPcliCommand(namespace, "delete app " + appName);
+ }
+
+ public String loadPreferencesApp(String namespace, String prefsFile, String appId) {
+ return customRunCDAPcliCommand(namespace, "load preferences " + prefsFile + " json " + appId);
+ }
+
+ public String loadPreferencesFlow(String namespace, String prefsFile, String appId, String flowId) {
+ return customRunCDAPcliCommand(namespace, "load preferences flow " + prefsFile + " json " + appId + "."
+ + flowId);
+ }
+
+ public String loadPreferencesNameSpace(String namespace, String prefsFile) {
+ return customRunCDAPcliCommand(namespace, "load preferences namespace " + prefsFile + " json ");
+ }
+
+ public String setPreferencesApp(String namespace, String prefsString, String appId) {
+ return customRunCDAPcliCommand(namespace, "set preferences app " + encode(prefsString) + " " + appId);
+ }
+
+ public String setPreferencesFlow(String namespace, String prefsString, String appId, String flowId) {
+ return customRunCDAPcliCommand(namespace, "set preferences flow " + encode(prefsString) + " " + appId + "."
+ + flowId);
+ }
+
+ public String setPreferencesWorker(String namespace, String prefsString, String appId, String workerId) {
+ return customRunCDAPcliCommand(namespace, "set preferences worker " + encode(prefsString) + " " + appId + "."
+ + workerId);
+ }
+
+ public String setPreferencesNameSpace(String namespace, String prefsString) {
+ return customRunCDAPcliCommand(namespace, "set preferences namespace " + encode(prefsString));
+ }
+
+ public String setFlowRunTimeArgs(String namespace, String appId, String flowId, String args) {
+ return customRunCDAPcliCommand(namespace, "set flow runtimeargs " + appId + "." + flowId + " " + args);
+ }
+
+ public String setFlowletInstances(String namespace, String appId, String flowId, String flowletId, int nInstances) {
+ return customRunCDAPcliCommand(namespace, "set flowlet instances " + appId + "." + flowId + "." + flowletId
+ + " " + nInstances);
+ }
+
+ public String stopFlow(String namespace, String appId, String flowId) {
+ return customRunCDAPcliCommand(namespace, "stop flow " + appId + "." + flowId);
+ }
+
+ public String stopService(String namespace, String appId, String serviceId) {
+ return customRunCDAPcliCommand(namespace, "stop service " + appId + "." + serviceId);
+ }
+
+ public String truncateDataSet(String namespace, String datasetName) {
+ return customRunCDAPcliCommand(namespace, "truncate dataset instance " + datasetName);
+ }
+
+ public String createStream(String namespace, String newStreamId) {
+ return customRunCDAPcliCommand(namespace, "create stream " + newStreamId);
+ }
+
+ public String deleteStream(String namespace, String streamId) {
+ return customRunCDAPcliCommand(namespace, "delete stream " + streamId);
+ }
+
+ /**
+ * Time format can be a timestamp in milliseconds or a relative time in the
+ * form of [+|-][0-9][d|h|m|s]. Special constants "min" and "max" can be
+ * used to represent "0" and "max timestamp" respectively. From CDAP CLI
+ * help documentation.
+ */
+
+ public EList<String> getStreamEvents(String namespace, String streamId, String startTime, String endTime, int limit) {
+ // customRunCDAPcliCommand(namespace, "get stream " + streamId + " " +
+ // startTime + " " + endTime + " " + limit);
+ return null;
+ }
+
+ /**
+ * Time format can be a timestamp in milliseconds or a relative time in the
+ * form of [+|-][0-9][d|h|m|s]. Special constants "min" and "max" can be
+ * used to represent "0" and "max timestamp" respectively. From CDAP CLI
+ * help documentation.
+ */
+ public EList<String> getStreamStats(String namespace, String streamId, String startTime, String endTime, int limit) {
+ // customRunCDAPcliCommand(namespace, "get stream-stats " + streamId +
+ // " " + limit + " " + startTime + " " + endTime);
+ return null;
+ }
+
+ public String sendEventToStream(String namespace, String streamId, String event) {
+ return customRunCDAPcliCommand(namespace, "send stream " + streamId + " " + event);
+ }
+
+ public String trucateStream(String namespace, String streamId) {
+ return customRunCDAPcliCommand(namespace, "truncate stream " + streamId);
+ }
+
+ /**
+ * Sets the properties of a stream, such as TTL, format, and notification
+ * threshold.
+ */
+ public String setStreamProperties(String namespace, String streamId, String propsFile) {
+ return customRunCDAPcliCommand(namespace, "set stream properties " + streamId + " " + propsFile);
+ }
+
+ public String deployApp(String namespace, String jarfile) {
+ return customRunCDAPcliCommand(namespace, "deploy app " + jarfile);
+ }
+
+ public String deleteArtifact(String namespace, String artifactName, String artifactVersion) {
+ return customRunCDAPcliCommand(namespace, "delete artifact " + artifactName + " " + artifactVersion);
+ }
+
+ public String deleteDataset(String namespace, String datasetName) {
+ return customRunCDAPcliCommand(namespace, "delete dataset instance " + datasetName);
+ }
+
+ public String createApp(String namespace, String appId, String artifactName, String artifactVersion, String scope) {
+ return customRunCDAPcliCommand(namespace, "create app " + appId + " " + artifactName + " " + artifactVersion
+ + " " + scope);
+ }
+
+ public String createAppWithConfig(String namespace, String appId, String artifactName, String artifactVersion, String scope,
+ String appConfig) {
+ Date now = new Date();
+ String filename = "/tmp/"+ now.getTime() + ".appConfig";
+ try {
+ OutputStreamWriter w = FileUtils.filename2writer(filename);
+ w.append(appConfig);
+ w.close();
+ } catch (Exception e) {
+ ManagementServerUtils.printStackTrace(e);
+ logger.fatal("configurationChanged" + e);
+ }
+ return customRunCDAPcliCommand(namespace, "create app " + appId + " " + artifactName + " " + artifactVersion
+ + " " + scope + " " + filename);
+ }
+
+ public String restartApp(String namespace, String appId, String progTypes) {
+ String extraOpts = " of type " + progTypes;
+ if (progTypes == null || progTypes.equals(""))
+ extraOpts = "";
+ return customRunCDAPcliCommand(namespace, "restart app " + appId + " programs" + extraOpts);
+ }
+
+ public String setDatasetProperties(String namespace, String datasetName, String datasetProperties) {
+ return customRunCDAPcliCommand(namespace, "set dataset instance properties " + datasetName + " "
+ + datasetProperties);
+ }
+
+ public String setStreamTTL(String namespace, String streamName, int ttlSeconds) {
+ return customRunCDAPcliCommand(namespace, "set stream ttl " + streamName + " " + ttlSeconds);
+ }
+
+ public String stopApp(String namespace, String appName) {
+ return customRunCDAPcliCommand(namespace, "stop app " + appName + " programs");
+ }
+
+ public String startWorker(String namespace, String appName,
+ String workerId, String extraArgs) {
+ if (extraArgs != null) {
+ return customRunCDAPcliCommand(namespace, "start worker " + appName + "." + workerId + " \"" + extraArgs + "\"");
+ } else {
+ return customRunCDAPcliCommand(namespace, "start worker " + appName + "." + workerId);
+ }
+
+ }
+
+ public String stopWorker(String namespace, String appId, String workerId) {
+ return customRunCDAPcliCommand(namespace, "stop worker " + appId + "." + workerId);
+
+ }
+
+ public String setPreferencesService(String namespace, String prefsString, String appId, String serviceId) {
+ return customRunCDAPcliCommand(namespace, "set preferences service " + "\"" + prefsString + "\" " + appId + "."
+ + serviceId);
+ }
+
+}
diff --git a/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/TestPolling.java b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/TestPolling.java
new file mode 100644
index 0000000..85dd704
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/TestPolling.java
@@ -0,0 +1,51 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+package org.openecomp.ncomp.servers.cdap;
+
+import org.openecomp.ncomp.sirius.manager.ISiriusServer;
+import org.openecomp.ncomp.sirius.manager.ManagementServer;
+
+public class TestPolling implements ISiriusServer {
+
+ public static void main(String[] args) {
+ TestPolling t = new TestPolling();
+ t.poll();
+ }
+
+ private ManagementServer server;
+
+ private void poll() {
+ server = new ManagementServer();
+ CdapCdapCluster c = new CdapCdapCluster(this);
+ c.setBaseUrl("http://10.0.2.2:10000/v3");
+ c.poll();
+ System.err.println("XXXX "
+ + ManagementServer.ecore2json(c, 100, null, true).toString(2));
+
+ }
+
+ @Override
+ public ManagementServer getServer() {
+ return server;
+ }
+
+}
diff --git a/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiProvider.java b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiProvider.java
new file mode 100644
index 0000000..779b26d
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiProvider.java
@@ -0,0 +1,78 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+
+package org.openecomp.ncomp.servers.cdap.gui;
+
+
+
+
+
+import java.io.InputStream;
+
+import org.openecomp.ncomp.sirius.manager.IRequestHandler;
+import org.openecomp.ncomp.sirius.manager.ISiriusPlugin;
+import org.openecomp.ncomp.sirius.manager.ISiriusServer;
+import org.openecomp.ncomp.sirius.function.FunctionUtils;
+
+import org.apache.log4j.Logger;
+import org.eclipse.emf.common.util.EList;
+import org.json.JSONObject;
+
+
+
+import org.openecomp.ncomp.sirius.gui.tools.*;
+
+
+import org.openecomp.ncomp.gwt.siriusportal.model.*;
+
+
+import org.openecomp.ncomp.sirius.manager.Subject;
+
+
+import org.openecomp.ncomp.sirius.manager.ManagementServer;
+
+
+import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer;
+
+
+import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider;
+
+
+import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl;
+import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi;
+
+
+public class CdapGuiClientApiProvider extends BasicGuiClientApiProvider {
+ private static final Logger logger = Logger.getLogger(CdapGuiClientApiProvider.class);
+ GuiClientApi o;
+
+ public CdapGuiClientApiProvider(ISiriusServer controller, GuiClientApi o) {
+ super(controller, o);
+ this.o = o;
+ }
+
+
+
+
+
+
+}
diff --git a/ncomp-cdap-adaptor/src/main/server-gen/bin/cdap-adaptor-controller b/ncomp-cdap-adaptor/src/main/server-gen/bin/cdap-adaptor-controller
new file mode 100644
index 0000000..3999772
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/server-gen/bin/cdap-adaptor-controller
@@ -0,0 +1,138 @@
+#!/bin/bash
+
+# setup env if needed. java 6 required
+## JAVA_HOME=
+
+############################## DO NOT EDIT BELOW ##########################
+
+SNAME="Cdap Controller"
+PNAME=cdap-adaptor-controller
+CLASS=org.openecomp.ncomp.servers.cdap.CdapCdapAdaptorServer
+
+############################## COMMON BELOW ##########################
+
+check_status ()
+{
+ if [ -f "${_PIDFILE}" ]; then
+ _PID=`cat "${_PIDFILE}"`
+ check_status_of_pid $_PID
+ else
+ _STATUS="$SNAME (no pidfile) is NOT running"
+ _RUNNING=0
+ fi
+}
+
+
+check_status_of_pid ()
+{
+ if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then
+ _STATUS="$SNAME (pid $1) is running"
+ _RUNNING=1
+ else
+ _STATUS="$SNAME (pid $1) is NOT running"
+ _RUNNING=0
+ fi
+}
+
+
+check_status_of_pid ()
+{
+ if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then
+ _STATUS="$SNAME (pid $1) is running"
+ _RUNNING=1
+ else
+ _STATUS="$SNAME (pid $1) is NOT running"
+ _RUNNING=0
+ fi
+}
+
+remove_pid_file ()
+{
+ if [ -f "${_PIDFILE}" ]; then
+ rm "${_PIDFILE}"
+ fi
+}
+
+
+_DIR=`dirname "$0"`
+_DIR=`dirname "$_DIR"`
+
+_PIDFILE=$_DIR/PID
+
+CMD=$1
+shift
+
+check_status
+
+CP=$(find $_DIR/lib/*/* -name \*.jar 2>/dev/null | xargs -I X printf ":%s" X)
+
+JVMARGS=$(grep 'server.jvmargs' $_DIR/config/cdap.properties | sed -e 's/.*=//')
+
+case $CMD in
+ status)
+ echo $_STATUS
+ exit 0
+ ;;
+ console)
+ $GROOVY_HOME/bin/groovysh -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP
+ ;;
+ run)
+ $JAVA_HOME/bin/java -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@"
+ ;;
+ groovy)
+ $GROOVY_HOME/bin/groovy -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@"
+ ;;
+ start)
+ if [ "$_RUNNING" = "1" ]; then
+ echo $_STATUS
+ exit 0
+ fi
+ mkdir -p $_DIR/logs
+ if [ -e $_DIR/logs/$PNAME.out.1 ]; then mv $_DIR/logs/$PNAME.out.1 $_DIR/logs/$PNAME.out.2; fi
+ if [ -e $_DIR/logs/$PNAME.err.1 ]; then mv $_DIR/logs/$PNAME.err.1 $_DIR/logs/$PNAME.err.2; fi
+ if [ -e $_DIR/logs/$PNAME.out ]; then mv $_DIR/logs/$PNAME.out $_DIR/logs/$PNAME.out.1; fi
+ if [ -e $_DIR/logs/$PNAME.err ]; then mv $_DIR/logs/$PNAME.err $_DIR/logs/$PNAME.err.1; fi
+
+ nohup $JAVA_HOME/bin/java $JVMARGS -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" $CLASS > $_DIR/logs/$PNAME.out 2> $_DIR/logs/$PNAME.err &
+
+ _PID=$!
+ echo $_PID > $_PIDFILE
+ sleep 5
+ check_status
+ echo $_STATUS
+ if [ "$_RUNNING" = "1" ]; then
+ exit 0
+ else
+ echo "Failed to start - make sure the $SNAME is fully configured properly"
+ exit 1
+ fi
+ ;;
+ stop)
+ if [ "$_RUNNING" = "0" ]; then
+ echo $_STATUS
+ remove_pid_file
+ exit 0
+ fi
+ echo "Stopping $SNAME..."
+ _PID_TO_KILL=$_PID;
+ echo "$SNAME (pid=${_PID_TO_KILL}) is stopping..."
+ kill -TERM $_PID_TO_KILL
+ sleep 5
+ check_status_of_pid $_PID_TO_KILL
+ if [ "$_RUNNING" = "1" ]; then
+ kill -TERM $_PID_TO_KILL
+ fi
+ while [ "$_RUNNING" = "1" ]; do
+ sleep 2
+ check_status_of_pid $_PID_TO_KILL
+ done
+ remove_pid_file
+ echo "$SNAME has stopped."
+ exit 0
+ ;;
+ *)
+ echo "$0 start|stop"
+ ;;
+esac
+
+
diff --git a/ncomp-cdap-adaptor/src/main/server/config/adaptor.properties b/ncomp-cdap-adaptor/src/main/server/config/adaptor.properties
new file mode 100644
index 0000000..4605389
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/server/config/adaptor.properties
@@ -0,0 +1,7 @@
+server.dir = data/resources
+metrics.dir = data/metrics
+properties.dir = data/properties
+server.port = PORT
+server.user.console = CONSOLE_PW
+server.user.gui = GUI_PW
+server.user.client = CLIENT_PW
diff --git a/ncomp-cdap-adaptor/src/main/server/config/console.properties b/ncomp-cdap-adaptor/src/main/server/config/console.properties
new file mode 100644
index 0000000..4b63607
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/server/config/console.properties
@@ -0,0 +1,3 @@
+localhost.endpoint=http://localhost:PORT
+localhost.user=console
+localhost.password=CONSOLE_PW
diff --git a/ncomp-cdap-adaptor/src/main/server/config/gui.properties b/ncomp-cdap-adaptor/src/main/server/config/gui.properties
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/server/config/gui.properties
diff --git a/ncomp-cdap-adaptor/src/main/server/config/log4j.properties b/ncomp-cdap-adaptor/src/main/server/config/log4j.properties
new file mode 100644
index 0000000..8b3b8f9
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/server/config/log4j.properties
@@ -0,0 +1,24 @@
+#log4j.debug=0
+log4j.rootLogger=warn, file
+log4j.logger.org.openecomp.ncomp=info, file
+log4j.additivity.org.openecomp.ncomp=false
+log4j.logger.org.openecomp.ncomp.datarouter=warn, file
+log4j.additivity.org.openecomp.ncomp.datarouter=false
+log4j.logger.org.apache.http.headers=debug, file
+log4j.logger.org.apache.http.wire=debug, file
+
+## uploaded logger
+log4j.logger.org.openecomp.ncomp.sirius.manager.uploaded=info, uploaded
+log4j.additivity.org.openecomp.ncomp.sirius.manager.uploaded=false
+## request logging
+log4j.logger.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=info, requests
+log4j.additivity.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=false
+
+
+log4j.appender.file=org.apache.log4j.RollingFileAppender
+log4j.appender.file.File=logs/BBBB.log
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d %5p [%t] %m %C:%L%n
+log4j.appender.file.MaxFileSize=50MB
+log4j.appender.file.MaxBackupIndex=5
+
diff --git a/ncomp-cdap-adaptor/src/main/server/config/makefile b/ncomp-cdap-adaptor/src/main/server/config/makefile
new file mode 100644
index 0000000..717823e
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/server/config/makefile
@@ -0,0 +1,9 @@
+
+restart: stop start
+
+start:
+ M2_HOME=/home/ncomp/.m2 bin/BBBB-controller start
+stop:
+ bin/BBBB-controller stop
+console:
+ bin/BBBB-controller console
diff --git a/ncomp-cdap-adaptor/src/main/server/config/pw.sh.sh b/ncomp-cdap-adaptor/src/main/server/config/pw.sh.sh
new file mode 100644
index 0000000..cd022ae
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/server/config/pw.sh.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+### used to generate random passwords
+
+
+echo '#!/bin/bash'
+echo ""
+
+echo 'cat \'
+
+for i in CONSOLE GUI CLIENT
+do
+ echo ' |' sed s/${i}_PW/$(echo $i:$(date +%s) | sha256sum | base64 | head -c 20 ; echo)/ \\
+done
+ \ No newline at end of file
diff --git a/ncomp-cdap-adaptor/src/main/server/scripts/console.groovy b/ncomp-cdap-adaptor/src/main/server/scripts/console.groovy
new file mode 100644
index 0000000..7d19a4e
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/server/scripts/console.groovy
@@ -0,0 +1,27 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+import org.openecomp.ncomp.servers.cdap.CdapCdapAdaptorConsole
+import org.openecomp.ncomp.sirius.manager.console.Utils
+
+adaptor = new CdapCdapAdaptorConsole("console.properties","localhost")
+
+def p(x) { Utils.object2json(x).toString(2) }
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/CdapAdaptor.yaml b/ncomp-cdap-adaptor/src/main/sirius-gen/CdapAdaptor.yaml
new file mode 100644
index 0000000..d728705
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/CdapAdaptor.yaml
@@ -0,0 +1,3 @@
+operations: {}
+messages:
+ dummy: {}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/CdapCluster.yaml b/ncomp-cdap-adaptor/src/main/sirius-gen/CdapCluster.yaml
new file mode 100644
index 0000000..aeaf129
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/CdapCluster.yaml
@@ -0,0 +1,432 @@
+operations:
+ createNamespace: {}
+ deleteNamespace: {}
+ deployApp: {}
+ loadArtifact: {}
+ deleteArtifact: {}
+ startFlow: {}
+ startWorker: {}
+ startService: {}
+ startApp: {}
+ stopApp: {}
+ deleteApp: {}
+ loadPreferencesApp: {}
+ loadPreferencesFlow: {}
+ loadPreferencesNameSpace: {}
+ setPreferencesApp: {}
+ setPreferencesFlow: {}
+ setPreferencesWorker: {}
+ setPreferencesService: {}
+ setPreferencesNameSpace: {}
+ setFlowRunTimeArgs: {}
+ setFlowletInstances: {}
+ stopFlow: {}
+ stopWorker: {}
+ stopService: {}
+ truncateDataSet: {}
+ deleteDataset: {}
+ createStream: {}
+ deleteStream: {}
+ getStreamEvents: {}
+ getStreamStats: {}
+ sendEventToStream: {}
+ trucateStream: {}
+ setStreamProperties: {}
+ restartApp: {}
+ createApp: {}
+ createAppWithConfig: {}
+ setDatasetProperties: {}
+ setStreamTTL: {}
+ poll: {}
+ REMOTE_createNamespace:
+ decription: Remote call createNamespace
+ REMOTE_deleteNamespace:
+ decription: Remote call deleteNamespace
+ REMOTE_deployApp:
+ decription: Remote call deployApp
+ REMOTE_loadArtifact:
+ decription: Remote call loadArtifact
+ REMOTE_deleteArtifact:
+ decription: Remote call deleteArtifact
+ REMOTE_startFlow:
+ decription: Remote call startFlow
+ REMOTE_startWorker:
+ decription: Remote call startWorker
+ REMOTE_startService:
+ decription: Remote call startService
+ REMOTE_startApp:
+ decription: Remote call startApp
+ REMOTE_stopApp:
+ decription: Remote call stopApp
+ REMOTE_deleteApp:
+ decription: Remote call deleteApp
+ REMOTE_loadPreferencesApp:
+ decription: Remote call loadPreferencesApp
+ REMOTE_loadPreferencesFlow:
+ decription: Remote call loadPreferencesFlow
+ REMOTE_loadPreferencesNameSpace:
+ decription: Remote call loadPreferencesNameSpace
+ REMOTE_setPreferencesApp:
+ decription: Remote call setPreferencesApp
+ REMOTE_setPreferencesFlow:
+ decription: Remote call setPreferencesFlow
+ REMOTE_setPreferencesWorker:
+ decription: Remote call setPreferencesWorker
+ REMOTE_setPreferencesService:
+ decription: Remote call setPreferencesService
+ REMOTE_setPreferencesNameSpace:
+ decription: Remote call setPreferencesNameSpace
+ REMOTE_setFlowRunTimeArgs:
+ decription: Remote call setFlowRunTimeArgs
+ REMOTE_setFlowletInstances:
+ decription: Remote call setFlowletInstances
+ REMOTE_stopFlow:
+ decription: Remote call stopFlow
+ REMOTE_stopWorker:
+ decription: Remote call stopWorker
+ REMOTE_stopService:
+ decription: Remote call stopService
+ REMOTE_truncateDataSet:
+ decription: Remote call truncateDataSet
+ REMOTE_deleteDataset:
+ decription: Remote call deleteDataset
+ REMOTE_createStream:
+ decription: Remote call createStream
+ REMOTE_deleteStream:
+ decription: Remote call deleteStream
+ REMOTE_getStreamEvents:
+ decription: Remote call getStreamEvents
+ REMOTE_getStreamStats:
+ decription: Remote call getStreamStats
+ REMOTE_sendEventToStream:
+ decription: Remote call sendEventToStream
+ REMOTE_trucateStream:
+ decription: Remote call trucateStream
+ REMOTE_setStreamProperties:
+ decription: Remote call setStreamProperties
+ REMOTE_restartApp:
+ decription: Remote call restartApp
+ REMOTE_createApp:
+ decription: Remote call createApp
+ REMOTE_createAppWithConfig:
+ decription: Remote call createAppWithConfig
+ REMOTE_setDatasetProperties:
+ decription: Remote call setDatasetProperties
+ REMOTE_setStreamTTL:
+ decription: Remote call setStreamTTL
+ REMOTE_poll:
+ decription: Remote call poll
+messages:
+ dummy: {}
+ createNamespace:
+ errorCode: createNamespace-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ deleteNamespace:
+ errorCode: deleteNamespace-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ deployApp:
+ errorCode: deployApp-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ loadArtifact:
+ errorCode: loadArtifact-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ deleteArtifact:
+ errorCode: deleteArtifact-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ startFlow:
+ errorCode: startFlow-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ startWorker:
+ errorCode: startWorker-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ startService:
+ errorCode: startService-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ startApp:
+ errorCode: startApp-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ stopApp:
+ errorCode: stopApp-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ deleteApp:
+ errorCode: deleteApp-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ loadPreferencesApp:
+ errorCode: loadPreferencesApp-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ loadPreferencesFlow:
+ errorCode: loadPreferencesFlow-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ loadPreferencesNameSpace:
+ errorCode: loadPreferencesNameSpace-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ setPreferencesApp:
+ errorCode: setPreferencesApp-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ setPreferencesFlow:
+ errorCode: setPreferencesFlow-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ setPreferencesWorker:
+ errorCode: setPreferencesWorker-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ setPreferencesService:
+ errorCode: setPreferencesService-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ setPreferencesNameSpace:
+ errorCode: setPreferencesNameSpace-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ setFlowRunTimeArgs:
+ errorCode: setFlowRunTimeArgs-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ setFlowletInstances:
+ errorCode: setFlowletInstances-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ stopFlow:
+ errorCode: stopFlow-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ stopWorker:
+ errorCode: stopWorker-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ stopService:
+ errorCode: stopService-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ truncateDataSet:
+ errorCode: truncateDataSet-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ deleteDataset:
+ errorCode: deleteDataset-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ createStream:
+ errorCode: createStream-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ deleteStream:
+ errorCode: deleteStream-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ getStreamEvents:
+ errorCode: getStreamEvents-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ getStreamStats:
+ errorCode: getStreamStats-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ sendEventToStream:
+ errorCode: sendEventToStream-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ trucateStream:
+ errorCode: trucateStream-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ setStreamProperties:
+ errorCode: setStreamProperties-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ restartApp:
+ errorCode: restartApp-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ createApp:
+ errorCode: createApp-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ createAppWithConfig:
+ errorCode: createAppWithConfig-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ setDatasetProperties:
+ errorCode: setDatasetProperties-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ setStreamTTL:
+ errorCode: setStreamTTL-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ poll:
+ errorCode: poll-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ REMOTE_createNamespace:
+ errorCode: REMOTE-createNamespace-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_deleteNamespace:
+ errorCode: REMOTE-deleteNamespace-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_deployApp:
+ errorCode: REMOTE-deployApp-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_loadArtifact:
+ errorCode: REMOTE-loadArtifact-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_deleteArtifact:
+ errorCode: REMOTE-deleteArtifact-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_startFlow:
+ errorCode: REMOTE-startFlow-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_startWorker:
+ errorCode: REMOTE-startWorker-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_startService:
+ errorCode: REMOTE-startService-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_startApp:
+ errorCode: REMOTE-startApp-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_stopApp:
+ errorCode: REMOTE-stopApp-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_deleteApp:
+ errorCode: REMOTE-deleteApp-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_loadPreferencesApp:
+ errorCode: REMOTE-loadPreferencesApp-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_loadPreferencesFlow:
+ errorCode: REMOTE-loadPreferencesFlow-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_loadPreferencesNameSpace:
+ errorCode: REMOTE-loadPreferencesNameSpace-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_setPreferencesApp:
+ errorCode: REMOTE-setPreferencesApp-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_setPreferencesFlow:
+ errorCode: REMOTE-setPreferencesFlow-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_setPreferencesWorker:
+ errorCode: REMOTE-setPreferencesWorker-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_setPreferencesService:
+ errorCode: REMOTE-setPreferencesService-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_setPreferencesNameSpace:
+ errorCode: REMOTE-setPreferencesNameSpace-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_setFlowRunTimeArgs:
+ errorCode: REMOTE-setFlowRunTimeArgs-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_setFlowletInstances:
+ errorCode: REMOTE-setFlowletInstances-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_stopFlow:
+ errorCode: REMOTE-stopFlow-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_stopWorker:
+ errorCode: REMOTE-stopWorker-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_stopService:
+ errorCode: REMOTE-stopService-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_truncateDataSet:
+ errorCode: REMOTE-truncateDataSet-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_deleteDataset:
+ errorCode: REMOTE-deleteDataset-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_createStream:
+ errorCode: REMOTE-createStream-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_deleteStream:
+ errorCode: REMOTE-deleteStream-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_getStreamEvents:
+ errorCode: REMOTE-getStreamEvents-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_getStreamStats:
+ errorCode: REMOTE-getStreamStats-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_sendEventToStream:
+ errorCode: REMOTE-sendEventToStream-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_trucateStream:
+ errorCode: REMOTE-trucateStream-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_setStreamProperties:
+ errorCode: REMOTE-setStreamProperties-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_restartApp:
+ errorCode: REMOTE-restartApp-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_createApp:
+ errorCode: REMOTE-createApp-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_createAppWithConfig:
+ errorCode: REMOTE-createAppWithConfig-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_setDatasetProperties:
+ errorCode: REMOTE-setDatasetProperties-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_setStreamTTL:
+ errorCode: REMOTE-setStreamTTL-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_poll:
+ errorCode: REMOTE-poll-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/GuiClientApi.yaml b/ncomp-cdap-adaptor/src/main/sirius-gen/GuiClientApi.yaml
new file mode 100644
index 0000000..bf3d69d
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/GuiClientApi.yaml
@@ -0,0 +1,69 @@
+operations:
+ getTree: {}
+ getObject: {}
+ getTimeSerie: {}
+ getTable: {}
+ getHtml: {}
+ getGraph: {}
+ REMOTE_getTree:
+ decription: Remote call getTree
+ REMOTE_getObject:
+ decription: Remote call getObject
+ REMOTE_getTimeSerie:
+ decription: Remote call getTimeSerie
+ REMOTE_getTable:
+ decription: Remote call getTable
+ REMOTE_getHtml:
+ decription: Remote call getHtml
+ REMOTE_getGraph:
+ decription: Remote call getGraph
+messages:
+ dummy: {}
+ getTree:
+ errorCode: getTree-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ getObject:
+ errorCode: getObject-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ getTimeSerie:
+ errorCode: getTimeSerie-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ getTable:
+ errorCode: getTable-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ getHtml:
+ errorCode: getHtml-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ getGraph:
+ errorCode: getGraph-FAILED-5001W
+ messageFormat: '{0}'
+ description: Operation Failed with Exception
+ REMOTE_getTree:
+ errorCode: REMOTE-getTree-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_getObject:
+ errorCode: REMOTE-getObject-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_getTimeSerie:
+ errorCode: REMOTE-getTimeSerie-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_getTable:
+ errorCode: REMOTE-getTable-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_getHtml:
+ errorCode: REMOTE-getHtml-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
+ REMOTE_getGraph:
+ errorCode: REMOTE-getGraph-FAILED-5001W
+ messageFormat: '{0}'
+ description: Remote Operation Failed with Exception
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptor.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptor.java
new file mode 100644
index 0000000..0944f8c
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptor.java
@@ -0,0 +1,76 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+// Autogenerated
+// Do not edit. No need to extend this class.
+package org.openecomp.ncomp.servers.cdap;
+
+
+
+import java.io.InputStream;
+
+import org.openecomp.ncomp.sirius.manager.IRequestHandler;
+import org.openecomp.ncomp.sirius.manager.ISiriusPlugin;
+import org.openecomp.ncomp.sirius.manager.ISiriusServer;
+import org.openecomp.ncomp.sirius.function.FunctionUtils;
+import org.openecomp.ncomp.component.ApiRequestStatus;
+
+import org.apache.log4j.Logger;
+
+import org.openecomp.logger.EcompLogger;
+
+import org.eclipse.emf.common.util.EList;
+import org.json.JSONObject;
+
+import java.util.Date;
+
+import org.openecomp.ncomp.servers.cdap.logging.CdapAdaptorOperationEnum;
+
+
+
+
+import org.openecomp.ncomp.cdap.impl.CdapAdaptorImpl;
+
+
+
+public class CdapCdapAdaptor extends CdapAdaptorImpl {
+ public static final Logger logger = Logger.getLogger(CdapCdapAdaptor.class);
+ static final EcompLogger ecomplogger = EcompLogger.getEcompLogger();
+ public CdapCdapAdaptorProvider controller;
+ ISiriusServer server;
+
+ public CdapCdapAdaptor(ISiriusServer server) {
+ this.server = server;
+ this.controller = new CdapCdapAdaptorProvider(server,this);
+ }
+
+
+
+
+
+
+ public static void ecoreSetup() {
+ CdapCdapAdaptorProvider.ecoreSetup();
+ }
+ public CdapCdapAdaptorProvider getSomfProvider() {
+ return controller;
+ }
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorClient.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorClient.java
new file mode 100644
index 0000000..afc8bfb
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorClient.java
@@ -0,0 +1,72 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+// Autogenerated
+// Do not edit. No need to extend this class.
+package org.openecomp.ncomp.servers.cdap;
+
+import org.openecomp.ncomp.sirius.manager.AbstractClient;
+import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient;
+import org.openecomp.ncomp.sirius.manager.GenericHttpClient;
+
+import org.apache.log4j.Logger;
+
+import org.openecomp.logger.EcompLogger;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+
+import org.openecomp.ncomp.cdap.impl.CdapAdaptorImpl;
+import org.openecomp.ncomp.cdap.CdapPackage;
+import org.openecomp.ncomp.servers.cdap.logging.CdapAdaptorOperationEnum;
+import org.openecomp.ncomp.servers.cdap.logging.CdapAdaptorMessageEnum;
+
+
+
+
+
+
+@SuppressWarnings("unchecked")
+public class CdapCdapAdaptorClient extends CdapAdaptorImpl {
+ public static final Logger logger = Logger.getLogger(CdapCdapAdaptorClient.class);
+ static final EcompLogger ecomplogger = EcompLogger.getEcompLogger();
+ public AbstractClient client;
+
+ public CdapCdapAdaptorClient(String file, String name) {
+ CdapCdapAdaptor.ecoreSetup();
+ client = new GenericHttpClient(file,name);
+ client.add("/resources", this);
+ }
+
+ public CdapCdapAdaptorClient(String file, String name1, String name2) {
+ HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2);
+ client = client1.all; // requests should be forwarded to all.
+ client.add("/resources", this);
+ }
+
+ public CdapCdapAdaptorClient(AbstractClient c) {
+ client = c;
+ client.add("/resources", this);
+ }
+
+
+
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorConsole.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorConsole.java
new file mode 100644
index 0000000..bd83919
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorConsole.java
@@ -0,0 +1,63 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+// Autogenerated
+// Do not edit but extend this class as needed
+package org.openecomp.ncomp.servers.cdap;
+
+
+import org.apache.log4j.Logger;
+import org.eclipse.emf.common.util.EList;
+
+import org.openecomp.ncomp.sirius.manager.console.Console;
+import org.openecomp.ncomp.sirius.manager.AbstractClient;
+import org.openecomp.ncomp.sirius.manager.ManagementServerError;
+
+
+
+import org.openecomp.ncomp.servers.cdap.gui.CdapGuiClientApiConsole;
+
+
+public class CdapCdapAdaptorConsole extends Console {
+ public static final Logger logger = Logger.getLogger(CdapCdapAdaptorConsole.class);
+ protected CdapCdapAdaptorClient controller;
+
+
+ CdapCdapClusterConsole cluster;
+ CdapGuiClientApiConsole gui;
+
+
+ public CdapCdapAdaptorConsole(String filename, String name) {
+ super(filename, name);
+ controller = new CdapCdapAdaptorClient(filename,name);
+ client = controller.client;
+
+ cluster = new CdapCdapClusterConsole(filename,name);
+ gui = new CdapGuiClientApiConsole(filename,name);
+ }
+
+ public CdapCdapAdaptorConsole(AbstractClient c) {
+ controller = new CdapCdapAdaptorClient(c);
+ client = controller.client;
+ }
+
+
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorProviderTemplate.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorProviderTemplate.java
new file mode 100644
index 0000000..02234fc
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorProviderTemplate.java
@@ -0,0 +1,63 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+
+package org.openecomp.ncomp.servers.cdap;
+
+
+
+
+
+import java.io.InputStream;
+
+import org.openecomp.ncomp.sirius.manager.IRequestHandler;
+import org.openecomp.ncomp.sirius.manager.ISiriusPlugin;
+import org.openecomp.ncomp.sirius.manager.ISiriusServer;
+import org.openecomp.ncomp.sirius.function.FunctionUtils;
+
+import org.apache.log4j.Logger;
+import org.eclipse.emf.common.util.EList;
+import org.json.JSONObject;
+
+
+
+import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider;
+
+
+import org.openecomp.ncomp.cdap.impl.CdapAdaptorImpl;
+import org.openecomp.ncomp.cdap.CdapAdaptor;
+
+
+public class CdapCdapAdaptorProviderTemplate extends BasicAdaptorProvider {
+ private static final Logger logger = Logger.getLogger(CdapCdapAdaptorProviderTemplate.class);
+ CdapAdaptor o;
+
+ public CdapCdapAdaptorProviderTemplate(ISiriusServer controller, CdapAdaptor o) {
+ super(controller, o);
+ this.o = o;
+ }
+
+
+
+
+
+
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorServer.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorServer.java
new file mode 100644
index 0000000..c44a17a
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorServer.java
@@ -0,0 +1,114 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+// Autogenerated
+// Do not edit but extend this class as needed
+package org.openecomp.ncomp.servers.cdap;
+
+import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath;
+
+import java.io.IOException;
+import java.util.Properties;
+import java.util.TimeZone;
+
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EFactory;
+
+import org.openecomp.entity.EcompComponent;
+import org.openecomp.entity.EcompSubComponent;
+import org.openecomp.entity.EcompSubComponentInstance;
+import org.openecomp.ncomp.sirius.manager.Jetty8Server;
+import org.openecomp.ncomp.sirius.manager.ManagementServer;
+import org.openecomp.ncomp.sirius.manager.ISiriusServer;
+
+import org.openecomp.ncomp.cdap.CdapAdaptor;
+
+
+import org.openecomp.ncomp.servers.cdap.CdapCdapFactory;
+
+import org.openecomp.ncomp.servers.cdap.gui.CdapModelFactory;
+
+
+
+
+
+public class CdapCdapAdaptorServer implements ISiriusServer {
+ public static final Logger logger = Logger.getLogger(CdapCdapAdaptorServer.class);
+ String serverPath;
+ ManagementServer server;
+ CdapCdapAdaptor controller;
+ String directory = "data";
+// LocationControllerApi api ;
+ Jetty8Server webServer;
+ CdapCdapFactory f = new CdapCdapFactory(this);
+
+
+ String clusterPath;
+ ManagementServer clusterServer;
+
+ String guiPath;
+ ManagementServer guiServer;
+
+
+ public CdapCdapAdaptorServer(String filename) throws IOException {
+ logger.warn("controller restarting");
+ CdapCdapAdaptor.ecoreSetup();
+ props = getPropertiesFromClasspath(filename);
+ serverPath = (String) props.get("server.dir");
+ server = new ManagementServer(f, "CdapAdaptor", serverPath, filename);
+ server.addFactory(f);
+
+ server.addRuntimeFactories(this);
+ server.start();
+ }
+ public void runWebserver() throws IOException {
+ controller = (CdapCdapAdaptor) server.find("/").o;
+ webServer = new Jetty8Server("cdap.properties");
+ webServer.add("/resources",server);
+
+
+
+ EFactory guiFactory = new CdapModelFactory(this);
+ guiPath = serverPath + "/gui";
+ guiServer = new ManagementServer(guiFactory, "GuiClientApi", guiPath, "gui.properties");
+ guiServer.start();
+ webServer.add("/gui",guiServer);
+
+
+
+ logger.info("Joining webserver");
+ webServer.join();
+ }
+ static Properties props = null;
+ public static void main(String []args) throws IOException {
+ // ALWAYS USE GMT.
+ TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
+
+ CdapCdapAdaptorServer s = new CdapCdapAdaptorServer("cdap.properties");
+ s.runWebserver();
+ }
+ public CdapAdaptor getController() {
+ return controller;
+ }
+ public ManagementServer getServer() {
+ return server;
+ }
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapCluster.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapCluster.java
new file mode 100644
index 0000000..ed5ffef
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapCluster.java
@@ -0,0 +1,1056 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+// Autogenerated
+// Do not edit. No need to extend this class.
+package org.openecomp.ncomp.servers.cdap;
+
+
+
+import java.io.InputStream;
+
+import org.openecomp.ncomp.sirius.manager.IRequestHandler;
+import org.openecomp.ncomp.sirius.manager.ISiriusPlugin;
+import org.openecomp.ncomp.sirius.manager.ISiriusServer;
+import org.openecomp.ncomp.sirius.function.FunctionUtils;
+import org.openecomp.ncomp.component.ApiRequestStatus;
+
+import org.apache.log4j.Logger;
+
+import org.openecomp.logger.EcompLogger;
+
+import org.eclipse.emf.common.util.EList;
+import org.json.JSONObject;
+
+import java.util.Date;
+
+import org.openecomp.ncomp.servers.cdap.logging.CdapClusterOperationEnum;
+
+
+
+
+import org.openecomp.ncomp.cdap.impl.CdapClusterImpl;
+
+
+
+public class CdapCdapCluster extends CdapClusterImpl implements ISiriusPlugin {
+ public static final Logger logger = Logger.getLogger(CdapCdapCluster.class);
+ static final EcompLogger ecomplogger = EcompLogger.getEcompLogger();
+ public CdapCdapClusterProvider controller;
+ ISiriusServer server;
+
+ public CdapCdapCluster(ISiriusServer server) {
+ this.server = server;
+ this.controller = new CdapCdapClusterProvider(server,this);
+ }
+
+ public void poll() {
+
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "poll", ApiRequestStatus.START, duration_);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.poll);
+ try {
+ controller.poll();
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "poll", ApiRequestStatus.ERROR, duration_);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "poll", ApiRequestStatus.OKAY, duration_);
+
+ }
+
+ public java.lang.String createNamespace(java.lang.String namespace) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "createNamespace", ApiRequestStatus.START, duration_,namespace);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.createNamespace);
+ try {
+ res = controller.createNamespace(namespace);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "createNamespace", ApiRequestStatus.ERROR, duration_,namespace);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "createNamespace", ApiRequestStatus.OKAY, duration_,namespace);
+ return res;
+ }
+
+ public java.lang.String deleteNamespace(java.lang.String namespace) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "deleteNamespace", ApiRequestStatus.START, duration_,namespace);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.deleteNamespace);
+ try {
+ res = controller.deleteNamespace(namespace);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "deleteNamespace", ApiRequestStatus.ERROR, duration_,namespace);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "deleteNamespace", ApiRequestStatus.OKAY, duration_,namespace);
+ return res;
+ }
+
+ public java.lang.String deployApp(java.lang.String namespace, java.lang.String jarfile) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "deployApp", ApiRequestStatus.START, duration_,namespace,jarfile);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.deployApp);
+ try {
+ res = controller.deployApp(namespace,jarfile);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "deployApp", ApiRequestStatus.ERROR, duration_,namespace,jarfile);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "deployApp", ApiRequestStatus.OKAY, duration_,namespace,jarfile);
+ return res;
+ }
+
+ public java.lang.String loadArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String jarfile, java.lang.String version) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "loadArtifact", ApiRequestStatus.START, duration_,namespace,artifactName,jarfile,version);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.loadArtifact);
+ try {
+ res = controller.loadArtifact(namespace,artifactName,jarfile,version);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "loadArtifact", ApiRequestStatus.ERROR, duration_,namespace,artifactName,jarfile,version);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "loadArtifact", ApiRequestStatus.OKAY, duration_,namespace,artifactName,jarfile,version);
+ return res;
+ }
+
+ public java.lang.String deleteArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String artifactVersion) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "deleteArtifact", ApiRequestStatus.START, duration_,namespace,artifactName,artifactVersion);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.deleteArtifact);
+ try {
+ res = controller.deleteArtifact(namespace,artifactName,artifactVersion);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "deleteArtifact", ApiRequestStatus.ERROR, duration_,namespace,artifactName,artifactVersion);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "deleteArtifact", ApiRequestStatus.OKAY, duration_,namespace,artifactName,artifactVersion);
+ return res;
+ }
+
+ public java.lang.String startFlow(java.lang.String namespace, java.lang.String appName, java.lang.String flowId, java.lang.String extraArgs) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "startFlow", ApiRequestStatus.START, duration_,namespace,appName,flowId,extraArgs);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.startFlow);
+ try {
+ res = controller.startFlow(namespace,appName,flowId,extraArgs);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "startFlow", ApiRequestStatus.ERROR, duration_,namespace,appName,flowId,extraArgs);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "startFlow", ApiRequestStatus.OKAY, duration_,namespace,appName,flowId,extraArgs);
+ return res;
+ }
+
+ public java.lang.String startWorker(java.lang.String namespace, java.lang.String appName, java.lang.String workerId, java.lang.String extraArgs) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "startWorker", ApiRequestStatus.START, duration_,namespace,appName,workerId,extraArgs);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.startWorker);
+ try {
+ res = controller.startWorker(namespace,appName,workerId,extraArgs);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "startWorker", ApiRequestStatus.ERROR, duration_,namespace,appName,workerId,extraArgs);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "startWorker", ApiRequestStatus.OKAY, duration_,namespace,appName,workerId,extraArgs);
+ return res;
+ }
+
+ public java.lang.String startService(java.lang.String namespace, java.lang.String appName, java.lang.String serviceId, java.lang.String extraArgs) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "startService", ApiRequestStatus.START, duration_,namespace,appName,serviceId,extraArgs);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.startService);
+ try {
+ res = controller.startService(namespace,appName,serviceId,extraArgs);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "startService", ApiRequestStatus.ERROR, duration_,namespace,appName,serviceId,extraArgs);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "startService", ApiRequestStatus.OKAY, duration_,namespace,appName,serviceId,extraArgs);
+ return res;
+ }
+
+ public java.lang.String startApp(java.lang.String namespace, java.lang.String appName) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "startApp", ApiRequestStatus.START, duration_,namespace,appName);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.startApp);
+ try {
+ res = controller.startApp(namespace,appName);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "startApp", ApiRequestStatus.ERROR, duration_,namespace,appName);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "startApp", ApiRequestStatus.OKAY, duration_,namespace,appName);
+ return res;
+ }
+
+ public java.lang.String stopApp(java.lang.String namespace, java.lang.String appName) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "stopApp", ApiRequestStatus.START, duration_,namespace,appName);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.stopApp);
+ try {
+ res = controller.stopApp(namespace,appName);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "stopApp", ApiRequestStatus.ERROR, duration_,namespace,appName);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "stopApp", ApiRequestStatus.OKAY, duration_,namespace,appName);
+ return res;
+ }
+
+ public java.lang.String deleteApp(java.lang.String namespace, java.lang.String appName) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "deleteApp", ApiRequestStatus.START, duration_,namespace,appName);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.deleteApp);
+ try {
+ res = controller.deleteApp(namespace,appName);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "deleteApp", ApiRequestStatus.ERROR, duration_,namespace,appName);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "deleteApp", ApiRequestStatus.OKAY, duration_,namespace,appName);
+ return res;
+ }
+
+ public java.lang.String loadPreferencesApp(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "loadPreferencesApp", ApiRequestStatus.START, duration_,namespace,prefsFile,appId);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.loadPreferencesApp);
+ try {
+ res = controller.loadPreferencesApp(namespace,prefsFile,appId);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "loadPreferencesApp", ApiRequestStatus.ERROR, duration_,namespace,prefsFile,appId);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "loadPreferencesApp", ApiRequestStatus.OKAY, duration_,namespace,prefsFile,appId);
+ return res;
+ }
+
+ public java.lang.String loadPreferencesFlow(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId, java.lang.String flowId) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "loadPreferencesFlow", ApiRequestStatus.START, duration_,namespace,prefsFile,appId,flowId);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.loadPreferencesFlow);
+ try {
+ res = controller.loadPreferencesFlow(namespace,prefsFile,appId,flowId);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "loadPreferencesFlow", ApiRequestStatus.ERROR, duration_,namespace,prefsFile,appId,flowId);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "loadPreferencesFlow", ApiRequestStatus.OKAY, duration_,namespace,prefsFile,appId,flowId);
+ return res;
+ }
+
+ public java.lang.String loadPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsFile) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "loadPreferencesNameSpace", ApiRequestStatus.START, duration_,namespace,prefsFile);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.loadPreferencesNameSpace);
+ try {
+ res = controller.loadPreferencesNameSpace(namespace,prefsFile);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "loadPreferencesNameSpace", ApiRequestStatus.ERROR, duration_,namespace,prefsFile);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "loadPreferencesNameSpace", ApiRequestStatus.OKAY, duration_,namespace,prefsFile);
+ return res;
+ }
+
+ public java.lang.String setPreferencesApp(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "setPreferencesApp", ApiRequestStatus.START, duration_,namespace,prefsString,appId);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.setPreferencesApp);
+ try {
+ res = controller.setPreferencesApp(namespace,prefsString,appId);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setPreferencesApp", ApiRequestStatus.ERROR, duration_,namespace,prefsString,appId);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setPreferencesApp", ApiRequestStatus.OKAY, duration_,namespace,prefsString,appId);
+ return res;
+ }
+
+ public java.lang.String setPreferencesFlow(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String flowId) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "setPreferencesFlow", ApiRequestStatus.START, duration_,namespace,prefsString,appId,flowId);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.setPreferencesFlow);
+ try {
+ res = controller.setPreferencesFlow(namespace,prefsString,appId,flowId);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setPreferencesFlow", ApiRequestStatus.ERROR, duration_,namespace,prefsString,appId,flowId);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setPreferencesFlow", ApiRequestStatus.OKAY, duration_,namespace,prefsString,appId,flowId);
+ return res;
+ }
+
+ public java.lang.String setPreferencesWorker(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String workerId) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "setPreferencesWorker", ApiRequestStatus.START, duration_,namespace,prefsString,appId,workerId);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.setPreferencesWorker);
+ try {
+ res = controller.setPreferencesWorker(namespace,prefsString,appId,workerId);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setPreferencesWorker", ApiRequestStatus.ERROR, duration_,namespace,prefsString,appId,workerId);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setPreferencesWorker", ApiRequestStatus.OKAY, duration_,namespace,prefsString,appId,workerId);
+ return res;
+ }
+
+ public java.lang.String setPreferencesService(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String serviceId) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "setPreferencesService", ApiRequestStatus.START, duration_,namespace,prefsString,appId,serviceId);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.setPreferencesService);
+ try {
+ res = controller.setPreferencesService(namespace,prefsString,appId,serviceId);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setPreferencesService", ApiRequestStatus.ERROR, duration_,namespace,prefsString,appId,serviceId);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setPreferencesService", ApiRequestStatus.OKAY, duration_,namespace,prefsString,appId,serviceId);
+ return res;
+ }
+
+ public java.lang.String setPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsString) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "setPreferencesNameSpace", ApiRequestStatus.START, duration_,namespace,prefsString);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.setPreferencesNameSpace);
+ try {
+ res = controller.setPreferencesNameSpace(namespace,prefsString);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setPreferencesNameSpace", ApiRequestStatus.ERROR, duration_,namespace,prefsString);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setPreferencesNameSpace", ApiRequestStatus.OKAY, duration_,namespace,prefsString);
+ return res;
+ }
+
+ public java.lang.String setFlowRunTimeArgs(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String args) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "setFlowRunTimeArgs", ApiRequestStatus.START, duration_,namespace,appId,flowId,args);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.setFlowRunTimeArgs);
+ try {
+ res = controller.setFlowRunTimeArgs(namespace,appId,flowId,args);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setFlowRunTimeArgs", ApiRequestStatus.ERROR, duration_,namespace,appId,flowId,args);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setFlowRunTimeArgs", ApiRequestStatus.OKAY, duration_,namespace,appId,flowId,args);
+ return res;
+ }
+
+ public java.lang.String setFlowletInstances(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String flowletId, int nInstances) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "setFlowletInstances", ApiRequestStatus.START, duration_,namespace,appId,flowId,flowletId,nInstances);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.setFlowletInstances);
+ try {
+ res = controller.setFlowletInstances(namespace,appId,flowId,flowletId,nInstances);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setFlowletInstances", ApiRequestStatus.ERROR, duration_,namespace,appId,flowId,flowletId,nInstances);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setFlowletInstances", ApiRequestStatus.OKAY, duration_,namespace,appId,flowId,flowletId,nInstances);
+ return res;
+ }
+
+ public java.lang.String stopFlow(java.lang.String namespace, java.lang.String appId, java.lang.String flowId) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "stopFlow", ApiRequestStatus.START, duration_,namespace,appId,flowId);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.stopFlow);
+ try {
+ res = controller.stopFlow(namespace,appId,flowId);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "stopFlow", ApiRequestStatus.ERROR, duration_,namespace,appId,flowId);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "stopFlow", ApiRequestStatus.OKAY, duration_,namespace,appId,flowId);
+ return res;
+ }
+
+ public java.lang.String stopWorker(java.lang.String namespace, java.lang.String appId, java.lang.String workerId) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "stopWorker", ApiRequestStatus.START, duration_,namespace,appId,workerId);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.stopWorker);
+ try {
+ res = controller.stopWorker(namespace,appId,workerId);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "stopWorker", ApiRequestStatus.ERROR, duration_,namespace,appId,workerId);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "stopWorker", ApiRequestStatus.OKAY, duration_,namespace,appId,workerId);
+ return res;
+ }
+
+ public java.lang.String stopService(java.lang.String namespace, java.lang.String appId, java.lang.String serviceId) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "stopService", ApiRequestStatus.START, duration_,namespace,appId,serviceId);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.stopService);
+ try {
+ res = controller.stopService(namespace,appId,serviceId);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "stopService", ApiRequestStatus.ERROR, duration_,namespace,appId,serviceId);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "stopService", ApiRequestStatus.OKAY, duration_,namespace,appId,serviceId);
+ return res;
+ }
+
+ public java.lang.String truncateDataSet(java.lang.String namespace, java.lang.String datasetName) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "truncateDataSet", ApiRequestStatus.START, duration_,namespace,datasetName);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.truncateDataSet);
+ try {
+ res = controller.truncateDataSet(namespace,datasetName);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "truncateDataSet", ApiRequestStatus.ERROR, duration_,namespace,datasetName);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "truncateDataSet", ApiRequestStatus.OKAY, duration_,namespace,datasetName);
+ return res;
+ }
+
+ public java.lang.String deleteDataset(java.lang.String namespace, java.lang.String datasetName) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "deleteDataset", ApiRequestStatus.START, duration_,namespace,datasetName);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.deleteDataset);
+ try {
+ res = controller.deleteDataset(namespace,datasetName);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "deleteDataset", ApiRequestStatus.ERROR, duration_,namespace,datasetName);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "deleteDataset", ApiRequestStatus.OKAY, duration_,namespace,datasetName);
+ return res;
+ }
+
+ public java.lang.String createStream(java.lang.String namespace, java.lang.String newStreamId) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "createStream", ApiRequestStatus.START, duration_,namespace,newStreamId);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.createStream);
+ try {
+ res = controller.createStream(namespace,newStreamId);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "createStream", ApiRequestStatus.ERROR, duration_,namespace,newStreamId);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "createStream", ApiRequestStatus.OKAY, duration_,namespace,newStreamId);
+ return res;
+ }
+
+ public java.lang.String deleteStream(java.lang.String namespace, java.lang.String streamId) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "deleteStream", ApiRequestStatus.START, duration_,namespace,streamId);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.deleteStream);
+ try {
+ res = controller.deleteStream(namespace,streamId);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "deleteStream", ApiRequestStatus.ERROR, duration_,namespace,streamId);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "deleteStream", ApiRequestStatus.OKAY, duration_,namespace,streamId);
+ return res;
+ }
+
+ public EList<java.lang.String> getStreamEvents(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) {
+ EList<java.lang.String> res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "getStreamEvents", ApiRequestStatus.START, duration_,namespace,streamId,startTime,endTime,limit);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.getStreamEvents);
+ try {
+ res = controller.getStreamEvents(namespace,streamId,startTime,endTime,limit);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "getStreamEvents", ApiRequestStatus.ERROR, duration_,namespace,streamId,startTime,endTime,limit);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "getStreamEvents", ApiRequestStatus.OKAY, duration_,namespace,streamId,startTime,endTime,limit);
+ return res;
+ }
+
+ public EList<java.lang.String> getStreamStats(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) {
+ EList<java.lang.String> res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "getStreamStats", ApiRequestStatus.START, duration_,namespace,streamId,startTime,endTime,limit);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.getStreamStats);
+ try {
+ res = controller.getStreamStats(namespace,streamId,startTime,endTime,limit);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "getStreamStats", ApiRequestStatus.ERROR, duration_,namespace,streamId,startTime,endTime,limit);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "getStreamStats", ApiRequestStatus.OKAY, duration_,namespace,streamId,startTime,endTime,limit);
+ return res;
+ }
+
+ public java.lang.String sendEventToStream(java.lang.String namespace, java.lang.String streamId, java.lang.String event) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "sendEventToStream", ApiRequestStatus.START, duration_,namespace,streamId,event);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.sendEventToStream);
+ try {
+ res = controller.sendEventToStream(namespace,streamId,event);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "sendEventToStream", ApiRequestStatus.ERROR, duration_,namespace,streamId,event);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "sendEventToStream", ApiRequestStatus.OKAY, duration_,namespace,streamId,event);
+ return res;
+ }
+
+ public java.lang.String trucateStream(java.lang.String namespace, java.lang.String streamId) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "trucateStream", ApiRequestStatus.START, duration_,namespace,streamId);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.trucateStream);
+ try {
+ res = controller.trucateStream(namespace,streamId);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "trucateStream", ApiRequestStatus.ERROR, duration_,namespace,streamId);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "trucateStream", ApiRequestStatus.OKAY, duration_,namespace,streamId);
+ return res;
+ }
+
+ public java.lang.String setStreamProperties(java.lang.String namespace, java.lang.String streamId, java.lang.String propsFile) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "setStreamProperties", ApiRequestStatus.START, duration_,namespace,streamId,propsFile);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.setStreamProperties);
+ try {
+ res = controller.setStreamProperties(namespace,streamId,propsFile);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setStreamProperties", ApiRequestStatus.ERROR, duration_,namespace,streamId,propsFile);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setStreamProperties", ApiRequestStatus.OKAY, duration_,namespace,streamId,propsFile);
+ return res;
+ }
+
+ public java.lang.String restartApp(java.lang.String namespace, java.lang.String appId, java.lang.String progTypes) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "restartApp", ApiRequestStatus.START, duration_,namespace,appId,progTypes);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.restartApp);
+ try {
+ res = controller.restartApp(namespace,appId,progTypes);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "restartApp", ApiRequestStatus.ERROR, duration_,namespace,appId,progTypes);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "restartApp", ApiRequestStatus.OKAY, duration_,namespace,appId,progTypes);
+ return res;
+ }
+
+ public java.lang.String createApp(java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "createApp", ApiRequestStatus.START, duration_,namespace,appId,artifactName,artifactVersion,scope);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.createApp);
+ try {
+ res = controller.createApp(namespace,appId,artifactName,artifactVersion,scope);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "createApp", ApiRequestStatus.ERROR, duration_,namespace,appId,artifactName,artifactVersion,scope);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "createApp", ApiRequestStatus.OKAY, duration_,namespace,appId,artifactName,artifactVersion,scope);
+ return res;
+ }
+
+ public java.lang.String createAppWithConfig(java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope, java.lang.String appConfig) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "createAppWithConfig", ApiRequestStatus.START, duration_,namespace,appId,artifactName,artifactVersion,scope,appConfig);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.createAppWithConfig);
+ try {
+ res = controller.createAppWithConfig(namespace,appId,artifactName,artifactVersion,scope,appConfig);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "createAppWithConfig", ApiRequestStatus.ERROR, duration_,namespace,appId,artifactName,artifactVersion,scope,appConfig);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "createAppWithConfig", ApiRequestStatus.OKAY, duration_,namespace,appId,artifactName,artifactVersion,scope,appConfig);
+ return res;
+ }
+
+ public java.lang.String setDatasetProperties(java.lang.String namespace, java.lang.String datasetName, java.lang.String datasetProperties) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "setDatasetProperties", ApiRequestStatus.START, duration_,namespace,datasetName,datasetProperties);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.setDatasetProperties);
+ try {
+ res = controller.setDatasetProperties(namespace,datasetName,datasetProperties);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setDatasetProperties", ApiRequestStatus.ERROR, duration_,namespace,datasetName,datasetProperties);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setDatasetProperties", ApiRequestStatus.OKAY, duration_,namespace,datasetName,datasetProperties);
+ return res;
+ }
+
+ public java.lang.String setStreamTTL(java.lang.String namespace, java.lang.String streamName, int ttlSeconds) {
+ java.lang.String res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "setStreamTTL", ApiRequestStatus.START, duration_,namespace,streamName,ttlSeconds);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.setStreamTTL);
+ try {
+ res = controller.setStreamTTL(namespace,streamName,ttlSeconds);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setStreamTTL", ApiRequestStatus.ERROR, duration_,namespace,streamName,ttlSeconds);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "setStreamTTL", ApiRequestStatus.OKAY, duration_,namespace,streamName,ttlSeconds);
+ return res;
+ }
+
+
+
+
+
+
+ @Override
+ public void start() {
+ controller.start();
+ }
+
+ public static void ecoreSetup() {
+ CdapCdapClusterProvider.ecoreSetup();
+ }
+ public CdapCdapClusterProvider getSomfProvider() {
+ return controller;
+ }
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterClient.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterClient.java
new file mode 100644
index 0000000..f24ff72
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterClient.java
@@ -0,0 +1,736 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+// Autogenerated
+// Do not edit. No need to extend this class.
+package org.openecomp.ncomp.servers.cdap;
+
+import org.openecomp.ncomp.sirius.manager.AbstractClient;
+import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient;
+import org.openecomp.ncomp.sirius.manager.GenericHttpClient;
+
+import org.apache.log4j.Logger;
+
+import org.openecomp.logger.EcompLogger;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+
+import org.openecomp.ncomp.cdap.impl.CdapClusterImpl;
+import org.openecomp.ncomp.cdap.CdapPackage;
+import org.openecomp.ncomp.servers.cdap.logging.CdapClusterOperationEnum;
+import org.openecomp.ncomp.servers.cdap.logging.CdapClusterMessageEnum;
+
+
+import org.openecomp.ncomp.servers.cdap.CdapCdapAdaptor;
+
+
+
+
+@SuppressWarnings("unchecked")
+public class CdapCdapClusterClient extends CdapClusterImpl {
+ public static final Logger logger = Logger.getLogger(CdapCdapClusterClient.class);
+ static final EcompLogger ecomplogger = EcompLogger.getEcompLogger();
+ public AbstractClient client;
+
+ public CdapCdapClusterClient(String file, String name) {
+ CdapCdapAdaptor.ecoreSetup();
+ client = new GenericHttpClient(file,name);
+ client.add("/cluster", this);
+ }
+
+ public CdapCdapClusterClient(String file, String name1, String name2) {
+ HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2);
+ client = client1.all; // requests should be forwarded to all.
+ client.add("/cluster", this);
+ }
+
+ public CdapCdapClusterClient(AbstractClient c) {
+ client = c;
+ client.add("/resources", this);
+ }
+
+
+
+
+ public void poll(String path) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_poll);
+
+ try {
+ client.operationPath(path, c, "poll", null);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_poll, e.toString());
+ throw new RuntimeException("remote call failed: poll", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+
+ }
+
+
+ public java.lang.String createNamespace(String path, java.lang.String namespace) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_createNamespace);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "createNamespace", null, namespace);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_createNamespace, e.toString());
+ throw new RuntimeException("remote call failed: createNamespace", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String deleteNamespace(String path, java.lang.String namespace) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_deleteNamespace);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "deleteNamespace", null, namespace);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_deleteNamespace, e.toString());
+ throw new RuntimeException("remote call failed: deleteNamespace", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String deployApp(String path, java.lang.String namespace, java.lang.String jarfile) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_deployApp);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "deployApp", null, namespace,jarfile);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_deployApp, e.toString());
+ throw new RuntimeException("remote call failed: deployApp", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String loadArtifact(String path, java.lang.String namespace, java.lang.String artifactName, java.lang.String jarfile, java.lang.String version) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_loadArtifact);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "loadArtifact", null, namespace,artifactName,jarfile,version);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_loadArtifact, e.toString());
+ throw new RuntimeException("remote call failed: loadArtifact", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String deleteArtifact(String path, java.lang.String namespace, java.lang.String artifactName, java.lang.String artifactVersion) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_deleteArtifact);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "deleteArtifact", null, namespace,artifactName,artifactVersion);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_deleteArtifact, e.toString());
+ throw new RuntimeException("remote call failed: deleteArtifact", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String startFlow(String path, java.lang.String namespace, java.lang.String appName, java.lang.String flowId, java.lang.String extraArgs) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_startFlow);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "startFlow", null, namespace,appName,flowId,extraArgs);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_startFlow, e.toString());
+ throw new RuntimeException("remote call failed: startFlow", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String startWorker(String path, java.lang.String namespace, java.lang.String appName, java.lang.String workerId, java.lang.String extraArgs) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_startWorker);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "startWorker", null, namespace,appName,workerId,extraArgs);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_startWorker, e.toString());
+ throw new RuntimeException("remote call failed: startWorker", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String startService(String path, java.lang.String namespace, java.lang.String appName, java.lang.String serviceId, java.lang.String extraArgs) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_startService);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "startService", null, namespace,appName,serviceId,extraArgs);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_startService, e.toString());
+ throw new RuntimeException("remote call failed: startService", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String startApp(String path, java.lang.String namespace, java.lang.String appName) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_startApp);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "startApp", null, namespace,appName);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_startApp, e.toString());
+ throw new RuntimeException("remote call failed: startApp", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String stopApp(String path, java.lang.String namespace, java.lang.String appName) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_stopApp);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "stopApp", null, namespace,appName);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_stopApp, e.toString());
+ throw new RuntimeException("remote call failed: stopApp", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String deleteApp(String path, java.lang.String namespace, java.lang.String appName) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_deleteApp);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "deleteApp", null, namespace,appName);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_deleteApp, e.toString());
+ throw new RuntimeException("remote call failed: deleteApp", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String loadPreferencesApp(String path, java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_loadPreferencesApp);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "loadPreferencesApp", null, namespace,prefsFile,appId);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_loadPreferencesApp, e.toString());
+ throw new RuntimeException("remote call failed: loadPreferencesApp", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String loadPreferencesFlow(String path, java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId, java.lang.String flowId) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_loadPreferencesFlow);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "loadPreferencesFlow", null, namespace,prefsFile,appId,flowId);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_loadPreferencesFlow, e.toString());
+ throw new RuntimeException("remote call failed: loadPreferencesFlow", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String loadPreferencesNameSpace(String path, java.lang.String namespace, java.lang.String prefsFile) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_loadPreferencesNameSpace);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "loadPreferencesNameSpace", null, namespace,prefsFile);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_loadPreferencesNameSpace, e.toString());
+ throw new RuntimeException("remote call failed: loadPreferencesNameSpace", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String setPreferencesApp(String path, java.lang.String namespace, java.lang.String prefsString, java.lang.String appId) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setPreferencesApp);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "setPreferencesApp", null, namespace,prefsString,appId);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setPreferencesApp, e.toString());
+ throw new RuntimeException("remote call failed: setPreferencesApp", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String setPreferencesFlow(String path, java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String flowId) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setPreferencesFlow);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "setPreferencesFlow", null, namespace,prefsString,appId,flowId);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setPreferencesFlow, e.toString());
+ throw new RuntimeException("remote call failed: setPreferencesFlow", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String setPreferencesWorker(String path, java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String workerId) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setPreferencesWorker);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "setPreferencesWorker", null, namespace,prefsString,appId,workerId);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setPreferencesWorker, e.toString());
+ throw new RuntimeException("remote call failed: setPreferencesWorker", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String setPreferencesService(String path, java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String serviceId) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setPreferencesService);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "setPreferencesService", null, namespace,prefsString,appId,serviceId);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setPreferencesService, e.toString());
+ throw new RuntimeException("remote call failed: setPreferencesService", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String setPreferencesNameSpace(String path, java.lang.String namespace, java.lang.String prefsString) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setPreferencesNameSpace);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "setPreferencesNameSpace", null, namespace,prefsString);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setPreferencesNameSpace, e.toString());
+ throw new RuntimeException("remote call failed: setPreferencesNameSpace", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String setFlowRunTimeArgs(String path, java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String args) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setFlowRunTimeArgs);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "setFlowRunTimeArgs", null, namespace,appId,flowId,args);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setFlowRunTimeArgs, e.toString());
+ throw new RuntimeException("remote call failed: setFlowRunTimeArgs", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String setFlowletInstances(String path, java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String flowletId, int nInstances) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setFlowletInstances);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "setFlowletInstances", null, namespace,appId,flowId,flowletId,nInstances);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setFlowletInstances, e.toString());
+ throw new RuntimeException("remote call failed: setFlowletInstances", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String stopFlow(String path, java.lang.String namespace, java.lang.String appId, java.lang.String flowId) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_stopFlow);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "stopFlow", null, namespace,appId,flowId);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_stopFlow, e.toString());
+ throw new RuntimeException("remote call failed: stopFlow", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String stopWorker(String path, java.lang.String namespace, java.lang.String appId, java.lang.String workerId) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_stopWorker);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "stopWorker", null, namespace,appId,workerId);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_stopWorker, e.toString());
+ throw new RuntimeException("remote call failed: stopWorker", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String stopService(String path, java.lang.String namespace, java.lang.String appId, java.lang.String serviceId) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_stopService);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "stopService", null, namespace,appId,serviceId);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_stopService, e.toString());
+ throw new RuntimeException("remote call failed: stopService", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String truncateDataSet(String path, java.lang.String namespace, java.lang.String datasetName) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_truncateDataSet);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "truncateDataSet", null, namespace,datasetName);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_truncateDataSet, e.toString());
+ throw new RuntimeException("remote call failed: truncateDataSet", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String deleteDataset(String path, java.lang.String namespace, java.lang.String datasetName) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_deleteDataset);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "deleteDataset", null, namespace,datasetName);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_deleteDataset, e.toString());
+ throw new RuntimeException("remote call failed: deleteDataset", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String createStream(String path, java.lang.String namespace, java.lang.String newStreamId) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_createStream);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "createStream", null, namespace,newStreamId);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_createStream, e.toString());
+ throw new RuntimeException("remote call failed: createStream", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String deleteStream(String path, java.lang.String namespace, java.lang.String streamId) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_deleteStream);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "deleteStream", null, namespace,streamId);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_deleteStream, e.toString());
+ throw new RuntimeException("remote call failed: deleteStream", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public EList<java.lang.String> getStreamEvents(String path, java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_getStreamEvents);
+ EList<java.lang.String> res;
+ try {
+ res = (EList<java.lang.String>) client.operationPath(path, c, "getStreamEvents", null, namespace,streamId,startTime,endTime,limit);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_getStreamEvents, e.toString());
+ throw new RuntimeException("remote call failed: getStreamEvents", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public EList<java.lang.String> getStreamStats(String path, java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_getStreamStats);
+ EList<java.lang.String> res;
+ try {
+ res = (EList<java.lang.String>) client.operationPath(path, c, "getStreamStats", null, namespace,streamId,startTime,endTime,limit);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_getStreamStats, e.toString());
+ throw new RuntimeException("remote call failed: getStreamStats", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String sendEventToStream(String path, java.lang.String namespace, java.lang.String streamId, java.lang.String event) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_sendEventToStream);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "sendEventToStream", null, namespace,streamId,event);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_sendEventToStream, e.toString());
+ throw new RuntimeException("remote call failed: sendEventToStream", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String trucateStream(String path, java.lang.String namespace, java.lang.String streamId) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_trucateStream);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "trucateStream", null, namespace,streamId);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_trucateStream, e.toString());
+ throw new RuntimeException("remote call failed: trucateStream", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String setStreamProperties(String path, java.lang.String namespace, java.lang.String streamId, java.lang.String propsFile) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setStreamProperties);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "setStreamProperties", null, namespace,streamId,propsFile);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setStreamProperties, e.toString());
+ throw new RuntimeException("remote call failed: setStreamProperties", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String restartApp(String path, java.lang.String namespace, java.lang.String appId, java.lang.String progTypes) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_restartApp);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "restartApp", null, namespace,appId,progTypes);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_restartApp, e.toString());
+ throw new RuntimeException("remote call failed: restartApp", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String createApp(String path, java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_createApp);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "createApp", null, namespace,appId,artifactName,artifactVersion,scope);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_createApp, e.toString());
+ throw new RuntimeException("remote call failed: createApp", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String createAppWithConfig(String path, java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope, java.lang.String appConfig) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_createAppWithConfig);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "createAppWithConfig", null, namespace,appId,artifactName,artifactVersion,scope,appConfig);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_createAppWithConfig, e.toString());
+ throw new RuntimeException("remote call failed: createAppWithConfig", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String setDatasetProperties(String path, java.lang.String namespace, java.lang.String datasetName, java.lang.String datasetProperties) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setDatasetProperties);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "setDatasetProperties", null, namespace,datasetName,datasetProperties);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setDatasetProperties, e.toString());
+ throw new RuntimeException("remote call failed: setDatasetProperties", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+
+ public java.lang.String setStreamTTL(String path, java.lang.String namespace, java.lang.String streamName, int ttlSeconds) {
+ EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setStreamTTL);
+ java.lang.String res;
+ try {
+ res = (java.lang.String) client.operationPath(path, c, "setStreamTTL", null, namespace,streamName,ttlSeconds);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setStreamTTL, e.toString());
+ throw new RuntimeException("remote call failed: setStreamTTL", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterConsole.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterConsole.java
new file mode 100644
index 0000000..e1a7363
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterConsole.java
@@ -0,0 +1,486 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+// Autogenerated
+// Do not edit but extend this class as needed
+package org.openecomp.ncomp.servers.cdap;
+
+
+import org.apache.log4j.Logger;
+import org.eclipse.emf.common.util.EList;
+
+import org.openecomp.ncomp.sirius.manager.console.Console;
+import org.openecomp.ncomp.sirius.manager.AbstractClient;
+import org.openecomp.ncomp.sirius.manager.ManagementServerError;
+
+
+
+
+public class CdapCdapClusterConsole extends Console {
+ public static final Logger logger = Logger.getLogger(CdapCdapClusterConsole.class);
+ protected CdapCdapClusterClient controller;
+
+
+
+
+ public CdapCdapClusterConsole(String filename, String name) {
+ super(filename, name);
+ controller = new CdapCdapClusterClient(filename,name);
+ client = controller.client;
+
+ }
+
+ public CdapCdapClusterConsole(AbstractClient c) {
+ controller = new CdapCdapClusterClient(c);
+ client = controller.client;
+ }
+
+
+ public void poll(String path) {
+
+ try {
+ controller.poll(path);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+
+ }
+
+ public java.lang.String createNamespace(String path, java.lang.String namespace) {
+ java.lang.String res = null;
+ try {
+ res = controller.createNamespace(path,namespace);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String deleteNamespace(String path, java.lang.String namespace) {
+ java.lang.String res = null;
+ try {
+ res = controller.deleteNamespace(path,namespace);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String deployApp(String path, java.lang.String namespace, java.lang.String jarfile) {
+ java.lang.String res = null;
+ try {
+ res = controller.deployApp(path,namespace,jarfile);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String loadArtifact(String path, java.lang.String namespace, java.lang.String artifactName, java.lang.String jarfile, java.lang.String version) {
+ java.lang.String res = null;
+ try {
+ res = controller.loadArtifact(path,namespace,artifactName,jarfile,version);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String deleteArtifact(String path, java.lang.String namespace, java.lang.String artifactName, java.lang.String artifactVersion) {
+ java.lang.String res = null;
+ try {
+ res = controller.deleteArtifact(path,namespace,artifactName,artifactVersion);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String startFlow(String path, java.lang.String namespace, java.lang.String appName, java.lang.String flowId, java.lang.String extraArgs) {
+ java.lang.String res = null;
+ try {
+ res = controller.startFlow(path,namespace,appName,flowId,extraArgs);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String startWorker(String path, java.lang.String namespace, java.lang.String appName, java.lang.String workerId, java.lang.String extraArgs) {
+ java.lang.String res = null;
+ try {
+ res = controller.startWorker(path,namespace,appName,workerId,extraArgs);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String startService(String path, java.lang.String namespace, java.lang.String appName, java.lang.String serviceId, java.lang.String extraArgs) {
+ java.lang.String res = null;
+ try {
+ res = controller.startService(path,namespace,appName,serviceId,extraArgs);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String startApp(String path, java.lang.String namespace, java.lang.String appName) {
+ java.lang.String res = null;
+ try {
+ res = controller.startApp(path,namespace,appName);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String stopApp(String path, java.lang.String namespace, java.lang.String appName) {
+ java.lang.String res = null;
+ try {
+ res = controller.stopApp(path,namespace,appName);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String deleteApp(String path, java.lang.String namespace, java.lang.String appName) {
+ java.lang.String res = null;
+ try {
+ res = controller.deleteApp(path,namespace,appName);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String loadPreferencesApp(String path, java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId) {
+ java.lang.String res = null;
+ try {
+ res = controller.loadPreferencesApp(path,namespace,prefsFile,appId);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String loadPreferencesFlow(String path, java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId, java.lang.String flowId) {
+ java.lang.String res = null;
+ try {
+ res = controller.loadPreferencesFlow(path,namespace,prefsFile,appId,flowId);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String loadPreferencesNameSpace(String path, java.lang.String namespace, java.lang.String prefsFile) {
+ java.lang.String res = null;
+ try {
+ res = controller.loadPreferencesNameSpace(path,namespace,prefsFile);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String setPreferencesApp(String path, java.lang.String namespace, java.lang.String prefsString, java.lang.String appId) {
+ java.lang.String res = null;
+ try {
+ res = controller.setPreferencesApp(path,namespace,prefsString,appId);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String setPreferencesFlow(String path, java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String flowId) {
+ java.lang.String res = null;
+ try {
+ res = controller.setPreferencesFlow(path,namespace,prefsString,appId,flowId);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String setPreferencesWorker(String path, java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String workerId) {
+ java.lang.String res = null;
+ try {
+ res = controller.setPreferencesWorker(path,namespace,prefsString,appId,workerId);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String setPreferencesService(String path, java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String serviceId) {
+ java.lang.String res = null;
+ try {
+ res = controller.setPreferencesService(path,namespace,prefsString,appId,serviceId);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String setPreferencesNameSpace(String path, java.lang.String namespace, java.lang.String prefsString) {
+ java.lang.String res = null;
+ try {
+ res = controller.setPreferencesNameSpace(path,namespace,prefsString);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String setFlowRunTimeArgs(String path, java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String args) {
+ java.lang.String res = null;
+ try {
+ res = controller.setFlowRunTimeArgs(path,namespace,appId,flowId,args);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String setFlowletInstances(String path, java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String flowletId, int nInstances) {
+ java.lang.String res = null;
+ try {
+ res = controller.setFlowletInstances(path,namespace,appId,flowId,flowletId,nInstances);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String stopFlow(String path, java.lang.String namespace, java.lang.String appId, java.lang.String flowId) {
+ java.lang.String res = null;
+ try {
+ res = controller.stopFlow(path,namespace,appId,flowId);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String stopWorker(String path, java.lang.String namespace, java.lang.String appId, java.lang.String workerId) {
+ java.lang.String res = null;
+ try {
+ res = controller.stopWorker(path,namespace,appId,workerId);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String stopService(String path, java.lang.String namespace, java.lang.String appId, java.lang.String serviceId) {
+ java.lang.String res = null;
+ try {
+ res = controller.stopService(path,namespace,appId,serviceId);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String truncateDataSet(String path, java.lang.String namespace, java.lang.String datasetName) {
+ java.lang.String res = null;
+ try {
+ res = controller.truncateDataSet(path,namespace,datasetName);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String deleteDataset(String path, java.lang.String namespace, java.lang.String datasetName) {
+ java.lang.String res = null;
+ try {
+ res = controller.deleteDataset(path,namespace,datasetName);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String createStream(String path, java.lang.String namespace, java.lang.String newStreamId) {
+ java.lang.String res = null;
+ try {
+ res = controller.createStream(path,namespace,newStreamId);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String deleteStream(String path, java.lang.String namespace, java.lang.String streamId) {
+ java.lang.String res = null;
+ try {
+ res = controller.deleteStream(path,namespace,streamId);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public EList<java.lang.String> getStreamEvents(String path, java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) {
+ EList<java.lang.String> res = null;
+ try {
+ res = controller.getStreamEvents(path,namespace,streamId,startTime,endTime,limit);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public EList<java.lang.String> getStreamStats(String path, java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) {
+ EList<java.lang.String> res = null;
+ try {
+ res = controller.getStreamStats(path,namespace,streamId,startTime,endTime,limit);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String sendEventToStream(String path, java.lang.String namespace, java.lang.String streamId, java.lang.String event) {
+ java.lang.String res = null;
+ try {
+ res = controller.sendEventToStream(path,namespace,streamId,event);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String trucateStream(String path, java.lang.String namespace, java.lang.String streamId) {
+ java.lang.String res = null;
+ try {
+ res = controller.trucateStream(path,namespace,streamId);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String setStreamProperties(String path, java.lang.String namespace, java.lang.String streamId, java.lang.String propsFile) {
+ java.lang.String res = null;
+ try {
+ res = controller.setStreamProperties(path,namespace,streamId,propsFile);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String restartApp(String path, java.lang.String namespace, java.lang.String appId, java.lang.String progTypes) {
+ java.lang.String res = null;
+ try {
+ res = controller.restartApp(path,namespace,appId,progTypes);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String createApp(String path, java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope) {
+ java.lang.String res = null;
+ try {
+ res = controller.createApp(path,namespace,appId,artifactName,artifactVersion,scope);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String createAppWithConfig(String path, java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope, java.lang.String appConfig) {
+ java.lang.String res = null;
+ try {
+ res = controller.createAppWithConfig(path,namespace,appId,artifactName,artifactVersion,scope,appConfig);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String setDatasetProperties(String path, java.lang.String namespace, java.lang.String datasetName, java.lang.String datasetProperties) {
+ java.lang.String res = null;
+ try {
+ res = controller.setDatasetProperties(path,namespace,datasetName,datasetProperties);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public java.lang.String setStreamTTL(String path, java.lang.String namespace, java.lang.String streamName, int ttlSeconds) {
+ java.lang.String res = null;
+ try {
+ res = controller.setStreamTTL(path,namespace,streamName,ttlSeconds);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProviderTemplate.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProviderTemplate.java
new file mode 100644
index 0000000..f25f9a9
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProviderTemplate.java
@@ -0,0 +1,299 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+
+package org.openecomp.ncomp.servers.cdap;
+
+
+
+
+
+import java.io.InputStream;
+
+import org.openecomp.ncomp.sirius.manager.IRequestHandler;
+import org.openecomp.ncomp.sirius.manager.ISiriusPlugin;
+import org.openecomp.ncomp.sirius.manager.ISiriusServer;
+import org.openecomp.ncomp.sirius.function.FunctionUtils;
+
+import org.apache.log4j.Logger;
+import org.eclipse.emf.common.util.EList;
+import org.json.JSONObject;
+
+
+
+import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider;
+
+
+import org.openecomp.ncomp.cdap.impl.CdapClusterImpl;
+import org.openecomp.ncomp.cdap.CdapCluster;
+
+
+public class CdapCdapClusterProviderTemplate extends BasicAdaptorProvider {
+ private static final Logger logger = Logger.getLogger(CdapCdapClusterProviderTemplate.class);
+ CdapCluster o;
+
+ public CdapCdapClusterProviderTemplate(ISiriusServer controller, CdapCluster o) {
+ super(controller, o);
+ this.o = o;
+ }
+
+ public void poll() {
+
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String createNamespace(java.lang.String namespace) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String deleteNamespace(java.lang.String namespace) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String deployApp(java.lang.String namespace, java.lang.String jarfile) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String loadArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String jarfile, java.lang.String version) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String deleteArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String artifactVersion) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String startFlow(java.lang.String namespace, java.lang.String appName, java.lang.String flowId, java.lang.String extraArgs) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String startWorker(java.lang.String namespace, java.lang.String appName, java.lang.String workerId, java.lang.String extraArgs) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String startService(java.lang.String namespace, java.lang.String appName, java.lang.String serviceId, java.lang.String extraArgs) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String startApp(java.lang.String namespace, java.lang.String appName) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String stopApp(java.lang.String namespace, java.lang.String appName) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String deleteApp(java.lang.String namespace, java.lang.String appName) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String loadPreferencesApp(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String loadPreferencesFlow(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId, java.lang.String flowId) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String loadPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsFile) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String setPreferencesApp(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String setPreferencesFlow(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String flowId) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String setPreferencesWorker(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String workerId) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String setPreferencesService(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String serviceId) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String setPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsString) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String setFlowRunTimeArgs(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String args) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String setFlowletInstances(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String flowletId, int nInstances) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String stopFlow(java.lang.String namespace, java.lang.String appId, java.lang.String flowId) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String stopWorker(java.lang.String namespace, java.lang.String appId, java.lang.String workerId) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String stopService(java.lang.String namespace, java.lang.String appId, java.lang.String serviceId) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String truncateDataSet(java.lang.String namespace, java.lang.String datasetName) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String deleteDataset(java.lang.String namespace, java.lang.String datasetName) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String createStream(java.lang.String namespace, java.lang.String newStreamId) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String deleteStream(java.lang.String namespace, java.lang.String streamId) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public EList<java.lang.String> getStreamEvents(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) {
+ EList<java.lang.String> res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public EList<java.lang.String> getStreamStats(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) {
+ EList<java.lang.String> res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String sendEventToStream(java.lang.String namespace, java.lang.String streamId, java.lang.String event) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String trucateStream(java.lang.String namespace, java.lang.String streamId) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String setStreamProperties(java.lang.String namespace, java.lang.String streamId, java.lang.String propsFile) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String restartApp(java.lang.String namespace, java.lang.String appId, java.lang.String progTypes) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String createApp(java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String createAppWithConfig(java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope, java.lang.String appConfig) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String setDatasetProperties(java.lang.String namespace, java.lang.String datasetName, java.lang.String datasetProperties) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+ public java.lang.String setStreamTTL(java.lang.String namespace, java.lang.String streamName, int ttlSeconds) {
+ java.lang.String res = null;
+ // TODO IMPLEMENT
+ throw new UnsupportedOperationException();
+ }
+
+
+
+
+
+
+
+
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapFactory.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapFactory.java
new file mode 100644
index 0000000..db21a51
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapFactory.java
@@ -0,0 +1,60 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+// Autogenerated
+// Do not edit. No need to extend this class.
+package org.openecomp.ncomp.servers.cdap;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.apache.log4j.Logger;
+
+import org.openecomp.ncomp.sirius.manager.ISiriusServer;
+
+import org.openecomp.ncomp.cdap.CdapAdaptor;
+import org.openecomp.ncomp.cdap.CdapPackage;
+import org.openecomp.ncomp.cdap.impl.CdapFactoryImpl;
+
+
+
+
+import org.openecomp.ncomp.cdap.CdapCluster;
+
+public class CdapCdapFactory extends CdapFactoryImpl {
+ public static final Logger logger = Logger.getLogger(CdapCdapFactory.class);
+ ISiriusServer server = null;
+ @Override
+ public EPackage getEPackage() { return CdapPackage.eINSTANCE; }
+ public CdapCdapFactory(ISiriusServer server) {
+ this.server = server;
+ }
+ @Override
+ public CdapAdaptor createCdapAdaptor() {
+ return new CdapCdapAdaptor(server);
+ }
+
+
+ @Override
+ public CdapCluster createCdapCluster() {
+ return new CdapCdapCluster(server);
+ }
+
+
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApi.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApi.java
new file mode 100644
index 0000000..26b8604
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApi.java
@@ -0,0 +1,256 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+// Autogenerated
+// Do not edit. No need to extend this class.
+package org.openecomp.ncomp.servers.cdap.gui;
+
+
+
+import java.io.InputStream;
+
+import org.openecomp.ncomp.sirius.manager.IRequestHandler;
+import org.openecomp.ncomp.sirius.manager.ISiriusPlugin;
+import org.openecomp.ncomp.sirius.manager.ISiriusServer;
+import org.openecomp.ncomp.sirius.function.FunctionUtils;
+import org.openecomp.ncomp.component.ApiRequestStatus;
+
+import org.apache.log4j.Logger;
+
+import org.openecomp.logger.EcompLogger;
+
+import org.eclipse.emf.common.util.EList;
+import org.json.JSONObject;
+
+import java.util.Date;
+
+import org.openecomp.ncomp.servers.cdap.gui.logging.GuiClientApiOperationEnum;
+
+
+
+
+
+
+
+import org.openecomp.ncomp.sirius.gui.tools.*;
+
+
+
+
+
+import org.openecomp.ncomp.gwt.siriusportal.model.*;
+
+
+
+
+
+import org.openecomp.ncomp.sirius.manager.Subject;
+
+
+
+
+
+import org.openecomp.ncomp.sirius.manager.ManagementServer;
+
+
+
+
+
+import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer;
+
+
+import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl;
+
+
+
+public class CdapGuiClientApi extends GuiClientApiImpl {
+ public static final Logger logger = Logger.getLogger(CdapGuiClientApi.class);
+ static final EcompLogger ecomplogger = EcompLogger.getEcompLogger();
+ public CdapGuiClientApiProvider controller;
+ ISiriusServer server;
+
+ public CdapGuiClientApi(ISiriusServer server) {
+ this.server = server;
+ this.controller = new CdapGuiClientApiProvider(server,this);
+ }
+
+ public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() {
+ org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.START, duration_);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(GuiClientApiOperationEnum.getTree);
+ try {
+ res = controller.getTree();
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.ERROR, duration_);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.OKAY, duration_);
+ return res;
+ }
+
+ public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) {
+ org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.START, duration_,path);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(GuiClientApiOperationEnum.getObject);
+ try {
+ res = controller.getObject(path);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.ERROR, duration_,path);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.OKAY, duration_,path);
+ return res;
+ }
+
+ public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) {
+ org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.START, duration_,path,start,end,duration);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(GuiClientApiOperationEnum.getTimeSerie);
+ try {
+ res = controller.getTimeSerie(path,start,end,duration);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.ERROR, duration_,path,start,end,duration);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.OKAY, duration_,path,start,end,duration);
+ return res;
+ }
+
+ public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) {
+ org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.START, duration_,path,start,end);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(GuiClientApiOperationEnum.getTable);
+ try {
+ res = controller.getTable(path,start,end);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.ERROR, duration_,path,start,end);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.OKAY, duration_,path,start,end);
+ return res;
+ }
+
+ public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) {
+ org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.START, duration_,path,start,end);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(GuiClientApiOperationEnum.getHtml);
+ try {
+ res = controller.getHtml(path,start,end);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.ERROR, duration_,path,start,end);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.OKAY, duration_,path,start,end);
+ return res;
+ }
+
+ public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) {
+ org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null;
+ long duration_ = 0;
+ if (server != null)
+ server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.START, duration_,path,start,end);
+ Date now_ = new Date();
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(GuiClientApiOperationEnum.getGraph);
+ try {
+ res = controller.getGraph(path,start,end);
+ }
+ catch (Exception e) {
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.ERROR, duration_,path,start,end);
+ System.err.println("ERROR: " + e);
+ throw e;
+ }
+ ecomplogger.recordMetricEventEnd();
+ duration_ = new Date().getTime()-now_.getTime();
+ if (server != null)
+ server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.OKAY, duration_,path,start,end);
+ return res;
+ }
+
+
+
+
+
+
+ public static void ecoreSetup() {
+ CdapGuiClientApiProvider.ecoreSetup();
+ }
+ public CdapGuiClientApiProvider getSomfProvider() {
+ return controller;
+ }
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiClient.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiClient.java
new file mode 100644
index 0000000..7a2e601
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiClient.java
@@ -0,0 +1,175 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+// Autogenerated
+// Do not edit. No need to extend this class.
+package org.openecomp.ncomp.servers.cdap.gui;
+
+import org.openecomp.ncomp.sirius.manager.AbstractClient;
+import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient;
+import org.openecomp.ncomp.sirius.manager.GenericHttpClient;
+
+import org.apache.log4j.Logger;
+
+import org.openecomp.logger.EcompLogger;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+
+import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl;
+import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage;
+import org.openecomp.ncomp.servers.cdap.gui.logging.GuiClientApiOperationEnum;
+import org.openecomp.ncomp.servers.cdap.gui.logging.GuiClientApiMessageEnum;
+
+
+import org.openecomp.ncomp.servers.cdap.CdapCdapAdaptor;
+
+
+
+
+@SuppressWarnings("unchecked")
+public class CdapGuiClientApiClient extends GuiClientApiImpl {
+ public static final Logger logger = Logger.getLogger(CdapGuiClientApiClient.class);
+ static final EcompLogger ecomplogger = EcompLogger.getEcompLogger();
+ public AbstractClient client;
+
+ public CdapGuiClientApiClient(String file, String name) {
+ CdapCdapAdaptor.ecoreSetup();
+ client = new GenericHttpClient(file,name);
+ client.add("/gui", this);
+ }
+
+ public CdapGuiClientApiClient(String file, String name1, String name2) {
+ HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2);
+ client = client1.all; // requests should be forwarded to all.
+ client.add("/gui", this);
+ }
+
+ public CdapGuiClientApiClient(AbstractClient c) {
+ client = c;
+ client.add("/resources", this);
+ }
+
+
+
+ @Override
+ public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() {
+ EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTree);
+ org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res;
+ try {
+ res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTree) client.operationPath("/gui", c, "getTree", null);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTree, e.toString());
+ throw new RuntimeException("remote call failed: getTree", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+ @Override
+ public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) {
+ EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getObject);
+ org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res;
+ try {
+ res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiObject) client.operationPath("/gui", c, "getObject", null, path);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getObject, e.toString());
+ throw new RuntimeException("remote call failed: getObject", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+ @Override
+ public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) {
+ EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTimeSerie);
+ org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res;
+ try {
+ res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie) client.operationPath("/gui", c, "getTimeSerie", null, path,start,end,duration);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTimeSerie, e.toString());
+ throw new RuntimeException("remote call failed: getTimeSerie", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+ @Override
+ public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) {
+ EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTable);
+ org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res;
+ try {
+ res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTable) client.operationPath("/gui", c, "getTable", null, path,start,end);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTable, e.toString());
+ throw new RuntimeException("remote call failed: getTable", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+ @Override
+ public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) {
+ EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getHtml);
+ org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res;
+ try {
+ res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml) client.operationPath("/gui", c, "getHtml", null, path,start,end);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getHtml, e.toString());
+ throw new RuntimeException("remote call failed: getHtml", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+ @Override
+ public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) {
+ EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo
+ ecomplogger.recordMetricEventStart();
+ ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getGraph);
+ org.openecomp.ncomp.sirius.manager.graph.GuiGraph res;
+ try {
+ res = (org.openecomp.ncomp.sirius.manager.graph.GuiGraph) client.operationPath("/gui", c, "getGraph", null, path,start,end);
+ }
+ catch (Exception e) {
+ ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getGraph, e.toString());
+ throw new RuntimeException("remote call failed: getGraph", e);
+ }
+ ecomplogger.recordMetricEventEnd();
+ return res;
+ }
+
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiConsole.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiConsole.java
new file mode 100644
index 0000000..5473e7c
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiConsole.java
@@ -0,0 +1,123 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+// Autogenerated
+// Do not edit but extend this class as needed
+package org.openecomp.ncomp.servers.cdap.gui;
+
+
+import org.apache.log4j.Logger;
+import org.eclipse.emf.common.util.EList;
+
+import org.openecomp.ncomp.sirius.manager.console.Console;
+import org.openecomp.ncomp.sirius.manager.AbstractClient;
+import org.openecomp.ncomp.sirius.manager.ManagementServerError;
+
+
+
+
+public class CdapGuiClientApiConsole extends Console {
+ public static final Logger logger = Logger.getLogger(CdapGuiClientApiConsole.class);
+ protected CdapGuiClientApiClient controller;
+
+
+
+
+ public CdapGuiClientApiConsole(String filename, String name) {
+ super(filename, name);
+ controller = new CdapGuiClientApiClient(filename,name);
+ client = controller.client;
+
+ }
+
+ public CdapGuiClientApiConsole(AbstractClient c) {
+ controller = new CdapGuiClientApiClient(c);
+ client = controller.client;
+ }
+
+
+ public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() {
+ org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null;
+ try {
+ res = controller.getTree();
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) {
+ org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null;
+ try {
+ res = controller.getObject(path);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) {
+ org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null;
+ try {
+ res = controller.getTimeSerie(path,start,end,duration);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) {
+ org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null;
+ try {
+ res = controller.getTable(path,start,end);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) {
+ org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null;
+ try {
+ res = controller.getHtml(path,start,end);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+ public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) {
+ org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null;
+ try {
+ res = controller.getGraph(path,start,end);
+ }
+ catch (ManagementServerError e) {
+ System.err.println("ERROR: " + e.getJson().toString(2));
+ }
+ return res;
+ }
+
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiProviderTemplate.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiProviderTemplate.java
new file mode 100644
index 0000000..d39b826
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiProviderTemplate.java
@@ -0,0 +1,78 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+
+package org.openecomp.ncomp.servers.cdap.gui;
+
+
+
+
+
+import java.io.InputStream;
+
+import org.openecomp.ncomp.sirius.manager.IRequestHandler;
+import org.openecomp.ncomp.sirius.manager.ISiriusPlugin;
+import org.openecomp.ncomp.sirius.manager.ISiriusServer;
+import org.openecomp.ncomp.sirius.function.FunctionUtils;
+
+import org.apache.log4j.Logger;
+import org.eclipse.emf.common.util.EList;
+import org.json.JSONObject;
+
+
+
+import org.openecomp.ncomp.sirius.gui.tools.*;
+
+
+import org.openecomp.ncomp.gwt.siriusportal.model.*;
+
+
+import org.openecomp.ncomp.sirius.manager.Subject;
+
+
+import org.openecomp.ncomp.sirius.manager.ManagementServer;
+
+
+import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer;
+
+
+import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider;
+
+
+import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl;
+import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi;
+
+
+public class CdapGuiClientApiProviderTemplate extends BasicGuiClientApiProvider {
+ private static final Logger logger = Logger.getLogger(CdapGuiClientApiProviderTemplate.class);
+ GuiClientApi o;
+
+ public CdapGuiClientApiProviderTemplate(ISiriusServer controller, GuiClientApi o) {
+ super(controller, o);
+ this.o = o;
+ }
+
+
+
+
+
+
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapModelFactory.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapModelFactory.java
new file mode 100644
index 0000000..f66ec21
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapModelFactory.java
@@ -0,0 +1,54 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+// Autogenerated
+// Do not edit. No need to extend this class.
+package org.openecomp.ncomp.servers.cdap.gui;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.apache.log4j.Logger;
+
+import org.openecomp.ncomp.sirius.manager.ISiriusServer;
+
+import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi;
+import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage;
+import org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelFactoryImpl;
+
+import org.openecomp.ncomp.servers.cdap.CdapCdapAdaptorServer;
+
+
+
+public class CdapModelFactory extends ModelFactoryImpl {
+ public static final Logger logger = Logger.getLogger(CdapModelFactory.class);
+ ISiriusServer server = null;
+ @Override
+ public EPackage getEPackage() { return ModelPackage.eINSTANCE; }
+ public CdapModelFactory(ISiriusServer server) {
+ this.server = server;
+ }
+ @Override
+ public GuiClientApi createGuiClientApi() {
+ return new CdapGuiClientApi(server);
+ }
+
+
+
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApi.properties b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApi.properties
new file mode 100644
index 0000000..8705ab8
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApi.properties
@@ -0,0 +1,78 @@
+
+dummy=\
+ null|\
+ null|\
+ null|\
+ null
+
+getTree=\
+ getTree-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+getObject=\
+ getObject-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+getTimeSerie=\
+ getTimeSerie-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+getTable=\
+ getTable-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+getHtml=\
+ getHtml-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+getGraph=\
+ getGraph-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+REMOTE_getTree=\
+ REMOTE-getTree-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_getObject=\
+ REMOTE-getObject-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_getTimeSerie=\
+ REMOTE-getTimeSerie-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_getTable=\
+ REMOTE-getTable-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_getHtml=\
+ REMOTE-getHtml-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_getGraph=\
+ REMOTE-getGraph-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApiMessageEnum.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApiMessageEnum.java
new file mode 100644
index 0000000..670c327
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApiMessageEnum.java
@@ -0,0 +1,47 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+
+package org.openecomp.ncomp.servers.cdap.gui.logging;
+
+import com.att.eelf.i18n.EELFResourceManager;
+import org.openecomp.logger.EcompMessageEnum;
+
+public enum GuiClientApiMessageEnum implements EcompMessageEnum {
+
+ dummy,
+ getTree,
+ getObject,
+ getTimeSerie,
+ getTable,
+ getHtml,
+ getGraph,
+ REMOTE_getTree,
+ REMOTE_getObject,
+ REMOTE_getTimeSerie,
+ REMOTE_getTable,
+ REMOTE_getHtml,
+ REMOTE_getGraph;
+
+ static {
+ EELFResourceManager.loadMessageBundle("org.openecomp.ncomp.servers.cdap.gui.logging.GuiClientApi");
+ }
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApiOperationEnum.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApiOperationEnum.java
new file mode 100644
index 0000000..0be34d7
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApiOperationEnum.java
@@ -0,0 +1,41 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+
+package org.openecomp.ncomp.servers.cdap.gui.logging;
+
+import org.openecomp.entity.EcompOperationEnum;
+
+public enum GuiClientApiOperationEnum implements EcompOperationEnum {
+
+ getTree,
+ getObject,
+ getTimeSerie,
+ getTable,
+ getHtml,
+ getGraph,
+ REMOTE_getTree,
+ REMOTE_getObject,
+ REMOTE_getTimeSerie,
+ REMOTE_getTable,
+ REMOTE_getHtml,
+ REMOTE_getGraph;
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptor.properties b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptor.properties
new file mode 100644
index 0000000..555c4fc
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptor.properties
@@ -0,0 +1,6 @@
+
+dummy=\
+ null|\
+ null|\
+ null|\
+ null
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptorMessageEnum.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptorMessageEnum.java
new file mode 100644
index 0000000..935f1cd
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptorMessageEnum.java
@@ -0,0 +1,35 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+
+package org.openecomp.ncomp.servers.cdap.logging;
+
+import com.att.eelf.i18n.EELFResourceManager;
+import org.openecomp.logger.EcompMessageEnum;
+
+public enum CdapAdaptorMessageEnum implements EcompMessageEnum {
+
+ dummy;
+
+ static {
+ EELFResourceManager.loadMessageBundle("org.openecomp.ncomp.servers.cdap.logging.CdapAdaptor");
+ }
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptorOperationEnum.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptorOperationEnum.java
new file mode 100644
index 0000000..3260c81
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptorOperationEnum.java
@@ -0,0 +1,29 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+
+package org.openecomp.ncomp.servers.cdap.logging;
+
+import org.openecomp.entity.EcompOperationEnum;
+
+public enum CdapAdaptorOperationEnum implements EcompOperationEnum {
+
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapCluster.properties b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapCluster.properties
new file mode 100644
index 0000000..b367850
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapCluster.properties
@@ -0,0 +1,474 @@
+
+dummy=\
+ null|\
+ null|\
+ null|\
+ null
+
+createNamespace=\
+ createNamespace-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+deleteNamespace=\
+ deleteNamespace-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+deployApp=\
+ deployApp-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+loadArtifact=\
+ loadArtifact-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+deleteArtifact=\
+ deleteArtifact-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+startFlow=\
+ startFlow-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+startWorker=\
+ startWorker-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+startService=\
+ startService-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+startApp=\
+ startApp-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+stopApp=\
+ stopApp-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+deleteApp=\
+ deleteApp-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+loadPreferencesApp=\
+ loadPreferencesApp-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+loadPreferencesFlow=\
+ loadPreferencesFlow-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+loadPreferencesNameSpace=\
+ loadPreferencesNameSpace-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+setPreferencesApp=\
+ setPreferencesApp-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+setPreferencesFlow=\
+ setPreferencesFlow-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+setPreferencesWorker=\
+ setPreferencesWorker-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+setPreferencesService=\
+ setPreferencesService-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+setPreferencesNameSpace=\
+ setPreferencesNameSpace-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+setFlowRunTimeArgs=\
+ setFlowRunTimeArgs-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+setFlowletInstances=\
+ setFlowletInstances-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+stopFlow=\
+ stopFlow-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+stopWorker=\
+ stopWorker-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+stopService=\
+ stopService-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+truncateDataSet=\
+ truncateDataSet-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+deleteDataset=\
+ deleteDataset-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+createStream=\
+ createStream-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+deleteStream=\
+ deleteStream-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+getStreamEvents=\
+ getStreamEvents-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+getStreamStats=\
+ getStreamStats-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+sendEventToStream=\
+ sendEventToStream-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+trucateStream=\
+ trucateStream-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+setStreamProperties=\
+ setStreamProperties-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+restartApp=\
+ restartApp-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+createApp=\
+ createApp-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+createAppWithConfig=\
+ createAppWithConfig-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+setDatasetProperties=\
+ setDatasetProperties-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+setStreamTTL=\
+ setStreamTTL-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+poll=\
+ poll-FAILED-5001W|\
+ {0}|\
+ null|\
+ Operation Failed with Exception
+
+REMOTE_createNamespace=\
+ REMOTE-createNamespace-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_deleteNamespace=\
+ REMOTE-deleteNamespace-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_deployApp=\
+ REMOTE-deployApp-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_loadArtifact=\
+ REMOTE-loadArtifact-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_deleteArtifact=\
+ REMOTE-deleteArtifact-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_startFlow=\
+ REMOTE-startFlow-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_startWorker=\
+ REMOTE-startWorker-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_startService=\
+ REMOTE-startService-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_startApp=\
+ REMOTE-startApp-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_stopApp=\
+ REMOTE-stopApp-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_deleteApp=\
+ REMOTE-deleteApp-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_loadPreferencesApp=\
+ REMOTE-loadPreferencesApp-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_loadPreferencesFlow=\
+ REMOTE-loadPreferencesFlow-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_loadPreferencesNameSpace=\
+ REMOTE-loadPreferencesNameSpace-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_setPreferencesApp=\
+ REMOTE-setPreferencesApp-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_setPreferencesFlow=\
+ REMOTE-setPreferencesFlow-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_setPreferencesWorker=\
+ REMOTE-setPreferencesWorker-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_setPreferencesService=\
+ REMOTE-setPreferencesService-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_setPreferencesNameSpace=\
+ REMOTE-setPreferencesNameSpace-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_setFlowRunTimeArgs=\
+ REMOTE-setFlowRunTimeArgs-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_setFlowletInstances=\
+ REMOTE-setFlowletInstances-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_stopFlow=\
+ REMOTE-stopFlow-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_stopWorker=\
+ REMOTE-stopWorker-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_stopService=\
+ REMOTE-stopService-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_truncateDataSet=\
+ REMOTE-truncateDataSet-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_deleteDataset=\
+ REMOTE-deleteDataset-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_createStream=\
+ REMOTE-createStream-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_deleteStream=\
+ REMOTE-deleteStream-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_getStreamEvents=\
+ REMOTE-getStreamEvents-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_getStreamStats=\
+ REMOTE-getStreamStats-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_sendEventToStream=\
+ REMOTE-sendEventToStream-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_trucateStream=\
+ REMOTE-trucateStream-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_setStreamProperties=\
+ REMOTE-setStreamProperties-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_restartApp=\
+ REMOTE-restartApp-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_createApp=\
+ REMOTE-createApp-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_createAppWithConfig=\
+ REMOTE-createAppWithConfig-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_setDatasetProperties=\
+ REMOTE-setDatasetProperties-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_setStreamTTL=\
+ REMOTE-setStreamTTL-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
+
+REMOTE_poll=\
+ REMOTE-poll-FAILED-5001W|\
+ {0}|\
+ null|\
+ Remote Operation Failed with Exception
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapClusterMessageEnum.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapClusterMessageEnum.java
new file mode 100644
index 0000000..49490a7
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapClusterMessageEnum.java
@@ -0,0 +1,113 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+
+package org.openecomp.ncomp.servers.cdap.logging;
+
+import com.att.eelf.i18n.EELFResourceManager;
+import org.openecomp.logger.EcompMessageEnum;
+
+public enum CdapClusterMessageEnum implements EcompMessageEnum {
+
+ dummy,
+ createNamespace,
+ deleteNamespace,
+ deployApp,
+ loadArtifact,
+ deleteArtifact,
+ startFlow,
+ startWorker,
+ startService,
+ startApp,
+ stopApp,
+ deleteApp,
+ loadPreferencesApp,
+ loadPreferencesFlow,
+ loadPreferencesNameSpace,
+ setPreferencesApp,
+ setPreferencesFlow,
+ setPreferencesWorker,
+ setPreferencesService,
+ setPreferencesNameSpace,
+ setFlowRunTimeArgs,
+ setFlowletInstances,
+ stopFlow,
+ stopWorker,
+ stopService,
+ truncateDataSet,
+ deleteDataset,
+ createStream,
+ deleteStream,
+ getStreamEvents,
+ getStreamStats,
+ sendEventToStream,
+ trucateStream,
+ setStreamProperties,
+ restartApp,
+ createApp,
+ createAppWithConfig,
+ setDatasetProperties,
+ setStreamTTL,
+ poll,
+ REMOTE_createNamespace,
+ REMOTE_deleteNamespace,
+ REMOTE_deployApp,
+ REMOTE_loadArtifact,
+ REMOTE_deleteArtifact,
+ REMOTE_startFlow,
+ REMOTE_startWorker,
+ REMOTE_startService,
+ REMOTE_startApp,
+ REMOTE_stopApp,
+ REMOTE_deleteApp,
+ REMOTE_loadPreferencesApp,
+ REMOTE_loadPreferencesFlow,
+ REMOTE_loadPreferencesNameSpace,
+ REMOTE_setPreferencesApp,
+ REMOTE_setPreferencesFlow,
+ REMOTE_setPreferencesWorker,
+ REMOTE_setPreferencesService,
+ REMOTE_setPreferencesNameSpace,
+ REMOTE_setFlowRunTimeArgs,
+ REMOTE_setFlowletInstances,
+ REMOTE_stopFlow,
+ REMOTE_stopWorker,
+ REMOTE_stopService,
+ REMOTE_truncateDataSet,
+ REMOTE_deleteDataset,
+ REMOTE_createStream,
+ REMOTE_deleteStream,
+ REMOTE_getStreamEvents,
+ REMOTE_getStreamStats,
+ REMOTE_sendEventToStream,
+ REMOTE_trucateStream,
+ REMOTE_setStreamProperties,
+ REMOTE_restartApp,
+ REMOTE_createApp,
+ REMOTE_createAppWithConfig,
+ REMOTE_setDatasetProperties,
+ REMOTE_setStreamTTL,
+ REMOTE_poll;
+
+ static {
+ EELFResourceManager.loadMessageBundle("org.openecomp.ncomp.servers.cdap.logging.CdapCluster");
+ }
+}
diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapClusterOperationEnum.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapClusterOperationEnum.java
new file mode 100644
index 0000000..559f80e
--- /dev/null
+++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapClusterOperationEnum.java
@@ -0,0 +1,107 @@
+
+/*-
+ * ============LICENSE_START==========================================
+ * OPENECOMP - DCAE
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ */
+
+
+package org.openecomp.ncomp.servers.cdap.logging;
+
+import org.openecomp.entity.EcompOperationEnum;
+
+public enum CdapClusterOperationEnum implements EcompOperationEnum {
+
+ createNamespace,
+ deleteNamespace,
+ deployApp,
+ loadArtifact,
+ deleteArtifact,
+ startFlow,
+ startWorker,
+ startService,
+ startApp,
+ stopApp,
+ deleteApp,
+ loadPreferencesApp,
+ loadPreferencesFlow,
+ loadPreferencesNameSpace,
+ setPreferencesApp,
+ setPreferencesFlow,
+ setPreferencesWorker,
+ setPreferencesService,
+ setPreferencesNameSpace,
+ setFlowRunTimeArgs,
+ setFlowletInstances,
+ stopFlow,
+ stopWorker,
+ stopService,
+ truncateDataSet,
+ deleteDataset,
+ createStream,
+ deleteStream,
+ getStreamEvents,
+ getStreamStats,
+ sendEventToStream,
+ trucateStream,
+ setStreamProperties,
+ restartApp,
+ createApp,
+ createAppWithConfig,
+ setDatasetProperties,
+ setStreamTTL,
+ poll,
+ REMOTE_createNamespace,
+ REMOTE_deleteNamespace,
+ REMOTE_deployApp,
+ REMOTE_loadArtifact,
+ REMOTE_deleteArtifact,
+ REMOTE_startFlow,
+ REMOTE_startWorker,
+ REMOTE_startService,
+ REMOTE_startApp,
+ REMOTE_stopApp,
+ REMOTE_deleteApp,
+ REMOTE_loadPreferencesApp,
+ REMOTE_loadPreferencesFlow,
+ REMOTE_loadPreferencesNameSpace,
+ REMOTE_setPreferencesApp,
+ REMOTE_setPreferencesFlow,
+ REMOTE_setPreferencesWorker,
+ REMOTE_setPreferencesService,
+ REMOTE_setPreferencesNameSpace,
+ REMOTE_setFlowRunTimeArgs,
+ REMOTE_setFlowletInstances,
+ REMOTE_stopFlow,
+ REMOTE_stopWorker,
+ REMOTE_stopService,
+ REMOTE_truncateDataSet,
+ REMOTE_deleteDataset,
+ REMOTE_createStream,
+ REMOTE_deleteStream,
+ REMOTE_getStreamEvents,
+ REMOTE_getStreamStats,
+ REMOTE_sendEventToStream,
+ REMOTE_trucateStream,
+ REMOTE_setStreamProperties,
+ REMOTE_restartApp,
+ REMOTE_createApp,
+ REMOTE_createAppWithConfig,
+ REMOTE_setDatasetProperties,
+ REMOTE_setStreamTTL,
+ REMOTE_poll;
+}