diff options
Diffstat (limited to 'dcae-controller-service-cdap/dcae-controller-service-cdap-cluster')
97 files changed, 14154 insertions, 0 deletions
diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/.gitignore b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/LICENSE.txt b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.classpath b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.classpath new file mode 100644 index 0000000..d2d34b3 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.gitignore b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.gitignore new file mode 100644 index 0000000..ba2a884 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.gitignore @@ -0,0 +1,2 @@ +/target/ +/data/ diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.project b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.project new file mode 100644 index 0000000..5c9c5bf --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.project @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>dcae-controller-service-cdap-cluster-manager</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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.core.resources.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/<project>=UTF-8 diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.jdt.groovy.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.jdt.groovy.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +groovy.compiler.level=24 diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/LICENSE.txt b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/META-INF/MANIFEST.MF b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/META-INF/MANIFEST.MF new file mode 100644 index 0000000..251ccda --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: dcae-controller-service-cdap-cluster-manager +Bundle-SymbolicName: dcae-controller-service-cdap-cluster-manager +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.dcae.controller.service.cdap.cluster.manager.tools, + org.openecomp.dcae.controller.service.cdap.cluster.servers.manager, + org.openecomp.dcae.controller.service.cdap.cluster.servers.service +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + dcae-controller-service-cdap-cluster-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + ncomp-cdap-adaptor;bundle-version="0.1.0", + dcae-controller-core-model diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/build.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/build.properties new file mode 100644 index 0000000..a1ec8c4 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/build.properties @@ -0,0 +1,3 @@ +source.. = src/main/java/ +bin.includes = META-INF/,\ + . diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/config/cdap.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/config/cdap.properties new file mode 100644 index 0000000..fc61033 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/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 = ZWJlY2Ux + +cluster.endpoint=foobar +cluster.user=foo +cluster.password=bar diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/config/manager.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/config/manager.properties new file mode 100644 index 0000000..544ab4e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/config/manager.properties @@ -0,0 +1,8 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = 9922 +server.user.console = Y2Y4NDk1ZmMzYzcyMmYy +server.user.gui = ZDc5OGQ5OTViZWI3YjY0 +server.user.client = M2M1MmEyMDVmZWFhYzcw + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/pom.xml b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/pom.xml new file mode 100644 index 0000000..b6aab57 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/pom.xml @@ -0,0 +1,198 @@ +<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.dcae.controller</groupId> + <artifactId>dcae-controller-service-cdap-cluster-manager</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.dcae.controller</groupId> + <artifactId>dcae-controller-service-cdap-cluster-model</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.dcae.controller</groupId> + <artifactId>dcae-controller-service-vm-adaptor</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.ncomp.cdap</groupId> + <artifactId>ncomp-cdap-adaptor</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> +</project> diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/assembly/assemble_zip.xml b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..d8b59e8 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/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>dcae-controller-service-cdap-cluster-manager-${project.version}.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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/Generator.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/Generator.java new file mode 100644 index 0000000..ec75e64 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/Generator.java @@ -0,0 +1,99 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.manager.tools;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerFactory;
+import org.openecomp.dcae.controller.service.cdap.cluster.service.ServiceFactory;
+import org.openecomp.dcae.controller.service.vm.VmFactory;
+import org.openecomp.dcae.controller.service.vmmanager.VmmanagerFactory;
+import org.openecomp.utils.YamlToJava;
+import org.openecomp.ncomp.gwt.siriusportal.model.ModelFactory;
+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.sirius.manager.server.ServerPackage;
+
+public class Generator {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ @SuppressWarnings("unused")
+ ServerPackage f = ServerPackage.eINSTANCE;
+ genManager();
+ genService();
+ }
+
+ public static void genManager() {
+ EObject o = ManagerFactory.eINSTANCE.createCdapClusterManager();
+ 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("Dcae");
+ m.setPluginName(p.getNsURI());
+ m.setName("ControllerServiceCdapClusterManager");
+ m.setTitle("ControllerServiceCdapClusterManager");
+ ControllerGenerator g = new ControllerGenerator(o, m);
+ g.setEnableIRequestHandler(false);
+ g.setEnableISiriusPlugin(false);
+ g.addFactory("org.openecomp.ncomp.servers.cdap.CdapCdapFactory");
+ g.addFactory(ServiceFactory.eINSTANCE);
+ EObject gui = ModelFactory.eINSTANCE.createGuiClientApi();
+ g.addObject("gui", gui, m);
+ g.setProvider(VmmanagerFactory.eINSTANCE.createVirtualMachineManager(), "Dcae");
+ g.generate(dir);
+ g.generateScripts("src/main/server-gen/bin", "controller-service-cdap-cluster-manager");
+ String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging";
+// YamlToJava.convert("src/main/resources/DockerAdaptor.yaml", dir + "/logging", pName);
+ YamlToJava.convert("src/main/sirius-gen/CdapClusterManager.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);
+ }
+
+ public static void genService() {
+ EObject o = ServiceFactory.eINSTANCE.createCdapClusterService();
+ 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("Dcae");
+ m.setPluginName(p.getNsURI());
+ m.setName("ControllerServiceCdapClusterService");
+ m.setTitle("ControllerServiceCdapClusterService");
+ ControllerGenerator g = new ControllerGenerator(o, m);
+ g.setEnableIRequestHandler(false);
+ g.setEnableISiriusPlugin(true);
+ g.setProvider(VmFactory.eINSTANCE.createVirtualMachineService(), "Dcae");
+ g.generate(dir);
+ 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/CdapClusterService.yaml", dir + "/logging", pName);
+ }
+
+}
diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestManager.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestManager.java new file mode 100644 index 0000000..55a15bf --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestManager.java @@ -0,0 +1,65 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.manager.tools; + +import java.io.IOException; + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.DcaeManagerFactory; +import org.openecomp.ncomp.cdap.CdapCluster; +import org.openecomp.ncomp.servers.cdap.CdapCdapCluster; +import org.openecomp.ncomp.servers.cdap.CdapCdapFactory; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +public class TestManager implements ISiriusServer { + + public static void main(String[] args) throws IOException { + TestManager t = new TestManager(); + t.test(); + } + private ManagementServer server; + public void test() throws IOException { + server = new ManagementServer(null, "CdapClusterService", null, "manager.properties"); + ManagerFactory f = new DcaeManagerFactory(this); + server.addFactory(f); + CdapClusterManager m = f.createCdapClusterManager(); + server.setObject(m); + CdapCdapFactory f2 = new CdapCdapFactory(this); + CdapCdapCluster c = (CdapCdapCluster) f2.createCdapCluster(); + // This assume running in DCAE vagrant VM with DCAP running on host on port 10000 + // Getting CDAP on the host is running CDAP in virtualBox + // with port 10000 on the host forwarded to CDAP VM on port 10000 + c.setBaseUrl("http://10.0.2.2:10000/v3"); + m.setCluster(c); + server.start(); + c.poll(); + m.createNamespace("foobar"); + } + @Override + public ManagementServer getServer() { + return server; + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestRemoteManager.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestRemoteManager.java new file mode 100644 index 0000000..2c38c03 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestRemoteManager.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============================================ + */ + +package org.openecomp.dcae.controller.service.cdap.cluster.manager.tools; + +import java.io.IOException; + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.DcaeCdapClusterManagerConsole; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.DcaeManagerFactory; +import org.openecomp.ncomp.cdap.CdapCluster; +import org.openecomp.ncomp.servers.cdap.CdapCdapCluster; +import org.openecomp.ncomp.servers.cdap.CdapCdapFactory; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +public class TestRemoteManager implements ISiriusServer { + + public static void main(String[] args) throws IOException { + TestRemoteManager t = new TestRemoteManager(); + t.test(); + } + private ManagementServer server; + public void test() throws IOException { + DcaeCdapClusterManagerConsole console = + new DcaeCdapClusterManagerConsole("console.properties", "remote"); + console.createNamespace("foobar"); + } + @Override + public ManagementServer getServer() { + return server; + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestServiceToManager.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestServiceToManager.java new file mode 100644 index 0000000..b68bdd5 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/manager/tools/TestServiceToManager.java @@ -0,0 +1,46 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.manager.tools; + +import org.openecomp.dcae.controller.service.cdap.cluster.servers.service.DcaeServiceFactory; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServiceFactory; +import org.openecomp.dcae.controller.service.vm.PhysicalMachine; +import org.openecomp.dcae.controller.service.vm.VmFactory; + +public class TestServiceToManager { + + public static void main(String[] args) { + ServiceFactory f = new DcaeServiceFactory(null); + CdapClusterService s = f.createCdapClusterService(); + CdapClusterServiceInstance i = f.createCdapClusterServiceInstance(); + s.getInstances().add(i); + i.setName("foo"); + PhysicalMachine p = VmFactory.eINSTANCE.createPhysicalMachine(); + p.setPublicIp("localhost"); + i.getServers().add(p); + i.setManagerPortNumber(9922); + s.pollManagerConfiguration("foo"); + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProvider.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProvider.java new file mode 100644 index 0000000..aad5563 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProvider.java @@ -0,0 +1,219 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.servers.manager; + +import org.openecomp.ncomp.cdap.CdapCluster; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.openecomp.dcae.controller.core.service.HealthTestResponse; +import org.openecomp.dcae.controller.core.service.HealthTestStatus; +import org.openecomp.dcae.controller.core.service.ServiceFactory; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; +import org.openecomp.dcae.controller.service.servers.vmmanager.DcaeVirtualMachineManagerProvider; + +public class DcaeCdapClusterManagerProvider extends DcaeVirtualMachineManagerProvider { + private static final Logger logger = Logger.getLogger(DcaeCdapClusterManagerProvider.class); + CdapClusterManager o; + + public DcaeCdapClusterManagerProvider(ISiriusServer controller, CdapClusterManager o) { + super(controller, o); + this.o = o; + } + @Override + public HealthTestResponse test() { + HealthTestResponse res = ServiceFactory.eINSTANCE.createHealthTestResponse(); + res.setStatus(HealthTestStatus.GREEN); + if (o.getCluster() == null || o.getCluster().getConfigurations().size() == 0) { + res.setMessageCode("CDAP not working"); + res.setStatus(HealthTestStatus.RED); + } + return res; + } + + private CdapCluster getCluster() { + if (o.getCluster() == null) { + logger.warn("Unable to find cluster"); + throw new RuntimeException("Unable to find cluster"); + } + return o.getCluster(); + } + + public String loadArtifact(String namespace, String artifactName, String jarfile, String version) { + return getCluster().loadArtifact(namespace, artifactName, jarfile, version); + } + + public String startFlow(String namespace, String appName, String flowId, String extraArgs) { + return getCluster().startFlow(namespace, appName, flowId, extraArgs); + } + + public String startService(String namespace, String appName, String serviceId, String extraArgs) { + return getCluster().startService(namespace, appName, serviceId, extraArgs); + } + + public String startApp(String namespace, String appName) { + return getCluster().startApp(namespace, appName); + } + + public String deleteApp(String namespace, String appName) { + return getCluster().deleteApp(namespace, appName); + } + + public String loadPreferencesApp(String namespace, String prefsFile, String appId) { + return getCluster().loadPreferencesApp(namespace, prefsFile, appId); + } + + public String loadPreferencesFlow(String namespace, String prefsFile, String appId, String flowId) { + return getCluster().loadPreferencesFlow(namespace, prefsFile, appId, flowId); + } + + public String loadPreferencesNameSpace(String namespace, String prefsFile) { + return getCluster().loadPreferencesNameSpace(namespace, prefsFile); + } + + public String setPreferencesApp(String namespace, String prefsString, String appId) { + return getCluster().setPreferencesApp(namespace, prefsString, appId); + } + + public String setPreferencesFlow(String namespace, String prefsString, String appId, String flowId) { + return getCluster().setPreferencesFlow(namespace, prefsString, appId, flowId); + } + + public String setPreferencesWorker(String namespace, String prefsString, String appId, String workerId) { + return getCluster().setPreferencesWorker(namespace, prefsString, appId, workerId); + } + + public String setPreferencesNameSpace(String namespace, String prefsString) { + return getCluster().setPreferencesNameSpace(namespace, prefsString); + } + + public String setFlowRunTimeArgs(String namespace, String appId, String flowId, String args) { + return getCluster().setFlowRunTimeArgs(namespace, appId, flowId, args); + } + + public String setFlowletInstances(String namespace, String appId, String flowId, String flowletId, int nInstances) { + return getCluster().setFlowletInstances(namespace, appId, flowId, flowletId, nInstances); + } + + public String stopFlow(String namespace, String appId, String flowId) { + return getCluster().stopFlow(namespace, appId, flowId); + } + + public String stopService(String namespace, String appId, String serviceId) { + return getCluster().stopService(namespace, appId, serviceId); + } + + public String truncateDataSet(String namespace, String datasetName) { + return getCluster().truncateDataSet(namespace, datasetName); + } + + public String createStream(String namespace, String newStreamId) { + return getCluster().createStream(namespace, newStreamId); + } + + public String deleteStream(String namespace, String streamId) { + return getCluster().deleteStream(namespace, streamId); + } + + public EList<String> getStreamEvents(String namespace, String streamId, String startTime, String endTime, int limit) { + return getCluster().getStreamEvents(namespace, streamId, startTime, endTime, limit); + } + + public EList<String> getStreamStats(String namespace, String streamId, String startTime, String endTime, int limit) { + return getCluster().getStreamStats(namespace, streamId, startTime, endTime, limit); + } + + public String sendEventToStream(String namespace, String streamId, String event) { + return getCluster().sendEventToStream(namespace, streamId, event); + } + + public String trucateStream(String namespace, String streamId) { + return getCluster().trucateStream(namespace, streamId); + } + + public String setStreamProperties(String namespace, String streamId, String propsFile) { + return getCluster().setStreamProperties(namespace, streamId, propsFile); + } + + public String createNamespace(String namespace) { + return getCluster().createNamespace(namespace); + } + public String deleteNamespace(String namespace) { + return getCluster().deleteNamespace(namespace); + } + + public String deployApp(String namespace, String jarfile) { + return getCluster().deployApp(namespace, jarfile); + } + + public String deleteArtifact(String namespace, String artifactName, String artifactVersion) { + return getCluster().deleteArtifact(namespace, artifactName, artifactVersion); + } + + public String deleteDataset(String namespace, String datasetName) { + return getCluster().deleteDataset(namespace, datasetName); + } + + public String createApp(String namespace, String appId, String artifactName, String artifactVersion, String scope) { + return getCluster().createApp(namespace, appId, artifactName, artifactVersion, scope); + } + + public String createAppWithConfig(String namespace, String appId, String artifactName, String artifactVersion, String scope, + String appConfig) { + return getCluster().createAppWithConfig(namespace, appId, artifactName, artifactVersion, scope, appConfig); + } + + public String restartApp(String namespace, String appId, String progTypes) { + return getCluster().restartApp(namespace, appId, progTypes); + } + + public String setDatasetProperties(String namespace, String datasetName, String datasetProperties) { + return getCluster().setDatasetProperties(namespace, datasetName, datasetProperties); + } + + public String setStreamTTL(String namespace, String streamName, int ttlSeconds) { + return getCluster().setStreamTTL(namespace, streamName, ttlSeconds); + } + @Override + public void configurationChanged() { +// JSONObject json = ManagementServer.ecore2json(o, 1000, null, true); +// System.err.println(json.toString(2)); + } + + public String stopApp(String namespace, String appName) { + return getCluster().stopApp(namespace, appName); + } + + public String startWorker(String namespace, String appName, + String workerId, String extraArgs) { + return getCluster().startWorker(namespace, appName, workerId, extraArgs); + } + + public String stopWorker(String namespace, String appId, String workerId) { + return getCluster().stopWorker(namespace, appId, workerId); + } + + public String setPreferencesService(String namespace, String prefsString, String appId, String serviceId) { + return getCluster().setPreferencesService(namespace, prefsString, appId, serviceId); + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiProvider.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiProvider.java new file mode 100644 index 0000000..57a6709 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiProvider.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.dcae.controller.service.cdap.cluster.servers.manager.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 DcaeGuiClientApiProvider extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProvider.class); + GuiClientApi o; + + public DcaeGuiClientApiProvider(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceProvider.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceProvider.java new file mode 100644 index 0000000..c335740 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceProvider.java @@ -0,0 +1,105 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.servers.service; + +import org.openecomp.ncomp.cdap.CdapCluster; +import org.openecomp.ncomp.cdap.CdapPackage; +import org.openecomp.ncomp.core.DeploymentStatus; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ManagementServerUtils; +import org.openecomp.ncomp.sirius.manager.console.Utils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.json.JSONObject; + +import org.openecomp.dcae.controller.service.servers.vm.DcaeVirtualMachineServiceProvider; +import org.openecomp.dcae.controller.service.servers.vmmanager.DcaeVirtualMachineManagerConsole; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerFactory; + +public class DcaeCdapClusterServiceProvider extends DcaeVirtualMachineServiceProvider { + private static final Logger logger = Logger.getLogger(DcaeCdapClusterServiceProvider.class); + CdapClusterService o; + + public DcaeCdapClusterServiceProvider(ISiriusServer controller, + CdapClusterService o) { + super(controller, o); + this.o = o; + } + + @Override + public EObject managerConfiguration(String instanceName) { + CdapClusterServiceInstance i = (CdapClusterServiceInstance) findInstance(instanceName); + CdapClusterManager c = ManagerFactory.eINSTANCE.createCdapClusterManager(); + if (i.getCluster() != null) { + c.setCluster(EcoreUtil.copy(i.getCluster())); + c.getCluster().setRemote(false); + } + return c; + } + + @Override + public void start() { + super.start(); + Thread t = new Thread("cdap cluster poller: " + o.getName()) { + @Override + public void run() { + while (true) { + try { + if (!controller.getServer().isSlave) { + for (VirtualMachineServiceInstance i : o.getInstances()) { + if (i.getStatus() == DeploymentStatus.DEPLOYED) { + CdapClusterServiceInstance i1 = (CdapClusterServiceInstance) i; + AbstractClient c = getClient(i); + DcaeVirtualMachineManagerConsole console = new DcaeVirtualMachineManagerConsole(c); + JSONObject json = (JSONObject) Utils.object2json(console.list("/cluster", 1000)); + CdapCluster h = (CdapCluster) controller.getServer().json2ecore( + CdapPackage.eINSTANCE.getCdapCluster(), json); + controller.getServer(); + h.setRemote(true); + ManagementServer.merge(i1.getCluster(), h, json, true, null); + } + } + } + Thread.sleep(30000); // sleep 30 seconds + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("docker host poller: " + e); + try { + Thread.sleep(30000); + } catch (InterruptedException e1) { + } + } + } + }; + }; + t.start(); + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server-gen/bin/controller-service-cdap-cluster-manager-controller b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server-gen/bin/controller-service-cdap-cluster-manager-controller new file mode 100644 index 0000000..2b9a3f3 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server-gen/bin/controller-service-cdap-cluster-manager-controller @@ -0,0 +1,138 @@ +#!/bin/bash + +# setup env if needed. java 6 required +## JAVA_HOME= + +############################## DO NOT EDIT BELOW ########################## + +SNAME="Dcae Controller" +PNAME=controller-service-cdap-cluster-manager-controller +CLASS=org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.DcaeCdapClusterManagerServer + +############################## 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/manager.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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/bin/cdap-cli.sh b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/bin/cdap-cli.sh new file mode 100644 index 0000000..33fadd7 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/bin/cdap-cli.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +echo $(date) /opt/cdap/cli/bin/cdap-cli.sh "$@" >> logs/cdap-cli.log + +sleep 5 + +echo y | /opt/cdap/cli/bin/cdap-cli.sh "$@" + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/bin/manager.sh b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/bin/manager.sh new file mode 100644 index 0000000..4bf41b1 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/bin/manager.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +export JAVA_HOME=/opt/app/java/jdk/jdk170 +export GROOVY_HOME=/opt/app/groovy/246 + +PATH=$JAVA_HOME/bin:$GROOVY_HOME/bin:$PATH + +cd $(dirname $(dirname $0)) + +ROOT=$(pwd) +CMD=$ROOT/bin/controller-service-cdap-cluster-manager-controller + + +mkdir -p logs/ +echo $(date) bin/manager.sh "$@" >> logs/manager.sh.log + +CMD1=$1 +shift +VMTYPE=$(ls /tmp/vm-*manager.properties | sed s/-manager.properties// | sed sx/tmp/xx) + + +case $CMD1 in + start) + CLUSTER_FILE=data/resources/cluster.json + if [ ! -e $CLUSTER_FILE ]; then + mkdir -p $(dirname $CLUSTER_FILE) + echo '{ "baseUrl": "http://localhost:10000/v3", "pollingFrequency": "30000" }' > $CLUSTER_FILE + fi + JVMARGS=$(cat config/manager.properties | grep JVMARGS | sed 's/[^=]*=//') + $CMD $CMD1 $JVMARGS + ;; + stop|console) + $CMD $CMD1 + ;; + config) + CONFIGDIR=/var/config/DCAE/chef + if [ ! -e $CONFIGDIR/$VMTYPE-manager.properties ]; then CONFIGDIR=/tmp; fi + mkdir -p config + for FILE in $CONFIGDIR/$VMTYPE-*; do + FILE2=$(echo $FILE | sed s/.*$VMTYPE-//) + cp $FILE config/$FILE2 + done + /opt/app/dcae-controller-core-utils/bin/setup_https.sh config/manager.properties + ;; + restore|clean) + ;; + restart) + $0 stop + $0 start + ;; + restart2) + $CMD stop + JVMARGS=$(cat config/manager.properties | grep JVMARGS | sed 's/[^=]*=//') + $CMD start $JVMARGS + ;; + *) + echo unknown command: $CMD1 + ;; +esac + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/console.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/console.properties new file mode 100644 index 0000000..4b63607 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/gui.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/gui.properties new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/gui.properties diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/log4j.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/log4j.properties new file mode 100644 index 0000000..8b3b8f9 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/makefile b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/makefile new file mode 100644 index 0000000..717823e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/manager.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/manager.properties new file mode 100644 index 0000000..4605389 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/manager.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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/pw.sh.sh b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/config/pw.sh.sh new file mode 100644 index 0000000..cd022ae --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/scripts/console.groovy b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/scripts/console.groovy new file mode 100644 index 0000000..4c21c49 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/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.dcae.controller.service.cdap.cluster.servers.manager.DcaeCdapClusterManagerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +manager = new DcaeCdapClusterManagerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/scripts/test.groovy b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/scripts/test.groovy new file mode 100644 index 0000000..2bcbe82 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/scripts/test.groovy @@ -0,0 +1,65 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.servers.manager.DcaeCdapClusterManagerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +manager = new DcaeCdapClusterManagerConsole("cdap-service-test.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } + +def m = manager + +// Begin Standard Configuration +try { + m.create("/cluster", [baseUrl:"http://localhost:10000/v3"]) +} catch (Exception e) { + println e.getMessage() +} + +def ns = "ca55" +def appId = "WebAnalytics" +def flowId = "WebAnalyticsFlow" + +// Files are on the target machine at /opt/dcae-artifact-cache +def jarfile = "/opt/app-data-cache/WebAnalytics-3.3.0.jar" +def ver = "3.3.0" + +m.createNamespace(ns) +m.deployApp(ns, jarfile) // may be rename it to deployApp? + +// we need a createApp command -- artifact + config +// m.loadArtifact(ns, "", jarfile) // for now, always use the null or blank space for the name +// there is a m.createApp() missing + +m.startFlow(ns, appId, flowId, null) + +//we have sendEvent but not loadEvents! + +//m.stopFlow(ns, appId, flowId) + +//m.deleteApp(ns, appId) + +// there is a m.deleteArtifact() missing + +// one code issue is tab-indentation? Should we convert to spaces, or keep as tabs? + +// we need some additional items! diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterManager.yaml b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterManager.yaml new file mode 100644 index 0000000..2bfc668 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterManager.yaml @@ -0,0 +1,597 @@ +operations: + test: {} + suspend: {} + resume: {} + publicKey: {} + configurationChanged: {} + updateStreams: {} + logs: {} + metrics: {} + properties: {} + uploadInfo: {} + getValues: {} + getValuesAll: {} + getMessages: {} + getRequestLogger: {} + evaluate: {} + update: {} + 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: {} + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_publicKey: + decription: Remote call publicKey + REMOTE_configurationChanged: + decription: Remote call configurationChanged + REMOTE_updateStreams: + decription: Remote call updateStreams + REMOTE_logs: + decription: Remote call logs + REMOTE_metrics: + decription: Remote call metrics + REMOTE_properties: + decription: Remote call properties + REMOTE_uploadInfo: + decription: Remote call uploadInfo + REMOTE_getValues: + decription: Remote call getValues + REMOTE_getValuesAll: + decription: Remote call getValuesAll + REMOTE_getMessages: + decription: Remote call getMessages + REMOTE_getRequestLogger: + decription: Remote call getRequestLogger + REMOTE_evaluate: + decription: Remote call evaluate + REMOTE_update: + decription: Remote call update + 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 +messages: + dummy: {} + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + publicKey: + errorCode: publicKey-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + configurationChanged: + errorCode: configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateStreams: + errorCode: updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + logs: + errorCode: logs-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + metrics: + errorCode: metrics-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + properties: + errorCode: properties-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + uploadInfo: + errorCode: uploadInfo-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getValues: + errorCode: getValues-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getValuesAll: + errorCode: getValuesAll-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getMessages: + errorCode: getMessages-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getRequestLogger: + errorCode: getRequestLogger-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + evaluate: + errorCode: evaluate-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + update: + errorCode: update-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + 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 + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_publicKey: + errorCode: REMOTE-publicKey-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_configurationChanged: + errorCode: REMOTE-configurationChanged-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateStreams: + errorCode: REMOTE-updateStreams-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_logs: + errorCode: REMOTE-logs-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_metrics: + errorCode: REMOTE-metrics-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_properties: + errorCode: REMOTE-properties-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_uploadInfo: + errorCode: REMOTE-uploadInfo-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getValues: + errorCode: REMOTE-getValues-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getValuesAll: + errorCode: REMOTE-getValuesAll-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getMessages: + errorCode: REMOTE-getMessages-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getRequestLogger: + errorCode: REMOTE-getRequestLogger-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_evaluate: + errorCode: REMOTE-evaluate-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_update: + errorCode: REMOTE-update-FAILED-5001W + messageFormat: '{0}' + description: Remote 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 diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterService.yaml b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterService.yaml new file mode 100644 index 0000000..6ac8c34 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterService.yaml @@ -0,0 +1,135 @@ +operations: + deploy: {} + undeploy: {} + test: {} + suspend: {} + resume: {} + pushManagerConfiguration: {} + pollManagerConfiguration: {} + managerConfiguration: {} + managerOperation: {} + updateConfigurationFromPolicy: {} + runHealthTests: {} + updateDeploymentStatus: {} + REMOTE_deploy: + decription: Remote call deploy + REMOTE_undeploy: + decription: Remote call undeploy + REMOTE_test: + decription: Remote call test + REMOTE_suspend: + decription: Remote call suspend + REMOTE_resume: + decription: Remote call resume + REMOTE_pushManagerConfiguration: + decription: Remote call pushManagerConfiguration + REMOTE_pollManagerConfiguration: + decription: Remote call pollManagerConfiguration + REMOTE_managerConfiguration: + decription: Remote call managerConfiguration + REMOTE_managerOperation: + decription: Remote call managerOperation + REMOTE_updateConfigurationFromPolicy: + decription: Remote call updateConfigurationFromPolicy + REMOTE_runHealthTests: + decription: Remote call runHealthTests + REMOTE_updateDeploymentStatus: + decription: Remote call updateDeploymentStatus +messages: + dummy: {} + deploy: + errorCode: deploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + undeploy: + errorCode: undeploy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + test: + errorCode: test-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + suspend: + errorCode: suspend-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + resume: + errorCode: resume-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pushManagerConfiguration: + errorCode: pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + pollManagerConfiguration: + errorCode: pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerConfiguration: + errorCode: managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + managerOperation: + errorCode: managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateConfigurationFromPolicy: + errorCode: updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + runHealthTests: + errorCode: runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + updateDeploymentStatus: + errorCode: updateDeploymentStatus-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_deploy: + errorCode: REMOTE-deploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_undeploy: + errorCode: REMOTE-undeploy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_test: + errorCode: REMOTE-test-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_suspend: + errorCode: REMOTE-suspend-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_resume: + errorCode: REMOTE-resume-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pushManagerConfiguration: + errorCode: REMOTE-pushManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_pollManagerConfiguration: + errorCode: REMOTE-pollManagerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerConfiguration: + errorCode: REMOTE-managerConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_managerOperation: + errorCode: REMOTE-managerOperation-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateConfigurationFromPolicy: + errorCode: REMOTE-updateConfigurationFromPolicy-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_runHealthTests: + errorCode: REMOTE-runHealthTests-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_updateDeploymentStatus: + errorCode: REMOTE-updateDeploymentStatus-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/GuiClientApi.yaml b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/GuiClientApi.yaml new file mode 100644 index 0000000..bf3d69d --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManager.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManager.java new file mode 100644 index 0000000..4415331 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManager.java @@ -0,0 +1,1444 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.servers.manager; + + + +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.dcae.controller.service.cdap.cluster.servers.manager.logging.CdapClusterManagerOperationEnum; + + + + + + + +import java.util.Date; + + + + + +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; + + + + + +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; + + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl; + + + +public class DcaeCdapClusterManager extends CdapClusterManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeCdapClusterManager.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeCdapClusterManagerProvider controller; + ISiriusServer server; + + public DcaeCdapClusterManager(ISiriusServer server) { + this.server = server; + this.controller = new DcaeCdapClusterManagerProvider(server,this); + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.test); + try { + res = controller.test(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", 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, "test", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void suspend() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.suspend); + try { + controller.suspend(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", 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, "suspend", ApiRequestStatus.OKAY, duration_); + + } + + public void resume() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.resume); + try { + controller.resume(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", 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, "resume", ApiRequestStatus.OKAY, duration_); + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.publicKey); + try { + res = controller.publicKey(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "publicKey", 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, "publicKey", ApiRequestStatus.OKAY, duration_); + return res; + } + + public void configurationChanged() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.configurationChanged); + try { + controller.configurationChanged(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "configurationChanged", 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, "configurationChanged", ApiRequestStatus.OKAY, duration_); + + } + + public void updateStreams(EList<org.openecomp.dcae.controller.core.stream.DcaeStream> inputStreams, EList<org.openecomp.dcae.controller.core.stream.DcaeStream> outputStreams) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.START, duration_,inputStreams,outputStreams); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.updateStreams); + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.ERROR, duration_,inputStreams,outputStreams); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.OKAY, duration_,inputStreams,outputStreams); + + } + + public void logs(org.json.JSONObject cx, EList<org.openecomp.ncomp.core.logs.LogMessage> logs) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.START, duration_,cx,logs); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.logs); + try { + controller.logs(cx,logs); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.ERROR, duration_,cx,logs); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.OKAY, duration_,cx,logs); + + } + + public void metrics(org.json.JSONObject cx, EList<org.openecomp.ncomp.core.metrics.Metric> metrics) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.START, duration_,cx,metrics); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.metrics); + try { + controller.metrics(cx,metrics); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.ERROR, duration_,cx,metrics); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.OKAY, duration_,cx,metrics); + + } + + public void properties(org.json.JSONObject cx, EList<org.openecomp.ncomp.sirius.manager.properties.AbstractProperty> l) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.START, duration_,cx,l); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.properties); + try { + controller.properties(cx,l); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.ERROR, duration_,cx,l); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.OKAY, duration_,cx,l); + + } + + public void uploadInfo(org.json.JSONObject cx, EList<org.openecomp.ncomp.sirius.manager.server.ManagementInfo> info) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.START, duration_,cx,info); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.uploadInfo); + try { + controller.uploadInfo(cx,info); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.ERROR, duration_,cx,info); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.OKAY, duration_,cx,info); + + } + + public EList<org.openecomp.ncomp.core.metrics.DoubleMetric> getValues(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList<org.openecomp.ncomp.core.metrics.DoubleMetric> res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.START, duration_,cx,path,start,end,option,relativeInterval); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.getValues); + try { + res = controller.getValues(cx,path,start,end,option,relativeInterval); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.ERROR, duration_,cx,path,start,end,option,relativeInterval); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.OKAY, duration_,cx,path,start,end,option,relativeInterval); + return res; + } + + public EList<org.openecomp.ncomp.core.metrics.DoubleMetric> getValuesAll(org.json.JSONObject cx, java.lang.String path, EList<java.lang.String> metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList<org.openecomp.ncomp.core.metrics.DoubleMetric> res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.START, duration_,cx,path,metrics,start,end,option,relativeInterval); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.getValuesAll); + try { + res = controller.getValuesAll(cx,path,metrics,start,end,option,relativeInterval); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.ERROR, duration_,cx,path,metrics,start,end,option,relativeInterval); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.OKAY, duration_,cx,path,metrics,start,end,option,relativeInterval); + return res; + } + + public EList<org.openecomp.ncomp.core.logs.LogMessage> getMessages(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end) { + EList<org.openecomp.ncomp.core.logs.LogMessage> res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.START, duration_,cx,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.getMessages); + try { + res = controller.getMessages(cx,path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.ERROR, duration_,cx,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, "getMessages", ApiRequestStatus.OKAY, duration_,cx,path,start,end); + return res; + } + + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.START, duration_,userName,action,resourcePath,context); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.getRequestLogger); + try { + res = controller.getRequestLogger(userName,action,resourcePath,context); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.ERROR, duration_,userName,action,resourcePath,context); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.OKAY, duration_,userName,action,resourcePath,context); + return res; + } + + public EList<org.openecomp.ncomp.core.function.ValuePair> evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EList<org.openecomp.ncomp.core.function.ValuePair> res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.START, duration_,path,function); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.evaluate); + try { + res = controller.evaluate(path,function); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.ERROR, duration_,path,function); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.OKAY, duration_,path,function); + return res; + } + + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.START, duration_,path,function); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.update); + try { + controller.update(path,function); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.ERROR, duration_,path,function); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.OKAY, duration_,path,function); + + } + + 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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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(CdapClusterManagerOperationEnum.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; + } + + + + + + + public static void ecoreSetup() { + DcaeCdapClusterManagerProvider.ecoreSetup(); + } + public DcaeCdapClusterManagerProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerClient.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerClient.java new file mode 100644 index 0000000..dc1cfcf --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerClient.java @@ -0,0 +1,990 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.servers.manager; + +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.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.logging.CdapClusterManagerOperationEnum; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.logging.CdapClusterManagerMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeCdapClusterManagerClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeCdapClusterManagerClient(String file, String name) { + DcaeCdapClusterManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeCdapClusterManagerClient(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 DcaeCdapClusterManagerClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: test", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend() { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: suspend", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume() { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: resume", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public java.lang.String publicKey() { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_publicKey); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "publicKey", null); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_publicKey, e.toString()); + throw new RuntimeException("remote call failed: publicKey", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void configurationChanged() { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_configurationChanged); + + try { + client.operationPath("/resources", c, "configurationChanged", null); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_configurationChanged, e.toString()); + throw new RuntimeException("remote call failed: configurationChanged", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void updateStreams(EList<org.openecomp.dcae.controller.core.stream.DcaeStream> inputStreams, EList<org.openecomp.dcae.controller.core.stream.DcaeStream> outputStreams) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_updateStreams); + + try { + client.operationPath("/resources", c, "updateStreams", null, inputStreams,outputStreams); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_updateStreams, e.toString()); + throw new RuntimeException("remote call failed: updateStreams", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void logs(org.json.JSONObject cx, EList<org.openecomp.ncomp.core.logs.LogMessage> logs) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_logs); + + try { + client.operationPath("/resources", c, "logs", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,logs); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_logs, e.toString()); + throw new RuntimeException("remote call failed: logs", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void metrics(org.json.JSONObject cx, EList<org.openecomp.ncomp.core.metrics.Metric> metrics) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_metrics); + + try { + client.operationPath("/resources", c, "metrics", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,metrics); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_metrics, e.toString()); + throw new RuntimeException("remote call failed: metrics", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void properties(org.json.JSONObject cx, EList<org.openecomp.ncomp.sirius.manager.properties.AbstractProperty> l) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_properties); + + try { + client.operationPath("/resources", c, "properties", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,l); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_properties, e.toString()); + throw new RuntimeException("remote call failed: properties", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void uploadInfo(org.json.JSONObject cx, EList<org.openecomp.ncomp.sirius.manager.server.ManagementInfo> info) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_uploadInfo); + + try { + client.operationPath("/resources", c, "uploadInfo", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,info); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_uploadInfo, e.toString()); + throw new RuntimeException("remote call failed: uploadInfo", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public EList<org.openecomp.ncomp.core.metrics.DoubleMetric> getValues(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_getValues); + EList<org.openecomp.ncomp.core.metrics.DoubleMetric> res; + try { + res = (EList<org.openecomp.ncomp.core.metrics.DoubleMetric>) client.operationPath("/resources", c, "getValues", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end,option,relativeInterval); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_getValues, e.toString()); + throw new RuntimeException("remote call failed: getValues", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList<org.openecomp.ncomp.core.metrics.DoubleMetric> getValuesAll(org.json.JSONObject cx, java.lang.String path, EList<java.lang.String> metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_getValuesAll); + EList<org.openecomp.ncomp.core.metrics.DoubleMetric> res; + try { + res = (EList<org.openecomp.ncomp.core.metrics.DoubleMetric>) client.operationPath("/resources", c, "getValuesAll", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,metrics,start,end,option,relativeInterval); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_getValuesAll, e.toString()); + throw new RuntimeException("remote call failed: getValuesAll", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList<org.openecomp.ncomp.core.logs.LogMessage> getMessages(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_getMessages); + EList<org.openecomp.ncomp.core.logs.LogMessage> res; + try { + res = (EList<org.openecomp.ncomp.core.logs.LogMessage>) client.operationPath("/resources", c, "getMessages", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_getMessages, e.toString()); + throw new RuntimeException("remote call failed: getMessages", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_getRequestLogger); + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res; + try { + res = (org.openecomp.ncomp.sirius.manager.server.LoggerInfo) client.operationPath("/resources", c, "getRequestLogger", null, userName,action,resourcePath,context); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_getRequestLogger, e.toString()); + throw new RuntimeException("remote call failed: getRequestLogger", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList<org.openecomp.ncomp.core.function.ValuePair> evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_evaluate); + EList<org.openecomp.ncomp.core.function.ValuePair> res; + try { + res = (EList<org.openecomp.ncomp.core.function.ValuePair>) client.operationPath("/resources", c, "evaluate", null, path,function); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_evaluate, e.toString()); + throw new RuntimeException("remote call failed: evaluate", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_update); + + try { + client.operationPath("/resources", c, "update", null, path,function); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_update, e.toString()); + throw new RuntimeException("remote call failed: update", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public java.lang.String createNamespace(java.lang.String namespace) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_createNamespace); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "createNamespace", null, namespace); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_createNamespace, e.toString()); + throw new RuntimeException("remote call failed: createNamespace", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String deleteNamespace(java.lang.String namespace) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_deleteNamespace); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "deleteNamespace", null, namespace); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_deleteNamespace, e.toString()); + throw new RuntimeException("remote call failed: deleteNamespace", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String deployApp(java.lang.String namespace, java.lang.String jarfile) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_deployApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "deployApp", null, namespace,jarfile); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_deployApp, e.toString()); + throw new RuntimeException("remote call failed: deployApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String loadArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String jarfile, java.lang.String version) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_loadArtifact); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "loadArtifact", null, namespace,artifactName,jarfile,version); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_loadArtifact, e.toString()); + throw new RuntimeException("remote call failed: loadArtifact", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String deleteArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String artifactVersion) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_deleteArtifact); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "deleteArtifact", null, namespace,artifactName,artifactVersion); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_deleteArtifact, e.toString()); + throw new RuntimeException("remote call failed: deleteArtifact", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String startFlow(java.lang.String namespace, java.lang.String appName, java.lang.String flowId, java.lang.String extraArgs) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_startFlow); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "startFlow", null, namespace,appName,flowId,extraArgs); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_startFlow, e.toString()); + throw new RuntimeException("remote call failed: startFlow", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String startWorker(java.lang.String namespace, java.lang.String appName, java.lang.String workerId, java.lang.String extraArgs) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_startWorker); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "startWorker", null, namespace,appName,workerId,extraArgs); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_startWorker, e.toString()); + throw new RuntimeException("remote call failed: startWorker", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String startService(java.lang.String namespace, java.lang.String appName, java.lang.String serviceId, java.lang.String extraArgs) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_startService); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "startService", null, namespace,appName,serviceId,extraArgs); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_startService, e.toString()); + throw new RuntimeException("remote call failed: startService", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String startApp(java.lang.String namespace, java.lang.String appName) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_startApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "startApp", null, namespace,appName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_startApp, e.toString()); + throw new RuntimeException("remote call failed: startApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String stopApp(java.lang.String namespace, java.lang.String appName) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_stopApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "stopApp", null, namespace,appName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_stopApp, e.toString()); + throw new RuntimeException("remote call failed: stopApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String deleteApp(java.lang.String namespace, java.lang.String appName) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_deleteApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "deleteApp", null, namespace,appName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_deleteApp, e.toString()); + throw new RuntimeException("remote call failed: deleteApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String loadPreferencesApp(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_loadPreferencesApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "loadPreferencesApp", null, namespace,prefsFile,appId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_loadPreferencesApp, e.toString()); + throw new RuntimeException("remote call failed: loadPreferencesApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String loadPreferencesFlow(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId, java.lang.String flowId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_loadPreferencesFlow); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "loadPreferencesFlow", null, namespace,prefsFile,appId,flowId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_loadPreferencesFlow, e.toString()); + throw new RuntimeException("remote call failed: loadPreferencesFlow", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String loadPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsFile) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_loadPreferencesNameSpace); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "loadPreferencesNameSpace", null, namespace,prefsFile); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_loadPreferencesNameSpace, e.toString()); + throw new RuntimeException("remote call failed: loadPreferencesNameSpace", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setPreferencesApp(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setPreferencesApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setPreferencesApp", null, namespace,prefsString,appId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setPreferencesApp, e.toString()); + throw new RuntimeException("remote call failed: setPreferencesApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setPreferencesFlow(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String flowId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setPreferencesFlow); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setPreferencesFlow", null, namespace,prefsString,appId,flowId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setPreferencesFlow, e.toString()); + throw new RuntimeException("remote call failed: setPreferencesFlow", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setPreferencesWorker(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String workerId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setPreferencesWorker); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setPreferencesWorker", null, namespace,prefsString,appId,workerId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setPreferencesWorker, e.toString()); + throw new RuntimeException("remote call failed: setPreferencesWorker", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setPreferencesService(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String serviceId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setPreferencesService); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setPreferencesService", null, namespace,prefsString,appId,serviceId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setPreferencesService, e.toString()); + throw new RuntimeException("remote call failed: setPreferencesService", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsString) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setPreferencesNameSpace); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setPreferencesNameSpace", null, namespace,prefsString); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setPreferencesNameSpace, e.toString()); + throw new RuntimeException("remote call failed: setPreferencesNameSpace", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setFlowRunTimeArgs(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String args) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setFlowRunTimeArgs); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setFlowRunTimeArgs", null, namespace,appId,flowId,args); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setFlowRunTimeArgs, e.toString()); + throw new RuntimeException("remote call failed: setFlowRunTimeArgs", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setFlowletInstances(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String flowletId, int nInstances) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setFlowletInstances); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setFlowletInstances", null, namespace,appId,flowId,flowletId,nInstances); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setFlowletInstances, e.toString()); + throw new RuntimeException("remote call failed: setFlowletInstances", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String stopFlow(java.lang.String namespace, java.lang.String appId, java.lang.String flowId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_stopFlow); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "stopFlow", null, namespace,appId,flowId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_stopFlow, e.toString()); + throw new RuntimeException("remote call failed: stopFlow", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String stopWorker(java.lang.String namespace, java.lang.String appId, java.lang.String workerId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_stopWorker); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "stopWorker", null, namespace,appId,workerId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_stopWorker, e.toString()); + throw new RuntimeException("remote call failed: stopWorker", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String stopService(java.lang.String namespace, java.lang.String appId, java.lang.String serviceId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_stopService); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "stopService", null, namespace,appId,serviceId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_stopService, e.toString()); + throw new RuntimeException("remote call failed: stopService", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String truncateDataSet(java.lang.String namespace, java.lang.String datasetName) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_truncateDataSet); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "truncateDataSet", null, namespace,datasetName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_truncateDataSet, e.toString()); + throw new RuntimeException("remote call failed: truncateDataSet", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String deleteDataset(java.lang.String namespace, java.lang.String datasetName) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_deleteDataset); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "deleteDataset", null, namespace,datasetName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_deleteDataset, e.toString()); + throw new RuntimeException("remote call failed: deleteDataset", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String createStream(java.lang.String namespace, java.lang.String newStreamId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_createStream); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "createStream", null, namespace,newStreamId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_createStream, e.toString()); + throw new RuntimeException("remote call failed: createStream", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String deleteStream(java.lang.String namespace, java.lang.String streamId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_deleteStream); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "deleteStream", null, namespace,streamId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_deleteStream, e.toString()); + throw new RuntimeException("remote call failed: deleteStream", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList<java.lang.String> getStreamEvents(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_getStreamEvents); + EList<java.lang.String> res; + try { + res = (EList<java.lang.String>) client.operationPath("/resources", c, "getStreamEvents", null, namespace,streamId,startTime,endTime,limit); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_getStreamEvents, e.toString()); + throw new RuntimeException("remote call failed: getStreamEvents", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public EList<java.lang.String> getStreamStats(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_getStreamStats); + EList<java.lang.String> res; + try { + res = (EList<java.lang.String>) client.operationPath("/resources", c, "getStreamStats", null, namespace,streamId,startTime,endTime,limit); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_getStreamStats, e.toString()); + throw new RuntimeException("remote call failed: getStreamStats", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String sendEventToStream(java.lang.String namespace, java.lang.String streamId, java.lang.String event) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_sendEventToStream); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "sendEventToStream", null, namespace,streamId,event); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_sendEventToStream, e.toString()); + throw new RuntimeException("remote call failed: sendEventToStream", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String trucateStream(java.lang.String namespace, java.lang.String streamId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_trucateStream); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "trucateStream", null, namespace,streamId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_trucateStream, e.toString()); + throw new RuntimeException("remote call failed: trucateStream", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setStreamProperties(java.lang.String namespace, java.lang.String streamId, java.lang.String propsFile) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setStreamProperties); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setStreamProperties", null, namespace,streamId,propsFile); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setStreamProperties, e.toString()); + throw new RuntimeException("remote call failed: setStreamProperties", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String restartApp(java.lang.String namespace, java.lang.String appId, java.lang.String progTypes) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_restartApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "restartApp", null, namespace,appId,progTypes); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_restartApp, e.toString()); + throw new RuntimeException("remote call failed: restartApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + 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) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_createApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "createApp", null, namespace,appId,artifactName,artifactVersion,scope); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_createApp, e.toString()); + throw new RuntimeException("remote call failed: createApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + 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) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_createAppWithConfig); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "createAppWithConfig", null, namespace,appId,artifactName,artifactVersion,scope,appConfig); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_createAppWithConfig, e.toString()); + throw new RuntimeException("remote call failed: createAppWithConfig", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setDatasetProperties(java.lang.String namespace, java.lang.String datasetName, java.lang.String datasetProperties) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setDatasetProperties); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setDatasetProperties", null, namespace,datasetName,datasetProperties); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setDatasetProperties, e.toString()); + throw new RuntimeException("remote call failed: setDatasetProperties", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String setStreamTTL(java.lang.String namespace, java.lang.String streamName, int ttlSeconds) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setStreamTTL); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "setStreamTTL", null, namespace,streamName,ttlSeconds); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setStreamTTL, e.toString()); + throw new RuntimeException("remote call failed: setStreamTTL", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerConsole.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerConsole.java new file mode 100644 index 0000000..08062a0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerConsole.java @@ -0,0 +1,655 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.servers.manager; + + +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.dcae.controller.service.cdap.cluster.servers.manager.gui.DcaeGuiClientApiConsole; + + +public class DcaeCdapClusterManagerConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeCdapClusterManagerConsole.class); + protected DcaeCdapClusterManagerClient controller; + + + DcaeGuiClientApiConsole gui; + + + public DcaeCdapClusterManagerConsole(String filename, String name) { + super(filename, name); + controller = new DcaeCdapClusterManagerClient(filename,name); + client = controller.client; + + gui = new DcaeGuiClientApiConsole(filename,name); + } + + public DcaeCdapClusterManagerConsole(AbstractClient c) { + controller = new DcaeCdapClusterManagerClient(c); + client = controller.client; + } + + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend() { + + try { + controller.suspend(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume() { + + try { + controller.resume(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public java.lang.String publicKey() { + java.lang.String res = null; + try { + res = controller.publicKey(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void configurationChanged() { + + try { + controller.configurationChanged(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void updateStreams(EList<org.openecomp.dcae.controller.core.stream.DcaeStream> inputStreams, EList<org.openecomp.dcae.controller.core.stream.DcaeStream> outputStreams) { + + try { + controller.updateStreams(inputStreams,outputStreams); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void logs(EList<org.openecomp.ncomp.core.logs.LogMessage> logs) { + + try { + controller.logs(null,logs); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void metrics(EList<org.openecomp.ncomp.core.metrics.Metric> metrics) { + + try { + controller.metrics(null,metrics); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void properties(EList<org.openecomp.ncomp.sirius.manager.properties.AbstractProperty> l) { + + try { + controller.properties(null,l); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void uploadInfo(EList<org.openecomp.ncomp.sirius.manager.server.ManagementInfo> info) { + + try { + controller.uploadInfo(null,info); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public EList<org.openecomp.ncomp.core.metrics.DoubleMetric> getValues(java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList<org.openecomp.ncomp.core.metrics.DoubleMetric> res = null; + try { + res = controller.getValues(null,path,start,end,option,relativeInterval); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList<org.openecomp.ncomp.core.metrics.DoubleMetric> getValuesAll(java.lang.String path, EList<java.lang.String> metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList<org.openecomp.ncomp.core.metrics.DoubleMetric> res = null; + try { + res = controller.getValuesAll(null,path,metrics,start,end,option,relativeInterval); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList<org.openecomp.ncomp.core.logs.LogMessage> getMessages(java.lang.String path, java.lang.Long start, java.lang.Long end) { + EList<org.openecomp.ncomp.core.logs.LogMessage> res = null; + try { + res = controller.getMessages(null,path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res = null; + try { + res = controller.getRequestLogger(userName,action,resourcePath,context); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList<org.openecomp.ncomp.core.function.ValuePair> evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EList<org.openecomp.ncomp.core.function.ValuePair> res = null; + try { + res = controller.evaluate(path,function); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + + try { + controller.update(path,function); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public java.lang.String createNamespace(java.lang.String namespace) { + java.lang.String res = null; + try { + res = controller.createNamespace(namespace); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String deleteNamespace(java.lang.String namespace) { + java.lang.String res = null; + try { + res = controller.deleteNamespace(namespace); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String deployApp(java.lang.String namespace, java.lang.String jarfile) { + java.lang.String res = null; + try { + res = controller.deployApp(namespace,jarfile); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + 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; + try { + res = controller.loadArtifact(namespace,artifactName,jarfile,version); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String deleteArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String artifactVersion) { + java.lang.String res = null; + try { + res = controller.deleteArtifact(namespace,artifactName,artifactVersion); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + 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; + try { + res = controller.startFlow(namespace,appName,flowId,extraArgs); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + 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; + try { + res = controller.startWorker(namespace,appName,workerId,extraArgs); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + 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; + try { + res = controller.startService(namespace,appName,serviceId,extraArgs); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String startApp(java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + try { + res = controller.startApp(namespace,appName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String stopApp(java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + try { + res = controller.stopApp(namespace,appName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String deleteApp(java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + try { + res = controller.deleteApp(namespace,appName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String loadPreferencesApp(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId) { + java.lang.String res = null; + try { + res = controller.loadPreferencesApp(namespace,prefsFile,appId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + 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; + try { + res = controller.loadPreferencesFlow(namespace,prefsFile,appId,flowId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String loadPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsFile) { + java.lang.String res = null; + try { + res = controller.loadPreferencesNameSpace(namespace,prefsFile); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setPreferencesApp(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId) { + java.lang.String res = null; + try { + res = controller.setPreferencesApp(namespace,prefsString,appId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + 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; + try { + res = controller.setPreferencesFlow(namespace,prefsString,appId,flowId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + 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; + try { + res = controller.setPreferencesWorker(namespace,prefsString,appId,workerId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + 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; + try { + res = controller.setPreferencesService(namespace,prefsString,appId,serviceId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsString) { + java.lang.String res = null; + try { + res = controller.setPreferencesNameSpace(namespace,prefsString); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + 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; + try { + res = controller.setFlowRunTimeArgs(namespace,appId,flowId,args); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + 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; + try { + res = controller.setFlowletInstances(namespace,appId,flowId,flowletId,nInstances); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String stopFlow(java.lang.String namespace, java.lang.String appId, java.lang.String flowId) { + java.lang.String res = null; + try { + res = controller.stopFlow(namespace,appId,flowId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String stopWorker(java.lang.String namespace, java.lang.String appId, java.lang.String workerId) { + java.lang.String res = null; + try { + res = controller.stopWorker(namespace,appId,workerId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String stopService(java.lang.String namespace, java.lang.String appId, java.lang.String serviceId) { + java.lang.String res = null; + try { + res = controller.stopService(namespace,appId,serviceId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String truncateDataSet(java.lang.String namespace, java.lang.String datasetName) { + java.lang.String res = null; + try { + res = controller.truncateDataSet(namespace,datasetName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String deleteDataset(java.lang.String namespace, java.lang.String datasetName) { + java.lang.String res = null; + try { + res = controller.deleteDataset(namespace,datasetName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String createStream(java.lang.String namespace, java.lang.String newStreamId) { + java.lang.String res = null; + try { + res = controller.createStream(namespace,newStreamId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String deleteStream(java.lang.String namespace, java.lang.String streamId) { + java.lang.String res = null; + try { + res = controller.deleteStream(namespace,streamId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + 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; + try { + res = controller.getStreamEvents(namespace,streamId,startTime,endTime,limit); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + 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; + try { + res = controller.getStreamStats(namespace,streamId,startTime,endTime,limit); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String sendEventToStream(java.lang.String namespace, java.lang.String streamId, java.lang.String event) { + java.lang.String res = null; + try { + res = controller.sendEventToStream(namespace,streamId,event); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String trucateStream(java.lang.String namespace, java.lang.String streamId) { + java.lang.String res = null; + try { + res = controller.trucateStream(namespace,streamId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setStreamProperties(java.lang.String namespace, java.lang.String streamId, java.lang.String propsFile) { + java.lang.String res = null; + try { + res = controller.setStreamProperties(namespace,streamId,propsFile); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String restartApp(java.lang.String namespace, java.lang.String appId, java.lang.String progTypes) { + java.lang.String res = null; + try { + res = controller.restartApp(namespace,appId,progTypes); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + 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; + try { + res = controller.createApp(namespace,appId,artifactName,artifactVersion,scope); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + 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; + try { + res = controller.createAppWithConfig(namespace,appId,artifactName,artifactVersion,scope,appConfig); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setDatasetProperties(java.lang.String namespace, java.lang.String datasetName, java.lang.String datasetProperties) { + java.lang.String res = null; + try { + res = controller.setDatasetProperties(namespace,datasetName,datasetProperties); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setStreamTTL(java.lang.String namespace, java.lang.String streamName, int ttlSeconds) { + java.lang.String res = null; + try { + res = controller.setStreamTTL(namespace,streamName,ttlSeconds); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProviderTemplate.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProviderTemplate.java new file mode 100644 index 0000000..f683359 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProviderTemplate.java @@ -0,0 +1,300 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.servers.manager; + + + + + +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 java.util.Date; + + +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; + + +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; + + +import org.openecomp.dcae.controller.service.servers.vmmanager.DcaeVirtualMachineManagerProvider; + + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; + + +public class DcaeCdapClusterManagerProviderTemplate extends DcaeVirtualMachineManagerProvider { + private static final Logger logger = Logger.getLogger(DcaeCdapClusterManagerProviderTemplate.class); + CdapClusterManager o; + + public DcaeCdapClusterManagerProviderTemplate(ISiriusServer controller, CdapClusterManager o) { + super(controller, o); + this.o = o; + } + + 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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerServer.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerServer.java new file mode 100644 index 0000000..93dac4b --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerServer.java @@ -0,0 +1,115 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.servers.manager; + +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.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; + + +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui.DcaeModelFactory; + + + + + +public class DcaeCdapClusterManagerServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeCdapClusterManagerServer.class); + String serverPath; + ManagementServer server; + DcaeCdapClusterManager controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeManagerFactory f = new DcaeManagerFactory(this); + + + String guiPath; + ManagementServer guiServer; + + + public DcaeCdapClusterManagerServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeCdapClusterManager.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "CdapClusterManager", serverPath, filename); + server.addFactory(f); + + server.addFactory(new org.openecomp.ncomp.servers.cdap.CdapCdapFactory(this)); + + + server.addFactory(org.openecomp.dcae.controller.service.cdap.cluster.service.ServiceFactory.eINSTANCE); + + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeCdapClusterManager) server.find("/").o; + webServer = new Jetty8Server("manager.properties"); + webServer.add("/resources",server); + + + + EFactory guiFactory = new DcaeModelFactory(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")); + + DcaeCdapClusterManagerServer s = new DcaeCdapClusterManagerServer("manager.properties"); + s.runWebserver(); + } + public CdapClusterManager getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeManagerFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeManagerFactory.java new file mode 100644 index 0000000..def52bf --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeManagerFactory.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.dcae.controller.service.cdap.cluster.servers.manager; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.ManagerFactoryImpl; + + + + + +public class DcaeManagerFactory extends ManagerFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeManagerFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ManagerPackage.eINSTANCE; } + public DcaeManagerFactory(ISiriusServer server) { + this.server = server; + } + @Override + public CdapClusterManager createCdapClusterManager() { + return new DcaeCdapClusterManager(server); + } + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApi.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApi.java new file mode 100644 index 0000000..8c4d9e0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApi.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.dcae.controller.service.cdap.cluster.servers.manager.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.dcae.controller.service.cdap.cluster.servers.manager.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 DcaeGuiClientApi extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApi.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeGuiClientApiProvider controller; + ISiriusServer server; + + public DcaeGuiClientApi(ISiriusServer server) { + this.server = server; + this.controller = new DcaeGuiClientApiProvider(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() { + DcaeGuiClientApiProvider.ecoreSetup(); + } + public DcaeGuiClientApiProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiClient.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiClient.java new file mode 100644 index 0000000..b7197f8 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiClient.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.dcae.controller.service.cdap.cluster.servers.manager.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.dcae.controller.service.cdap.cluster.servers.manager.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui.logging.GuiClientApiMessageEnum; + + +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.DcaeCdapClusterManager; + + + + +@SuppressWarnings("unchecked") +public class DcaeGuiClientApiClient extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeGuiClientApiClient(String file, String name) { + DcaeCdapClusterManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/gui", this); + } + + public DcaeGuiClientApiClient(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 DcaeGuiClientApiClient(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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiConsole.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiConsole.java new file mode 100644 index 0000000..0ea2c50 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiConsole.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.dcae.controller.service.cdap.cluster.servers.manager.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 DcaeGuiClientApiConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeGuiClientApiConsole.class); + protected DcaeGuiClientApiClient controller; + + + + + public DcaeGuiClientApiConsole(String filename, String name) { + super(filename, name); + controller = new DcaeGuiClientApiClient(filename,name); + client = controller.client; + + } + + public DcaeGuiClientApiConsole(AbstractClient c) { + controller = new DcaeGuiClientApiClient(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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java new file mode 100644 index 0000000..d4e992d --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiProviderTemplate.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.dcae.controller.service.cdap.cluster.servers.manager.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 DcaeGuiClientApiProviderTemplate extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(DcaeGuiClientApiProviderTemplate.class); + GuiClientApi o; + + public DcaeGuiClientApiProviderTemplate(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeModelFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeModelFactory.java new file mode 100644 index 0000000..2777e62 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeModelFactory.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.dcae.controller.service.cdap.cluster.servers.manager.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.dcae.controller.service.cdap.cluster.servers.manager.DcaeCdapClusterManagerServer; + + + +public class DcaeModelFactory extends ModelFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeModelFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ModelPackage.eINSTANCE; } + public DcaeModelFactory(ISiriusServer server) { + this.server = server; + } + @Override + public GuiClientApi createGuiClientApi() { + return new DcaeGuiClientApi(server); + } + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApi.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApi.properties new file mode 100644 index 0000000..8705ab8 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiMessageEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiMessageEnum.java new file mode 100644 index 0000000..29983b0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/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.dcae.controller.service.cdap.cluster.servers.manager.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.dcae.controller.service.cdap.cluster.servers.manager.gui.logging.GuiClientApi"); + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiOperationEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiOperationEnum.java new file mode 100644 index 0000000..7ae8593 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/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.dcae.controller.service.cdap.cluster.servers.manager.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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManager.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManager.properties new file mode 100644 index 0000000..4f94eae --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManager.properties @@ -0,0 +1,654 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +publicKey=\ + publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +configurationChanged=\ + configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateStreams=\ + updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +logs=\ + logs-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +metrics=\ + metrics-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +properties=\ + properties-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +uploadInfo=\ + uploadInfo-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getValues=\ + getValues-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getValuesAll=\ + getValuesAll-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getMessages=\ + getMessages-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getRequestLogger=\ + getRequestLogger-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +evaluate=\ + evaluate-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +update=\ + update-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +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 + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_publicKey=\ + REMOTE-publicKey-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_configurationChanged=\ + REMOTE-configurationChanged-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateStreams=\ + REMOTE-updateStreams-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_logs=\ + REMOTE-logs-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_metrics=\ + REMOTE-metrics-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_properties=\ + REMOTE-properties-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_uploadInfo=\ + REMOTE-uploadInfo-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getValues=\ + REMOTE-getValues-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getValuesAll=\ + REMOTE-getValuesAll-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getMessages=\ + REMOTE-getMessages-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getRequestLogger=\ + REMOTE-getRequestLogger-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_evaluate=\ + REMOTE-evaluate-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_update=\ + REMOTE-update-FAILED-5001W|\ + {0}|\ + null|\ + Remote 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 diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerMessageEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerMessageEnum.java new file mode 100644 index 0000000..d632aa7 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerMessageEnum.java @@ -0,0 +1,143 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.servers.manager.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum CdapClusterManagerMessageEnum implements EcompMessageEnum { + + dummy, + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + logs, + metrics, + properties, + uploadInfo, + getValues, + getValuesAll, + getMessages, + getRequestLogger, + evaluate, + update, + 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, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams, + REMOTE_logs, + REMOTE_metrics, + REMOTE_properties, + REMOTE_uploadInfo, + REMOTE_getValues, + REMOTE_getValuesAll, + REMOTE_getMessages, + REMOTE_getRequestLogger, + REMOTE_evaluate, + REMOTE_update, + 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; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.logging.CdapClusterManager"); + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerOperationEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerOperationEnum.java new file mode 100644 index 0000000..64bca0c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerOperationEnum.java @@ -0,0 +1,137 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.servers.manager.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum CdapClusterManagerOperationEnum implements EcompOperationEnum { + + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + logs, + metrics, + properties, + uploadInfo, + getValues, + getValuesAll, + getMessages, + getRequestLogger, + evaluate, + update, + 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, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams, + REMOTE_logs, + REMOTE_metrics, + REMOTE_properties, + REMOTE_uploadInfo, + REMOTE_getValues, + REMOTE_getValuesAll, + REMOTE_getMessages, + REMOTE_getRequestLogger, + REMOTE_evaluate, + REMOTE_update, + 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; +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterService.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterService.java new file mode 100644 index 0000000..e805e70 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterService.java @@ -0,0 +1,381 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.servers.service; + + + +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.dcae.controller.service.cdap.cluster.servers.service.logging.CdapClusterServiceOperationEnum; + + + + +import org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceImpl; + + + +public class DcaeCdapClusterService extends CdapClusterServiceImpl implements ISiriusPlugin { + public static final Logger logger = Logger.getLogger(DcaeCdapClusterService.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeCdapClusterServiceProvider controller; + ISiriusServer server; + + public DcaeCdapClusterService(ISiriusServer server) { + this.server = server; + this.controller = new DcaeCdapClusterServiceProvider(server,this); + } + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.START, duration_,instanceName,containerPath); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.deploy); + try { + controller.deploy(instanceName,containerPath); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.ERROR, duration_,instanceName,containerPath); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.OKAY, duration_,instanceName,containerPath); + + } + + public void undeploy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.undeploy); + try { + controller.undeploy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.test); + try { + res = controller.test(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "test", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public void suspend(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.suspend); + try { + controller.suspend(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void resume(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.resume); + try { + controller.resume(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resume", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.pushManagerConfiguration); + try { + controller.pushManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.pollManagerConfiguration); + try { + controller.pollManagerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.managerConfiguration); + try { + res = controller.managerConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.START, duration_,instanceName,operation,parameters); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.managerOperation); + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.ERROR, duration_,instanceName,operation,parameters); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.OKAY, duration_,instanceName,operation,parameters); + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.updateConfigurationFromPolicy); + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + public void runHealthTests() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.runHealthTests); + try { + controller.runHealthTests(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", 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, "runHealthTests", ApiRequestStatus.OKAY, duration_); + + } + + public void updateDeploymentStatus() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.updateDeploymentStatus); + try { + controller.updateDeploymentStatus(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", 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, "updateDeploymentStatus", ApiRequestStatus.OKAY, duration_); + + } + + + + + + + @Override + public void start() { + controller.start(); + } + + public static void ecoreSetup() { + DcaeCdapClusterServiceProvider.ecoreSetup(); + } + public DcaeCdapClusterServiceProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceClient.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceClient.java new file mode 100644 index 0000000..102cacd --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceClient.java @@ -0,0 +1,276 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.servers.service; + +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.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceImpl; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.service.logging.CdapClusterServiceOperationEnum; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.service.logging.CdapClusterServiceMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeCdapClusterServiceClient extends CdapClusterServiceImpl { + public static final Logger logger = Logger.getLogger(DcaeCdapClusterServiceClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeCdapClusterServiceClient(String file, String name) { + DcaeCdapClusterService.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeCdapClusterServiceClient(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 DcaeCdapClusterServiceClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_deploy); + + try { + client.operationPath("/resources", c, "deploy", null, instanceName,containerPath); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_deploy, e.toString()); + throw new RuntimeException("remote call failed: deploy", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void undeploy(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_undeploy); + + try { + client.operationPath("/resources", c, "undeploy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_undeploy, e.toString()); + throw new RuntimeException("remote call failed: undeploy", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_test); + org.openecomp.dcae.controller.core.service.HealthTestResponse res; + try { + res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: test", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: suspend", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: resume", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pushManagerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_pushManagerConfiguration); + + try { + client.operationPath("/resources", c, "pushManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_pushManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: pushManagerConfiguration", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pollManagerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_pollManagerConfiguration); + + try { + client.operationPath("/resources", c, "pollManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_pollManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: pollManagerConfiguration", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_managerConfiguration); + org.eclipse.emf.ecore.EObject res; + try { + res = (org.eclipse.emf.ecore.EObject) client.operationPath("/resources", c, "managerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_managerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: managerConfiguration", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_managerOperation); + org.json.JSONObject res; + try { + res = (org.json.JSONObject) client.operationPath("/resources", c, "managerOperation", null, instanceName,operation,parameters); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_managerOperation, e.toString()); + throw new RuntimeException("remote call failed: managerOperation", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_updateConfigurationFromPolicy); + + try { + client.operationPath("/resources", c, "updateConfigurationFromPolicy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_updateConfigurationFromPolicy, e.toString()); + throw new RuntimeException("remote call failed: updateConfigurationFromPolicy", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void runHealthTests() { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_runHealthTests); + + try { + client.operationPath("/resources", c, "runHealthTests", null); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_runHealthTests, e.toString()); + throw new RuntimeException("remote call failed: runHealthTests", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void updateDeploymentStatus() { + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_updateDeploymentStatus); + + try { + client.operationPath("/resources", c, "updateDeploymentStatus", null); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_updateDeploymentStatus, e.toString()); + throw new RuntimeException("remote call failed: updateDeploymentStatus", e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceConsole.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceConsole.java new file mode 100644 index 0000000..0e96795 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceConsole.java @@ -0,0 +1,189 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.servers.service; + + +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 DcaeCdapClusterServiceConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeCdapClusterServiceConsole.class); + protected DcaeCdapClusterServiceClient controller; + + + + + public DcaeCdapClusterServiceConsole(String filename, String name) { + super(filename, name); + controller = new DcaeCdapClusterServiceClient(filename,name); + client = controller.client; + + } + + public DcaeCdapClusterServiceConsole(AbstractClient c) { + controller = new DcaeCdapClusterServiceClient(c); + client = controller.client; + } + + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + try { + controller.deploy(instanceName,containerPath); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void undeploy(java.lang.String instanceName) { + + try { + controller.undeploy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + try { + res = controller.test(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void suspend(java.lang.String instanceName) { + + try { + controller.suspend(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void resume(java.lang.String instanceName) { + + try { + controller.resume(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pushManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + try { + controller.pollManagerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + try { + res = controller.managerConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + try { + res = controller.managerOperation(instanceName,operation,parameters); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + try { + controller.updateConfigurationFromPolicy(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void runHealthTests() { + + try { + controller.runHealthTests(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void updateDeploymentStatus() { + + try { + controller.updateDeploymentStatus(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceProviderTemplate.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceProviderTemplate.java new file mode 100644 index 0000000..9f9c8a4 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceProviderTemplate.java @@ -0,0 +1,65 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.servers.service; + + + + + +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.dcae.controller.service.servers.vm.DcaeVirtualMachineServiceProvider; + + +import org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceImpl; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService; + + +public class DcaeCdapClusterServiceProviderTemplate extends DcaeVirtualMachineServiceProvider { + private static final Logger logger = Logger.getLogger(DcaeCdapClusterServiceProviderTemplate.class); + CdapClusterService o; + + public DcaeCdapClusterServiceProviderTemplate(ISiriusServer controller, CdapClusterService o) { + super(controller, o); + this.o = o; + } + + + + + + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceServer.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceServer.java new file mode 100644 index 0000000..69ba3f6 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceServer.java @@ -0,0 +1,98 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.servers.service; + +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.dcae.controller.service.cdap.cluster.service.CdapClusterService; + + + + + + +public class DcaeCdapClusterServiceServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeCdapClusterServiceServer.class); + String serverPath; + ManagementServer server; + DcaeCdapClusterService controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeServiceFactory f = new DcaeServiceFactory(this); + + + + public DcaeCdapClusterServiceServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeCdapClusterService.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "CdapClusterService", serverPath, filename); + server.addFactory(f); + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeCdapClusterService) server.find("/").o; + webServer = new Jetty8Server("service.properties"); + webServer.add("/resources",server); + + + + + + 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")); + + DcaeCdapClusterServiceServer s = new DcaeCdapClusterServiceServer("service.properties"); + s.runWebserver(); + } + public CdapClusterService getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeServiceFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeServiceFactory.java new file mode 100644 index 0000000..9d3fd2a --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeServiceFactory.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.dcae.controller.service.cdap.cluster.servers.service; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; +import org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServiceFactoryImpl; + + + + + +public class DcaeServiceFactory extends ServiceFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeServiceFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ServicePackage.eINSTANCE; } + public DcaeServiceFactory(ISiriusServer server) { + this.server = server; + } + @Override + public CdapClusterService createCdapClusterService() { + return new DcaeCdapClusterService(server); + } + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterService.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterService.properties new file mode 100644 index 0000000..d32cf07 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterService.properties @@ -0,0 +1,150 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +deploy=\ + deploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +undeploy=\ + undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +test=\ + test-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +suspend=\ + suspend-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +resume=\ + resume-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pushManagerConfiguration=\ + pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +pollManagerConfiguration=\ + pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerConfiguration=\ + managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +managerOperation=\ + managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateConfigurationFromPolicy=\ + updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +runHealthTests=\ + runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +updateDeploymentStatus=\ + updateDeploymentStatus-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_deploy=\ + REMOTE-deploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_undeploy=\ + REMOTE-undeploy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_test=\ + REMOTE-test-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_suspend=\ + REMOTE-suspend-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_resume=\ + REMOTE-resume-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pushManagerConfiguration=\ + REMOTE-pushManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_pollManagerConfiguration=\ + REMOTE-pollManagerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerConfiguration=\ + REMOTE-managerConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_managerOperation=\ + REMOTE-managerOperation-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateConfigurationFromPolicy=\ + REMOTE-updateConfigurationFromPolicy-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_runHealthTests=\ + REMOTE-runHealthTests-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_updateDeploymentStatus=\ + REMOTE-updateDeploymentStatus-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceMessageEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceMessageEnum.java new file mode 100644 index 0000000..9ed14d2 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceMessageEnum.java @@ -0,0 +1,59 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.servers.service.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum CdapClusterServiceMessageEnum implements EcompMessageEnum { + + dummy, + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + updateDeploymentStatus, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests, + REMOTE_updateDeploymentStatus; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.cdap.cluster.servers.service.logging.CdapClusterService"); + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceOperationEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceOperationEnum.java new file mode 100644 index 0000000..b105151 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceOperationEnum.java @@ -0,0 +1,53 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.servers.service.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum CdapClusterServiceOperationEnum implements EcompOperationEnum { + + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + updateDeploymentStatus, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests, + REMOTE_updateDeploymentStatus; +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.classpath b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.classpath new file mode 100644 index 0000000..69b19c6 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.classpath @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" output="target/classes" path="src/main/xcore"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" path="src/main/xcore-gen"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <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="output" path="target/classes"/> +</classpath> diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.gitignore b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.project b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.project new file mode 100644 index 0000000..8a12b36 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.project @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>dcae-controller-service-cdap-cluster-model</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> + <arguments> + </arguments> + </buildCommand> + <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> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> + </natures> +</projectDescription> diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/LICENSE.txt b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/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/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/META-INF/MANIFEST.MF b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..b51eaa7 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/META-INF/MANIFEST.MF @@ -0,0 +1,30 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: dcae-controller-service-cdap-cluster-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.openecomp.dcae.controller.service.cdap.cluster.manager, + org.openecomp.dcae.controller.service.cdap.cluster.manager.impl, + org.openecomp.dcae.controller.service.cdap.cluster.manager.util, + org.openecomp.dcae.controller.service.cdap.cluster.service, + org.openecomp.dcae.controller.service.cdap.cluster.service.impl, + org.openecomp.dcae.controller.service.cdap.cluster.service.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + dcae-controller-core-model;visibility:=reexport, + ncomp-core-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-openstack-model;visibility:=reexport, + ncomp-sirius-manager-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + dcae-controller-service-vm-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-sirius-manager-agent-model;visibility:=reexport, + dcae-controller-service-cdap-cluster-model;visibility:=reexport, + ncomp-cdap-model;bundle-version="0.1.0";visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/build.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/build.properties new file mode 100644 index 0000000..6d35b6f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/build.properties @@ -0,0 +1,11 @@ +# + +bin.includes = .,\ + src/main/xcore/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/main/xcore-gen/,\ + src/main/xcore/ +output.. = target/classes/ diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/plugin.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/plugin.properties new file mode 100644 index 0000000..04852d2 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Router Model +providerName = www.example.org diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/plugin.xml b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/plugin.xml new file mode 100644 index 0000000..f22fe64 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/plugin.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<!-- +--> + +<plugin> + + <extension point="org.eclipse.emf.ecore.generated_package"> + <!-- @generated service --> + <package + uri="org.openecomp.dcae.controller.service.cdap.cluster.service" + class="org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage" + genModel="src/main/xcore/service.xcore"/> + </extension> + + <extension point="org.eclipse.emf.ecore.generated_package"> + <!-- @generated manager --> + <package + uri="org.openecomp.dcae.controller.service.cdap.cluster.manager" + class="org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage" + genModel="src/main/xcore/manager.xcore"/> + </extension> + +</plugin> diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/pom.xml b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/pom.xml new file mode 100644 index 0000000..38eec3e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/pom.xml @@ -0,0 +1,29 @@ +<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.dcae.controller</groupId> + <artifactId>dcae-controller-service-cdap-cluster-model</artifactId> + <parent> + <groupId>org.openecomp.ncomp.maven</groupId> + <artifactId>ncomp-maven-xcore</artifactId> + <version>0.1.0-SNAPSHOT</version> + <relativePath>../../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-xcore</relativePath> + </parent> + <dependencies> + <dependency> + <groupId>org.openecomp.ncomp.sirius.manager</groupId> + <artifactId>ncomp-sirius-manager-model</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.dcae.controller</groupId> + <artifactId>dcae-controller-service-vm-model</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.ncomp.cdap</groupId> + <artifactId>ncomp-cdap-model</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> +</project> diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/CdapClusterManager.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/CdapClusterManager.java new file mode 100644 index 0000000..a9f4d9b --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/CdapClusterManager.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.dcae.controller.service.cdap.cluster.manager; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; +import org.openecomp.ncomp.cdap.CdapApi; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Cdap Cluster Manager</b></em>'. + * <!-- end-user-doc --> + * + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage#getCdapClusterManager() + * @model + * @generated + */ +public interface CdapClusterManager extends VirtualMachineManager, CdapClusterConfiguration, CdapApi { +} // CdapClusterManager diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerFactory.java new file mode 100644 index 0000000..38851c4 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerFactory.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.dcae.controller.service.cdap.cluster.manager; + +import org.eclipse.emf.ecore.EFactory; + +/** + * <!-- begin-user-doc --> + * The <b>Factory</b> for the model. + * It provides a create method for each non-abstract class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage + * @generated + */ +public interface ManagerFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + ManagerFactory eINSTANCE = org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.ManagerFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Cdap Cluster Manager</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Cdap Cluster Manager</em>'. + * @generated + */ + CdapClusterManager createCdapClusterManager(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the package supported by this factory. + * @generated + */ + ManagerPackage getManagerPackage(); + +} //ManagerFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerPackage.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerPackage.java new file mode 100644 index 0000000..8523dea --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerPackage.java @@ -0,0 +1,685 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.manager; + +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +/** + * <!-- begin-user-doc --> + * The <b>Package</b> for the model. + * It contains accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service.cdap.cluster'" + * @generated + */ +public interface ManagerPackage extends EPackage { + /** + * The package name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "manager"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.cdap.cluster.manager"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "manager"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + ManagerPackage eINSTANCE = org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.ManagerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl <em>Cdap Cluster Manager</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.ManagerPackageImpl#getCdapClusterManager() + * @generated + */ + int CDAP_CLUSTER_MANAGER = 0; + + /** + * The feature id for the '<em><b>Input Streams</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER__INPUT_STREAMS = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__INPUT_STREAMS; + + /** + * The feature id for the '<em><b>Output Streams</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER__OUTPUT_STREAMS = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__OUTPUT_STREAMS; + + /** + * The feature id for the '<em><b>Configuration</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER__CONFIGURATION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION; + + /** + * The feature id for the '<em><b>Component</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER__COMPONENT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT; + + /** + * The feature id for the '<em><b>Cluster</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER__CLUSTER = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Cdap Cluster Manager</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER_FEATURE_COUNT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 1; + + /** + * The operation id for the '<em>Test</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___TEST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___TEST; + + /** + * The operation id for the '<em>Suspend</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SUSPEND = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___SUSPEND; + + /** + * The operation id for the '<em>Resume</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___RESUME = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___RESUME; + + /** + * The operation id for the '<em>Public Key</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___PUBLIC_KEY = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___PUBLIC_KEY; + + /** + * The operation id for the '<em>Configuration Changed</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___CONFIGURATION_CHANGED = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___CONFIGURATION_CHANGED; + + /** + * The operation id for the '<em>Update Streams</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___UPDATE_STREAMS__ELIST_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPDATE_STREAMS__ELIST_ELIST; + + /** + * The operation id for the '<em>Logs</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___LOGS__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___LOGS__JSONOBJECT_ELIST; + + /** + * The operation id for the '<em>Metrics</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___METRICS__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___METRICS__JSONOBJECT_ELIST; + + /** + * The operation id for the '<em>Properties</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___PROPERTIES__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___PROPERTIES__JSONOBJECT_ELIST; + + /** + * The operation id for the '<em>Upload Info</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___UPLOAD_INFO__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPLOAD_INFO__JSONOBJECT_ELIST; + + /** + * The operation id for the '<em>Get Values</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + + /** + * The operation id for the '<em>Get Values All</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + + /** + * The operation id for the '<em>Get Messages</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG; + + /** + * The operation id for the '<em>Get Request Logger</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT; + + /** + * The operation id for the '<em>Evaluate</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___EVALUATE__STRING_FUNCTION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___EVALUATE__STRING_FUNCTION; + + /** + * The operation id for the '<em>Update</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___UPDATE__STRING_FUNCTION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPDATE__STRING_FUNCTION; + + /** + * The operation id for the '<em>Create Namespace</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___CREATE_NAMESPACE__STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 0; + + /** + * The operation id for the '<em>Delete Namespace</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___DELETE_NAMESPACE__STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 1; + + /** + * The operation id for the '<em>Deploy App</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___DEPLOY_APP__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 2; + + /** + * The operation id for the '<em>Load Artifact</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___LOAD_ARTIFACT__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 3; + + /** + * The operation id for the '<em>Delete Artifact</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___DELETE_ARTIFACT__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 4; + + /** + * The operation id for the '<em>Start Flow</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___START_FLOW__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 5; + + /** + * The operation id for the '<em>Start Worker</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___START_WORKER__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 6; + + /** + * The operation id for the '<em>Start Service</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___START_SERVICE__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 7; + + /** + * The operation id for the '<em>Start App</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___START_APP__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 8; + + /** + * The operation id for the '<em>Stop App</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___STOP_APP__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 9; + + /** + * The operation id for the '<em>Delete App</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___DELETE_APP__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 10; + + /** + * The operation id for the '<em>Load Preferences App</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_APP__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 11; + + /** + * The operation id for the '<em>Load Preferences Flow</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 12; + + /** + * The operation id for the '<em>Load Preferences Name Space</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 13; + + /** + * The operation id for the '<em>Set Preferences App</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_PREFERENCES_APP__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 14; + + /** + * The operation id for the '<em>Set Preferences Flow</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_PREFERENCES_FLOW__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 15; + + /** + * The operation id for the '<em>Set Preferences Worker</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_PREFERENCES_WORKER__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 16; + + /** + * The operation id for the '<em>Set Preferences Service</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_PREFERENCES_SERVICE__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 17; + + /** + * The operation id for the '<em>Set Preferences Name Space</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_PREFERENCES_NAME_SPACE__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 18; + + /** + * The operation id for the '<em>Set Flow Run Time Args</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_FLOW_RUN_TIME_ARGS__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 19; + + /** + * The operation id for the '<em>Set Flowlet Instances</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_FLOWLET_INSTANCES__STRING_STRING_STRING_STRING_INT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 20; + + /** + * The operation id for the '<em>Stop Flow</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___STOP_FLOW__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 21; + + /** + * The operation id for the '<em>Stop Worker</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___STOP_WORKER__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 22; + + /** + * The operation id for the '<em>Stop Service</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___STOP_SERVICE__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 23; + + /** + * The operation id for the '<em>Truncate Data Set</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___TRUNCATE_DATA_SET__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 24; + + /** + * The operation id for the '<em>Delete Dataset</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___DELETE_DATASET__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 25; + + /** + * The operation id for the '<em>Create Stream</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___CREATE_STREAM__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 26; + + /** + * The operation id for the '<em>Delete Stream</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___DELETE_STREAM__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 27; + + /** + * The operation id for the '<em>Get Stream Events</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___GET_STREAM_EVENTS__STRING_STRING_STRING_STRING_INT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 28; + + /** + * The operation id for the '<em>Get Stream Stats</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___GET_STREAM_STATS__STRING_STRING_STRING_STRING_INT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 29; + + /** + * The operation id for the '<em>Send Event To Stream</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SEND_EVENT_TO_STREAM__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 30; + + /** + * The operation id for the '<em>Trucate Stream</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___TRUCATE_STREAM__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 31; + + /** + * The operation id for the '<em>Set Stream Properties</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_STREAM_PROPERTIES__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 32; + + /** + * The operation id for the '<em>Restart App</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___RESTART_APP__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 33; + + /** + * The operation id for the '<em>Create App</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___CREATE_APP__STRING_STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 34; + + /** + * The operation id for the '<em>Create App With Config</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___CREATE_APP_WITH_CONFIG__STRING_STRING_STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 35; + + /** + * The operation id for the '<em>Set Dataset Properties</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_DATASET_PROPERTIES__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 36; + + /** + * The operation id for the '<em>Set Stream TTL</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_STREAM_TTL__STRING_STRING_INT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 37; + + /** + * The number of operations of the '<em>Cdap Cluster Manager</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER_OPERATION_COUNT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 38; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager <em>Cdap Cluster Manager</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Cdap Cluster Manager</em>'. + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager + * @generated + */ + EClass getCdapClusterManager(); + + /** + * Returns the factory that creates the instances of the model. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the factory that creates the instances of the model. + * @generated + */ + ManagerFactory getManagerFactory(); + + /** + * <!-- begin-user-doc --> + * Defines literals for the meta objects that represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl <em>Cdap Cluster Manager</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.ManagerPackageImpl#getCdapClusterManager() + * @generated + */ + EClass CDAP_CLUSTER_MANAGER = eINSTANCE.getCdapClusterManager(); + + } + +} //ManagerPackage diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/CdapClusterManagerImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/CdapClusterManagerImpl.java new file mode 100644 index 0000000..1ff134b --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/CdapClusterManagerImpl.java @@ -0,0 +1,806 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.manager.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; +import org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl; +import org.openecomp.ncomp.cdap.CdapApi; +import org.openecomp.ncomp.cdap.CdapCluster; +import org.openecomp.ncomp.cdap.CdapPackage; +import java.lang.reflect.InvocationTargetException; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Cdap Cluster Manager</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl#getCluster <em>Cluster</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CdapClusterManagerImpl extends VirtualMachineManagerImpl implements CdapClusterManager { + /** + * The cached value of the '{@link #getCluster() <em>Cluster</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCluster() + * @generated + * @ordered + */ + protected CdapCluster cluster; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CdapClusterManagerImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ManagerPackage.Literals.CDAP_CLUSTER_MANAGER; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapCluster getCluster() { + return cluster; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetCluster(CdapCluster newCluster, NotificationChain msgs) { + CdapCluster oldCluster = cluster; + cluster = newCluster; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER, oldCluster, newCluster); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCluster(CdapCluster newCluster) { + if (newCluster != cluster) { + NotificationChain msgs = null; + if (cluster != null) + msgs = ((InternalEObject)cluster).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER, null, msgs); + if (newCluster != null) + msgs = ((InternalEObject)newCluster).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER, null, msgs); + msgs = basicSetCluster(newCluster, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER, newCluster, newCluster)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String createNamespace(String namespace) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String deleteNamespace(String namespace) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String deployApp(String namespace, String jarfile) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String loadArtifact(String namespace, String artifactName, String jarfile, String version) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String deleteArtifact(String namespace, String artifactName, String artifactVersion) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String startFlow(String namespace, String appName, String flowId, String extraArgs) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String startWorker(String namespace, String appName, String workerId, String extraArgs) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String startService(String namespace, String appName, String serviceId, String extraArgs) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String startApp(String namespace, String appName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String stopApp(String namespace, String appName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String deleteApp(String namespace, String appName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String loadPreferencesApp(String namespace, String prefsFile, String appId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String loadPreferencesFlow(String namespace, String prefsFile, String appId, String flowId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String loadPreferencesNameSpace(String namespace, String prefsFile) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setPreferencesApp(String namespace, String prefsString, String appId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setPreferencesFlow(String namespace, String prefsString, String appId, String flowId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setPreferencesWorker(String namespace, String prefsString, String appId, String workerId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setPreferencesService(String namespace, String prefsString, String appId, String serviceId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setPreferencesNameSpace(String namespace, String prefsString) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setFlowRunTimeArgs(String namespace, String appId, String flowId, String args) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setFlowletInstances(String namespace, String appId, String flowId, String flowletId, int nInstances) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String stopFlow(String namespace, String appId, String flowId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String stopWorker(String namespace, String appId, String workerId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String stopService(String namespace, String appId, String serviceId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String truncateDataSet(String namespace, String datasetName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String deleteDataset(String namespace, String datasetName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String createStream(String namespace, String newStreamId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String deleteStream(String namespace, String streamId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<String> getStreamEvents(String namespace, String streamId, String startTime, String endTime, int limit) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<String> getStreamStats(String namespace, String streamId, String startTime, String endTime, int limit) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String sendEventToStream(String namespace, String streamId, String event) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String trucateStream(String namespace, String streamId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setStreamProperties(String namespace, String streamId, String propsFile) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String restartApp(String namespace, String appId, String progTypes) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String createApp(String namespace, String appId, String artifactName, String artifactVersion, String scope) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String createAppWithConfig(String namespace, String appId, String artifactName, String artifactVersion, String scope, String appConfig) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setDatasetProperties(String namespace, String datasetName, String datasetProperties) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setStreamTTL(String namespace, String streamName, int ttlSeconds) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER: + return basicSetCluster(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER: + return getCluster(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER: + setCluster((CdapCluster)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER: + setCluster((CdapCluster)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER: + return cluster != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { + if (baseClass == CdapClusterConfiguration.class) { + switch (derivedFeatureID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER: return ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER; + default: return -1; + } + } + if (baseClass == CdapApi.class) { + switch (derivedFeatureID) { + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) { + if (baseClass == CdapClusterConfiguration.class) { + switch (baseFeatureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: return ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER; + default: return -1; + } + } + if (baseClass == CdapApi.class) { + switch (baseFeatureID) { + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eDerivedOperationID(int baseOperationID, Class<?> baseClass) { + if (baseClass == CdapClusterConfiguration.class) { + switch (baseOperationID) { + default: return -1; + } + } + if (baseClass == CdapApi.class) { + switch (baseOperationID) { + case CdapPackage.CDAP_API___CREATE_NAMESPACE__STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_NAMESPACE__STRING; + case CdapPackage.CDAP_API___DELETE_NAMESPACE__STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_NAMESPACE__STRING; + case CdapPackage.CDAP_API___DEPLOY_APP__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___DEPLOY_APP__STRING_STRING; + case CdapPackage.CDAP_API___LOAD_ARTIFACT__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_ARTIFACT__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___DELETE_ARTIFACT__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_ARTIFACT__STRING_STRING_STRING; + case CdapPackage.CDAP_API___START_FLOW__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___START_FLOW__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___START_WORKER__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___START_WORKER__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___START_SERVICE__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___START_SERVICE__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___START_APP__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___START_APP__STRING_STRING; + case CdapPackage.CDAP_API___STOP_APP__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_APP__STRING_STRING; + case CdapPackage.CDAP_API___DELETE_APP__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_APP__STRING_STRING; + case CdapPackage.CDAP_API___LOAD_PREFERENCES_APP__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_APP__STRING_STRING_STRING; + case CdapPackage.CDAP_API___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_APP__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_APP__STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_FLOW__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_FLOW__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_WORKER__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_WORKER__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_SERVICE__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_SERVICE__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_NAME_SPACE__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_NAME_SPACE__STRING_STRING; + case CdapPackage.CDAP_API___SET_FLOW_RUN_TIME_ARGS__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_FLOW_RUN_TIME_ARGS__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_FLOWLET_INSTANCES__STRING_STRING_STRING_STRING_INT: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_FLOWLET_INSTANCES__STRING_STRING_STRING_STRING_INT; + case CdapPackage.CDAP_API___STOP_FLOW__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_FLOW__STRING_STRING_STRING; + case CdapPackage.CDAP_API___STOP_WORKER__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_WORKER__STRING_STRING_STRING; + case CdapPackage.CDAP_API___STOP_SERVICE__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_SERVICE__STRING_STRING_STRING; + case CdapPackage.CDAP_API___TRUNCATE_DATA_SET__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___TRUNCATE_DATA_SET__STRING_STRING; + case CdapPackage.CDAP_API___DELETE_DATASET__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_DATASET__STRING_STRING; + case CdapPackage.CDAP_API___CREATE_STREAM__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_STREAM__STRING_STRING; + case CdapPackage.CDAP_API___DELETE_STREAM__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_STREAM__STRING_STRING; + case CdapPackage.CDAP_API___GET_STREAM_EVENTS__STRING_STRING_STRING_STRING_INT: return ManagerPackage.CDAP_CLUSTER_MANAGER___GET_STREAM_EVENTS__STRING_STRING_STRING_STRING_INT; + case CdapPackage.CDAP_API___GET_STREAM_STATS__STRING_STRING_STRING_STRING_INT: return ManagerPackage.CDAP_CLUSTER_MANAGER___GET_STREAM_STATS__STRING_STRING_STRING_STRING_INT; + case CdapPackage.CDAP_API___SEND_EVENT_TO_STREAM__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SEND_EVENT_TO_STREAM__STRING_STRING_STRING; + case CdapPackage.CDAP_API___TRUCATE_STREAM__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___TRUCATE_STREAM__STRING_STRING; + case CdapPackage.CDAP_API___SET_STREAM_PROPERTIES__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_STREAM_PROPERTIES__STRING_STRING_STRING; + case CdapPackage.CDAP_API___RESTART_APP__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___RESTART_APP__STRING_STRING_STRING; + case CdapPackage.CDAP_API___CREATE_APP__STRING_STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_APP__STRING_STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___CREATE_APP_WITH_CONFIG__STRING_STRING_STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_APP_WITH_CONFIG__STRING_STRING_STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_DATASET_PROPERTIES__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_DATASET_PROPERTIES__STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_STREAM_TTL__STRING_STRING_INT: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_STREAM_TTL__STRING_STRING_INT; + default: return -1; + } + } + return super.eDerivedOperationID(baseOperationID, baseClass); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_NAMESPACE__STRING: + return createNamespace((String)arguments.get(0)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_NAMESPACE__STRING: + return deleteNamespace((String)arguments.get(0)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___DEPLOY_APP__STRING_STRING: + return deployApp((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_ARTIFACT__STRING_STRING_STRING_STRING: + return loadArtifact((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_ARTIFACT__STRING_STRING_STRING: + return deleteArtifact((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___START_FLOW__STRING_STRING_STRING_STRING: + return startFlow((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___START_WORKER__STRING_STRING_STRING_STRING: + return startWorker((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___START_SERVICE__STRING_STRING_STRING_STRING: + return startService((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___START_APP__STRING_STRING: + return startApp((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_APP__STRING_STRING: + return stopApp((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_APP__STRING_STRING: + return deleteApp((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_APP__STRING_STRING_STRING: + return loadPreferencesApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING: + return loadPreferencesFlow((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING: + return loadPreferencesNameSpace((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_APP__STRING_STRING_STRING: + return setPreferencesApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_FLOW__STRING_STRING_STRING_STRING: + return setPreferencesFlow((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_WORKER__STRING_STRING_STRING_STRING: + return setPreferencesWorker((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_SERVICE__STRING_STRING_STRING_STRING: + return setPreferencesService((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_NAME_SPACE__STRING_STRING: + return setPreferencesNameSpace((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_FLOW_RUN_TIME_ARGS__STRING_STRING_STRING_STRING: + return setFlowRunTimeArgs((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_FLOWLET_INSTANCES__STRING_STRING_STRING_STRING_INT: + return setFlowletInstances((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3), (Integer)arguments.get(4)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_FLOW__STRING_STRING_STRING: + return stopFlow((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_WORKER__STRING_STRING_STRING: + return stopWorker((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_SERVICE__STRING_STRING_STRING: + return stopService((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___TRUNCATE_DATA_SET__STRING_STRING: + return truncateDataSet((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_DATASET__STRING_STRING: + return deleteDataset((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_STREAM__STRING_STRING: + return createStream((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_STREAM__STRING_STRING: + return deleteStream((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___GET_STREAM_EVENTS__STRING_STRING_STRING_STRING_INT: + return getStreamEvents((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3), (Integer)arguments.get(4)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___GET_STREAM_STATS__STRING_STRING_STRING_STRING_INT: + return getStreamStats((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3), (Integer)arguments.get(4)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SEND_EVENT_TO_STREAM__STRING_STRING_STRING: + return sendEventToStream((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___TRUCATE_STREAM__STRING_STRING: + return trucateStream((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_STREAM_PROPERTIES__STRING_STRING_STRING: + return setStreamProperties((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___RESTART_APP__STRING_STRING_STRING: + return restartApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_APP__STRING_STRING_STRING_STRING_STRING: + return createApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3), (String)arguments.get(4)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_APP_WITH_CONFIG__STRING_STRING_STRING_STRING_STRING_STRING: + return createAppWithConfig((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3), (String)arguments.get(4), (String)arguments.get(5)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_DATASET_PROPERTIES__STRING_STRING_STRING: + return setDatasetProperties((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_STREAM_TTL__STRING_STRING_INT: + return setStreamTTL((String)arguments.get(0), (String)arguments.get(1), (Integer)arguments.get(2)); + } + return super.eInvoke(operationID, arguments); + } + +} //CdapClusterManagerImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerFactoryImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerFactoryImpl.java new file mode 100644 index 0000000..82a0dc7 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerFactoryImpl.java @@ -0,0 +1,116 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.manager.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Factory</b>. + * <!-- end-user-doc --> + * @generated + */ +public class ManagerFactoryImpl extends EFactoryImpl implements ManagerFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static ManagerFactory init() { + try { + ManagerFactory theManagerFactory = (ManagerFactory)EPackage.Registry.INSTANCE.getEFactory(ManagerPackage.eNS_URI); + if (theManagerFactory != null) { + return theManagerFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ManagerFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ManagerFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ManagerPackage.CDAP_CLUSTER_MANAGER: return createCdapClusterManager(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapClusterManager createCdapClusterManager() { + CdapClusterManagerImpl cdapClusterManager = new CdapClusterManagerImpl(); + return cdapClusterManager; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ManagerPackage getManagerPackage() { + return (ManagerPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @deprecated + * @generated + */ + @Deprecated + public static ManagerPackage getPackage() { + return ManagerPackage.eINSTANCE; + } + +} //ManagerFactoryImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerPackageImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerPackageImpl.java new file mode 100644 index 0000000..73e9d68 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerPackageImpl.java @@ -0,0 +1,199 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.manager.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; +import org.openecomp.ncomp.cdap.CdapPackage; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class ManagerPackageImpl extends EPackageImpl implements ManagerPackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass cdapClusterManagerEClass = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + * <p>Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage#eNS_URI + * @see #init() + * @generated + */ + private ManagerPackageImpl() { + super(eNS_URI, ManagerFactory.eINSTANCE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * + * <p>This method is used to initialize {@link ManagerPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ManagerPackage init() { + if (isInited) return (ManagerPackage)EPackage.Registry.INSTANCE.getEPackage(ManagerPackage.eNS_URI); + + // Obtain or create and register package + ManagerPackageImpl theManagerPackage = (ManagerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ManagerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ManagerPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + VmmanagerPackage.eINSTANCE.eClass(); + ServicePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theManagerPackage.createPackageContents(); + + // Initialize created meta-data + theManagerPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theManagerPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ManagerPackage.eNS_URI, theManagerPackage); + return theManagerPackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCdapClusterManager() { + return cdapClusterManagerEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ManagerFactory getManagerFactory() { + return (ManagerFactory)getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + cdapClusterManagerEClass = createEClass(CDAP_CLUSTER_MANAGER); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + VmmanagerPackage theVmmanagerPackage = (VmmanagerPackage)EPackage.Registry.INSTANCE.getEPackage(VmmanagerPackage.eNS_URI); + ServicePackage theServicePackage = (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + CdapPackage theCdapPackage = (CdapPackage)EPackage.Registry.INSTANCE.getEPackage(CdapPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + cdapClusterManagerEClass.getESuperTypes().add(theVmmanagerPackage.getVirtualMachineManager()); + cdapClusterManagerEClass.getESuperTypes().add(theServicePackage.getCdapClusterConfiguration()); + cdapClusterManagerEClass.getESuperTypes().add(theCdapPackage.getCdapApi()); + + // Initialize classes, features, and operations; add parameters + initEClass(cdapClusterManagerEClass, CdapClusterManager.class, "CdapClusterManager", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + } + +} //ManagerPackageImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerAdapterFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerAdapterFactory.java new file mode 100644 index 0000000..2cbf36c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerAdapterFactory.java @@ -0,0 +1,277 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.manager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.*; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; +import org.openecomp.ncomp.cdap.CdapApi; + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * The <b>Adapter Factory</b> for the model. + * It provides an adapter <code>createXXX</code> method for each class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage + * @generated + */ +public class ManagerAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static ManagerPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ManagerAdapterFactory() { + if (modelPackage == null) { + modelPackage = ManagerPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * <!-- begin-user-doc --> + * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. + * <!-- end-user-doc --> + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the <code>createXXX</code> methods. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ManagerSwitch<Adapter> modelSwitch = + new ManagerSwitch<Adapter>() { + @Override + public Adapter caseCdapClusterManager(CdapClusterManager object) { + return createCdapClusterManagerAdapter(); + } + @Override + public Adapter caseDcaeManager(DcaeManager object) { + return createDcaeManagerAdapter(); + } + @Override + public Adapter caseSouthBoundApi(SouthBoundApi object) { + return createSouthBoundApiAdapter(); + } + @Override + public Adapter caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return createSouthBoundApiWithProxyAdapter(); + } + @Override + public Adapter caseAbstractManagementServer(AbstractManagementServer object) { + return createAbstractManagementServerAdapter(); + } + @Override + public Adapter caseVirtualMachineManager(VirtualMachineManager object) { + return createVirtualMachineManagerAdapter(); + } + @Override + public Adapter caseCdapClusterConfiguration(CdapClusterConfiguration object) { + return createCdapClusterConfigurationAdapter(); + } + @Override + public Adapter caseCdapApi(CdapApi object) { + return createCdapApiAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the <code>target</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param target the object to adapt. + * @return the adapter for the <code>target</code>. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager <em>Cdap Cluster Manager</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager + * @generated + */ + public Adapter createCdapClusterManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.manager.DcaeManager <em>Dcae Manager</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager + * @generated + */ + public Adapter createDcaeManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApi <em>South Bound Api</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApi + * @generated + */ + public Adapter createSouthBoundApiAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy <em>South Bound Api With Proxy</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy + * @generated + */ + public Adapter createSouthBoundApiWithProxyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer <em>Abstract Management Server</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer + * @generated + */ + public Adapter createAbstractManagementServerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager <em>Virtual Machine Manager</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager + * @generated + */ + public Adapter createVirtualMachineManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration <em>Cdap Cluster Configuration</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration + * @generated + */ + public Adapter createCdapClusterConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.cdap.CdapApi <em>Api</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.ncomp.cdap.CdapApi + * @generated + */ + public Adapter createCdapApiAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * <!-- begin-user-doc --> + * This default implementation returns null. + * <!-- end-user-doc --> + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ManagerAdapterFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerSwitch.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerSwitch.java new file mode 100644 index 0000000..72c1903 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerSwitch.java @@ -0,0 +1,253 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.manager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.*; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; +import org.openecomp.ncomp.cdap.CdapApi; + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * <!-- begin-user-doc --> + * The <b>Switch</b> for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the <code>caseXXX</code> method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage + * @generated + */ +public class ManagerSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static ManagerPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ManagerSwitch() { + if (modelPackage == null) { + modelPackage = ManagerPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER: { + CdapClusterManager cdapClusterManager = (CdapClusterManager)theEObject; + T result = caseCdapClusterManager(cdapClusterManager); + if (result == null) result = caseVirtualMachineManager(cdapClusterManager); + if (result == null) result = caseCdapClusterConfiguration(cdapClusterManager); + if (result == null) result = caseCdapApi(cdapClusterManager); + if (result == null) result = caseDcaeManager(cdapClusterManager); + if (result == null) result = caseAbstractManagementServer(cdapClusterManager); + if (result == null) result = caseSouthBoundApiWithProxy(cdapClusterManager); + if (result == null) result = caseSouthBoundApi(cdapClusterManager); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Cdap Cluster Manager</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Cdap Cluster Manager</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapClusterManager(CdapClusterManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Dcae Manager</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Dcae Manager</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeManager(DcaeManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>South Bound Api</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>South Bound Api</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApi(SouthBoundApi object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>South Bound Api With Proxy</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>South Bound Api With Proxy</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Abstract Management Server</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Abstract Management Server</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAbstractManagementServer(AbstractManagementServer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Virtual Machine Manager</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Virtual Machine Manager</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineManager(VirtualMachineManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Cdap Cluster Configuration</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Cdap Cluster Configuration</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapClusterConfiguration(CdapClusterConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Api</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Api</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapApi(CdapApi object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ManagerSwitch diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterConfiguration.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterConfiguration.java new file mode 100644 index 0000000..41d52c0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterConfiguration.java @@ -0,0 +1,74 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service; + +import org.openecomp.ncomp.cdap.CdapCluster; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Cdap Cluster Configuration</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration#getCluster <em>Cluster</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage#getCdapClusterConfiguration() + * @model + * @generated + */ +public interface CdapClusterConfiguration extends EObject { + /** + * Returns the value of the '<em><b>Cluster</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Cluster</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Cluster</em>' containment reference. + * @see #setCluster(CdapCluster) + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage#getCdapClusterConfiguration_Cluster() + * @model containment="true" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + CdapCluster getCluster(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration#getCluster <em>Cluster</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Cluster</em>' containment reference. + * @see #getCluster() + * @generated + */ + void setCluster(CdapCluster value); + +} // CdapClusterConfiguration diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterService.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterService.java new file mode 100644 index 0000000..d167a7b --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterService.java @@ -0,0 +1,39 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Cdap Cluster Service</b></em>'. + * <!-- end-user-doc --> + * + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage#getCdapClusterService() + * @model + * @generated + */ +public interface CdapClusterService extends VirtualMachineService { +} // CdapClusterService diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterServiceInstance.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterServiceInstance.java new file mode 100644 index 0000000..f1f15a6 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterServiceInstance.java @@ -0,0 +1,39 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Cdap Cluster Service Instance</b></em>'. + * <!-- end-user-doc --> + * + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage#getCdapClusterServiceInstance() + * @model + * @generated + */ +public interface CdapClusterServiceInstance extends VirtualMachineServiceInstance, CdapClusterConfiguration { +} // CdapClusterServiceInstance diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServiceFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServiceFactory.java new file mode 100644 index 0000000..7799fae --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServiceFactory.java @@ -0,0 +1,81 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service; + +import org.eclipse.emf.ecore.EFactory; + +/** + * <!-- begin-user-doc --> + * The <b>Factory</b> for the model. + * It provides a create method for each non-abstract class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage + * @generated + */ +public interface ServiceFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + ServiceFactory eINSTANCE = org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServiceFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Cdap Cluster Service</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Cdap Cluster Service</em>'. + * @generated + */ + CdapClusterService createCdapClusterService(); + + /** + * Returns a new object of class '<em>Cdap Cluster Service Instance</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Cdap Cluster Service Instance</em>'. + * @generated + */ + CdapClusterServiceInstance createCdapClusterServiceInstance(); + + /** + * Returns a new object of class '<em>Cdap Cluster Configuration</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Cdap Cluster Configuration</em>'. + * @generated + */ + CdapClusterConfiguration createCdapClusterConfiguration(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the package supported by this factory. + * @generated + */ + ServicePackage getServicePackage(); + +} //ServiceFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServicePackage.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServicePackage.java new file mode 100644 index 0000000..fe0d0dc --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServicePackage.java @@ -0,0 +1,740 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service; + +import org.openecomp.dcae.controller.service.vm.VmPackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * <!-- begin-user-doc --> + * The <b>Package</b> for the model. + * It contains accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServiceFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service.cdap.cluster'" + * annotation="http://www.eclipse.org/emf/2011/Xcore ecomp='http://openecomp.org'" + * @generated + */ +public interface ServicePackage extends EPackage { + /** + * The package name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "service"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.cdap.cluster.service"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "service"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + ServicePackage eINSTANCE = org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceImpl <em>Cdap Cluster Service</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl#getCdapClusterService() + * @generated + */ + int CDAP_CLUSTER_SERVICE = 0; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE__NAME = VmPackage.VIRTUAL_MACHINE_SERVICE__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE__LAST_POLLED = VmPackage.VIRTUAL_MACHINE_SERVICE__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE__LAST_CHANGED = VmPackage.VIRTUAL_MACHINE_SERVICE__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE__CREATED = VmPackage.VIRTUAL_MACHINE_SERVICE__CREATED; + + /** + * The feature id for the '<em><b>Instances</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE__INSTANCES = VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES; + + /** + * The feature id for the '<em><b>Manager Port Number</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE__MANAGER_PORT_NUMBER = VmPackage.VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER; + + /** + * The number of structural features of the '<em>Cdap Cluster Service</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_FEATURE_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_FEATURE_COUNT + 0; + + /** + * The operation id for the '<em>Deploy</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___DEPLOY__STRING_STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___DEPLOY__STRING_STRING; + + /** + * The operation id for the '<em>Undeploy</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___UNDEPLOY__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___UNDEPLOY__STRING; + + /** + * The operation id for the '<em>Test</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___TEST__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___TEST__STRING; + + /** + * The operation id for the '<em>Suspend</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___SUSPEND__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___SUSPEND__STRING; + + /** + * The operation id for the '<em>Resume</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___RESUME__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___RESUME__STRING; + + /** + * The operation id for the '<em>Push Manager Configuration</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the '<em>Poll Manager Configuration</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___POLL_MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___POLL_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the '<em>Manager Configuration</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the '<em>Manager Operation</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT = VmPackage.VIRTUAL_MACHINE_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT; + + /** + * The operation id for the '<em>Update Configuration From Policy</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING; + + /** + * The operation id for the '<em>Run Health Tests</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___RUN_HEALTH_TESTS = VmPackage.VIRTUAL_MACHINE_SERVICE___RUN_HEALTH_TESTS; + + /** + * The operation id for the '<em>Update Deployment Status</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___UPDATE_DEPLOYMENT_STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE___UPDATE_DEPLOYMENT_STATUS; + + /** + * The number of operations of the '<em>Cdap Cluster Service</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_OPERATION_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceInstanceImpl <em>Cdap Cluster Service Instance</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl#getCdapClusterServiceInstance() + * @generated + */ + int CDAP_CLUSTER_SERVICE_INSTANCE = 1; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__NAME = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__LAST_POLLED = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__LAST_CHANGED = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__CREATED = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CREATED; + + /** + * The feature id for the '<em><b>Service Container</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__SERVICE_CONTAINER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_CONTAINER; + + /** + * The feature id for the '<em><b>Status</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STATUS; + + /** + * The feature id for the '<em><b>Input Streams</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__INPUT_STREAMS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__INPUT_STREAMS; + + /** + * The feature id for the '<em><b>Output Streams</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__OUTPUT_STREAMS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OUTPUT_STREAMS; + + /** + * The feature id for the '<em><b>Last Health Test</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__LAST_HEALTH_TEST = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_HEALTH_TEST; + + /** + * The feature id for the '<em><b>Health Test Status</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__HEALTH_TEST_STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__HEALTH_TEST_STATUS; + + /** + * The feature id for the '<em><b>Health Test Message Code</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE; + + /** + * The feature id for the '<em><b>Configuration</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__CONFIGURATION = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION; + + /** + * The feature id for the '<em><b>Location</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__LOCATION = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION; + + /** + * The feature id for the '<em><b>Vm Type</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__VM_TYPE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE; + + /** + * The feature id for the '<em><b>Users</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__USERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS; + + /** + * The feature id for the '<em><b>Admin Users</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__ADMIN_USERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS; + + /** + * The feature id for the '<em><b>Application Ids</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__APPLICATION_IDS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS; + + /** + * The feature id for the '<em><b>Admin Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__ADMIN_ID = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID; + + /** + * The feature id for the '<em><b>Number Of Servers</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__NUMBER_OF_SERVERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS; + + /** + * The feature id for the '<em><b>Availability Zone</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__AVAILABILITY_ZONE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE; + + /** + * The feature id for the '<em><b>Manager Port Number</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__MANAGER_PORT_NUMBER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER; + + /** + * The feature id for the '<em><b>Servers</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__SERVERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS; + + /** + * The feature id for the '<em><b>Leader Server</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__LEADER_SERVER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER; + + /** + * The feature id for the '<em><b>Service</b></em>' container reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__SERVICE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE; + + /** + * The feature id for the '<em><b>Ieds Admin</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__IEDS_ADMIN = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN; + + /** + * The feature id for the '<em><b>Chef User</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__CHEF_USER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER; + + /** + * The feature id for the '<em><b>Chef Org</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__CHEF_ORG = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG; + + /** + * The feature id for the '<em><b>Chef Topology</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__CHEF_TOPOLOGY = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY; + + /** + * The feature id for the '<em><b>Openstack Flavor</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__OPENSTACK_FLAVOR = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR; + + /** + * The feature id for the '<em><b>Service Fqdn</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__SERVICE_FQDN = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN; + + /** + * The feature id for the '<em><b>Deployment Timeout Minutes</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES; + + /** + * The feature id for the '<em><b>Steps</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__STEPS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS; + + /** + * The feature id for the '<em><b>Cluster</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Cdap Cluster Service Instance</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE_FEATURE_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Cdap Cluster Service Instance</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE_OPERATION_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterConfigurationImpl <em>Cdap Cluster Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterConfigurationImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl#getCdapClusterConfiguration() + * @generated + */ + int CDAP_CLUSTER_CONFIGURATION = 2; + + /** + * The feature id for the '<em><b>Cluster</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_CONFIGURATION__CLUSTER = 0; + + /** + * The number of structural features of the '<em>Cdap Cluster Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_CONFIGURATION_FEATURE_COUNT = 1; + + /** + * The number of operations of the '<em>Cdap Cluster Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_CONFIGURATION_OPERATION_COUNT = 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService <em>Cdap Cluster Service</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Cdap Cluster Service</em>'. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService + * @generated + */ + EClass getCdapClusterService(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance <em>Cdap Cluster Service Instance</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Cdap Cluster Service Instance</em>'. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance + * @generated + */ + EClass getCdapClusterServiceInstance(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration <em>Cdap Cluster Configuration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Cdap Cluster Configuration</em>'. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration + * @generated + */ + EClass getCdapClusterConfiguration(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration#getCluster <em>Cluster</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Cluster</em>'. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration#getCluster() + * @see #getCdapClusterConfiguration() + * @generated + */ + EReference getCdapClusterConfiguration_Cluster(); + + /** + * Returns the factory that creates the instances of the model. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the factory that creates the instances of the model. + * @generated + */ + ServiceFactory getServiceFactory(); + + /** + * <!-- begin-user-doc --> + * Defines literals for the meta objects that represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceImpl <em>Cdap Cluster Service</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl#getCdapClusterService() + * @generated + */ + EClass CDAP_CLUSTER_SERVICE = eINSTANCE.getCdapClusterService(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceInstanceImpl <em>Cdap Cluster Service Instance</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl#getCdapClusterServiceInstance() + * @generated + */ + EClass CDAP_CLUSTER_SERVICE_INSTANCE = eINSTANCE.getCdapClusterServiceInstance(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterConfigurationImpl <em>Cdap Cluster Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterConfigurationImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl#getCdapClusterConfiguration() + * @generated + */ + EClass CDAP_CLUSTER_CONFIGURATION = eINSTANCE.getCdapClusterConfiguration(); + + /** + * The meta object literal for the '<em><b>Cluster</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CDAP_CLUSTER_CONFIGURATION__CLUSTER = eINSTANCE.getCdapClusterConfiguration_Cluster(); + + } + +} //ServicePackage diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterConfigurationImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterConfigurationImpl.java new file mode 100644 index 0000000..53ae6de --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterConfigurationImpl.java @@ -0,0 +1,198 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; + +import org.openecomp.ncomp.cdap.CdapCluster; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Cdap Cluster Configuration</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterConfigurationImpl#getCluster <em>Cluster</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CdapClusterConfigurationImpl extends MinimalEObjectImpl.Container implements CdapClusterConfiguration { + /** + * The cached value of the '{@link #getCluster() <em>Cluster</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCluster() + * @generated + * @ordered + */ + protected CdapCluster cluster; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CdapClusterConfigurationImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.CDAP_CLUSTER_CONFIGURATION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapCluster getCluster() { + return cluster; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetCluster(CdapCluster newCluster, NotificationChain msgs) { + CdapCluster oldCluster = cluster; + cluster = newCluster; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER, oldCluster, newCluster); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCluster(CdapCluster newCluster) { + if (newCluster != cluster) { + NotificationChain msgs = null; + if (cluster != null) + msgs = ((InternalEObject)cluster).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER, null, msgs); + if (newCluster != null) + msgs = ((InternalEObject)newCluster).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER, null, msgs); + msgs = basicSetCluster(newCluster, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER, newCluster, newCluster)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: + return basicSetCluster(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: + return getCluster(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: + setCluster((CdapCluster)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: + setCluster((CdapCluster)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: + return cluster != null; + } + return super.eIsSet(featureID); + } + +} //CdapClusterConfigurationImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceImpl.java new file mode 100644 index 0000000..2021586 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; + +import org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Cdap Cluster Service</b></em>'. + * <!-- end-user-doc --> + * <p> + * </p> + * + * @generated + */ +public class CdapClusterServiceImpl extends VirtualMachineServiceImpl implements CdapClusterService { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CdapClusterServiceImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.CDAP_CLUSTER_SERVICE; + } + +} //CdapClusterServiceImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceInstanceImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceInstanceImpl.java new file mode 100644 index 0000000..7e31876 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceInstanceImpl.java @@ -0,0 +1,232 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; + +import org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl; + +import org.openecomp.ncomp.cdap.CdapCluster; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Cdap Cluster Service Instance</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceInstanceImpl#getCluster <em>Cluster</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CdapClusterServiceInstanceImpl extends VirtualMachineServiceInstanceImpl implements CdapClusterServiceInstance { + /** + * The cached value of the '{@link #getCluster() <em>Cluster</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCluster() + * @generated + * @ordered + */ + protected CdapCluster cluster; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CdapClusterServiceInstanceImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.CDAP_CLUSTER_SERVICE_INSTANCE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapCluster getCluster() { + return cluster; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetCluster(CdapCluster newCluster, NotificationChain msgs) { + CdapCluster oldCluster = cluster; + cluster = newCluster; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER, oldCluster, newCluster); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCluster(CdapCluster newCluster) { + if (newCluster != cluster) { + NotificationChain msgs = null; + if (cluster != null) + msgs = ((InternalEObject)cluster).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER, null, msgs); + if (newCluster != null) + msgs = ((InternalEObject)newCluster).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER, null, msgs); + msgs = basicSetCluster(newCluster, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER, newCluster, newCluster)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER: + return basicSetCluster(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER: + return getCluster(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER: + setCluster((CdapCluster)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER: + setCluster((CdapCluster)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER: + return cluster != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { + if (baseClass == CdapClusterConfiguration.class) { + switch (derivedFeatureID) { + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER: return ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) { + if (baseClass == CdapClusterConfiguration.class) { + switch (baseFeatureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: return ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} //CdapClusterServiceInstanceImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServiceFactoryImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServiceFactoryImpl.java new file mode 100644 index 0000000..fee555f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServiceFactoryImpl.java @@ -0,0 +1,138 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Factory</b>. + * <!-- end-user-doc --> + * @generated + */ +public class ServiceFactoryImpl extends EFactoryImpl implements ServiceFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static ServiceFactory init() { + try { + ServiceFactory theServiceFactory = (ServiceFactory)EPackage.Registry.INSTANCE.getEFactory(ServicePackage.eNS_URI); + if (theServiceFactory != null) { + return theServiceFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ServiceFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ServiceFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ServicePackage.CDAP_CLUSTER_SERVICE: return createCdapClusterService(); + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE: return createCdapClusterServiceInstance(); + case ServicePackage.CDAP_CLUSTER_CONFIGURATION: return createCdapClusterConfiguration(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapClusterService createCdapClusterService() { + CdapClusterServiceImpl cdapClusterService = new CdapClusterServiceImpl(); + return cdapClusterService; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapClusterServiceInstance createCdapClusterServiceInstance() { + CdapClusterServiceInstanceImpl cdapClusterServiceInstance = new CdapClusterServiceInstanceImpl(); + return cdapClusterServiceInstance; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapClusterConfiguration createCdapClusterConfiguration() { + CdapClusterConfigurationImpl cdapClusterConfiguration = new CdapClusterConfigurationImpl(); + return cdapClusterConfiguration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ServicePackage getServicePackage() { + return (ServicePackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @deprecated + * @generated + */ + @Deprecated + public static ServicePackage getPackage() { + return ServicePackage.eINSTANCE; + } + +} //ServiceFactoryImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServicePackageImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServicePackageImpl.java new file mode 100644 index 0000000..f39f5c0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServicePackageImpl.java @@ -0,0 +1,289 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServiceFactory; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; +import org.openecomp.dcae.controller.service.vm.VmPackage; +import org.openecomp.ncomp.cdap.CdapPackage; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class ServicePackageImpl extends EPackageImpl implements ServicePackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass cdapClusterServiceEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass cdapClusterServiceInstanceEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass cdapClusterConfigurationEClass = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + * <p>Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage#eNS_URI + * @see #init() + * @generated + */ + private ServicePackageImpl() { + super(eNS_URI, ServiceFactory.eINSTANCE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * + * <p>This method is used to initialize {@link ServicePackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ServicePackage init() { + if (isInited) return (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + + // Obtain or create and register package + ServicePackageImpl theServicePackage = (ServicePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ServicePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ServicePackageImpl()); + + isInited = true; + + // Initialize simple dependencies + CdapPackage.eINSTANCE.eClass(); + VmPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theServicePackage.createPackageContents(); + + // Initialize created meta-data + theServicePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theServicePackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ServicePackage.eNS_URI, theServicePackage); + return theServicePackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCdapClusterService() { + return cdapClusterServiceEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCdapClusterServiceInstance() { + return cdapClusterServiceInstanceEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCdapClusterConfiguration() { + return cdapClusterConfigurationEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCdapClusterConfiguration_Cluster() { + return (EReference)cdapClusterConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ServiceFactory getServiceFactory() { + return (ServiceFactory)getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + cdapClusterServiceEClass = createEClass(CDAP_CLUSTER_SERVICE); + + cdapClusterServiceInstanceEClass = createEClass(CDAP_CLUSTER_SERVICE_INSTANCE); + + cdapClusterConfigurationEClass = createEClass(CDAP_CLUSTER_CONFIGURATION); + createEReference(cdapClusterConfigurationEClass, CDAP_CLUSTER_CONFIGURATION__CLUSTER); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + VmPackage theVmPackage = (VmPackage)EPackage.Registry.INSTANCE.getEPackage(VmPackage.eNS_URI); + CdapPackage theCdapPackage = (CdapPackage)EPackage.Registry.INSTANCE.getEPackage(CdapPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + cdapClusterServiceEClass.getESuperTypes().add(theVmPackage.getVirtualMachineService()); + cdapClusterServiceInstanceEClass.getESuperTypes().add(theVmPackage.getVirtualMachineServiceInstance()); + cdapClusterServiceInstanceEClass.getESuperTypes().add(this.getCdapClusterConfiguration()); + + // Initialize classes, features, and operations; add parameters + initEClass(cdapClusterServiceEClass, CdapClusterService.class, "CdapClusterService", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(cdapClusterServiceInstanceEClass, CdapClusterServiceInstance.class, "CdapClusterServiceInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(cdapClusterConfigurationEClass, CdapClusterConfiguration.class, "CdapClusterConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCdapClusterConfiguration_Cluster(), theCdapPackage.getCdapCluster(), null, "cluster", null, 0, 1, CdapClusterConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + // http://openecomp.org + createEcompAnnotations(); + } + + /** + * Initializes the annotations for <b>http://www.eclipse.org/emf/2011/Xcore</b>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "ecomp", "http://openecomp.org" + }); + } + + /** + * Initializes the annotations for <b>http://openecomp.org</b>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void createEcompAnnotations() { + String source = "http://openecomp.org"; + addAnnotation + (getCdapClusterConfiguration_Cluster(), + source, + new String[] { + "type", "configuration" + }); + } + +} //ServicePackageImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceAdapterFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceAdapterFactory.java new file mode 100644 index 0000000..1e8146a --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceAdapterFactory.java @@ -0,0 +1,294 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.*; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * The <b>Adapter Factory</b> for the model. + * It provides an adapter <code>createXXX</code> method for each class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage + * @generated + */ +public class ServiceAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ServiceAdapterFactory() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * <!-- begin-user-doc --> + * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. + * <!-- end-user-doc --> + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the <code>createXXX</code> methods. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ServiceSwitch<Adapter> modelSwitch = + new ServiceSwitch<Adapter>() { + @Override + public Adapter caseCdapClusterService(CdapClusterService object) { + return createCdapClusterServiceAdapter(); + } + @Override + public Adapter caseCdapClusterServiceInstance(CdapClusterServiceInstance object) { + return createCdapClusterServiceInstanceAdapter(); + } + @Override + public Adapter caseCdapClusterConfiguration(CdapClusterConfiguration object) { + return createCdapClusterConfigurationAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter caseDcaeService(DcaeService object) { + return createDcaeServiceAdapter(); + } + @Override + public Adapter caseVirtualMachineService(VirtualMachineService object) { + return createVirtualMachineServiceAdapter(); + } + @Override + public Adapter caseDcaeServiceInstance(DcaeServiceInstance object) { + return createDcaeServiceInstanceAdapter(); + } + @Override + public Adapter caseVirtualMachineServiceConfiguration(VirtualMachineServiceConfiguration object) { + return createVirtualMachineServiceConfigurationAdapter(); + } + @Override + public Adapter caseVirtualMachineServiceInstance(VirtualMachineServiceInstance object) { + return createVirtualMachineServiceInstanceAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the <code>target</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param target the object to adapt. + * @return the adapter for the <code>target</code>. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService <em>Cdap Cluster Service</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService + * @generated + */ + public Adapter createCdapClusterServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance <em>Cdap Cluster Service Instance</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance + * @generated + */ + public Adapter createCdapClusterServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration <em>Cdap Cluster Configuration</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration + * @generated + */ + public Adapter createCdapClusterConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity <em>Named Entity</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeService <em>Dcae Service</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeService + * @generated + */ + public Adapter createDcaeServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService <em>Virtual Machine Service</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineService + * @generated + */ + public Adapter createVirtualMachineServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance <em>Dcae Service Instance</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance + * @generated + */ + public Adapter createDcaeServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration <em>Virtual Machine Service Configuration</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration + * @generated + */ + public Adapter createVirtualMachineServiceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance <em>Virtual Machine Service Instance</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance + * @generated + */ + public Adapter createVirtualMachineServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * <!-- begin-user-doc --> + * This default implementation returns null. + * <!-- end-user-doc --> + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ServiceAdapterFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceSwitch.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceSwitch.java new file mode 100644 index 0000000..3d25b7c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceSwitch.java @@ -0,0 +1,280 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.*; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * <!-- begin-user-doc --> + * The <b>Switch</b> for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the <code>caseXXX</code> method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage + * @generated + */ +public class ServiceSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ServiceSwitch() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ServicePackage.CDAP_CLUSTER_SERVICE: { + CdapClusterService cdapClusterService = (CdapClusterService)theEObject; + T result = caseCdapClusterService(cdapClusterService); + if (result == null) result = caseVirtualMachineService(cdapClusterService); + if (result == null) result = caseDcaeService(cdapClusterService); + if (result == null) result = caseNamedEntity(cdapClusterService); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE: { + CdapClusterServiceInstance cdapClusterServiceInstance = (CdapClusterServiceInstance)theEObject; + T result = caseCdapClusterServiceInstance(cdapClusterServiceInstance); + if (result == null) result = caseVirtualMachineServiceInstance(cdapClusterServiceInstance); + if (result == null) result = caseCdapClusterConfiguration(cdapClusterServiceInstance); + if (result == null) result = caseDcaeServiceInstance(cdapClusterServiceInstance); + if (result == null) result = caseVirtualMachineServiceConfiguration(cdapClusterServiceInstance); + if (result == null) result = caseNamedEntity(cdapClusterServiceInstance); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.CDAP_CLUSTER_CONFIGURATION: { + CdapClusterConfiguration cdapClusterConfiguration = (CdapClusterConfiguration)theEObject; + T result = caseCdapClusterConfiguration(cdapClusterConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Cdap Cluster Service</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Cdap Cluster Service</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapClusterService(CdapClusterService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Cdap Cluster Service Instance</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Cdap Cluster Service Instance</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapClusterServiceInstance(CdapClusterServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Cdap Cluster Configuration</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Cdap Cluster Configuration</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapClusterConfiguration(CdapClusterConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Named Entity</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Named Entity</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Dcae Service</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Dcae Service</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeService(DcaeService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Virtual Machine Service</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Virtual Machine Service</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineService(VirtualMachineService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Dcae Service Instance</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Dcae Service Instance</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeServiceInstance(DcaeServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Virtual Machine Service Configuration</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Virtual Machine Service Configuration</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineServiceConfiguration(VirtualMachineServiceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Virtual Machine Service Instance</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Virtual Machine Service Instance</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineServiceInstance(VirtualMachineServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ServiceSwitch diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/manager.xcore b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/manager.xcore new file mode 100644 index 0000000..0ab71f6 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/manager.xcore @@ -0,0 +1,33 @@ + +/*- + * ============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============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen")
+
+
+package org.openecomp.dcae.controller.service.cdap.cluster.manager
+
+import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration
+import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager
+import org.openecomp.ncomp.cdap.CdapApi
+
+// state of manager
+class CdapClusterManager extends VirtualMachineManager, CdapClusterConfiguration, CdapApi {
+}
\ No newline at end of file diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/service.xcore b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/service.xcore new file mode 100644 index 0000000..0b3c18c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/service.xcore @@ -0,0 +1,46 @@ + +/*- + * ============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============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen")
+
+package org.openecomp.dcae.controller.service.cdap.cluster.service
+
+import org.openecomp.dcae.controller.service.vm.VirtualMachineService
+import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance
+import org.openecomp.ncomp.cdap.CdapCluster
+
+annotation "http://openecomp.org" as ecomp
+
+class CdapClusterService extends VirtualMachineService {
+}
+
+// state in the controller
+class CdapClusterServiceInstance extends VirtualMachineServiceInstance, CdapClusterConfiguration {
+}
+
+// state in both controller and manager
+class CdapClusterConfiguration {
+ @ecomp(^type = "configuration")
+ contains CdapCluster cluster
+}
+
+
+
diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/pom.xml b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/pom.xml new file mode 100644 index 0000000..a368d1e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/pom.xml @@ -0,0 +1,82 @@ +<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.dcae.controller</groupId> + <artifactId>dcae-controller-service-cdap-cluster</artifactId> + <version>0.1.0-SNAPSHOT</version> + <packaging>pom</packaging> + <name>dcae-controller-service-cdap-cluster</name> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + + + <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> + + </plugins> + </build> + <modules> + <module>dcae-controller-service-cdap-cluster-manager</module> + <module>dcae-controller-service-cdap-cluster-model</module> + + </modules> + + <parent> + <groupId>org.openecomp.ncomp.maven</groupId> + <artifactId>ncomp-maven-base</artifactId> + <version>0.1.0-SNAPSHOT</version> + <relativePath>../../../dcae-org.openecomp.ncomp.maven/ncomp-maven-base</relativePath> + </parent> +</project> |