diff options
Diffstat (limited to 'dcae-controller-service-cdap')
200 files changed, 28215 insertions, 0 deletions
diff --git a/dcae-controller-service-cdap/.gitignore b/dcae-controller-service-cdap/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service-cdap/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service-cdap/LICENSE.txt b/dcae-controller-service-cdap/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-cdap/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-adaptor/.classpath b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.classpath new file mode 100644 index 0000000..d2d34b3 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.classpath @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="config"/> + <classpathentry kind="src" output="target/classes" path="src/main/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" path="src/main/server"/> + <classpathentry kind="src" path="src/main/server-gen"/> + <classpathentry kind="src" path="src/main/sirius-gen"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/> + <classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/> + <classpathentry kind="output" path="target/classes"/> +</classpath> diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.gitignore b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.project b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.project new file mode 100644 index 0000000..17cb465 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.project @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>dcae-controller-service-cdap-adaptor</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.groovy.core.groovyNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + </natures> +</projectDescription> diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.core.resources.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.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-adaptor/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.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-adaptor/.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-adaptor/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/.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-adaptor/LICENSE.txt b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/META-INF/MANIFEST.MF b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/META-INF/MANIFEST.MF new file mode 100644 index 0000000..92614d2 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/META-INF/MANIFEST.MF @@ -0,0 +1,18 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: dcae-controller-service-cdap-adaptor +Bundle-SymbolicName: dcae-controller-service-cdap-adaptor +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.dcae.controller.service.cdap.adaptor.tools, + org.openecomp.dcae.controller.service.servers.cdap +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-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + dcae-controller-service-cdap-cluster-model, + dcae-controller-service-vm-adaptor;bundle-version="0.1.0", + dcae-controller-service-cdap-cluster-manager, + dcae-controller-core-model diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/build.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/build.properties new file mode 100644 index 0000000..a1ec8c4 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/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-adaptor/config/.gitignore b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/config/.gitignore new file mode 100644 index 0000000..5967057 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/config/.gitignore @@ -0,0 +1 @@ +/*.properties diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/pom.xml b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/pom.xml new file mode 100644 index 0000000..4369202 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/pom.xml @@ -0,0 +1,200 @@ +<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-adaptor</artifactId> + <parent> + <groupId>org.openecomp.ncomp.sirius.manager</groupId> + <artifactId>ncomp-sirius-manager-base</artifactId> + <version>0.1.0-SNAPSHOT</version> + <relativePath>../../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-base</relativePath> + </parent> + + + <pluginRepositories> + <!-- Black Duck plugin dependencies --> + <pluginRepository> + <id>JCenter</id> + <name>JCenter Repository</name> + <url>http://jcenter.bintray.com</url> + </pluginRepository> + + <pluginRepository> + <id>Restlet</id> + <name>Restlet Repository</name> + <url>http://maven.restlet.com</url> + </pluginRepository> + </pluginRepositories> +<build> + <plugins> + <!-- blackduck maven plugin --> + <plugin> + <groupId>com.blackducksoftware.integration</groupId> + <artifactId>hub-maven-plugin</artifactId> + <version>1.4.0</version> + <inherited>false</inherited> + <configuration> + <hubProjectName>${project.name}</hubProjectName> + <outputDirectory>${project.basedir}</outputDirectory> + </configuration> + <executions> + <execution> + <id>create-bdio-file</id> + <phase>package</phase> + <goals> + <goal>createHubOutput</goal> + </goals> + </execution> + </executions> + </plugin> + <!-- site maven plugin --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <version>3.6</version> + <dependencies> + <dependency> + <groupId>org.apache.maven.wagon</groupId> + <artifactId>wagon-webdav-jackrabbit</artifactId> + <version>2.10</version> + </dependency> + </dependencies> + </plugin> + + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <version>2.6</version> + <executions> + <execution> + <id>zipfile</id> + <goals> + <goal>single</goal> + </goals> + <phase>package</phase> + <configuration> + <attach>false</attach> + <finalName>${project.artifactId}-${project.version}</finalName> + <descriptors> + <descriptor>src/assembly/assemble_zip.xml</descriptor> + </descriptors> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>2.8</version> + <executions> + <execution> + <id>copy-dependencies</id> + <goals> + <goal>copy-dependencies</goal> + </goals> + <phase>prepare-package</phase> + <configuration> + <transitive>false</transitive> + <outputDirectory>${project.build.directory}/assembly/lib</outputDirectory> + <overWriteReleases>false</overWriteReleases> + <overWriteSnapshots>true</overWriteSnapshots> + <overWriteIfNewer>true</overWriteIfNewer> + <useRepositoryLayout>false</useRepositoryLayout> + <addParentPoms>false</addParentPoms> + <copyPom>false</copyPom> + <excludeGroupIds>org.opendaylight,com.brocade.odl,ch.qos.logback</excludeGroupIds> + <scope>provided</scope> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-resources-plugin</artifactId> + <version>2.6</version> + <executions> + <execution> + <id>copy-version</id> + <goals> + <goal>copy-resources</goal> + </goals> + <phase>validate</phase> + <configuration> + <outputDirectory>${basedir}/target/versions</outputDirectory> + <resources> + <resource> + <directory>src/main/resources/versions</directory> + <includes> + <include>version.properties</include> + </includes> + <filtering>true</filtering> + </resource> + </resources> + </configuration> + </execution> + <execution> + <id>copy-resources</id> + <goals> + <goal>copy-resources</goal> + </goals> + <phase>validate</phase> + <configuration> + <outputDirectory>${basedir}/target/etc/bvc-extensions</outputDirectory> + <resources> + <resource> + <directory>src/main/resources/etc/bvc-extensions</directory> + <includes> + <include>feature_config_template.cfg</include> + <include>feature_custom.install</include> + </includes> + <filtering>true</filtering> + </resource> + </resources> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>1.10</version> + <executions> + <execution> + <id>attach-artifacts</id> + <phase>package</phase> + <goals> + <goal>attach-artifact</goal> + </goals> + <configuration> + <artifacts> + <artifact> + <file>target/${project.artifactId}-${project.version}-runtime.zip</file> + <type>zip</type> + <classifier>runtime</classifier> + </artifact> + </artifacts> + </configuration> + </execution> + </executions> + </plugin> + + </plugins> + </build> + <dependencies> + <dependency> + <groupId>org.openecomp.dcae.controller</groupId> + <artifactId>dcae-controller-service-cdap-model</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.dcae.controller</groupId> + <artifactId> + dcae-controller-service-cdap-cluster-manager + </artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.ncomp.sirius.manager</groupId> + <artifactId>ncomp-sirius-manager-agent-server</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> +</project> diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/assembly/assemble_zip.xml b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..b4a11b0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/assembly/assemble_zip.xml @@ -0,0 +1,61 @@ +<!-- Defines how we build the .zip file which is our distribution. --> + +<assembly + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> + <id>runtime</id> + <formats> + <format>zip</format> + </formats> + + <!-- we want "system" and related files right at the root level as this + file is suppose to be unzip on top of a karaf distro. --> + <includeBaseDirectory>false</includeBaseDirectory> + + <fileSets> + <fileSet> + <directory>target</directory> + <outputDirectory>lib</outputDirectory> + <includes> + <include>dcae-controller-service-cdap-adaptor-${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-adaptor/src/main/java/org/openecomp/dcae/controller/service/cdap/adaptor/tools/Generator.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/cdap/adaptor/tools/Generator.java new file mode 100644 index 0000000..0174c12 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/cdap/adaptor/tools/Generator.java @@ -0,0 +1,107 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.dcae.controller.service.cdap.adaptor.tools;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.openecomp.dcae.controller.service.cdap.CdapFactory;
+import org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerFactory;
+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;
+ genService();
+ genManager();
+ }
+
+
+ public static void genManager() {
+ EObject o = CdapmanagerFactory.eINSTANCE.createCdapManager();
+ 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("ControllerServiceCdapManager");
+ m.setTitle("ControllerServiceCdapManager");
+ ControllerGenerator g = new ControllerGenerator(o, m);
+ g.setEnableIRequestHandler(false);
+ g.setEnableISiriusPlugin(false);
+ g.addFactory("org.openecomp.ncomp.servers.cdap.CdapCdapFactory");
+ g.addFactory(CdapFactory.eINSTANCE);
+ EObject gui = ModelFactory.eINSTANCE.createGuiClientApi();
+ g.addObject("gui", gui, m);
+ g.generate(dir);
+ g.generateScripts("src/main/server-gen/bin", "controller-service-Cdap-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/CdapManager.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() {
+ @SuppressWarnings("unused")
+ ServerPackage f = ServerPackage.eINSTANCE;
+ EObject o = CdapFactory.eINSTANCE.createCdapService();
+ 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("CdapService");
+ m.setTitle("CdapService");
+ ControllerGenerator g = new ControllerGenerator(o,m);
+ g.setEnableIRequestHandler(false);
+ g.setEnableISiriusPlugin(true);
+// EObject gui = ModelFactory.eINSTANCE.createGuiClientApi();
+// g.addObject("gui",gui,m);
+ //EObject e = adaptorFactory.eINSTANCE.createVpnEnterprise();
+ //g.addApi("e",e,m);
+ //g.addFactory("org.openecomp.ncomp.sirius.servers.openstack.OsOpenstackFactory");
+ //g.enableDrools();
+ g.generate(dir);
+ g.generateScripts("src/main/server-gen/bin","controller-service-cdap-adaptor");
+ String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging";
+// YamlToJava.convert("src/main/resources/DcaeServiceCdapHost.yaml", dir + "/logging", pName);
+ YamlToJava.convert("src/main/sirius-gen/CdapService.yaml", dir + "/logging", pName);
+ }
+
+
+}
diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceProvider.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceProvider.java new file mode 100644 index 0000000..8e802e1 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceProvider.java @@ -0,0 +1,593 @@ + +/*- + * ============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.servers.cdap; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.json.JSONObject; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; +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.core.stream.DcaeStream; +import org.openecomp.dcae.controller.core.stream.DmaapStream; +import org.openecomp.dcae.controller.service.cdap.CdapApplication; +import org.openecomp.dcae.controller.service.cdap.CdapArtifact; +import org.openecomp.dcae.controller.service.cdap.CdapFactory; +import org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration; +import org.openecomp.dcae.controller.service.cdap.CdapService; +import org.openecomp.dcae.controller.service.cdap.CdapServiceInstance; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.DcaeCdapClusterManagerConsole; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.service.DcaeCdapClusterService; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.service.DcaeCdapClusterServiceProvider; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance; +import org.openecomp.ncomp.cdap.CdapEntityWithPreferences; +import org.openecomp.ncomp.cdap.CdapKeyPair; +import org.openecomp.ncomp.cdap.CdapNamespace; +import org.openecomp.ncomp.core.DeploymentStatus; +import org.openecomp.ncomp.core.NamedEntity; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.JavaHttpClient; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ManagementServerUtils; +import org.openecomp.ncomp.sirius.manager.Subject; +import org.openecomp.ncomp.sirius.manager.metrics.MetricStore; +import org.openecomp.ncomp.utils.StringUtil; + +public class DcaeCdapServiceProvider extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(DcaeCdapServiceProvider.class); + CdapService o; + + public DcaeCdapServiceProvider(ISiriusServer controller, CdapService o) { + super(controller, o); + this.o = o; + } + + public void deploy(String instanceName, String containerPath) { + CdapServiceInstance i = findInstance(instanceName); + if (containerPath != null) { + Subject s = controller.getServer().find(containerPath); + if (s == null || s.o == null) { + throw new RuntimeException("Unable to find container object: " + containerPath); + } + if (!(s.o instanceof CdapClusterServiceInstance)) + throw new RuntimeException("Unable to deploy to this container: " + s.o); + i.setClusterService((CdapClusterServiceInstance) s.o); + } + i.setCdapName(cdapName(i)); + DcaeCdapClusterManagerConsole console = consoleCluster(i); + // console.loadArtifact(i.getCdapNamespace().getName(), i.getName(), + // i.getJarFile()); + try { + console.createNamespace(i.getCdapName()); + } catch (Exception e1) { + logger.warn("reusing existing namespace"); + } + try { + for (CdapArtifact a : i.getArtifacts()) { + if (a.getVersion() != null) + console.loadArtifact(i.getCdapName(), a.getName(), a.getJarFile(), a.getVersion()); + console.deployApp(i.getCdapName(), a.getJarFile()); + } + for (CdapApplication a : i.getApps()) { +// System.err.println("CDAP: start app 1"); + console.loadArtifact(i.getCdapName(), a.getArtifactName(), a.getJarFile(), a.getVersion()); +// System.err.println("CDAP: start app 2"); + if (a.getAppConfigFileContent() == null) + console.createApp(i.getCdapName(), a.getName(), a.getArtifactName(), a.getVersion(), "user"); + else + console.createAppWithConfig(i.getCdapName(), a.getName(), a.getArtifactName(), a.getVersion(), "user", + a.getAppConfigFileContent()); +// System.err.println("CDAP: start app 3"); + } + } catch (Exception e) { + logger.warn("unable to start CDAP app: " + ManagementServer.object2ref(i)); + e.printStackTrace(); + throw new RuntimeException("Unable to start CDAP app: " + ManagementServer.object2ref(i) + " " + e); + } + o.pushManagerConfiguration(instanceName); + } + + public void undeploy(String instanceName) { + CdapServiceInstance i = findInstance(instanceName); + DcaeCdapClusterManagerConsole console = consoleCluster(i); + if (i.getCdapName() == null) { + i.setCdapName(cdapName(i)); + } + for (String f : i.getFlowNames()) { + String[] a = f.split("\\."); + if (a.length != 2) + throw new RuntimeException("Bad flow name: " + f); + try { + console.stopFlow(i.getCdapName(), a[0], a[1]); + } catch (Exception e) { + e.printStackTrace(); + } + } + for (String a : i.getAppNames()) { + try { + console.stopApp(i.getCdapName(), a); + } catch (Exception e) { + e.printStackTrace(); + } + } + for (CdapArtifact a : i.getArtifacts()) { + try { +// console.stopApp(i.getCdapName(), a.getName()); + console.deleteApp(i.getCdapName(), a.getName()); + if (a.getVersion() != null) { + console.deleteArtifact(i.getCdapName(), a.getName(), a.getVersion()); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + for (CdapApplication a : i.getApps()) { + try { + console.stopApp(i.getCdapName(), a.getName()); + console.deleteApp(i.getCdapName(), a.getName()); + console.deleteArtifact(i.getCdapName(), a.getArtifactName(), a.getVersion()); + } catch (Exception e) { + e.printStackTrace(); + } + } +// console.deleteNamespace(i.getCdapName()); + } + + public void pushManagerConfiguration(String instanceName) { + CdapServiceInstance i = findInstance(instanceName); + o.updateInstanceConfiguration(instanceName); + DcaeCdapClusterManagerConsole console = consoleCluster(i); + for (CdapArtifact a : i.getArtifacts()) { + try { + console.stopApp(i.getCdapName(), a.getName()); + } catch (Exception e) { + e.printStackTrace(); + } + } + for (CdapApplication a : i.getApps()) { + try { + console.stopApp(i.getCdapName(), a.getName()); + } catch (Exception e) { + e.printStackTrace(); + } + } + for (String f : i.getFlowNames()) { + String[] a = f.split("\\."); + if (a.length != 2) + throw new RuntimeException("Bad flow name: " + f); + try { + console.stopFlow(i.getCdapName(), a[0], a[1]); + } catch (Exception e) { + e.printStackTrace(); + } + } + for (String w : i.getWorkerNames()) { + String[] a = w.split("\\."); + if (a.length != 2) + throw new RuntimeException("Bad worker name: " + w); + try { + console.stopWorker(i.getCdapName(), a[0], a[1]); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + for (String s : i.getServiceNames()) { + String[] a = s.split("\\."); + if (a.length != 2) + throw new RuntimeException("Bad service name: " + s); + try { + console.stopService(i.getCdapName(), a[0], a[1]); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + console.setPreferencesNameSpace(i.getCdapName(), list2string(i.getCdapConfiguration().getPreferences())); + for (CdapEntityWithPreferences w : i.getCdapConfiguration().getWorkers()) { + if (w.getPreferences().size() == 0) + continue; + String[] a = w.getName().split("\\.");if (a.length != 2) + throw new RuntimeException("Bad worker name: " + w.getName()); + console.setPreferencesWorker(i.getCdapName(), list2string(w.getPreferences()),a[0],a[1]); + } + for (CdapEntityWithPreferences s : i.getCdapConfiguration().getServices()) { + if (s.getPreferences().size() == 0) + continue; + String[] a = s.getName().split("\\.");if (a.length != 2) + throw new RuntimeException("Bad service name: " + s.getName()); + console.setPreferencesService(i.getCdapName(), list2string(s.getPreferences()),a[0],a[1]); + } + for (CdapEntityWithPreferences f : i.getCdapConfiguration().getFlows()) { + if (f.getPreferences().size() == 0) + continue; + String[] a = f.getName().split("\\.");if (a.length != 2) + throw new RuntimeException("Bad flow name: " + f.getName()); + console.setPreferencesFlow(i.getCdapName(), list2string(f.getPreferences()), a[0],a[1]); + } + for (CdapEntityWithPreferences a : i.getCdapConfiguration().getApps()) { + if (a.getPreferences().size() == 0) + continue; + console.setPreferencesApp(i.getCdapName(), list2string(a.getPreferences()), a.getName()); + } + // TODO what should we do. ?? + for (String f : i.getFlowNames()) { + String[] a = f.split("\\."); + if (a.length != 2) + throw new RuntimeException("Bad flow name: " + f); + console.startFlow(i.getCdapName(), a[0], a[1], null); + } + for (String w : i.getWorkerNames()) { + String[] a = w.split("\\."); + if (a.length != 2) + throw new RuntimeException("Bad worker name: " + w); + console.startWorker(i.getCdapName(), a[0], a[1], null); + } + for (String s : i.getServiceNames()) { + String[] a = s.split("\\."); + if (a.length != 2) + throw new RuntimeException("Bad service name: " + s); + console.startService(i.getCdapName(), a[0], a[1], null); + } + for (CdapArtifact a : i.getArtifacts()) { + try { + console.startApp(i.getCdapName(), a.getName()); + } catch (Exception e) { + e.printStackTrace(); + } + } + for (CdapApplication a : i.getApps()) { + try { + console.startApp(i.getCdapName(), a.getName()); + } catch (Exception e) { + e.printStackTrace(); + } + } + + } + + public void pollManagerConfiguration(String instanceName) { + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public EObject managerConfiguration(String instanceName) { + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public JSONObject managerOperation(String instanceName, String operation, JSONObject parameters) { + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void updateConfigurationFromPolicy(String instanceName) { + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public HealthTestResponse test(String instanceName) { + CdapServiceInstance i = findInstance(instanceName); + HealthTestResponse res = ServiceFactory.eINSTANCE.createHealthTestResponse(); + + // simple check. Verify that namespace exists in cluster. + + CdapClusterServiceInstance s = i.getClusterService(); + if (s.getStatus() != DeploymentStatus.DEPLOYED) { + res.setStatus(HealthTestStatus.YELLOW); + res.setMessageCode("Cluster not deployed"); + return res; + } + if (s.getCluster() == null) { + res.setStatus(HealthTestStatus.RED); + res.setMessageCode("No Cluster"); + return res; + } + if (i.getNamespace() == null) { + res.setStatus(HealthTestStatus.RED); + res.setMessageCode("No Namepace for instance"); + return res; + } + for (CdapNamespace n : s.getCluster().getNamespaces()) { + if (i.getNamespace().equals(n.getName())) { + res.setStatus(HealthTestStatus.GREEN); + return res; + } + } + res.setStatus(HealthTestStatus.YELLOW); + res.setMessageCode("Not deployed"); + return res; + } + + public void resume(String instanceName) { + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void suspend(String instanceName) { + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void runHealthTests() { + for (CdapServiceInstance i : o.getInstances()) { + HealthTestResponse h = null; + try { + h = o.test(i.getName()); + } catch (Exception e) { + h = ServiceFactory.eINSTANCE.createHealthTestResponse(); + h.setMessageCode("Unable to determine health: " + e); + h.setStatus(HealthTestStatus.RED); + } + i.setHealthTestStatus(h.getStatus()); + i.setHealthTestMessageCode(h.getMessageCode()); + MetricStore store = controller.getServer().metrics.getStore(i); + Date now = new Date(); + String path = "/lastHealthTest"; + store.addLongValue(path, now, now.getTime(), "DateMetricAttribute", false); + } + + } + + public void updateInstanceConfiguration(String instanceName) { + CdapServiceInstance i = findInstance(instanceName); + CdapInternalApplicationConfiguration a = CdapFactory.eINSTANCE.createCdapInternalApplicationConfiguration(); + for (DcaeStream in : i.getInputStreams()) { + if (in instanceof DmaapStream) { + updateConfigSimple(i, in, "namespace-prefs::dmaap.in." + in.getName() + ".${attrName}", a); + } + } + for (DcaeStream in : i.getOutputStreams()) { + if (in instanceof DmaapStream) { + updateConfigSimple(i, in, "namespace-prefs::dmaap.out." + in.getName() + ".${attrName}", a); + } + } + updateConfig(i, i, a); + i.setCdapConfiguration(a); + } + + private String cdapName(CdapServiceInstance i) { +// String n = "dcae:" + o.getName() + ":" + i.getName(); + // return n.replace("-", "X").replace(":", "Y"); + return i.getNamespace(); + // return "dcae"+ new Date().getTime(); + } + + private DcaeCdapClusterManagerConsole consoleCluster(CdapServiceInstance i) { + CdapClusterServiceInstance instance = i.getClusterService(); + // need to assign the leader + EList<DcaeBasicServer> l = instance.getServers(); + instance.setLeaderServer(l.get(l.size() - 1)); + DcaeCdapClusterService service = (DcaeCdapClusterService) instance.getService(); + DcaeCdapClusterServiceProvider provider = service.getSomfProvider(); + AbstractClient c = provider.getClient(instance); + return new DcaeCdapClusterManagerConsole(c); + } + + private String list2string(EList<CdapKeyPair> l) { + StringBuffer buf = new StringBuffer(); + boolean first = true; + for (CdapKeyPair p : l) { + if (p.getValue() == null) + continue; + if (!first) + buf.append(" "); + first = false; + // dmaap.XX.dmaapPassword + if (p.getName().startsWith("dmaap") && p.getName().endsWith("dmaapPassword")) { + String pw = p.getValue(); + if (! pw.startsWith("rsa:")) { +// System.err.println("ZZZZZ: unencrypted pw: " + ManagementServer.object2ref(p)); + } + try { + pw = JavaHttpClient.decryptPassword(pw); + } catch (Exception e) { +// System.err.println("ZZZZZ: badly encrypted password: " + ManagementServer.object2ref(p)); + pw = "badly encrypted password"; + } + buf.append(p.getName()).append("=").append(pw); + } + else { + String v = p.getValue(); + if (v.startsWith("rsa:")) { + try { + v = JavaHttpClient.decryptPassword(v); + } catch (Exception e) { + v = "badly encrypted password"; + } + } + buf.append(p.getName()).append("=").append(v); + } + } + return buf.toString(); + } + + protected CdapServiceInstance findInstance(String instanceName) { + for (CdapServiceInstance ii : o.getInstances()) { + if (ii.getName().equals(instanceName)) { + return ii; + } + } + throw new RuntimeException("Unable to find instance: " + instanceName); + } + + private void updateConfigSimple(EObject root, EObject i, String destination, CdapInternalApplicationConfiguration a) { + if (i == null) + return; + for (EAttribute attr : i.eClass().getEAllAttributes()) { + add(root, i, attr, destination, a); + } + } + + private void updateConfig(EObject root, EObject i, CdapInternalApplicationConfiguration appConfig) { + if (i == null) + return; + for (EAttribute attr : i.eClass().getEAllAttributes()) { + EAnnotation anno = attr.getEAnnotation("http://openecomp.org/cdap"); + if (anno == null) + continue; + String destination = anno.getDetails().get("destination"); +// System.err.println("AAAAA" + attr.getName() + " " + destination); + add(root, i, attr, destination, appConfig); + } + for (EReference ref : i.eClass().getEAllContainments()) { + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList<EObject> l = (EList<EObject>) i.eGet(ref); + for (EObject o : l) { + updateConfig(root, o, appConfig); + } + } else { + updateConfig(root, (EObject) i.eGet(ref), appConfig); + } + } +// System.err.println(ManagementServer.ecore2json(appConfig, 1000, null, true).toString(2)); + } + + private void add(EObject root, EObject i, EAttribute attr, String destination, CdapInternalApplicationConfiguration appConfig) { + // Make this more complex later + if (i instanceof NamedEntity) { + NamedEntity n = (NamedEntity) i; + if (n.getName() != null) + destination = destination.replace("${name}", n.getName()); + } + destination = destination.replace("${attrName}", attr.getName()); + String path1 = ManagementServer.object2ref(root); + String path2 = ManagementServer.object2ref(i); + String path = path2.replace("/", ".").substring(path1.length() + 1); + destination = destination.replace("${path}", path ); + String[] a = destination.split(":"); + if (a.length != 3) { + throw new RuntimeException("Bad CDAP destination annotation: " + destination); + } + if ("worker-prefs".equals(a[0])) { + add(root, appConfig.getWorkers(), a[1], a[2], i, attr); + } + if ("service-prefs".equals(a[0])) { + add(root, appConfig.getServices(), a[1], a[2], i, attr); + } + if ("flow-prefs".equals(a[0])) { + add(root, appConfig.getFlows(), a[1], a[2], i, attr); + } + if ("app-prefs".equals(a[0])) { + add(root, appConfig.getApps(), a[1], a[2], i, attr); + } + if ("namespace-prefs".equals(a[0])) { + add(root, appConfig.getPreferences(), a[2], i, attr); + } + } + + private org.openecomp.ncomp.cdap.CdapFactory f = org.openecomp.ncomp.cdap.CdapFactory.eINSTANCE; + + private void add(EObject root, EList<CdapEntityWithPreferences> l, String name, String cdapKey, EObject i, EAttribute attr) { + CdapEntityWithPreferences p = null; + for (CdapEntityWithPreferences p1 : l) { + if (p1.getName().equals(name)) { + p = p1; + break; + } + } + if (p == null) { + p = f.createCdapEntityWithPreferences(); + l.add(p); + p.setName(name); + } + add(root,p.getPreferences(), cdapKey, i, attr); + } + + private void add(EObject root, EList<CdapKeyPair> prefs, String cdapKey, EObject i, EAttribute attr) { + String value; + if (attr.isMany()) { + @SuppressWarnings("unchecked") + EList<Object> l = (EList<Object>) i.eGet(attr); + List<String> l2 = new ArrayList<String>(); + for (Object o : l) { + l2.add((String) ManagementServer.attr2jsonValue(0, o, attr.getEType())); + } + value = StringUtil.join(l2, ":"); + } + else + value = (String) ManagementServer.attr2jsonValue(0, i.eGet(attr), attr.getEType()); + CdapKeyPair pair = f.createCdapKeyPair(); + pair.setName(cdapKey); + pair.setValue(value); + prefs.add(pair); + } + + public void start() { + + Thread t = new Thread("cdap service: " + o.getName()) { + @Override + public void run() { + while (true) { + try { + if (!controller.getServer().isSlave) { + updateDeploymentStatus(); + } + Thread.sleep(60000); // sleep 60 seconds + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("vm service: " + o.getName() + " : " + e); + try { + Thread.sleep(30000); + } catch (InterruptedException e1) { + } + } + } + } + + }; + t.start(); + } + + public void updateDeploymentStatus() { +// System.out.println("CDAP updateDeploymentStatus 1: "); + for (CdapServiceInstance instance : o.getInstances()) { + // TODO Docker deployment status + instance.setStatus(DeploymentStatus.UNDEPLOYED); +// System.out.println("CDAP updateDeploymentStatus 2: " + instance.getName() + " " + instance.getNamespace()); + if (instance.getClusterService() == null) + continue; + for (CdapNamespace c : instance.getClusterService().getCluster().getNamespaces()) { +// System.out.println("CDAP updateDeploymentStatus 4: " + c.getName()); + if (instance.getNamespace() != null && instance.getNamespace().equals(c.getName())) { + instance.setStatus(DeploymentStatus.DEPLOYED); + } + } + } + } + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdap/gui/DcaeGuiClientApiProvider.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdap/gui/DcaeGuiClientApiProvider.java new file mode 100644 index 0000000..63e179c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdap/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.servers.cdap.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class 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-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerProvider.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerProvider.java new file mode 100644 index 0000000..22f56ee --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerProvider.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.servers.cdapmanager; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; + + +import org.openecomp.dcae.controller.service.cdapmanager.impl.CdapManagerImpl; +import org.openecomp.dcae.controller.service.cdapmanager.CdapManager; + + +public class DcaeCdapManagerProvider extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(DcaeCdapManagerProvider.class); + CdapManager o; + + public DcaeCdapManagerProvider(ISiriusServer controller, CdapManager o) { + super(controller, o); + this.o = o; + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void suspend() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void resume() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String publicKey() { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void configurationChanged() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void updateStreams(EList<org.openecomp.dcae.controller.core.stream.DcaeStream> inputStreams, EList<org.openecomp.dcae.controller.core.stream.DcaeStream> outputStreams) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + + + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiProvider.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiProvider.java new file mode 100644 index 0000000..89a06b3 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/cdapmanager/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.servers.cdapmanager.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-adaptor/src/main/server-gen/bin/controller-service-Cdap-manager-controller b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server-gen/bin/controller-service-Cdap-manager-controller new file mode 100644 index 0000000..58985bc --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server-gen/bin/controller-service-Cdap-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-manager-controller +CLASS=org.openecomp.dcae.controller.service.servers.cdapmanager.DcaeCdapManagerServer + +############################## 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/cdapmanager.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-adaptor/src/main/server-gen/bin/controller-service-cdap-adaptor-controller b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server-gen/bin/controller-service-cdap-adaptor-controller new file mode 100644 index 0000000..1aa26a7 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server-gen/bin/controller-service-cdap-adaptor-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-adaptor-controller +CLASS=org.openecomp.dcae.controller.service.servers.cdap.DcaeCdapServiceServer + +############################## COMMON BELOW ########################## + +check_status () +{ + if [ -f "${_PIDFILE}" ]; then + _PID=`cat "${_PIDFILE}"` + check_status_of_pid $_PID + else + _STATUS="$SNAME (no pidfile) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + +remove_pid_file () +{ + if [ -f "${_PIDFILE}" ]; then + rm "${_PIDFILE}" + fi +} + + +_DIR=`dirname "$0"` +_DIR=`dirname "$_DIR"` + +_PIDFILE=$_DIR/PID + +CMD=$1 +shift + +check_status + +CP=$(find $_DIR/lib/*/* -name \*.jar 2>/dev/null | xargs -I X printf ":%s" X) + +JVMARGS=$(grep 'server.jvmargs' $_DIR/config/cdap.properties | sed -e 's/.*=//') + +case $CMD in + status) + echo $_STATUS + exit 0 + ;; + console) + $GROOVY_HOME/bin/groovysh -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP + ;; + run) + $JAVA_HOME/bin/java -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + groovy) + $GROOVY_HOME/bin/groovy -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + start) + if [ "$_RUNNING" = "1" ]; then + echo $_STATUS + exit 0 + fi + mkdir -p $_DIR/logs + if [ -e $_DIR/logs/$PNAME.out.1 ]; then mv $_DIR/logs/$PNAME.out.1 $_DIR/logs/$PNAME.out.2; fi + if [ -e $_DIR/logs/$PNAME.err.1 ]; then mv $_DIR/logs/$PNAME.err.1 $_DIR/logs/$PNAME.err.2; fi + if [ -e $_DIR/logs/$PNAME.out ]; then mv $_DIR/logs/$PNAME.out $_DIR/logs/$PNAME.out.1; fi + if [ -e $_DIR/logs/$PNAME.err ]; then mv $_DIR/logs/$PNAME.err $_DIR/logs/$PNAME.err.1; fi + + nohup $JAVA_HOME/bin/java $JVMARGS -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" $CLASS >> $_DIR/logs/$PNAME.out 2>> $_DIR/logs/$PNAME.err & + + _PID=$! + echo $_PID > $_PIDFILE + sleep 5 + check_status + echo $_STATUS + if [ "$_RUNNING" = "1" ]; then + exit 0 + else + echo "Failed to start - make sure the $SNAME is fully configured properly" + exit 1 + fi + ;; + stop) + if [ "$_RUNNING" = "0" ]; then + echo $_STATUS + remove_pid_file + exit 0 + fi + echo "Stopping $SNAME..." + _PID_TO_KILL=$_PID; + echo "$SNAME (pid=${_PID_TO_KILL}) is stopping..." + kill -TERM $_PID_TO_KILL + sleep 5 + check_status_of_pid $_PID_TO_KILL + if [ "$_RUNNING" = "1" ]; then + kill -TERM $_PID_TO_KILL + fi + while [ "$_RUNNING" = "1" ]; do + sleep 2 + check_status_of_pid $_PID_TO_KILL + done + remove_pid_file + echo "$SNAME has stopped." + exit 0 + ;; + *) + echo "$0 start|stop" + ;; +esac + + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/adaptor.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/adaptor.properties new file mode 100644 index 0000000..4605389 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/adaptor.properties @@ -0,0 +1,7 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = PORT +server.user.console = CONSOLE_PW +server.user.gui = GUI_PW +server.user.client = CLIENT_PW diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/console.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/console.properties new file mode 100644 index 0000000..4b63607 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/console.properties @@ -0,0 +1,3 @@ +localhost.endpoint=http://localhost:PORT +localhost.user=console +localhost.password=CONSOLE_PW diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/gui.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/gui.properties new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/gui.properties diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/log4j.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/log4j.properties new file mode 100644 index 0000000..8b3b8f9 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/log4j.properties @@ -0,0 +1,24 @@ +#log4j.debug=0 +log4j.rootLogger=warn, file +log4j.logger.org.openecomp.ncomp=info, file +log4j.additivity.org.openecomp.ncomp=false +log4j.logger.org.openecomp.ncomp.datarouter=warn, file +log4j.additivity.org.openecomp.ncomp.datarouter=false +log4j.logger.org.apache.http.headers=debug, file +log4j.logger.org.apache.http.wire=debug, file + +## uploaded logger +log4j.logger.org.openecomp.ncomp.sirius.manager.uploaded=info, uploaded +log4j.additivity.org.openecomp.ncomp.sirius.manager.uploaded=false +## request logging +log4j.logger.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=info, requests +log4j.additivity.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=false + + +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.File=logs/BBBB.log +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d %5p [%t] %m %C:%L%n +log4j.appender.file.MaxFileSize=50MB +log4j.appender.file.MaxBackupIndex=5 + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/makefile b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/makefile new file mode 100644 index 0000000..717823e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/makefile @@ -0,0 +1,9 @@ + +restart: stop start + +start: + M2_HOME=/home/ncomp/.m2 bin/BBBB-controller start +stop: + bin/BBBB-controller stop +console: + bin/BBBB-controller console diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/config/pw.sh.sh b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/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-adaptor/src/main/server/config/pw.sh.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +### used to generate random passwords + + +echo '#!/bin/bash' +echo "" + +echo 'cat \' + +for i in CONSOLE GUI CLIENT +do + echo ' |' sed s/${i}_PW/$(echo $i:$(date +%s) | sha256sum | base64 | head -c 20 ; echo)/ \\ +done +
\ No newline at end of file diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/scripts/console.groovy b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/scripts/console.groovy new file mode 100644 index 0000000..9bab61a --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/server/scripts/console.groovy @@ -0,0 +1,27 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +import org.openecomp.dcae.controller.service.servers.cdap.DcaeCdapServiceConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +adaptor = new DcaeCdapServiceConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/CdapManager.yaml b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/CdapManager.yaml new file mode 100644 index 0000000..6ab6771 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/CdapManager.yaml @@ -0,0 +1,69 @@ +operations: + test: {} + suspend: {} + resume: {} + publicKey: {} + configurationChanged: {} + updateStreams: {} + 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 +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 + 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 diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/CdapService.yaml b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/CdapService.yaml new file mode 100644 index 0000000..1bb496e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/CdapService.yaml @@ -0,0 +1,135 @@ +operations: + deploy: {} + undeploy: {} + test: {} + suspend: {} + resume: {} + pushManagerConfiguration: {} + pollManagerConfiguration: {} + managerConfiguration: {} + managerOperation: {} + updateConfigurationFromPolicy: {} + runHealthTests: {} + updateInstanceConfiguration: {} + 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_updateInstanceConfiguration: + decription: Remote call updateInstanceConfiguration +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 + updateInstanceConfiguration: + errorCode: updateInstanceConfiguration-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_updateInstanceConfiguration: + errorCode: REMOTE-updateInstanceConfiguration-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/GuiClientApi.yaml b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/GuiClientApi.yaml new file mode 100644 index 0000000..bf3d69d --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/GuiClientApi.yaml @@ -0,0 +1,69 @@ +operations: + getTree: {} + getObject: {} + getTimeSerie: {} + getTable: {} + getHtml: {} + getGraph: {} + REMOTE_getTree: + decription: Remote call getTree + REMOTE_getObject: + decription: Remote call getObject + REMOTE_getTimeSerie: + decription: Remote call getTimeSerie + REMOTE_getTable: + decription: Remote call getTable + REMOTE_getHtml: + decription: Remote call getHtml + REMOTE_getGraph: + decription: Remote call getGraph +messages: + dummy: {} + getTree: + errorCode: getTree-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getObject: + errorCode: getObject-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTimeSerie: + errorCode: getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTable: + errorCode: getTable-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getHtml: + errorCode: getHtml-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getGraph: + errorCode: getGraph-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_getTree: + errorCode: REMOTE-getTree-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getObject: + errorCode: REMOTE-getObject-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTimeSerie: + errorCode: REMOTE-getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTable: + errorCode: REMOTE-getTable-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getHtml: + errorCode: REMOTE-getHtml-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getGraph: + errorCode: REMOTE-getGraph-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapFactory.java new file mode 100644 index 0000000..ae21528 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapFactory.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.servers.cdap; + +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.CdapService; +import org.openecomp.dcae.controller.service.cdap.CdapPackage; +import org.openecomp.dcae.controller.service.cdap.impl.CdapFactoryImpl; + + + + + +public class DcaeCdapFactory extends CdapFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeCdapFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return CdapPackage.eINSTANCE; } + public DcaeCdapFactory(ISiriusServer server) { + this.server = server; + } + @Override + public CdapService createCdapService() { + return new DcaeCdapService(server); + } + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapService.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapService.java new file mode 100644 index 0000000..9d71a7e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapService.java @@ -0,0 +1,408 @@ + +/*- + * ============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.servers.cdap; + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +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.servers.cdap.logging.CdapServiceOperationEnum; +import org.openecomp.dcae.controller.service.servers.cdap.logging.CdapServiceMessageEnum; + + + + +import org.openecomp.dcae.controller.service.cdap.impl.CdapServiceImpl; + + + +public class DcaeCdapService extends CdapServiceImpl implements ISiriusPlugin { + public static final Logger logger = Logger.getLogger(DcaeCdapService.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeCdapServiceProvider controller; + ISiriusServer server; + + public DcaeCdapService(ISiriusServer server) { + this.server = server; + this.controller = new DcaeCdapServiceProvider(server,this); + } + + public void updateInstanceConfiguration(java.lang.String instanceName) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "updateInstanceConfiguration", ApiRequestStatus.START, duration_,instanceName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.updateInstanceConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + controller.updateInstanceConfiguration(instanceName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateInstanceConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapServiceMessageEnum.updateInstanceConfiguration, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateInstanceConfiguration", ApiRequestStatus.OKAY, duration_,instanceName); + + } + + 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(CdapServiceOperationEnum.deploy); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CdapServiceMessageEnum.deploy, e.toString()); + 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(CdapServiceOperationEnum.undeploy); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CdapServiceMessageEnum.undeploy, e.toString()); + 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(CdapServiceOperationEnum.test); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CdapServiceMessageEnum.test, e.toString()); + 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(CdapServiceOperationEnum.suspend); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CdapServiceMessageEnum.suspend, e.toString()); + 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(CdapServiceOperationEnum.resume); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CdapServiceMessageEnum.resume, e.toString()); + 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(CdapServiceOperationEnum.pushManagerConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CdapServiceMessageEnum.pushManagerConfiguration, e.toString()); + 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(CdapServiceOperationEnum.pollManagerConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CdapServiceMessageEnum.pollManagerConfiguration, e.toString()); + 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(CdapServiceOperationEnum.managerConfiguration); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CdapServiceMessageEnum.managerConfiguration, e.toString()); + 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(CdapServiceOperationEnum.managerOperation); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CdapServiceMessageEnum.managerOperation, e.toString()); + 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(CdapServiceOperationEnum.updateConfigurationFromPolicy); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CdapServiceMessageEnum.updateConfigurationFromPolicy, e.toString()); + 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(CdapServiceOperationEnum.runHealthTests); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CdapServiceMessageEnum.runHealthTests, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.OKAY, duration_); + + } + + + + + + + @Override + public void start() { + controller.start(); + } + + public static void ecoreSetup() { + DcaeCdapServiceProvider.ecoreSetup(); + } + public DcaeCdapServiceProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceClient.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceClient.java new file mode 100644 index 0000000..01afc0f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceClient.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.servers.cdap; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.dcae.controller.service.cdap.impl.CdapServiceImpl; +import org.openecomp.dcae.controller.service.cdap.CdapPackage; +import org.openecomp.dcae.controller.service.servers.cdap.logging.CdapServiceOperationEnum; +import org.openecomp.dcae.controller.service.servers.cdap.logging.CdapServiceMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeCdapServiceClient extends CdapServiceImpl { + public static final Logger logger = Logger.getLogger(DcaeCdapServiceClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeCdapServiceClient(String file, String name) { + DcaeCdapService.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeCdapServiceClient(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 DcaeCdapServiceClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public void updateInstanceConfiguration(java.lang.String instanceName) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_updateInstanceConfiguration); + + try { + client.operationPath("/resources", c, "updateInstanceConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_updateInstanceConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateInstanceConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_deploy); + + try { + client.operationPath("/resources", c, "deploy", null, instanceName,containerPath); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_deploy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@deploy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void undeploy(java.lang.String instanceName) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_undeploy); + + try { + client.operationPath("/resources", c, "undeploy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_undeploy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@undeploy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.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(CdapServiceMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@test: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend(java.lang.String instanceName) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@suspend: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume(java.lang.String instanceName) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@resume: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pushManagerConfiguration(java.lang.String instanceName) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_pushManagerConfiguration); + + try { + client.operationPath("/resources", c, "pushManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_pushManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@pushManagerConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void pollManagerConfiguration(java.lang.String instanceName) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_pollManagerConfiguration); + + try { + client.operationPath("/resources", c, "pollManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_pollManagerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@pollManagerConfiguration: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.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(CdapServiceMessageEnum.REMOTE_managerConfiguration, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@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 = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.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(CdapServiceMessageEnum.REMOTE_managerOperation, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@managerOperation: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_updateConfigurationFromPolicy); + + try { + client.operationPath("/resources", c, "updateConfigurationFromPolicy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_updateConfigurationFromPolicy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateConfigurationFromPolicy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void runHealthTests() { + EClass c = CdapPackage.eINSTANCE.getCdapService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapServiceOperationEnum.REMOTE_runHealthTests); + + try { + client.operationPath("/resources", c, "runHealthTests", null); + } + catch (Exception e) { + ecomplogger.warn(CdapServiceMessageEnum.REMOTE_runHealthTests, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@runHealthTests: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceConsole.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceConsole.java new file mode 100644 index 0000000..f6fe8f1 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceConsole.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.servers.cdap; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class DcaeCdapServiceConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeCdapServiceConsole.class); + protected DcaeCdapServiceClient controller; + + + + + public DcaeCdapServiceConsole(String filename, String name) { + super(filename, name); + controller = new DcaeCdapServiceClient(filename,name); + client = controller.client; + + } + + public DcaeCdapServiceConsole(AbstractClient c) { + controller = new DcaeCdapServiceClient(c); + client = controller.client; + } + + + public void updateInstanceConfiguration(java.lang.String instanceName) { + + try { + controller.updateInstanceConfiguration(instanceName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + 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)); + } + + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceProviderTemplate.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceProviderTemplate.java new file mode 100644 index 0000000..ca9ca68 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceProviderTemplate.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.servers.cdap; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; + + +import org.openecomp.dcae.controller.service.cdap.impl.CdapServiceImpl; +import org.openecomp.dcae.controller.service.cdap.CdapService; + + +public class DcaeCdapServiceProviderTemplate extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(DcaeCdapServiceProviderTemplate.class); + CdapService o; + + public DcaeCdapServiceProviderTemplate(ISiriusServer controller, CdapService o) { + super(controller, o); + this.o = o; + } + + public void updateInstanceConfiguration(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void undeploy(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void suspend(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void resume(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void pushManagerConfiguration(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void pollManagerConfiguration(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { + org.eclipse.emf.ecore.EObject res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { + org.json.JSONObject res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void updateConfigurationFromPolicy(java.lang.String instanceName) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void runHealthTests() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + + + + + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceServer.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceServer.java new file mode 100644 index 0000000..78b58cd --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/DcaeCdapServiceServer.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.servers.cdap; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.cdap.CdapService; + + + + + + +public class DcaeCdapServiceServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeCdapServiceServer.class); + String serverPath; + ManagementServer server; + DcaeCdapService controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeCdapFactory f = new DcaeCdapFactory(this); + + + + public DcaeCdapServiceServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeCdapService.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "CdapService", serverPath, filename); + server.addFactory(f); + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeCdapService) server.find("/").o; + webServer = new Jetty8Server("cdap.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")); + + DcaeCdapServiceServer s = new DcaeCdapServiceServer("cdap.properties"); + s.runWebserver(); + } + public CdapService getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapService.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapService.properties new file mode 100644 index 0000000..364ae3b --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapService.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 + +updateInstanceConfiguration=\ + updateInstanceConfiguration-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_updateInstanceConfiguration=\ + REMOTE-updateInstanceConfiguration-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapServiceMessageEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapServiceMessageEnum.java new file mode 100644 index 0000000..15e7393 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapServiceMessageEnum.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.servers.cdap.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum CdapServiceMessageEnum implements EcompMessageEnum { + + dummy, + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + updateInstanceConfiguration, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests, + REMOTE_updateInstanceConfiguration; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.servers.cdap.logging.CdapService"); + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapServiceOperationEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapServiceOperationEnum.java new file mode 100644 index 0000000..d67c6be --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdap/logging/CdapServiceOperationEnum.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.servers.cdap.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum CdapServiceOperationEnum implements EcompOperationEnum { + + deploy, + undeploy, + test, + suspend, + resume, + pushManagerConfiguration, + pollManagerConfiguration, + managerConfiguration, + managerOperation, + updateConfigurationFromPolicy, + runHealthTests, + updateInstanceConfiguration, + REMOTE_deploy, + REMOTE_undeploy, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_pushManagerConfiguration, + REMOTE_pollManagerConfiguration, + REMOTE_managerConfiguration, + REMOTE_managerOperation, + REMOTE_updateConfigurationFromPolicy, + REMOTE_runHealthTests, + REMOTE_updateInstanceConfiguration; +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManager.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManager.java new file mode 100644 index 0000000..dcddd85 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManager.java @@ -0,0 +1,241 @@ + +/*- + * ============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.servers.cdapmanager; + + + + +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.manager.ManagementServer; +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.servers.cdapmanager.logging.CdapManagerOperationEnum; +import org.openecomp.dcae.controller.service.servers.cdapmanager.logging.CdapManagerMessageEnum; + + + + +import org.openecomp.dcae.controller.service.cdapmanager.impl.CdapManagerImpl; + + + +public class DcaeCdapManager extends CdapManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeCdapManager.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeCdapManagerProvider controller; + ISiriusServer server; + + public DcaeCdapManager(ISiriusServer server) { + this.server = server; + this.controller = new DcaeCdapManagerProvider(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(CdapManagerOperationEnum.test); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CdapManagerMessageEnum.test, e.toString()); + 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(CdapManagerOperationEnum.suspend); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CdapManagerMessageEnum.suspend, e.toString()); + 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(CdapManagerOperationEnum.resume); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CdapManagerMessageEnum.resume, e.toString()); + 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(CdapManagerOperationEnum.publicKey); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CdapManagerMessageEnum.publicKey, e.toString()); + 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(CdapManagerOperationEnum.configurationChanged); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CdapManagerMessageEnum.configurationChanged, e.toString()); + 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(CdapManagerOperationEnum.updateStreams); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CdapManagerMessageEnum.updateStreams, e.toString()); + 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 static void ecoreSetup() { + DcaeCdapManagerProvider.ecoreSetup(); + } + public DcaeCdapManagerProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerClient.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerClient.java new file mode 100644 index 0000000..7c43951 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerClient.java @@ -0,0 +1,174 @@ + +/*- + * ============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.servers.cdapmanager; + +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.cdapmanager.impl.CdapManagerImpl; +import org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage; +import org.openecomp.dcae.controller.service.servers.cdapmanager.logging.CdapManagerOperationEnum; +import org.openecomp.dcae.controller.service.servers.cdapmanager.logging.CdapManagerMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeCdapManagerClient extends CdapManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeCdapManagerClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeCdapManagerClient(String file, String name) { + DcaeCdapManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeCdapManagerClient(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 DcaeCdapManagerClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + EClass c = CdapmanagerPackage.eINSTANCE.getCdapManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapManagerOperationEnum.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(CdapManagerMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@test: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend() { + EClass c = CdapmanagerPackage.eINSTANCE.getCdapManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapManagerOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null); + } + catch (Exception e) { + ecomplogger.warn(CdapManagerMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@suspend: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume() { + EClass c = CdapmanagerPackage.eINSTANCE.getCdapManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapManagerOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null); + } + catch (Exception e) { + ecomplogger.warn(CdapManagerMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@resume: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public java.lang.String publicKey() { + EClass c = CdapmanagerPackage.eINSTANCE.getCdapManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapManagerOperationEnum.REMOTE_publicKey); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "publicKey", null); + } + catch (Exception e) { + ecomplogger.warn(CdapManagerMessageEnum.REMOTE_publicKey, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@publicKey: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void configurationChanged() { + EClass c = CdapmanagerPackage.eINSTANCE.getCdapManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapManagerOperationEnum.REMOTE_configurationChanged); + + try { + client.operationPath("/resources", c, "configurationChanged", null); + } + catch (Exception e) { + ecomplogger.warn(CdapManagerMessageEnum.REMOTE_configurationChanged, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@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 = CdapmanagerPackage.eINSTANCE.getCdapManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapManagerOperationEnum.REMOTE_updateStreams); + + try { + client.operationPath("/resources", c, "updateStreams", null, inputStreams,outputStreams); + } + catch (Exception e) { + ecomplogger.warn(CdapManagerMessageEnum.REMOTE_updateStreams, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateStreams: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerConsole.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerConsole.java new file mode 100644 index 0000000..4378d95 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerConsole.java @@ -0,0 +1,127 @@ + +/*- + * ============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.servers.cdapmanager; + + +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.servers.cdapmanager.gui.DcaeGuiClientApiConsole; + + +public class DcaeCdapManagerConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeCdapManagerConsole.class); + protected DcaeCdapManagerClient controller; + + + DcaeGuiClientApiConsole gui; + + + public DcaeCdapManagerConsole(String filename, String name) { + super(filename, name); + controller = new DcaeCdapManagerClient(filename,name); + client = controller.client; + + gui = new DcaeGuiClientApiConsole(filename,name); + } + + public DcaeCdapManagerConsole(AbstractClient c) { + controller = new DcaeCdapManagerClient(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)); + } + + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerProviderTemplate.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerProviderTemplate.java new file mode 100644 index 0000000..43f74c5 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerProviderTemplate.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.servers.cdapmanager; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; + + +import org.openecomp.dcae.controller.service.cdapmanager.impl.CdapManagerImpl; +import org.openecomp.dcae.controller.service.cdapmanager.CdapManager; + + +public class DcaeCdapManagerProviderTemplate extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(DcaeCdapManagerProviderTemplate.class); + CdapManager o; + + public DcaeCdapManagerProviderTemplate(ISiriusServer controller, CdapManager o) { + super(controller, o); + this.o = o; + } + + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + org.openecomp.dcae.controller.core.service.HealthTestResponse res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void suspend() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void resume() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String publicKey() { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void configurationChanged() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void updateStreams(EList<org.openecomp.dcae.controller.core.stream.DcaeStream> inputStreams, EList<org.openecomp.dcae.controller.core.stream.DcaeStream> outputStreams) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + + + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerServer.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerServer.java new file mode 100644 index 0000000..cbe7dc6 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapManagerServer.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.servers.cdapmanager; + +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.cdapmanager.CdapManager; + + +import org.openecomp.dcae.controller.service.servers.cdapmanager.gui.DcaeModelFactory; + + + + + +public class DcaeCdapManagerServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeCdapManagerServer.class); + String serverPath; + ManagementServer server; + DcaeCdapManager controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeCdapmanagerFactory f = new DcaeCdapmanagerFactory(this); + + + String guiPath; + ManagementServer guiServer; + + + public DcaeCdapManagerServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeCdapManager.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "CdapManager", serverPath, filename); + server.addFactory(f); + + server.addFactory(new org.openecomp.ncomp.servers.cdap.CdapCdapFactory(this)); + + + server.addFactory(org.openecomp.dcae.controller.service.cdap.CdapFactory.eINSTANCE); + + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeCdapManager) server.find("/").o; + webServer = new Jetty8Server("cdapmanager.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")); + + DcaeCdapManagerServer s = new DcaeCdapManagerServer("cdapmanager.properties"); + s.runWebserver(); + } + public CdapManager getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapmanagerFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapmanagerFactory.java new file mode 100644 index 0000000..3e2f416 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/DcaeCdapmanagerFactory.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.servers.cdapmanager; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.cdapmanager.CdapManager; +import org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage; +import org.openecomp.dcae.controller.service.cdapmanager.impl.CdapmanagerFactoryImpl; + + + + + +public class DcaeCdapmanagerFactory extends CdapmanagerFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeCdapmanagerFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return CdapmanagerPackage.eINSTANCE; } + public DcaeCdapmanagerFactory(ISiriusServer server) { + this.server = server; + } + @Override + public CdapManager createCdapManager() { + return new DcaeCdapManager(server); + } + + + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApi.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApi.java new file mode 100644 index 0000000..fc913e9 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApi.java @@ -0,0 +1,271 @@ + +/*- + * ============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.servers.cdapmanager.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.manager.ManagementServer; +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.servers.cdapmanager.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.dcae.controller.service.servers.cdapmanager.gui.logging.GuiClientApiMessageEnum; + + + + + + + +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); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(GuiClientApiMessageEnum.getTree, e.toString()); + 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); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(GuiClientApiMessageEnum.getObject, e.toString()); + 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); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(GuiClientApiMessageEnum.getTimeSerie, e.toString()); + 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); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(GuiClientApiMessageEnum.getTable, e.toString()); + 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); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(GuiClientApiMessageEnum.getHtml, e.toString()); + 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); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(GuiClientApiMessageEnum.getGraph, e.toString()); + 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-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiClient.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiClient.java new file mode 100644 index 0000000..3ced93a --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/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.servers.cdapmanager.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.servers.cdapmanager.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.dcae.controller.service.servers.cdapmanager.gui.logging.GuiClientApiMessageEnum; + + +import org.openecomp.dcae.controller.service.servers.cdapmanager.DcaeCdapManager; + + + + +@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) { + DcaeCdapManager.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: " + client.getRemote() + "@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: " + client.getRemote() + "@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: " + client.getRemote() + "@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: " + client.getRemote() + "@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: " + client.getRemote() + "@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: " + client.getRemote() + "@getGraph: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiConsole.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiConsole.java new file mode 100644 index 0000000..ea17b1d --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/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.servers.cdapmanager.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-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiProviderTemplate.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeGuiClientApiProviderTemplate.java new file mode 100644 index 0000000..80da073 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/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.servers.cdapmanager.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-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeModelFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/DcaeModelFactory.java new file mode 100644 index 0000000..5b46e5e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/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.servers.cdapmanager.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.servers.cdapmanager.DcaeCdapManagerServer; + + + +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-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/logging/GuiClientApi.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/logging/GuiClientApi.properties new file mode 100644 index 0000000..8705ab8 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/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-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/logging/GuiClientApiMessageEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/logging/GuiClientApiMessageEnum.java new file mode 100644 index 0000000..bf9107c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/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.servers.cdapmanager.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.servers.cdapmanager.gui.logging.GuiClientApi"); + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/logging/GuiClientApiOperationEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/gui/logging/GuiClientApiOperationEnum.java new file mode 100644 index 0000000..ecfbf9e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/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.servers.cdapmanager.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-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManager.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManager.properties new file mode 100644 index 0000000..ef19f9b --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManager.properties @@ -0,0 +1,78 @@ + +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 + +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 diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManagerMessageEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManagerMessageEnum.java new file mode 100644 index 0000000..bfc7789 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManagerMessageEnum.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.servers.cdapmanager.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum CdapManagerMessageEnum implements EcompMessageEnum { + + dummy, + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.servers.cdapmanager.logging.CdapManager"); + } +} diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManagerOperationEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManagerOperationEnum.java new file mode 100644 index 0000000..4a0f398 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/cdapmanager/logging/CdapManagerOperationEnum.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.servers.cdapmanager.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum CdapManagerOperationEnum implements EcompOperationEnum { + + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + REMOTE_test, + REMOTE_suspend, + REMOTE_resume, + REMOTE_publicKey, + REMOTE_configurationChanged, + REMOTE_updateStreams; +} 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> diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.classpath b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.classpath new file mode 100644 index 0000000..69b19c6 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-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-model/.gitignore b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.project b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.project new file mode 100644 index 0000000..cca7c12 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/.project @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>dcae-controller-service-cdap-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-model/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-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-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-model/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-cdap/dcae-controller-service-cdap-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-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-model/LICENSE.txt b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-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-model/META-INF/MANIFEST.MF b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..067dcd0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-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-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, + org.openecomp.dcae.controller.service.cdap.impl, + org.openecomp.dcae.controller.service.cdap.util, + org.openecomp.dcae.controller.service.cdapmanager, + org.openecomp.dcae.controller.service.cdapmanager.impl, + org.openecomp.dcae.controller.service.cdapmanager.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + ncomp-openstack-model;visibility:=reexport, + ncomp-sirius-manager-agent-model;visibility:=reexport, + ncomp-core-model;bundle-version="0.1.0";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-core-model;bundle-version="0.1.0";visibility:=reexport, + dcae-controller-service-vm-model;visibility:=reexport, + ncomp-cdap-model;bundle-version="0.1.0";visibility:=reexport, + dcae-controller-service-cdap-cluster-model;bundle-version="0.1.0";visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/build.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/build.properties new file mode 100644 index 0000000..6d35b6f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-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-model/plugin.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/plugin.properties new file mode 100644 index 0000000..04852d2 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-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-model/plugin.xml b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/plugin.xml new file mode 100644 index 0000000..ec82db2 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-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 adaptor --> + <package + uri="org.openecomp.dcae.controller.service.cdap" + class="org.openecomp.dcae.controller.service.cdap.CdapPackage" + genModel="src/main/xcore/service.xcore"/> + </extension> + + <extension point="org.eclipse.emf.ecore.generated_package"> + <!-- @generated manager --> + <package + uri="org.openecomp.dcae.controller.service.cdapmanager" + class="org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage" + genModel="src/main/xcore/manager.xcore"/> + </extension> + +</plugin> diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/pom.xml b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/pom.xml new file mode 100644 index 0000000..25be890 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/pom.xml @@ -0,0 +1,35 @@ +<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-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.ncomp.cdap</groupId> + <artifactId>ncomp-cdap-model</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.dcae.controller</groupId> + <artifactId>dcae-controller-core-model</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.dcae.controller</groupId> + <artifactId> + dcae-controller-service-cdap-cluster-model + </artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> +</project> diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapApplication.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapApplication.java new file mode 100644 index 0000000..8ba630c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapApplication.java @@ -0,0 +1,152 @@ + +/*- + * ============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; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Application</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getJarFile <em>Jar File</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getArtifactName <em>Artifact Name</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getVersion <em>Version</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getAppConfigFileContent <em>App Config File Content</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapApplication() + * @model + * @generated + */ +public interface CdapApplication extends NamedEntity { + + /** + * Returns the value of the '<em><b>Jar File</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Jar File</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Jar File</em>' attribute. + * @see #setJarFile(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapApplication_JarFile() + * @model unique="false" + * @generated + */ + String getJarFile(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getJarFile <em>Jar File</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Jar File</em>' attribute. + * @see #getJarFile() + * @generated + */ + void setJarFile(String value); + + /** + * Returns the value of the '<em><b>Artifact Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Artifact Name</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Artifact Name</em>' attribute. + * @see #setArtifactName(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapApplication_ArtifactName() + * @model unique="false" + * @generated + */ + String getArtifactName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getArtifactName <em>Artifact Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Artifact Name</em>' attribute. + * @see #getArtifactName() + * @generated + */ + void setArtifactName(String value); + + /** + * Returns the value of the '<em><b>Version</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Version</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Version</em>' attribute. + * @see #setVersion(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapApplication_Version() + * @model unique="false" + * @generated + */ + String getVersion(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getVersion <em>Version</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Version</em>' attribute. + * @see #getVersion() + * @generated + */ + void setVersion(String value); + + /** + * Returns the value of the '<em><b>App Config File Content</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>App Config File Content</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>App Config File Content</em>' attribute. + * @see #setAppConfigFileContent(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapApplication_AppConfigFileContent() + * @model unique="false" + * @generated + */ + String getAppConfigFileContent(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getAppConfigFileContent <em>App Config File Content</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>App Config File Content</em>' attribute. + * @see #getAppConfigFileContent() + * @generated + */ + void setAppConfigFileContent(String value); +} // CdapApplication diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapArtifact.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapArtifact.java new file mode 100644 index 0000000..f7a72e4 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapArtifact.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============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Artifact</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapArtifact#getJarFile <em>Jar File</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapArtifact#getVersion <em>Version</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapArtifact() + * @model + * @generated + */ +public interface CdapArtifact extends NamedEntity { + /** + * Returns the value of the '<em><b>Jar File</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Jar File</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Jar File</em>' attribute. + * @see #setJarFile(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapArtifact_JarFile() + * @model unique="false" + * @generated + */ + String getJarFile(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapArtifact#getJarFile <em>Jar File</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Jar File</em>' attribute. + * @see #getJarFile() + * @generated + */ + void setJarFile(String value); + + /** + * Returns the value of the '<em><b>Version</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Version</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Version</em>' attribute. + * @see #setVersion(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapArtifact_Version() + * @model unique="false" + * @generated + */ + String getVersion(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapArtifact#getVersion <em>Version</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Version</em>' attribute. + * @see #getVersion() + * @generated + */ + void setVersion(String value); + +} // CdapArtifact diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapArtifacts.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapArtifacts.java new file mode 100644 index 0000000..ff35cc8 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapArtifacts.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============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Artifacts</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapArtifacts#getJarFile <em>Jar File</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapArtifacts#getVersion <em>Version</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapArtifacts() + * @model + * @generated + */ +public interface CdapArtifacts extends NamedEntity { + + /** + * Returns the value of the '<em><b>Jar File</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Jar File</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Jar File</em>' attribute. + * @see #setJarFile(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapArtifacts_JarFile() + * @model unique="false" + * @generated + */ + String getJarFile(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapArtifacts#getJarFile <em>Jar File</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Jar File</em>' attribute. + * @see #getJarFile() + * @generated + */ + void setJarFile(String value); + + /** + * Returns the value of the '<em><b>Version</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Version</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Version</em>' attribute. + * @see #setVersion(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapArtifacts_Version() + * @model unique="false" + * @generated + */ + String getVersion(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapArtifacts#getVersion <em>Version</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Version</em>' attribute. + * @see #getVersion() + * @generated + */ + void setVersion(String value); +} // CdapArtifacts diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapFactory.java new file mode 100644 index 0000000..b15b7d5 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapFactory.java @@ -0,0 +1,117 @@ + +/*- + * ============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; + +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.CdapPackage + * @generated + */ +public interface CdapFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + CdapFactory eINSTANCE = org.openecomp.dcae.controller.service.cdap.impl.CdapFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Service</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Service</em>'. + * @generated + */ + CdapService createCdapService(); + + /** + * Returns a new object of class '<em>Service Instance</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Service Instance</em>'. + * @generated + */ + CdapServiceInstance createCdapServiceInstance(); + + /** + * Returns a new object of class '<em>Application</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Application</em>'. + * @generated + */ + CdapApplication createCdapApplication(); + + /** + * Returns a new object of class '<em>Artifact</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Artifact</em>'. + * @generated + */ + CdapArtifact createCdapArtifact(); + + /** + * Returns a new object of class '<em>Service Instance Configuration</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Service Instance Configuration</em>'. + * @generated + */ + CdapServiceInstanceConfiguration createCdapServiceInstanceConfiguration(); + + /** + * Returns a new object of class '<em>Internal Application Configuration</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Internal Application Configuration</em>'. + * @generated + */ + CdapInternalApplicationConfiguration createCdapInternalApplicationConfiguration(); + + /** + * Returns a new object of class '<em>Service Descriptor</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Service Descriptor</em>'. + * @generated + */ + CdapServiceDescriptor createCdapServiceDescriptor(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the package supported by this factory. + * @generated + */ + CdapPackage getCdapPackage(); + +} //CdapFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapInternalApplicationConfiguration.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapInternalApplicationConfiguration.java new file mode 100644 index 0000000..51b9b5c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapInternalApplicationConfiguration.java @@ -0,0 +1,151 @@ + +/*- + * ============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; + +import org.openecomp.ncomp.cdap.CdapEntityWithPreferences; +import org.openecomp.ncomp.cdap.CdapKeyPair; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Internal Application Configuration</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getConfig <em>Config</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getPreferences <em>Preferences</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getApps <em>Apps</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getWorkers <em>Workers</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getFlows <em>Flows</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getServices <em>Services</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapInternalApplicationConfiguration() + * @model + * @generated + */ +public interface CdapInternalApplicationConfiguration extends EObject { + /** + * Returns the value of the '<em><b>Config</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapKeyPair}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Config</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Config</em>' containment reference list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapInternalApplicationConfiguration_Config() + * @model containment="true" ordered="false" + * @generated + */ + EList<CdapKeyPair> getConfig(); + + /** + * Returns the value of the '<em><b>Preferences</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapKeyPair}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Preferences</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Preferences</em>' containment reference list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapInternalApplicationConfiguration_Preferences() + * @model containment="true" ordered="false" + * @generated + */ + EList<CdapKeyPair> getPreferences(); + + /** + * Returns the value of the '<em><b>Apps</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapEntityWithPreferences}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Apps</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Apps</em>' containment reference list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapInternalApplicationConfiguration_Apps() + * @model containment="true" ordered="false" + * @generated + */ + EList<CdapEntityWithPreferences> getApps(); + + /** + * Returns the value of the '<em><b>Workers</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapEntityWithPreferences}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Workers</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Workers</em>' containment reference list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapInternalApplicationConfiguration_Workers() + * @model containment="true" ordered="false" + * @generated + */ + EList<CdapEntityWithPreferences> getWorkers(); + + /** + * Returns the value of the '<em><b>Flows</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapEntityWithPreferences}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Flows</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Flows</em>' containment reference list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapInternalApplicationConfiguration_Flows() + * @model containment="true" ordered="false" + * @generated + */ + EList<CdapEntityWithPreferences> getFlows(); + + /** + * Returns the value of the '<em><b>Services</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapEntityWithPreferences}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Services</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Services</em>' containment reference list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapInternalApplicationConfiguration_Services() + * @model containment="true" ordered="false" + * @generated + */ + EList<CdapEntityWithPreferences> getServices(); + +} // CdapInternalApplicationConfiguration diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapPackage.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapPackage.java new file mode 100644 index 0000000..afcb67b --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapPackage.java @@ -0,0 +1,1702 @@ + +/*- + * ============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; + +import org.openecomp.dcae.controller.core.service.ServicePackage; +import org.openecomp.ncomp.core.CorePackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EOperation; +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.CdapFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-cdap-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service'" + * annotation="http://www.eclipse.org/emf/2011/Xcore ecomp='http://openecomp.org' cdap='http://openecomp.org/cdap'" + * @generated + */ +public interface CdapPackage extends EPackage { + /** + * The package name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "cdap"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.cdap"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "cdap"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + CdapPackage eINSTANCE = org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceImpl <em>Service</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapServiceImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapService() + * @generated + */ + int CDAP_SERVICE = 0; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE__NAME = ServicePackage.DCAE_SERVICE__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE__LAST_POLLED = ServicePackage.DCAE_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_SERVICE__LAST_CHANGED = ServicePackage.DCAE_SERVICE__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE__CREATED = ServicePackage.DCAE_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_SERVICE__INSTANCES = ServicePackage.DCAE_SERVICE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Service</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_FEATURE_COUNT = ServicePackage.DCAE_SERVICE_FEATURE_COUNT + 1; + + /** + * The operation id for the '<em>Deploy</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE___DEPLOY__STRING_STRING = ServicePackage.DCAE_SERVICE___DEPLOY__STRING_STRING; + + /** + * The operation id for the '<em>Undeploy</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE___UNDEPLOY__STRING = ServicePackage.DCAE_SERVICE___UNDEPLOY__STRING; + + /** + * The operation id for the '<em>Test</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE___TEST__STRING = ServicePackage.DCAE_SERVICE___TEST__STRING; + + /** + * The operation id for the '<em>Suspend</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE___SUSPEND__STRING = ServicePackage.DCAE_SERVICE___SUSPEND__STRING; + + /** + * The operation id for the '<em>Resume</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE___RESUME__STRING = ServicePackage.DCAE_SERVICE___RESUME__STRING; + + /** + * The operation id for the '<em>Push Manager Configuration</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING = ServicePackage.DCAE_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_SERVICE___POLL_MANAGER_CONFIGURATION__STRING = ServicePackage.DCAE_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_SERVICE___MANAGER_CONFIGURATION__STRING = ServicePackage.DCAE_SERVICE___MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the '<em>Manager Operation</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT = ServicePackage.DCAE_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_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING = ServicePackage.DCAE_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_SERVICE___RUN_HEALTH_TESTS = ServicePackage.DCAE_SERVICE___RUN_HEALTH_TESTS; + + /** + * The operation id for the '<em>Update Instance Configuration</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE___UPDATE_INSTANCE_CONFIGURATION__STRING = ServicePackage.DCAE_SERVICE_OPERATION_COUNT + 0; + + /** + * The number of operations of the '<em>Service</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_OPERATION_COUNT = ServicePackage.DCAE_SERVICE_OPERATION_COUNT + 1; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl <em>Service Instance</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapServiceInstance() + * @generated + */ + int CDAP_SERVICE_INSTANCE = 1; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__NAME = ServicePackage.DCAE_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_SERVICE_INSTANCE__LAST_POLLED = ServicePackage.DCAE_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_SERVICE_INSTANCE__LAST_CHANGED = ServicePackage.DCAE_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_SERVICE_INSTANCE__CREATED = ServicePackage.DCAE_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_SERVICE_INSTANCE__SERVICE_CONTAINER = ServicePackage.DCAE_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_SERVICE_INSTANCE__STATUS = ServicePackage.DCAE_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_SERVICE_INSTANCE__INPUT_STREAMS = ServicePackage.DCAE_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_SERVICE_INSTANCE__OUTPUT_STREAMS = ServicePackage.DCAE_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_SERVICE_INSTANCE__LAST_HEALTH_TEST = ServicePackage.DCAE_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_SERVICE_INSTANCE__HEALTH_TEST_STATUS = ServicePackage.DCAE_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_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE = ServicePackage.DCAE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE; + + /** + * The feature id for the '<em><b>Cdap Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__CDAP_NAME = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Namespace</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__NAMESPACE = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>App Jar</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__APP_JAR = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>App Config File</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__APP_CONFIG_FILE = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Artifacts</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__ARTIFACTS = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 4; + + /** + * The feature id for the '<em><b>Apps</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__APPS = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 5; + + /** + * The feature id for the '<em><b>App Names</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__APP_NAMES = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 6; + + /** + * The feature id for the '<em><b>Worker Names</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__WORKER_NAMES = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 7; + + /** + * The feature id for the '<em><b>Flow Names</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__FLOW_NAMES = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 8; + + /** + * The feature id for the '<em><b>Service Names</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__SERVICE_NAMES = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 9; + + /** + * The feature id for the '<em><b>Configuration</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__CONFIGURATION = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 10; + + /** + * The feature id for the '<em><b>Cdap Configuration</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 11; + + /** + * The feature id for the '<em><b>Cluster Service</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__CLUSTER_SERVICE = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 12; + + /** + * The feature id for the '<em><b>Cdap Namespace</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__CDAP_NAMESPACE = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 13; + + /** + * The feature id for the '<em><b>Service</b></em>' container reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE__SERVICE = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 14; + + /** + * The number of structural features of the '<em>Service Instance</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE_FEATURE_COUNT = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 15; + + /** + * The number of operations of the '<em>Service Instance</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE_OPERATION_COUNT = ServicePackage.DCAE_SERVICE_INSTANCE_OPERATION_COUNT + 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapApplicationImpl <em>Application</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapApplicationImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapApplication() + * @generated + */ + int CDAP_APPLICATION = 2; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_APPLICATION__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_APPLICATION__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_APPLICATION__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_APPLICATION__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the '<em><b>Jar File</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_APPLICATION__JAR_FILE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Artifact Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_APPLICATION__ARTIFACT_NAME = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Version</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_APPLICATION__VERSION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>App Config File Content</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_APPLICATION__APP_CONFIG_FILE_CONTENT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The number of structural features of the '<em>Application</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_APPLICATION_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The number of operations of the '<em>Application</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_APPLICATION_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapArtifactImpl <em>Artifact</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapArtifactImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapArtifact() + * @generated + */ + int CDAP_ARTIFACT = 3; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_ARTIFACT__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_ARTIFACT__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_ARTIFACT__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_ARTIFACT__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the '<em><b>Jar File</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_ARTIFACT__JAR_FILE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Version</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_ARTIFACT__VERSION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Artifact</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_ARTIFACT_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of operations of the '<em>Artifact</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_ARTIFACT_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceConfigurationImpl <em>Service Instance Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceConfigurationImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapServiceInstanceConfiguration() + * @generated + */ + int CDAP_SERVICE_INSTANCE_CONFIGURATION = 4; + + /** + * The number of structural features of the '<em>Service Instance Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE_CONFIGURATION_FEATURE_COUNT = 0; + + /** + * The number of operations of the '<em>Service Instance Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_INSTANCE_CONFIGURATION_OPERATION_COUNT = 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl <em>Internal Application Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapInternalApplicationConfiguration() + * @generated + */ + int CDAP_INTERNAL_APPLICATION_CONFIGURATION = 5; + + /** + * The feature id for the '<em><b>Config</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_INTERNAL_APPLICATION_CONFIGURATION__CONFIG = 0; + + /** + * The feature id for the '<em><b>Preferences</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_INTERNAL_APPLICATION_CONFIGURATION__PREFERENCES = 1; + + /** + * The feature id for the '<em><b>Apps</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_INTERNAL_APPLICATION_CONFIGURATION__APPS = 2; + + /** + * The feature id for the '<em><b>Workers</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_INTERNAL_APPLICATION_CONFIGURATION__WORKERS = 3; + + /** + * The feature id for the '<em><b>Flows</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_INTERNAL_APPLICATION_CONFIGURATION__FLOWS = 4; + + /** + * The feature id for the '<em><b>Services</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_INTERNAL_APPLICATION_CONFIGURATION__SERVICES = 5; + + /** + * The number of structural features of the '<em>Internal Application Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_INTERNAL_APPLICATION_CONFIGURATION_FEATURE_COUNT = 6; + + /** + * The number of operations of the '<em>Internal Application Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_INTERNAL_APPLICATION_CONFIGURATION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceDescriptorImpl <em>Service Descriptor</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapServiceDescriptorImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapServiceDescriptor() + * @generated + */ + int CDAP_SERVICE_DESCRIPTOR = 6; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__NAME = ServicePackage.DCAE_SERVICE_DESCRIPTOR__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__LAST_POLLED = ServicePackage.DCAE_SERVICE_DESCRIPTOR__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__LAST_CHANGED = ServicePackage.DCAE_SERVICE_DESCRIPTOR__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__CREATED = ServicePackage.DCAE_SERVICE_DESCRIPTOR__CREATED; + + /** + * The feature id for the '<em><b>Group Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__GROUP_ID = ServicePackage.DCAE_SERVICE_DESCRIPTOR__GROUP_ID; + + /** + * The feature id for the '<em><b>Artifact</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__ARTIFACT = ServicePackage.DCAE_SERVICE_DESCRIPTOR__ARTIFACT; + + /** + * The feature id for the '<em><b>Version</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__VERSION = ServicePackage.DCAE_SERVICE_DESCRIPTOR__VERSION; + + /** + * The feature id for the '<em><b>Service Package</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__SERVICE_PACKAGE = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Service Class</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__SERVICE_CLASS = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Service Instance Class</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Jar File</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR__JAR_FILE = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 3; + + /** + * The number of structural features of the '<em>Service Descriptor</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR_FEATURE_COUNT = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 4; + + /** + * The number of operations of the '<em>Service Descriptor</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_SERVICE_DESCRIPTOR_OPERATION_COUNT = ServicePackage.DCAE_SERVICE_DESCRIPTOR_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.CdapService <em>Service</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Service</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapService + * @generated + */ + EClass getCdapService(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.cdap.CdapService#getInstances <em>Instances</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Instances</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapService#getInstances() + * @see #getCdapService() + * @generated + */ + EReference getCdapService_Instances(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.service.cdap.CdapService#updateInstanceConfiguration(java.lang.String) <em>Update Instance Configuration</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the '<em>Update Instance Configuration</em>' operation. + * @see org.openecomp.dcae.controller.service.cdap.CdapService#updateInstanceConfiguration(java.lang.String) + * @generated + */ + EOperation getCdapService__UpdateInstanceConfiguration__String(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance <em>Service Instance</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Service Instance</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance + * @generated + */ + EClass getCdapServiceInstance(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapName <em>Cdap Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Cdap Name</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapName() + * @see #getCdapServiceInstance() + * @generated + */ + EAttribute getCdapServiceInstance_CdapName(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapNamespace <em>Cdap Namespace</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Cdap Namespace</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapNamespace() + * @see #getCdapServiceInstance() + * @generated + */ + EReference getCdapServiceInstance_CdapNamespace(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getNamespace <em>Namespace</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Namespace</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getNamespace() + * @see #getCdapServiceInstance() + * @generated + */ + EAttribute getCdapServiceInstance_Namespace(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppJar <em>App Jar</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>App Jar</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppJar() + * @see #getCdapServiceInstance() + * @generated + */ + EAttribute getCdapServiceInstance_AppJar(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppConfigFile <em>App Config File</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>App Config File</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppConfigFile() + * @see #getCdapServiceInstance() + * @generated + */ + EAttribute getCdapServiceInstance_AppConfigFile(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getArtifacts <em>Artifacts</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Artifacts</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getArtifacts() + * @see #getCdapServiceInstance() + * @generated + */ + EReference getCdapServiceInstance_Artifacts(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getApps <em>Apps</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Apps</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getApps() + * @see #getCdapServiceInstance() + * @generated + */ + EReference getCdapServiceInstance_Apps(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppNames <em>App Names</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute list '<em>App Names</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppNames() + * @see #getCdapServiceInstance() + * @generated + */ + EAttribute getCdapServiceInstance_AppNames(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getWorkerNames <em>Worker Names</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute list '<em>Worker Names</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getWorkerNames() + * @see #getCdapServiceInstance() + * @generated + */ + EAttribute getCdapServiceInstance_WorkerNames(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getFlowNames <em>Flow Names</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute list '<em>Flow Names</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getFlowNames() + * @see #getCdapServiceInstance() + * @generated + */ + EAttribute getCdapServiceInstance_FlowNames(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getServiceNames <em>Service Names</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute list '<em>Service Names</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getServiceNames() + * @see #getCdapServiceInstance() + * @generated + */ + EAttribute getCdapServiceInstance_ServiceNames(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getConfiguration <em>Configuration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Configuration</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getConfiguration() + * @see #getCdapServiceInstance() + * @generated + */ + EReference getCdapServiceInstance_Configuration(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapConfiguration <em>Cdap Configuration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Cdap Configuration</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapConfiguration() + * @see #getCdapServiceInstance() + * @generated + */ + EReference getCdapServiceInstance_CdapConfiguration(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getClusterService <em>Cluster Service</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Cluster Service</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getClusterService() + * @see #getCdapServiceInstance() + * @generated + */ + EReference getCdapServiceInstance_ClusterService(); + + /** + * Returns the meta object for the container reference '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getService <em>Service</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the container reference '<em>Service</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getService() + * @see #getCdapServiceInstance() + * @generated + */ + EReference getCdapServiceInstance_Service(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication <em>Application</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Application</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapApplication + * @generated + */ + EClass getCdapApplication(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getJarFile <em>Jar File</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Jar File</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapApplication#getJarFile() + * @see #getCdapApplication() + * @generated + */ + EAttribute getCdapApplication_JarFile(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getArtifactName <em>Artifact Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Artifact Name</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapApplication#getArtifactName() + * @see #getCdapApplication() + * @generated + */ + EAttribute getCdapApplication_ArtifactName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getVersion <em>Version</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Version</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapApplication#getVersion() + * @see #getCdapApplication() + * @generated + */ + EAttribute getCdapApplication_Version(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication#getAppConfigFileContent <em>App Config File Content</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>App Config File Content</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapApplication#getAppConfigFileContent() + * @see #getCdapApplication() + * @generated + */ + EAttribute getCdapApplication_AppConfigFileContent(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.CdapArtifact <em>Artifact</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Artifact</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapArtifact + * @generated + */ + EClass getCdapArtifact(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapArtifact#getJarFile <em>Jar File</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Jar File</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapArtifact#getJarFile() + * @see #getCdapArtifact() + * @generated + */ + EAttribute getCdapArtifact_JarFile(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapArtifact#getVersion <em>Version</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Version</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapArtifact#getVersion() + * @see #getCdapArtifact() + * @generated + */ + EAttribute getCdapArtifact_Version(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstanceConfiguration <em>Service Instance Configuration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Service Instance Configuration</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstanceConfiguration + * @generated + */ + EClass getCdapServiceInstanceConfiguration(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration <em>Internal Application Configuration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Internal Application Configuration</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration + * @generated + */ + EClass getCdapInternalApplicationConfiguration(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getConfig <em>Config</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Config</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getConfig() + * @see #getCdapInternalApplicationConfiguration() + * @generated + */ + EReference getCdapInternalApplicationConfiguration_Config(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getPreferences <em>Preferences</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Preferences</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getPreferences() + * @see #getCdapInternalApplicationConfiguration() + * @generated + */ + EReference getCdapInternalApplicationConfiguration_Preferences(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getApps <em>Apps</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Apps</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getApps() + * @see #getCdapInternalApplicationConfiguration() + * @generated + */ + EReference getCdapInternalApplicationConfiguration_Apps(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getWorkers <em>Workers</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Workers</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getWorkers() + * @see #getCdapInternalApplicationConfiguration() + * @generated + */ + EReference getCdapInternalApplicationConfiguration_Workers(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getFlows <em>Flows</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Flows</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getFlows() + * @see #getCdapInternalApplicationConfiguration() + * @generated + */ + EReference getCdapInternalApplicationConfiguration_Flows(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getServices <em>Services</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Services</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration#getServices() + * @see #getCdapInternalApplicationConfiguration() + * @generated + */ + EReference getCdapInternalApplicationConfiguration_Services(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor <em>Service Descriptor</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Service Descriptor</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor + * @generated + */ + EClass getCdapServiceDescriptor(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServicePackage <em>Service Package</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Service Package</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServicePackage() + * @see #getCdapServiceDescriptor() + * @generated + */ + EAttribute getCdapServiceDescriptor_ServicePackage(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServiceClass <em>Service Class</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Service Class</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServiceClass() + * @see #getCdapServiceDescriptor() + * @generated + */ + EAttribute getCdapServiceDescriptor_ServiceClass(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServiceInstanceClass <em>Service Instance Class</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Service Instance Class</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServiceInstanceClass() + * @see #getCdapServiceDescriptor() + * @generated + */ + EAttribute getCdapServiceDescriptor_ServiceInstanceClass(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getJarFile <em>Jar File</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Jar File</em>'. + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getJarFile() + * @see #getCdapServiceDescriptor() + * @generated + */ + EAttribute getCdapServiceDescriptor_JarFile(); + + /** + * 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 + */ + CdapFactory getCdapFactory(); + + /** + * <!-- 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.impl.CdapServiceImpl <em>Service</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapServiceImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapService() + * @generated + */ + EClass CDAP_SERVICE = eINSTANCE.getCdapService(); + /** + * The meta object literal for the '<em><b>Instances</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CDAP_SERVICE__INSTANCES = eINSTANCE.getCdapService_Instances(); + /** + * The meta object literal for the '<em><b>Update Instance Configuration</b></em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EOperation CDAP_SERVICE___UPDATE_INSTANCE_CONFIGURATION__STRING = eINSTANCE.getCdapService__UpdateInstanceConfiguration__String(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl <em>Service Instance</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapServiceInstance() + * @generated + */ + EClass CDAP_SERVICE_INSTANCE = eINSTANCE.getCdapServiceInstance(); + /** + * The meta object literal for the '<em><b>Cdap Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CDAP_SERVICE_INSTANCE__CDAP_NAME = eINSTANCE.getCdapServiceInstance_CdapName(); + /** + * The meta object literal for the '<em><b>Cdap Namespace</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CDAP_SERVICE_INSTANCE__CDAP_NAMESPACE = eINSTANCE.getCdapServiceInstance_CdapNamespace(); + /** + * The meta object literal for the '<em><b>Namespace</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CDAP_SERVICE_INSTANCE__NAMESPACE = eINSTANCE.getCdapServiceInstance_Namespace(); + /** + * The meta object literal for the '<em><b>App Jar</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CDAP_SERVICE_INSTANCE__APP_JAR = eINSTANCE.getCdapServiceInstance_AppJar(); + /** + * The meta object literal for the '<em><b>App Config File</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CDAP_SERVICE_INSTANCE__APP_CONFIG_FILE = eINSTANCE.getCdapServiceInstance_AppConfigFile(); + /** + * The meta object literal for the '<em><b>Artifacts</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CDAP_SERVICE_INSTANCE__ARTIFACTS = eINSTANCE.getCdapServiceInstance_Artifacts(); + /** + * The meta object literal for the '<em><b>Apps</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CDAP_SERVICE_INSTANCE__APPS = eINSTANCE.getCdapServiceInstance_Apps(); + /** + * The meta object literal for the '<em><b>App Names</b></em>' attribute list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CDAP_SERVICE_INSTANCE__APP_NAMES = eINSTANCE.getCdapServiceInstance_AppNames(); + /** + * The meta object literal for the '<em><b>Worker Names</b></em>' attribute list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CDAP_SERVICE_INSTANCE__WORKER_NAMES = eINSTANCE.getCdapServiceInstance_WorkerNames(); + /** + * The meta object literal for the '<em><b>Flow Names</b></em>' attribute list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CDAP_SERVICE_INSTANCE__FLOW_NAMES = eINSTANCE.getCdapServiceInstance_FlowNames(); + /** + * The meta object literal for the '<em><b>Service Names</b></em>' attribute list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CDAP_SERVICE_INSTANCE__SERVICE_NAMES = eINSTANCE.getCdapServiceInstance_ServiceNames(); + /** + * The meta object literal for the '<em><b>Configuration</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CDAP_SERVICE_INSTANCE__CONFIGURATION = eINSTANCE.getCdapServiceInstance_Configuration(); + /** + * The meta object literal for the '<em><b>Cdap Configuration</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION = eINSTANCE.getCdapServiceInstance_CdapConfiguration(); + /** + * The meta object literal for the '<em><b>Cluster Service</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CDAP_SERVICE_INSTANCE__CLUSTER_SERVICE = eINSTANCE.getCdapServiceInstance_ClusterService(); + /** + * The meta object literal for the '<em><b>Service</b></em>' container reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CDAP_SERVICE_INSTANCE__SERVICE = eINSTANCE.getCdapServiceInstance_Service(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapApplicationImpl <em>Application</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapApplicationImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapApplication() + * @generated + */ + EClass CDAP_APPLICATION = eINSTANCE.getCdapApplication(); + /** + * The meta object literal for the '<em><b>Jar File</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CDAP_APPLICATION__JAR_FILE = eINSTANCE.getCdapApplication_JarFile(); + /** + * The meta object literal for the '<em><b>Artifact Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CDAP_APPLICATION__ARTIFACT_NAME = eINSTANCE.getCdapApplication_ArtifactName(); + /** + * The meta object literal for the '<em><b>Version</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CDAP_APPLICATION__VERSION = eINSTANCE.getCdapApplication_Version(); + /** + * The meta object literal for the '<em><b>App Config File Content</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CDAP_APPLICATION__APP_CONFIG_FILE_CONTENT = eINSTANCE.getCdapApplication_AppConfigFileContent(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapArtifactImpl <em>Artifact</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapArtifactImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapArtifact() + * @generated + */ + EClass CDAP_ARTIFACT = eINSTANCE.getCdapArtifact(); + /** + * The meta object literal for the '<em><b>Jar File</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CDAP_ARTIFACT__JAR_FILE = eINSTANCE.getCdapArtifact_JarFile(); + /** + * The meta object literal for the '<em><b>Version</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CDAP_ARTIFACT__VERSION = eINSTANCE.getCdapArtifact_Version(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceConfigurationImpl <em>Service Instance Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceConfigurationImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapServiceInstanceConfiguration() + * @generated + */ + EClass CDAP_SERVICE_INSTANCE_CONFIGURATION = eINSTANCE.getCdapServiceInstanceConfiguration(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl <em>Internal Application Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapInternalApplicationConfiguration() + * @generated + */ + EClass CDAP_INTERNAL_APPLICATION_CONFIGURATION = eINSTANCE.getCdapInternalApplicationConfiguration(); + /** + * The meta object literal for the '<em><b>Config</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CDAP_INTERNAL_APPLICATION_CONFIGURATION__CONFIG = eINSTANCE.getCdapInternalApplicationConfiguration_Config(); + /** + * The meta object literal for the '<em><b>Preferences</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CDAP_INTERNAL_APPLICATION_CONFIGURATION__PREFERENCES = eINSTANCE.getCdapInternalApplicationConfiguration_Preferences(); + /** + * The meta object literal for the '<em><b>Apps</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CDAP_INTERNAL_APPLICATION_CONFIGURATION__APPS = eINSTANCE.getCdapInternalApplicationConfiguration_Apps(); + /** + * The meta object literal for the '<em><b>Workers</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CDAP_INTERNAL_APPLICATION_CONFIGURATION__WORKERS = eINSTANCE.getCdapInternalApplicationConfiguration_Workers(); + /** + * The meta object literal for the '<em><b>Flows</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CDAP_INTERNAL_APPLICATION_CONFIGURATION__FLOWS = eINSTANCE.getCdapInternalApplicationConfiguration_Flows(); + /** + * The meta object literal for the '<em><b>Services</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CDAP_INTERNAL_APPLICATION_CONFIGURATION__SERVICES = eINSTANCE.getCdapInternalApplicationConfiguration_Services(); + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceDescriptorImpl <em>Service Descriptor</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapServiceDescriptorImpl + * @see org.openecomp.dcae.controller.service.cdap.impl.CdapPackageImpl#getCdapServiceDescriptor() + * @generated + */ + EClass CDAP_SERVICE_DESCRIPTOR = eINSTANCE.getCdapServiceDescriptor(); + /** + * The meta object literal for the '<em><b>Service Package</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CDAP_SERVICE_DESCRIPTOR__SERVICE_PACKAGE = eINSTANCE.getCdapServiceDescriptor_ServicePackage(); + /** + * The meta object literal for the '<em><b>Service Class</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CDAP_SERVICE_DESCRIPTOR__SERVICE_CLASS = eINSTANCE.getCdapServiceDescriptor_ServiceClass(); + /** + * The meta object literal for the '<em><b>Service Instance Class</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CDAP_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS = eINSTANCE.getCdapServiceDescriptor_ServiceInstanceClass(); + /** + * The meta object literal for the '<em><b>Jar File</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CDAP_SERVICE_DESCRIPTOR__JAR_FILE = eINSTANCE.getCdapServiceDescriptor_JarFile(); + + } + +} //CdapPackage diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapService.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapService.java new file mode 100644 index 0000000..ff9c57f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapService.java @@ -0,0 +1,72 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdap; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.eclipse.emf.common.util.EList; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Service</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapService#getInstances <em>Instances</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapService() + * @model + * @generated + */ +public interface CdapService extends DcaeService { + + /** + * Returns the value of the '<em><b>Instances</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance}. + * It is bidirectional and its opposite is '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getService <em>Service</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Instances</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Instances</em>' containment reference list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapService_Instances() + * @see org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getService + * @model opposite="service" containment="true" + * @generated + */ + EList<CdapServiceInstance> getInstances(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @model instanceNameUnique="false" + * @generated + */ + void updateInstanceConfiguration(String instanceName); +} // CdapService diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceDescriptor.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceDescriptor.java new file mode 100644 index 0000000..62a853e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceDescriptor.java @@ -0,0 +1,152 @@ + +/*- + * ============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; + +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Service Descriptor</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServicePackage <em>Service Package</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServiceClass <em>Service Class</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServiceInstanceClass <em>Service Instance Class</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getJarFile <em>Jar File</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceDescriptor() + * @model + * @generated + */ +public interface CdapServiceDescriptor extends DcaeServiceDescriptor { + /** + * Returns the value of the '<em><b>Service Package</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Service Package</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Service Package</em>' attribute. + * @see #setServicePackage(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceDescriptor_ServicePackage() + * @model unique="false" + * @generated + */ + String getServicePackage(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServicePackage <em>Service Package</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Service Package</em>' attribute. + * @see #getServicePackage() + * @generated + */ + void setServicePackage(String value); + + /** + * Returns the value of the '<em><b>Service Class</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Service Class</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Service Class</em>' attribute. + * @see #setServiceClass(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceDescriptor_ServiceClass() + * @model unique="false" + * @generated + */ + String getServiceClass(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServiceClass <em>Service Class</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Service Class</em>' attribute. + * @see #getServiceClass() + * @generated + */ + void setServiceClass(String value); + + /** + * Returns the value of the '<em><b>Service Instance Class</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Service Instance Class</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Service Instance Class</em>' attribute. + * @see #setServiceInstanceClass(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceDescriptor_ServiceInstanceClass() + * @model unique="false" + * @generated + */ + String getServiceInstanceClass(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getServiceInstanceClass <em>Service Instance Class</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Service Instance Class</em>' attribute. + * @see #getServiceInstanceClass() + * @generated + */ + void setServiceInstanceClass(String value); + + /** + * Returns the value of the '<em><b>Jar File</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Jar File</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Jar File</em>' attribute. + * @see #setJarFile(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceDescriptor_JarFile() + * @model unique="false" + * @generated + */ + String getJarFile(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor#getJarFile <em>Jar File</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Jar File</em>' attribute. + * @see #getJarFile() + * @generated + */ + void setJarFile(String value); + +} // CdapServiceDescriptor diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceInstance.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceInstance.java new file mode 100644 index 0000000..7d695d8 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceInstance.java @@ -0,0 +1,398 @@ + +/*- + * ============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; + +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance; +import org.openecomp.ncomp.cdap.CdapNamespace; +import org.eclipse.emf.common.util.EList; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Service Instance</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapName <em>Cdap Name</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getNamespace <em>Namespace</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppJar <em>App Jar</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppConfigFile <em>App Config File</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getArtifacts <em>Artifacts</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getApps <em>Apps</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppNames <em>App Names</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getWorkerNames <em>Worker Names</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getFlowNames <em>Flow Names</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getServiceNames <em>Service Names</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getConfiguration <em>Configuration</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapConfiguration <em>Cdap Configuration</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getClusterService <em>Cluster Service</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapNamespace <em>Cdap Namespace</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getService <em>Service</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance() + * @model + * @generated + */ +public interface CdapServiceInstance extends DcaeServiceInstance { + /** + * Returns the value of the '<em><b>Cdap Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Cdap Name</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Cdap Name</em>' attribute. + * @see #setCdapName(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_CdapName() + * @model unique="false" + * @generated + */ + String getCdapName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapName <em>Cdap Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Cdap Name</em>' attribute. + * @see #getCdapName() + * @generated + */ + void setCdapName(String value); + + /** + * Returns the value of the '<em><b>Cdap Namespace</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Cdap Namespace</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Cdap Namespace</em>' reference. + * @see #setCdapNamespace(CdapNamespace) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_CdapNamespace() + * @model annotation="http://openecomp.org type='operational'" + * @generated + */ + CdapNamespace getCdapNamespace(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapNamespace <em>Cdap Namespace</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Cdap Namespace</em>' reference. + * @see #getCdapNamespace() + * @generated + */ + void setCdapNamespace(CdapNamespace value); + + /** + * Returns the value of the '<em><b>Namespace</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Namespace</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Namespace</em>' attribute. + * @see #setNamespace(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_Namespace() + * @model unique="false" + * @generated + */ + String getNamespace(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getNamespace <em>Namespace</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Namespace</em>' attribute. + * @see #getNamespace() + * @generated + */ + void setNamespace(String value); + + /** + * Returns the value of the '<em><b>App Jar</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>App Jar</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>App Jar</em>' attribute. + * @see #setAppJar(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_AppJar() + * @model unique="false" + * @generated + */ + String getAppJar(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppJar <em>App Jar</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>App Jar</em>' attribute. + * @see #getAppJar() + * @generated + */ + void setAppJar(String value); + + /** + * Returns the value of the '<em><b>App Config File</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>App Config File</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>App Config File</em>' attribute. + * @see #setAppConfigFile(String) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_AppConfigFile() + * @model unique="false" + * @generated + */ + String getAppConfigFile(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getAppConfigFile <em>App Config File</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>App Config File</em>' attribute. + * @see #getAppConfigFile() + * @generated + */ + void setAppConfigFile(String value); + + /** + * Returns the value of the '<em><b>Artifacts</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.service.cdap.CdapArtifact}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Artifacts</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Artifacts</em>' containment reference list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_Artifacts() + * @model containment="true" + * @generated + */ + EList<CdapArtifact> getArtifacts(); + + /** + * Returns the value of the '<em><b>Apps</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.service.cdap.CdapApplication}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Apps</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Apps</em>' containment reference list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_Apps() + * @model containment="true" + * @generated + */ + EList<CdapApplication> getApps(); + + /** + * Returns the value of the '<em><b>App Names</b></em>' attribute list. + * The list contents are of type {@link java.lang.String}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>App Names</em>' attribute list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>App Names</em>' attribute list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_AppNames() + * @model unique="false" + * @generated + */ + EList<String> getAppNames(); + + /** + * Returns the value of the '<em><b>Worker Names</b></em>' attribute list. + * The list contents are of type {@link java.lang.String}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Worker Names</em>' attribute list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Worker Names</em>' attribute list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_WorkerNames() + * @model unique="false" + * @generated + */ + EList<String> getWorkerNames(); + + /** + * Returns the value of the '<em><b>Flow Names</b></em>' attribute list. + * The list contents are of type {@link java.lang.String}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Flow Names</em>' attribute list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Flow Names</em>' attribute list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_FlowNames() + * @model unique="false" + * @generated + */ + EList<String> getFlowNames(); + + /** + * Returns the value of the '<em><b>Service Names</b></em>' attribute list. + * The list contents are of type {@link java.lang.String}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Service Names</em>' attribute list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Service Names</em>' attribute list. + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_ServiceNames() + * @model unique="false" + * @generated + */ + EList<String> getServiceNames(); + + /** + * Returns the value of the '<em><b>Configuration</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Configuration</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>Configuration</em>' containment reference. + * @see #setConfiguration(CdapServiceInstanceConfiguration) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_Configuration() + * @model containment="true" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + CdapServiceInstanceConfiguration getConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getConfiguration <em>Configuration</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Configuration</em>' containment reference. + * @see #getConfiguration() + * @generated + */ + void setConfiguration(CdapServiceInstanceConfiguration value); + + /** + * Returns the value of the '<em><b>Cdap Configuration</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Cdap Configuration</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>Cdap Configuration</em>' containment reference. + * @see #setCdapConfiguration(CdapInternalApplicationConfiguration) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_CdapConfiguration() + * @model containment="true" + * annotation="http://openecomp.org type='operational'" + * @generated + */ + CdapInternalApplicationConfiguration getCdapConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getCdapConfiguration <em>Cdap Configuration</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Cdap Configuration</em>' containment reference. + * @see #getCdapConfiguration() + * @generated + */ + void setCdapConfiguration(CdapInternalApplicationConfiguration value); + + /** + * Returns the value of the '<em><b>Cluster Service</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Cluster Service</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Cluster Service</em>' reference. + * @see #setClusterService(CdapClusterServiceInstance) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_ClusterService() + * @model annotation="http://openecomp.org type='operational'" + * @generated + */ + CdapClusterServiceInstance getClusterService(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getClusterService <em>Cluster Service</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Cluster Service</em>' reference. + * @see #getClusterService() + * @generated + */ + void setClusterService(CdapClusterServiceInstance value); + + /** + * Returns the value of the '<em><b>Service</b></em>' container reference. + * It is bidirectional and its opposite is '{@link org.openecomp.dcae.controller.service.cdap.CdapService#getInstances <em>Instances</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Service</em>' container reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Service</em>' container reference. + * @see #setService(CdapService) + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstance_Service() + * @see org.openecomp.dcae.controller.service.cdap.CdapService#getInstances + * @model opposite="instances" transient="false" + * annotation="http://openecomp.org type='operational'" + * @generated + */ + CdapService getService(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance#getService <em>Service</em>}' container reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Service</em>' container reference. + * @see #getService() + * @generated + */ + void setService(CdapService value); + +} // CdapServiceInstance diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceInstanceConfiguration.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceInstanceConfiguration.java new file mode 100644 index 0000000..508eb63 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/CdapServiceInstanceConfiguration.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; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Service Instance Configuration</b></em>'. + * <!-- end-user-doc --> + * + * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getCdapServiceInstanceConfiguration() + * @model + * @generated + */ +public interface CdapServiceInstanceConfiguration extends EObject { +} // CdapServiceInstanceConfiguration diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/ControllerServiceCdapAdaptor.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/ControllerServiceCdapAdaptor.java new file mode 100644 index 0000000..dd5f9bd --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/ControllerServiceCdapAdaptor.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; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Controller Service Cdap Adaptor</b></em>'. + * <!-- end-user-doc --> + * + * + * @see org.openecomp.dcae.controller.service.cdap.CdapPackage#getControllerServiceCdapAdaptor() + * @model + * @generated + */ +public interface ControllerServiceCdapAdaptor extends EObject { +} // ControllerServiceCdapAdaptor diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapApplicationImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapApplicationImpl.java new file mode 100644 index 0000000..416472f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapApplicationImpl.java @@ -0,0 +1,338 @@ + +/*- + * ============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.impl; + +import org.openecomp.dcae.controller.service.cdap.CdapApplication; +import org.openecomp.dcae.controller.service.cdap.CdapPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Application</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapApplicationImpl#getJarFile <em>Jar File</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapApplicationImpl#getArtifactName <em>Artifact Name</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapApplicationImpl#getVersion <em>Version</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapApplicationImpl#getAppConfigFileContent <em>App Config File Content</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CdapApplicationImpl extends NamedEntityImpl implements CdapApplication { + /** + * The default value of the '{@link #getJarFile() <em>Jar File</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getJarFile() + * @generated + * @ordered + */ + protected static final String JAR_FILE_EDEFAULT = null; + /** + * The cached value of the '{@link #getJarFile() <em>Jar File</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getJarFile() + * @generated + * @ordered + */ + protected String jarFile = JAR_FILE_EDEFAULT; + /** + * The default value of the '{@link #getArtifactName() <em>Artifact Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getArtifactName() + * @generated + * @ordered + */ + protected static final String ARTIFACT_NAME_EDEFAULT = null; + /** + * The cached value of the '{@link #getArtifactName() <em>Artifact Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getArtifactName() + * @generated + * @ordered + */ + protected String artifactName = ARTIFACT_NAME_EDEFAULT; + /** + * The default value of the '{@link #getVersion() <em>Version</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVersion() + * @generated + * @ordered + */ + protected static final String VERSION_EDEFAULT = null; + /** + * The cached value of the '{@link #getVersion() <em>Version</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVersion() + * @generated + * @ordered + */ + protected String version = VERSION_EDEFAULT; + /** + * The default value of the '{@link #getAppConfigFileContent() <em>App Config File Content</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAppConfigFileContent() + * @generated + * @ordered + */ + protected static final String APP_CONFIG_FILE_CONTENT_EDEFAULT = null; + /** + * The cached value of the '{@link #getAppConfigFileContent() <em>App Config File Content</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAppConfigFileContent() + * @generated + * @ordered + */ + protected String appConfigFileContent = APP_CONFIG_FILE_CONTENT_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CdapApplicationImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_APPLICATION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getJarFile() { + return jarFile; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setJarFile(String newJarFile) { + String oldJarFile = jarFile; + jarFile = newJarFile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_APPLICATION__JAR_FILE, oldJarFile, jarFile)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getArtifactName() { + return artifactName; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setArtifactName(String newArtifactName) { + String oldArtifactName = artifactName; + artifactName = newArtifactName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_APPLICATION__ARTIFACT_NAME, oldArtifactName, artifactName)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getVersion() { + return version; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setVersion(String newVersion) { + String oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_APPLICATION__VERSION, oldVersion, version)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getAppConfigFileContent() { + return appConfigFileContent; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAppConfigFileContent(String newAppConfigFileContent) { + String oldAppConfigFileContent = appConfigFileContent; + appConfigFileContent = newAppConfigFileContent; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_APPLICATION__APP_CONFIG_FILE_CONTENT, oldAppConfigFileContent, appConfigFileContent)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_APPLICATION__JAR_FILE: + return getJarFile(); + case CdapPackage.CDAP_APPLICATION__ARTIFACT_NAME: + return getArtifactName(); + case CdapPackage.CDAP_APPLICATION__VERSION: + return getVersion(); + case CdapPackage.CDAP_APPLICATION__APP_CONFIG_FILE_CONTENT: + return getAppConfigFileContent(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_APPLICATION__JAR_FILE: + setJarFile((String)newValue); + return; + case CdapPackage.CDAP_APPLICATION__ARTIFACT_NAME: + setArtifactName((String)newValue); + return; + case CdapPackage.CDAP_APPLICATION__VERSION: + setVersion((String)newValue); + return; + case CdapPackage.CDAP_APPLICATION__APP_CONFIG_FILE_CONTENT: + setAppConfigFileContent((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_APPLICATION__JAR_FILE: + setJarFile(JAR_FILE_EDEFAULT); + return; + case CdapPackage.CDAP_APPLICATION__ARTIFACT_NAME: + setArtifactName(ARTIFACT_NAME_EDEFAULT); + return; + case CdapPackage.CDAP_APPLICATION__VERSION: + setVersion(VERSION_EDEFAULT); + return; + case CdapPackage.CDAP_APPLICATION__APP_CONFIG_FILE_CONTENT: + setAppConfigFileContent(APP_CONFIG_FILE_CONTENT_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_APPLICATION__JAR_FILE: + return JAR_FILE_EDEFAULT == null ? jarFile != null : !JAR_FILE_EDEFAULT.equals(jarFile); + case CdapPackage.CDAP_APPLICATION__ARTIFACT_NAME: + return ARTIFACT_NAME_EDEFAULT == null ? artifactName != null : !ARTIFACT_NAME_EDEFAULT.equals(artifactName); + case CdapPackage.CDAP_APPLICATION__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + case CdapPackage.CDAP_APPLICATION__APP_CONFIG_FILE_CONTENT: + return APP_CONFIG_FILE_CONTENT_EDEFAULT == null ? appConfigFileContent != null : !APP_CONFIG_FILE_CONTENT_EDEFAULT.equals(appConfigFileContent); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (jarFile: "); + result.append(jarFile); + result.append(", artifactName: "); + result.append(artifactName); + result.append(", version: "); + result.append(version); + result.append(", appConfigFileContent: "); + result.append(appConfigFileContent); + result.append(')'); + return result.toString(); + } + +} //CdapApplicationImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapArtifactImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapArtifactImpl.java new file mode 100644 index 0000000..318204e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapArtifactImpl.java @@ -0,0 +1,239 @@ + +/*- + * ============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.impl; + +import org.openecomp.dcae.controller.service.cdap.CdapArtifact; +import org.openecomp.dcae.controller.service.cdap.CdapPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Artifact</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapArtifactImpl#getJarFile <em>Jar File</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapArtifactImpl#getVersion <em>Version</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CdapArtifactImpl extends NamedEntityImpl implements CdapArtifact { + /** + * The default value of the '{@link #getJarFile() <em>Jar File</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getJarFile() + * @generated + * @ordered + */ + protected static final String JAR_FILE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getJarFile() <em>Jar File</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getJarFile() + * @generated + * @ordered + */ + protected String jarFile = JAR_FILE_EDEFAULT; + + /** + * The default value of the '{@link #getVersion() <em>Version</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVersion() + * @generated + * @ordered + */ + protected static final String VERSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVersion() <em>Version</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVersion() + * @generated + * @ordered + */ + protected String version = VERSION_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CdapArtifactImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_ARTIFACT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getJarFile() { + return jarFile; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setJarFile(String newJarFile) { + String oldJarFile = jarFile; + jarFile = newJarFile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_ARTIFACT__JAR_FILE, oldJarFile, jarFile)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getVersion() { + return version; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setVersion(String newVersion) { + String oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_ARTIFACT__VERSION, oldVersion, version)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_ARTIFACT__JAR_FILE: + return getJarFile(); + case CdapPackage.CDAP_ARTIFACT__VERSION: + return getVersion(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_ARTIFACT__JAR_FILE: + setJarFile((String)newValue); + return; + case CdapPackage.CDAP_ARTIFACT__VERSION: + setVersion((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_ARTIFACT__JAR_FILE: + setJarFile(JAR_FILE_EDEFAULT); + return; + case CdapPackage.CDAP_ARTIFACT__VERSION: + setVersion(VERSION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_ARTIFACT__JAR_FILE: + return JAR_FILE_EDEFAULT == null ? jarFile != null : !JAR_FILE_EDEFAULT.equals(jarFile); + case CdapPackage.CDAP_ARTIFACT__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (jarFile: "); + result.append(jarFile); + result.append(", version: "); + result.append(version); + result.append(')'); + return result.toString(); + } + +} //CdapArtifactImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapFactoryImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapFactoryImpl.java new file mode 100644 index 0000000..d0d0018 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapFactoryImpl.java @@ -0,0 +1,182 @@ + +/*- + * ============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.impl; + +import org.openecomp.dcae.controller.service.cdap.*; + +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 CdapFactoryImpl extends EFactoryImpl implements CdapFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static CdapFactory init() { + try { + CdapFactory theCdapFactory = (CdapFactory)EPackage.Registry.INSTANCE.getEFactory(CdapPackage.eNS_URI); + if (theCdapFactory != null) { + return theCdapFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new CdapFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case CdapPackage.CDAP_SERVICE: return createCdapService(); + case CdapPackage.CDAP_SERVICE_INSTANCE: return createCdapServiceInstance(); + case CdapPackage.CDAP_APPLICATION: return createCdapApplication(); + case CdapPackage.CDAP_ARTIFACT: return createCdapArtifact(); + case CdapPackage.CDAP_SERVICE_INSTANCE_CONFIGURATION: return createCdapServiceInstanceConfiguration(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION: return createCdapInternalApplicationConfiguration(); + case CdapPackage.CDAP_SERVICE_DESCRIPTOR: return createCdapServiceDescriptor(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapService createCdapService() { + CdapServiceImpl cdapService = new CdapServiceImpl(); + return cdapService; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapServiceInstance createCdapServiceInstance() { + CdapServiceInstanceImpl cdapServiceInstance = new CdapServiceInstanceImpl(); + return cdapServiceInstance; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapApplication createCdapApplication() { + CdapApplicationImpl cdapApplication = new CdapApplicationImpl(); + return cdapApplication; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapArtifact createCdapArtifact() { + CdapArtifactImpl cdapArtifact = new CdapArtifactImpl(); + return cdapArtifact; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapServiceInstanceConfiguration createCdapServiceInstanceConfiguration() { + CdapServiceInstanceConfigurationImpl cdapServiceInstanceConfiguration = new CdapServiceInstanceConfigurationImpl(); + return cdapServiceInstanceConfiguration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapInternalApplicationConfiguration createCdapInternalApplicationConfiguration() { + CdapInternalApplicationConfigurationImpl cdapInternalApplicationConfiguration = new CdapInternalApplicationConfigurationImpl(); + return cdapInternalApplicationConfiguration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapServiceDescriptor createCdapServiceDescriptor() { + CdapServiceDescriptorImpl cdapServiceDescriptor = new CdapServiceDescriptorImpl(); + return cdapServiceDescriptor; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapPackage getCdapPackage() { + return (CdapPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @deprecated + * @generated + */ + @Deprecated + public static CdapPackage getPackage() { + return CdapPackage.eINSTANCE; + } + +} //CdapFactoryImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapInternalApplicationConfigurationImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapInternalApplicationConfigurationImpl.java new file mode 100644 index 0000000..03941cd --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapInternalApplicationConfigurationImpl.java @@ -0,0 +1,355 @@ + +/*- + * ============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.impl; + +import org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration; +import org.openecomp.dcae.controller.service.cdap.CdapPackage; + +import org.openecomp.ncomp.cdap.CdapEntityWithPreferences; +import org.openecomp.ncomp.cdap.CdapKeyPair; + +import java.util.Collection; + +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.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Internal Application Configuration</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl#getConfig <em>Config</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl#getPreferences <em>Preferences</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl#getApps <em>Apps</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl#getWorkers <em>Workers</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl#getFlows <em>Flows</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapInternalApplicationConfigurationImpl#getServices <em>Services</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CdapInternalApplicationConfigurationImpl extends MinimalEObjectImpl.Container implements CdapInternalApplicationConfiguration { + /** + * The cached value of the '{@link #getConfig() <em>Config</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getConfig() + * @generated + * @ordered + */ + protected EList<CdapKeyPair> config; + + /** + * The cached value of the '{@link #getPreferences() <em>Preferences</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPreferences() + * @generated + * @ordered + */ + protected EList<CdapKeyPair> preferences; + + /** + * The cached value of the '{@link #getApps() <em>Apps</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getApps() + * @generated + * @ordered + */ + protected EList<CdapEntityWithPreferences> apps; + + /** + * The cached value of the '{@link #getWorkers() <em>Workers</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getWorkers() + * @generated + * @ordered + */ + protected EList<CdapEntityWithPreferences> workers; + + /** + * The cached value of the '{@link #getFlows() <em>Flows</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFlows() + * @generated + * @ordered + */ + protected EList<CdapEntityWithPreferences> flows; + + /** + * The cached value of the '{@link #getServices() <em>Services</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getServices() + * @generated + * @ordered + */ + protected EList<CdapEntityWithPreferences> services; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CdapInternalApplicationConfigurationImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_INTERNAL_APPLICATION_CONFIGURATION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<CdapKeyPair> getConfig() { + if (config == null) { + config = new EObjectContainmentEList<CdapKeyPair>(CdapKeyPair.class, this, CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__CONFIG); + } + return config; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<CdapKeyPair> getPreferences() { + if (preferences == null) { + preferences = new EObjectContainmentEList<CdapKeyPair>(CdapKeyPair.class, this, CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__PREFERENCES); + } + return preferences; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<CdapEntityWithPreferences> getApps() { + if (apps == null) { + apps = new EObjectContainmentEList<CdapEntityWithPreferences>(CdapEntityWithPreferences.class, this, CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__APPS); + } + return apps; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<CdapEntityWithPreferences> getWorkers() { + if (workers == null) { + workers = new EObjectContainmentEList<CdapEntityWithPreferences>(CdapEntityWithPreferences.class, this, CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__WORKERS); + } + return workers; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<CdapEntityWithPreferences> getFlows() { + if (flows == null) { + flows = new EObjectContainmentEList<CdapEntityWithPreferences>(CdapEntityWithPreferences.class, this, CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__FLOWS); + } + return flows; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<CdapEntityWithPreferences> getServices() { + if (services == null) { + services = new EObjectContainmentEList<CdapEntityWithPreferences>(CdapEntityWithPreferences.class, this, CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__SERVICES); + } + return services; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__CONFIG: + return ((InternalEList<?>)getConfig()).basicRemove(otherEnd, msgs); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__PREFERENCES: + return ((InternalEList<?>)getPreferences()).basicRemove(otherEnd, msgs); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__APPS: + return ((InternalEList<?>)getApps()).basicRemove(otherEnd, msgs); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__WORKERS: + return ((InternalEList<?>)getWorkers()).basicRemove(otherEnd, msgs); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__FLOWS: + return ((InternalEList<?>)getFlows()).basicRemove(otherEnd, msgs); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__SERVICES: + return ((InternalEList<?>)getServices()).basicRemove(otherEnd, 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 CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__CONFIG: + return getConfig(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__PREFERENCES: + return getPreferences(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__APPS: + return getApps(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__WORKERS: + return getWorkers(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__FLOWS: + return getFlows(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__SERVICES: + return getServices(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__CONFIG: + getConfig().clear(); + getConfig().addAll((Collection<? extends CdapKeyPair>)newValue); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__PREFERENCES: + getPreferences().clear(); + getPreferences().addAll((Collection<? extends CdapKeyPair>)newValue); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__APPS: + getApps().clear(); + getApps().addAll((Collection<? extends CdapEntityWithPreferences>)newValue); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__WORKERS: + getWorkers().clear(); + getWorkers().addAll((Collection<? extends CdapEntityWithPreferences>)newValue); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__FLOWS: + getFlows().clear(); + getFlows().addAll((Collection<? extends CdapEntityWithPreferences>)newValue); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__SERVICES: + getServices().clear(); + getServices().addAll((Collection<? extends CdapEntityWithPreferences>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__CONFIG: + getConfig().clear(); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__PREFERENCES: + getPreferences().clear(); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__APPS: + getApps().clear(); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__WORKERS: + getWorkers().clear(); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__FLOWS: + getFlows().clear(); + return; + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__SERVICES: + getServices().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__CONFIG: + return config != null && !config.isEmpty(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__PREFERENCES: + return preferences != null && !preferences.isEmpty(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__APPS: + return apps != null && !apps.isEmpty(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__WORKERS: + return workers != null && !workers.isEmpty(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__FLOWS: + return flows != null && !flows.isEmpty(); + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION__SERVICES: + return services != null && !services.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //CdapInternalApplicationConfigurationImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapPackageImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapPackageImpl.java new file mode 100644 index 0000000..e6e6f7c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapPackageImpl.java @@ -0,0 +1,759 @@ + +/*- + * ============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.impl; + +import org.openecomp.dcae.controller.core.service.ServicePackage; +import org.openecomp.dcae.controller.service.cdap.CdapApplication; +import org.openecomp.dcae.controller.service.cdap.CdapArtifact; +import org.openecomp.dcae.controller.service.cdap.CdapFactory; +import org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration; +import org.openecomp.dcae.controller.service.cdap.CdapPackage; +import org.openecomp.dcae.controller.service.cdap.CdapService; +import org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor; +import org.openecomp.dcae.controller.service.cdap.CdapServiceInstance; +import org.openecomp.dcae.controller.service.cdap.CdapServiceInstanceConfiguration; +import org.openecomp.ncomp.core.CorePackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class CdapPackageImpl extends EPackageImpl implements CdapPackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass cdapServiceEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass cdapServiceInstanceEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass cdapApplicationEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass cdapArtifactEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass cdapServiceInstanceConfigurationEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass cdapInternalApplicationConfigurationEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass cdapServiceDescriptorEClass = 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.CdapPackage#eNS_URI + * @see #init() + * @generated + */ + private CdapPackageImpl() { + super(eNS_URI, CdapFactory.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 CdapPackage#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 CdapPackage init() { + if (isInited) return (CdapPackage)EPackage.Registry.INSTANCE.getEPackage(CdapPackage.eNS_URI); + + // Obtain or create and register package + CdapPackageImpl theCdapPackage = (CdapPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof CdapPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new CdapPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theCdapPackage.createPackageContents(); + + // Initialize created meta-data + theCdapPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theCdapPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(CdapPackage.eNS_URI, theCdapPackage); + return theCdapPackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCdapService() { + return cdapServiceEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCdapService_Instances() { + return (EReference)cdapServiceEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EOperation getCdapService__UpdateInstanceConfiguration__String() { + return cdapServiceEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCdapServiceInstance() { + return cdapServiceInstanceEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCdapServiceInstance_CdapName() { + return (EAttribute)cdapServiceInstanceEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCdapServiceInstance_CdapNamespace() { + return (EReference)cdapServiceInstanceEClass.getEStructuralFeatures().get(13); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCdapServiceInstance_Namespace() { + return (EAttribute)cdapServiceInstanceEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCdapServiceInstance_AppJar() { + return (EAttribute)cdapServiceInstanceEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCdapServiceInstance_AppConfigFile() { + return (EAttribute)cdapServiceInstanceEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCdapServiceInstance_Artifacts() { + return (EReference)cdapServiceInstanceEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCdapServiceInstance_Apps() { + return (EReference)cdapServiceInstanceEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCdapServiceInstance_AppNames() { + return (EAttribute)cdapServiceInstanceEClass.getEStructuralFeatures().get(6); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCdapServiceInstance_WorkerNames() { + return (EAttribute)cdapServiceInstanceEClass.getEStructuralFeatures().get(7); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCdapServiceInstance_FlowNames() { + return (EAttribute)cdapServiceInstanceEClass.getEStructuralFeatures().get(8); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCdapServiceInstance_ServiceNames() { + return (EAttribute)cdapServiceInstanceEClass.getEStructuralFeatures().get(9); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCdapServiceInstance_Configuration() { + return (EReference)cdapServiceInstanceEClass.getEStructuralFeatures().get(10); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCdapServiceInstance_CdapConfiguration() { + return (EReference)cdapServiceInstanceEClass.getEStructuralFeatures().get(11); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCdapServiceInstance_ClusterService() { + return (EReference)cdapServiceInstanceEClass.getEStructuralFeatures().get(12); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCdapServiceInstance_Service() { + return (EReference)cdapServiceInstanceEClass.getEStructuralFeatures().get(14); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCdapApplication() { + return cdapApplicationEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCdapApplication_JarFile() { + return (EAttribute)cdapApplicationEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCdapApplication_ArtifactName() { + return (EAttribute)cdapApplicationEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCdapApplication_Version() { + return (EAttribute)cdapApplicationEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCdapApplication_AppConfigFileContent() { + return (EAttribute)cdapApplicationEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCdapArtifact() { + return cdapArtifactEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCdapArtifact_JarFile() { + return (EAttribute)cdapArtifactEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCdapArtifact_Version() { + return (EAttribute)cdapArtifactEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCdapServiceInstanceConfiguration() { + return cdapServiceInstanceConfigurationEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCdapInternalApplicationConfiguration() { + return cdapInternalApplicationConfigurationEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCdapInternalApplicationConfiguration_Config() { + return (EReference)cdapInternalApplicationConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCdapInternalApplicationConfiguration_Preferences() { + return (EReference)cdapInternalApplicationConfigurationEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCdapInternalApplicationConfiguration_Apps() { + return (EReference)cdapInternalApplicationConfigurationEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCdapInternalApplicationConfiguration_Workers() { + return (EReference)cdapInternalApplicationConfigurationEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCdapInternalApplicationConfiguration_Flows() { + return (EReference)cdapInternalApplicationConfigurationEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCdapInternalApplicationConfiguration_Services() { + return (EReference)cdapInternalApplicationConfigurationEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCdapServiceDescriptor() { + return cdapServiceDescriptorEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCdapServiceDescriptor_ServicePackage() { + return (EAttribute)cdapServiceDescriptorEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCdapServiceDescriptor_ServiceClass() { + return (EAttribute)cdapServiceDescriptorEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCdapServiceDescriptor_ServiceInstanceClass() { + return (EAttribute)cdapServiceDescriptorEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCdapServiceDescriptor_JarFile() { + return (EAttribute)cdapServiceDescriptorEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapFactory getCdapFactory() { + return (CdapFactory)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 + cdapServiceEClass = createEClass(CDAP_SERVICE); + createEReference(cdapServiceEClass, CDAP_SERVICE__INSTANCES); + createEOperation(cdapServiceEClass, CDAP_SERVICE___UPDATE_INSTANCE_CONFIGURATION__STRING); + + cdapServiceInstanceEClass = createEClass(CDAP_SERVICE_INSTANCE); + createEAttribute(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__CDAP_NAME); + createEAttribute(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__NAMESPACE); + createEAttribute(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__APP_JAR); + createEAttribute(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__APP_CONFIG_FILE); + createEReference(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__ARTIFACTS); + createEReference(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__APPS); + createEAttribute(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__APP_NAMES); + createEAttribute(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__WORKER_NAMES); + createEAttribute(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__FLOW_NAMES); + createEAttribute(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__SERVICE_NAMES); + createEReference(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__CONFIGURATION); + createEReference(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION); + createEReference(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__CLUSTER_SERVICE); + createEReference(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__CDAP_NAMESPACE); + createEReference(cdapServiceInstanceEClass, CDAP_SERVICE_INSTANCE__SERVICE); + + cdapApplicationEClass = createEClass(CDAP_APPLICATION); + createEAttribute(cdapApplicationEClass, CDAP_APPLICATION__JAR_FILE); + createEAttribute(cdapApplicationEClass, CDAP_APPLICATION__ARTIFACT_NAME); + createEAttribute(cdapApplicationEClass, CDAP_APPLICATION__VERSION); + createEAttribute(cdapApplicationEClass, CDAP_APPLICATION__APP_CONFIG_FILE_CONTENT); + + cdapArtifactEClass = createEClass(CDAP_ARTIFACT); + createEAttribute(cdapArtifactEClass, CDAP_ARTIFACT__JAR_FILE); + createEAttribute(cdapArtifactEClass, CDAP_ARTIFACT__VERSION); + + cdapServiceInstanceConfigurationEClass = createEClass(CDAP_SERVICE_INSTANCE_CONFIGURATION); + + cdapInternalApplicationConfigurationEClass = createEClass(CDAP_INTERNAL_APPLICATION_CONFIGURATION); + createEReference(cdapInternalApplicationConfigurationEClass, CDAP_INTERNAL_APPLICATION_CONFIGURATION__CONFIG); + createEReference(cdapInternalApplicationConfigurationEClass, CDAP_INTERNAL_APPLICATION_CONFIGURATION__PREFERENCES); + createEReference(cdapInternalApplicationConfigurationEClass, CDAP_INTERNAL_APPLICATION_CONFIGURATION__APPS); + createEReference(cdapInternalApplicationConfigurationEClass, CDAP_INTERNAL_APPLICATION_CONFIGURATION__WORKERS); + createEReference(cdapInternalApplicationConfigurationEClass, CDAP_INTERNAL_APPLICATION_CONFIGURATION__FLOWS); + createEReference(cdapInternalApplicationConfigurationEClass, CDAP_INTERNAL_APPLICATION_CONFIGURATION__SERVICES); + + cdapServiceDescriptorEClass = createEClass(CDAP_SERVICE_DESCRIPTOR); + createEAttribute(cdapServiceDescriptorEClass, CDAP_SERVICE_DESCRIPTOR__SERVICE_PACKAGE); + createEAttribute(cdapServiceDescriptorEClass, CDAP_SERVICE_DESCRIPTOR__SERVICE_CLASS); + createEAttribute(cdapServiceDescriptorEClass, CDAP_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS); + createEAttribute(cdapServiceDescriptorEClass, CDAP_SERVICE_DESCRIPTOR__JAR_FILE); + } + + /** + * <!-- 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 + ServicePackage theServicePackage_1 = (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage theServicePackage = (org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage)EPackage.Registry.INSTANCE.getEPackage(org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage.eNS_URI); + org.openecomp.ncomp.cdap.CdapPackage theCdapPackage_1 = (org.openecomp.ncomp.cdap.CdapPackage)EPackage.Registry.INSTANCE.getEPackage(org.openecomp.ncomp.cdap.CdapPackage.eNS_URI); + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + cdapServiceEClass.getESuperTypes().add(theServicePackage_1.getDcaeService()); + cdapServiceInstanceEClass.getESuperTypes().add(theServicePackage_1.getDcaeServiceInstance()); + cdapApplicationEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + cdapArtifactEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + cdapServiceDescriptorEClass.getESuperTypes().add(theServicePackage_1.getDcaeServiceDescriptor()); + + // Initialize classes, features, and operations; add parameters + initEClass(cdapServiceEClass, CdapService.class, "CdapService", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCdapService_Instances(), this.getCdapServiceInstance(), this.getCdapServiceInstance_Service(), "instances", null, 0, -1, CdapService.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + EOperation op = initEOperation(getCdapService__UpdateInstanceConfiguration__String(), null, "updateInstanceConfiguration", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "instanceName", 0, 1, !IS_UNIQUE, IS_ORDERED); + + initEClass(cdapServiceInstanceEClass, CdapServiceInstance.class, "CdapServiceInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCdapServiceInstance_CdapName(), theEcorePackage.getEString(), "cdapName", null, 0, 1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceInstance_Namespace(), theEcorePackage.getEString(), "namespace", null, 0, 1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceInstance_AppJar(), theEcorePackage.getEString(), "appJar", null, 0, 1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceInstance_AppConfigFile(), theEcorePackage.getEString(), "appConfigFile", null, 0, 1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCdapServiceInstance_Artifacts(), this.getCdapArtifact(), null, "artifacts", null, 0, -1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCdapServiceInstance_Apps(), this.getCdapApplication(), null, "apps", null, 0, -1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceInstance_AppNames(), theEcorePackage.getEString(), "appNames", null, 0, -1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceInstance_WorkerNames(), theEcorePackage.getEString(), "workerNames", null, 0, -1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceInstance_FlowNames(), theEcorePackage.getEString(), "flowNames", null, 0, -1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceInstance_ServiceNames(), theEcorePackage.getEString(), "serviceNames", null, 0, -1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCdapServiceInstance_Configuration(), this.getCdapServiceInstanceConfiguration(), null, "configuration", null, 0, 1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCdapServiceInstance_CdapConfiguration(), this.getCdapInternalApplicationConfiguration(), null, "cdapConfiguration", null, 0, 1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCdapServiceInstance_ClusterService(), theServicePackage.getCdapClusterServiceInstance(), null, "clusterService", null, 0, 1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCdapServiceInstance_CdapNamespace(), theCdapPackage_1.getCdapNamespace(), null, "cdapNamespace", null, 0, 1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCdapServiceInstance_Service(), this.getCdapService(), this.getCdapService_Instances(), "service", null, 0, 1, CdapServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(cdapApplicationEClass, CdapApplication.class, "CdapApplication", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCdapApplication_JarFile(), theEcorePackage.getEString(), "jarFile", null, 0, 1, CdapApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapApplication_ArtifactName(), theEcorePackage.getEString(), "artifactName", null, 0, 1, CdapApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapApplication_Version(), theEcorePackage.getEString(), "version", null, 0, 1, CdapApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapApplication_AppConfigFileContent(), theEcorePackage.getEString(), "appConfigFileContent", null, 0, 1, CdapApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(cdapArtifactEClass, CdapArtifact.class, "CdapArtifact", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCdapArtifact_JarFile(), theEcorePackage.getEString(), "jarFile", null, 0, 1, CdapArtifact.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapArtifact_Version(), theEcorePackage.getEString(), "version", null, 0, 1, CdapArtifact.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(cdapServiceInstanceConfigurationEClass, CdapServiceInstanceConfiguration.class, "CdapServiceInstanceConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(cdapInternalApplicationConfigurationEClass, CdapInternalApplicationConfiguration.class, "CdapInternalApplicationConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCdapInternalApplicationConfiguration_Config(), theCdapPackage_1.getCdapKeyPair(), null, "config", null, 0, -1, CdapInternalApplicationConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getCdapInternalApplicationConfiguration_Preferences(), theCdapPackage_1.getCdapKeyPair(), null, "preferences", null, 0, -1, CdapInternalApplicationConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getCdapInternalApplicationConfiguration_Apps(), theCdapPackage_1.getCdapEntityWithPreferences(), null, "apps", null, 0, -1, CdapInternalApplicationConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getCdapInternalApplicationConfiguration_Workers(), theCdapPackage_1.getCdapEntityWithPreferences(), null, "workers", null, 0, -1, CdapInternalApplicationConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getCdapInternalApplicationConfiguration_Flows(), theCdapPackage_1.getCdapEntityWithPreferences(), null, "flows", null, 0, -1, CdapInternalApplicationConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getCdapInternalApplicationConfiguration_Services(), theCdapPackage_1.getCdapEntityWithPreferences(), null, "services", null, 0, -1, CdapInternalApplicationConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(cdapServiceDescriptorEClass, CdapServiceDescriptor.class, "CdapServiceDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCdapServiceDescriptor_ServicePackage(), theEcorePackage.getEString(), "servicePackage", null, 0, 1, CdapServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceDescriptor_ServiceClass(), theEcorePackage.getEString(), "serviceClass", null, 0, 1, CdapServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceDescriptor_ServiceInstanceClass(), theEcorePackage.getEString(), "serviceInstanceClass", null, 0, 1, CdapServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapServiceDescriptor_JarFile(), theEcorePackage.getEString(), "jarFile", null, 0, 1, CdapServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !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", + "cdap", "http://openecomp.org/cdap" + }); + } + + /** + * 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 + (getCdapServiceInstance_Configuration(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getCdapServiceInstance_CdapConfiguration(), + source, + new String[] { + "type", "operational" + }); + addAnnotation + (getCdapServiceInstance_ClusterService(), + source, + new String[] { + "type", "operational" + }); + addAnnotation + (getCdapServiceInstance_CdapNamespace(), + source, + new String[] { + "type", "operational" + }); + addAnnotation + (getCdapServiceInstance_Service(), + source, + new String[] { + "type", "operational" + }); + } + +} //CdapPackageImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceDescriptorImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceDescriptorImpl.java new file mode 100644 index 0000000..7855124 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceDescriptorImpl.java @@ -0,0 +1,347 @@ + +/*- + * ============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.impl; + +import org.openecomp.dcae.controller.core.service.impl.DcaeServiceDescriptorImpl; + +import org.openecomp.dcae.controller.service.cdap.CdapPackage; +import org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Service Descriptor</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceDescriptorImpl#getServicePackage <em>Service Package</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceDescriptorImpl#getServiceClass <em>Service Class</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceDescriptorImpl#getServiceInstanceClass <em>Service Instance Class</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceDescriptorImpl#getJarFile <em>Jar File</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CdapServiceDescriptorImpl extends DcaeServiceDescriptorImpl implements CdapServiceDescriptor { + /** + * The default value of the '{@link #getServicePackage() <em>Service Package</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getServicePackage() + * @generated + * @ordered + */ + protected static final String SERVICE_PACKAGE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getServicePackage() <em>Service Package</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getServicePackage() + * @generated + * @ordered + */ + protected String servicePackage = SERVICE_PACKAGE_EDEFAULT; + + /** + * The default value of the '{@link #getServiceClass() <em>Service Class</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getServiceClass() + * @generated + * @ordered + */ + protected static final String SERVICE_CLASS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getServiceClass() <em>Service Class</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getServiceClass() + * @generated + * @ordered + */ + protected String serviceClass = SERVICE_CLASS_EDEFAULT; + + /** + * The default value of the '{@link #getServiceInstanceClass() <em>Service Instance Class</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getServiceInstanceClass() + * @generated + * @ordered + */ + protected static final String SERVICE_INSTANCE_CLASS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getServiceInstanceClass() <em>Service Instance Class</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getServiceInstanceClass() + * @generated + * @ordered + */ + protected String serviceInstanceClass = SERVICE_INSTANCE_CLASS_EDEFAULT; + + /** + * The default value of the '{@link #getJarFile() <em>Jar File</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getJarFile() + * @generated + * @ordered + */ + protected static final String JAR_FILE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getJarFile() <em>Jar File</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getJarFile() + * @generated + * @ordered + */ + protected String jarFile = JAR_FILE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CdapServiceDescriptorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_SERVICE_DESCRIPTOR; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getServicePackage() { + return servicePackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setServicePackage(String newServicePackage) { + String oldServicePackage = servicePackage; + servicePackage = newServicePackage; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_PACKAGE, oldServicePackage, servicePackage)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getServiceClass() { + return serviceClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setServiceClass(String newServiceClass) { + String oldServiceClass = serviceClass; + serviceClass = newServiceClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_CLASS, oldServiceClass, serviceClass)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getServiceInstanceClass() { + return serviceInstanceClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setServiceInstanceClass(String newServiceInstanceClass) { + String oldServiceInstanceClass = serviceInstanceClass; + serviceInstanceClass = newServiceInstanceClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS, oldServiceInstanceClass, serviceInstanceClass)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getJarFile() { + return jarFile; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setJarFile(String newJarFile) { + String oldJarFile = jarFile; + jarFile = newJarFile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_DESCRIPTOR__JAR_FILE, oldJarFile, jarFile)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + return getServicePackage(); + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_CLASS: + return getServiceClass(); + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + return getServiceInstanceClass(); + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__JAR_FILE: + return getJarFile(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + setServicePackage((String)newValue); + return; + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_CLASS: + setServiceClass((String)newValue); + return; + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + setServiceInstanceClass((String)newValue); + return; + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__JAR_FILE: + setJarFile((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + setServicePackage(SERVICE_PACKAGE_EDEFAULT); + return; + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_CLASS: + setServiceClass(SERVICE_CLASS_EDEFAULT); + return; + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + setServiceInstanceClass(SERVICE_INSTANCE_CLASS_EDEFAULT); + return; + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__JAR_FILE: + setJarFile(JAR_FILE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + return SERVICE_PACKAGE_EDEFAULT == null ? servicePackage != null : !SERVICE_PACKAGE_EDEFAULT.equals(servicePackage); + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_CLASS: + return SERVICE_CLASS_EDEFAULT == null ? serviceClass != null : !SERVICE_CLASS_EDEFAULT.equals(serviceClass); + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + return SERVICE_INSTANCE_CLASS_EDEFAULT == null ? serviceInstanceClass != null : !SERVICE_INSTANCE_CLASS_EDEFAULT.equals(serviceInstanceClass); + case CdapPackage.CDAP_SERVICE_DESCRIPTOR__JAR_FILE: + return JAR_FILE_EDEFAULT == null ? jarFile != null : !JAR_FILE_EDEFAULT.equals(jarFile); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (servicePackage: "); + result.append(servicePackage); + result.append(", serviceClass: "); + result.append(serviceClass); + result.append(", serviceInstanceClass: "); + result.append(serviceInstanceClass); + result.append(", jarFile: "); + result.append(jarFile); + result.append(')'); + return result.toString(); + } + +} //CdapServiceDescriptorImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceImpl.java new file mode 100644 index 0000000..a219229 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceImpl.java @@ -0,0 +1,209 @@ + +/*- + * ============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.impl; + +import org.openecomp.dcae.controller.core.service.impl.DcaeServiceImpl; +import org.openecomp.dcae.controller.service.cdap.CdapPackage; +import org.openecomp.dcae.controller.service.cdap.CdapService; +import org.openecomp.dcae.controller.service.cdap.CdapServiceInstance; +import java.lang.reflect.InvocationTargetException; +import java.util.Collection; +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.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Service</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceImpl#getInstances <em>Instances</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CdapServiceImpl extends DcaeServiceImpl implements CdapService { + /** + * The cached value of the '{@link #getInstances() <em>Instances</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getInstances() + * @generated + * @ordered + */ + protected EList<CdapServiceInstance> instances; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CdapServiceImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_SERVICE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<CdapServiceInstance> getInstances() { + if (instances == null) { + instances = new EObjectContainmentWithInverseEList<CdapServiceInstance>(CdapServiceInstance.class, this, CdapPackage.CDAP_SERVICE__INSTANCES, CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE); + } + return instances; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void updateInstanceConfiguration(String instanceName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE__INSTANCES: + return ((InternalEList<InternalEObject>)(InternalEList<?>)getInstances()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE__INSTANCES: + return ((InternalEList<?>)getInstances()).basicRemove(otherEnd, 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 CdapPackage.CDAP_SERVICE__INSTANCES: + return getInstances(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE__INSTANCES: + getInstances().clear(); + getInstances().addAll((Collection<? extends CdapServiceInstance>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE__INSTANCES: + getInstances().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE__INSTANCES: + return instances != null && !instances.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case CdapPackage.CDAP_SERVICE___UPDATE_INSTANCE_CONFIGURATION__STRING: + updateInstanceConfiguration((String)arguments.get(0)); + return null; + } + return super.eInvoke(operationID, arguments); + } + +} //CdapServiceImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceInstanceConfigurationImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceInstanceConfigurationImpl.java new file mode 100644 index 0000000..b4fbc69 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceInstanceConfigurationImpl.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.impl; + +import org.openecomp.dcae.controller.service.cdap.CdapPackage; +import org.openecomp.dcae.controller.service.cdap.CdapServiceInstanceConfiguration; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Service Instance Configuration</b></em>'. + * <!-- end-user-doc --> + * <p> + * </p> + * + * @generated + */ +public class CdapServiceInstanceConfigurationImpl extends MinimalEObjectImpl.Container implements CdapServiceInstanceConfiguration { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CdapServiceInstanceConfigurationImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_SERVICE_INSTANCE_CONFIGURATION; + } + +} //CdapServiceInstanceConfigurationImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceInstanceImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceInstanceImpl.java new file mode 100644 index 0000000..07ebb3e --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/impl/CdapServiceInstanceImpl.java @@ -0,0 +1,939 @@ + +/*- + * ============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.impl; + +import org.openecomp.dcae.controller.core.service.impl.DcaeServiceInstanceImpl; + +import org.openecomp.dcae.controller.service.cdap.CdapApplication; +import org.openecomp.dcae.controller.service.cdap.CdapArtifact; +import org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration; +import org.openecomp.dcae.controller.service.cdap.CdapPackage; +import org.openecomp.dcae.controller.service.cdap.CdapService; +import org.openecomp.dcae.controller.service.cdap.CdapServiceInstance; + +import org.openecomp.dcae.controller.service.cdap.CdapServiceInstanceConfiguration; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance; +import org.openecomp.ncomp.cdap.CdapNamespace; + +import java.util.Collection; +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; +import org.eclipse.emf.ecore.util.EDataTypeEList; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Service Instance</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getCdapName <em>Cdap Name</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getNamespace <em>Namespace</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getAppJar <em>App Jar</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getAppConfigFile <em>App Config File</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getArtifacts <em>Artifacts</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getApps <em>Apps</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getAppNames <em>App Names</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getWorkerNames <em>Worker Names</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getFlowNames <em>Flow Names</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getServiceNames <em>Service Names</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getConfiguration <em>Configuration</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getCdapConfiguration <em>Cdap Configuration</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getClusterService <em>Cluster Service</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getCdapNamespace <em>Cdap Namespace</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.cdap.impl.CdapServiceInstanceImpl#getService <em>Service</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CdapServiceInstanceImpl extends DcaeServiceInstanceImpl implements CdapServiceInstance { + /** + * The default value of the '{@link #getCdapName() <em>Cdap Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCdapName() + * @generated + * @ordered + */ + protected static final String CDAP_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCdapName() <em>Cdap Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCdapName() + * @generated + * @ordered + */ + protected String cdapName = CDAP_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getNamespace() <em>Namespace</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNamespace() + * @generated + * @ordered + */ + protected static final String NAMESPACE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNamespace() <em>Namespace</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNamespace() + * @generated + * @ordered + */ + protected String namespace = NAMESPACE_EDEFAULT; + + /** + * The default value of the '{@link #getAppJar() <em>App Jar</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAppJar() + * @generated + * @ordered + */ + protected static final String APP_JAR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAppJar() <em>App Jar</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAppJar() + * @generated + * @ordered + */ + protected String appJar = APP_JAR_EDEFAULT; + + /** + * The default value of the '{@link #getAppConfigFile() <em>App Config File</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAppConfigFile() + * @generated + * @ordered + */ + protected static final String APP_CONFIG_FILE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAppConfigFile() <em>App Config File</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAppConfigFile() + * @generated + * @ordered + */ + protected String appConfigFile = APP_CONFIG_FILE_EDEFAULT; + + /** + * The cached value of the '{@link #getArtifacts() <em>Artifacts</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getArtifacts() + * @generated + * @ordered + */ + protected EList<CdapArtifact> artifacts; + + /** + * The cached value of the '{@link #getApps() <em>Apps</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getApps() + * @generated + * @ordered + */ + protected EList<CdapApplication> apps; + + /** + * The cached value of the '{@link #getAppNames() <em>App Names</em>}' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAppNames() + * @generated + * @ordered + */ + protected EList<String> appNames; + + /** + * The cached value of the '{@link #getWorkerNames() <em>Worker Names</em>}' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getWorkerNames() + * @generated + * @ordered + */ + protected EList<String> workerNames; + + /** + * The cached value of the '{@link #getFlowNames() <em>Flow Names</em>}' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFlowNames() + * @generated + * @ordered + */ + protected EList<String> flowNames; + + /** + * The cached value of the '{@link #getServiceNames() <em>Service Names</em>}' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getServiceNames() + * @generated + * @ordered + */ + protected EList<String> serviceNames; + + /** + * The cached value of the '{@link #getConfiguration() <em>Configuration</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getConfiguration() + * @generated + * @ordered + */ + protected CdapServiceInstanceConfiguration configuration; + + /** + * The cached value of the '{@link #getCdapConfiguration() <em>Cdap Configuration</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCdapConfiguration() + * @generated + * @ordered + */ + protected CdapInternalApplicationConfiguration cdapConfiguration; + + /** + * The cached value of the '{@link #getClusterService() <em>Cluster Service</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getClusterService() + * @generated + * @ordered + */ + protected CdapClusterServiceInstance clusterService; + + /** + * The cached value of the '{@link #getCdapNamespace() <em>Cdap Namespace</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCdapNamespace() + * @generated + * @ordered + */ + protected CdapNamespace cdapNamespace; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CdapServiceInstanceImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_SERVICE_INSTANCE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getCdapName() { + return cdapName; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCdapName(String newCdapName) { + String oldCdapName = cdapName; + cdapName = newCdapName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAME, oldCdapName, cdapName)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapNamespace getCdapNamespace() { + if (cdapNamespace != null && cdapNamespace.eIsProxy()) { + InternalEObject oldCdapNamespace = (InternalEObject)cdapNamespace; + cdapNamespace = (CdapNamespace)eResolveProxy(oldCdapNamespace); + if (cdapNamespace != oldCdapNamespace) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAMESPACE, oldCdapNamespace, cdapNamespace)); + } + } + return cdapNamespace; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapNamespace basicGetCdapNamespace() { + return cdapNamespace; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCdapNamespace(CdapNamespace newCdapNamespace) { + CdapNamespace oldCdapNamespace = cdapNamespace; + cdapNamespace = newCdapNamespace; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAMESPACE, oldCdapNamespace, cdapNamespace)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getNamespace() { + return namespace; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setNamespace(String newNamespace) { + String oldNamespace = namespace; + namespace = newNamespace; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__NAMESPACE, oldNamespace, namespace)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getAppJar() { + return appJar; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAppJar(String newAppJar) { + String oldAppJar = appJar; + appJar = newAppJar; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__APP_JAR, oldAppJar, appJar)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getAppConfigFile() { + return appConfigFile; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAppConfigFile(String newAppConfigFile) { + String oldAppConfigFile = appConfigFile; + appConfigFile = newAppConfigFile; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__APP_CONFIG_FILE, oldAppConfigFile, appConfigFile)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<CdapArtifact> getArtifacts() { + if (artifacts == null) { + artifacts = new EObjectContainmentEList<CdapArtifact>(CdapArtifact.class, this, CdapPackage.CDAP_SERVICE_INSTANCE__ARTIFACTS); + } + return artifacts; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<CdapApplication> getApps() { + if (apps == null) { + apps = new EObjectContainmentEList<CdapApplication>(CdapApplication.class, this, CdapPackage.CDAP_SERVICE_INSTANCE__APPS); + } + return apps; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<String> getAppNames() { + if (appNames == null) { + appNames = new EDataTypeEList<String>(String.class, this, CdapPackage.CDAP_SERVICE_INSTANCE__APP_NAMES); + } + return appNames; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<String> getWorkerNames() { + if (workerNames == null) { + workerNames = new EDataTypeEList<String>(String.class, this, CdapPackage.CDAP_SERVICE_INSTANCE__WORKER_NAMES); + } + return workerNames; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<String> getFlowNames() { + if (flowNames == null) { + flowNames = new EDataTypeEList<String>(String.class, this, CdapPackage.CDAP_SERVICE_INSTANCE__FLOW_NAMES); + } + return flowNames; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<String> getServiceNames() { + if (serviceNames == null) { + serviceNames = new EDataTypeEList<String>(String.class, this, CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE_NAMES); + } + return serviceNames; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapServiceInstanceConfiguration getConfiguration() { + return configuration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetConfiguration(CdapServiceInstanceConfiguration newConfiguration, NotificationChain msgs) { + CdapServiceInstanceConfiguration oldConfiguration = configuration; + configuration = newConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__CONFIGURATION, oldConfiguration, newConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setConfiguration(CdapServiceInstanceConfiguration newConfiguration) { + if (newConfiguration != configuration) { + NotificationChain msgs = null; + if (configuration != null) + msgs = ((InternalEObject)configuration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CdapPackage.CDAP_SERVICE_INSTANCE__CONFIGURATION, null, msgs); + if (newConfiguration != null) + msgs = ((InternalEObject)newConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CdapPackage.CDAP_SERVICE_INSTANCE__CONFIGURATION, null, msgs); + msgs = basicSetConfiguration(newConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__CONFIGURATION, newConfiguration, newConfiguration)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapInternalApplicationConfiguration getCdapConfiguration() { + return cdapConfiguration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetCdapConfiguration(CdapInternalApplicationConfiguration newCdapConfiguration, NotificationChain msgs) { + CdapInternalApplicationConfiguration oldCdapConfiguration = cdapConfiguration; + cdapConfiguration = newCdapConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION, oldCdapConfiguration, newCdapConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCdapConfiguration(CdapInternalApplicationConfiguration newCdapConfiguration) { + if (newCdapConfiguration != cdapConfiguration) { + NotificationChain msgs = null; + if (cdapConfiguration != null) + msgs = ((InternalEObject)cdapConfiguration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION, null, msgs); + if (newCdapConfiguration != null) + msgs = ((InternalEObject)newCdapConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION, null, msgs); + msgs = basicSetCdapConfiguration(newCdapConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION, newCdapConfiguration, newCdapConfiguration)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapClusterServiceInstance getClusterService() { + if (clusterService != null && clusterService.eIsProxy()) { + InternalEObject oldClusterService = (InternalEObject)clusterService; + clusterService = (CdapClusterServiceInstance)eResolveProxy(oldClusterService); + if (clusterService != oldClusterService) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CdapPackage.CDAP_SERVICE_INSTANCE__CLUSTER_SERVICE, oldClusterService, clusterService)); + } + } + return clusterService; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapClusterServiceInstance basicGetClusterService() { + return clusterService; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setClusterService(CdapClusterServiceInstance newClusterService) { + CdapClusterServiceInstance oldClusterService = clusterService; + clusterService = newClusterService; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__CLUSTER_SERVICE, oldClusterService, clusterService)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapService getService() { + if (eContainerFeatureID() != CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE) return null; + return (CdapService)eContainer(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapService basicGetService() { + if (eContainerFeatureID() != CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE) return null; + return (CdapService)eInternalContainer(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetService(CdapService newService, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newService, CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE, msgs); + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setService(CdapService newService) { + if (newService != eInternalContainer() || (eContainerFeatureID() != CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE && newService != null)) { + if (EcoreUtil.isAncestor(this, newService)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newService != null) + msgs = ((InternalEObject)newService).eInverseAdd(this, CdapPackage.CDAP_SERVICE__INSTANCES, CdapService.class, msgs); + msgs = basicSetService(newService, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE, newService, newService)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetService((CdapService)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_INSTANCE__ARTIFACTS: + return ((InternalEList<?>)getArtifacts()).basicRemove(otherEnd, msgs); + case CdapPackage.CDAP_SERVICE_INSTANCE__APPS: + return ((InternalEList<?>)getApps()).basicRemove(otherEnd, msgs); + case CdapPackage.CDAP_SERVICE_INSTANCE__CONFIGURATION: + return basicSetConfiguration(null, msgs); + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION: + return basicSetCdapConfiguration(null, msgs); + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE: + return basicSetService(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE: + return eInternalContainer().eInverseRemove(this, CdapPackage.CDAP_SERVICE__INSTANCES, CdapService.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAME: + return getCdapName(); + case CdapPackage.CDAP_SERVICE_INSTANCE__NAMESPACE: + return getNamespace(); + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_JAR: + return getAppJar(); + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_CONFIG_FILE: + return getAppConfigFile(); + case CdapPackage.CDAP_SERVICE_INSTANCE__ARTIFACTS: + return getArtifacts(); + case CdapPackage.CDAP_SERVICE_INSTANCE__APPS: + return getApps(); + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_NAMES: + return getAppNames(); + case CdapPackage.CDAP_SERVICE_INSTANCE__WORKER_NAMES: + return getWorkerNames(); + case CdapPackage.CDAP_SERVICE_INSTANCE__FLOW_NAMES: + return getFlowNames(); + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE_NAMES: + return getServiceNames(); + case CdapPackage.CDAP_SERVICE_INSTANCE__CONFIGURATION: + return getConfiguration(); + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION: + return getCdapConfiguration(); + case CdapPackage.CDAP_SERVICE_INSTANCE__CLUSTER_SERVICE: + if (resolve) return getClusterService(); + return basicGetClusterService(); + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAMESPACE: + if (resolve) return getCdapNamespace(); + return basicGetCdapNamespace(); + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE: + if (resolve) return getService(); + return basicGetService(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAME: + setCdapName((String)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__NAMESPACE: + setNamespace((String)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_JAR: + setAppJar((String)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_CONFIG_FILE: + setAppConfigFile((String)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__ARTIFACTS: + getArtifacts().clear(); + getArtifacts().addAll((Collection<? extends CdapArtifact>)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__APPS: + getApps().clear(); + getApps().addAll((Collection<? extends CdapApplication>)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_NAMES: + getAppNames().clear(); + getAppNames().addAll((Collection<? extends String>)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__WORKER_NAMES: + getWorkerNames().clear(); + getWorkerNames().addAll((Collection<? extends String>)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__FLOW_NAMES: + getFlowNames().clear(); + getFlowNames().addAll((Collection<? extends String>)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE_NAMES: + getServiceNames().clear(); + getServiceNames().addAll((Collection<? extends String>)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__CONFIGURATION: + setConfiguration((CdapServiceInstanceConfiguration)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION: + setCdapConfiguration((CdapInternalApplicationConfiguration)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__CLUSTER_SERVICE: + setClusterService((CdapClusterServiceInstance)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAMESPACE: + setCdapNamespace((CdapNamespace)newValue); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE: + setService((CdapService)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAME: + setCdapName(CDAP_NAME_EDEFAULT); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__NAMESPACE: + setNamespace(NAMESPACE_EDEFAULT); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_JAR: + setAppJar(APP_JAR_EDEFAULT); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_CONFIG_FILE: + setAppConfigFile(APP_CONFIG_FILE_EDEFAULT); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__ARTIFACTS: + getArtifacts().clear(); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__APPS: + getApps().clear(); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_NAMES: + getAppNames().clear(); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__WORKER_NAMES: + getWorkerNames().clear(); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__FLOW_NAMES: + getFlowNames().clear(); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE_NAMES: + getServiceNames().clear(); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__CONFIGURATION: + setConfiguration((CdapServiceInstanceConfiguration)null); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION: + setCdapConfiguration((CdapInternalApplicationConfiguration)null); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__CLUSTER_SERVICE: + setClusterService((CdapClusterServiceInstance)null); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAMESPACE: + setCdapNamespace((CdapNamespace)null); + return; + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE: + setService((CdapService)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAME: + return CDAP_NAME_EDEFAULT == null ? cdapName != null : !CDAP_NAME_EDEFAULT.equals(cdapName); + case CdapPackage.CDAP_SERVICE_INSTANCE__NAMESPACE: + return NAMESPACE_EDEFAULT == null ? namespace != null : !NAMESPACE_EDEFAULT.equals(namespace); + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_JAR: + return APP_JAR_EDEFAULT == null ? appJar != null : !APP_JAR_EDEFAULT.equals(appJar); + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_CONFIG_FILE: + return APP_CONFIG_FILE_EDEFAULT == null ? appConfigFile != null : !APP_CONFIG_FILE_EDEFAULT.equals(appConfigFile); + case CdapPackage.CDAP_SERVICE_INSTANCE__ARTIFACTS: + return artifacts != null && !artifacts.isEmpty(); + case CdapPackage.CDAP_SERVICE_INSTANCE__APPS: + return apps != null && !apps.isEmpty(); + case CdapPackage.CDAP_SERVICE_INSTANCE__APP_NAMES: + return appNames != null && !appNames.isEmpty(); + case CdapPackage.CDAP_SERVICE_INSTANCE__WORKER_NAMES: + return workerNames != null && !workerNames.isEmpty(); + case CdapPackage.CDAP_SERVICE_INSTANCE__FLOW_NAMES: + return flowNames != null && !flowNames.isEmpty(); + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE_NAMES: + return serviceNames != null && !serviceNames.isEmpty(); + case CdapPackage.CDAP_SERVICE_INSTANCE__CONFIGURATION: + return configuration != null; + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_CONFIGURATION: + return cdapConfiguration != null; + case CdapPackage.CDAP_SERVICE_INSTANCE__CLUSTER_SERVICE: + return clusterService != null; + case CdapPackage.CDAP_SERVICE_INSTANCE__CDAP_NAMESPACE: + return cdapNamespace != null; + case CdapPackage.CDAP_SERVICE_INSTANCE__SERVICE: + return basicGetService() != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (cdapName: "); + result.append(cdapName); + result.append(", namespace: "); + result.append(namespace); + result.append(", appJar: "); + result.append(appJar); + result.append(", appConfigFile: "); + result.append(appConfigFile); + result.append(", appNames: "); + result.append(appNames); + result.append(", workerNames: "); + result.append(workerNames); + result.append(", flowNames: "); + result.append(flowNames); + result.append(", serviceNames: "); + result.append(serviceNames); + result.append(')'); + return result.toString(); + } + +} //CdapServiceInstanceImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/util/CdapAdapterFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/util/CdapAdapterFactory.java new file mode 100644 index 0000000..6df62fb --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/util/CdapAdapterFactory.java @@ -0,0 +1,325 @@ + +/*- + * ============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.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; +import org.openecomp.dcae.controller.service.cdap.*; + +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.CdapPackage + * @generated + */ +public class CdapAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static CdapPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapAdapterFactory() { + if (modelPackage == null) { + modelPackage = CdapPackage.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 CdapSwitch<Adapter> modelSwitch = + new CdapSwitch<Adapter>() { + @Override + public Adapter caseCdapService(CdapService object) { + return createCdapServiceAdapter(); + } + @Override + public Adapter caseCdapServiceInstance(CdapServiceInstance object) { + return createCdapServiceInstanceAdapter(); + } + @Override + public Adapter caseCdapApplication(CdapApplication object) { + return createCdapApplicationAdapter(); + } + @Override + public Adapter caseCdapArtifact(CdapArtifact object) { + return createCdapArtifactAdapter(); + } + @Override + public Adapter caseCdapServiceInstanceConfiguration(CdapServiceInstanceConfiguration object) { + return createCdapServiceInstanceConfigurationAdapter(); + } + @Override + public Adapter caseCdapInternalApplicationConfiguration(CdapInternalApplicationConfiguration object) { + return createCdapInternalApplicationConfigurationAdapter(); + } + @Override + public Adapter caseCdapServiceDescriptor(CdapServiceDescriptor object) { + return createCdapServiceDescriptorAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter caseDcaeService(DcaeService object) { + return createDcaeServiceAdapter(); + } + @Override + public Adapter caseDcaeServiceInstance(DcaeServiceInstance object) { + return createDcaeServiceInstanceAdapter(); + } + @Override + public Adapter caseDcaeServiceDescriptor(DcaeServiceDescriptor object) { + return createDcaeServiceDescriptorAdapter(); + } + @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.CdapService <em>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.CdapService + * @generated + */ + public Adapter createCdapServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstance <em>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.CdapServiceInstance + * @generated + */ + public Adapter createCdapServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.CdapApplication <em>Application</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.CdapApplication + * @generated + */ + public Adapter createCdapApplicationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.CdapArtifact <em>Artifact</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.CdapArtifact + * @generated + */ + public Adapter createCdapArtifactAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceInstanceConfiguration <em>Service Instance 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.CdapServiceInstanceConfiguration + * @generated + */ + public Adapter createCdapServiceInstanceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.CdapInternalApplicationConfiguration <em>Internal Application 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.CdapInternalApplicationConfiguration + * @generated + */ + public Adapter createCdapInternalApplicationConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.CdapServiceDescriptor <em>Service Descriptor</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.CdapServiceDescriptor + * @generated + */ + public Adapter createCdapServiceDescriptorAdapter() { + 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.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.core.service.DcaeServiceDescriptor <em>Dcae Service Descriptor</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.DcaeServiceDescriptor + * @generated + */ + public Adapter createDcaeServiceDescriptorAdapter() { + 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; + } + +} //CdapAdapterFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/util/CdapSwitch.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/util/CdapSwitch.java new file mode 100644 index 0000000..ae39c7b --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/util/CdapSwitch.java @@ -0,0 +1,329 @@ + +/*- + * ============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.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; +import org.openecomp.dcae.controller.service.cdap.*; + +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.CdapPackage + * @generated + */ +public class CdapSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static CdapPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapSwitch() { + if (modelPackage == null) { + modelPackage = CdapPackage.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 CdapPackage.CDAP_SERVICE: { + CdapService cdapService = (CdapService)theEObject; + T result = caseCdapService(cdapService); + if (result == null) result = caseDcaeService(cdapService); + if (result == null) result = caseNamedEntity(cdapService); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_SERVICE_INSTANCE: { + CdapServiceInstance cdapServiceInstance = (CdapServiceInstance)theEObject; + T result = caseCdapServiceInstance(cdapServiceInstance); + if (result == null) result = caseDcaeServiceInstance(cdapServiceInstance); + if (result == null) result = caseNamedEntity(cdapServiceInstance); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_APPLICATION: { + CdapApplication cdapApplication = (CdapApplication)theEObject; + T result = caseCdapApplication(cdapApplication); + if (result == null) result = caseNamedEntity(cdapApplication); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_ARTIFACT: { + CdapArtifact cdapArtifact = (CdapArtifact)theEObject; + T result = caseCdapArtifact(cdapArtifact); + if (result == null) result = caseNamedEntity(cdapArtifact); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_SERVICE_INSTANCE_CONFIGURATION: { + CdapServiceInstanceConfiguration cdapServiceInstanceConfiguration = (CdapServiceInstanceConfiguration)theEObject; + T result = caseCdapServiceInstanceConfiguration(cdapServiceInstanceConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_INTERNAL_APPLICATION_CONFIGURATION: { + CdapInternalApplicationConfiguration cdapInternalApplicationConfiguration = (CdapInternalApplicationConfiguration)theEObject; + T result = caseCdapInternalApplicationConfiguration(cdapInternalApplicationConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_SERVICE_DESCRIPTOR: { + CdapServiceDescriptor cdapServiceDescriptor = (CdapServiceDescriptor)theEObject; + T result = caseCdapServiceDescriptor(cdapServiceDescriptor); + if (result == null) result = caseDcaeServiceDescriptor(cdapServiceDescriptor); + if (result == null) result = caseNamedEntity(cdapServiceDescriptor); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>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>Service</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapService(CdapService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>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>Service Instance</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapServiceInstance(CdapServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Application</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>Application</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapApplication(CdapApplication object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Artifact</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>Artifact</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapArtifact(CdapArtifact object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Service Instance 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>Service Instance Configuration</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapServiceInstanceConfiguration(CdapServiceInstanceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Internal Application 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>Internal Application Configuration</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapInternalApplicationConfiguration(CdapInternalApplicationConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Service Descriptor</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>Service Descriptor</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapServiceDescriptor(CdapServiceDescriptor 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>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>Dcae Service Descriptor</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 Descriptor</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeServiceDescriptor(DcaeServiceDescriptor 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; + } + +} //CdapSwitch diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapManager.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapManager.java new file mode 100644 index 0000000..f20e1fa --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapManager.java @@ -0,0 +1,73 @@ + +/*- + * ============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.cdapmanager; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.ncomp.cdap.CdapConfiguration; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Cdap Manager</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdapmanager.CdapManager#getConfiguration <em>Configuration</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage#getCdapManager() + * @model + * @generated + */ +public interface CdapManager extends DcaeManager { + /** + * Returns the value of the '<em><b>Configuration</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Configuration</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>Configuration</em>' containment reference. + * @see #setConfiguration(CdapConfiguration) + * @see org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage#getCdapManager_Configuration() + * @model containment="true" + * @generated + */ + CdapConfiguration getConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdapmanager.CdapManager#getConfiguration <em>Configuration</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Configuration</em>' containment reference. + * @see #getConfiguration() + * @generated + */ + void setConfiguration(CdapConfiguration value); + +} // CdapManager diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapmanagerFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapmanagerFactory.java new file mode 100644 index 0000000..ed6da7a --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapmanagerFactory.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.cdapmanager; + +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.cdapmanager.CdapmanagerPackage + * @generated + */ +public interface CdapmanagerFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + CdapmanagerFactory eINSTANCE = org.openecomp.dcae.controller.service.cdapmanager.impl.CdapmanagerFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Cdap Manager</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Cdap Manager</em>'. + * @generated + */ + CdapManager createCdapManager(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the package supported by this factory. + * @generated + */ + CdapmanagerPackage getCdapmanagerPackage(); + +} //CdapmanagerFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapmanagerPackage.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapmanagerPackage.java new file mode 100644 index 0000000..edc40a8 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/CdapmanagerPackage.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============================================ + */ + +/** + */ +package org.openecomp.dcae.controller.service.cdapmanager; + +import org.openecomp.dcae.controller.core.manager.ManagerPackage; + +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.cdapmanager.CdapmanagerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-cdap-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service'" + * @generated + */ +public interface CdapmanagerPackage extends EPackage { + /** + * The package name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "cdapmanager"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.cdapmanager"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "cdapmanager"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + CdapmanagerPackage eINSTANCE = org.openecomp.dcae.controller.service.cdapmanager.impl.CdapmanagerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdapmanager.impl.CdapManagerImpl <em>Cdap Manager</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdapmanager.impl.CdapManagerImpl + * @see org.openecomp.dcae.controller.service.cdapmanager.impl.CdapmanagerPackageImpl#getCdapManager() + * @generated + */ + int CDAP_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_MANAGER__INPUT_STREAMS = ManagerPackage.DCAE_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_MANAGER__OUTPUT_STREAMS = ManagerPackage.DCAE_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_MANAGER__CONFIGURATION = ManagerPackage.DCAE_MANAGER_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Cdap Manager</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_MANAGER_FEATURE_COUNT = ManagerPackage.DCAE_MANAGER_FEATURE_COUNT + 1; + + /** + * The operation id for the '<em>Test</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_MANAGER___TEST = ManagerPackage.DCAE_MANAGER___TEST; + + /** + * The operation id for the '<em>Suspend</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_MANAGER___SUSPEND = ManagerPackage.DCAE_MANAGER___SUSPEND; + + /** + * The operation id for the '<em>Resume</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_MANAGER___RESUME = ManagerPackage.DCAE_MANAGER___RESUME; + + /** + * The operation id for the '<em>Public Key</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_MANAGER___PUBLIC_KEY = ManagerPackage.DCAE_MANAGER___PUBLIC_KEY; + + /** + * The operation id for the '<em>Configuration Changed</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_MANAGER___CONFIGURATION_CHANGED = ManagerPackage.DCAE_MANAGER___CONFIGURATION_CHANGED; + + /** + * The operation id for the '<em>Update Streams</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_MANAGER___UPDATE_STREAMS__ELIST_ELIST = ManagerPackage.DCAE_MANAGER___UPDATE_STREAMS__ELIST_ELIST; + + /** + * The number of operations of the '<em>Cdap Manager</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_MANAGER_OPERATION_COUNT = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdapmanager.CdapManager <em>Cdap Manager</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Cdap Manager</em>'. + * @see org.openecomp.dcae.controller.service.cdapmanager.CdapManager + * @generated + */ + EClass getCdapManager(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.service.cdapmanager.CdapManager#getConfiguration <em>Configuration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Configuration</em>'. + * @see org.openecomp.dcae.controller.service.cdapmanager.CdapManager#getConfiguration() + * @see #getCdapManager() + * @generated + */ + EReference getCdapManager_Configuration(); + + /** + * 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 + */ + CdapmanagerFactory getCdapmanagerFactory(); + + /** + * <!-- 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.cdapmanager.impl.CdapManagerImpl <em>Cdap Manager</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdapmanager.impl.CdapManagerImpl + * @see org.openecomp.dcae.controller.service.cdapmanager.impl.CdapmanagerPackageImpl#getCdapManager() + * @generated + */ + EClass CDAP_MANAGER = eINSTANCE.getCdapManager(); + + /** + * The meta object literal for the '<em><b>Configuration</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CDAP_MANAGER__CONFIGURATION = eINSTANCE.getCdapManager_Configuration(); + + } + +} //CdapmanagerPackage diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/DockerManager.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/DockerManager.java new file mode 100644 index 0000000..43ba34d --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/DockerManager.java @@ -0,0 +1,73 @@ + +/*- + * ============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.cdapmanager; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.ncomp.cdap.CdapConfiguration; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Docker Manager</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdapmanager.DockerManager#getConfiguration <em>Configuration</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage#getDockerManager() + * @model + * @generated + */ +public interface DockerManager extends DcaeManager { + /** + * Returns the value of the '<em><b>Configuration</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Configuration</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>Configuration</em>' containment reference. + * @see #setConfiguration(CdapConfiguration) + * @see org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage#getDockerManager_Configuration() + * @model containment="true" + * @generated + */ + CdapConfiguration getConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdapmanager.DockerManager#getConfiguration <em>Configuration</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Configuration</em>' containment reference. + * @see #getConfiguration() + * @generated + */ + void setConfiguration(CdapConfiguration value); + +} // DockerManager diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapManagerImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapManagerImpl.java new file mode 100644 index 0000000..2a0e857 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapManagerImpl.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.cdapmanager.impl; + +import org.openecomp.dcae.controller.core.manager.impl.DcaeManagerImpl; + +import org.openecomp.dcae.controller.service.cdapmanager.CdapManager; +import org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage; + +import org.openecomp.ncomp.cdap.CdapConfiguration; + +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 Manager</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdapmanager.impl.CdapManagerImpl#getConfiguration <em>Configuration</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CdapManagerImpl extends DcaeManagerImpl implements CdapManager { + /** + * The cached value of the '{@link #getConfiguration() <em>Configuration</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getConfiguration() + * @generated + * @ordered + */ + protected CdapConfiguration configuration; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CdapManagerImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapmanagerPackage.Literals.CDAP_MANAGER; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapConfiguration getConfiguration() { + return configuration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetConfiguration(CdapConfiguration newConfiguration, NotificationChain msgs) { + CdapConfiguration oldConfiguration = configuration; + configuration = newConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CdapmanagerPackage.CDAP_MANAGER__CONFIGURATION, oldConfiguration, newConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setConfiguration(CdapConfiguration newConfiguration) { + if (newConfiguration != configuration) { + NotificationChain msgs = null; + if (configuration != null) + msgs = ((InternalEObject)configuration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CdapmanagerPackage.CDAP_MANAGER__CONFIGURATION, null, msgs); + if (newConfiguration != null) + msgs = ((InternalEObject)newConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CdapmanagerPackage.CDAP_MANAGER__CONFIGURATION, null, msgs); + msgs = basicSetConfiguration(newConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapmanagerPackage.CDAP_MANAGER__CONFIGURATION, newConfiguration, newConfiguration)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapmanagerPackage.CDAP_MANAGER__CONFIGURATION: + return basicSetConfiguration(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 CdapmanagerPackage.CDAP_MANAGER__CONFIGURATION: + return getConfiguration(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapmanagerPackage.CDAP_MANAGER__CONFIGURATION: + setConfiguration((CdapConfiguration)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapmanagerPackage.CDAP_MANAGER__CONFIGURATION: + setConfiguration((CdapConfiguration)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapmanagerPackage.CDAP_MANAGER__CONFIGURATION: + return configuration != null; + } + return super.eIsSet(featureID); + } + +} //CdapManagerImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapmanagerFactoryImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapmanagerFactoryImpl.java new file mode 100644 index 0000000..b477796 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapmanagerFactoryImpl.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.cdapmanager.impl; + +import org.openecomp.dcae.controller.service.cdapmanager.*; + +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 CdapmanagerFactoryImpl extends EFactoryImpl implements CdapmanagerFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static CdapmanagerFactory init() { + try { + CdapmanagerFactory theCdapmanagerFactory = (CdapmanagerFactory)EPackage.Registry.INSTANCE.getEFactory(CdapmanagerPackage.eNS_URI); + if (theCdapmanagerFactory != null) { + return theCdapmanagerFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new CdapmanagerFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapmanagerFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case CdapmanagerPackage.CDAP_MANAGER: return createCdapManager(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapManager createCdapManager() { + CdapManagerImpl cdapManager = new CdapManagerImpl(); + return cdapManager; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapmanagerPackage getCdapmanagerPackage() { + return (CdapmanagerPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @deprecated + * @generated + */ + @Deprecated + public static CdapmanagerPackage getPackage() { + return CdapmanagerPackage.eINSTANCE; + } + +} //CdapmanagerFactoryImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapmanagerPackageImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapmanagerPackageImpl.java new file mode 100644 index 0000000..85c21a4 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/impl/CdapmanagerPackageImpl.java @@ -0,0 +1,206 @@ + +/*- + * ============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.cdapmanager.impl; + +import org.openecomp.dcae.controller.core.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.cdapmanager.CdapManager; +import org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerFactory; +import org.openecomp.dcae.controller.service.cdapmanager.CdapmanagerPackage; +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 CdapmanagerPackageImpl extends EPackageImpl implements CdapmanagerPackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass cdapManagerEClass = 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.cdapmanager.CdapmanagerPackage#eNS_URI + * @see #init() + * @generated + */ + private CdapmanagerPackageImpl() { + super(eNS_URI, CdapmanagerFactory.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 CdapmanagerPackage#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 CdapmanagerPackage init() { + if (isInited) return (CdapmanagerPackage)EPackage.Registry.INSTANCE.getEPackage(CdapmanagerPackage.eNS_URI); + + // Obtain or create and register package + CdapmanagerPackageImpl theCdapmanagerPackage = (CdapmanagerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof CdapmanagerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new CdapmanagerPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + ManagerPackage.eINSTANCE.eClass(); + CdapPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theCdapmanagerPackage.createPackageContents(); + + // Initialize created meta-data + theCdapmanagerPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theCdapmanagerPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(CdapmanagerPackage.eNS_URI, theCdapmanagerPackage); + return theCdapmanagerPackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCdapManager() { + return cdapManagerEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCdapManager_Configuration() { + return (EReference)cdapManagerEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapmanagerFactory getCdapmanagerFactory() { + return (CdapmanagerFactory)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 + cdapManagerEClass = createEClass(CDAP_MANAGER); + createEReference(cdapManagerEClass, CDAP_MANAGER__CONFIGURATION); + } + + /** + * <!-- 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 + ManagerPackage theManagerPackage = (ManagerPackage)EPackage.Registry.INSTANCE.getEPackage(ManagerPackage.eNS_URI); + CdapPackage theCdapPackage = (CdapPackage)EPackage.Registry.INSTANCE.getEPackage(CdapPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + cdapManagerEClass.getESuperTypes().add(theManagerPackage.getDcaeManager()); + + // Initialize classes, features, and operations; add parameters + initEClass(cdapManagerEClass, CdapManager.class, "CdapManager", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCdapManager_Configuration(), theCdapPackage.getCdapConfiguration(), null, "configuration", null, 0, 1, CdapManager.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); + } + +} //CdapmanagerPackageImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/util/CdapmanagerAdapterFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/util/CdapmanagerAdapterFactory.java new file mode 100644 index 0000000..31d68c9 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/util/CdapmanagerAdapterFactory.java @@ -0,0 +1,161 @@ + +/*- + * ============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.cdapmanager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.cdapmanager.*; + +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.cdapmanager.CdapmanagerPackage + * @generated + */ +public class CdapmanagerAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static CdapmanagerPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapmanagerAdapterFactory() { + if (modelPackage == null) { + modelPackage = CdapmanagerPackage.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 CdapmanagerSwitch<Adapter> modelSwitch = + new CdapmanagerSwitch<Adapter>() { + @Override + public Adapter caseCdapManager(CdapManager object) { + return createCdapManagerAdapter(); + } + @Override + public Adapter caseDcaeManager(DcaeManager object) { + return createDcaeManagerAdapter(); + } + @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.cdapmanager.CdapManager <em>Cdap 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.cdapmanager.CdapManager + * @generated + */ + public Adapter createCdapManagerAdapter() { + 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 the default case. + * <!-- begin-user-doc --> + * This default implementation returns null. + * <!-- end-user-doc --> + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //CdapmanagerAdapterFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/util/CdapmanagerSwitch.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/util/CdapmanagerSwitch.java new file mode 100644 index 0000000..a423091 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdapmanager/util/CdapmanagerSwitch.java @@ -0,0 +1,149 @@ + +/*- + * ============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.cdapmanager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.cdapmanager.*; + +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.cdapmanager.CdapmanagerPackage + * @generated + */ +public class CdapmanagerSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static CdapmanagerPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapmanagerSwitch() { + if (modelPackage == null) { + modelPackage = CdapmanagerPackage.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 CdapmanagerPackage.CDAP_MANAGER: { + CdapManager cdapManager = (CdapManager)theEObject; + T result = caseCdapManager(cdapManager); + if (result == null) result = caseDcaeManager(cdapManager); + 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 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 Manager</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapManager(CdapManager 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>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; + } + +} //CdapmanagerSwitch diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore/manager.xcore b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore/manager.xcore new file mode 100644 index 0000000..eed0293 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore/manager.xcore @@ -0,0 +1,34 @@ + +/*- + * ============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-model/src/main/xcore-gen")
+
+
+package org.openecomp.dcae.controller.service.cdapmanager
+
+import org.openecomp.dcae.controller.core.manager.DcaeManager
+import org.openecomp.ncomp.cdap.CdapConfiguration
+
+// state of manager
+class CdapManager extends DcaeManager {
+ contains CdapConfiguration configuration
+}
+
diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore/service.xcore b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore/service.xcore new file mode 100644 index 0000000..5a26378 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-model/src/main/xcore/service.xcore @@ -0,0 +1,101 @@ + +/*- + * ============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-model/src/main/xcore-gen")
+
+
+package org.openecomp.dcae.controller.service.cdap
+
+
+import org.openecomp.dcae.controller.core.service.DcaeService
+import org.openecomp.dcae.controller.core.service.DcaeServiceInstance
+import org.openecomp.ncomp.cdap.CdapNamespace
+import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance
+import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor
+import org.openecomp.ncomp.cdap.CdapKeyPair
+import org.openecomp.ncomp.cdap.CdapEntityWithPreferences
+import org.openecomp.ncomp.core.NamedEntity
+
+annotation "http://openecomp.org" as ecomp
+annotation "http://openecomp.org/cdap" as cdap
+
+class CdapService extends DcaeService {
+ contains CdapServiceInstance[] instances opposite service
+ op void updateInstanceConfiguration(String instanceName)
+}
+
+class CdapServiceInstance extends DcaeServiceInstance {
+ String cdapName
+ String namespace
+ String appJar //
+ String appConfigFile
+ contains CdapArtifact[] artifacts
+ contains CdapApplication[] apps
+ String[] appNames
+ String[] workerNames
+ String[] flowNames
+ String[] serviceNames
+ @ecomp(^type="configuration")
+ contains CdapServiceInstanceConfiguration configuration
+ @ecomp(^type="operational")
+ contains CdapInternalApplicationConfiguration cdapConfiguration
+ @ecomp(^type="operational")
+ refers CdapClusterServiceInstance clusterService
+ @ecomp(^type="operational")
+ refers CdapNamespace cdapNamespace
+ @ecomp(^type="operational")
+ refers CdapService service opposite instances
+}
+
+class CdapApplication extends NamedEntity {
+ String jarFile
+ String artifactName
+ String version
+ String appConfigFileContent
+
+}
+
+class CdapArtifact extends NamedEntity {
+ String jarFile
+ String version
+
+}
+
+class CdapServiceInstanceConfiguration {
+
+}
+
+class CdapInternalApplicationConfiguration {
+ contains unordered CdapKeyPair[] config
+ contains unordered CdapKeyPair[] preferences
+ contains unordered CdapEntityWithPreferences[] apps
+ contains unordered CdapEntityWithPreferences[] workers
+ contains unordered CdapEntityWithPreferences[] flows
+ contains unordered CdapEntityWithPreferences[] services
+}
+
+class CdapServiceDescriptor extends DcaeServiceDescriptor {
+ String servicePackage
+ String serviceClass
+ String serviceInstanceClass
+ String jarFile
+}
+
diff --git a/dcae-controller-service-cdap/pom.xml b/dcae-controller-service-cdap/pom.xml new file mode 100644 index 0000000..05eb2ea --- /dev/null +++ b/dcae-controller-service-cdap/pom.xml @@ -0,0 +1,85 @@ +<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</artifactId> + <version>0.1.0-SNAPSHOT</version> + <packaging>pom</packaging> + <name>dcae-controller-service-cdap</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-adaptor</module> + <module>dcae-controller-service-cdap-cluster</module> + + + <module>dcae-controller-service-cdap-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> |