diff options
Diffstat (limited to 'dcae-controller-service-vm')
194 files changed, 29866 insertions, 0 deletions
diff --git a/dcae-controller-service-vm/.gitignore b/dcae-controller-service-vm/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service-vm/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service-vm/LICENSE.txt b/dcae-controller-service-vm/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-vm/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-vm/dcae-controller-service-common-vm/.gitignore b/dcae-controller-service-vm/dcae-controller-service-common-vm/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/LICENSE.txt b/dcae-controller-service-vm/dcae-controller-service-common-vm/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.classpath b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.classpath new file mode 100644 index 0000000..d2d34b3 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.gitignore b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.project b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.project new file mode 100644 index 0000000..ed102cd --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.project @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>dcae-controller-service-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.core.resources.prefs b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.jdt.groovy.core.prefs b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/LICENSE.txt b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/META-INF/MANIFEST.MF b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/META-INF/MANIFEST.MF new file mode 100644 index 0000000..95af390 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/META-INF/MANIFEST.MF @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: dcae-controller-service-common-vm-manager +Bundle-SymbolicName: dcae-controller-service-common-vm-manager +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.dcae.controller.service.common.vm.manager.tools, + org.openecomp.dcae.controller.service.common.vm.servers.manager +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + dcae-controller-service-common-vm-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0" diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/build.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/build.properties new file mode 100644 index 0000000..80bc250 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/build.properties @@ -0,0 +1,6 @@ +source.. = src/main/java/,\ + src/main/resources/,\ + src/test/java/,\ + src/test/resources/ +bin.includes = META-INF/,\ + . diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/console.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/console.properties new file mode 100644 index 0000000..3a2eb59 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/console.properties @@ -0,0 +1,3 @@ +localhost.endpoint=http://localhost:9801 +localhost.user=console +localhost.password=ZDJmYjUwZTgxZGIyNDBm diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/gui.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/gui.properties new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/gui.properties diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/manager.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/manager.properties new file mode 100644 index 0000000..bb590b3 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/manager.properties @@ -0,0 +1,7 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = 9802 +server.user.console = ZDJmYjUwZTgxZGIyNDBm +server.user.gui = ZmJiMWUxYjFiN2NjODE0 +server.user.client = ZTVmNjA2OTA1YTU0ZGZk diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/managers.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/managers.properties new file mode 100644 index 0000000..d006fc0 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/config/managers.properties @@ -0,0 +1,3 @@ +org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance.endpoint=http://IP:PORT +org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance.user=console +org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance.password=ZDJmYjUwZTgxZGIyNDBm
\ No newline at end of file diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/pom.xml b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/pom.xml new file mode 100644 index 0000000..361753b --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/pom.xml @@ -0,0 +1,193 @@ +<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-common-vm-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-common-vm-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> + </dependencies> +</project> diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/assembly/assemble_zip.xml b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..a6503d1 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/Generator.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/Generator.java new file mode 100644 index 0000000..770d847 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/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.common.vm.manager.tools;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.openecomp.dcae.controller.service.vm.VmFactory;
+import org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel;
+import org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelFactory;
+import org.openecomp.ncomp.sirius.manager.generator.ControllerGenerator;
+import org.openecomp.ncomp.gwt.siriusportal.model.*;
+import org.openecomp.ncomp.sirius.manager.server.ServerPackage;
+import org.openecomp.dcae.controller.service.vmmanager.VmmanagerFactory;
+import org.openecomp.dcae.controller.service.common.vm.service.ServiceFactory;
+import org.openecomp.dcae.controller.service.common.vm.manager.ManagerFactory;
+import org.openecomp.utils.YamlToJava;
+
+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.createCommonVmManager();
+ 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("ControllerServiceCommonVmManager");
+ m.setTitle("ControllerServiceCommonVmManager");
+ ControllerGenerator g = new ControllerGenerator(o, m);
+ g.setEnableIRequestHandler(false);
+ g.setEnableISiriusPlugin(false);
+ 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-common-vm-manager");
+ String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging";
+// YamlToJava.convert("src/main/resources/DcaeServiceDockerHost.yaml", dir + "/logging", pName);
+ YamlToJava.convert("src/main/sirius-gen/CommonVmManager.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.createCommonVmService();
+ 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("ControllerServiceCommonVmService");
+ m.setTitle("ControllerServiceCommonVmService");
+ ControllerGenerator g = new ControllerGenerator(o, m);
+ g.setEnableIRequestHandler(false);
+ g.setEnableISiriusPlugin(true);
+ g.addFactory(ServiceFactory.eINSTANCE);
+ 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/DcaeServiceDockerHost.yaml", dir + "/logging", pName);
+ YamlToJava.convert("src/main/sirius-gen/CommonVmService.yaml", dir + "/logging", pName);
+ }
+
+}
diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestManager.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestManager.java new file mode 100644 index 0000000..af58900 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestManager.java @@ -0,0 +1,70 @@ + +/*- + * ============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.common.vm.manager.tools; + +import java.io.IOException; + +import org.json.JSONObject; + +import org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager; +import org.openecomp.dcae.controller.service.common.vm.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.common.vm.servers.manager.DcaeManagerFactory; +import org.openecomp.dcae.controller.service.common.vm.servers.service.DcaeServiceFactory; +import org.openecomp.dcae.controller.service.common.vm.service.ServiceFactory; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; + +// Testing manager from inside standard Java Process +// Manager process and Test Process in the same Java JVM in the same thread +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, null, null, "manager.properties"); +// ManagerFactory f1 = new DcaeManagerFactory(this); +// server.addFactory(f1); +// CommonVmManager m = f1.createCommonVmManager(); +// server.setObject(m); +// server.start(); +// // Start interacting with the manager. +// ServiceFactory f2 = new DcaeServiceFactory(this); +// JSONObject j = ManagementServer.ecore2json(m, 100, null, true); +// System.err.println(j.toString(2)); +// x.setContrailIp("1.2.3.5"); +// j = ManagementServer.ecore2json(m, 100, null, true); +// System.err.println(j.toString(2)); +// m.restart(); +// m.hello_manager("hi"); + } + + @Override + public ManagementServer getServer() { + return server; + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestManagerServer.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestManagerServer.java new file mode 100644 index 0000000..d94cf3d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestManagerServer.java @@ -0,0 +1,90 @@ + +/*- + * ============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.common.vm.manager.tools; + +import java.io.File; +import java.io.IOException; +import java.util.TimeZone; + +import org.json.JSONObject; + +import org.openecomp.dcae.controller.service.common.vm.servers.manager.DcaeCommonVmManagerConsole; +import org.openecomp.dcae.controller.service.common.vm.servers.manager.DcaeCommonVmManagerServer; +import org.openecomp.dcae.controller.service.common.vm.servers.service.DcaeServiceFactory; +import org.openecomp.dcae.controller.service.common.vm.service.ServiceFactory; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.webservice.utils.FileUtils; + +// Testing manager from inside standard Java Process +// Manager process and Test Process in the same Java JVM in the different threads +// Manager thread is starting HTTP server end point. +// Testing thread (or other external clients) can use the manager. +public class TestManagerServer implements ISiriusServer { + + public static void main(String[] args) throws IOException { + TestManagerServer t = new TestManagerServer(); + t.test(); + } + + private ManagementServer server; + + public void test() throws IOException { + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + File dir = new File("data"); + if (dir.exists()) + FileUtils.deleteDirectory(dir); + final DcaeCommonVmManagerServer s = new DcaeCommonVmManagerServer("manager.properties"); + Thread t = new Thread("CommonVm host server") { + @Override + public void run() { + try { + s.runWebserver(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + }; + t.start(); + DcaeCommonVmManagerConsole c = + new DcaeCommonVmManagerConsole("console.properties", "localhost"); + // ManagerFactory f1 = new DcaeManagerFactory(this); + ServiceFactory f2 = new DcaeServiceFactory(this); +// ContrailController x = f2.createContrailController(); +// x.setContrailIp("1.2.3.4"); +// c.create("/localControllers/local1", x); +// JSONObject j = (JSONObject) c.list("/", 100); +// System.err.println(j.toString(2)); +// x.setContrailIp("1.2.3.5"); +// c.update("/localControllers/local1", x); +// j = (JSONObject) c.list("/", 100); +// System.err.println(j.toString(2)); +// c.restart(); +// c.hello_manager("hi"); + } + + public ManagementServer getServer() { + return server; + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestServiceToManager.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestServiceToManager.java new file mode 100644 index 0000000..24eb31a --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/TestServiceToManager.java @@ -0,0 +1,58 @@ + +/*- + * ============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.common.vm.manager.tools; + +import org.openecomp.dcae.controller.service.common.vm.servers.service.DcaeServiceFactory; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmService; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance; +import org.openecomp.dcae.controller.service.common.vm.service.ServiceFactory; +import org.openecomp.dcae.controller.service.common.vm.service.TommyVmService; +import org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.PhysicalMachine; +import org.openecomp.dcae.controller.service.vm.VmFactory; + +// Testing service from inside standard Java Process +// This connects to a manager server +public class TestServiceToManager { + + public static void main(String[] args) { + ServiceFactory f = new DcaeServiceFactory(null); + CommonVmService s = f.createCommonVmService(); + CommonVmServiceInstance i = f.createCommonVmServiceInstance(); + s.getInstances().add(i); + i.setName("myInstance"); + PhysicalMachine p = VmFactory.eINSTANCE.createPhysicalMachine(); + i.getServers().add(p); + // Setup connection parameters. + p.setPublicIp("localhost"); + p.setManagerPortNumber(9802); + s.pollManagerConfiguration(i.getName()); + TommyVmServiceConfiguration c = ServiceFactory.eINSTANCE.createTommyVmServiceConfiguration(); + c.setPortgresJdbc("dafdf"); + // TODO more examples + i.setVmConfiguration(c); + i.setScript("/home/vagrant/log.sh"); + s.pushManagerConfiguration(i.getName()); + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerProvider.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerProvider.java new file mode 100644 index 0000000..66aca85 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerProvider.java @@ -0,0 +1,119 @@ + +/*- + * ============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.common.vm.servers.manager; + +import java.io.File; +import java.io.OutputStreamWriter; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ManagementServerUtils; + +import org.apache.log4j.Logger; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.ncomp.utils.ShellCmd; +import org.openecomp.ncomp.webservice.utils.FileUtils; +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.servers.vmmanager.DcaeVirtualMachineManagerProvider; +import org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager; + +public class DcaeCommonVmManagerProvider extends DcaeVirtualMachineManagerProvider { + private static final Logger logger = Logger.getLogger(DcaeCommonVmManagerProvider.class); + CommonVmManager o; + + public DcaeCommonVmManagerProvider(ISiriusServer controller, CommonVmManager o) { + super(controller, o); + this.o = o; + } + + @Override + public void configurationChanged() { + super.configurationChanged(); + try { + Date now = new Date(); + controller.getServer(); + JSONObject json = ManagementServer.ecore2json(o, 1000, null, true); + String filename = "/tmp/" + now.getTime() + "json"; + OutputStreamWriter w = FileUtils.filename2writer(filename); + w.append(json.toString(2)); + w.close(); + File f = new File(filename); + f.setReadable(true); + run(o.getScript() + " configurationChanged " + filename, o.getConfigureTimeout()); + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("configurationChanged" + e); + throw new RuntimeException(e); + } + } + + @Override + public HealthTestResponse test() { + String s = run(o.getScript() + " test", o.getTestTimeout()); + String a[] = s.split(":"); + int index = s.indexOf(":"); + String msg = index < 0 ? null : s.substring(index).trim(); + String status = a[0].trim(); + HealthTestResponse res = ServiceFactory.eINSTANCE.createHealthTestResponse(); + if ("GREEN".equalsIgnoreCase(status)) { + res.setStatus(HealthTestStatus.GREEN); + res.setMessageCode(msg); + } else if ("YELLOW".equalsIgnoreCase(status)) { + res.setStatus(HealthTestStatus.YELLOW); + res.setMessageCode(msg); + } else if ("RED".equalsIgnoreCase(status)) { + res.setStatus(HealthTestStatus.RED); + res.setMessageCode(msg); + } else { + res.setStatus(HealthTestStatus.RED); + res.setMessageCode("Bad return string: " + s); + } + return res; + } + + @Override + public void suspend() { + run(o.getScript() + " suspend", o.getSuspendTimeout()); + } + + @Override + public void resume() { + run(o.getScript() + " resume", o.getResumeTimeout()); + } + + private String run(String cmd, long wait) { + try { + ShellCmd worker = new ShellCmd(cmd); + return worker.result(wait); + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.warn("Unable to run cmd: " + cmd + " " + e); + throw new RuntimeException("Unable to run cmd: " + cmd + " " + e,e); + } + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiProvider.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiProvider.java new file mode 100644 index 0000000..b762ebf --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/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.common.vm.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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceProvider.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceProvider.java new file mode 100644 index 0000000..3d02bfd --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceProvider.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.common.vm.servers.service; + + + + + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; + +import org.openecomp.dcae.controller.service.servers.vm.DcaeVirtualMachineServiceProvider; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; +import org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager; +import org.openecomp.dcae.controller.service.common.vm.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmService; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance; +import org.openecomp.dcae.controller.service.common.vm.service.ServiceFactory; + + +public class DcaeCommonVmServiceProvider extends DcaeVirtualMachineServiceProvider { + private static final Logger logger = Logger.getLogger(DcaeCommonVmServiceProvider.class); + CommonVmService o; + + public DcaeCommonVmServiceProvider(ISiriusServer controller, CommonVmService o) { + super(controller, o); + this.o = o; + } + + @Override + protected EObject convertToManagerConfiguration(VirtualMachineServiceInstance i) { + CommonVmServiceInstance i1 = (CommonVmServiceInstance) i; + CommonVmServiceInstance c = ServiceFactory.eINSTANCE.createCommonVmServiceInstance(); + c.setScript(i1.getScript()); + c.setVmConfiguration(EcoreUtil.copy(i1.getVmConfiguration())); + return c; + } + + @Override + public EObject managerConfiguration(String instanceName) { + CommonVmServiceInstance i1 = (CommonVmServiceInstance) findInstance(instanceName); + CommonVmManager c = ManagerFactory.eINSTANCE.createCommonVmManager(); + c.setScript(i1.getScript()); + c.setConfigureTimeout(i1.getConfigureTimeout()); + c.setTestTimeout(i1.getTestTimeout()); + c.setSuspendTimeout(i1.getSuspendTimeout()); + c.setResumeTimeout(i1.getResumeTimeout()); + c.setVmConfiguration(EcoreUtil.copy(i1.getVmConfiguration())); + ManagementServer.decryptPasswords(c.getVmConfiguration()); + return c; + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server-gen/bin/controller-service-common-vm-manager-controller b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server-gen/bin/controller-service-common-vm-manager-controller new file mode 100644 index 0000000..16efe22 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server-gen/bin/controller-service-common-vm-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-common-vm-manager-controller +CLASS=org.openecomp.dcae.controller.service.common.vm.servers.manager.DcaeCommonVmManagerServer + +############################## 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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/bin/manager.sh b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/bin/manager.sh new file mode 100644 index 0000000..1d2f31a --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/bin/manager.sh @@ -0,0 +1,55 @@ +#!/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/$(echo $(basename $(pwd)) | sed s/dcae-//)-controller + + +mkdir -p logs/ +echo $(date) bin/manager.sh "$@" >> logs/manager.sh.log + +CMD1=$1 +VMTYPE=$(ls /tmp/vm-*manager.properties | sed s/-manager.properties// | sed sx/tmp/xx) + +case $CMD1 in + start) + for jar in /opt/app/{ncomp,dcae}-*-model/lib/*jar; do cp -p $jar lib/; done + 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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/console.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/console.properties new file mode 100644 index 0000000..4b63607 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/gui.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/gui.properties new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/gui.properties diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/log4j.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/log4j.properties new file mode 100644 index 0000000..8b3b8f9 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/makefile b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/makefile new file mode 100644 index 0000000..e272181 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/makefile @@ -0,0 +1,9 @@ + +restart: stop start + +start: + M2_HOME=$(HOME)/.m2 bin/BBBB-controller start +stop: + bin/BBBB-controller stop +console: + bin/BBBB-controller console diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/manager.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/manager.properties new file mode 100644 index 0000000..4605389 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/pw.sh.sh b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/config/pw.sh.sh new file mode 100644 index 0000000..cd022ae --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/scripts/console.groovy b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/server/scripts/console.groovy new file mode 100644 index 0000000..f215de5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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.common.vm.servers.manager.DcaeCommonVmManagerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +manager = new DcaeCommonVmManagerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmManager.yaml b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmManager.yaml new file mode 100644 index 0000000..63cb773 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmManager.yaml @@ -0,0 +1,179 @@ +operations: + test: {} + suspend: {} + resume: {} + publicKey: {} + configurationChanged: {} + updateStreams: {} + logs: {} + metrics: {} + properties: {} + uploadInfo: {} + getValues: {} + getValuesAll: {} + getMessages: {} + getRequestLogger: {} + evaluate: {} + update: {} + 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 +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 + 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 diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmService.yaml b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmService.yaml new file mode 100644 index 0000000..6ac8c34 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmService.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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/GuiClientApi.yaml b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/GuiClientApi.yaml new file mode 100644 index 0000000..bf3d69d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManager.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManager.java new file mode 100644 index 0000000..dabe74e --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManager.java @@ -0,0 +1,529 @@ + +/*- + * ============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.common.vm.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.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.common.vm.servers.manager.logging.CommonVmManagerOperationEnum; +import org.openecomp.dcae.controller.service.common.vm.servers.manager.logging.CommonVmManagerMessageEnum; + + + + + + + +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.common.vm.manager.impl.CommonVmManagerImpl; + + + +public class DcaeCommonVmManager extends CommonVmManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeCommonVmManager.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeCommonVmManagerProvider controller; + ISiriusServer server; + + public DcaeCommonVmManager(ISiriusServer server) { + this.server = server; + this.controller = new DcaeCommonVmManagerProvider(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(CommonVmManagerOperationEnum.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(CommonVmManagerMessageEnum.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(CommonVmManagerOperationEnum.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(CommonVmManagerMessageEnum.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(CommonVmManagerOperationEnum.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(CommonVmManagerMessageEnum.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(CommonVmManagerOperationEnum.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(CommonVmManagerMessageEnum.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(CommonVmManagerOperationEnum.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(CommonVmManagerMessageEnum.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(CommonVmManagerOperationEnum.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(CommonVmManagerMessageEnum.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 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(CommonVmManagerOperationEnum.logs); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CommonVmManagerMessageEnum.logs, e.toString()); + 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(CommonVmManagerOperationEnum.metrics); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CommonVmManagerMessageEnum.metrics, e.toString()); + 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(CommonVmManagerOperationEnum.properties); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CommonVmManagerMessageEnum.properties, e.toString()); + 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(CommonVmManagerOperationEnum.uploadInfo); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CommonVmManagerMessageEnum.uploadInfo, e.toString()); + 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(CommonVmManagerOperationEnum.getValues); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CommonVmManagerMessageEnum.getValues, e.toString()); + 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(CommonVmManagerOperationEnum.getValuesAll); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CommonVmManagerMessageEnum.getValuesAll, e.toString()); + 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(CommonVmManagerOperationEnum.getMessages); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CommonVmManagerMessageEnum.getMessages, e.toString()); + 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(CommonVmManagerOperationEnum.getRequestLogger); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CommonVmManagerMessageEnum.getRequestLogger, e.toString()); + 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(CommonVmManagerOperationEnum.evaluate); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CommonVmManagerMessageEnum.evaluate, e.toString()); + 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(CommonVmManagerOperationEnum.update); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CommonVmManagerMessageEnum.update, e.toString()); + 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 static void ecoreSetup() { + DcaeCommonVmManagerProvider.ecoreSetup(); + } + public DcaeCommonVmManagerProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerClient.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerClient.java new file mode 100644 index 0000000..57a8525 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerClient.java @@ -0,0 +1,344 @@ + +/*- + * ============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.common.vm.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.common.vm.manager.impl.CommonVmManagerImpl; +import org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.common.vm.servers.manager.logging.CommonVmManagerOperationEnum; +import org.openecomp.dcae.controller.service.common.vm.servers.manager.logging.CommonVmManagerMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeCommonVmManagerClient extends CommonVmManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeCommonVmManagerClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeCommonVmManagerClient(String file, String name) { + DcaeCommonVmManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeCommonVmManagerClient(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 DcaeCommonVmManagerClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.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(CommonVmManagerMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@test: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend() { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@suspend: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume() { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@resume: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public java.lang.String publicKey() { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_publicKey); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "publicKey", null); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_publicKey, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@publicKey: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void configurationChanged() { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_configurationChanged); + + try { + client.operationPath("/resources", c, "configurationChanged", null); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.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 = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_updateStreams); + + try { + client.operationPath("/resources", c, "updateStreams", null, inputStreams,outputStreams); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_updateStreams, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateStreams: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void logs(org.json.JSONObject cx, EList<org.openecomp.ncomp.core.logs.LogMessage> logs) { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_logs); + + try { + client.operationPath("/resources", c, "logs", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,logs); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_logs, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@logs: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void metrics(org.json.JSONObject cx, EList<org.openecomp.ncomp.core.metrics.Metric> metrics) { + EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_metrics); + + try { + client.operationPath("/resources", c, "metrics", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,metrics); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_metrics, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@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.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_properties); + + try { + client.operationPath("/resources", c, "properties", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,l); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_properties, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@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.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_uploadInfo); + + try { + client.operationPath("/resources", c, "uploadInfo", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,info); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_uploadInfo, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@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.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.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(CommonVmManagerMessageEnum.REMOTE_getValues, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@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.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.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(CommonVmManagerMessageEnum.REMOTE_getValuesAll, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@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.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.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(CommonVmManagerMessageEnum.REMOTE_getMessages, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@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.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.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(CommonVmManagerMessageEnum.REMOTE_getRequestLogger, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@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.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.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(CommonVmManagerMessageEnum.REMOTE_evaluate, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@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.getCommonVmManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_update); + + try { + client.operationPath("/resources", c, "update", null, path,function); + } + catch (Exception e) { + ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_update, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@update: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerConsole.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerConsole.java new file mode 100644 index 0000000..8f94bc4 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerConsole.java @@ -0,0 +1,237 @@ + +/*- + * ============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.common.vm.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.common.vm.servers.manager.gui.DcaeGuiClientApiConsole; + + +public class DcaeCommonVmManagerConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeCommonVmManagerConsole.class); + protected DcaeCommonVmManagerClient controller; + + + DcaeGuiClientApiConsole gui; + + + public DcaeCommonVmManagerConsole(String filename, String name) { + super(filename, name); + controller = new DcaeCommonVmManagerClient(filename,name); + client = controller.client; + + gui = new DcaeGuiClientApiConsole(filename,name); + } + + public DcaeCommonVmManagerConsole(AbstractClient c) { + controller = new DcaeCommonVmManagerClient(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)); + } + + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerProviderTemplate.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerProviderTemplate.java new file mode 100644 index 0000000..e7bfd3a --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerProviderTemplate.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.common.vm.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.common.vm.manager.impl.CommonVmManagerImpl; +import org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager; + + +public class DcaeCommonVmManagerProviderTemplate extends DcaeVirtualMachineManagerProvider { + private static final Logger logger = Logger.getLogger(DcaeCommonVmManagerProviderTemplate.class); + CommonVmManager o; + + public DcaeCommonVmManagerProviderTemplate(ISiriusServer controller, CommonVmManager o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerServer.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerServer.java new file mode 100644 index 0000000..639b301 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerServer.java @@ -0,0 +1,112 @@ + +/*- + * ============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.common.vm.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.common.vm.manager.CommonVmManager; + + +import org.openecomp.dcae.controller.service.common.vm.servers.manager.gui.DcaeModelFactory; + + + + + +public class DcaeCommonVmManagerServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeCommonVmManagerServer.class); + String serverPath; + ManagementServer server; + DcaeCommonVmManager controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeManagerFactory f = new DcaeManagerFactory(this); + + + String guiPath; + ManagementServer guiServer; + + + public DcaeCommonVmManagerServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeCommonVmManager.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "CommonVmManager", serverPath, filename); + server.addFactory(f); + + server.addFactory(org.openecomp.dcae.controller.service.common.vm.service.ServiceFactory.eINSTANCE); + + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeCommonVmManager) 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")); + + DcaeCommonVmManagerServer s = new DcaeCommonVmManagerServer("manager.properties"); + s.runWebserver(); + } + public CommonVmManager getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeManagerFactory.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeManagerFactory.java new file mode 100644 index 0000000..5b7ccce --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/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.common.vm.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.common.vm.manager.CommonVmManager; +import org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.common.vm.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 CommonVmManager createCommonVmManager() { + return new DcaeCommonVmManager(server); + } + + + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApi.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApi.java new file mode 100644 index 0000000..d9da84b --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/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.common.vm.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.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.common.vm.servers.manager.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.dcae.controller.service.common.vm.servers.manager.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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiClient.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiClient.java new file mode 100644 index 0000000..05d15d1 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/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.common.vm.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.common.vm.servers.manager.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.dcae.controller.service.common.vm.servers.manager.gui.logging.GuiClientApiMessageEnum; + + +import org.openecomp.dcae.controller.service.common.vm.servers.manager.DcaeCommonVmManager; + + + + +@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) { + DcaeCommonVmManager.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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiConsole.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiConsole.java new file mode 100644 index 0000000..3865b07 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/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.common.vm.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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiProviderTemplate.java new file mode 100644 index 0000000..62999fa --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/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.common.vm.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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeModelFactory.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeModelFactory.java new file mode 100644 index 0000000..b027f3b --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/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.common.vm.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.common.vm.servers.manager.DcaeCommonVmManagerServer; + + + +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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApi.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApi.properties new file mode 100644 index 0000000..8705ab8 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiMessageEnum.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiMessageEnum.java new file mode 100644 index 0000000..26a6f5c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/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.common.vm.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.common.vm.servers.manager.gui.logging.GuiClientApi"); + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiOperationEnum.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiOperationEnum.java new file mode 100644 index 0000000..d42fa0c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/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.common.vm.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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManager.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManager.properties new file mode 100644 index 0000000..9eb6331 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManager.properties @@ -0,0 +1,198 @@ + +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 + +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 diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerMessageEnum.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerMessageEnum.java new file mode 100644 index 0000000..4c3dd1d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerMessageEnum.java @@ -0,0 +1,67 @@ + +/*- + * ============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.common.vm.servers.manager.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum CommonVmManagerMessageEnum implements EcompMessageEnum { + + dummy, + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + logs, + metrics, + properties, + uploadInfo, + getValues, + getValuesAll, + getMessages, + getRequestLogger, + evaluate, + update, + 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; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.common.vm.servers.manager.logging.CommonVmManager"); + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerOperationEnum.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerOperationEnum.java new file mode 100644 index 0000000..0b6ccd7 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerOperationEnum.java @@ -0,0 +1,61 @@ + +/*- + * ============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.common.vm.servers.manager.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum CommonVmManagerOperationEnum implements EcompOperationEnum { + + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + logs, + metrics, + properties, + uploadInfo, + getValues, + getValuesAll, + getMessages, + getRequestLogger, + evaluate, + update, + 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; +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmService.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmService.java new file mode 100644 index 0000000..df84442 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmService.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.common.vm.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.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.common.vm.servers.service.logging.CommonVmServiceOperationEnum; +import org.openecomp.dcae.controller.service.common.vm.servers.service.logging.CommonVmServiceMessageEnum; + + + + +import org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceImpl; + + + +public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusPlugin { + public static final Logger logger = Logger.getLogger(DcaeCommonVmService.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeCommonVmServiceProvider controller; + ISiriusServer server; + + public DcaeCommonVmService(ISiriusServer server) { + this.server = server; + this.controller = new DcaeCommonVmServiceProvider(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(CommonVmServiceOperationEnum.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(CommonVmServiceMessageEnum.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(CommonVmServiceOperationEnum.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(CommonVmServiceMessageEnum.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(CommonVmServiceOperationEnum.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(CommonVmServiceMessageEnum.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(CommonVmServiceOperationEnum.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(CommonVmServiceMessageEnum.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(CommonVmServiceOperationEnum.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(CommonVmServiceMessageEnum.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(CommonVmServiceOperationEnum.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(CommonVmServiceMessageEnum.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(CommonVmServiceOperationEnum.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(CommonVmServiceMessageEnum.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(CommonVmServiceOperationEnum.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(CommonVmServiceMessageEnum.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(CommonVmServiceOperationEnum.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(CommonVmServiceMessageEnum.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(CommonVmServiceOperationEnum.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(CommonVmServiceMessageEnum.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(CommonVmServiceOperationEnum.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(CommonVmServiceMessageEnum.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_); + + } + + 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(CommonVmServiceOperationEnum.updateDeploymentStatus); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(CommonVmServiceMessageEnum.updateDeploymentStatus, e.toString()); + 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() { + DcaeCommonVmServiceProvider.ecoreSetup(); + } + public DcaeCommonVmServiceProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceClient.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceClient.java new file mode 100644 index 0000000..19ffd2d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceClient.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.common.vm.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.common.vm.service.impl.CommonVmServiceImpl; +import org.openecomp.dcae.controller.service.common.vm.service.ServicePackage; +import org.openecomp.dcae.controller.service.common.vm.servers.service.logging.CommonVmServiceOperationEnum; +import org.openecomp.dcae.controller.service.common.vm.servers.service.logging.CommonVmServiceMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeCommonVmServiceClient extends CommonVmServiceImpl { + public static final Logger logger = Logger.getLogger(DcaeCommonVmServiceClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeCommonVmServiceClient(String file, String name) { + DcaeCommonVmService.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeCommonVmServiceClient(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 DcaeCommonVmServiceClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_deploy); + + try { + client.operationPath("/resources", c, "deploy", null, instanceName,containerPath); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.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 = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_undeploy); + + try { + client.operationPath("/resources", c, "undeploy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.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 = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.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(CommonVmServiceMessageEnum.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 = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.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 = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.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 = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_pushManagerConfiguration); + + try { + client.operationPath("/resources", c, "pushManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.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 = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_pollManagerConfiguration); + + try { + client.operationPath("/resources", c, "pollManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.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 = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.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(CommonVmServiceMessageEnum.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 = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.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(CommonVmServiceMessageEnum.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 = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_updateConfigurationFromPolicy); + + try { + client.operationPath("/resources", c, "updateConfigurationFromPolicy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_updateConfigurationFromPolicy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateConfigurationFromPolicy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void runHealthTests() { + EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_runHealthTests); + + try { + client.operationPath("/resources", c, "runHealthTests", null); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_runHealthTests, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@runHealthTests: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void updateDeploymentStatus() { + EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_updateDeploymentStatus); + + try { + client.operationPath("/resources", c, "updateDeploymentStatus", null); + } + catch (Exception e) { + ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_updateDeploymentStatus, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateDeploymentStatus: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceConsole.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceConsole.java new file mode 100644 index 0000000..50a6129 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceConsole.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.common.vm.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 DcaeCommonVmServiceConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeCommonVmServiceConsole.class); + protected DcaeCommonVmServiceClient controller; + + + + + public DcaeCommonVmServiceConsole(String filename, String name) { + super(filename, name); + controller = new DcaeCommonVmServiceClient(filename,name); + client = controller.client; + + } + + public DcaeCommonVmServiceConsole(AbstractClient c) { + controller = new DcaeCommonVmServiceClient(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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceProviderTemplate.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceProviderTemplate.java new file mode 100644 index 0000000..a49ef66 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceProviderTemplate.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.common.vm.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.common.vm.service.impl.CommonVmServiceImpl; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmService; + + +public class DcaeCommonVmServiceProviderTemplate extends DcaeVirtualMachineServiceProvider { + private static final Logger logger = Logger.getLogger(DcaeCommonVmServiceProviderTemplate.class); + CommonVmService o; + + public DcaeCommonVmServiceProviderTemplate(ISiriusServer controller, CommonVmService o) { + super(controller, o); + this.o = o; + } + + + + + + + + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceServer.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceServer.java new file mode 100644 index 0000000..67e4088 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceServer.java @@ -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============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.dcae.controller.service.common.vm.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.common.vm.service.CommonVmService; + + + + + + +public class DcaeCommonVmServiceServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeCommonVmServiceServer.class); + String serverPath; + ManagementServer server; + DcaeCommonVmService controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeServiceFactory f = new DcaeServiceFactory(this); + + + + public DcaeCommonVmServiceServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeCommonVmService.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "CommonVmService", serverPath, filename); + server.addFactory(f); + + server.addFactory(org.openecomp.dcae.controller.service.common.vm.service.ServiceFactory.eINSTANCE); + + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeCommonVmService) 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")); + + DcaeCommonVmServiceServer s = new DcaeCommonVmServiceServer("service.properties"); + s.runWebserver(); + } + public CommonVmService getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeServiceFactory.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeServiceFactory.java new file mode 100644 index 0000000..c64c8f6 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/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.common.vm.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.common.vm.service.CommonVmService; +import org.openecomp.dcae.controller.service.common.vm.service.ServicePackage; +import org.openecomp.dcae.controller.service.common.vm.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 CommonVmService createCommonVmService() { + return new DcaeCommonVmService(server); + } + + + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmService.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmService.properties new file mode 100644 index 0000000..d32cf07 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmService.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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceMessageEnum.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceMessageEnum.java new file mode 100644 index 0000000..b46423a --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceMessageEnum.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.common.vm.servers.service.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum CommonVmServiceMessageEnum 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.common.vm.servers.service.logging.CommonVmService"); + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceOperationEnum.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceOperationEnum.java new file mode 100644 index 0000000..f0f2971 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceOperationEnum.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.common.vm.servers.service.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum CommonVmServiceOperationEnum 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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.classpath b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.classpath new file mode 100644 index 0000000..69b19c6 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.gitignore b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.project b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.project new file mode 100644 index 0000000..4ec7482 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.project @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>dcae-controller-service-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/LICENSE.txt b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/META-INF/MANIFEST.MF b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..2eece10 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/META-INF/MANIFEST.MF @@ -0,0 +1,29 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: dcae-controller-service-common-vm-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.common.vm.manager, + org.openecomp.dcae.controller.service.common.vm.manager.impl, + org.openecomp.dcae.controller.service.common.vm.manager.util, + org.openecomp.dcae.controller.service.common.vm.service, + org.openecomp.dcae.controller.service.common.vm.service.impl, + org.openecomp.dcae.controller.service.common.vm.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, + dcae-controller-service-common-vm-model;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 +Bundle-ActivationPolicy: lazy diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/build.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/build.properties new file mode 100644 index 0000000..6d35b6f --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/plugin.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/plugin.properties new file mode 100644 index 0000000..04852d2 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Router Model +providerName = www.example.org diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/plugin.xml b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/plugin.xml new file mode 100644 index 0000000..03e5c2a --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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.common.vm.service" + class="org.openecomp.dcae.controller.service.common.vm.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.common.vm.manager" + class="org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage" + genModel="src/main/xcore/manager.xcore"/> + </extension> + +</plugin> diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/pom.xml b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/pom.xml new file mode 100644 index 0000000..2ee6f0c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/pom.xml @@ -0,0 +1,24 @@ +<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-common-vm-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> + </dependencies> +</project> diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/CommonVmManager.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/CommonVmManager.java new file mode 100644 index 0000000..27f9976 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/CommonVmManager.java @@ -0,0 +1,212 @@ + +/*- + * ============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.common.vm.manager; + +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Common Vm Manager</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getScript <em>Script</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getConfigureTimeout <em>Configure Timeout</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getTestTimeout <em>Test Timeout</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getSuspendTimeout <em>Suspend Timeout</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getResumeTimeout <em>Resume Timeout</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getVmConfiguration <em>Vm Configuration</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage#getCommonVmManager() + * @model + * @generated + */ +public interface CommonVmManager extends VirtualMachineManager { + /** + * Returns the value of the '<em><b>Script</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Script</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Script</em>' attribute. + * @see #setScript(String) + * @see org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage#getCommonVmManager_Script() + * @model unique="false" + * @generated + */ + String getScript(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getScript <em>Script</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Script</em>' attribute. + * @see #getScript() + * @generated + */ + void setScript(String value); + + /** + * Returns the value of the '<em><b>Configure Timeout</b></em>' attribute. + * The default value is <code>"60000"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Configure Timeout</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Configure Timeout</em>' attribute. + * @see #setConfigureTimeout(int) + * @see org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage#getCommonVmManager_ConfigureTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getConfigureTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getConfigureTimeout <em>Configure Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Configure Timeout</em>' attribute. + * @see #getConfigureTimeout() + * @generated + */ + void setConfigureTimeout(int value); + + /** + * Returns the value of the '<em><b>Test Timeout</b></em>' attribute. + * The default value is <code>"60000"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Test Timeout</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Test Timeout</em>' attribute. + * @see #setTestTimeout(int) + * @see org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage#getCommonVmManager_TestTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getTestTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getTestTimeout <em>Test Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Test Timeout</em>' attribute. + * @see #getTestTimeout() + * @generated + */ + void setTestTimeout(int value); + + /** + * Returns the value of the '<em><b>Suspend Timeout</b></em>' attribute. + * The default value is <code>"60000"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Suspend Timeout</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Suspend Timeout</em>' attribute. + * @see #setSuspendTimeout(int) + * @see org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage#getCommonVmManager_SuspendTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getSuspendTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getSuspendTimeout <em>Suspend Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Suspend Timeout</em>' attribute. + * @see #getSuspendTimeout() + * @generated + */ + void setSuspendTimeout(int value); + + /** + * Returns the value of the '<em><b>Resume Timeout</b></em>' attribute. + * The default value is <code>"60000"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Resume Timeout</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Resume Timeout</em>' attribute. + * @see #setResumeTimeout(int) + * @see org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage#getCommonVmManager_ResumeTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getResumeTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getResumeTimeout <em>Resume Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Resume Timeout</em>' attribute. + * @see #getResumeTimeout() + * @generated + */ + void setResumeTimeout(int value); + + /** + * Returns the value of the '<em><b>Vm Configuration</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Vm 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>Vm Configuration</em>' containment reference. + * @see #setVmConfiguration(CommonVmServiceConfiguration) + * @see org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage#getCommonVmManager_VmConfiguration() + * @model containment="true" + * @generated + */ + CommonVmServiceConfiguration getVmConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getVmConfiguration <em>Vm Configuration</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Vm Configuration</em>' containment reference. + * @see #getVmConfiguration() + * @generated + */ + void setVmConfiguration(CommonVmServiceConfiguration value); + +} // CommonVmManager diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/ManagerFactory.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/ManagerFactory.java new file mode 100644 index 0000000..906e656 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/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.common.vm.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.common.vm.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.common.vm.manager.impl.ManagerFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Common Vm Manager</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Common Vm Manager</em>'. + * @generated + */ + CommonVmManager createCommonVmManager(); + + /** + * 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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/ManagerPackage.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/ManagerPackage.java new file mode 100644 index 0000000..fa668c4 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/ManagerPackage.java @@ -0,0 +1,505 @@ + +/*- + * ============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.common.vm.manager; + +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; + +import org.eclipse.emf.ecore.EAttribute; +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.common.vm.manager.ManagerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-common-vm-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service.common.vm'" + * @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.common.vm.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.common.vm.manager.impl.ManagerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl <em>Common Vm Manager</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl + * @see org.openecomp.dcae.controller.service.common.vm.manager.impl.ManagerPackageImpl#getCommonVmManager() + * @generated + */ + int COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_MANAGER__COMPONENT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT; + + /** + * The feature id for the '<em><b>Script</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_MANAGER__SCRIPT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Configure Timeout</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_MANAGER__CONFIGURE_TIMEOUT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Test Timeout</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_MANAGER__TEST_TIMEOUT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Suspend Timeout</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_MANAGER__SUSPEND_TIMEOUT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Resume Timeout</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_MANAGER__RESUME_TIMEOUT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 4; + + /** + * The feature id for the '<em><b>Vm Configuration</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_MANAGER__VM_CONFIGURATION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 5; + + /** + * The number of structural features of the '<em>Common Vm Manager</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_MANAGER_FEATURE_COUNT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 6; + + /** + * The operation id for the '<em>Test</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_MANAGER___UPDATE__STRING_FUNCTION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPDATE__STRING_FUNCTION; + + /** + * The number of operations of the '<em>Common Vm Manager</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_MANAGER_OPERATION_COUNT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager <em>Common Vm Manager</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Common Vm Manager</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager + * @generated + */ + EClass getCommonVmManager(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getScript <em>Script</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Script</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getScript() + * @see #getCommonVmManager() + * @generated + */ + EAttribute getCommonVmManager_Script(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getConfigureTimeout <em>Configure Timeout</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Configure Timeout</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getConfigureTimeout() + * @see #getCommonVmManager() + * @generated + */ + EAttribute getCommonVmManager_ConfigureTimeout(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getTestTimeout <em>Test Timeout</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Test Timeout</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getTestTimeout() + * @see #getCommonVmManager() + * @generated + */ + EAttribute getCommonVmManager_TestTimeout(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getSuspendTimeout <em>Suspend Timeout</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Suspend Timeout</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getSuspendTimeout() + * @see #getCommonVmManager() + * @generated + */ + EAttribute getCommonVmManager_SuspendTimeout(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getResumeTimeout <em>Resume Timeout</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Resume Timeout</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getResumeTimeout() + * @see #getCommonVmManager() + * @generated + */ + EAttribute getCommonVmManager_ResumeTimeout(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getVmConfiguration <em>Vm Configuration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Vm Configuration</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager#getVmConfiguration() + * @see #getCommonVmManager() + * @generated + */ + EReference getCommonVmManager_VmConfiguration(); + + /** + * 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.common.vm.manager.impl.CommonVmManagerImpl <em>Common Vm Manager</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl + * @see org.openecomp.dcae.controller.service.common.vm.manager.impl.ManagerPackageImpl#getCommonVmManager() + * @generated + */ + EClass COMMON_VM_MANAGER = eINSTANCE.getCommonVmManager(); + + /** + * The meta object literal for the '<em><b>Script</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMMON_VM_MANAGER__SCRIPT = eINSTANCE.getCommonVmManager_Script(); + + /** + * The meta object literal for the '<em><b>Configure Timeout</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMMON_VM_MANAGER__CONFIGURE_TIMEOUT = eINSTANCE.getCommonVmManager_ConfigureTimeout(); + + /** + * The meta object literal for the '<em><b>Test Timeout</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMMON_VM_MANAGER__TEST_TIMEOUT = eINSTANCE.getCommonVmManager_TestTimeout(); + + /** + * The meta object literal for the '<em><b>Suspend Timeout</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMMON_VM_MANAGER__SUSPEND_TIMEOUT = eINSTANCE.getCommonVmManager_SuspendTimeout(); + + /** + * The meta object literal for the '<em><b>Resume Timeout</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMMON_VM_MANAGER__RESUME_TIMEOUT = eINSTANCE.getCommonVmManager_ResumeTimeout(); + + /** + * The meta object literal for the '<em><b>Vm Configuration</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMMON_VM_MANAGER__VM_CONFIGURATION = eINSTANCE.getCommonVmManager_VmConfiguration(); + + } + +} //ManagerPackage diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/CommonVmManagerImpl.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/CommonVmManagerImpl.java new file mode 100644 index 0000000..9f6e7c5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/CommonVmManagerImpl.java @@ -0,0 +1,473 @@ + +/*- + * ============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.common.vm.manager.impl; + +import org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager; +import org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage; + +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration; + +import org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl; + +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>Common Vm Manager</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl#getScript <em>Script</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl#getConfigureTimeout <em>Configure Timeout</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl#getTestTimeout <em>Test Timeout</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl#getSuspendTimeout <em>Suspend Timeout</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl#getResumeTimeout <em>Resume Timeout</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmManagerImpl#getVmConfiguration <em>Vm Configuration</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CommonVmManagerImpl extends VirtualMachineManagerImpl implements CommonVmManager { + /** + * The default value of the '{@link #getScript() <em>Script</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getScript() + * @generated + * @ordered + */ + protected static final String SCRIPT_EDEFAULT = null; + /** + * The cached value of the '{@link #getScript() <em>Script</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getScript() + * @generated + * @ordered + */ + protected String script = SCRIPT_EDEFAULT; + /** + * The default value of the '{@link #getConfigureTimeout() <em>Configure Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getConfigureTimeout() + * @generated + * @ordered + */ + protected static final int CONFIGURE_TIMEOUT_EDEFAULT = 60000; + /** + * The cached value of the '{@link #getConfigureTimeout() <em>Configure Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getConfigureTimeout() + * @generated + * @ordered + */ + protected int configureTimeout = CONFIGURE_TIMEOUT_EDEFAULT; + /** + * The default value of the '{@link #getTestTimeout() <em>Test Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTestTimeout() + * @generated + * @ordered + */ + protected static final int TEST_TIMEOUT_EDEFAULT = 60000; + /** + * The cached value of the '{@link #getTestTimeout() <em>Test Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTestTimeout() + * @generated + * @ordered + */ + protected int testTimeout = TEST_TIMEOUT_EDEFAULT; + /** + * The default value of the '{@link #getSuspendTimeout() <em>Suspend Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSuspendTimeout() + * @generated + * @ordered + */ + protected static final int SUSPEND_TIMEOUT_EDEFAULT = 60000; + /** + * The cached value of the '{@link #getSuspendTimeout() <em>Suspend Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSuspendTimeout() + * @generated + * @ordered + */ + protected int suspendTimeout = SUSPEND_TIMEOUT_EDEFAULT; + /** + * The default value of the '{@link #getResumeTimeout() <em>Resume Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getResumeTimeout() + * @generated + * @ordered + */ + protected static final int RESUME_TIMEOUT_EDEFAULT = 60000; + /** + * The cached value of the '{@link #getResumeTimeout() <em>Resume Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getResumeTimeout() + * @generated + * @ordered + */ + protected int resumeTimeout = RESUME_TIMEOUT_EDEFAULT; + /** + * The cached value of the '{@link #getVmConfiguration() <em>Vm Configuration</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVmConfiguration() + * @generated + * @ordered + */ + protected CommonVmServiceConfiguration vmConfiguration; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CommonVmManagerImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ManagerPackage.Literals.COMMON_VM_MANAGER; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getScript() { + return script; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setScript(String newScript) { + String oldScript = script; + script = newScript; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_VM_MANAGER__SCRIPT, oldScript, script)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getConfigureTimeout() { + return configureTimeout; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setConfigureTimeout(int newConfigureTimeout) { + int oldConfigureTimeout = configureTimeout; + configureTimeout = newConfigureTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_VM_MANAGER__CONFIGURE_TIMEOUT, oldConfigureTimeout, configureTimeout)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getTestTimeout() { + return testTimeout; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTestTimeout(int newTestTimeout) { + int oldTestTimeout = testTimeout; + testTimeout = newTestTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_VM_MANAGER__TEST_TIMEOUT, oldTestTimeout, testTimeout)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getSuspendTimeout() { + return suspendTimeout; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setSuspendTimeout(int newSuspendTimeout) { + int oldSuspendTimeout = suspendTimeout; + suspendTimeout = newSuspendTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_VM_MANAGER__SUSPEND_TIMEOUT, oldSuspendTimeout, suspendTimeout)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getResumeTimeout() { + return resumeTimeout; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setResumeTimeout(int newResumeTimeout) { + int oldResumeTimeout = resumeTimeout; + resumeTimeout = newResumeTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_VM_MANAGER__RESUME_TIMEOUT, oldResumeTimeout, resumeTimeout)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CommonVmServiceConfiguration getVmConfiguration() { + return vmConfiguration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetVmConfiguration(CommonVmServiceConfiguration newVmConfiguration, NotificationChain msgs) { + CommonVmServiceConfiguration oldVmConfiguration = vmConfiguration; + vmConfiguration = newVmConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_VM_MANAGER__VM_CONFIGURATION, oldVmConfiguration, newVmConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setVmConfiguration(CommonVmServiceConfiguration newVmConfiguration) { + if (newVmConfiguration != vmConfiguration) { + NotificationChain msgs = null; + if (vmConfiguration != null) + msgs = ((InternalEObject)vmConfiguration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ManagerPackage.COMMON_VM_MANAGER__VM_CONFIGURATION, null, msgs); + if (newVmConfiguration != null) + msgs = ((InternalEObject)newVmConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ManagerPackage.COMMON_VM_MANAGER__VM_CONFIGURATION, null, msgs); + msgs = basicSetVmConfiguration(newVmConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.COMMON_VM_MANAGER__VM_CONFIGURATION, newVmConfiguration, newVmConfiguration)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ManagerPackage.COMMON_VM_MANAGER__VM_CONFIGURATION: + return basicSetVmConfiguration(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.COMMON_VM_MANAGER__SCRIPT: + return getScript(); + case ManagerPackage.COMMON_VM_MANAGER__CONFIGURE_TIMEOUT: + return getConfigureTimeout(); + case ManagerPackage.COMMON_VM_MANAGER__TEST_TIMEOUT: + return getTestTimeout(); + case ManagerPackage.COMMON_VM_MANAGER__SUSPEND_TIMEOUT: + return getSuspendTimeout(); + case ManagerPackage.COMMON_VM_MANAGER__RESUME_TIMEOUT: + return getResumeTimeout(); + case ManagerPackage.COMMON_VM_MANAGER__VM_CONFIGURATION: + return getVmConfiguration(); + } + 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.COMMON_VM_MANAGER__SCRIPT: + setScript((String)newValue); + return; + case ManagerPackage.COMMON_VM_MANAGER__CONFIGURE_TIMEOUT: + setConfigureTimeout((Integer)newValue); + return; + case ManagerPackage.COMMON_VM_MANAGER__TEST_TIMEOUT: + setTestTimeout((Integer)newValue); + return; + case ManagerPackage.COMMON_VM_MANAGER__SUSPEND_TIMEOUT: + setSuspendTimeout((Integer)newValue); + return; + case ManagerPackage.COMMON_VM_MANAGER__RESUME_TIMEOUT: + setResumeTimeout((Integer)newValue); + return; + case ManagerPackage.COMMON_VM_MANAGER__VM_CONFIGURATION: + setVmConfiguration((CommonVmServiceConfiguration)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ManagerPackage.COMMON_VM_MANAGER__SCRIPT: + setScript(SCRIPT_EDEFAULT); + return; + case ManagerPackage.COMMON_VM_MANAGER__CONFIGURE_TIMEOUT: + setConfigureTimeout(CONFIGURE_TIMEOUT_EDEFAULT); + return; + case ManagerPackage.COMMON_VM_MANAGER__TEST_TIMEOUT: + setTestTimeout(TEST_TIMEOUT_EDEFAULT); + return; + case ManagerPackage.COMMON_VM_MANAGER__SUSPEND_TIMEOUT: + setSuspendTimeout(SUSPEND_TIMEOUT_EDEFAULT); + return; + case ManagerPackage.COMMON_VM_MANAGER__RESUME_TIMEOUT: + setResumeTimeout(RESUME_TIMEOUT_EDEFAULT); + return; + case ManagerPackage.COMMON_VM_MANAGER__VM_CONFIGURATION: + setVmConfiguration((CommonVmServiceConfiguration)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ManagerPackage.COMMON_VM_MANAGER__SCRIPT: + return SCRIPT_EDEFAULT == null ? script != null : !SCRIPT_EDEFAULT.equals(script); + case ManagerPackage.COMMON_VM_MANAGER__CONFIGURE_TIMEOUT: + return configureTimeout != CONFIGURE_TIMEOUT_EDEFAULT; + case ManagerPackage.COMMON_VM_MANAGER__TEST_TIMEOUT: + return testTimeout != TEST_TIMEOUT_EDEFAULT; + case ManagerPackage.COMMON_VM_MANAGER__SUSPEND_TIMEOUT: + return suspendTimeout != SUSPEND_TIMEOUT_EDEFAULT; + case ManagerPackage.COMMON_VM_MANAGER__RESUME_TIMEOUT: + return resumeTimeout != RESUME_TIMEOUT_EDEFAULT; + case ManagerPackage.COMMON_VM_MANAGER__VM_CONFIGURATION: + return vmConfiguration != 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(" (script: "); + result.append(script); + result.append(", configureTimeout: "); + result.append(configureTimeout); + result.append(", testTimeout: "); + result.append(testTimeout); + result.append(", suspendTimeout: "); + result.append(suspendTimeout); + result.append(", resumeTimeout: "); + result.append(resumeTimeout); + result.append(')'); + return result.toString(); + } + +} //CommonVmManagerImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/ManagerFactoryImpl.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/ManagerFactoryImpl.java new file mode 100644 index 0000000..b4326a0 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/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.common.vm.manager.impl; + +import org.openecomp.dcae.controller.service.common.vm.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.COMMON_VM_MANAGER: return createCommonVmManager(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CommonVmManager createCommonVmManager() { + CommonVmManagerImpl commonVmManager = new CommonVmManagerImpl(); + return commonVmManager; + } + + /** + * <!-- 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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/ManagerPackageImpl.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/ManagerPackageImpl.java new file mode 100644 index 0000000..64be77d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/impl/ManagerPackageImpl.java @@ -0,0 +1,265 @@ + +/*- + * ============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.common.vm.manager.impl; + +import org.openecomp.dcae.controller.service.common.vm.manager.CommonVmManager; +import org.openecomp.dcae.controller.service.common.vm.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.common.vm.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.common.vm.service.ServicePackage; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +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 ManagerPackageImpl extends EPackageImpl implements ManagerPackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass commonVmManagerEClass = 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.common.vm.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 getCommonVmManager() { + return commonVmManagerEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCommonVmManager_Script() { + return (EAttribute)commonVmManagerEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCommonVmManager_ConfigureTimeout() { + return (EAttribute)commonVmManagerEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCommonVmManager_TestTimeout() { + return (EAttribute)commonVmManagerEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCommonVmManager_SuspendTimeout() { + return (EAttribute)commonVmManagerEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCommonVmManager_ResumeTimeout() { + return (EAttribute)commonVmManagerEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCommonVmManager_VmConfiguration() { + return (EReference)commonVmManagerEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- 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 + commonVmManagerEClass = createEClass(COMMON_VM_MANAGER); + createEAttribute(commonVmManagerEClass, COMMON_VM_MANAGER__SCRIPT); + createEAttribute(commonVmManagerEClass, COMMON_VM_MANAGER__CONFIGURE_TIMEOUT); + createEAttribute(commonVmManagerEClass, COMMON_VM_MANAGER__TEST_TIMEOUT); + createEAttribute(commonVmManagerEClass, COMMON_VM_MANAGER__SUSPEND_TIMEOUT); + createEAttribute(commonVmManagerEClass, COMMON_VM_MANAGER__RESUME_TIMEOUT); + createEReference(commonVmManagerEClass, COMMON_VM_MANAGER__VM_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 + VmmanagerPackage theVmmanagerPackage = (VmmanagerPackage)EPackage.Registry.INSTANCE.getEPackage(VmmanagerPackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + ServicePackage theServicePackage = (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + commonVmManagerEClass.getESuperTypes().add(theVmmanagerPackage.getVirtualMachineManager()); + + // Initialize classes, features, and operations; add parameters + initEClass(commonVmManagerEClass, CommonVmManager.class, "CommonVmManager", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCommonVmManager_Script(), theEcorePackage.getEString(), "script", null, 0, 1, CommonVmManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonVmManager_ConfigureTimeout(), theEcorePackage.getEInt(), "configureTimeout", "60000", 0, 1, CommonVmManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonVmManager_TestTimeout(), theEcorePackage.getEInt(), "testTimeout", "60000", 0, 1, CommonVmManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonVmManager_SuspendTimeout(), theEcorePackage.getEInt(), "suspendTimeout", "60000", 0, 1, CommonVmManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonVmManager_ResumeTimeout(), theEcorePackage.getEInt(), "resumeTimeout", "60000", 0, 1, CommonVmManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCommonVmManager_VmConfiguration(), theServicePackage.getCommonVmServiceConfiguration(), null, "vmConfiguration", null, 0, 1, CommonVmManager.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); + } + +} //ManagerPackageImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/util/ManagerAdapterFactory.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/util/ManagerAdapterFactory.java new file mode 100644 index 0000000..e3dff15 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/util/ManagerAdapterFactory.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.common.vm.manager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.common.vm.manager.*; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; + +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.common.vm.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 caseCommonVmManager(CommonVmManager object) { + return createCommonVmManagerAdapter(); + } + @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 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.common.vm.manager.CommonVmManager <em>Common Vm 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.common.vm.manager.CommonVmManager + * @generated + */ + public Adapter createCommonVmManagerAdapter() { + 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 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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/util/ManagerSwitch.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/util/ManagerSwitch.java new file mode 100644 index 0000000..2bd5be4 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/manager/util/ManagerSwitch.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.common.vm.manager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.common.vm.manager.*; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; + +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.common.vm.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.COMMON_VM_MANAGER: { + CommonVmManager commonVmManager = (CommonVmManager)theEObject; + T result = caseCommonVmManager(commonVmManager); + if (result == null) result = caseVirtualMachineManager(commonVmManager); + if (result == null) result = caseDcaeManager(commonVmManager); + if (result == null) result = caseAbstractManagementServer(commonVmManager); + if (result == null) result = caseSouthBoundApiWithProxy(commonVmManager); + if (result == null) result = caseSouthBoundApi(commonVmManager); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Common Vm 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>Common Vm Manager</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCommonVmManager(CommonVmManager 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>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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmService.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmService.java new file mode 100644 index 0000000..58777c1 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmService.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.common.vm.service; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Common Vm Service</b></em>'. + * <!-- end-user-doc --> + * + * + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getCommonVmService() + * @model + * @generated + */ +public interface CommonVmService extends VirtualMachineService { +} // CommonVmService diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmServiceConfiguration.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmServiceConfiguration.java new file mode 100644 index 0000000..e4b2f5e --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmServiceConfiguration.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.common.vm.service; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Common Vm Service Configuration</b></em>'. + * <!-- end-user-doc --> + * + * + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getCommonVmServiceConfiguration() + * @model + * @generated + */ +public interface CommonVmServiceConfiguration extends EObject { +} // CommonVmServiceConfiguration diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmServiceInstance.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmServiceInstance.java new file mode 100644 index 0000000..e19a8b8 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/CommonVmServiceInstance.java @@ -0,0 +1,210 @@ + +/*- + * ============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.common.vm.service; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Common Vm Service Instance</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getScript <em>Script</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getConfigureTimeout <em>Configure Timeout</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getTestTimeout <em>Test Timeout</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getSuspendTimeout <em>Suspend Timeout</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getResumeTimeout <em>Resume Timeout</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getVmConfiguration <em>Vm Configuration</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getCommonVmServiceInstance() + * @model + * @generated + */ +public interface CommonVmServiceInstance extends VirtualMachineServiceInstance { + /** + * Returns the value of the '<em><b>Script</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Script</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Script</em>' attribute. + * @see #setScript(String) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getCommonVmServiceInstance_Script() + * @model unique="false" + * @generated + */ + String getScript(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getScript <em>Script</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Script</em>' attribute. + * @see #getScript() + * @generated + */ + void setScript(String value); + + /** + * Returns the value of the '<em><b>Configure Timeout</b></em>' attribute. + * The default value is <code>"60000"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Configure Timeout</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Configure Timeout</em>' attribute. + * @see #setConfigureTimeout(int) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getCommonVmServiceInstance_ConfigureTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getConfigureTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getConfigureTimeout <em>Configure Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Configure Timeout</em>' attribute. + * @see #getConfigureTimeout() + * @generated + */ + void setConfigureTimeout(int value); + + /** + * Returns the value of the '<em><b>Test Timeout</b></em>' attribute. + * The default value is <code>"60000"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Test Timeout</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Test Timeout</em>' attribute. + * @see #setTestTimeout(int) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getCommonVmServiceInstance_TestTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getTestTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getTestTimeout <em>Test Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Test Timeout</em>' attribute. + * @see #getTestTimeout() + * @generated + */ + void setTestTimeout(int value); + + /** + * Returns the value of the '<em><b>Suspend Timeout</b></em>' attribute. + * The default value is <code>"60000"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Suspend Timeout</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Suspend Timeout</em>' attribute. + * @see #setSuspendTimeout(int) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getCommonVmServiceInstance_SuspendTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getSuspendTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getSuspendTimeout <em>Suspend Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Suspend Timeout</em>' attribute. + * @see #getSuspendTimeout() + * @generated + */ + void setSuspendTimeout(int value); + + /** + * Returns the value of the '<em><b>Resume Timeout</b></em>' attribute. + * The default value is <code>"60000"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Resume Timeout</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Resume Timeout</em>' attribute. + * @see #setResumeTimeout(int) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getCommonVmServiceInstance_ResumeTimeout() + * @model default="60000" unique="false" + * @generated + */ + int getResumeTimeout(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getResumeTimeout <em>Resume Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Resume Timeout</em>' attribute. + * @see #getResumeTimeout() + * @generated + */ + void setResumeTimeout(int value); + + /** + * Returns the value of the '<em><b>Vm Configuration</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Vm 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>Vm Configuration</em>' containment reference. + * @see #setVmConfiguration(CommonVmServiceConfiguration) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getCommonVmServiceInstance_VmConfiguration() + * @model containment="true" + * @generated + */ + CommonVmServiceConfiguration getVmConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getVmConfiguration <em>Vm Configuration</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Vm Configuration</em>' containment reference. + * @see #getVmConfiguration() + * @generated + */ + void setVmConfiguration(CommonVmServiceConfiguration value); + +} // CommonVmServiceInstance diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/ServiceFactory.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/ServiceFactory.java new file mode 100644 index 0000000..33d7669 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/ServiceFactory.java @@ -0,0 +1,90 @@ + +/*- + * ============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.common.vm.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.common.vm.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.common.vm.service.impl.ServiceFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Common Vm Service</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Common Vm Service</em>'. + * @generated + */ + CommonVmService createCommonVmService(); + + /** + * Returns a new object of class '<em>Common Vm Service Instance</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Common Vm Service Instance</em>'. + * @generated + */ + CommonVmServiceInstance createCommonVmServiceInstance(); + + /** + * Returns a new object of class '<em>Common Vm Service Configuration</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Common Vm Service Configuration</em>'. + * @generated + */ + CommonVmServiceConfiguration createCommonVmServiceConfiguration(); + + /** + * Returns a new object of class '<em>Tommy Vm Service Configuration</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Tommy Vm Service Configuration</em>'. + * @generated + */ + TommyVmServiceConfiguration createTommyVmServiceConfiguration(); + + /** + * 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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/ServicePackage.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/ServicePackage.java new file mode 100644 index 0000000..69d6117 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/ServicePackage.java @@ -0,0 +1,1003 @@ + +/*- + * ============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.common.vm.service; + +import org.openecomp.dcae.controller.service.vm.VmPackage; + +import org.eclipse.emf.ecore.EAttribute; +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.common.vm.service.ServiceFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-common-vm-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service.common.vm'" + * 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.common.vm.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.common.vm.service.impl.ServicePackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceImpl <em>Common Vm Service</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceImpl + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.ServicePackageImpl#getCommonVmService() + * @generated + */ + int COMMON_VM_SERVICE = 0; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_SERVICE__MANAGER_PORT_NUMBER = VmPackage.VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER; + + /** + * The number of structural features of the '<em>Common Vm Service</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_SERVICE___UPDATE_DEPLOYMENT_STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE___UPDATE_DEPLOYMENT_STATUS; + + /** + * The number of operations of the '<em>Common Vm Service</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_OPERATION_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl <em>Common Vm Service Instance</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.ServicePackageImpl#getCommonVmServiceInstance() + * @generated + */ + int COMMON_VM_SERVICE_INSTANCE = 1; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_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 COMMON_VM_SERVICE_INSTANCE__STEPS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS; + + /** + * The feature id for the '<em><b>Script</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__SCRIPT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Configure Timeout</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__CONFIGURE_TIMEOUT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Test Timeout</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__TEST_TIMEOUT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Suspend Timeout</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__SUSPEND_TIMEOUT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Resume Timeout</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__RESUME_TIMEOUT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 4; + + /** + * The feature id for the '<em><b>Vm Configuration</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 5; + + /** + * The number of structural features of the '<em>Common Vm Service Instance</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE_FEATURE_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 6; + + /** + * The number of operations of the '<em>Common Vm Service Instance</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_INSTANCE_OPERATION_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceConfigurationImpl <em>Common Vm Service Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.ServicePackageImpl#getCommonVmServiceConfiguration() + * @generated + */ + int COMMON_VM_SERVICE_CONFIGURATION = 2; + + /** + * The number of structural features of the '<em>Common Vm Service Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_CONFIGURATION_FEATURE_COUNT = 0; + + /** + * The number of operations of the '<em>Common Vm Service Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMMON_VM_SERVICE_CONFIGURATION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.common.vm.service.impl.TommyVmServiceConfigurationImpl <em>Tommy Vm Service Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.TommyVmServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.ServicePackageImpl#getTommyVmServiceConfiguration() + * @generated + */ + int TOMMY_VM_SERVICE_CONFIGURATION = 3; + + /** + * The feature id for the '<em><b>Postgres User Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_USER_NAME = COMMON_VM_SERVICE_CONFIGURATION_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Postgres Password</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_PASSWORD = COMMON_VM_SERVICE_CONFIGURATION_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Portgres Jdbc</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int TOMMY_VM_SERVICE_CONFIGURATION__PORTGRES_JDBC = COMMON_VM_SERVICE_CONFIGURATION_FEATURE_COUNT + 2; + + /** + * The number of structural features of the '<em>Tommy Vm Service Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int TOMMY_VM_SERVICE_CONFIGURATION_FEATURE_COUNT = COMMON_VM_SERVICE_CONFIGURATION_FEATURE_COUNT + 3; + + /** + * The number of operations of the '<em>Tommy Vm Service Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int TOMMY_VM_SERVICE_CONFIGURATION_OPERATION_COUNT = COMMON_VM_SERVICE_CONFIGURATION_OPERATION_COUNT + 0; + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmService <em>Common Vm Service</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Common Vm Service</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmService + * @generated + */ + EClass getCommonVmService(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance <em>Common Vm Service Instance</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Common Vm Service Instance</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance + * @generated + */ + EClass getCommonVmServiceInstance(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getScript <em>Script</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Script</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getScript() + * @see #getCommonVmServiceInstance() + * @generated + */ + EAttribute getCommonVmServiceInstance_Script(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getConfigureTimeout <em>Configure Timeout</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Configure Timeout</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getConfigureTimeout() + * @see #getCommonVmServiceInstance() + * @generated + */ + EAttribute getCommonVmServiceInstance_ConfigureTimeout(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getTestTimeout <em>Test Timeout</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Test Timeout</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getTestTimeout() + * @see #getCommonVmServiceInstance() + * @generated + */ + EAttribute getCommonVmServiceInstance_TestTimeout(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getSuspendTimeout <em>Suspend Timeout</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Suspend Timeout</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getSuspendTimeout() + * @see #getCommonVmServiceInstance() + * @generated + */ + EAttribute getCommonVmServiceInstance_SuspendTimeout(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getResumeTimeout <em>Resume Timeout</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Resume Timeout</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getResumeTimeout() + * @see #getCommonVmServiceInstance() + * @generated + */ + EAttribute getCommonVmServiceInstance_ResumeTimeout(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getVmConfiguration <em>Vm Configuration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Vm Configuration</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance#getVmConfiguration() + * @see #getCommonVmServiceInstance() + * @generated + */ + EReference getCommonVmServiceInstance_VmConfiguration(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration <em>Common Vm Service Configuration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Common Vm Service Configuration</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration + * @generated + */ + EClass getCommonVmServiceConfiguration(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration <em>Tommy Vm Service Configuration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Tommy Vm Service Configuration</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration + * @generated + */ + EClass getTommyVmServiceConfiguration(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPostgresUserName <em>Postgres User Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Postgres User Name</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPostgresUserName() + * @see #getTommyVmServiceConfiguration() + * @generated + */ + EAttribute getTommyVmServiceConfiguration_PostgresUserName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPostgresPassword <em>Postgres Password</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Postgres Password</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPostgresPassword() + * @see #getTommyVmServiceConfiguration() + * @generated + */ + EAttribute getTommyVmServiceConfiguration_PostgresPassword(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPortgresJdbc <em>Portgres Jdbc</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Portgres Jdbc</em>'. + * @see org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPortgresJdbc() + * @see #getTommyVmServiceConfiguration() + * @generated + */ + EAttribute getTommyVmServiceConfiguration_PortgresJdbc(); + + /** + * 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.common.vm.service.impl.CommonVmServiceImpl <em>Common Vm Service</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceImpl + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.ServicePackageImpl#getCommonVmService() + * @generated + */ + EClass COMMON_VM_SERVICE = eINSTANCE.getCommonVmService(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl <em>Common Vm Service Instance</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.ServicePackageImpl#getCommonVmServiceInstance() + * @generated + */ + EClass COMMON_VM_SERVICE_INSTANCE = eINSTANCE.getCommonVmServiceInstance(); + + /** + * The meta object literal for the '<em><b>Script</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMMON_VM_SERVICE_INSTANCE__SCRIPT = eINSTANCE.getCommonVmServiceInstance_Script(); + + /** + * The meta object literal for the '<em><b>Configure Timeout</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMMON_VM_SERVICE_INSTANCE__CONFIGURE_TIMEOUT = eINSTANCE.getCommonVmServiceInstance_ConfigureTimeout(); + + /** + * The meta object literal for the '<em><b>Test Timeout</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMMON_VM_SERVICE_INSTANCE__TEST_TIMEOUT = eINSTANCE.getCommonVmServiceInstance_TestTimeout(); + + /** + * The meta object literal for the '<em><b>Suspend Timeout</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMMON_VM_SERVICE_INSTANCE__SUSPEND_TIMEOUT = eINSTANCE.getCommonVmServiceInstance_SuspendTimeout(); + + /** + * The meta object literal for the '<em><b>Resume Timeout</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMMON_VM_SERVICE_INSTANCE__RESUME_TIMEOUT = eINSTANCE.getCommonVmServiceInstance_ResumeTimeout(); + + /** + * The meta object literal for the '<em><b>Vm Configuration</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION = eINSTANCE.getCommonVmServiceInstance_VmConfiguration(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceConfigurationImpl <em>Common Vm Service Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.ServicePackageImpl#getCommonVmServiceConfiguration() + * @generated + */ + EClass COMMON_VM_SERVICE_CONFIGURATION = eINSTANCE.getCommonVmServiceConfiguration(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.common.vm.service.impl.TommyVmServiceConfigurationImpl <em>Tommy Vm Service Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.TommyVmServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.common.vm.service.impl.ServicePackageImpl#getTommyVmServiceConfiguration() + * @generated + */ + EClass TOMMY_VM_SERVICE_CONFIGURATION = eINSTANCE.getTommyVmServiceConfiguration(); + + /** + * The meta object literal for the '<em><b>Postgres User Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_USER_NAME = eINSTANCE.getTommyVmServiceConfiguration_PostgresUserName(); + + /** + * The meta object literal for the '<em><b>Postgres Password</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_PASSWORD = eINSTANCE.getTommyVmServiceConfiguration_PostgresPassword(); + + /** + * The meta object literal for the '<em><b>Portgres Jdbc</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute TOMMY_VM_SERVICE_CONFIGURATION__PORTGRES_JDBC = eINSTANCE.getTommyVmServiceConfiguration_PortgresJdbc(); + + } + +} //ServicePackage diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/TommyVmService.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/TommyVmService.java new file mode 100644 index 0000000..65ae689 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/TommyVmService.java @@ -0,0 +1,124 @@ + +/*- + * ============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.common.vm.service; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Tommy Vm Service</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmService#getPostgresUserName <em>Postgres User Name</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmService#getPostgresPassword <em>Postgres Password</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmService#getPortgresJdbc <em>Portgres Jdbc</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getTommyVmService() + * @model + * @generated + */ +public interface TommyVmService extends CommonVmServiceConfiguration { + /** + * Returns the value of the '<em><b>Postgres User Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Postgres User 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>Postgres User Name</em>' attribute. + * @see #setPostgresUserName(String) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getTommyVmService_PostgresUserName() + * @model unique="false" + * @generated + */ + String getPostgresUserName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmService#getPostgresUserName <em>Postgres User Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Postgres User Name</em>' attribute. + * @see #getPostgresUserName() + * @generated + */ + void setPostgresUserName(String value); + + /** + * Returns the value of the '<em><b>Postgres Password</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Postgres Password</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Postgres Password</em>' attribute. + * @see #setPostgresPassword(String) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getTommyVmService_PostgresPassword() + * @model unique="false" + * @generated + */ + String getPostgresPassword(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmService#getPostgresPassword <em>Postgres Password</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Postgres Password</em>' attribute. + * @see #getPostgresPassword() + * @generated + */ + void setPostgresPassword(String value); + + /** + * Returns the value of the '<em><b>Portgres Jdbc</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Portgres Jdbc</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Portgres Jdbc</em>' attribute. + * @see #setPortgresJdbc(String) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getTommyVmService_PortgresJdbc() + * @model unique="false" + * @generated + */ + String getPortgresJdbc(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmService#getPortgresJdbc <em>Portgres Jdbc</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Portgres Jdbc</em>' attribute. + * @see #getPortgresJdbc() + * @generated + */ + void setPortgresJdbc(String value); + +} // TommyVmService diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/TommyVmServiceConfiguration.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/TommyVmServiceConfiguration.java new file mode 100644 index 0000000..de22b61 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/TommyVmServiceConfiguration.java @@ -0,0 +1,124 @@ + +/*- + * ============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.common.vm.service; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Tommy Vm Service Configuration</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPostgresUserName <em>Postgres User Name</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPostgresPassword <em>Postgres Password</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPortgresJdbc <em>Portgres Jdbc</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getTommyVmServiceConfiguration() + * @model + * @generated + */ +public interface TommyVmServiceConfiguration extends CommonVmServiceConfiguration { + /** + * Returns the value of the '<em><b>Postgres User Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Postgres User 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>Postgres User Name</em>' attribute. + * @see #setPostgresUserName(String) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getTommyVmServiceConfiguration_PostgresUserName() + * @model unique="false" + * @generated + */ + String getPostgresUserName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPostgresUserName <em>Postgres User Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Postgres User Name</em>' attribute. + * @see #getPostgresUserName() + * @generated + */ + void setPostgresUserName(String value); + + /** + * Returns the value of the '<em><b>Postgres Password</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Postgres Password</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Postgres Password</em>' attribute. + * @see #setPostgresPassword(String) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getTommyVmServiceConfiguration_PostgresPassword() + * @model unique="false" + * @generated + */ + String getPostgresPassword(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPostgresPassword <em>Postgres Password</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Postgres Password</em>' attribute. + * @see #getPostgresPassword() + * @generated + */ + void setPostgresPassword(String value); + + /** + * Returns the value of the '<em><b>Portgres Jdbc</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Portgres Jdbc</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Portgres Jdbc</em>' attribute. + * @see #setPortgresJdbc(String) + * @see org.openecomp.dcae.controller.service.common.vm.service.ServicePackage#getTommyVmServiceConfiguration_PortgresJdbc() + * @model unique="false" + * @generated + */ + String getPortgresJdbc(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration#getPortgresJdbc <em>Portgres Jdbc</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Portgres Jdbc</em>' attribute. + * @see #getPortgresJdbc() + * @generated + */ + void setPortgresJdbc(String value); + +} // TommyVmServiceConfiguration diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceConfigurationImpl.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceConfigurationImpl.java new file mode 100644 index 0000000..9995f1e --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceConfigurationImpl.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.common.vm.service.impl; + +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration; +import org.openecomp.dcae.controller.service.common.vm.service.ServicePackage; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Common Vm Service Configuration</b></em>'. + * <!-- end-user-doc --> + * <p> + * </p> + * + * @generated + */ +public class CommonVmServiceConfigurationImpl extends MinimalEObjectImpl.Container implements CommonVmServiceConfiguration { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CommonVmServiceConfigurationImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.COMMON_VM_SERVICE_CONFIGURATION; + } + +} //CommonVmServiceConfigurationImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceImpl.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceImpl.java new file mode 100644 index 0000000..0df2d08 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceImpl.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.common.vm.service.impl; + +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmService; +import org.openecomp.dcae.controller.service.common.vm.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>Common Vm Service</b></em>'. + * <!-- end-user-doc --> + * <p> + * </p> + * + * @generated + */ +public class CommonVmServiceImpl extends VirtualMachineServiceImpl implements CommonVmService { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CommonVmServiceImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.COMMON_VM_SERVICE; + } + +} //CommonVmServiceImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceInstanceImpl.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceInstanceImpl.java new file mode 100644 index 0000000..a097cbf --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/CommonVmServiceInstanceImpl.java @@ -0,0 +1,472 @@ + +/*- + * ============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.common.vm.service.impl; + +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance; +import org.openecomp.dcae.controller.service.common.vm.service.ServicePackage; + +import org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl; + +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>Common Vm Service Instance</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl#getScript <em>Script</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl#getConfigureTimeout <em>Configure Timeout</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl#getTestTimeout <em>Test Timeout</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl#getSuspendTimeout <em>Suspend Timeout</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl#getResumeTimeout <em>Resume Timeout</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServiceInstanceImpl#getVmConfiguration <em>Vm Configuration</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CommonVmServiceInstanceImpl extends VirtualMachineServiceInstanceImpl implements CommonVmServiceInstance { + /** + * The default value of the '{@link #getScript() <em>Script</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getScript() + * @generated + * @ordered + */ + protected static final String SCRIPT_EDEFAULT = null; + /** + * The cached value of the '{@link #getScript() <em>Script</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getScript() + * @generated + * @ordered + */ + protected String script = SCRIPT_EDEFAULT; + /** + * The default value of the '{@link #getConfigureTimeout() <em>Configure Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getConfigureTimeout() + * @generated + * @ordered + */ + protected static final int CONFIGURE_TIMEOUT_EDEFAULT = 60000; + /** + * The cached value of the '{@link #getConfigureTimeout() <em>Configure Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getConfigureTimeout() + * @generated + * @ordered + */ + protected int configureTimeout = CONFIGURE_TIMEOUT_EDEFAULT; + /** + * The default value of the '{@link #getTestTimeout() <em>Test Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTestTimeout() + * @generated + * @ordered + */ + protected static final int TEST_TIMEOUT_EDEFAULT = 60000; + /** + * The cached value of the '{@link #getTestTimeout() <em>Test Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTestTimeout() + * @generated + * @ordered + */ + protected int testTimeout = TEST_TIMEOUT_EDEFAULT; + /** + * The default value of the '{@link #getSuspendTimeout() <em>Suspend Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSuspendTimeout() + * @generated + * @ordered + */ + protected static final int SUSPEND_TIMEOUT_EDEFAULT = 60000; + /** + * The cached value of the '{@link #getSuspendTimeout() <em>Suspend Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSuspendTimeout() + * @generated + * @ordered + */ + protected int suspendTimeout = SUSPEND_TIMEOUT_EDEFAULT; + /** + * The default value of the '{@link #getResumeTimeout() <em>Resume Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getResumeTimeout() + * @generated + * @ordered + */ + protected static final int RESUME_TIMEOUT_EDEFAULT = 60000; + /** + * The cached value of the '{@link #getResumeTimeout() <em>Resume Timeout</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getResumeTimeout() + * @generated + * @ordered + */ + protected int resumeTimeout = RESUME_TIMEOUT_EDEFAULT; + /** + * The cached value of the '{@link #getVmConfiguration() <em>Vm Configuration</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVmConfiguration() + * @generated + * @ordered + */ + protected CommonVmServiceConfiguration vmConfiguration; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CommonVmServiceInstanceImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.COMMON_VM_SERVICE_INSTANCE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getScript() { + return script; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setScript(String newScript) { + String oldScript = script; + script = newScript; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_VM_SERVICE_INSTANCE__SCRIPT, oldScript, script)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getConfigureTimeout() { + return configureTimeout; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setConfigureTimeout(int newConfigureTimeout) { + int oldConfigureTimeout = configureTimeout; + configureTimeout = newConfigureTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_VM_SERVICE_INSTANCE__CONFIGURE_TIMEOUT, oldConfigureTimeout, configureTimeout)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getTestTimeout() { + return testTimeout; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTestTimeout(int newTestTimeout) { + int oldTestTimeout = testTimeout; + testTimeout = newTestTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_VM_SERVICE_INSTANCE__TEST_TIMEOUT, oldTestTimeout, testTimeout)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getSuspendTimeout() { + return suspendTimeout; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setSuspendTimeout(int newSuspendTimeout) { + int oldSuspendTimeout = suspendTimeout; + suspendTimeout = newSuspendTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_VM_SERVICE_INSTANCE__SUSPEND_TIMEOUT, oldSuspendTimeout, suspendTimeout)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getResumeTimeout() { + return resumeTimeout; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setResumeTimeout(int newResumeTimeout) { + int oldResumeTimeout = resumeTimeout; + resumeTimeout = newResumeTimeout; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_VM_SERVICE_INSTANCE__RESUME_TIMEOUT, oldResumeTimeout, resumeTimeout)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CommonVmServiceConfiguration getVmConfiguration() { + return vmConfiguration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetVmConfiguration(CommonVmServiceConfiguration newVmConfiguration, NotificationChain msgs) { + CommonVmServiceConfiguration oldVmConfiguration = vmConfiguration; + vmConfiguration = newVmConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION, oldVmConfiguration, newVmConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setVmConfiguration(CommonVmServiceConfiguration newVmConfiguration) { + if (newVmConfiguration != vmConfiguration) { + NotificationChain msgs = null; + if (vmConfiguration != null) + msgs = ((InternalEObject)vmConfiguration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ServicePackage.COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION, null, msgs); + if (newVmConfiguration != null) + msgs = ((InternalEObject)newVmConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ServicePackage.COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION, null, msgs); + msgs = basicSetVmConfiguration(newVmConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION, newVmConfiguration, newVmConfiguration)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION: + return basicSetVmConfiguration(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.COMMON_VM_SERVICE_INSTANCE__SCRIPT: + return getScript(); + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__CONFIGURE_TIMEOUT: + return getConfigureTimeout(); + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__TEST_TIMEOUT: + return getTestTimeout(); + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__SUSPEND_TIMEOUT: + return getSuspendTimeout(); + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__RESUME_TIMEOUT: + return getResumeTimeout(); + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION: + return getVmConfiguration(); + } + 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.COMMON_VM_SERVICE_INSTANCE__SCRIPT: + setScript((String)newValue); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__CONFIGURE_TIMEOUT: + setConfigureTimeout((Integer)newValue); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__TEST_TIMEOUT: + setTestTimeout((Integer)newValue); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__SUSPEND_TIMEOUT: + setSuspendTimeout((Integer)newValue); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__RESUME_TIMEOUT: + setResumeTimeout((Integer)newValue); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION: + setVmConfiguration((CommonVmServiceConfiguration)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__SCRIPT: + setScript(SCRIPT_EDEFAULT); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__CONFIGURE_TIMEOUT: + setConfigureTimeout(CONFIGURE_TIMEOUT_EDEFAULT); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__TEST_TIMEOUT: + setTestTimeout(TEST_TIMEOUT_EDEFAULT); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__SUSPEND_TIMEOUT: + setSuspendTimeout(SUSPEND_TIMEOUT_EDEFAULT); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__RESUME_TIMEOUT: + setResumeTimeout(RESUME_TIMEOUT_EDEFAULT); + return; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION: + setVmConfiguration((CommonVmServiceConfiguration)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__SCRIPT: + return SCRIPT_EDEFAULT == null ? script != null : !SCRIPT_EDEFAULT.equals(script); + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__CONFIGURE_TIMEOUT: + return configureTimeout != CONFIGURE_TIMEOUT_EDEFAULT; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__TEST_TIMEOUT: + return testTimeout != TEST_TIMEOUT_EDEFAULT; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__SUSPEND_TIMEOUT: + return suspendTimeout != SUSPEND_TIMEOUT_EDEFAULT; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__RESUME_TIMEOUT: + return resumeTimeout != RESUME_TIMEOUT_EDEFAULT; + case ServicePackage.COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION: + return vmConfiguration != 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(" (script: "); + result.append(script); + result.append(", configureTimeout: "); + result.append(configureTimeout); + result.append(", testTimeout: "); + result.append(testTimeout); + result.append(", suspendTimeout: "); + result.append(suspendTimeout); + result.append(", resumeTimeout: "); + result.append(resumeTimeout); + result.append(')'); + return result.toString(); + } + +} //CommonVmServiceInstanceImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/ServiceFactoryImpl.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/ServiceFactoryImpl.java new file mode 100644 index 0000000..f6e7c35 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/ServiceFactoryImpl.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.common.vm.service.impl; + +import org.openecomp.dcae.controller.service.common.vm.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.COMMON_VM_SERVICE: return createCommonVmService(); + case ServicePackage.COMMON_VM_SERVICE_INSTANCE: return createCommonVmServiceInstance(); + case ServicePackage.COMMON_VM_SERVICE_CONFIGURATION: return createCommonVmServiceConfiguration(); + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION: return createTommyVmServiceConfiguration(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CommonVmService createCommonVmService() { + CommonVmServiceImpl commonVmService = new CommonVmServiceImpl(); + return commonVmService; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CommonVmServiceInstance createCommonVmServiceInstance() { + CommonVmServiceInstanceImpl commonVmServiceInstance = new CommonVmServiceInstanceImpl(); + return commonVmServiceInstance; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CommonVmServiceConfiguration createCommonVmServiceConfiguration() { + CommonVmServiceConfigurationImpl commonVmServiceConfiguration = new CommonVmServiceConfigurationImpl(); + return commonVmServiceConfiguration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public TommyVmServiceConfiguration createTommyVmServiceConfiguration() { + TommyVmServiceConfigurationImpl tommyVmServiceConfiguration = new TommyVmServiceConfigurationImpl(); + return tommyVmServiceConfiguration; + } + + /** + * <!-- 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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/ServicePackageImpl.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/ServicePackageImpl.java new file mode 100644 index 0000000..b3eaa40 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/ServicePackageImpl.java @@ -0,0 +1,380 @@ + +/*- + * ============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.common.vm.service.impl; + +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmService; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration; +import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance; +import org.openecomp.dcae.controller.service.common.vm.service.ServiceFactory; +import org.openecomp.dcae.controller.service.common.vm.service.ServicePackage; +import org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VmPackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +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 ServicePackageImpl extends EPackageImpl implements ServicePackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass commonVmServiceEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass commonVmServiceInstanceEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass commonVmServiceConfigurationEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass tommyVmServiceConfigurationEClass = 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.common.vm.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 + 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 getCommonVmService() { + return commonVmServiceEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCommonVmServiceInstance() { + return commonVmServiceInstanceEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCommonVmServiceInstance_Script() { + return (EAttribute)commonVmServiceInstanceEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCommonVmServiceInstance_ConfigureTimeout() { + return (EAttribute)commonVmServiceInstanceEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCommonVmServiceInstance_TestTimeout() { + return (EAttribute)commonVmServiceInstanceEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCommonVmServiceInstance_SuspendTimeout() { + return (EAttribute)commonVmServiceInstanceEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCommonVmServiceInstance_ResumeTimeout() { + return (EAttribute)commonVmServiceInstanceEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCommonVmServiceInstance_VmConfiguration() { + return (EReference)commonVmServiceInstanceEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCommonVmServiceConfiguration() { + return commonVmServiceConfigurationEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getTommyVmServiceConfiguration() { + return tommyVmServiceConfigurationEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getTommyVmServiceConfiguration_PostgresUserName() { + return (EAttribute)tommyVmServiceConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getTommyVmServiceConfiguration_PostgresPassword() { + return (EAttribute)tommyVmServiceConfigurationEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getTommyVmServiceConfiguration_PortgresJdbc() { + return (EAttribute)tommyVmServiceConfigurationEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- 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 + commonVmServiceEClass = createEClass(COMMON_VM_SERVICE); + + commonVmServiceInstanceEClass = createEClass(COMMON_VM_SERVICE_INSTANCE); + createEAttribute(commonVmServiceInstanceEClass, COMMON_VM_SERVICE_INSTANCE__SCRIPT); + createEAttribute(commonVmServiceInstanceEClass, COMMON_VM_SERVICE_INSTANCE__CONFIGURE_TIMEOUT); + createEAttribute(commonVmServiceInstanceEClass, COMMON_VM_SERVICE_INSTANCE__TEST_TIMEOUT); + createEAttribute(commonVmServiceInstanceEClass, COMMON_VM_SERVICE_INSTANCE__SUSPEND_TIMEOUT); + createEAttribute(commonVmServiceInstanceEClass, COMMON_VM_SERVICE_INSTANCE__RESUME_TIMEOUT); + createEReference(commonVmServiceInstanceEClass, COMMON_VM_SERVICE_INSTANCE__VM_CONFIGURATION); + + commonVmServiceConfigurationEClass = createEClass(COMMON_VM_SERVICE_CONFIGURATION); + + tommyVmServiceConfigurationEClass = createEClass(TOMMY_VM_SERVICE_CONFIGURATION); + createEAttribute(tommyVmServiceConfigurationEClass, TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_USER_NAME); + createEAttribute(tommyVmServiceConfigurationEClass, TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_PASSWORD); + createEAttribute(tommyVmServiceConfigurationEClass, TOMMY_VM_SERVICE_CONFIGURATION__PORTGRES_JDBC); + } + + /** + * <!-- 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); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + commonVmServiceEClass.getESuperTypes().add(theVmPackage.getVirtualMachineService()); + commonVmServiceInstanceEClass.getESuperTypes().add(theVmPackage.getVirtualMachineServiceInstance()); + tommyVmServiceConfigurationEClass.getESuperTypes().add(this.getCommonVmServiceConfiguration()); + + // Initialize classes, features, and operations; add parameters + initEClass(commonVmServiceEClass, CommonVmService.class, "CommonVmService", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(commonVmServiceInstanceEClass, CommonVmServiceInstance.class, "CommonVmServiceInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCommonVmServiceInstance_Script(), theEcorePackage.getEString(), "script", null, 0, 1, CommonVmServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonVmServiceInstance_ConfigureTimeout(), theEcorePackage.getEInt(), "configureTimeout", "60000", 0, 1, CommonVmServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonVmServiceInstance_TestTimeout(), theEcorePackage.getEInt(), "testTimeout", "60000", 0, 1, CommonVmServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonVmServiceInstance_SuspendTimeout(), theEcorePackage.getEInt(), "suspendTimeout", "60000", 0, 1, CommonVmServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCommonVmServiceInstance_ResumeTimeout(), theEcorePackage.getEInt(), "resumeTimeout", "60000", 0, 1, CommonVmServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCommonVmServiceInstance_VmConfiguration(), this.getCommonVmServiceConfiguration(), null, "vmConfiguration", null, 0, 1, CommonVmServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(commonVmServiceConfigurationEClass, CommonVmServiceConfiguration.class, "CommonVmServiceConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(tommyVmServiceConfigurationEClass, TommyVmServiceConfiguration.class, "TommyVmServiceConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getTommyVmServiceConfiguration_PostgresUserName(), theEcorePackage.getEString(), "postgresUserName", null, 0, 1, TommyVmServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getTommyVmServiceConfiguration_PostgresPassword(), theEcorePackage.getEString(), "postgresPassword", null, 0, 1, TommyVmServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getTommyVmServiceConfiguration_PortgresJdbc(), theEcorePackage.getEString(), "portgresJdbc", null, 0, 1, TommyVmServiceConfiguration.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(); + } + + /** + * 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" + }); + } + +} //ServicePackageImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/TommyVmServiceConfigurationImpl.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/TommyVmServiceConfigurationImpl.java new file mode 100644 index 0000000..ff3f913 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/impl/TommyVmServiceConfigurationImpl.java @@ -0,0 +1,291 @@ + +/*- + * ============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.common.vm.service.impl; + +import org.openecomp.dcae.controller.service.common.vm.service.ServicePackage; +import org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration; + +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>Tommy Vm Service Configuration</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.impl.TommyVmServiceConfigurationImpl#getPostgresUserName <em>Postgres User Name</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.impl.TommyVmServiceConfigurationImpl#getPostgresPassword <em>Postgres Password</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.common.vm.service.impl.TommyVmServiceConfigurationImpl#getPortgresJdbc <em>Portgres Jdbc</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class TommyVmServiceConfigurationImpl extends CommonVmServiceConfigurationImpl implements TommyVmServiceConfiguration { + /** + * The default value of the '{@link #getPostgresUserName() <em>Postgres User Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPostgresUserName() + * @generated + * @ordered + */ + protected static final String POSTGRES_USER_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPostgresUserName() <em>Postgres User Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPostgresUserName() + * @generated + * @ordered + */ + protected String postgresUserName = POSTGRES_USER_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getPostgresPassword() <em>Postgres Password</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPostgresPassword() + * @generated + * @ordered + */ + protected static final String POSTGRES_PASSWORD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPostgresPassword() <em>Postgres Password</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPostgresPassword() + * @generated + * @ordered + */ + protected String postgresPassword = POSTGRES_PASSWORD_EDEFAULT; + + /** + * The default value of the '{@link #getPortgresJdbc() <em>Portgres Jdbc</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPortgresJdbc() + * @generated + * @ordered + */ + protected static final String PORTGRES_JDBC_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPortgresJdbc() <em>Portgres Jdbc</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPortgresJdbc() + * @generated + * @ordered + */ + protected String portgresJdbc = PORTGRES_JDBC_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected TommyVmServiceConfigurationImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.TOMMY_VM_SERVICE_CONFIGURATION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getPostgresUserName() { + return postgresUserName; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPostgresUserName(String newPostgresUserName) { + String oldPostgresUserName = postgresUserName; + postgresUserName = newPostgresUserName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_USER_NAME, oldPostgresUserName, postgresUserName)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getPostgresPassword() { + return postgresPassword; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPostgresPassword(String newPostgresPassword) { + String oldPostgresPassword = postgresPassword; + postgresPassword = newPostgresPassword; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_PASSWORD, oldPostgresPassword, postgresPassword)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getPortgresJdbc() { + return portgresJdbc; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPortgresJdbc(String newPortgresJdbc) { + String oldPortgresJdbc = portgresJdbc; + portgresJdbc = newPortgresJdbc; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__PORTGRES_JDBC, oldPortgresJdbc, portgresJdbc)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_USER_NAME: + return getPostgresUserName(); + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_PASSWORD: + return getPostgresPassword(); + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__PORTGRES_JDBC: + return getPortgresJdbc(); + } + 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.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_USER_NAME: + setPostgresUserName((String)newValue); + return; + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_PASSWORD: + setPostgresPassword((String)newValue); + return; + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__PORTGRES_JDBC: + setPortgresJdbc((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_USER_NAME: + setPostgresUserName(POSTGRES_USER_NAME_EDEFAULT); + return; + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_PASSWORD: + setPostgresPassword(POSTGRES_PASSWORD_EDEFAULT); + return; + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__PORTGRES_JDBC: + setPortgresJdbc(PORTGRES_JDBC_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_USER_NAME: + return POSTGRES_USER_NAME_EDEFAULT == null ? postgresUserName != null : !POSTGRES_USER_NAME_EDEFAULT.equals(postgresUserName); + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__POSTGRES_PASSWORD: + return POSTGRES_PASSWORD_EDEFAULT == null ? postgresPassword != null : !POSTGRES_PASSWORD_EDEFAULT.equals(postgresPassword); + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION__PORTGRES_JDBC: + return PORTGRES_JDBC_EDEFAULT == null ? portgresJdbc != null : !PORTGRES_JDBC_EDEFAULT.equals(portgresJdbc); + } + 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(" (postgresUserName: "); + result.append(postgresUserName); + result.append(", postgresPassword: "); + result.append(postgresPassword); + result.append(", portgresJdbc: "); + result.append(portgresJdbc); + result.append(')'); + return result.toString(); + } + +} //TommyVmServiceConfigurationImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/util/ServiceAdapterFactory.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/util/ServiceAdapterFactory.java new file mode 100644 index 0000000..2b5fae8 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/util/ServiceAdapterFactory.java @@ -0,0 +1,312 @@ + +/*- + * ============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.common.vm.service.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.common.vm.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.common.vm.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 caseCommonVmService(CommonVmService object) { + return createCommonVmServiceAdapter(); + } + @Override + public Adapter caseCommonVmServiceInstance(CommonVmServiceInstance object) { + return createCommonVmServiceInstanceAdapter(); + } + @Override + public Adapter caseCommonVmServiceConfiguration(CommonVmServiceConfiguration object) { + return createCommonVmServiceConfigurationAdapter(); + } + @Override + public Adapter caseTommyVmServiceConfiguration(TommyVmServiceConfiguration object) { + return createTommyVmServiceConfigurationAdapter(); + } + @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.common.vm.service.CommonVmService <em>Common Vm 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.common.vm.service.CommonVmService + * @generated + */ + public Adapter createCommonVmServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceInstance <em>Common Vm 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.common.vm.service.CommonVmServiceInstance + * @generated + */ + public Adapter createCommonVmServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration <em>Common Vm 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.common.vm.service.CommonVmServiceConfiguration + * @generated + */ + public Adapter createCommonVmServiceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.common.vm.service.TommyVmServiceConfiguration <em>Tommy Vm 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.common.vm.service.TommyVmServiceConfiguration + * @generated + */ + public Adapter createTommyVmServiceConfigurationAdapter() { + 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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/util/ServiceSwitch.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/util/ServiceSwitch.java new file mode 100644 index 0000000..4edc31c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/common/vm/service/util/ServiceSwitch.java @@ -0,0 +1,301 @@ + +/*- + * ============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.common.vm.service.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.common.vm.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.common.vm.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.COMMON_VM_SERVICE: { + CommonVmService commonVmService = (CommonVmService)theEObject; + T result = caseCommonVmService(commonVmService); + if (result == null) result = caseVirtualMachineService(commonVmService); + if (result == null) result = caseDcaeService(commonVmService); + if (result == null) result = caseNamedEntity(commonVmService); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.COMMON_VM_SERVICE_INSTANCE: { + CommonVmServiceInstance commonVmServiceInstance = (CommonVmServiceInstance)theEObject; + T result = caseCommonVmServiceInstance(commonVmServiceInstance); + if (result == null) result = caseVirtualMachineServiceInstance(commonVmServiceInstance); + if (result == null) result = caseDcaeServiceInstance(commonVmServiceInstance); + if (result == null) result = caseVirtualMachineServiceConfiguration(commonVmServiceInstance); + if (result == null) result = caseNamedEntity(commonVmServiceInstance); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.COMMON_VM_SERVICE_CONFIGURATION: { + CommonVmServiceConfiguration commonVmServiceConfiguration = (CommonVmServiceConfiguration)theEObject; + T result = caseCommonVmServiceConfiguration(commonVmServiceConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.TOMMY_VM_SERVICE_CONFIGURATION: { + TommyVmServiceConfiguration tommyVmServiceConfiguration = (TommyVmServiceConfiguration)theEObject; + T result = caseTommyVmServiceConfiguration(tommyVmServiceConfiguration); + if (result == null) result = caseCommonVmServiceConfiguration(tommyVmServiceConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Common Vm 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>Common Vm Service</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCommonVmService(CommonVmService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Common Vm 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>Common Vm Service Instance</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCommonVmServiceInstance(CommonVmServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Common Vm 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>Common Vm Service Configuration</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCommonVmServiceConfiguration(CommonVmServiceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Tommy Vm 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>Tommy Vm Service Configuration</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTommyVmServiceConfiguration(TommyVmServiceConfiguration 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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore/manager.xcore b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore/manager.xcore new file mode 100644 index 0000000..65a84b2 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore/manager.xcore @@ -0,0 +1,40 @@ + +/*- + * ============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-common-vm-model/src/main/xcore-gen")
+
+
+package org.openecomp.dcae.controller.service.common.vm.manager
+
+
+import org.openecomp.dcae.controller.service.common.vm.service.CommonVmServiceConfiguration
+import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager
+
+// state of manager
+class CommonVmManager extends VirtualMachineManager {
+ String script
+ int configureTimeout = "60000"
+ int testTimeout = "60000"
+ int suspendTimeout = "60000"
+ int resumeTimeout = "60000"
+ contains CommonVmServiceConfiguration vmConfiguration
+}
+
diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore/service.xcore b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore/service.xcore new file mode 100644 index 0000000..12dcf27 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/src/main/xcore/service.xcore @@ -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============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-common-vm-model/src/main/xcore-gen")
+
+
+package org.openecomp.dcae.controller.service.common.vm.service
+
+import org.openecomp.dcae.controller.service.vm.VirtualMachineService
+import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance
+
+annotation "http://openecomp.org" as ecomp
+
+class CommonVmService extends VirtualMachineService {
+}
+
+// state in the controller
+class CommonVmServiceInstance extends VirtualMachineServiceInstance {
+ String script
+ int configureTimeout = "60000"
+ int testTimeout = "60000"
+ int suspendTimeout = "60000"
+ int resumeTimeout = "60000"
+ contains CommonVmServiceConfiguration vmConfiguration
+}
+
+// state in both controller and manager
+class CommonVmServiceConfiguration {
+}
+
+class TommyVmServiceConfiguration extends CommonVmServiceConfiguration {
+ String postgresUserName
+ String postgresPassword
+ String portgresJdbc
+}
\ No newline at end of file diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/pom.xml b/dcae-controller-service-vm/dcae-controller-service-common-vm/pom.xml new file mode 100644 index 0000000..436eee2 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/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-common-vm</artifactId> + <version>0.1.0-SNAPSHOT</version> + <packaging>pom</packaging> + <name>dcae-controller-service-common-vm</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-common-vm-manager</module> + <module>dcae-controller-service-common-vm-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-vm/dcae-controller-service-vm-adaptor/.classpath b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.classpath new file mode 100644 index 0000000..04e20b5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.classpath @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <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-gen"/> + <classpathentry kind="src" path="src/main/sirius-gen"/> + <classpathentry kind="src" path="src/main/resources"/> + <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-vm/dcae-controller-service-vm-adaptor/.gitignore b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.project b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.project new file mode 100644 index 0000000..b3e3df1 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.project @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>dcae-controller-service-vm-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-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.core.resources.prefs b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-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-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-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-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-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-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-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-vm/dcae-controller-service-vm-adaptor/LICENSE.txt b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-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-vm/dcae-controller-service-vm-adaptor/META-INF/MANIFEST.MF b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/META-INF/MANIFEST.MF new file mode 100644 index 0000000..35ec7f2 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/META-INF/MANIFEST.MF @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: dcae-controller-service-vm-adaptor +Bundle-SymbolicName: dcae-controller-service-vm-adaptor +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.dcae.controller.service.vm.adaptor.tools, + org.openecomp.dcae.controller.service.servers.vm +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + dcae-controller-service-vm-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0" diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/build.properties b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/build.properties new file mode 100644 index 0000000..a1ec8c4 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/build.properties @@ -0,0 +1,3 @@ +source.. = src/main/java/ +bin.includes = META-INF/,\ + . diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/pom.xml b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/pom.xml new file mode 100644 index 0000000..830692f --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/pom.xml @@ -0,0 +1,188 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.openecomp.dcae.controller</groupId> + <artifactId>dcae-controller-service-vm-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-vm-model</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> +</project> diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/assembly/assemble_zip.xml b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..b716317 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-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-vm-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-vm/dcae-controller-service-vm-adaptor/src/main/java/CLOUDINIT.userdata b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/CLOUDINIT.userdata new file mode 100644 index 0000000..ade0065 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/CLOUDINIT.userdata @@ -0,0 +1,13 @@ + +############################################################## +##################### CLOUDINIT ############################## +############################################################## + +## need to fix cloudinit in Centos. + +CLOUDHOSTCFG=/etc/cloud/cloud.cfg.d/99_hostname.cfg +if [ -f /etc/redhat-release ]; then + # CentOS/RHEL + ( echo "hostname: \$(hostname)"; echo "fqdn: \$(hostname -f)" ) > \$CLOUDHOSTCFG +fi + diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/HttpInstallationStep.userdata b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/HttpInstallationStep.userdata new file mode 100644 index 0000000..9f1ea4f --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/HttpInstallationStep.userdata @@ -0,0 +1,23 @@ + +if [ ! -e /home/%{applicationId} ]; then useradd -m -s /bin/bash %{applicationId}; fi + +OUT=/tmp/`basename %{url}` + +curl -k -f --user '%{userName}:%{password}' -o \$OUT %{url} + +case %{type} in + deb) + dpkg --install \$OUT + ;; + jar) + mkdir -p /opt/app/%{artifactId}/lib + mv \$OUT /opt/app/%{artifactId}/lib + chown -R %{applicationId}:%{applicationId} /opt/app/%{artifactId} + ;; + zip) + mkdir -p /opt/app/%{artifactId}/lib + ( cd /opt/app/%{artifactId} ; cp -p \$OUT . ; unzip -o \$OUT ) + chown -R %{applicationId}:%{applicationId} /opt/app/%{artifactId} + ;; +esac + diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/MavenArtifactInstallationStep.userdata b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/MavenArtifactInstallationStep.userdata new file mode 100644 index 0000000..016bf66 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/MavenArtifactInstallationStep.userdata @@ -0,0 +1,29 @@ + +if [ ! -e /home/%{applicationId} ]; then useradd -m -s /bin/bash %{applicationId}; fi + +case %{assemblyId} in + %*) + A1=%{groupId}:%{artifactId}:%{version}:%{type} + ;; + *) + A1=%{groupId}:%{artifactId}:%{version}:%{type}:%{assemblyId} + ;; +esac + +mvn -s /tmp/settings.xml org.apache.maven.plugins:maven-dependency-plugin:2.10:copy \ + -Dartifact=\$A1 \ + -Dmaven.wagon.http.ssl.insecure=true \ + -Dmaven.wagon.http.ssl.allowall=true \ + -DoutputDirectory=/opt/app/%{artifactId} + +case %{type} in + jar) + mkdir /opt/app/%{artifactId}/lib + mv /opt/app/%{artifactId}/*.jar /opt/app/%{artifactId}/lib + ;; + zip) + ( cd /opt/app/%{artifactId} ; unzip -o %{artifactId}*.zip ) + ;; +esac + +chown -R %{applicationId}:%{applicationId} /opt/app/%{artifactId} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/ShellInstallationStep.userdata b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/ShellInstallationStep.userdata new file mode 100644 index 0000000..b067968 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/ShellInstallationStep.userdata @@ -0,0 +1,2 @@ + +%{command} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceProvider.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceProvider.java new file mode 100644 index 0000000..9dee540 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceProvider.java @@ -0,0 +1,872 @@ + +/*- + * ============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.vm; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.BasicEList; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.jetty.util.B64Code; +import org.json.JSONObject; +import org.yaml.snakeyaml.Yaml; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; +import org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork; +import org.openecomp.dcae.controller.core.service.DcaeLocation; +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.service.servers.vmmanager.DcaeVirtualMachineManagerConsole; +import org.openecomp.dcae.controller.service.vm.InstallationStep; +import org.openecomp.dcae.controller.service.vm.PhysicalMachine; +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.dcae.controller.service.vm.VmFactory; +import org.openecomp.ncomp.core.DeploymentStatus; +import org.openecomp.ncomp.core.User; +import org.openecomp.ncomp.openstack.compute.Address; +import org.openecomp.ncomp.openstack.compute.Addresses; +import org.openecomp.ncomp.openstack.compute.ComputeFactory; +import org.openecomp.ncomp.openstack.compute.OpenstackRequestNewServer; +import org.openecomp.ncomp.openstack.compute.Server; +import org.openecomp.ncomp.openstack.location.OpenStackLocation; +import org.openecomp.ncomp.openstack.location.OpenStackProject; +import org.openecomp.ncomp.openstack.neutron.CreatePortRequest; +import org.openecomp.ncomp.openstack.neutron.FixedIp; +import org.openecomp.ncomp.openstack.neutron.Network; +import org.openecomp.ncomp.openstack.neutron.NeutronFactory; +import org.openecomp.ncomp.openstack.neutron.NeutronFloatingIp; +import org.openecomp.ncomp.openstack.neutron.Port; +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.Jetty8Client; +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.console.Utils; +import org.openecomp.ncomp.sirius.manager.metrics.MetricStore; +import org.openecomp.ncomp.sirius.manager.server.Response; +import org.openecomp.ncomp.sirius.manager.server.ResponseStatus; +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; +import org.openecomp.ncomp.utils.CryptoUtils; +import org.openecomp.ncomp.utils.StringUtil; + +public class DcaeVirtualMachineServiceProvider extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(DcaeVirtualMachineServiceProvider.class); + VirtualMachineService o; + private String privateKey = CryptoUtils.getKey("config/server.private"); + + public DcaeVirtualMachineServiceProvider(ISiriusServer controller, VirtualMachineService o) { + super(controller, o); + this.o = o; + } + + public void deploy(String instanceName, String containerPath) { + System.err.println("XXX deploy server: " + instanceName + " " + containerPath); + Response res = ServerFactory.eINSTANCE.createResponse(); + VirtualMachineServiceInstance i = findInstance(instanceName); + if (containerPath != null && !containerPath.equals("")) { + Subject s = controller.getServer().find(containerPath); + if (i == null) { + throw new RuntimeException("Unable to find instance: " + instanceName); + } + if (s == null || s.o == null) { + throw new RuntimeException("Unable to find container object: " + containerPath); + } + if (!(s.o instanceof DcaeLocation)) + throw new RuntimeException("Unable to deploy to this container: " + containerPath + " " + s.o); + i.setLocation((DcaeLocation) s.o); + } + DcaeLocation location = i.getLocation(); + if (location == null) + throw new RuntimeException("Unable to deploy no location specified: " + ManagementServer.object2ref(i)); + String networkId = null; + String networkName = location.getOpenstackProject().getPrivateNetwork(); + String subnetId = null; + for (Network network : location.getOpenstackProject().getNetworks()) { + if (network.getName().equals(networkName)) { + networkId = network.getId(); + subnetId = network.getSubnets().get(0); + } + } + if (networkId == null) { + throw new RuntimeException("Unable to find network: " + networkName); + } + HashMap<DcaeBasicServer, Port> portMap = new LinkedHashMap<DcaeBasicServer, Port>(); + OpenStackLocation loc = (OpenStackLocation) location.getOpenstackProject().eContainer(); + for (int j = 0; j < i.getNumberOfServers(); j++) { + DcaeBasicServer server = i.getServers().get(j); + if (i.getVmType().isNeedPublicIp() && server.getNetworks().get(0).getIp() == null) { + throw new RuntimeException("Deployment issue: server not assigned IP: " + server.getName()); + } + for (Port port : location.getOpenstackProject().getPorts()) { + if (port.getName().equals(server.getName())) { + portMap.put(server, port); + } + } + if (portMap.get(server) == null) { + CreatePortRequest portReq = NeutronFactory.eINSTANCE.createCreatePortRequest(); + portReq.setName(server.getName()); + portReq.setProjectName(location.getOpenstackProject().getName()); + portReq.setNetwork_id(networkId); + // if assigned ip but no public network, assume IP is on private and available + String ip2 = server.getNetworks().get(0).getIp(); + if (ip2 != null && ! loc.isSupportsFloatingIps()) { + FixedIp fip = NeutronFactory.eINSTANCE.createFixedIp(); + fip.setIp_address(ip2); + fip.setSubnet_id(subnetId); + portReq.getFixed_ips().add(fip ); + } + // create port in Openstack + Port port = loc.createPort(portReq); + portMap.put(server, port); + } + } + for (int j = 0; j < i.getNumberOfServers(); j++) { + OpenstackRequestNewServer r = ComputeFactory.eINSTANCE.createOpenstackRequestNewServer(); + r.setVmType(EcoreUtil.copy(i.getVmType())); + r.setName(vmName(i, j)); + r.setProjectName(location.getOpenstackProject().getName()); + if (i.getAvailabilityZone() != null) + r.setHypervisor(i.getAvailabilityZone()); + if (i.getUsers().size() > 0) { + r.setUser(i.getUsers().get(0).getName()); + } + r.setUser_data(B64Code.encode(userdata(i, j, portMap))); + DcaeBasicServer server = i.getServers().get(j); + if (o.getName().equals("vm-controller")) { + if (server.getServer() != null) { + // Existing Controller VM. ignore it + continue; + } + } + boolean floatingIpDone = false; + String ip2 = server.getNetworks().get(0).getIp(); + for (NeutronFloatingIp fip : location.getOpenstackProject().getFloatingips()) { + if (ip2 != null && ip2.equals(fip.getFloating_ip_address())) { + if (fip.getFixed_ip_address() != null) { + floatingIpDone = true; + } + } + } + if (!floatingIpDone && loc.isSupportsFloatingIps()) + r.setFloatingIp(ip2); + else + r.getVmType().setNeedPublicIp(false); + r.getPorts().add(portMap.get(server).getId()); + if (! loc.isSupportsFloatingIps() && location.getOpenstackProject().getPublicNetwork() != null) { + // find external network. + String networkId2 = null; + String networkName2 = location.getOpenstackProject().getPublicNetwork(); + if (networkName2.matches("........-....-....-....-............")) { + networkId2 = networkName2; + } + else { + for (Network network : location.getOpenstackProject().getNetworks()) { + if (network.getName().equals(networkName)) { + networkId2 = network.getId(); + } + } + } + if (networkId2 == null) { + throw new RuntimeException("Unable to find public network: " + networkName2); + } + r.getNetworks().add(networkId2); + } + if (i.getOpenstackFlavor() != null) + r.getVmType().setFlavorName(i.getOpenstackFlavor()); + System.out.println("loc.isSupportsFloatingIps(): " + loc.isSupportsFloatingIps()); + System.out.println("location.getOpenstackProject().getPublicNetwork(): " + location.getOpenstackProject().getPublicNetwork()); + System.out.println(ManagementServer.ecore2json(r, 100, null, true).toString(2)); + loc.createServer(r); + logger.info("created server: " + r.getName()); + } + controller.getServer().save(); + long toolate = System.currentTimeMillis() + i.getDeploymentTimeoutMinutes() * 60 * 1000; + while (i.getStatus() != DeploymentStatus.DEPLOYED) { + if (System.currentTimeMillis() > toolate) { + throw new RuntimeException("Deployment timeout: VM did not show up"); + } + try { + Thread.sleep(1000); + } catch (InterruptedException ie) { + } + } + if (i.getManagerPortNumber() > 0) { + while (System.currentTimeMillis() < toolate) { + try { + o.pushManagerConfiguration(instanceName); + break; + } catch (Exception e) { + try { + Thread.sleep(10000); + } catch (InterruptedException e1) { + throw new RuntimeException("Deployment timeout: Deployment interrupted"); + } + } + if (System.currentTimeMillis() >= toolate) + throw new RuntimeException("Unable to configure VM"); + } + } + res.setStatus(ResponseStatus.OK); + // return res; + } + + // used for testing only + static String userdataStatic(VirtualMachineServiceInstance i, int j, HashMap<DcaeBasicServer, Port> portMap) { + DcaeVirtualMachineServiceProvider pp = new DcaeVirtualMachineServiceProvider(null, null); + return pp.userdata(i, j, portMap); + } + + @SuppressWarnings("unchecked") + protected String userdata(VirtualMachineServiceInstance i, int j, HashMap<DcaeBasicServer, Port> portMap) { + StringBuffer buf = new StringBuffer(); + HashMap<String, Object> configMap = new HashMap<String, Object>(); + buf.append(userdataInitial()); + String resourceName = "instances/" + i.getService().getName() + "/" + i.getName() + ".yaml"; + String x = null; + try { + x = getTemplate(resourceName); + } catch (Exception e1) { + buf.append("#### No special configuration resource: " + resourceName); + buf.append("\n"); + } + if (x != null) { + Yaml yaml = new Yaml(); + configMap = (HashMap<String, Object>) yaml.load(x); + buf.append("#### Using special configuration resource: " + resourceName); + buf.append("\n"); + } + DcaeBasicServer s = i.getServers().get(j); + if (configMap.containsKey("configuration-files")) + buf.append(userdataConfig(configMap.get("configuration-files"), s)); + if (configMap.containsKey("init-script")) + buf.append(configMap.get("init-script")).append("\n"); + buf.append(userdataHosts(s, portMap)); + buf.append(userdataCertificate(s)); +// buf.append(userdataUam(i, s)).append("\n"); +// buf.append(userdataIeds(i, s)).append("\n"); + buf.append(userdataFromFile("CLOUDINIT",i, s)).append("\n"); + for (User u : i.getAdminUsers()) { + buf.append(userdataSshKey(i.getAdminId(), u.getPublicKey())); + } + buf.append(userdataSteps(i, s, portMap)).append("\n"); + for (String id : i.getApplicationIds()) { + buf.append(userdataSshSetup(id)); + for (User u : i.getUsers()) { + buf.append(userdataSshKey(id, u.getPublicKey())); + } + } + try { + buf.append(getTemplate(i.getService().getName() + ".userdata")); + } catch (Exception e) { + buf.append("#no final script: " + i.getService().getName() + ".userdata").append("\n"); + } + if (configMap.containsKey("final-script")) + buf.append(configMap.get("final-script")).append("\n"); + buf.append(userdataFinal(i,s)); + System.err.println("USER DATA: " + ManagementServer.object2ref(i) + "\n" + buf); + return buf.toString(); + } + + private String userdataSteps(VirtualMachineServiceInstance i, DcaeBasicServer s, + HashMap<DcaeBasicServer, Port> portMap) { + StringBuffer buf = new StringBuffer(); + for (InstallationStep step : i.getSteps()) { + buf.append("######### ").append(step.getName()).append("\n"); + String str = null, str1 = null; + try { + str = getTemplate(step.eClass().getName() + ".userdata"); + JSONObject json = ManagementServer.ecore2json(step, 100, null, true); + str1 = StringUtil.expandUsingJson(str, json, "%"); + buf.append(str1).append("\n"); + } catch (Exception e) { + System.err.println("userdataSteps error: str=" + str + " str1=" + str1 + " e=" + e); + e.printStackTrace(); + } + } + return buf.toString(); + } + + private String userdataConfig(Object o, DcaeBasicServer s) { + StringBuffer buf = new StringBuffer(); + @SuppressWarnings("unchecked") + HashMap<String, HashMap<String, String>> m1 = (HashMap<String, HashMap<String, String>>) o; + for (String k : m1.keySet()) { + HashMap<String, String> m2 = m1.get(k); + buf.append("## Adding configuration file: ").append(k).append("\n"); + String decode = "cat"; + if (m2.containsKey("encoding") && "base64".equals(m2.get("encoding"))) { + decode = "base64 --decode"; + } + buf.append("cat | ").append(decode).append(" > ").append(m2.get("destination")).append(" << EOF_CONFIG\n"); + String content = m2.get("content"); + if (m2.containsKey("encrypted-password")) { + String pw = CryptoUtils.decryptPrivate(privateKey, m2.get("encrypted-password")); + content = CryptoUtils.decrypt(pw, content); + } + JSONObject json = new JSONObject(); + String pw = JavaHttpClient.decryptPassword(s.getCertificatePassword()); + json.put("certPassword", pw == null ? "No Certificate" : pw); + if (content.contains("%{")) { + System.err.print("CONTENT" + content + " " + json); + } + content = StringUtil.expandUsingJson(content, json, "%"); + if (content.contains("%{")) { + System.err.print("CONTENT 2" + content); + } + content = decryptString(content); + buf.append(content).append("\n"); + buf.append("EOF_CONFIG").append("\n"); + if (m2.containsKey("owner")) + buf.append("chown ").append(m2.get("owner")).append(" ").append(m2.get("destination")).append("\n"); + } + return buf.toString(); + } + + private String decryptString(String content) { + Pattern p = Pattern.compile("(rsa:[A-Za-z0-9+/]+ *[A-Za-z0-9+/]+ *[A-Za-z0-9+/]+=*)"); + Matcher m = p.matcher(content); + StringBuffer s = new StringBuffer(); + while (m.find()) { + String k = m.group(1); + m.appendReplacement(s, JavaHttpClient.decryptPassword(k)); + } + m.appendTail(s); + return s.toString(); + } + + protected String userdataSshSetup(String id) { + StringBuffer buf = new StringBuffer(); + if (id == null) { + buf.append("### userdataSshSetup null ID: ").append("\n"); + return buf.toString(); + } + buf.append("mkdir /home/ID/.ssh\n".replace("ID", id)); + buf.append("chmod og-rwx /home/ID/.ssh\n".replace("ID", id)); + buf.append("chown -R ID:ID /home/ID/.ssh\n".replace("ID", id)); + buf.append("touch /home/ID/.ssh/authorized_keys\n".replace("ID", id)); + buf.append("chmod og-rwx /home/ID/.ssh/authorized_keys\n".replace("ID", id)); + buf.append("chown -R ID:ID /home/ID/.ssh/authorized_keys\n".replace("ID", id)); + return buf.toString(); + } + + protected String userdataSshKey(String id, String publicKey) { + StringBuffer buf = new StringBuffer(); + if (id == null) { + return ""; + } + if (publicKey == null) { + buf.append("### null key: ").append(id).append("\n"); + return buf.toString(); + } + buf.append("echo ").append(publicKey.trim()).append(" >> /home/").append(id).append("/.ssh/authorized_keys\n"); + return buf.toString(); + } + + protected Object userdataCertificate(DcaeBasicServer s) { + StringBuffer buf = new StringBuffer(); + byte[] cert; + try { + cert = getTemplateBinary(s.getName() + ".pkcs12"); + // buf.append("### check sum: " + + // MD5Checksum.createChecksum(cert)).append("\n"); + buf.append("cat > /tmp/certificate.pkcs12.b64code << EOF_CERT").append("\n"); + buf.append(B64Code.encode(cert)).append("\n"); + buf.append("EOF_CERT").append("\n"); + } catch (Exception e) { + // TODO Auto-generated catch block + buf.append("## UNABLE TO FIND CERTIFICATE FOR: " + s.getName()).append("\n"); + } + return buf.toString(); + } + + protected Object userdataCertificatePassword(DcaeBasicServer s) { + StringBuffer buf = new StringBuffer(); + buf.append("echo ").append(JavaHttpClient.decryptPassword(s.getCertificatePassword())) + .append(" > /tmp/.password\n"); + return buf.toString(); + } + + protected String userdataHosts(DcaeBasicServer s, HashMap<DcaeBasicServer, Port> portMap) { + StringBuffer buf = new StringBuffer(); + buf.append("cat >> /etc/hosts << HOSTS_EOF").append("\n"); + for (DcaeBasicServer s1 : portMap.keySet()) { + if (s1 == s) { + for (FixedIp x : portMap.get(s1).getFixed_ips()) { + buf.append(x.getIp_address() + " " + dnsName(s) + " " + s1.getName()).append("\n"); + } + } else { + for (FixedIp x : portMap.get(s1).getFixed_ips()) { + buf.append(x.getIp_address() + " " + s1.getName()).append("\n"); + } + } + } + buf.append("HOSTS_EOF").append("\n"); + buf.append("echo ").append(s.getName()).append(" > /etc/hostname\n"); + int index = 0; + for (DcaeBasicServer s1 : portMap.keySet()) { + for (FixedIp x : portMap.get(s1).getFixed_ips()) { + buf.append("IP" + index + "=").append(x.getIp_address()).append("\n"); + } + index++; + } + return buf.toString(); + } + + static String getTemplate(String resource) throws IOException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + byte[] data = new byte[65536]; + InputStream is = DcaeVirtualMachineServiceProvider.class.getClassLoader().getResourceAsStream(resource); + if (is == null) { + throw new RuntimeException("Unable to find resource: " + resource); + } + int i; + try { + while ((i = is.read(data)) > 0) { + baos.write(data, 0, i); + } + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + } finally { + if (is != null) + is.close(); + } + return (new String(baos.toByteArray())); + } + + static byte[] getTemplateBinary(String rnm) throws IOException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + byte[] data = new byte[65536]; + InputStream is = DcaeVirtualMachineServiceProvider.class.getClassLoader().getResourceAsStream(rnm); + int i; + try { + while ((i = is.read(data)) > 0) { + baos.write(data, 0, i); + } + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + } finally { + if (is != null) + is.close(); + } + return baos.toByteArray(); + } + + protected Object userdataFromFile(String name, VirtualMachineServiceInstance i, DcaeBasicServer s2) { + try { + String s = getTemplate(name + ".userdata"); + JSONObject json = new JSONObject(); + DcaeBasicServerNetwork n = s2.getNetworks().get(0); + String dns = n.getDnsName(); + json.put("dnsDomain", dns.substring(dns.indexOf(".") + 1)); + json.put("admin", i.getIedsAdmin()); + return StringUtil.expandUsingJson(s, json, "%"); + } catch (Exception e) { + return "#error " + name + ".userdata: " + e; + } + } + + + protected String userdataInitial() { + StringBuffer buf = new StringBuffer(); + buf.append("#!/bin/bash").append("\n"); + buf.append("cat > /tmp/dcae_install.sh << EOF_DCAE_INSTALL").append("\n"); + buf.append("#!/bin/bash").append("\n"); + buf.append("set -x").append("\n"); + buf.append("cd /tmp").append("\n"); + return buf.toString(); + } + + protected String userdataFinal(VirtualMachineServiceInstance i, DcaeBasicServer s) { + StringBuffer buf = new StringBuffer(); + buf.append("EOF_DCAE_INSTALL").append("\n"); + buf.append(userdataCertificatePassword(s)); + buf.append("bash /tmp/dcae_install.sh 2>&1 | tee /tmp/dcae_install.log").append("\n"); + return buf.toString(); + } + + public void undeploy(java.lang.String instanceName) { + if (o.getName().equals("vm-controller")) + throw new RuntimeException("Cannot undeploy vm-controller, please use Horizon"); + VirtualMachineServiceInstance i = findInstance(instanceName); + for (int j = 0; j < i.getNumberOfServers(); j++) { + // System.out.println("HHHH: " + i.getServers().get(j).getName()); + if (i.getLocation() == null) + continue; + OpenStackLocation loc = (OpenStackLocation) i.getLocation().getOpenstackProject().eContainer(); + String tname = i.getLocation().getOpenstackProject().getName(); + loc.deleteServer(tname, vmName(i, j)); + // System.out.println("HHHH deleted: " + vmName(i, j)); + } + } + + private String dnsName(DcaeBasicServer s) { + return s.getNetworks().get(0).getDnsName(); + } + + public void updateDeploymentStatus() { +// System.out.println("XXXX updateDeploymentStatus: " + o.getName()); + for (VirtualMachineServiceInstance instance : o.getInstances()) { +// System.out.println("XXXX updateDeploymentStatus: " + o.getName() + " " + instance.getName() + " " +// + instance.getServers().size()); + if (instance.getServers().size() == 0) { + setStatus(instance,DeploymentStatus.UNDEPLOYED,"no servers"); + continue; + } + if (instance.getServers().size() != instance.getNumberOfServers()) { + setStatus(instance,DeploymentStatus.DEPLOYED_ERRORS,"not the right number of servers"); + continue; + } + if (instance.getVmType() == null) { + logger.warn("virtual machine instance without vmType: " + ManagementServer.object2ref(instance)); + setStatus(instance,DeploymentStatus.DEPLOYED_ERRORS,"vm type is null"); + continue; + } + boolean allPhysical = true; + for (int j = 0; j < instance.getNumberOfServers(); j++) { + DcaeBasicServer s1 = instance.getServers().get(j); + // check if server is non Openstack managed VM. + if (s1 instanceof PhysicalMachine) { + continue; + } + allPhysical = false; + } + if (allPhysical) { + setStatus(instance,DeploymentStatus.DEPLOYED,"all physical"); + continue; + } + if (instance.getLocation() == null) { + setStatus(instance,DeploymentStatus.UNDEPLOYED,"no location"); + continue; + } + boolean needPubIp = instance.getVmType().isNeedPublicIp(); + boolean errors = false; + String incomplete = null; + int numDeployed = 0; + for (int j = 0; j < instance.getNumberOfServers(); j++) { + DcaeBasicServer s1 = instance.getServers().get(j); + // check if server is non Openstack managed VM. + if (s1 instanceof PhysicalMachine) { + numDeployed++; + continue; + } + // VirtualMachine vm = (VirtualMachine) s1; + String n = vmName(instance, j); + if (!s1.getName().equals(n)) { + errors = true; + } + Server svr = null; + String privateip = null; + String publicip = null; + s1.setServer(null); + s1.setPrivateIp(null); + s1.setPublicIp(null); + OpenStackProject project = instance.getLocation().getOpenstackProject(); + for (Server s : project.getServers()) { + if (n.equals(s.getName())) { + svr = s; + for (Addresses a : s.getAddresses()) { +// System.out.println("RRRR: " + o.getName() + " " + instance.getName() + " " + s.getName() +// + " " + a.getName()); + for (Address ip : a.getIps()) { + if (ip.getOS_EXT_IPS_type() == null || ip.getOS_EXT_IPS_type().equals("fixed")) { + if (a.getName().equals(project.getPrivateNetwork())) + privateip = ip.getAddr(); + if (a.getName().equals("public") && ip.getVersion() == 4) + publicip = ip.getAddr(); + } + if (ip.getOS_EXT_IPS_type() != null && ip.getOS_EXT_IPS_type().equals("floating")) { + publicip = ip.getAddr(); + } + } + } + } + } + s1.setPrivateIp(privateip); + s1.setPublicIp(publicip); + s1.setServer(svr); + if (svr != null) + numDeployed++; + if (publicip == null && needPubIp && project.getPublicNetwork() != null) { + incomplete = s1.getName() + " has not public IP"; + } + if (privateip == null) { + incomplete = s1.getName() + " has not private IP"; + } + if (svr == null) { + incomplete = s1.getName() + " has null openstack server"; + } + } +// System.out.println("XXXX updateDeploymentStatus: " + o.getName() + " " + instance.getName() + " " + errors +// + " " + numDeployed + " " + incomplete); + if (errors) { + setStatus(instance,DeploymentStatus.DEPLOYED_ERRORS,"errors"); + } else if (numDeployed == 0) { + setStatus(instance,DeploymentStatus.UNDEPLOYED,"numDeployed == 0"); + } else if (incomplete != null) { + setStatus(instance,DeploymentStatus.DEPLOYED_PARTIALLY,incomplete); + } else { + setStatus(instance,DeploymentStatus.DEPLOYED,"all okay"); + } + } + + }; + + private void setStatus(VirtualMachineServiceInstance instance, DeploymentStatus newStatus,String reason) { + if (instance.getStatus() != newStatus) { + String msg = "deployment status changed: " + ManagementServer.object2ref(instance) + + " " + instance.getStatus() + " -> " + newStatus + " " + reason; + System.err.println("VMDEPLOYMENTSTATUS: " + new Date() + " " + msg); + logger.info(msg); + } + instance.setStatus(newStatus); + } + + public HealthTestResponse test(String instance) { + VirtualMachineServiceInstance i = findInstance(instance); + if (i.getStatus() != DeploymentStatus.DEPLOYED) { + HealthTestResponse s = ServiceFactory.eINSTANCE.createHealthTestResponse(); + s = ServiceFactory.eINSTANCE.createHealthTestResponse(); + s.setMessageCode("Not deployed"); + s.setStatus(HealthTestStatus.YELLOW); + return s; + } + if (i.getManagerPortNumber() < 0) { + HealthTestResponse s = ServiceFactory.eINSTANCE.createHealthTestResponse(); + s.setMessageCode("Health Check undefined"); + s.setStatus(HealthTestStatus.YELLOW); + return s; + } + AbstractClient c = getClient(i); + DcaeVirtualMachineManagerConsole console = new DcaeVirtualMachineManagerConsole(c); + return console.test(); + } + + public void suspend(String instance) { + VirtualMachineServiceInstance i = findInstance(instance); + for (DcaeBasicServer s : getServers(i)) { + AbstractClient c = getClient(i, s); + DcaeVirtualMachineManagerConsole console = new DcaeVirtualMachineManagerConsole(c); + console.suspend(); + } + } + + public void resume(String instance) { + VirtualMachineServiceInstance i = findInstance(instance); + for (DcaeBasicServer s : getServers(i)) { + AbstractClient c = getClient(i,s); + DcaeVirtualMachineManagerConsole console = new DcaeVirtualMachineManagerConsole(c); + console.resume(); + } + } + + public void pushManagerConfiguration(String instance) { + VirtualMachineServiceInstance i = findInstance(instance); + for (DcaeBasicServer s : getServers(i)) { + AbstractClient c = getClient(i, s); + DcaeVirtualMachineManagerConsole console = new DcaeVirtualMachineManagerConsole(c); + EObject config = o.managerConfiguration(instance); + console.update("/", ManagementServer.ensureHardUpdate(config, 1)); + EList<DcaeStream> l1 = new BasicEList<DcaeStream>(); + l1.addAll(EcoreUtil.copyAll(i.getInputStreams())); + EList<DcaeStream> l2 = new BasicEList<DcaeStream>(); + l2.addAll(EcoreUtil.copyAll(i.getOutputStreams())); + console.updateStreams(l1, l2); + console.configurationChanged(); + } + } + + protected EList<DcaeBasicServer> getServers(VirtualMachineServiceInstance i) { + return i.getServers(); + } + + protected EObject convertToManagerConfiguration(VirtualMachineServiceInstance i) { + VirtualMachineServiceConfiguration c = VmFactory.eINSTANCE.createVirtualMachineServiceConfiguration(); + c.setConfiguration(i.getConfiguration()); + return c; + } + + public void pollManagerConfiguration(String instance) { + // TODO Auto-generated method stub + + } + + public void start() { + Thread t = new Thread("vm service: " + o.getName()) { + @Override + public void run() { + while (true) { + try { + if (!controller.getServer().isSlave) + updateDeploymentStatus(); + Thread.sleep(10000); // sleep 10 seconds + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("vm service: " + o.getName() + " : " + e); + try { + Thread.sleep(30000); + } catch (InterruptedException e1) { + } + } + } + } + + }; + t.start(); + } + + public AbstractClient getClient(VirtualMachineServiceInstance i, DcaeBasicServer s) { + Jetty8Client c = new Jetty8Client("managers.properties", i.eClass().getInstanceClassName()); + if (c.getBaseAddress() == null) { + throw new RuntimeException("unable to determine baseaddress in managers.properties for: " + + i.eClass().getInstanceClassName()); + } + if (i.getServers().size() == 0) { + throw new RuntimeException("service instances is not deployed (has no servers): " + + ManagementServer.object2ref(i)); + } + int port = i.getService().getManagerPortNumber(); + if (i.getManagerPortNumber() != null) + port = i.getManagerPortNumber(); + if (s instanceof PhysicalMachine) { + PhysicalMachine p = (PhysicalMachine) s; + if (p.getManagerPortNumber() != null) + port = p.getManagerPortNumber(); + } + String b = c.getBaseAddress(); + b = b.replaceFirst("PORT", Integer.toString(port)); + b = b.replaceFirst("IP", dnsName(s)); + if (s.getCertificatePassword() != null) + b = b.replaceFirst("http", "https"); + c.setBaseAddress(b); + logger.info("using baseAdress: " + c.getBaseAddress() + " for " + ManagementServer.object2ref(i)); + return c; + } + + public AbstractClient getClient(VirtualMachineServiceInstance i) { + if (i.getLeaderServer() == null) { + EList<DcaeBasicServer> l = getServers(i); + if (l.size() == 0) { + throw new RuntimeException("No servers for vm instance: " + ManagementServer.object2ref(i)); + } + i.setLeaderServer(l.get(0)); + } + return getClient(i, i.getLeaderServer()); + } + + private String vmName(VirtualMachineServiceInstance i, int index) { + return i.getServers().get(index).getName(); + // return "dcae:" + o.getName() + ":" + i.getName() + ":" + index; + } + + protected VirtualMachineServiceInstance findInstance(String instanceName) { + for (VirtualMachineServiceInstance ii : o.getInstances()) { + if (ii.getName().equals(instanceName)) { + return ii; + } + } + throw new RuntimeException("Unable to find instance: " + instanceName); + } + + public static void ecoreSetup() { + // TODO Auto-generated method stub + + } + + public EObject managerConfiguration(String instanceName) { + VirtualMachineServiceInstance i = findInstance(instanceName); + AbstractClient c = getClient(i); + DcaeVirtualMachineManagerConsole console = new DcaeVirtualMachineManagerConsole(c); + Object oo = console.list("/", 100); + JSONObject json = (JSONObject) Utils.object2json(oo); + // System.err.println("XXXXX" + json.toString(2)); + return controller.getServer().json2ecore(EcorePackage.eINSTANCE.getEObject(), json); + } + + public JSONObject managerOperation(String instanceName, String operation, JSONObject parameters) { + VirtualMachineServiceInstance i = findInstance(instanceName); + AbstractClient c = getClient(i); + DcaeVirtualMachineManagerConsole console = new DcaeVirtualMachineManagerConsole(c); + if (operation == null) + throw new RuntimeException("no operation: " + instanceName); + if (parameters == null) + throw new RuntimeException("no parameters: " + instanceName + "@" + operation); + Object oo = console.operation("/", operation, parameters); + if (oo == null) + return null; + JSONObject json = (JSONObject) Utils.object2json(oo); + // System.err.println("XXXXX" + json.toString(2)); + return json; + } + + public void updateConfigurationFromPolicy(String instanceName) { + VirtualMachineServiceInstance i = findInstance(instanceName); + JavaHttpClient client = new JavaHttpClient("controller.properties", "policy"); + HashMap<String, String> headers = new HashMap<String, String>(); + JSONObject json = new JSONObject(); + headers.put("ClientAuth", "xxx"); + JSONObject json2 = new JSONObject(); + json.put("configAttributes", json2); + json2.put("uuid", "xxx"); + json2.put("service", "ControllerServiceCollectorSdnlService"); + json2.put("location", "Edge"); + json.put("configName", "xxxx.sdn-l"); + json.put("ecompcomponentName", "DCAE"); + client.httpJsonTransaction("/PyPDPServer/getConfig", "POST", headers, json); + } + + public void runHealthTests() { + for (VirtualMachineServiceInstance i : o.getInstances()) { + HealthTestResponse s = null; + try { + s = o.test(i.getName()); + } catch (Exception e) { + s = ServiceFactory.eINSTANCE.createHealthTestResponse(); + s.setMessageCode("Health check failed: " + e); + s.setStatus(HealthTestStatus.RED); + } + i.setHealthTestStatus(s.getStatus()); + i.setHealthTestMessageCode(s.getMessageCode()); + MetricStore store = controller.getServer().metrics.getStore(i); + Date now = new Date(); + String path = "/lastHealthTest"; + store.addLongValue(path, now, now.getTime(), "DateMetricAttribute", false); + } + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerProvider.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerProvider.java new file mode 100644 index 0000000..d65b6a3 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerProvider.java @@ -0,0 +1,164 @@ + +/*- + * ============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.vmmanager; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.util.Date; + +import org.openecomp.ncomp.sirius.manager.BasicManagementServerProvider; +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.webservice.utils.FileUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import org.openecomp.dcae.controller.core.manager.ManagerFactory; +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.service.vmmanager.VirtualMachineManager; + +public class DcaeVirtualMachineManagerProvider extends BasicManagementServerProvider { + private static final Logger logger = Logger.getLogger(DcaeVirtualMachineManagerProvider.class); + VirtualMachineManager o; + private boolean suspended; + private String file = "/etc/dcae/dmaap.conf"; + + public DcaeVirtualMachineManagerProvider(ISiriusServer controller, VirtualMachineManager o) { + super(controller, o); + this.o = o; + } + + public HealthTestResponse test() { + HealthTestResponse res = ServiceFactory.eINSTANCE.createHealthTestResponse(); + res.setStatus(HealthTestStatus.GREEN); + return res; + } + + public void suspend() { + suspended = true; + } + + public void resume() { + suspended = false; + } + + public java.lang.String publicKey() { + throw new UnsupportedOperationException(); + } + + // US618656 + public void configurationChanged() { + updateDMaapConfig(); + } + + // US618665 + private void updateDMaapConfig() { + JSONArray a = new JSONArray(); + for (DcaeStream s : o.getInputStreams()) { + JSONObject json = ManagementServer.ecore2json(s, 100, null, true); + json.put("dmaapStreamId", s.getName()); + a.put(json); + } + for (DcaeStream s : o.getOutputStreams()) { + JSONObject json = ManagementServer.ecore2json(s, 100, null, true); + json.put("dmaapStreamId", s.getName()); + a.put(json); + } + write2file(a,"/tmp/dmaap.conf2"); + write2file(a,file ); + + } + + private void write2file(JSONArray a, String fileName) { + try { + OutputStreamWriter w = FileUtils.filename2writer(fileName); + w.write(a.toString(2)); + w.close(); + } catch (Exception e) { + logger.warn("Unable to write file: " + fileName); + ManagementServerUtils.printStackTrace(e); + } + } + + public void updateStreams(EList<DcaeStream> inputStreams, EList<DcaeStream> outputStreams) { + o.getInputStreams().clear(); + o.getInputStreams().addAll(inputStreams); + o.getOutputStreams().clear(); + o.getOutputStreams().addAll(outputStreams); + } + + public void scheduleCronjob(final String cmd, final long frequency) { + Thread t = new Thread("crontab: " + cmd) { + @Override + public void run() { + while (true) { + try { + Date now = new Date(); + long wait = frequency - (now.getTime() % frequency); + Thread.sleep(wait); + if (suspended) continue; + Runtime runtime = Runtime.getRuntime(); + Process proc; + try { + now = new Date(); + proc = runtime.exec(cmd); + ByteArrayOutputStream o = new ByteArrayOutputStream(); + ByteArrayOutputStream e = new ByteArrayOutputStream(); + FileUtils.copyStream(proc.getInputStream(), o); + FileUtils.copyStream(proc.getErrorStream(), e); + int i = proc.waitFor(); + if (i != 0) + logger.warn("crontab return error: " + cmd + " " + i); + long duration = new Date().getTime()-now.getTime(); + if (duration > frequency) + logger.warn("crontab took too long: " + cmd + " " + duration); + } catch (Exception e) { + e.printStackTrace(); + logger.warn("ERROR: " + e); + } + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("crontab: " + cmd + " " + e); + try { + Thread.sleep(30000); + } catch (InterruptedException e1) { + } + } + } + }; + }; + t.start(); + } + + protected void setDmaapConfigurationFile(String dmaapConfFile) { + file = dmaapConfFile; + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/vm/adaptor/tools/Generator.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/vm/adaptor/tools/Generator.java new file mode 100644 index 0000000..3d7c1c5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/org/openecomp/dcae/controller/service/vm/adaptor/tools/Generator.java @@ -0,0 +1,91 @@ + +/*- + * ============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.vm.adaptor.tools;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+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;
+import org.openecomp.dcae.controller.service.vm.VmFactory;
+import org.openecomp.dcae.controller.service.vmmanager.VmmanagerFactory;
+import org.openecomp.utils.YamlToJava;
+
+
+public class Generator {
+
+ public static void main(String[] args) {
+ @SuppressWarnings("unused")
+ ServerPackage f = ServerPackage.eINSTANCE;
+ genManager();
+ genService();
+ }
+
+ private static void genManager() {
+ EObject o = VmmanagerFactory.eINSTANCE.createVirtualMachineManager();
+ 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("ControllerServiceVmManager");
+ m.setTitle("ControllerServiceVmManager");
+ ControllerGenerator g = new ControllerGenerator(o, m);
+ g.setEnableIRequestHandler(false);
+ g.setEnableISiriusPlugin(false);
+ // TODO Unclear why this fails.
+// g.addFactory(VmFactory.eINSTANCE);
+ g.generate(dir);
+ String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging";
+ YamlToJava.convert("src/main/sirius-gen/VirtualMachineManager.yaml", dir + "/logging", pName);
+ }
+
+ public static void genService() {
+ @SuppressWarnings("unused")
+ ServerPackage f = ServerPackage.eINSTANCE;
+ EObject o = VmFactory.eINSTANCE.createVirtualMachineService();
+ EPackage p = o.eClass().getEPackage();
+ String dir = p.getNsURI().replace(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("ControllerServiceVm");
+ m.setTitle("ControllerServiceVm");
+ ControllerGenerator g = new ControllerGenerator(o,m);
+ g.setEnableIRequestHandler(false);
+ g.setEnableISiriusPlugin(true);
+ g.generate(dir);
+ g.generateScripts("src/main/server-gen/bin","controller-service-vm-adaptor");
+ String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging";
+// YamlToJava.convert("src/main/resources/DcaeServiceVirtualMachineAdaptor.yaml", dir + "/logging", pName);
+ YamlToJava.convert("src/main/sirius-gen/VirtualMachineService.yaml", dir + "/logging", pName);
+ }
+
+
+}
diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/resources/DcaeController.yaml b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/resources/DcaeController.yaml new file mode 100644 index 0000000..a6edb28 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/resources/DcaeController.yaml @@ -0,0 +1,12 @@ +operations: + HEALTHCHECK: + description: Heath Check for all DCAE service instances. +messages: + HEALTHCHECK_SERVICE_FAILED: + errorCode: DCAE-CONTROLLER-HEALTHCHECK-SERVICE-FAILED-5001W + messageFormat: '{0}' + parameters: + service-name: + description: Name of Service for which the health check fails. + resolution: Contact Tier 4. This is a software bug. + description: Heath Check on the service level fails. diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/server-gen/bin/controller-service-vm-adaptor-controller b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/server-gen/bin/controller-service-vm-adaptor-controller new file mode 100644 index 0000000..ebe6100 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/server-gen/bin/controller-service-vm-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-vm-adaptor-controller +CLASS=org.openecomp.dcae.controller.service.servers.vm.DcaeVirtualMachineServiceServer + +############################## 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/vm.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-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/ControllerVirtualMachineServiceInstance.yaml b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/ControllerVirtualMachineServiceInstance.yaml new file mode 100644 index 0000000..d728705 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/ControllerVirtualMachineServiceInstance.yaml @@ -0,0 +1,3 @@ +operations: {} +messages: + dummy: {} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/VirtualMachineManager.yaml b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/VirtualMachineManager.yaml new file mode 100644 index 0000000..63cb773 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/VirtualMachineManager.yaml @@ -0,0 +1,179 @@ +operations: + test: {} + suspend: {} + resume: {} + publicKey: {} + configurationChanged: {} + updateStreams: {} + logs: {} + metrics: {} + properties: {} + uploadInfo: {} + getValues: {} + getValuesAll: {} + getMessages: {} + getRequestLogger: {} + evaluate: {} + update: {} + 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 +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 + 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 diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/VirtualMachineService.yaml b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/VirtualMachineService.yaml new file mode 100644 index 0000000..6ac8c34 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/VirtualMachineService.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-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineService.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineService.java new file mode 100644 index 0000000..1d8d251 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineService.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.vm; + + + + +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.vm.logging.VirtualMachineServiceOperationEnum; +import org.openecomp.dcae.controller.service.servers.vm.logging.VirtualMachineServiceMessageEnum; + + + + +import org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl; + + + +public class DcaeVirtualMachineService extends VirtualMachineServiceImpl implements ISiriusPlugin { + public static final Logger logger = Logger.getLogger(DcaeVirtualMachineService.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeVirtualMachineServiceProvider controller; + ISiriusServer server; + + public DcaeVirtualMachineService(ISiriusServer server) { + this.server = server; + this.controller = new DcaeVirtualMachineServiceProvider(server,this); + } + + 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(VirtualMachineServiceOperationEnum.updateDeploymentStatus); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(VirtualMachineServiceMessageEnum.updateDeploymentStatus, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.OKAY, duration_); + + } + + 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(VirtualMachineServiceOperationEnum.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(VirtualMachineServiceMessageEnum.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(VirtualMachineServiceOperationEnum.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(VirtualMachineServiceMessageEnum.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(VirtualMachineServiceOperationEnum.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(VirtualMachineServiceMessageEnum.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(VirtualMachineServiceOperationEnum.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(VirtualMachineServiceMessageEnum.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(VirtualMachineServiceOperationEnum.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(VirtualMachineServiceMessageEnum.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(VirtualMachineServiceOperationEnum.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(VirtualMachineServiceMessageEnum.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(VirtualMachineServiceOperationEnum.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(VirtualMachineServiceMessageEnum.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(VirtualMachineServiceOperationEnum.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(VirtualMachineServiceMessageEnum.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(VirtualMachineServiceOperationEnum.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(VirtualMachineServiceMessageEnum.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(VirtualMachineServiceOperationEnum.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(VirtualMachineServiceMessageEnum.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(VirtualMachineServiceOperationEnum.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(VirtualMachineServiceMessageEnum.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() { + DcaeVirtualMachineServiceProvider.ecoreSetup(); + } + public DcaeVirtualMachineServiceProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceClient.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceClient.java new file mode 100644 index 0000000..65cdc1b --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceClient.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.vm; + +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.vm.impl.VirtualMachineServiceImpl; +import org.openecomp.dcae.controller.service.vm.VmPackage; +import org.openecomp.dcae.controller.service.servers.vm.logging.VirtualMachineServiceOperationEnum; +import org.openecomp.dcae.controller.service.servers.vm.logging.VirtualMachineServiceMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeVirtualMachineServiceClient extends VirtualMachineServiceImpl { + public static final Logger logger = Logger.getLogger(DcaeVirtualMachineServiceClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeVirtualMachineServiceClient(String file, String name) { + DcaeVirtualMachineService.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeVirtualMachineServiceClient(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 DcaeVirtualMachineServiceClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public void updateDeploymentStatus() { + EClass c = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_updateDeploymentStatus); + + try { + client.operationPath("/resources", c, "updateDeploymentStatus", null); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.REMOTE_updateDeploymentStatus, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateDeploymentStatus: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void deploy(java.lang.String instanceName, java.lang.String containerPath) { + EClass c = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_deploy); + + try { + client.operationPath("/resources", c, "deploy", null, instanceName,containerPath); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.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 = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_undeploy); + + try { + client.operationPath("/resources", c, "undeploy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.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 = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.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(VirtualMachineServiceMessageEnum.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 = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.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 = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.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 = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_pushManagerConfiguration); + + try { + client.operationPath("/resources", c, "pushManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.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 = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_pollManagerConfiguration); + + try { + client.operationPath("/resources", c, "pollManagerConfiguration", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.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 = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.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(VirtualMachineServiceMessageEnum.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 = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.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(VirtualMachineServiceMessageEnum.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 = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_updateConfigurationFromPolicy); + + try { + client.operationPath("/resources", c, "updateConfigurationFromPolicy", null, instanceName); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.REMOTE_updateConfigurationFromPolicy, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateConfigurationFromPolicy: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void runHealthTests() { + EClass c = VmPackage.eINSTANCE.getVirtualMachineService(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineServiceOperationEnum.REMOTE_runHealthTests); + + try { + client.operationPath("/resources", c, "runHealthTests", null); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineServiceMessageEnum.REMOTE_runHealthTests, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@runHealthTests: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceConsole.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceConsole.java new file mode 100644 index 0000000..aa306e0 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceConsole.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.vm; + + +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 DcaeVirtualMachineServiceConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeVirtualMachineServiceConsole.class); + protected DcaeVirtualMachineServiceClient controller; + + + + + public DcaeVirtualMachineServiceConsole(String filename, String name) { + super(filename, name); + controller = new DcaeVirtualMachineServiceClient(filename,name); + client = controller.client; + + } + + public DcaeVirtualMachineServiceConsole(AbstractClient c) { + controller = new DcaeVirtualMachineServiceClient(c); + client = controller.client; + } + + + public void updateDeploymentStatus() { + + try { + controller.updateDeploymentStatus(); + } + 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-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceProviderTemplate.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceProviderTemplate.java new file mode 100644 index 0000000..5aa1a26 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceProviderTemplate.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.vm; + + + + + +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.vm.impl.VirtualMachineServiceImpl; +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; + + +public class DcaeVirtualMachineServiceProviderTemplate extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(DcaeVirtualMachineServiceProviderTemplate.class); + VirtualMachineService o; + + public DcaeVirtualMachineServiceProviderTemplate(ISiriusServer controller, VirtualMachineService o) { + super(controller, o); + this.o = o; + } + + public void updateDeploymentStatus() { + + // 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-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceServer.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceServer.java new file mode 100644 index 0000000..56173b7 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVirtualMachineServiceServer.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.vm; + +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.vm.VirtualMachineService; + + + + + + +public class DcaeVirtualMachineServiceServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeVirtualMachineServiceServer.class); + String serverPath; + ManagementServer server; + DcaeVirtualMachineService controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeVmFactory f = new DcaeVmFactory(this); + + + + public DcaeVirtualMachineServiceServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeVirtualMachineService.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "VirtualMachineService", serverPath, filename); + server.addFactory(f); + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeVirtualMachineService) server.find("/").o; + webServer = new Jetty8Server("vm.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")); + + DcaeVirtualMachineServiceServer s = new DcaeVirtualMachineServiceServer("vm.properties"); + s.runWebserver(); + } + public VirtualMachineService getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVmFactory.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVmFactory.java new file mode 100644 index 0000000..0e24bee --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/DcaeVmFactory.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.vm; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VmPackage; +import org.openecomp.dcae.controller.service.vm.impl.VmFactoryImpl; + + + + + +public class DcaeVmFactory extends VmFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeVmFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return VmPackage.eINSTANCE; } + public DcaeVmFactory(ISiriusServer server) { + this.server = server; + } + @Override + public VirtualMachineService createVirtualMachineService() { + return new DcaeVirtualMachineService(server); + } + + + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineService.properties b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineService.properties new file mode 100644 index 0000000..d32cf07 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineService.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-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineServiceMessageEnum.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineServiceMessageEnum.java new file mode 100644 index 0000000..d0f7bf2 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineServiceMessageEnum.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.vm.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum VirtualMachineServiceMessageEnum 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.servers.vm.logging.VirtualMachineService"); + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineServiceOperationEnum.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineServiceOperationEnum.java new file mode 100644 index 0000000..52d420c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vm/logging/VirtualMachineServiceOperationEnum.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.vm.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum VirtualMachineServiceOperationEnum 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-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManager.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManager.java new file mode 100644 index 0000000..889b01c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManager.java @@ -0,0 +1,529 @@ + +/*- + * ============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.vmmanager; + + + + +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.vmmanager.logging.VirtualMachineManagerOperationEnum; +import org.openecomp.dcae.controller.service.servers.vmmanager.logging.VirtualMachineManagerMessageEnum; + + + + + + + +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.vmmanager.impl.VirtualMachineManagerImpl; + + + +public class DcaeVirtualMachineManager extends VirtualMachineManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeVirtualMachineManager.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public DcaeVirtualMachineManagerProvider controller; + ISiriusServer server; + + public DcaeVirtualMachineManager(ISiriusServer server) { + this.server = server; + this.controller = new DcaeVirtualMachineManagerProvider(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(VirtualMachineManagerOperationEnum.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(VirtualMachineManagerMessageEnum.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(VirtualMachineManagerOperationEnum.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(VirtualMachineManagerMessageEnum.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(VirtualMachineManagerOperationEnum.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(VirtualMachineManagerMessageEnum.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(VirtualMachineManagerOperationEnum.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(VirtualMachineManagerMessageEnum.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(VirtualMachineManagerOperationEnum.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(VirtualMachineManagerMessageEnum.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(VirtualMachineManagerOperationEnum.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(VirtualMachineManagerMessageEnum.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 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(VirtualMachineManagerOperationEnum.logs); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(VirtualMachineManagerMessageEnum.logs, e.toString()); + 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(VirtualMachineManagerOperationEnum.metrics); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(VirtualMachineManagerMessageEnum.metrics, e.toString()); + 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(VirtualMachineManagerOperationEnum.properties); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(VirtualMachineManagerMessageEnum.properties, e.toString()); + 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(VirtualMachineManagerOperationEnum.uploadInfo); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(VirtualMachineManagerMessageEnum.uploadInfo, e.toString()); + 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(VirtualMachineManagerOperationEnum.getValues); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(VirtualMachineManagerMessageEnum.getValues, e.toString()); + 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(VirtualMachineManagerOperationEnum.getValuesAll); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(VirtualMachineManagerMessageEnum.getValuesAll, e.toString()); + 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(VirtualMachineManagerOperationEnum.getMessages); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(VirtualMachineManagerMessageEnum.getMessages, e.toString()); + 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(VirtualMachineManagerOperationEnum.getRequestLogger); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(VirtualMachineManagerMessageEnum.getRequestLogger, e.toString()); + 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(VirtualMachineManagerOperationEnum.evaluate); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(VirtualMachineManagerMessageEnum.evaluate, e.toString()); + 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(VirtualMachineManagerOperationEnum.update); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + 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); + ecomplogger.warn(VirtualMachineManagerMessageEnum.update, e.toString()); + 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 static void ecoreSetup() { + DcaeVirtualMachineManagerProvider.ecoreSetup(); + } + public DcaeVirtualMachineManagerProvider getSomfProvider() { + return controller; + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerClient.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerClient.java new file mode 100644 index 0000000..1030b1c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerClient.java @@ -0,0 +1,344 @@ + +/*- + * ============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.vmmanager; + +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.vmmanager.impl.VirtualMachineManagerImpl; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; +import org.openecomp.dcae.controller.service.servers.vmmanager.logging.VirtualMachineManagerOperationEnum; +import org.openecomp.dcae.controller.service.servers.vmmanager.logging.VirtualMachineManagerMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class DcaeVirtualMachineManagerClient extends VirtualMachineManagerImpl { + public static final Logger logger = Logger.getLogger(DcaeVirtualMachineManagerClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public DcaeVirtualMachineManagerClient(String file, String name) { + DcaeVirtualMachineManager.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public DcaeVirtualMachineManagerClient(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 DcaeVirtualMachineManagerClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.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(VirtualMachineManagerMessageEnum.REMOTE_test, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@test: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void suspend() { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_suspend); + + try { + client.operationPath("/resources", c, "suspend", null); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_suspend, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@suspend: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void resume() { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_resume); + + try { + client.operationPath("/resources", c, "resume", null); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_resume, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@resume: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public java.lang.String publicKey() { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_publicKey); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "publicKey", null); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_publicKey, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@publicKey: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void configurationChanged() { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_configurationChanged); + + try { + client.operationPath("/resources", c, "configurationChanged", null); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.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 = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_updateStreams); + + try { + client.operationPath("/resources", c, "updateStreams", null, inputStreams,outputStreams); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_updateStreams, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateStreams: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void logs(org.json.JSONObject cx, EList<org.openecomp.ncomp.core.logs.LogMessage> logs) { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_logs); + + try { + client.operationPath("/resources", c, "logs", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,logs); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_logs, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@logs: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void metrics(org.json.JSONObject cx, EList<org.openecomp.ncomp.core.metrics.Metric> metrics) { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_metrics); + + try { + client.operationPath("/resources", c, "metrics", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,metrics); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_metrics, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@metrics: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void properties(org.json.JSONObject cx, EList<org.openecomp.ncomp.sirius.manager.properties.AbstractProperty> l) { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_properties); + + try { + client.operationPath("/resources", c, "properties", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,l); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_properties, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@properties: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + + @Override + public void uploadInfo(org.json.JSONObject cx, EList<org.openecomp.ncomp.sirius.manager.server.ManagementInfo> info) { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_uploadInfo); + + try { + client.operationPath("/resources", c, "uploadInfo", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,info); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_uploadInfo, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@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 = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.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(VirtualMachineManagerMessageEnum.REMOTE_getValues, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@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 = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.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(VirtualMachineManagerMessageEnum.REMOTE_getValuesAll, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@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 = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.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(VirtualMachineManagerMessageEnum.REMOTE_getMessages, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@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 = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.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(VirtualMachineManagerMessageEnum.REMOTE_getRequestLogger, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@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 = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.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(VirtualMachineManagerMessageEnum.REMOTE_evaluate, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@evaluate: " + e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EClass c = VmmanagerPackage.eINSTANCE.getVirtualMachineManager(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(VirtualMachineManagerOperationEnum.REMOTE_update); + + try { + client.operationPath("/resources", c, "update", null, path,function); + } + catch (Exception e) { + ecomplogger.warn(VirtualMachineManagerMessageEnum.REMOTE_update, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@update: " + e); + } + ecomplogger.recordMetricEventEnd(); + + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerConsole.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerConsole.java new file mode 100644 index 0000000..585fcec --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerConsole.java @@ -0,0 +1,233 @@ + +/*- + * ============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.vmmanager; + + +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 DcaeVirtualMachineManagerConsole extends Console { + public static final Logger logger = Logger.getLogger(DcaeVirtualMachineManagerConsole.class); + protected DcaeVirtualMachineManagerClient controller; + + + + + public DcaeVirtualMachineManagerConsole(String filename, String name) { + super(filename, name); + controller = new DcaeVirtualMachineManagerClient(filename,name); + client = controller.client; + + } + + public DcaeVirtualMachineManagerConsole(AbstractClient c) { + controller = new DcaeVirtualMachineManagerClient(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)); + } + + } + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerProviderTemplate.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerProviderTemplate.java new file mode 100644 index 0000000..bc197dd --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerProviderTemplate.java @@ -0,0 +1,108 @@ + +/*- + * ============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.vmmanager; + + + + + +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.ncomp.sirius.manager.BasicManagementServerProvider; + + +import org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl; +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; + + +public class DcaeVirtualMachineManagerProviderTemplate extends BasicManagementServerProvider { + private static final Logger logger = Logger.getLogger(DcaeVirtualMachineManagerProviderTemplate.class); + VirtualMachineManager o; + + public DcaeVirtualMachineManagerProviderTemplate(ISiriusServer controller, VirtualMachineManager 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-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerServer.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerServer.java new file mode 100644 index 0000000..b769ee8 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVirtualMachineManagerServer.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.vmmanager; + +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.vmmanager.VirtualMachineManager; + + + + + + +public class DcaeVirtualMachineManagerServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(DcaeVirtualMachineManagerServer.class); + String serverPath; + ManagementServer server; + DcaeVirtualMachineManager controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + DcaeVmmanagerFactory f = new DcaeVmmanagerFactory(this); + + + + public DcaeVirtualMachineManagerServer(String filename) throws IOException { + logger.warn("controller restarting"); + DcaeVirtualMachineManager.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "VirtualMachineManager", serverPath, filename); + server.addFactory(f); + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (DcaeVirtualMachineManager) server.find("/").o; + webServer = new Jetty8Server("vmmanager.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")); + + DcaeVirtualMachineManagerServer s = new DcaeVirtualMachineManagerServer("vmmanager.properties"); + s.runWebserver(); + } + public VirtualMachineManager getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVmmanagerFactory.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVmmanagerFactory.java new file mode 100644 index 0000000..99d954b --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/DcaeVmmanagerFactory.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.vmmanager; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; +import org.openecomp.dcae.controller.service.vmmanager.impl.VmmanagerFactoryImpl; + + + + + +public class DcaeVmmanagerFactory extends VmmanagerFactoryImpl { + public static final Logger logger = Logger.getLogger(DcaeVmmanagerFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return VmmanagerPackage.eINSTANCE; } + public DcaeVmmanagerFactory(ISiriusServer server) { + this.server = server; + } + @Override + public VirtualMachineManager createVirtualMachineManager() { + return new DcaeVirtualMachineManager(server); + } + + + +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManager.properties b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManager.properties new file mode 100644 index 0000000..9eb6331 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManager.properties @@ -0,0 +1,198 @@ + +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 + +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 diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManagerMessageEnum.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManagerMessageEnum.java new file mode 100644 index 0000000..f8087ef --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManagerMessageEnum.java @@ -0,0 +1,67 @@ + +/*- + * ============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.vmmanager.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum VirtualMachineManagerMessageEnum implements EcompMessageEnum { + + dummy, + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + logs, + metrics, + properties, + uploadInfo, + getValues, + getValuesAll, + getMessages, + getRequestLogger, + evaluate, + update, + 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; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.servers.vmmanager.logging.VirtualMachineManager"); + } +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManagerOperationEnum.java b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManagerOperationEnum.java new file mode 100644 index 0000000..71aeeda --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/sirius-gen/org/openecomp/dcae/controller/service/servers/vmmanager/logging/VirtualMachineManagerOperationEnum.java @@ -0,0 +1,61 @@ + +/*- + * ============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.vmmanager.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum VirtualMachineManagerOperationEnum implements EcompOperationEnum { + + test, + suspend, + resume, + publicKey, + configurationChanged, + updateStreams, + logs, + metrics, + properties, + uploadInfo, + getValues, + getValuesAll, + getMessages, + getRequestLogger, + evaluate, + update, + 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; +} diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/.classpath b/dcae-controller-service-vm/dcae-controller-service-vm-model/.classpath new file mode 100644 index 0000000..69b19c6 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-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-vm/dcae-controller-service-vm-model/.gitignore b/dcae-controller-service-vm/dcae-controller-service-vm-model/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/.project b/dcae-controller-service-vm/dcae-controller-service-vm-model/.project new file mode 100644 index 0000000..c4817ae --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/.project @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>dcae-controller-service-vm-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-vm/dcae-controller-service-vm-model/.settings/org.eclipse.jdt.core.prefs b/dcae-controller-service-vm/dcae-controller-service-vm-model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-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-vm/dcae-controller-service-vm-model/.settings/org.eclipse.m2e.core.prefs b/dcae-controller-service-vm/dcae-controller-service-vm-model/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-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-vm/dcae-controller-service-vm-model/LICENSE.txt b/dcae-controller-service-vm/dcae-controller-service-vm-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-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-vm/dcae-controller-service-vm-model/META-INF/MANIFEST.MF b/dcae-controller-service-vm/dcae-controller-service-vm-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..7994e26 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/META-INF/MANIFEST.MF @@ -0,0 +1,27 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: dcae-controller-service-vm-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.vm, + org.openecomp.dcae.controller.service.vm.impl, + org.openecomp.dcae.controller.service.vm.util, + org.openecomp.dcae.controller.service.vmmanager, + org.openecomp.dcae.controller.service.vmmanager.impl, + org.openecomp.dcae.controller.service.vmmanager.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-core-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-sirius-manager-agent-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", + ncomp-openstack-model;bundle-version="0.1.0";visibility:=reexport, + dcae-controller-core-model;bundle-version="0.1.0";visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/build.properties b/dcae-controller-service-vm/dcae-controller-service-vm-model/build.properties new file mode 100644 index 0000000..6d35b6f --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-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-vm/dcae-controller-service-vm-model/plugin.properties b/dcae-controller-service-vm/dcae-controller-service-vm-model/plugin.properties new file mode 100644 index 0000000..04852d2 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Router Model +providerName = www.example.org diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/plugin.xml b/dcae-controller-service-vm/dcae-controller-service-vm-model/plugin.xml new file mode 100644 index 0000000..4b6bfc6 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-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.vm" + class="org.openecomp.dcae.controller.service.vm.VmPackage" + genModel="src/main/xcore/service.xcore"/> + </extension> + + <extension point="org.eclipse.emf.ecore.generated_package"> + <!-- @generated manager --> + <package + uri="org.openecomp.dcae.controller.service.vmmanager" + class="org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage" + genModel="src/main/xcore/manager.xcore"/> + </extension> + +</plugin> diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/pom.xml b/dcae-controller-service-vm/dcae-controller-service-vm-model/pom.xml new file mode 100644 index 0000000..ae32ddd --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/pom.xml @@ -0,0 +1,28 @@ +<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-vm-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.openstack</groupId> + <artifactId>ncomp-openstack-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> + </dependencies> +</project> diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ControllerVirtualMachineService.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ControllerVirtualMachineService.java new file mode 100644 index 0000000..8763179 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ControllerVirtualMachineService.java @@ -0,0 +1,38 @@ + +/*- + * ============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.vm; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Controller Virtual Machine Service</b></em>'. + * <!-- end-user-doc --> + * + * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getControllerVirtualMachineService() + * @model + * @generated + */ +public interface ControllerVirtualMachineService extends VirtualMachineService { +} // ControllerVirtualMachineService diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ControllerVirtualMachineServiceInstance.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ControllerVirtualMachineServiceInstance.java new file mode 100644 index 0000000..7535c5d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ControllerVirtualMachineServiceInstance.java @@ -0,0 +1,38 @@ + +/*- + * ============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.vm; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Controller Virtual Machine Service Instance</b></em>'. + * <!-- end-user-doc --> + * + * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getControllerVirtualMachineServiceInstance() + * @model + * @generated + */ +public interface ControllerVirtualMachineServiceInstance extends VirtualMachineServiceInstance { +} // ControllerVirtualMachineServiceInstance diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/HttpInstallationStep.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/HttpInstallationStep.java new file mode 100644 index 0000000..24fe60c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/HttpInstallationStep.java @@ -0,0 +1,178 @@ + +/*- + * ============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.vm; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Http Installation Step</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getUrl <em>Url</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getUserName <em>User Name</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getPassword <em>Password</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getType <em>Type</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getArtifactId <em>Artifact Id</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getHttpInstallationStep() + * @model + * @generated + */ +public interface HttpInstallationStep extends InstallationStep { + /** + * Returns the value of the '<em><b>Url</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Url</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Url</em>' attribute. + * @see #setUrl(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getHttpInstallationStep_Url() + * @model unique="false" + * @generated + */ + String getUrl(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getUrl <em>Url</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Url</em>' attribute. + * @see #getUrl() + * @generated + */ + void setUrl(String value); + + /** + * Returns the value of the '<em><b>User Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>User 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>User Name</em>' attribute. + * @see #setUserName(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getHttpInstallationStep_UserName() + * @model unique="false" + * @generated + */ + String getUserName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getUserName <em>User Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>User Name</em>' attribute. + * @see #getUserName() + * @generated + */ + void setUserName(String value); + + /** + * Returns the value of the '<em><b>Password</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Password</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Password</em>' attribute. + * @see #setPassword(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getHttpInstallationStep_Password() + * @model unique="false" + * @generated + */ + String getPassword(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getPassword <em>Password</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Password</em>' attribute. + * @see #getPassword() + * @generated + */ + void setPassword(String value); + + /** + * Returns the value of the '<em><b>Type</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Type</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Type</em>' attribute. + * @see #setType(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getHttpInstallationStep_Type() + * @model unique="false" + * @generated + */ + String getType(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getType <em>Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Type</em>' attribute. + * @see #getType() + * @generated + */ + void setType(String value); + + /** + * Returns the value of the '<em><b>Artifact Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Artifact Id</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 Id</em>' attribute. + * @see #setArtifactId(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getHttpInstallationStep_ArtifactId() + * @model unique="false" + * @generated + */ + String getArtifactId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getArtifactId <em>Artifact Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Artifact Id</em>' attribute. + * @see #getArtifactId() + * @generated + */ + void setArtifactId(String value); + +} // HttpInstallationStep diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/InstallationStep.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/InstallationStep.java new file mode 100644 index 0000000..7af4aad --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/InstallationStep.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.vm; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Installation Step</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.InstallationStep#getApplicationId <em>Application Id</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getInstallationStep() + * @model abstract="true" + * @generated + */ +public interface InstallationStep extends NamedEntity { + + /** + * Returns the value of the '<em><b>Application Id</b></em>' attribute. + * The default value is <code>"dcae"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Application Id</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Application Id</em>' attribute. + * @see #setApplicationId(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getInstallationStep_ApplicationId() + * @model default="dcae" unique="false" + * @generated + */ + String getApplicationId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.InstallationStep#getApplicationId <em>Application Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Application Id</em>' attribute. + * @see #getApplicationId() + * @generated + */ + void setApplicationId(String value); +} // InstallationStep diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/MavenArtifactInstallationStep.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/MavenArtifactInstallationStep.java new file mode 100644 index 0000000..6b01696 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/MavenArtifactInstallationStep.java @@ -0,0 +1,178 @@ + +/*- + * ============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.vm; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Maven Artifact Installation Step</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getGroupId <em>Group Id</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getArtifactId <em>Artifact Id</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getVersion <em>Version</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getType <em>Type</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getAssemblyId <em>Assembly Id</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getMavenArtifactInstallationStep() + * @model + * @generated + */ +public interface MavenArtifactInstallationStep extends InstallationStep { + /** + * Returns the value of the '<em><b>Group Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Group Id</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Group Id</em>' attribute. + * @see #setGroupId(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getMavenArtifactInstallationStep_GroupId() + * @model unique="false" + * @generated + */ + String getGroupId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getGroupId <em>Group Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Group Id</em>' attribute. + * @see #getGroupId() + * @generated + */ + void setGroupId(String value); + + /** + * Returns the value of the '<em><b>Artifact Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Artifact Id</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 Id</em>' attribute. + * @see #setArtifactId(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getMavenArtifactInstallationStep_ArtifactId() + * @model unique="false" + * @generated + */ + String getArtifactId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getArtifactId <em>Artifact Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Artifact Id</em>' attribute. + * @see #getArtifactId() + * @generated + */ + void setArtifactId(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.vm.VmPackage#getMavenArtifactInstallationStep_Version() + * @model unique="false" + * @generated + */ + String getVersion(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#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>Type</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Type</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Type</em>' attribute. + * @see #setType(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getMavenArtifactInstallationStep_Type() + * @model unique="false" + * @generated + */ + String getType(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getType <em>Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Type</em>' attribute. + * @see #getType() + * @generated + */ + void setType(String value); + + /** + * Returns the value of the '<em><b>Assembly Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Assembly Id</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Assembly Id</em>' attribute. + * @see #setAssemblyId(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getMavenArtifactInstallationStep_AssemblyId() + * @model unique="false" + * @generated + */ + String getAssemblyId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getAssemblyId <em>Assembly Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Assembly Id</em>' attribute. + * @see #getAssemblyId() + * @generated + */ + void setAssemblyId(String value); + +} // MavenArtifactInstallationStep diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/PhysicalMachine.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/PhysicalMachine.java new file mode 100644 index 0000000..f2ea0ed --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/PhysicalMachine.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.vm; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Physical Machine</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.PhysicalMachine#getManagerPortNumber <em>Manager Port Number</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getPhysicalMachine() + * @model + * @generated + */ +public interface PhysicalMachine extends DcaeBasicServer { + + /** + * Returns the value of the '<em><b>Manager Port Number</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Manager Port Number</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Manager Port Number</em>' attribute. + * @see #setManagerPortNumber(Integer) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getPhysicalMachine_ManagerPortNumber() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + Integer getManagerPortNumber(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.PhysicalMachine#getManagerPortNumber <em>Manager Port Number</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Manager Port Number</em>' attribute. + * @see #getManagerPortNumber() + * @generated + */ + void setManagerPortNumber(Integer value); +} // PhysicalMachine diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ShellInstallationStep.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ShellInstallationStep.java new file mode 100644 index 0000000..85a6b2c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/ShellInstallationStep.java @@ -0,0 +1,70 @@ + +/*- + * ============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.vm; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Shell Installation Step</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.ShellInstallationStep#getCommand <em>Command</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getShellInstallationStep() + * @model + * @generated + */ +public interface ShellInstallationStep extends InstallationStep { + /** + * Returns the value of the '<em><b>Command</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Command</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Command</em>' attribute. + * @see #setCommand(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getShellInstallationStep_Command() + * @model unique="false" + * @generated + */ + String getCommand(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.ShellInstallationStep#getCommand <em>Command</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Command</em>' attribute. + * @see #getCommand() + * @generated + */ + void setCommand(String value); + +} // ShellInstallationStep diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachine.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachine.java new file mode 100644 index 0000000..5a96915 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachine.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.vm; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Virtual Machine</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getFunctionIndex <em>Function Index</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getKvmName <em>Kvm Name</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getVnc <em>Vnc</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getGateway <em>Gateway</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachine() + * @model + * @generated + */ +public interface VirtualMachine extends DcaeBasicServer { + /** + * Returns the value of the '<em><b>Function Index</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Function Index</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Function Index</em>' attribute. + * @see #setFunctionIndex(int) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachine_FunctionIndex() + * @model unique="false" + * @generated + */ + int getFunctionIndex(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getFunctionIndex <em>Function Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Function Index</em>' attribute. + * @see #getFunctionIndex() + * @generated + */ + void setFunctionIndex(int value); + + /** + * Returns the value of the '<em><b>Kvm Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Kvm 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>Kvm Name</em>' attribute. + * @see #setKvmName(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachine_KvmName() + * @model unique="false" + * @generated + */ + String getKvmName(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getKvmName <em>Kvm Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Kvm Name</em>' attribute. + * @see #getKvmName() + * @generated + */ + void setKvmName(String value); + + /** + * Returns the value of the '<em><b>Vnc</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Vnc</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Vnc</em>' attribute. + * @see #setVnc(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachine_Vnc() + * @model unique="false" + * @generated + */ + String getVnc(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getVnc <em>Vnc</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Vnc</em>' attribute. + * @see #getVnc() + * @generated + */ + void setVnc(String value); + + /** + * Returns the value of the '<em><b>Gateway</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Gateway</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Gateway</em>' attribute. + * @see #setGateway(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachine_Gateway() + * @model unique="false" + * @generated + */ + String getGateway(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getGateway <em>Gateway</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Gateway</em>' attribute. + * @see #getGateway() + * @generated + */ + void setGateway(String value); + +} // VirtualMachine diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineService.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineService.java new file mode 100644 index 0000000..9c73ebd --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineService.java @@ -0,0 +1,102 @@ + +/*- + * ============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.vm; + +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>Virtual Machine Service</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService#getInstances <em>Instances</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService#getManagerPortNumber <em>Manager Port Number</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineService() + * @model + * @generated + */ +public interface VirtualMachineService 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.vm.VirtualMachineServiceInstance}. + * It is bidirectional and its opposite is '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#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.vm.VmPackage#getVirtualMachineService_Instances() + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getService + * @model opposite="service" containment="true" + * @generated + */ + EList<VirtualMachineServiceInstance> getInstances(); + + /** + * Returns the value of the '<em><b>Manager Port Number</b></em>' attribute. + * The default value is <code>"9999"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Manager Port Number</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Manager Port Number</em>' attribute. + * @see #setManagerPortNumber(int) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineService_ManagerPortNumber() + * @model default="9999" unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + int getManagerPortNumber(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService#getManagerPortNumber <em>Manager Port Number</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Manager Port Number</em>' attribute. + * @see #getManagerPortNumber() + * @generated + */ + void setManagerPortNumber(int value); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @model + * @generated + */ + void updateDeploymentStatus(); + +} // VirtualMachineService diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceConfiguration.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceConfiguration.java new file mode 100644 index 0000000..001bded --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceConfiguration.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.vm; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Virtual Machine Service Configuration</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration#getConfiguration <em>Configuration</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceConfiguration() + * @model + * @generated + */ +public interface VirtualMachineServiceConfiguration extends EObject { + /** + * Returns the value of the '<em><b>Configuration</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Configuration</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Configuration</em>' attribute. + * @see #setConfiguration(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceConfiguration_Configuration() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration#getConfiguration <em>Configuration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Configuration</em>' attribute. + * @see #getConfiguration() + * @generated + */ + void setConfiguration(String value); + +} // VirtualMachineServiceConfiguration diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceDescriptor.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceDescriptor.java new file mode 100644 index 0000000..5968258 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceDescriptor.java @@ -0,0 +1,268 @@ + +/*- + * ============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.vm; + +import org.openecomp.dcae.controller.core.service.DcaeServiceDescriptor; +import org.eclipse.emf.common.util.EList; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Virtual Machine Service Descriptor</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getServicePackage <em>Service Package</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getServiceClass <em>Service Class</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getServiceInstanceClass <em>Service Instance Class</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getVmType <em>Vm Type</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getManagerPortNumber <em>Manager Port Number</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getManagerUser <em>Manager User</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getEncryptedPassword <em>Encrypted Password</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getUsers <em>Users</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getAdminUsers <em>Admin Users</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceDescriptor() + * @model + * @generated + */ +public interface VirtualMachineServiceDescriptor 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.vm.VmPackage#getVirtualMachineServiceDescriptor_ServicePackage() + * @model unique="false" + * @generated + */ + String getServicePackage(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#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.vm.VmPackage#getVirtualMachineServiceDescriptor_ServiceClass() + * @model unique="false" + * @generated + */ + String getServiceClass(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#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.vm.VmPackage#getVirtualMachineServiceDescriptor_ServiceInstanceClass() + * @model unique="false" + * @generated + */ + String getServiceInstanceClass(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#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>Vm Type</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Vm Type</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Vm Type</em>' attribute. + * @see #setVmType(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceDescriptor_VmType() + * @model unique="false" + * @generated + */ + String getVmType(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getVmType <em>Vm Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Vm Type</em>' attribute. + * @see #getVmType() + * @generated + */ + void setVmType(String value); + + /** + * Returns the value of the '<em><b>Manager Port Number</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Manager Port Number</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Manager Port Number</em>' attribute. + * @see #setManagerPortNumber(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceDescriptor_ManagerPortNumber() + * @model unique="false" + * @generated + */ + String getManagerPortNumber(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getManagerPortNumber <em>Manager Port Number</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Manager Port Number</em>' attribute. + * @see #getManagerPortNumber() + * @generated + */ + void setManagerPortNumber(String value); + + /** + * Returns the value of the '<em><b>Manager User</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Manager User</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Manager User</em>' attribute. + * @see #setManagerUser(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceDescriptor_ManagerUser() + * @model unique="false" + * @generated + */ + String getManagerUser(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getManagerUser <em>Manager User</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Manager User</em>' attribute. + * @see #getManagerUser() + * @generated + */ + void setManagerUser(String value); + + /** + * Returns the value of the '<em><b>Encrypted Password</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Encrypted Password</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Encrypted Password</em>' attribute. + * @see #setEncryptedPassword(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceDescriptor_EncryptedPassword() + * @model unique="false" + * @generated + */ + String getEncryptedPassword(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getEncryptedPassword <em>Encrypted Password</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Encrypted Password</em>' attribute. + * @see #getEncryptedPassword() + * @generated + */ + void setEncryptedPassword(String value); + + /** + * Returns the value of the '<em><b>Users</b></em>' attribute list. + * The list contents are of type {@link java.lang.String}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Users</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>Users</em>' attribute list. + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceDescriptor_Users() + * @model unique="false" + * @generated + */ + EList<String> getUsers(); + + /** + * Returns the value of the '<em><b>Admin Users</b></em>' attribute list. + * The list contents are of type {@link java.lang.String}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Admin Users</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>Admin Users</em>' attribute list. + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceDescriptor_AdminUsers() + * @model unique="false" + * @generated + */ + EList<String> getAdminUsers(); + +} // VirtualMachineServiceDescriptor diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceInstance.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceInstance.java new file mode 100644 index 0000000..f095eb8 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VirtualMachineServiceInstance.java @@ -0,0 +1,548 @@ + +/*- + * ============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.vm; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; +import org.openecomp.dcae.controller.core.service.DcaeLocation; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; +import org.openecomp.ncomp.core.User; +import org.openecomp.ncomp.openstack.core.VirtualMachineType; +import org.eclipse.emf.common.util.EList; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Virtual Machine Service Instance</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getLocation <em>Location</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getVmType <em>Vm Type</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getUsers <em>Users</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAdminUsers <em>Admin Users</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getApplicationIds <em>Application Ids</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAdminId <em>Admin Id</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getNumberOfServers <em>Number Of Servers</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAvailabilityZone <em>Availability Zone</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getManagerPortNumber <em>Manager Port Number</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getServers <em>Servers</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getLeaderServer <em>Leader Server</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getService <em>Service</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getIedsAdmin <em>Ieds Admin</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefUser <em>Chef User</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefOrg <em>Chef Org</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefTopology <em>Chef Topology</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getOpenstackFlavor <em>Openstack Flavor</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getServiceFqdn <em>Service Fqdn</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getDeploymentTimeoutMinutes <em>Deployment Timeout Minutes</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getSteps <em>Steps</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance() + * @model + * @generated + */ +public interface VirtualMachineServiceInstance extends DcaeServiceInstance, VirtualMachineServiceConfiguration { + /** + * Returns the value of the '<em><b>Location</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Location</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Location</em>' reference. + * @see #setLocation(DcaeLocation) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_Location() + * @model + * @generated + */ + DcaeLocation getLocation(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getLocation <em>Location</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Location</em>' reference. + * @see #getLocation() + * @generated + */ + void setLocation(DcaeLocation value); + + /** + * Returns the value of the '<em><b>Vm Type</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Vm Type</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Vm Type</em>' reference. + * @see #setVmType(VirtualMachineType) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_VmType() + * @model annotation="http://openecomp.org type='service'" + * @generated + */ + VirtualMachineType getVmType(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getVmType <em>Vm Type</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Vm Type</em>' reference. + * @see #getVmType() + * @generated + */ + void setVmType(VirtualMachineType value); + + /** + * Returns the value of the '<em><b>Users</b></em>' reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.User}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Users</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Users</em>' reference list. + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_Users() + * @model annotation="http://openecomp.org type='service'" + * @generated + */ + EList<User> getUsers(); + + /** + * Returns the value of the '<em><b>Admin Users</b></em>' reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.User}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Admin Users</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Admin Users</em>' reference list. + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_AdminUsers() + * @model annotation="http://openecomp.org type='service'" + * @generated + */ + EList<User> getAdminUsers(); + + /** + * Returns the value of the '<em><b>Application Ids</b></em>' attribute list. + * The list contents are of type {@link java.lang.String}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Application Ids</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>Application Ids</em>' attribute list. + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_ApplicationIds() + * @model unique="false" + * @generated + */ + EList<String> getApplicationIds(); + + /** + * Returns the value of the '<em><b>Admin Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Admin Id</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Admin Id</em>' attribute. + * @see #setAdminId(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_AdminId() + * @model unique="false" + * @generated + */ + String getAdminId(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAdminId <em>Admin Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Admin Id</em>' attribute. + * @see #getAdminId() + * @generated + */ + void setAdminId(String value); + + /** + * Returns the value of the '<em><b>Number Of Servers</b></em>' attribute. + * The default value is <code>"1"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Number Of Servers</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Number Of Servers</em>' attribute. + * @see #setNumberOfServers(int) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_NumberOfServers() + * @model default="1" unique="false" + * annotation="http://openecomp.org type='service'" + * @generated + */ + int getNumberOfServers(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getNumberOfServers <em>Number Of Servers</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Number Of Servers</em>' attribute. + * @see #getNumberOfServers() + * @generated + */ + void setNumberOfServers(int value); + + /** + * Returns the value of the '<em><b>Availability Zone</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Availability Zone</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Availability Zone</em>' attribute. + * @see #setAvailabilityZone(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_AvailabilityZone() + * @model unique="false" + * annotation="http://openecomp.org type='service'" + * @generated + */ + String getAvailabilityZone(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAvailabilityZone <em>Availability Zone</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Availability Zone</em>' attribute. + * @see #getAvailabilityZone() + * @generated + */ + void setAvailabilityZone(String value); + + /** + * Returns the value of the '<em><b>Manager Port Number</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Manager Port Number</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Manager Port Number</em>' attribute. + * @see #setManagerPortNumber(Integer) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_ManagerPortNumber() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + Integer getManagerPortNumber(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getManagerPortNumber <em>Manager Port Number</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Manager Port Number</em>' attribute. + * @see #getManagerPortNumber() + * @generated + */ + void setManagerPortNumber(Integer value); + + /** + * Returns the value of the '<em><b>Servers</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.core.server.DcaeBasicServer}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Servers</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>Servers</em>' containment reference list. + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_Servers() + * @model containment="true" + * annotation="http://openecomp.org type='operational'" + * @generated + */ + EList<DcaeBasicServer> getServers(); + + /** + * Returns the value of the '<em><b>Leader Server</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Leader Server</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Leader Server</em>' reference. + * @see #setLeaderServer(DcaeBasicServer) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_LeaderServer() + * @model + * @generated + */ + DcaeBasicServer getLeaderServer(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getLeaderServer <em>Leader Server</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Leader Server</em>' reference. + * @see #getLeaderServer() + * @generated + */ + void setLeaderServer(DcaeBasicServer 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.vm.VirtualMachineService#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(VirtualMachineService) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_Service() + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineService#getInstances + * @model opposite="instances" transient="false" + * annotation="http://openecomp.org type='operational'" + * @generated + */ + VirtualMachineService getService(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#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(VirtualMachineService value); + + /** + * Returns the value of the '<em><b>Ieds Admin</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Ieds Admin</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Ieds Admin</em>' attribute. + * @see #setIedsAdmin(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_IedsAdmin() + * @model unique="false" + * @generated + */ + String getIedsAdmin(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getIedsAdmin <em>Ieds Admin</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Ieds Admin</em>' attribute. + * @see #getIedsAdmin() + * @generated + */ + void setIedsAdmin(String value); + + /** + * Returns the value of the '<em><b>Chef User</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Chef User</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Chef User</em>' attribute. + * @see #setChefUser(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_ChefUser() + * @model unique="false" + * @generated + */ + String getChefUser(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefUser <em>Chef User</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Chef User</em>' attribute. + * @see #getChefUser() + * @generated + */ + void setChefUser(String value); + + /** + * Returns the value of the '<em><b>Chef Org</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Chef Org</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Chef Org</em>' attribute. + * @see #setChefOrg(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_ChefOrg() + * @model unique="false" + * @generated + */ + String getChefOrg(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefOrg <em>Chef Org</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Chef Org</em>' attribute. + * @see #getChefOrg() + * @generated + */ + void setChefOrg(String value); + + /** + * Returns the value of the '<em><b>Chef Topology</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Chef Topology</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Chef Topology</em>' attribute. + * @see #setChefTopology(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_ChefTopology() + * @model unique="false" + * @generated + */ + String getChefTopology(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefTopology <em>Chef Topology</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Chef Topology</em>' attribute. + * @see #getChefTopology() + * @generated + */ + void setChefTopology(String value); + + /** + * Returns the value of the '<em><b>Openstack Flavor</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Openstack Flavor</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Openstack Flavor</em>' attribute. + * @see #setOpenstackFlavor(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_OpenstackFlavor() + * @model unique="false" + * @generated + */ + String getOpenstackFlavor(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getOpenstackFlavor <em>Openstack Flavor</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Openstack Flavor</em>' attribute. + * @see #getOpenstackFlavor() + * @generated + */ + void setOpenstackFlavor(String value); + + /** + * Returns the value of the '<em><b>Service Fqdn</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Service Fqdn</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 Fqdn</em>' attribute. + * @see #setServiceFqdn(String) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_ServiceFqdn() + * @model unique="false" + * @generated + */ + String getServiceFqdn(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getServiceFqdn <em>Service Fqdn</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Service Fqdn</em>' attribute. + * @see #getServiceFqdn() + * @generated + */ + void setServiceFqdn(String value); + + /** + * Returns the value of the '<em><b>Deployment Timeout Minutes</b></em>' attribute. + * The default value is <code>"90"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Deployment Timeout Minutes</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Deployment Timeout Minutes</em>' attribute. + * @see #setDeploymentTimeoutMinutes(int) + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_DeploymentTimeoutMinutes() + * @model default="90" unique="false" + * @generated + */ + int getDeploymentTimeoutMinutes(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getDeploymentTimeoutMinutes <em>Deployment Timeout Minutes</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Deployment Timeout Minutes</em>' attribute. + * @see #getDeploymentTimeoutMinutes() + * @generated + */ + void setDeploymentTimeoutMinutes(int value); + + /** + * Returns the value of the '<em><b>Steps</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.dcae.controller.service.vm.InstallationStep}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Steps</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>Steps</em>' containment reference list. + * @see org.openecomp.dcae.controller.service.vm.VmPackage#getVirtualMachineServiceInstance_Steps() + * @model containment="true" + * @generated + */ + EList<InstallationStep> getSteps(); + +} // VirtualMachineServiceInstance diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VmFactory.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VmFactory.java new file mode 100644 index 0000000..6670a28 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VmFactory.java @@ -0,0 +1,135 @@ + +/*- + * ============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.vm; + +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.vm.VmPackage + * @generated + */ +public interface VmFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + VmFactory eINSTANCE = org.openecomp.dcae.controller.service.vm.impl.VmFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Virtual Machine Service</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Virtual Machine Service</em>'. + * @generated + */ + VirtualMachineService createVirtualMachineService(); + + /** + * Returns a new object of class '<em>Virtual Machine Service Instance</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Virtual Machine Service Instance</em>'. + * @generated + */ + VirtualMachineServiceInstance createVirtualMachineServiceInstance(); + + /** + * Returns a new object of class '<em>Virtual Machine Service Configuration</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Virtual Machine Service Configuration</em>'. + * @generated + */ + VirtualMachineServiceConfiguration createVirtualMachineServiceConfiguration(); + + /** + * Returns a new object of class '<em>Virtual Machine Service Descriptor</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Virtual Machine Service Descriptor</em>'. + * @generated + */ + VirtualMachineServiceDescriptor createVirtualMachineServiceDescriptor(); + + /** + * Returns a new object of class '<em>Physical Machine</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Physical Machine</em>'. + * @generated + */ + PhysicalMachine createPhysicalMachine(); + + /** + * Returns a new object of class '<em>Virtual Machine</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Virtual Machine</em>'. + * @generated + */ + VirtualMachine createVirtualMachine(); + + /** + * Returns a new object of class '<em>Shell Installation Step</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Shell Installation Step</em>'. + * @generated + */ + ShellInstallationStep createShellInstallationStep(); + + /** + * Returns a new object of class '<em>Maven Artifact Installation Step</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Maven Artifact Installation Step</em>'. + * @generated + */ + MavenArtifactInstallationStep createMavenArtifactInstallationStep(); + + /** + * Returns a new object of class '<em>Http Installation Step</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Http Installation Step</em>'. + * @generated + */ + HttpInstallationStep createHttpInstallationStep(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the package supported by this factory. + * @generated + */ + VmPackage getVmPackage(); + +} //VmFactory diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VmPackage.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VmPackage.java new file mode 100644 index 0000000..cd04405 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/VmPackage.java @@ -0,0 +1,2813 @@ + +/*- + * ============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.vm; + +import org.openecomp.dcae.controller.core.server.ServerPackage; +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.vm.VmFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-vm-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service'" + * annotation="http://www.eclipse.org/emf/2011/Xcore ecomp='http://openecomp.org'" + * @generated + */ +public interface VmPackage extends EPackage { + /** + * The package name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "vm"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.vm"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "vm"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + VmPackage eINSTANCE = org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl <em>Virtual Machine Service</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachineService() + * @generated + */ + int VIRTUAL_MACHINE_SERVICE = 0; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_SERVICE__INSTANCES = ServicePackage.DCAE_SERVICE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Manager Port Number</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER = ServicePackage.DCAE_SERVICE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Virtual Machine Service</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_FEATURE_COUNT = ServicePackage.DCAE_SERVICE_FEATURE_COUNT + 2; + + /** + * The operation id for the '<em>Deploy</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_SERVICE___RUN_HEALTH_TESTS = ServicePackage.DCAE_SERVICE___RUN_HEALTH_TESTS; + + /** + * The operation id for the '<em>Update Deployment Status</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE___UPDATE_DEPLOYMENT_STATUS = ServicePackage.DCAE_SERVICE_OPERATION_COUNT + 0; + + /** + * The number of operations of the '<em>Virtual Machine Service</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_OPERATION_COUNT = ServicePackage.DCAE_SERVICE_OPERATION_COUNT + 1; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl <em>Virtual Machine Service Instance</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachineServiceInstance() + * @generated + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE = 1; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE = ServicePackage.DCAE_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 VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Location</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Vm Type</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Users</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Admin Users</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 4; + + /** + * The feature id for the '<em><b>Application Ids</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 5; + + /** + * The feature id for the '<em><b>Admin Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 6; + + /** + * The feature id for the '<em><b>Number Of Servers</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 7; + + /** + * The feature id for the '<em><b>Availability Zone</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 8; + + /** + * The feature id for the '<em><b>Manager Port Number</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 9; + + /** + * The feature id for the '<em><b>Servers</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 10; + + /** + * The feature id for the '<em><b>Leader Server</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 11; + + /** + * The feature id for the '<em><b>Service</b></em>' container reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 12; + + /** + * The feature id for the '<em><b>Ieds Admin</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 13; + + /** + * The feature id for the '<em><b>Chef User</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 14; + + /** + * The feature id for the '<em><b>Chef Org</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 15; + + /** + * The feature id for the '<em><b>Chef Topology</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 16; + + /** + * The feature id for the '<em><b>Openstack Flavor</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 17; + + /** + * The feature id for the '<em><b>Service Fqdn</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 18; + + /** + * The feature id for the '<em><b>Deployment Timeout Minutes</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 19; + + /** + * The feature id for the '<em><b>Steps</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 20; + + /** + * The number of structural features of the '<em>Virtual Machine Service Instance</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT = ServicePackage.DCAE_SERVICE_INSTANCE_FEATURE_COUNT + 21; + + /** + * The number of operations of the '<em>Virtual Machine Service Instance</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_INSTANCE_OPERATION_COUNT = ServicePackage.DCAE_SERVICE_INSTANCE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceConfigurationImpl <em>Virtual Machine Service Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachineServiceConfiguration() + * @generated + */ + int VIRTUAL_MACHINE_SERVICE_CONFIGURATION = 2; + + /** + * The feature id for the '<em><b>Configuration</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_CONFIGURATION__CONFIGURATION = 0; + + /** + * The number of structural features of the '<em>Virtual Machine Service Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_CONFIGURATION_FEATURE_COUNT = 1; + + /** + * The number of operations of the '<em>Virtual Machine Service Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_CONFIGURATION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl <em>Virtual Machine Service Descriptor</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachineServiceDescriptor() + * @generated + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR = 3; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Vm Type</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__VM_TYPE = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Manager Port Number</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 4; + + /** + * The feature id for the '<em><b>Manager User</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_USER = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 5; + + /** + * The feature id for the '<em><b>Encrypted Password</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 6; + + /** + * The feature id for the '<em><b>Users</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__USERS = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 7; + + /** + * The feature id for the '<em><b>Admin Users</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ADMIN_USERS = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 8; + + /** + * The number of structural features of the '<em>Virtual Machine Service Descriptor</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR_FEATURE_COUNT = ServicePackage.DCAE_SERVICE_DESCRIPTOR_FEATURE_COUNT + 9; + + /** + * The number of operations of the '<em>Virtual Machine Service Descriptor</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_SERVICE_DESCRIPTOR_OPERATION_COUNT = ServicePackage.DCAE_SERVICE_DESCRIPTOR_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.PhysicalMachineImpl <em>Physical Machine</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.PhysicalMachineImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getPhysicalMachine() + * @generated + */ + int PHYSICAL_MACHINE = 4; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__NAME = ServerPackage.DCAE_BASIC_SERVER__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__LAST_POLLED = ServerPackage.DCAE_BASIC_SERVER__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__LAST_CHANGED = ServerPackage.DCAE_BASIC_SERVER__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__CREATED = ServerPackage.DCAE_BASIC_SERVER__CREATED; + + /** + * The feature id for the '<em><b>Operational State</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__OPERATIONAL_STATE = ServerPackage.DCAE_BASIC_SERVER__OPERATIONAL_STATE; + + /** + * The feature id for the '<em><b>Log Message Configuration</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__LOG_MESSAGE_CONFIGURATION = ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CONFIGURATION; + + /** + * The feature id for the '<em><b>Log Message Categories</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__LOG_MESSAGE_CATEGORIES = ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CATEGORIES; + + /** + * The feature id for the '<em><b>Log Message Stats</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__LOG_MESSAGE_STATS = ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_STATS; + + /** + * The feature id for the '<em><b>Private Ip</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__PRIVATE_IP = ServerPackage.DCAE_BASIC_SERVER__PRIVATE_IP; + + /** + * The feature id for the '<em><b>Public Ip</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__PUBLIC_IP = ServerPackage.DCAE_BASIC_SERVER__PUBLIC_IP; + + /** + * The feature id for the '<em><b>Collectd</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__COLLECTD = ServerPackage.DCAE_BASIC_SERVER__COLLECTD; + + /** + * The feature id for the '<em><b>Modules</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__MODULES = ServerPackage.DCAE_BASIC_SERVER__MODULES; + + /** + * The feature id for the '<em><b>Networks</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__NETWORKS = ServerPackage.DCAE_BASIC_SERVER__NETWORKS; + + /** + * The feature id for the '<em><b>Last Update</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__LAST_UPDATE = ServerPackage.DCAE_BASIC_SERVER__LAST_UPDATE; + + /** + * The feature id for the '<em><b>Using Monitoring Agent</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__USING_MONITORING_AGENT = ServerPackage.DCAE_BASIC_SERVER__USING_MONITORING_AGENT; + + /** + * The feature id for the '<em><b>Server</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__SERVER = ServerPackage.DCAE_BASIC_SERVER__SERVER; + + /** + * The feature id for the '<em><b>Hypervisor</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__HYPERVISOR = ServerPackage.DCAE_BASIC_SERVER__HYPERVISOR; + + /** + * The feature id for the '<em><b>Vm Type</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__VM_TYPE = ServerPackage.DCAE_BASIC_SERVER__VM_TYPE; + + /** + * The feature id for the '<em><b>Certificate Password</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__CERTIFICATE_PASSWORD = ServerPackage.DCAE_BASIC_SERVER__CERTIFICATE_PASSWORD; + + /** + * The feature id for the '<em><b>Manager Port Number</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE__MANAGER_PORT_NUMBER = ServerPackage.DCAE_BASIC_SERVER_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Physical Machine</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE_FEATURE_COUNT = ServerPackage.DCAE_BASIC_SERVER_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Physical Machine</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int PHYSICAL_MACHINE_OPERATION_COUNT = ServerPackage.DCAE_BASIC_SERVER_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineImpl <em>Virtual Machine</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachine() + * @generated + */ + int VIRTUAL_MACHINE = 5; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__NAME = ServerPackage.DCAE_BASIC_SERVER__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__LAST_POLLED = ServerPackage.DCAE_BASIC_SERVER__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__LAST_CHANGED = ServerPackage.DCAE_BASIC_SERVER__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__CREATED = ServerPackage.DCAE_BASIC_SERVER__CREATED; + + /** + * The feature id for the '<em><b>Operational State</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__OPERATIONAL_STATE = ServerPackage.DCAE_BASIC_SERVER__OPERATIONAL_STATE; + + /** + * The feature id for the '<em><b>Log Message Configuration</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__LOG_MESSAGE_CONFIGURATION = ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CONFIGURATION; + + /** + * The feature id for the '<em><b>Log Message Categories</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__LOG_MESSAGE_CATEGORIES = ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_CATEGORIES; + + /** + * The feature id for the '<em><b>Log Message Stats</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__LOG_MESSAGE_STATS = ServerPackage.DCAE_BASIC_SERVER__LOG_MESSAGE_STATS; + + /** + * The feature id for the '<em><b>Private Ip</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__PRIVATE_IP = ServerPackage.DCAE_BASIC_SERVER__PRIVATE_IP; + + /** + * The feature id for the '<em><b>Public Ip</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__PUBLIC_IP = ServerPackage.DCAE_BASIC_SERVER__PUBLIC_IP; + + /** + * The feature id for the '<em><b>Collectd</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__COLLECTD = ServerPackage.DCAE_BASIC_SERVER__COLLECTD; + + /** + * The feature id for the '<em><b>Modules</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__MODULES = ServerPackage.DCAE_BASIC_SERVER__MODULES; + + /** + * The feature id for the '<em><b>Networks</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__NETWORKS = ServerPackage.DCAE_BASIC_SERVER__NETWORKS; + + /** + * The feature id for the '<em><b>Last Update</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__LAST_UPDATE = ServerPackage.DCAE_BASIC_SERVER__LAST_UPDATE; + + /** + * The feature id for the '<em><b>Using Monitoring Agent</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__USING_MONITORING_AGENT = ServerPackage.DCAE_BASIC_SERVER__USING_MONITORING_AGENT; + + /** + * The feature id for the '<em><b>Server</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__SERVER = ServerPackage.DCAE_BASIC_SERVER__SERVER; + + /** + * The feature id for the '<em><b>Hypervisor</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__HYPERVISOR = ServerPackage.DCAE_BASIC_SERVER__HYPERVISOR; + + /** + * The feature id for the '<em><b>Vm Type</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__VM_TYPE = ServerPackage.DCAE_BASIC_SERVER__VM_TYPE; + + /** + * The feature id for the '<em><b>Certificate Password</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__CERTIFICATE_PASSWORD = ServerPackage.DCAE_BASIC_SERVER__CERTIFICATE_PASSWORD; + + /** + * The feature id for the '<em><b>Function Index</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__FUNCTION_INDEX = ServerPackage.DCAE_BASIC_SERVER_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Kvm Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__KVM_NAME = ServerPackage.DCAE_BASIC_SERVER_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Vnc</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__VNC = ServerPackage.DCAE_BASIC_SERVER_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Gateway</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE__GATEWAY = ServerPackage.DCAE_BASIC_SERVER_FEATURE_COUNT + 3; + + /** + * The number of structural features of the '<em>Virtual Machine</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_FEATURE_COUNT = ServerPackage.DCAE_BASIC_SERVER_FEATURE_COUNT + 4; + + /** + * The number of operations of the '<em>Virtual Machine</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_OPERATION_COUNT = ServerPackage.DCAE_BASIC_SERVER_OPERATION_COUNT + 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.InstallationStepImpl <em>Installation Step</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.InstallationStepImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getInstallationStep() + * @generated + */ + int INSTALLATION_STEP = 6; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INSTALLATION_STEP__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 INSTALLATION_STEP__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 INSTALLATION_STEP__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 INSTALLATION_STEP__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the '<em><b>Application Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INSTALLATION_STEP__APPLICATION_ID = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Installation Step</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INSTALLATION_STEP_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Installation Step</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INSTALLATION_STEP_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.ShellInstallationStepImpl <em>Shell Installation Step</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.ShellInstallationStepImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getShellInstallationStep() + * @generated + */ + int SHELL_INSTALLATION_STEP = 7; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SHELL_INSTALLATION_STEP__NAME = INSTALLATION_STEP__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SHELL_INSTALLATION_STEP__LAST_POLLED = INSTALLATION_STEP__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SHELL_INSTALLATION_STEP__LAST_CHANGED = INSTALLATION_STEP__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SHELL_INSTALLATION_STEP__CREATED = INSTALLATION_STEP__CREATED; + + /** + * The feature id for the '<em><b>Application Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SHELL_INSTALLATION_STEP__APPLICATION_ID = INSTALLATION_STEP__APPLICATION_ID; + + /** + * The feature id for the '<em><b>Command</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SHELL_INSTALLATION_STEP__COMMAND = INSTALLATION_STEP_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Shell Installation Step</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SHELL_INSTALLATION_STEP_FEATURE_COUNT = INSTALLATION_STEP_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Shell Installation Step</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SHELL_INSTALLATION_STEP_OPERATION_COUNT = INSTALLATION_STEP_OPERATION_COUNT + 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.MavenArtifactInstallationStepImpl <em>Maven Artifact Installation Step</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.MavenArtifactInstallationStepImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getMavenArtifactInstallationStep() + * @generated + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP = 8; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__NAME = INSTALLATION_STEP__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__LAST_POLLED = INSTALLATION_STEP__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__LAST_CHANGED = INSTALLATION_STEP__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__CREATED = INSTALLATION_STEP__CREATED; + + /** + * The feature id for the '<em><b>Application Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__APPLICATION_ID = INSTALLATION_STEP__APPLICATION_ID; + + /** + * The feature id for the '<em><b>Group Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__GROUP_ID = INSTALLATION_STEP_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Artifact Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__ARTIFACT_ID = INSTALLATION_STEP_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Version</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__VERSION = INSTALLATION_STEP_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Type</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__TYPE = INSTALLATION_STEP_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Assembly Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP__ASSEMBLY_ID = INSTALLATION_STEP_FEATURE_COUNT + 4; + + /** + * The number of structural features of the '<em>Maven Artifact Installation Step</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP_FEATURE_COUNT = INSTALLATION_STEP_FEATURE_COUNT + 5; + + /** + * The number of operations of the '<em>Maven Artifact Installation Step</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MAVEN_ARTIFACT_INSTALLATION_STEP_OPERATION_COUNT = INSTALLATION_STEP_OPERATION_COUNT + 0; + + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vm.impl.HttpInstallationStepImpl <em>Http Installation Step</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.HttpInstallationStepImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getHttpInstallationStep() + * @generated + */ + int HTTP_INSTALLATION_STEP = 9; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__NAME = INSTALLATION_STEP__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__LAST_POLLED = INSTALLATION_STEP__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__LAST_CHANGED = INSTALLATION_STEP__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__CREATED = INSTALLATION_STEP__CREATED; + + /** + * The feature id for the '<em><b>Application Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__APPLICATION_ID = INSTALLATION_STEP__APPLICATION_ID; + + /** + * The feature id for the '<em><b>Url</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__URL = INSTALLATION_STEP_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>User Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__USER_NAME = INSTALLATION_STEP_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Password</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__PASSWORD = INSTALLATION_STEP_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Type</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__TYPE = INSTALLATION_STEP_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Artifact Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP__ARTIFACT_ID = INSTALLATION_STEP_FEATURE_COUNT + 4; + + /** + * The number of structural features of the '<em>Http Installation Step</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP_FEATURE_COUNT = INSTALLATION_STEP_FEATURE_COUNT + 5; + + /** + * The number of operations of the '<em>Http Installation Step</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int HTTP_INSTALLATION_STEP_OPERATION_COUNT = INSTALLATION_STEP_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService <em>Virtual Machine Service</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Virtual Machine Service</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineService + * @generated + */ + EClass getVirtualMachineService(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService#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.vm.VirtualMachineService#getInstances() + * @see #getVirtualMachineService() + * @generated + */ + EReference getVirtualMachineService_Instances(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService#getManagerPortNumber <em>Manager Port Number</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Manager Port Number</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineService#getManagerPortNumber() + * @see #getVirtualMachineService() + * @generated + */ + EAttribute getVirtualMachineService_ManagerPortNumber(); + + /** + * Returns the meta object for the '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService#updateDeploymentStatus() <em>Update Deployment Status</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the '<em>Update Deployment Status</em>' operation. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineService#updateDeploymentStatus() + * @generated + */ + EOperation getVirtualMachineService__UpdateDeploymentStatus(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance <em>Virtual Machine Service Instance</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Virtual Machine Service Instance</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance + * @generated + */ + EClass getVirtualMachineServiceInstance(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getLocation <em>Location</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Location</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getLocation() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EReference getVirtualMachineServiceInstance_Location(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getVmType <em>Vm Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Vm Type</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getVmType() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EReference getVirtualMachineServiceInstance_VmType(); + + /** + * Returns the meta object for the reference list '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getUsers <em>Users</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference list '<em>Users</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getUsers() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EReference getVirtualMachineServiceInstance_Users(); + + /** + * Returns the meta object for the reference list '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAdminUsers <em>Admin Users</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference list '<em>Admin Users</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAdminUsers() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EReference getVirtualMachineServiceInstance_AdminUsers(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getApplicationIds <em>Application Ids</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute list '<em>Application Ids</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getApplicationIds() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_ApplicationIds(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAdminId <em>Admin Id</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Admin Id</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAdminId() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_AdminId(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getNumberOfServers <em>Number Of Servers</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Number Of Servers</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getNumberOfServers() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_NumberOfServers(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAvailabilityZone <em>Availability Zone</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Availability Zone</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getAvailabilityZone() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_AvailabilityZone(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getManagerPortNumber <em>Manager Port Number</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Manager Port Number</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getManagerPortNumber() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_ManagerPortNumber(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getServers <em>Servers</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Servers</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getServers() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EReference getVirtualMachineServiceInstance_Servers(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getLeaderServer <em>Leader Server</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Leader Server</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getLeaderServer() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EReference getVirtualMachineServiceInstance_LeaderServer(); + + /** + * Returns the meta object for the container reference '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#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.vm.VirtualMachineServiceInstance#getService() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EReference getVirtualMachineServiceInstance_Service(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getIedsAdmin <em>Ieds Admin</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Ieds Admin</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getIedsAdmin() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_IedsAdmin(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefUser <em>Chef User</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Chef User</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefUser() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_ChefUser(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefOrg <em>Chef Org</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Chef Org</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefOrg() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_ChefOrg(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefTopology <em>Chef Topology</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Chef Topology</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getChefTopology() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_ChefTopology(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getOpenstackFlavor <em>Openstack Flavor</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Openstack Flavor</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getOpenstackFlavor() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_OpenstackFlavor(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getServiceFqdn <em>Service Fqdn</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Service Fqdn</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getServiceFqdn() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_ServiceFqdn(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getDeploymentTimeoutMinutes <em>Deployment Timeout Minutes</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Deployment Timeout Minutes</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getDeploymentTimeoutMinutes() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EAttribute getVirtualMachineServiceInstance_DeploymentTimeoutMinutes(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getSteps <em>Steps</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Steps</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance#getSteps() + * @see #getVirtualMachineServiceInstance() + * @generated + */ + EReference getVirtualMachineServiceInstance_Steps(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration <em>Virtual Machine Service Configuration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Virtual Machine Service Configuration</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration + * @generated + */ + EClass getVirtualMachineServiceConfiguration(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration#getConfiguration <em>Configuration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Configuration</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration#getConfiguration() + * @see #getVirtualMachineServiceConfiguration() + * @generated + */ + EAttribute getVirtualMachineServiceConfiguration_Configuration(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor <em>Virtual Machine Service Descriptor</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Virtual Machine Service Descriptor</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor + * @generated + */ + EClass getVirtualMachineServiceDescriptor(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#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.vm.VirtualMachineServiceDescriptor#getServicePackage() + * @see #getVirtualMachineServiceDescriptor() + * @generated + */ + EAttribute getVirtualMachineServiceDescriptor_ServicePackage(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#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.vm.VirtualMachineServiceDescriptor#getServiceClass() + * @see #getVirtualMachineServiceDescriptor() + * @generated + */ + EAttribute getVirtualMachineServiceDescriptor_ServiceClass(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#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.vm.VirtualMachineServiceDescriptor#getServiceInstanceClass() + * @see #getVirtualMachineServiceDescriptor() + * @generated + */ + EAttribute getVirtualMachineServiceDescriptor_ServiceInstanceClass(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getVmType <em>Vm Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Vm Type</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getVmType() + * @see #getVirtualMachineServiceDescriptor() + * @generated + */ + EAttribute getVirtualMachineServiceDescriptor_VmType(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getManagerPortNumber <em>Manager Port Number</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Manager Port Number</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getManagerPortNumber() + * @see #getVirtualMachineServiceDescriptor() + * @generated + */ + EAttribute getVirtualMachineServiceDescriptor_ManagerPortNumber(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getManagerUser <em>Manager User</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Manager User</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getManagerUser() + * @see #getVirtualMachineServiceDescriptor() + * @generated + */ + EAttribute getVirtualMachineServiceDescriptor_ManagerUser(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getEncryptedPassword <em>Encrypted Password</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Encrypted Password</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getEncryptedPassword() + * @see #getVirtualMachineServiceDescriptor() + * @generated + */ + EAttribute getVirtualMachineServiceDescriptor_EncryptedPassword(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getUsers <em>Users</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute list '<em>Users</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getUsers() + * @see #getVirtualMachineServiceDescriptor() + * @generated + */ + EAttribute getVirtualMachineServiceDescriptor_Users(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getAdminUsers <em>Admin Users</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute list '<em>Admin Users</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor#getAdminUsers() + * @see #getVirtualMachineServiceDescriptor() + * @generated + */ + EAttribute getVirtualMachineServiceDescriptor_AdminUsers(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.PhysicalMachine <em>Physical Machine</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Physical Machine</em>'. + * @see org.openecomp.dcae.controller.service.vm.PhysicalMachine + * @generated + */ + EClass getPhysicalMachine(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.PhysicalMachine#getManagerPortNumber <em>Manager Port Number</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Manager Port Number</em>'. + * @see org.openecomp.dcae.controller.service.vm.PhysicalMachine#getManagerPortNumber() + * @see #getPhysicalMachine() + * @generated + */ + EAttribute getPhysicalMachine_ManagerPortNumber(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine <em>Virtual Machine</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Virtual Machine</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachine + * @generated + */ + EClass getVirtualMachine(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getFunctionIndex <em>Function Index</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Function Index</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachine#getFunctionIndex() + * @see #getVirtualMachine() + * @generated + */ + EAttribute getVirtualMachine_FunctionIndex(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getKvmName <em>Kvm Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Kvm Name</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachine#getKvmName() + * @see #getVirtualMachine() + * @generated + */ + EAttribute getVirtualMachine_KvmName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getVnc <em>Vnc</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Vnc</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachine#getVnc() + * @see #getVirtualMachine() + * @generated + */ + EAttribute getVirtualMachine_Vnc(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine#getGateway <em>Gateway</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Gateway</em>'. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachine#getGateway() + * @see #getVirtualMachine() + * @generated + */ + EAttribute getVirtualMachine_Gateway(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.InstallationStep <em>Installation Step</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Installation Step</em>'. + * @see org.openecomp.dcae.controller.service.vm.InstallationStep + * @generated + */ + EClass getInstallationStep(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.InstallationStep#getApplicationId <em>Application Id</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Application Id</em>'. + * @see org.openecomp.dcae.controller.service.vm.InstallationStep#getApplicationId() + * @see #getInstallationStep() + * @generated + */ + EAttribute getInstallationStep_ApplicationId(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.ShellInstallationStep <em>Shell Installation Step</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Shell Installation Step</em>'. + * @see org.openecomp.dcae.controller.service.vm.ShellInstallationStep + * @generated + */ + EClass getShellInstallationStep(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.ShellInstallationStep#getCommand <em>Command</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Command</em>'. + * @see org.openecomp.dcae.controller.service.vm.ShellInstallationStep#getCommand() + * @see #getShellInstallationStep() + * @generated + */ + EAttribute getShellInstallationStep_Command(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep <em>Maven Artifact Installation Step</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Maven Artifact Installation Step</em>'. + * @see org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep + * @generated + */ + EClass getMavenArtifactInstallationStep(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getGroupId <em>Group Id</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Group Id</em>'. + * @see org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getGroupId() + * @see #getMavenArtifactInstallationStep() + * @generated + */ + EAttribute getMavenArtifactInstallationStep_GroupId(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getArtifactId <em>Artifact Id</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Artifact Id</em>'. + * @see org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getArtifactId() + * @see #getMavenArtifactInstallationStep() + * @generated + */ + EAttribute getMavenArtifactInstallationStep_ArtifactId(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#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.vm.MavenArtifactInstallationStep#getVersion() + * @see #getMavenArtifactInstallationStep() + * @generated + */ + EAttribute getMavenArtifactInstallationStep_Version(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getType <em>Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Type</em>'. + * @see org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getType() + * @see #getMavenArtifactInstallationStep() + * @generated + */ + EAttribute getMavenArtifactInstallationStep_Type(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getAssemblyId <em>Assembly Id</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Assembly Id</em>'. + * @see org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep#getAssemblyId() + * @see #getMavenArtifactInstallationStep() + * @generated + */ + EAttribute getMavenArtifactInstallationStep_AssemblyId(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep <em>Http Installation Step</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Http Installation Step</em>'. + * @see org.openecomp.dcae.controller.service.vm.HttpInstallationStep + * @generated + */ + EClass getHttpInstallationStep(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getUrl <em>Url</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Url</em>'. + * @see org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getUrl() + * @see #getHttpInstallationStep() + * @generated + */ + EAttribute getHttpInstallationStep_Url(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getUserName <em>User Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>User Name</em>'. + * @see org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getUserName() + * @see #getHttpInstallationStep() + * @generated + */ + EAttribute getHttpInstallationStep_UserName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getPassword <em>Password</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Password</em>'. + * @see org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getPassword() + * @see #getHttpInstallationStep() + * @generated + */ + EAttribute getHttpInstallationStep_Password(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getType <em>Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Type</em>'. + * @see org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getType() + * @see #getHttpInstallationStep() + * @generated + */ + EAttribute getHttpInstallationStep_Type(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getArtifactId <em>Artifact Id</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Artifact Id</em>'. + * @see org.openecomp.dcae.controller.service.vm.HttpInstallationStep#getArtifactId() + * @see #getHttpInstallationStep() + * @generated + */ + EAttribute getHttpInstallationStep_ArtifactId(); + + /** + * 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 + */ + VmFactory getVmFactory(); + + /** + * <!-- 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.vm.impl.VirtualMachineServiceImpl <em>Virtual Machine Service</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachineService() + * @generated + */ + EClass VIRTUAL_MACHINE_SERVICE = eINSTANCE.getVirtualMachineService(); + + /** + * The meta object literal for the '<em><b>Instances</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference VIRTUAL_MACHINE_SERVICE__INSTANCES = eINSTANCE.getVirtualMachineService_Instances(); + + /** + * The meta object literal for the '<em><b>Manager Port Number</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER = eINSTANCE.getVirtualMachineService_ManagerPortNumber(); + + /** + * The meta object literal for the '<em><b>Update Deployment Status</b></em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EOperation VIRTUAL_MACHINE_SERVICE___UPDATE_DEPLOYMENT_STATUS = eINSTANCE.getVirtualMachineService__UpdateDeploymentStatus(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl <em>Virtual Machine Service Instance</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachineServiceInstance() + * @generated + */ + EClass VIRTUAL_MACHINE_SERVICE_INSTANCE = eINSTANCE.getVirtualMachineServiceInstance(); + + /** + * The meta object literal for the '<em><b>Location</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION = eINSTANCE.getVirtualMachineServiceInstance_Location(); + + /** + * The meta object literal for the '<em><b>Vm Type</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE = eINSTANCE.getVirtualMachineServiceInstance_VmType(); + + /** + * The meta object literal for the '<em><b>Users</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS = eINSTANCE.getVirtualMachineServiceInstance_Users(); + + /** + * The meta object literal for the '<em><b>Admin Users</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS = eINSTANCE.getVirtualMachineServiceInstance_AdminUsers(); + + /** + * The meta object literal for the '<em><b>Application Ids</b></em>' attribute list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS = eINSTANCE.getVirtualMachineServiceInstance_ApplicationIds(); + + /** + * The meta object literal for the '<em><b>Admin Id</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID = eINSTANCE.getVirtualMachineServiceInstance_AdminId(); + + /** + * The meta object literal for the '<em><b>Number Of Servers</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS = eINSTANCE.getVirtualMachineServiceInstance_NumberOfServers(); + + /** + * The meta object literal for the '<em><b>Availability Zone</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE = eINSTANCE.getVirtualMachineServiceInstance_AvailabilityZone(); + + /** + * The meta object literal for the '<em><b>Manager Port Number</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER = eINSTANCE.getVirtualMachineServiceInstance_ManagerPortNumber(); + + /** + * The meta object literal for the '<em><b>Servers</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS = eINSTANCE.getVirtualMachineServiceInstance_Servers(); + + /** + * The meta object literal for the '<em><b>Leader Server</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER = eINSTANCE.getVirtualMachineServiceInstance_LeaderServer(); + + /** + * The meta object literal for the '<em><b>Service</b></em>' container reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE = eINSTANCE.getVirtualMachineServiceInstance_Service(); + + /** + * The meta object literal for the '<em><b>Ieds Admin</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN = eINSTANCE.getVirtualMachineServiceInstance_IedsAdmin(); + + /** + * The meta object literal for the '<em><b>Chef User</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER = eINSTANCE.getVirtualMachineServiceInstance_ChefUser(); + + /** + * The meta object literal for the '<em><b>Chef Org</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG = eINSTANCE.getVirtualMachineServiceInstance_ChefOrg(); + + /** + * The meta object literal for the '<em><b>Chef Topology</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY = eINSTANCE.getVirtualMachineServiceInstance_ChefTopology(); + + /** + * The meta object literal for the '<em><b>Openstack Flavor</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR = eINSTANCE.getVirtualMachineServiceInstance_OpenstackFlavor(); + + /** + * The meta object literal for the '<em><b>Service Fqdn</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN = eINSTANCE.getVirtualMachineServiceInstance_ServiceFqdn(); + + /** + * The meta object literal for the '<em><b>Deployment Timeout Minutes</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES = eINSTANCE.getVirtualMachineServiceInstance_DeploymentTimeoutMinutes(); + + /** + * The meta object literal for the '<em><b>Steps</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS = eINSTANCE.getVirtualMachineServiceInstance_Steps(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceConfigurationImpl <em>Virtual Machine Service Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceConfigurationImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachineServiceConfiguration() + * @generated + */ + EClass VIRTUAL_MACHINE_SERVICE_CONFIGURATION = eINSTANCE.getVirtualMachineServiceConfiguration(); + + /** + * The meta object literal for the '<em><b>Configuration</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_CONFIGURATION__CONFIGURATION = eINSTANCE.getVirtualMachineServiceConfiguration_Configuration(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl <em>Virtual Machine Service Descriptor</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachineServiceDescriptor() + * @generated + */ + EClass VIRTUAL_MACHINE_SERVICE_DESCRIPTOR = eINSTANCE.getVirtualMachineServiceDescriptor(); + + /** + * The meta object literal for the '<em><b>Service Package</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_PACKAGE = eINSTANCE.getVirtualMachineServiceDescriptor_ServicePackage(); + + /** + * The meta object literal for the '<em><b>Service Class</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_CLASS = eINSTANCE.getVirtualMachineServiceDescriptor_ServiceClass(); + + /** + * The meta object literal for the '<em><b>Service Instance Class</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS = eINSTANCE.getVirtualMachineServiceDescriptor_ServiceInstanceClass(); + + /** + * The meta object literal for the '<em><b>Vm Type</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__VM_TYPE = eINSTANCE.getVirtualMachineServiceDescriptor_VmType(); + + /** + * The meta object literal for the '<em><b>Manager Port Number</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER = eINSTANCE.getVirtualMachineServiceDescriptor_ManagerPortNumber(); + + /** + * The meta object literal for the '<em><b>Manager User</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_USER = eINSTANCE.getVirtualMachineServiceDescriptor_ManagerUser(); + + /** + * The meta object literal for the '<em><b>Encrypted Password</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD = eINSTANCE.getVirtualMachineServiceDescriptor_EncryptedPassword(); + + /** + * The meta object literal for the '<em><b>Users</b></em>' attribute list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__USERS = eINSTANCE.getVirtualMachineServiceDescriptor_Users(); + + /** + * The meta object literal for the '<em><b>Admin Users</b></em>' attribute list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ADMIN_USERS = eINSTANCE.getVirtualMachineServiceDescriptor_AdminUsers(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vm.impl.PhysicalMachineImpl <em>Physical Machine</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.PhysicalMachineImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getPhysicalMachine() + * @generated + */ + EClass PHYSICAL_MACHINE = eINSTANCE.getPhysicalMachine(); + + /** + * The meta object literal for the '<em><b>Manager Port Number</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute PHYSICAL_MACHINE__MANAGER_PORT_NUMBER = eINSTANCE.getPhysicalMachine_ManagerPortNumber(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineImpl <em>Virtual Machine</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.VirtualMachineImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getVirtualMachine() + * @generated + */ + EClass VIRTUAL_MACHINE = eINSTANCE.getVirtualMachine(); + + /** + * The meta object literal for the '<em><b>Function Index</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE__FUNCTION_INDEX = eINSTANCE.getVirtualMachine_FunctionIndex(); + + /** + * The meta object literal for the '<em><b>Kvm Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE__KVM_NAME = eINSTANCE.getVirtualMachine_KvmName(); + + /** + * The meta object literal for the '<em><b>Vnc</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE__VNC = eINSTANCE.getVirtualMachine_Vnc(); + + /** + * The meta object literal for the '<em><b>Gateway</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VIRTUAL_MACHINE__GATEWAY = eINSTANCE.getVirtualMachine_Gateway(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vm.impl.InstallationStepImpl <em>Installation Step</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.InstallationStepImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getInstallationStep() + * @generated + */ + EClass INSTALLATION_STEP = eINSTANCE.getInstallationStep(); + + /** + * The meta object literal for the '<em><b>Application Id</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute INSTALLATION_STEP__APPLICATION_ID = eINSTANCE.getInstallationStep_ApplicationId(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vm.impl.ShellInstallationStepImpl <em>Shell Installation Step</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.ShellInstallationStepImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getShellInstallationStep() + * @generated + */ + EClass SHELL_INSTALLATION_STEP = eINSTANCE.getShellInstallationStep(); + + /** + * The meta object literal for the '<em><b>Command</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute SHELL_INSTALLATION_STEP__COMMAND = eINSTANCE.getShellInstallationStep_Command(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vm.impl.MavenArtifactInstallationStepImpl <em>Maven Artifact Installation Step</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.MavenArtifactInstallationStepImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getMavenArtifactInstallationStep() + * @generated + */ + EClass MAVEN_ARTIFACT_INSTALLATION_STEP = eINSTANCE.getMavenArtifactInstallationStep(); + + /** + * The meta object literal for the '<em><b>Group Id</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute MAVEN_ARTIFACT_INSTALLATION_STEP__GROUP_ID = eINSTANCE.getMavenArtifactInstallationStep_GroupId(); + + /** + * The meta object literal for the '<em><b>Artifact Id</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute MAVEN_ARTIFACT_INSTALLATION_STEP__ARTIFACT_ID = eINSTANCE.getMavenArtifactInstallationStep_ArtifactId(); + + /** + * The meta object literal for the '<em><b>Version</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute MAVEN_ARTIFACT_INSTALLATION_STEP__VERSION = eINSTANCE.getMavenArtifactInstallationStep_Version(); + + /** + * The meta object literal for the '<em><b>Type</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute MAVEN_ARTIFACT_INSTALLATION_STEP__TYPE = eINSTANCE.getMavenArtifactInstallationStep_Type(); + + /** + * The meta object literal for the '<em><b>Assembly Id</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute MAVEN_ARTIFACT_INSTALLATION_STEP__ASSEMBLY_ID = eINSTANCE.getMavenArtifactInstallationStep_AssemblyId(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.vm.impl.HttpInstallationStepImpl <em>Http Installation Step</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vm.impl.HttpInstallationStepImpl + * @see org.openecomp.dcae.controller.service.vm.impl.VmPackageImpl#getHttpInstallationStep() + * @generated + */ + EClass HTTP_INSTALLATION_STEP = eINSTANCE.getHttpInstallationStep(); + + /** + * The meta object literal for the '<em><b>Url</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute HTTP_INSTALLATION_STEP__URL = eINSTANCE.getHttpInstallationStep_Url(); + + /** + * The meta object literal for the '<em><b>User Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute HTTP_INSTALLATION_STEP__USER_NAME = eINSTANCE.getHttpInstallationStep_UserName(); + + /** + * The meta object literal for the '<em><b>Password</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute HTTP_INSTALLATION_STEP__PASSWORD = eINSTANCE.getHttpInstallationStep_Password(); + + /** + * The meta object literal for the '<em><b>Type</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute HTTP_INSTALLATION_STEP__TYPE = eINSTANCE.getHttpInstallationStep_Type(); + + /** + * The meta object literal for the '<em><b>Artifact Id</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute HTTP_INSTALLATION_STEP__ARTIFACT_ID = eINSTANCE.getHttpInstallationStep_ArtifactId(); + + } + +} //VmPackage diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/HttpInstallationStepImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/HttpInstallationStepImpl.java new file mode 100644 index 0000000..8e38498 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/HttpInstallationStepImpl.java @@ -0,0 +1,399 @@ + +/*- + * ============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.vm.impl; + +import org.openecomp.dcae.controller.service.vm.HttpInstallationStep; +import org.openecomp.dcae.controller.service.vm.VmPackage; + +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>Http Installation Step</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.HttpInstallationStepImpl#getUrl <em>Url</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.HttpInstallationStepImpl#getUserName <em>User Name</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.HttpInstallationStepImpl#getPassword <em>Password</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.HttpInstallationStepImpl#getType <em>Type</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.HttpInstallationStepImpl#getArtifactId <em>Artifact Id</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class HttpInstallationStepImpl extends InstallationStepImpl implements HttpInstallationStep { + /** + * The default value of the '{@link #getUrl() <em>Url</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getUrl() + * @generated + * @ordered + */ + protected static final String URL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUrl() <em>Url</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getUrl() + * @generated + * @ordered + */ + protected String url = URL_EDEFAULT; + + /** + * The default value of the '{@link #getUserName() <em>User Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getUserName() + * @generated + * @ordered + */ + protected static final String USER_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUserName() <em>User Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getUserName() + * @generated + * @ordered + */ + protected String userName = USER_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getPassword() <em>Password</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPassword() + * @generated + * @ordered + */ + protected static final String PASSWORD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPassword() <em>Password</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPassword() + * @generated + * @ordered + */ + protected String password = PASSWORD_EDEFAULT; + + /** + * The default value of the '{@link #getType() <em>Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getType() + * @generated + * @ordered + */ + protected static final String TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getType() <em>Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getType() + * @generated + * @ordered + */ + protected String type = TYPE_EDEFAULT; + + /** + * The default value of the '{@link #getArtifactId() <em>Artifact Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getArtifactId() + * @generated + * @ordered + */ + protected static final String ARTIFACT_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getArtifactId() <em>Artifact Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getArtifactId() + * @generated + * @ordered + */ + protected String artifactId = ARTIFACT_ID_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected HttpInstallationStepImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.HTTP_INSTALLATION_STEP; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getUrl() { + return url; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setUrl(String newUrl) { + String oldUrl = url; + url = newUrl; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.HTTP_INSTALLATION_STEP__URL, oldUrl, url)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getUserName() { + return userName; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setUserName(String newUserName) { + String oldUserName = userName; + userName = newUserName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.HTTP_INSTALLATION_STEP__USER_NAME, oldUserName, userName)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getPassword() { + return password; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPassword(String newPassword) { + String oldPassword = password; + password = newPassword; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.HTTP_INSTALLATION_STEP__PASSWORD, oldPassword, password)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getType() { + return type; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setType(String newType) { + String oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.HTTP_INSTALLATION_STEP__TYPE, oldType, type)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getArtifactId() { + return artifactId; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setArtifactId(String newArtifactId) { + String oldArtifactId = artifactId; + artifactId = newArtifactId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.HTTP_INSTALLATION_STEP__ARTIFACT_ID, oldArtifactId, artifactId)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case VmPackage.HTTP_INSTALLATION_STEP__URL: + return getUrl(); + case VmPackage.HTTP_INSTALLATION_STEP__USER_NAME: + return getUserName(); + case VmPackage.HTTP_INSTALLATION_STEP__PASSWORD: + return getPassword(); + case VmPackage.HTTP_INSTALLATION_STEP__TYPE: + return getType(); + case VmPackage.HTTP_INSTALLATION_STEP__ARTIFACT_ID: + return getArtifactId(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case VmPackage.HTTP_INSTALLATION_STEP__URL: + setUrl((String)newValue); + return; + case VmPackage.HTTP_INSTALLATION_STEP__USER_NAME: + setUserName((String)newValue); + return; + case VmPackage.HTTP_INSTALLATION_STEP__PASSWORD: + setPassword((String)newValue); + return; + case VmPackage.HTTP_INSTALLATION_STEP__TYPE: + setType((String)newValue); + return; + case VmPackage.HTTP_INSTALLATION_STEP__ARTIFACT_ID: + setArtifactId((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.HTTP_INSTALLATION_STEP__URL: + setUrl(URL_EDEFAULT); + return; + case VmPackage.HTTP_INSTALLATION_STEP__USER_NAME: + setUserName(USER_NAME_EDEFAULT); + return; + case VmPackage.HTTP_INSTALLATION_STEP__PASSWORD: + setPassword(PASSWORD_EDEFAULT); + return; + case VmPackage.HTTP_INSTALLATION_STEP__TYPE: + setType(TYPE_EDEFAULT); + return; + case VmPackage.HTTP_INSTALLATION_STEP__ARTIFACT_ID: + setArtifactId(ARTIFACT_ID_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.HTTP_INSTALLATION_STEP__URL: + return URL_EDEFAULT == null ? url != null : !URL_EDEFAULT.equals(url); + case VmPackage.HTTP_INSTALLATION_STEP__USER_NAME: + return USER_NAME_EDEFAULT == null ? userName != null : !USER_NAME_EDEFAULT.equals(userName); + case VmPackage.HTTP_INSTALLATION_STEP__PASSWORD: + return PASSWORD_EDEFAULT == null ? password != null : !PASSWORD_EDEFAULT.equals(password); + case VmPackage.HTTP_INSTALLATION_STEP__TYPE: + return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); + case VmPackage.HTTP_INSTALLATION_STEP__ARTIFACT_ID: + return ARTIFACT_ID_EDEFAULT == null ? artifactId != null : !ARTIFACT_ID_EDEFAULT.equals(artifactId); + } + 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(" (url: "); + result.append(url); + result.append(", userName: "); + result.append(userName); + result.append(", password: "); + result.append(password); + result.append(", type: "); + result.append(type); + result.append(", artifactId: "); + result.append(artifactId); + result.append(')'); + return result.toString(); + } + +} //HttpInstallationStepImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/InstallationStepImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/InstallationStepImpl.java new file mode 100644 index 0000000..f7d6ea8 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/InstallationStepImpl.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.vm.impl; + +import org.openecomp.dcae.controller.service.vm.InstallationStep; +import org.openecomp.dcae.controller.service.vm.VmPackage; + +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>Installation Step</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.InstallationStepImpl#getApplicationId <em>Application Id</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public abstract class InstallationStepImpl extends NamedEntityImpl implements InstallationStep { + /** + * The default value of the '{@link #getApplicationId() <em>Application Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getApplicationId() + * @generated + * @ordered + */ + protected static final String APPLICATION_ID_EDEFAULT = "dcae"; + /** + * The cached value of the '{@link #getApplicationId() <em>Application Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getApplicationId() + * @generated + * @ordered + */ + protected String applicationId = APPLICATION_ID_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected InstallationStepImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.INSTALLATION_STEP; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getApplicationId() { + return applicationId; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setApplicationId(String newApplicationId) { + String oldApplicationId = applicationId; + applicationId = newApplicationId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.INSTALLATION_STEP__APPLICATION_ID, oldApplicationId, applicationId)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case VmPackage.INSTALLATION_STEP__APPLICATION_ID: + return getApplicationId(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case VmPackage.INSTALLATION_STEP__APPLICATION_ID: + setApplicationId((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.INSTALLATION_STEP__APPLICATION_ID: + setApplicationId(APPLICATION_ID_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.INSTALLATION_STEP__APPLICATION_ID: + return APPLICATION_ID_EDEFAULT == null ? applicationId != null : !APPLICATION_ID_EDEFAULT.equals(applicationId); + } + 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(" (applicationId: "); + result.append(applicationId); + result.append(')'); + return result.toString(); + } + +} //InstallationStepImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/MavenArtifactInstallationStepImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/MavenArtifactInstallationStepImpl.java new file mode 100644 index 0000000..9f6d24c --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/MavenArtifactInstallationStepImpl.java @@ -0,0 +1,399 @@ + +/*- + * ============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.vm.impl; + +import org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep; +import org.openecomp.dcae.controller.service.vm.VmPackage; + +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>Maven Artifact Installation Step</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.MavenArtifactInstallationStepImpl#getGroupId <em>Group Id</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.MavenArtifactInstallationStepImpl#getArtifactId <em>Artifact Id</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.MavenArtifactInstallationStepImpl#getVersion <em>Version</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.MavenArtifactInstallationStepImpl#getType <em>Type</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.MavenArtifactInstallationStepImpl#getAssemblyId <em>Assembly Id</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class MavenArtifactInstallationStepImpl extends InstallationStepImpl implements MavenArtifactInstallationStep { + /** + * The default value of the '{@link #getGroupId() <em>Group Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getGroupId() + * @generated + * @ordered + */ + protected static final String GROUP_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getGroupId() <em>Group Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getGroupId() + * @generated + * @ordered + */ + protected String groupId = GROUP_ID_EDEFAULT; + + /** + * The default value of the '{@link #getArtifactId() <em>Artifact Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getArtifactId() + * @generated + * @ordered + */ + protected static final String ARTIFACT_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getArtifactId() <em>Artifact Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getArtifactId() + * @generated + * @ordered + */ + protected String artifactId = ARTIFACT_ID_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 #getType() <em>Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getType() + * @generated + * @ordered + */ + protected static final String TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getType() <em>Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getType() + * @generated + * @ordered + */ + protected String type = TYPE_EDEFAULT; + + /** + * The default value of the '{@link #getAssemblyId() <em>Assembly Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAssemblyId() + * @generated + * @ordered + */ + protected static final String ASSEMBLY_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAssemblyId() <em>Assembly Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAssemblyId() + * @generated + * @ordered + */ + protected String assemblyId = ASSEMBLY_ID_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected MavenArtifactInstallationStepImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.MAVEN_ARTIFACT_INSTALLATION_STEP; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getGroupId() { + return groupId; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setGroupId(String newGroupId) { + String oldGroupId = groupId; + groupId = newGroupId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__GROUP_ID, oldGroupId, groupId)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getArtifactId() { + return artifactId; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setArtifactId(String newArtifactId) { + String oldArtifactId = artifactId; + artifactId = newArtifactId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ARTIFACT_ID, oldArtifactId, artifactId)); + } + + /** + * <!-- 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, VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__VERSION, oldVersion, version)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getType() { + return type; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setType(String newType) { + String oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__TYPE, oldType, type)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getAssemblyId() { + return assemblyId; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAssemblyId(String newAssemblyId) { + String oldAssemblyId = assemblyId; + assemblyId = newAssemblyId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ASSEMBLY_ID, oldAssemblyId, assemblyId)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__GROUP_ID: + return getGroupId(); + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ARTIFACT_ID: + return getArtifactId(); + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__VERSION: + return getVersion(); + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__TYPE: + return getType(); + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ASSEMBLY_ID: + return getAssemblyId(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__GROUP_ID: + setGroupId((String)newValue); + return; + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ARTIFACT_ID: + setArtifactId((String)newValue); + return; + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__VERSION: + setVersion((String)newValue); + return; + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__TYPE: + setType((String)newValue); + return; + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ASSEMBLY_ID: + setAssemblyId((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__GROUP_ID: + setGroupId(GROUP_ID_EDEFAULT); + return; + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ARTIFACT_ID: + setArtifactId(ARTIFACT_ID_EDEFAULT); + return; + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__VERSION: + setVersion(VERSION_EDEFAULT); + return; + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__TYPE: + setType(TYPE_EDEFAULT); + return; + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ASSEMBLY_ID: + setAssemblyId(ASSEMBLY_ID_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__GROUP_ID: + return GROUP_ID_EDEFAULT == null ? groupId != null : !GROUP_ID_EDEFAULT.equals(groupId); + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ARTIFACT_ID: + return ARTIFACT_ID_EDEFAULT == null ? artifactId != null : !ARTIFACT_ID_EDEFAULT.equals(artifactId); + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__TYPE: + return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP__ASSEMBLY_ID: + return ASSEMBLY_ID_EDEFAULT == null ? assemblyId != null : !ASSEMBLY_ID_EDEFAULT.equals(assemblyId); + } + 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(" (groupId: "); + result.append(groupId); + result.append(", artifactId: "); + result.append(artifactId); + result.append(", version: "); + result.append(version); + result.append(", type: "); + result.append(type); + result.append(", assemblyId: "); + result.append(assemblyId); + result.append(')'); + return result.toString(); + } + +} //MavenArtifactInstallationStepImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/PhysicalMachineImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/PhysicalMachineImpl.java new file mode 100644 index 0000000..1cdc009 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/PhysicalMachineImpl.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.vm.impl; + +import org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl; + +import org.openecomp.dcae.controller.service.vm.PhysicalMachine; +import org.openecomp.dcae.controller.service.vm.VmPackage; + +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>Physical Machine</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.PhysicalMachineImpl#getManagerPortNumber <em>Manager Port Number</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class PhysicalMachineImpl extends DcaeBasicServerImpl implements PhysicalMachine { + /** + * The default value of the '{@link #getManagerPortNumber() <em>Manager Port Number</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected static final Integer MANAGER_PORT_NUMBER_EDEFAULT = null; + /** + * The cached value of the '{@link #getManagerPortNumber() <em>Manager Port Number</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected Integer managerPortNumber = MANAGER_PORT_NUMBER_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected PhysicalMachineImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.PHYSICAL_MACHINE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Integer getManagerPortNumber() { + return managerPortNumber; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setManagerPortNumber(Integer newManagerPortNumber) { + Integer oldManagerPortNumber = managerPortNumber; + managerPortNumber = newManagerPortNumber; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.PHYSICAL_MACHINE__MANAGER_PORT_NUMBER, oldManagerPortNumber, managerPortNumber)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case VmPackage.PHYSICAL_MACHINE__MANAGER_PORT_NUMBER: + return getManagerPortNumber(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case VmPackage.PHYSICAL_MACHINE__MANAGER_PORT_NUMBER: + setManagerPortNumber((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.PHYSICAL_MACHINE__MANAGER_PORT_NUMBER: + setManagerPortNumber(MANAGER_PORT_NUMBER_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.PHYSICAL_MACHINE__MANAGER_PORT_NUMBER: + return MANAGER_PORT_NUMBER_EDEFAULT == null ? managerPortNumber != null : !MANAGER_PORT_NUMBER_EDEFAULT.equals(managerPortNumber); + } + 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(" (managerPortNumber: "); + result.append(managerPortNumber); + result.append(')'); + return result.toString(); + } + +} //PhysicalMachineImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/ShellInstallationStepImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/ShellInstallationStepImpl.java new file mode 100644 index 0000000..14ddec6 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/ShellInstallationStepImpl.java @@ -0,0 +1,183 @@ + +/*- + * ============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.vm.impl; + +import org.openecomp.dcae.controller.service.vm.ShellInstallationStep; +import org.openecomp.dcae.controller.service.vm.VmPackage; + +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>Shell Installation Step</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.ShellInstallationStepImpl#getCommand <em>Command</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ShellInstallationStepImpl extends InstallationStepImpl implements ShellInstallationStep { + /** + * The default value of the '{@link #getCommand() <em>Command</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCommand() + * @generated + * @ordered + */ + protected static final String COMMAND_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCommand() <em>Command</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCommand() + * @generated + * @ordered + */ + protected String command = COMMAND_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ShellInstallationStepImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.SHELL_INSTALLATION_STEP; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getCommand() { + return command; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCommand(String newCommand) { + String oldCommand = command; + command = newCommand; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.SHELL_INSTALLATION_STEP__COMMAND, oldCommand, command)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case VmPackage.SHELL_INSTALLATION_STEP__COMMAND: + return getCommand(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case VmPackage.SHELL_INSTALLATION_STEP__COMMAND: + setCommand((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.SHELL_INSTALLATION_STEP__COMMAND: + setCommand(COMMAND_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.SHELL_INSTALLATION_STEP__COMMAND: + return COMMAND_EDEFAULT == null ? command != null : !COMMAND_EDEFAULT.equals(command); + } + 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(" (command: "); + result.append(command); + result.append(')'); + return result.toString(); + } + +} //ShellInstallationStepImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineImpl.java new file mode 100644 index 0000000..c9d588b --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineImpl.java @@ -0,0 +1,343 @@ + +/*- + * ============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.vm.impl; + +import org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl; +import org.openecomp.dcae.controller.service.vm.VirtualMachine; +import org.openecomp.dcae.controller.service.vm.VmPackage; +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>Virtual Machine</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineImpl#getFunctionIndex <em>Function Index</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineImpl#getKvmName <em>Kvm Name</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineImpl#getVnc <em>Vnc</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineImpl#getGateway <em>Gateway</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class VirtualMachineImpl extends DcaeBasicServerImpl implements VirtualMachine { + /** + * The default value of the '{@link #getFunctionIndex() <em>Function Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFunctionIndex() + * @generated + * @ordered + */ + protected static final int FUNCTION_INDEX_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getFunctionIndex() <em>Function Index</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFunctionIndex() + * @generated + * @ordered + */ + protected int functionIndex = FUNCTION_INDEX_EDEFAULT; + + /** + * The default value of the '{@link #getKvmName() <em>Kvm Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getKvmName() + * @generated + * @ordered + */ + protected static final String KVM_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getKvmName() <em>Kvm Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getKvmName() + * @generated + * @ordered + */ + protected String kvmName = KVM_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getVnc() <em>Vnc</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVnc() + * @generated + * @ordered + */ + protected static final String VNC_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVnc() <em>Vnc</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVnc() + * @generated + * @ordered + */ + protected String vnc = VNC_EDEFAULT; + + /** + * The default value of the '{@link #getGateway() <em>Gateway</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getGateway() + * @generated + * @ordered + */ + protected static final String GATEWAY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getGateway() <em>Gateway</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getGateway() + * @generated + * @ordered + */ + protected String gateway = GATEWAY_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected VirtualMachineImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.VIRTUAL_MACHINE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getFunctionIndex() { + return functionIndex; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFunctionIndex(int newFunctionIndex) { + int oldFunctionIndex = functionIndex; + functionIndex = newFunctionIndex; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE__FUNCTION_INDEX, oldFunctionIndex, functionIndex)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getKvmName() { + return kvmName; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setKvmName(String newKvmName) { + String oldKvmName = kvmName; + kvmName = newKvmName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE__KVM_NAME, oldKvmName, kvmName)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getVnc() { + return vnc; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setVnc(String newVnc) { + String oldVnc = vnc; + vnc = newVnc; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE__VNC, oldVnc, vnc)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getGateway() { + return gateway; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setGateway(String newGateway) { + String oldGateway = gateway; + gateway = newGateway; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE__GATEWAY, oldGateway, gateway)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE__FUNCTION_INDEX: + return getFunctionIndex(); + case VmPackage.VIRTUAL_MACHINE__KVM_NAME: + return getKvmName(); + case VmPackage.VIRTUAL_MACHINE__VNC: + return getVnc(); + case VmPackage.VIRTUAL_MACHINE__GATEWAY: + return getGateway(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE__FUNCTION_INDEX: + setFunctionIndex((Integer)newValue); + return; + case VmPackage.VIRTUAL_MACHINE__KVM_NAME: + setKvmName((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE__VNC: + setVnc((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE__GATEWAY: + setGateway((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE__FUNCTION_INDEX: + setFunctionIndex(FUNCTION_INDEX_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE__KVM_NAME: + setKvmName(KVM_NAME_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE__VNC: + setVnc(VNC_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE__GATEWAY: + setGateway(GATEWAY_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE__FUNCTION_INDEX: + return functionIndex != FUNCTION_INDEX_EDEFAULT; + case VmPackage.VIRTUAL_MACHINE__KVM_NAME: + return KVM_NAME_EDEFAULT == null ? kvmName != null : !KVM_NAME_EDEFAULT.equals(kvmName); + case VmPackage.VIRTUAL_MACHINE__VNC: + return VNC_EDEFAULT == null ? vnc != null : !VNC_EDEFAULT.equals(vnc); + case VmPackage.VIRTUAL_MACHINE__GATEWAY: + return GATEWAY_EDEFAULT == null ? gateway != null : !GATEWAY_EDEFAULT.equals(gateway); + } + 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(" (functionIndex: "); + result.append(functionIndex); + result.append(", kvmName: "); + result.append(kvmName); + result.append(", vnc: "); + result.append(vnc); + result.append(", gateway: "); + result.append(gateway); + result.append(')'); + return result.toString(); + } + +} //VirtualMachineImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceConfigurationImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceConfigurationImpl.java new file mode 100644 index 0000000..ea132d9 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceConfigurationImpl.java @@ -0,0 +1,184 @@ + +/*- + * ============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.vm.impl; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VmPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +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>Virtual Machine Service Configuration</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceConfigurationImpl#getConfiguration <em>Configuration</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class VirtualMachineServiceConfigurationImpl extends MinimalEObjectImpl.Container implements VirtualMachineServiceConfiguration { + /** + * The default value of the '{@link #getConfiguration() <em>Configuration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getConfiguration() + * @generated + * @ordered + */ + protected static final String CONFIGURATION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getConfiguration() <em>Configuration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getConfiguration() + * @generated + * @ordered + */ + protected String configuration = CONFIGURATION_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected VirtualMachineServiceConfigurationImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.VIRTUAL_MACHINE_SERVICE_CONFIGURATION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getConfiguration() { + return configuration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setConfiguration(String newConfiguration) { + String oldConfiguration = configuration; + configuration = newConfiguration; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_CONFIGURATION__CONFIGURATION, oldConfiguration, configuration)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_CONFIGURATION__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 VmPackage.VIRTUAL_MACHINE_SERVICE_CONFIGURATION__CONFIGURATION: + setConfiguration((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_CONFIGURATION__CONFIGURATION: + setConfiguration(CONFIGURATION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_CONFIGURATION__CONFIGURATION: + return CONFIGURATION_EDEFAULT == null ? configuration != null : !CONFIGURATION_EDEFAULT.equals(configuration); + } + 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(" (configuration: "); + result.append(configuration); + result.append(')'); + return result.toString(); + } + +} //VirtualMachineServiceConfigurationImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceDescriptorImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceDescriptorImpl.java new file mode 100644 index 0000000..4858bbe --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceDescriptorImpl.java @@ -0,0 +1,585 @@ + +/*- + * ============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.vm.impl; + +import org.openecomp.dcae.controller.core.service.impl.DcaeServiceDescriptorImpl; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor; +import org.openecomp.dcae.controller.service.vm.VmPackage; + +import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EDataTypeEList; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Virtual Machine Service Descriptor</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl#getServicePackage <em>Service Package</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl#getServiceClass <em>Service Class</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl#getServiceInstanceClass <em>Service Instance Class</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl#getVmType <em>Vm Type</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl#getManagerPortNumber <em>Manager Port Number</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl#getManagerUser <em>Manager User</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl#getEncryptedPassword <em>Encrypted Password</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl#getUsers <em>Users</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceDescriptorImpl#getAdminUsers <em>Admin Users</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class VirtualMachineServiceDescriptorImpl extends DcaeServiceDescriptorImpl implements VirtualMachineServiceDescriptor { + /** + * 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 #getVmType() <em>Vm Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVmType() + * @generated + * @ordered + */ + protected static final String VM_TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVmType() <em>Vm Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVmType() + * @generated + * @ordered + */ + protected String vmType = VM_TYPE_EDEFAULT; + + /** + * The default value of the '{@link #getManagerPortNumber() <em>Manager Port Number</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected static final String MANAGER_PORT_NUMBER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getManagerPortNumber() <em>Manager Port Number</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected String managerPortNumber = MANAGER_PORT_NUMBER_EDEFAULT; + + /** + * The default value of the '{@link #getManagerUser() <em>Manager User</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getManagerUser() + * @generated + * @ordered + */ + protected static final String MANAGER_USER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getManagerUser() <em>Manager User</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getManagerUser() + * @generated + * @ordered + */ + protected String managerUser = MANAGER_USER_EDEFAULT; + + /** + * The default value of the '{@link #getEncryptedPassword() <em>Encrypted Password</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getEncryptedPassword() + * @generated + * @ordered + */ + protected static final String ENCRYPTED_PASSWORD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getEncryptedPassword() <em>Encrypted Password</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getEncryptedPassword() + * @generated + * @ordered + */ + protected String encryptedPassword = ENCRYPTED_PASSWORD_EDEFAULT; + + /** + * The cached value of the '{@link #getUsers() <em>Users</em>}' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getUsers() + * @generated + * @ordered + */ + protected EList<String> users; + + /** + * The cached value of the '{@link #getAdminUsers() <em>Admin Users</em>}' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAdminUsers() + * @generated + * @ordered + */ + protected EList<String> adminUsers; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected VirtualMachineServiceDescriptorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.VIRTUAL_MACHINE_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, VmPackage.VIRTUAL_MACHINE_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, VmPackage.VIRTUAL_MACHINE_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, VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS, oldServiceInstanceClass, serviceInstanceClass)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getVmType() { + return vmType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setVmType(String newVmType) { + String oldVmType = vmType; + vmType = newVmType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__VM_TYPE, oldVmType, vmType)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getManagerPortNumber() { + return managerPortNumber; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setManagerPortNumber(String newManagerPortNumber) { + String oldManagerPortNumber = managerPortNumber; + managerPortNumber = newManagerPortNumber; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER, oldManagerPortNumber, managerPortNumber)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getManagerUser() { + return managerUser; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setManagerUser(String newManagerUser) { + String oldManagerUser = managerUser; + managerUser = newManagerUser; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_USER, oldManagerUser, managerUser)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getEncryptedPassword() { + return encryptedPassword; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setEncryptedPassword(String newEncryptedPassword) { + String oldEncryptedPassword = encryptedPassword; + encryptedPassword = newEncryptedPassword; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD, oldEncryptedPassword, encryptedPassword)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<String> getUsers() { + if (users == null) { + users = new EDataTypeEList<String>(String.class, this, VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__USERS); + } + return users; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<String> getAdminUsers() { + if (adminUsers == null) { + adminUsers = new EDataTypeEList<String>(String.class, this, VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ADMIN_USERS); + } + return adminUsers; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + return getServicePackage(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_CLASS: + return getServiceClass(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + return getServiceInstanceClass(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__VM_TYPE: + return getVmType(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER: + return getManagerPortNumber(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_USER: + return getManagerUser(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD: + return getEncryptedPassword(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__USERS: + return getUsers(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ADMIN_USERS: + return getAdminUsers(); + } + 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 VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + setServicePackage((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_CLASS: + setServiceClass((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + setServiceInstanceClass((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__VM_TYPE: + setVmType((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER: + setManagerPortNumber((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_USER: + setManagerUser((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD: + setEncryptedPassword((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__USERS: + getUsers().clear(); + getUsers().addAll((Collection<? extends String>)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ADMIN_USERS: + getAdminUsers().clear(); + getAdminUsers().addAll((Collection<? extends String>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + setServicePackage(SERVICE_PACKAGE_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_CLASS: + setServiceClass(SERVICE_CLASS_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + setServiceInstanceClass(SERVICE_INSTANCE_CLASS_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__VM_TYPE: + setVmType(VM_TYPE_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER: + setManagerPortNumber(MANAGER_PORT_NUMBER_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_USER: + setManagerUser(MANAGER_USER_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD: + setEncryptedPassword(ENCRYPTED_PASSWORD_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__USERS: + getUsers().clear(); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ADMIN_USERS: + getAdminUsers().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_PACKAGE: + return SERVICE_PACKAGE_EDEFAULT == null ? servicePackage != null : !SERVICE_PACKAGE_EDEFAULT.equals(servicePackage); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_CLASS: + return SERVICE_CLASS_EDEFAULT == null ? serviceClass != null : !SERVICE_CLASS_EDEFAULT.equals(serviceClass); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS: + return SERVICE_INSTANCE_CLASS_EDEFAULT == null ? serviceInstanceClass != null : !SERVICE_INSTANCE_CLASS_EDEFAULT.equals(serviceInstanceClass); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__VM_TYPE: + return VM_TYPE_EDEFAULT == null ? vmType != null : !VM_TYPE_EDEFAULT.equals(vmType); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER: + return MANAGER_PORT_NUMBER_EDEFAULT == null ? managerPortNumber != null : !MANAGER_PORT_NUMBER_EDEFAULT.equals(managerPortNumber); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_USER: + return MANAGER_USER_EDEFAULT == null ? managerUser != null : !MANAGER_USER_EDEFAULT.equals(managerUser); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD: + return ENCRYPTED_PASSWORD_EDEFAULT == null ? encryptedPassword != null : !ENCRYPTED_PASSWORD_EDEFAULT.equals(encryptedPassword); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__USERS: + return users != null && !users.isEmpty(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ADMIN_USERS: + return adminUsers != null && !adminUsers.isEmpty(); + } + 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(", vmType: "); + result.append(vmType); + result.append(", managerPortNumber: "); + result.append(managerPortNumber); + result.append(", managerUser: "); + result.append(managerUser); + result.append(", encryptedPassword: "); + result.append(encryptedPassword); + result.append(", users: "); + result.append(users); + result.append(", adminUsers: "); + result.append(adminUsers); + result.append(')'); + return result.toString(); + } + +} //VirtualMachineServiceDescriptorImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceImpl.java new file mode 100644 index 0000000..f94bdb4 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceImpl.java @@ -0,0 +1,285 @@ + +/*- + * ============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.vm.impl; + +import org.openecomp.dcae.controller.core.service.impl.DcaeServiceImpl; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; +import org.openecomp.dcae.controller.service.vm.VmPackage; + +import java.lang.reflect.InvocationTargetException; + +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.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Virtual Machine Service</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl#getInstances <em>Instances</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl#getManagerPortNumber <em>Manager Port Number</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class VirtualMachineServiceImpl extends DcaeServiceImpl implements VirtualMachineService { + /** + * 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<VirtualMachineServiceInstance> instances; + + /** + * The default value of the '{@link #getManagerPortNumber() <em>Manager Port Number</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected static final int MANAGER_PORT_NUMBER_EDEFAULT = 9999; + /** + * The cached value of the '{@link #getManagerPortNumber() <em>Manager Port Number</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected int managerPortNumber = MANAGER_PORT_NUMBER_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected VirtualMachineServiceImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.VIRTUAL_MACHINE_SERVICE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<VirtualMachineServiceInstance> getInstances() { + if (instances == null) { + instances = new EObjectContainmentWithInverseEList<VirtualMachineServiceInstance>(VirtualMachineServiceInstance.class, this, VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE); + } + return instances; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getManagerPortNumber() { + return managerPortNumber; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setManagerPortNumber(int newManagerPortNumber) { + int oldManagerPortNumber = managerPortNumber; + managerPortNumber = newManagerPortNumber; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER, oldManagerPortNumber, managerPortNumber)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void updateDeploymentStatus() { + // 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 VmPackage.VIRTUAL_MACHINE_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 VmPackage.VIRTUAL_MACHINE_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 VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES: + return getInstances(); + case VmPackage.VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER: + return getManagerPortNumber(); + } + 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 VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES: + getInstances().clear(); + getInstances().addAll((Collection<? extends VirtualMachineServiceInstance>)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER: + setManagerPortNumber((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES: + getInstances().clear(); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER: + setManagerPortNumber(MANAGER_PORT_NUMBER_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES: + return instances != null && !instances.isEmpty(); + case VmPackage.VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER: + return managerPortNumber != MANAGER_PORT_NUMBER_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE___UPDATE_DEPLOYMENT_STATUS: + updateDeploymentStatus(); + return null; + } + return super.eInvoke(operationID, arguments); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (managerPortNumber: "); + result.append(managerPortNumber); + result.append(')'); + return result.toString(); + } + +} //VirtualMachineServiceImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceInstanceImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceInstanceImpl.java new file mode 100644 index 0000000..d5c5706 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VirtualMachineServiceInstanceImpl.java @@ -0,0 +1,1288 @@ + +/*- + * ============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.vm.impl; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; +import org.openecomp.dcae.controller.core.service.DcaeLocation; +import org.openecomp.dcae.controller.core.service.impl.DcaeServiceInstanceImpl; +import org.openecomp.dcae.controller.service.vm.InstallationStep; +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.dcae.controller.service.vm.VmPackage; +import org.openecomp.ncomp.core.User; +import org.openecomp.ncomp.openstack.core.VirtualMachineType; +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.EObjectResolvingEList; +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>Virtual Machine Service Instance</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getConfiguration <em>Configuration</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getLocation <em>Location</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getVmType <em>Vm Type</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getUsers <em>Users</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getAdminUsers <em>Admin Users</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getApplicationIds <em>Application Ids</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getAdminId <em>Admin Id</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getNumberOfServers <em>Number Of Servers</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getAvailabilityZone <em>Availability Zone</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getManagerPortNumber <em>Manager Port Number</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getServers <em>Servers</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getLeaderServer <em>Leader Server</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getService <em>Service</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getIedsAdmin <em>Ieds Admin</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getChefUser <em>Chef User</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getChefOrg <em>Chef Org</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getChefTopology <em>Chef Topology</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getOpenstackFlavor <em>Openstack Flavor</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getServiceFqdn <em>Service Fqdn</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getDeploymentTimeoutMinutes <em>Deployment Timeout Minutes</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl#getSteps <em>Steps</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class VirtualMachineServiceInstanceImpl extends DcaeServiceInstanceImpl implements VirtualMachineServiceInstance { + /** + * The default value of the '{@link #getConfiguration() <em>Configuration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getConfiguration() + * @generated + * @ordered + */ + protected static final String CONFIGURATION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getConfiguration() <em>Configuration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getConfiguration() + * @generated + * @ordered + */ + protected String configuration = CONFIGURATION_EDEFAULT; + + /** + * The cached value of the '{@link #getLocation() <em>Location</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLocation() + * @generated + * @ordered + */ + protected DcaeLocation location; + + /** + * The cached value of the '{@link #getVmType() <em>Vm Type</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVmType() + * @generated + * @ordered + */ + protected VirtualMachineType vmType; + + /** + * The cached value of the '{@link #getUsers() <em>Users</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getUsers() + * @generated + * @ordered + */ + protected EList<User> users; + + /** + * The cached value of the '{@link #getAdminUsers() <em>Admin Users</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAdminUsers() + * @generated + * @ordered + */ + protected EList<User> adminUsers; + + /** + * The cached value of the '{@link #getApplicationIds() <em>Application Ids</em>}' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getApplicationIds() + * @generated + * @ordered + */ + protected EList<String> applicationIds; + + /** + * The default value of the '{@link #getAdminId() <em>Admin Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAdminId() + * @generated + * @ordered + */ + protected static final String ADMIN_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAdminId() <em>Admin Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAdminId() + * @generated + * @ordered + */ + protected String adminId = ADMIN_ID_EDEFAULT; + + /** + * The default value of the '{@link #getNumberOfServers() <em>Number Of Servers</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfServers() + * @generated + * @ordered + */ + protected static final int NUMBER_OF_SERVERS_EDEFAULT = 1; + + /** + * The cached value of the '{@link #getNumberOfServers() <em>Number Of Servers</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfServers() + * @generated + * @ordered + */ + protected int numberOfServers = NUMBER_OF_SERVERS_EDEFAULT; + + /** + * The default value of the '{@link #getAvailabilityZone() <em>Availability Zone</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAvailabilityZone() + * @generated + * @ordered + */ + protected static final String AVAILABILITY_ZONE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAvailabilityZone() <em>Availability Zone</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAvailabilityZone() + * @generated + * @ordered + */ + protected String availabilityZone = AVAILABILITY_ZONE_EDEFAULT; + + /** + * The default value of the '{@link #getManagerPortNumber() <em>Manager Port Number</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected static final Integer MANAGER_PORT_NUMBER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getManagerPortNumber() <em>Manager Port Number</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getManagerPortNumber() + * @generated + * @ordered + */ + protected Integer managerPortNumber = MANAGER_PORT_NUMBER_EDEFAULT; + + /** + * The cached value of the '{@link #getServers() <em>Servers</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getServers() + * @generated + * @ordered + */ + protected EList<DcaeBasicServer> servers; + + /** + * The cached value of the '{@link #getLeaderServer() <em>Leader Server</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLeaderServer() + * @generated + * @ordered + */ + protected DcaeBasicServer leaderServer; + + /** + * The default value of the '{@link #getIedsAdmin() <em>Ieds Admin</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIedsAdmin() + * @generated + * @ordered + */ + protected static final String IEDS_ADMIN_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIedsAdmin() <em>Ieds Admin</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIedsAdmin() + * @generated + * @ordered + */ + protected String iedsAdmin = IEDS_ADMIN_EDEFAULT; + + /** + * The default value of the '{@link #getChefUser() <em>Chef User</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getChefUser() + * @generated + * @ordered + */ + protected static final String CHEF_USER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getChefUser() <em>Chef User</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getChefUser() + * @generated + * @ordered + */ + protected String chefUser = CHEF_USER_EDEFAULT; + + /** + * The default value of the '{@link #getChefOrg() <em>Chef Org</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getChefOrg() + * @generated + * @ordered + */ + protected static final String CHEF_ORG_EDEFAULT = null; + + /** + * The cached value of the '{@link #getChefOrg() <em>Chef Org</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getChefOrg() + * @generated + * @ordered + */ + protected String chefOrg = CHEF_ORG_EDEFAULT; + + /** + * The default value of the '{@link #getChefTopology() <em>Chef Topology</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getChefTopology() + * @generated + * @ordered + */ + protected static final String CHEF_TOPOLOGY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getChefTopology() <em>Chef Topology</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getChefTopology() + * @generated + * @ordered + */ + protected String chefTopology = CHEF_TOPOLOGY_EDEFAULT; + + /** + * The default value of the '{@link #getOpenstackFlavor() <em>Openstack Flavor</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOpenstackFlavor() + * @generated + * @ordered + */ + protected static final String OPENSTACK_FLAVOR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getOpenstackFlavor() <em>Openstack Flavor</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOpenstackFlavor() + * @generated + * @ordered + */ + protected String openstackFlavor = OPENSTACK_FLAVOR_EDEFAULT; + + /** + * The default value of the '{@link #getServiceFqdn() <em>Service Fqdn</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getServiceFqdn() + * @generated + * @ordered + */ + protected static final String SERVICE_FQDN_EDEFAULT = null; + + /** + * The cached value of the '{@link #getServiceFqdn() <em>Service Fqdn</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getServiceFqdn() + * @generated + * @ordered + */ + protected String serviceFqdn = SERVICE_FQDN_EDEFAULT; + + /** + * The default value of the '{@link #getDeploymentTimeoutMinutes() <em>Deployment Timeout Minutes</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDeploymentTimeoutMinutes() + * @generated + * @ordered + */ + protected static final int DEPLOYMENT_TIMEOUT_MINUTES_EDEFAULT = 90; + + /** + * The cached value of the '{@link #getDeploymentTimeoutMinutes() <em>Deployment Timeout Minutes</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDeploymentTimeoutMinutes() + * @generated + * @ordered + */ + protected int deploymentTimeoutMinutes = DEPLOYMENT_TIMEOUT_MINUTES_EDEFAULT; + + /** + * The cached value of the '{@link #getSteps() <em>Steps</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSteps() + * @generated + * @ordered + */ + protected EList<InstallationStep> steps; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected VirtualMachineServiceInstanceImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmPackage.Literals.VIRTUAL_MACHINE_SERVICE_INSTANCE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DcaeLocation getLocation() { + if (location != null && location.eIsProxy()) { + InternalEObject oldLocation = (InternalEObject)location; + location = (DcaeLocation)eResolveProxy(oldLocation); + if (location != oldLocation) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION, oldLocation, location)); + } + } + return location; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DcaeLocation basicGetLocation() { + return location; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLocation(DcaeLocation newLocation) { + DcaeLocation oldLocation = location; + location = newLocation; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION, oldLocation, location)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VirtualMachineType getVmType() { + if (vmType != null && vmType.eIsProxy()) { + InternalEObject oldVmType = (InternalEObject)vmType; + vmType = (VirtualMachineType)eResolveProxy(oldVmType); + if (vmType != oldVmType) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE, oldVmType, vmType)); + } + } + return vmType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VirtualMachineType basicGetVmType() { + return vmType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setVmType(VirtualMachineType newVmType) { + VirtualMachineType oldVmType = vmType; + vmType = newVmType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE, oldVmType, vmType)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<User> getUsers() { + if (users == null) { + users = new EObjectResolvingEList<User>(User.class, this, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS); + } + return users; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<User> getAdminUsers() { + if (adminUsers == null) { + adminUsers = new EObjectResolvingEList<User>(User.class, this, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS); + } + return adminUsers; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<String> getApplicationIds() { + if (applicationIds == null) { + applicationIds = new EDataTypeEList<String>(String.class, this, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS); + } + return applicationIds; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getAdminId() { + return adminId; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAdminId(String newAdminId) { + String oldAdminId = adminId; + adminId = newAdminId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID, oldAdminId, adminId)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getConfiguration() { + return configuration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setConfiguration(String newConfiguration) { + String oldConfiguration = configuration; + configuration = newConfiguration; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION, oldConfiguration, configuration)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getNumberOfServers() { + return numberOfServers; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setNumberOfServers(int newNumberOfServers) { + int oldNumberOfServers = numberOfServers; + numberOfServers = newNumberOfServers; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS, oldNumberOfServers, numberOfServers)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getAvailabilityZone() { + return availabilityZone; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAvailabilityZone(String newAvailabilityZone) { + String oldAvailabilityZone = availabilityZone; + availabilityZone = newAvailabilityZone; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE, oldAvailabilityZone, availabilityZone)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Integer getManagerPortNumber() { + return managerPortNumber; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setManagerPortNumber(Integer newManagerPortNumber) { + Integer oldManagerPortNumber = managerPortNumber; + managerPortNumber = newManagerPortNumber; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER, oldManagerPortNumber, managerPortNumber)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<DcaeBasicServer> getServers() { + if (servers == null) { + servers = new EObjectContainmentEList<DcaeBasicServer>(DcaeBasicServer.class, this, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS); + } + return servers; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DcaeBasicServer getLeaderServer() { + if (leaderServer != null && leaderServer.eIsProxy()) { + InternalEObject oldLeaderServer = (InternalEObject)leaderServer; + leaderServer = (DcaeBasicServer)eResolveProxy(oldLeaderServer); + if (leaderServer != oldLeaderServer) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER, oldLeaderServer, leaderServer)); + } + } + return leaderServer; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DcaeBasicServer basicGetLeaderServer() { + return leaderServer; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLeaderServer(DcaeBasicServer newLeaderServer) { + DcaeBasicServer oldLeaderServer = leaderServer; + leaderServer = newLeaderServer; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER, oldLeaderServer, leaderServer)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VirtualMachineService getService() { + if (eContainerFeatureID() != VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE) return null; + return (VirtualMachineService)eContainer(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VirtualMachineService basicGetService() { + if (eContainerFeatureID() != VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE) return null; + return (VirtualMachineService)eInternalContainer(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetService(VirtualMachineService newService, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newService, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE, msgs); + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setService(VirtualMachineService newService) { + if (newService != eInternalContainer() || (eContainerFeatureID() != VmPackage.VIRTUAL_MACHINE_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, VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES, VirtualMachineService.class, msgs); + msgs = basicSetService(newService, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE, newService, newService)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getIedsAdmin() { + return iedsAdmin; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setIedsAdmin(String newIedsAdmin) { + String oldIedsAdmin = iedsAdmin; + iedsAdmin = newIedsAdmin; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN, oldIedsAdmin, iedsAdmin)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getChefUser() { + return chefUser; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setChefUser(String newChefUser) { + String oldChefUser = chefUser; + chefUser = newChefUser; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER, oldChefUser, chefUser)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getChefOrg() { + return chefOrg; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setChefOrg(String newChefOrg) { + String oldChefOrg = chefOrg; + chefOrg = newChefOrg; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG, oldChefOrg, chefOrg)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getChefTopology() { + return chefTopology; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setChefTopology(String newChefTopology) { + String oldChefTopology = chefTopology; + chefTopology = newChefTopology; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY, oldChefTopology, chefTopology)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getOpenstackFlavor() { + return openstackFlavor; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setOpenstackFlavor(String newOpenstackFlavor) { + String oldOpenstackFlavor = openstackFlavor; + openstackFlavor = newOpenstackFlavor; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR, oldOpenstackFlavor, openstackFlavor)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getServiceFqdn() { + return serviceFqdn; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setServiceFqdn(String newServiceFqdn) { + String oldServiceFqdn = serviceFqdn; + serviceFqdn = newServiceFqdn; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN, oldServiceFqdn, serviceFqdn)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getDeploymentTimeoutMinutes() { + return deploymentTimeoutMinutes; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDeploymentTimeoutMinutes(int newDeploymentTimeoutMinutes) { + int oldDeploymentTimeoutMinutes = deploymentTimeoutMinutes; + deploymentTimeoutMinutes = newDeploymentTimeoutMinutes; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES, oldDeploymentTimeoutMinutes, deploymentTimeoutMinutes)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<InstallationStep> getSteps() { + if (steps == null) { + steps = new EObjectContainmentEList<InstallationStep>(InstallationStep.class, this, VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS); + } + return steps; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetService((VirtualMachineService)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 VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS: + return ((InternalEList<?>)getServers()).basicRemove(otherEnd, msgs); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE: + return basicSetService(null, msgs); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS: + return ((InternalEList<?>)getSteps()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE: + return eInternalContainer().eInverseRemove(this, VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES, VirtualMachineService.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 VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION: + return getConfiguration(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION: + if (resolve) return getLocation(); + return basicGetLocation(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE: + if (resolve) return getVmType(); + return basicGetVmType(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS: + return getUsers(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS: + return getAdminUsers(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS: + return getApplicationIds(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID: + return getAdminId(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS: + return getNumberOfServers(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE: + return getAvailabilityZone(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER: + return getManagerPortNumber(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS: + return getServers(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER: + if (resolve) return getLeaderServer(); + return basicGetLeaderServer(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE: + if (resolve) return getService(); + return basicGetService(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN: + return getIedsAdmin(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER: + return getChefUser(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG: + return getChefOrg(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY: + return getChefTopology(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR: + return getOpenstackFlavor(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN: + return getServiceFqdn(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES: + return getDeploymentTimeoutMinutes(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS: + return getSteps(); + } + 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 VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION: + setConfiguration((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION: + setLocation((DcaeLocation)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE: + setVmType((VirtualMachineType)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS: + getUsers().clear(); + getUsers().addAll((Collection<? extends User>)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS: + getAdminUsers().clear(); + getAdminUsers().addAll((Collection<? extends User>)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS: + getApplicationIds().clear(); + getApplicationIds().addAll((Collection<? extends String>)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID: + setAdminId((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS: + setNumberOfServers((Integer)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE: + setAvailabilityZone((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER: + setManagerPortNumber((Integer)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS: + getServers().clear(); + getServers().addAll((Collection<? extends DcaeBasicServer>)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER: + setLeaderServer((DcaeBasicServer)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE: + setService((VirtualMachineService)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN: + setIedsAdmin((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER: + setChefUser((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG: + setChefOrg((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY: + setChefTopology((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR: + setOpenstackFlavor((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN: + setServiceFqdn((String)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES: + setDeploymentTimeoutMinutes((Integer)newValue); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS: + getSteps().clear(); + getSteps().addAll((Collection<? extends InstallationStep>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION: + setConfiguration(CONFIGURATION_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION: + setLocation((DcaeLocation)null); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE: + setVmType((VirtualMachineType)null); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS: + getUsers().clear(); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS: + getAdminUsers().clear(); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS: + getApplicationIds().clear(); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID: + setAdminId(ADMIN_ID_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS: + setNumberOfServers(NUMBER_OF_SERVERS_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE: + setAvailabilityZone(AVAILABILITY_ZONE_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER: + setManagerPortNumber(MANAGER_PORT_NUMBER_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS: + getServers().clear(); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER: + setLeaderServer((DcaeBasicServer)null); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE: + setService((VirtualMachineService)null); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN: + setIedsAdmin(IEDS_ADMIN_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER: + setChefUser(CHEF_USER_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG: + setChefOrg(CHEF_ORG_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY: + setChefTopology(CHEF_TOPOLOGY_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR: + setOpenstackFlavor(OPENSTACK_FLAVOR_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN: + setServiceFqdn(SERVICE_FQDN_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES: + setDeploymentTimeoutMinutes(DEPLOYMENT_TIMEOUT_MINUTES_EDEFAULT); + return; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS: + getSteps().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION: + return CONFIGURATION_EDEFAULT == null ? configuration != null : !CONFIGURATION_EDEFAULT.equals(configuration); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION: + return location != null; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE: + return vmType != null; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS: + return users != null && !users.isEmpty(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS: + return adminUsers != null && !adminUsers.isEmpty(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS: + return applicationIds != null && !applicationIds.isEmpty(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID: + return ADMIN_ID_EDEFAULT == null ? adminId != null : !ADMIN_ID_EDEFAULT.equals(adminId); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS: + return numberOfServers != NUMBER_OF_SERVERS_EDEFAULT; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE: + return AVAILABILITY_ZONE_EDEFAULT == null ? availabilityZone != null : !AVAILABILITY_ZONE_EDEFAULT.equals(availabilityZone); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER: + return MANAGER_PORT_NUMBER_EDEFAULT == null ? managerPortNumber != null : !MANAGER_PORT_NUMBER_EDEFAULT.equals(managerPortNumber); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS: + return servers != null && !servers.isEmpty(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER: + return leaderServer != null; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE: + return basicGetService() != null; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN: + return IEDS_ADMIN_EDEFAULT == null ? iedsAdmin != null : !IEDS_ADMIN_EDEFAULT.equals(iedsAdmin); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER: + return CHEF_USER_EDEFAULT == null ? chefUser != null : !CHEF_USER_EDEFAULT.equals(chefUser); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG: + return CHEF_ORG_EDEFAULT == null ? chefOrg != null : !CHEF_ORG_EDEFAULT.equals(chefOrg); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY: + return CHEF_TOPOLOGY_EDEFAULT == null ? chefTopology != null : !CHEF_TOPOLOGY_EDEFAULT.equals(chefTopology); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR: + return OPENSTACK_FLAVOR_EDEFAULT == null ? openstackFlavor != null : !OPENSTACK_FLAVOR_EDEFAULT.equals(openstackFlavor); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN: + return SERVICE_FQDN_EDEFAULT == null ? serviceFqdn != null : !SERVICE_FQDN_EDEFAULT.equals(serviceFqdn); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES: + return deploymentTimeoutMinutes != DEPLOYMENT_TIMEOUT_MINUTES_EDEFAULT; + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS: + return steps != null && !steps.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { + if (baseClass == VirtualMachineServiceConfiguration.class) { + switch (derivedFeatureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION: return VmPackage.VIRTUAL_MACHINE_SERVICE_CONFIGURATION__CONFIGURATION; + 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 == VirtualMachineServiceConfiguration.class) { + switch (baseFeatureID) { + case VmPackage.VIRTUAL_MACHINE_SERVICE_CONFIGURATION__CONFIGURATION: return VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (configuration: "); + result.append(configuration); + result.append(", applicationIds: "); + result.append(applicationIds); + result.append(", adminId: "); + result.append(adminId); + result.append(", numberOfServers: "); + result.append(numberOfServers); + result.append(", availabilityZone: "); + result.append(availabilityZone); + result.append(", managerPortNumber: "); + result.append(managerPortNumber); + result.append(", iedsAdmin: "); + result.append(iedsAdmin); + result.append(", chefUser: "); + result.append(chefUser); + result.append(", chefOrg: "); + result.append(chefOrg); + result.append(", chefTopology: "); + result.append(chefTopology); + result.append(", openstackFlavor: "); + result.append(openstackFlavor); + result.append(", serviceFqdn: "); + result.append(serviceFqdn); + result.append(", deploymentTimeoutMinutes: "); + result.append(deploymentTimeoutMinutes); + result.append(')'); + return result.toString(); + } + +} //VirtualMachineServiceInstanceImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VmFactoryImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VmFactoryImpl.java new file mode 100644 index 0000000..7db3558 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VmFactoryImpl.java @@ -0,0 +1,204 @@ + +/*- + * ============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.vm.impl; + +import org.openecomp.dcae.controller.service.vm.*; + +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 VmFactoryImpl extends EFactoryImpl implements VmFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static VmFactory init() { + try { + VmFactory theVmFactory = (VmFactory)EPackage.Registry.INSTANCE.getEFactory(VmPackage.eNS_URI); + if (theVmFactory != null) { + return theVmFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new VmFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VmFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case VmPackage.VIRTUAL_MACHINE_SERVICE: return createVirtualMachineService(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE: return createVirtualMachineServiceInstance(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_CONFIGURATION: return createVirtualMachineServiceConfiguration(); + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR: return createVirtualMachineServiceDescriptor(); + case VmPackage.PHYSICAL_MACHINE: return createPhysicalMachine(); + case VmPackage.VIRTUAL_MACHINE: return createVirtualMachine(); + case VmPackage.SHELL_INSTALLATION_STEP: return createShellInstallationStep(); + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP: return createMavenArtifactInstallationStep(); + case VmPackage.HTTP_INSTALLATION_STEP: return createHttpInstallationStep(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VirtualMachineService createVirtualMachineService() { + VirtualMachineServiceImpl virtualMachineService = new VirtualMachineServiceImpl(); + return virtualMachineService; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VirtualMachineServiceInstance createVirtualMachineServiceInstance() { + VirtualMachineServiceInstanceImpl virtualMachineServiceInstance = new VirtualMachineServiceInstanceImpl(); + return virtualMachineServiceInstance; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VirtualMachineServiceConfiguration createVirtualMachineServiceConfiguration() { + VirtualMachineServiceConfigurationImpl virtualMachineServiceConfiguration = new VirtualMachineServiceConfigurationImpl(); + return virtualMachineServiceConfiguration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VirtualMachineServiceDescriptor createVirtualMachineServiceDescriptor() { + VirtualMachineServiceDescriptorImpl virtualMachineServiceDescriptor = new VirtualMachineServiceDescriptorImpl(); + return virtualMachineServiceDescriptor; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public PhysicalMachine createPhysicalMachine() { + PhysicalMachineImpl physicalMachine = new PhysicalMachineImpl(); + return physicalMachine; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VirtualMachine createVirtualMachine() { + VirtualMachineImpl virtualMachine = new VirtualMachineImpl(); + return virtualMachine; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ShellInstallationStep createShellInstallationStep() { + ShellInstallationStepImpl shellInstallationStep = new ShellInstallationStepImpl(); + return shellInstallationStep; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public MavenArtifactInstallationStep createMavenArtifactInstallationStep() { + MavenArtifactInstallationStepImpl mavenArtifactInstallationStep = new MavenArtifactInstallationStepImpl(); + return mavenArtifactInstallationStep; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public HttpInstallationStep createHttpInstallationStep() { + HttpInstallationStepImpl httpInstallationStep = new HttpInstallationStepImpl(); + return httpInstallationStep; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VmPackage getVmPackage() { + return (VmPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @deprecated + * @generated + */ + @Deprecated + public static VmPackage getPackage() { + return VmPackage.eINSTANCE; + } + +} //VmFactoryImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VmPackageImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VmPackageImpl.java new file mode 100644 index 0000000..2161eac --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/impl/VmPackageImpl.java @@ -0,0 +1,1050 @@ + +/*- + * ============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.vm.impl; + +import org.openecomp.dcae.controller.core.server.ServerPackage; +import org.openecomp.dcae.controller.core.service.ServicePackage; +import org.openecomp.dcae.controller.service.vm.HttpInstallationStep; +import org.openecomp.dcae.controller.service.vm.InstallationStep; +import org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep; +import org.openecomp.dcae.controller.service.vm.PhysicalMachine; +import org.openecomp.dcae.controller.service.vm.ShellInstallationStep; +import org.openecomp.dcae.controller.service.vm.VirtualMachine; +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceDescriptor; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; +import org.openecomp.dcae.controller.service.vm.VmFactory; +import org.openecomp.dcae.controller.service.vm.VmPackage; +import org.openecomp.ncomp.openstack.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 VmPackageImpl extends EPackageImpl implements VmPackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass virtualMachineServiceEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass virtualMachineServiceInstanceEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass virtualMachineServiceConfigurationEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass virtualMachineServiceDescriptorEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass physicalMachineEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass virtualMachineEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass installationStepEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass shellInstallationStepEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass mavenArtifactInstallationStepEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass httpInstallationStepEClass = 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.vm.VmPackage#eNS_URI + * @see #init() + * @generated + */ + private VmPackageImpl() { + super(eNS_URI, VmFactory.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 VmPackage#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 VmPackage init() { + if (isInited) return (VmPackage)EPackage.Registry.INSTANCE.getEPackage(VmPackage.eNS_URI); + + // Obtain or create and register package + VmPackageImpl theVmPackage = (VmPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof VmPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new VmPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + ServicePackage.eINSTANCE.eClass(); + ServerPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theVmPackage.createPackageContents(); + + // Initialize created meta-data + theVmPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theVmPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(VmPackage.eNS_URI, theVmPackage); + return theVmPackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getVirtualMachineService() { + return virtualMachineServiceEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getVirtualMachineService_Instances() { + return (EReference)virtualMachineServiceEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineService_ManagerPortNumber() { + return (EAttribute)virtualMachineServiceEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EOperation getVirtualMachineService__UpdateDeploymentStatus() { + return virtualMachineServiceEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getVirtualMachineServiceInstance() { + return virtualMachineServiceInstanceEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getVirtualMachineServiceInstance_Location() { + return (EReference)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getVirtualMachineServiceInstance_VmType() { + return (EReference)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getVirtualMachineServiceInstance_Users() { + return (EReference)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getVirtualMachineServiceInstance_AdminUsers() { + return (EReference)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_ApplicationIds() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_AdminId() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_NumberOfServers() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(6); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_AvailabilityZone() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(7); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_ManagerPortNumber() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(8); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getVirtualMachineServiceInstance_Servers() { + return (EReference)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(9); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getVirtualMachineServiceInstance_LeaderServer() { + return (EReference)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(10); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getVirtualMachineServiceInstance_Service() { + return (EReference)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(11); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_IedsAdmin() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(12); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_ChefUser() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(13); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_ChefOrg() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(14); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_ChefTopology() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(15); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_OpenstackFlavor() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(16); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_ServiceFqdn() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(17); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceInstance_DeploymentTimeoutMinutes() { + return (EAttribute)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(18); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getVirtualMachineServiceInstance_Steps() { + return (EReference)virtualMachineServiceInstanceEClass.getEStructuralFeatures().get(19); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getVirtualMachineServiceConfiguration() { + return virtualMachineServiceConfigurationEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceConfiguration_Configuration() { + return (EAttribute)virtualMachineServiceConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getVirtualMachineServiceDescriptor() { + return virtualMachineServiceDescriptorEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceDescriptor_ServicePackage() { + return (EAttribute)virtualMachineServiceDescriptorEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceDescriptor_ServiceClass() { + return (EAttribute)virtualMachineServiceDescriptorEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceDescriptor_ServiceInstanceClass() { + return (EAttribute)virtualMachineServiceDescriptorEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceDescriptor_VmType() { + return (EAttribute)virtualMachineServiceDescriptorEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceDescriptor_ManagerPortNumber() { + return (EAttribute)virtualMachineServiceDescriptorEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceDescriptor_ManagerUser() { + return (EAttribute)virtualMachineServiceDescriptorEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceDescriptor_EncryptedPassword() { + return (EAttribute)virtualMachineServiceDescriptorEClass.getEStructuralFeatures().get(6); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceDescriptor_Users() { + return (EAttribute)virtualMachineServiceDescriptorEClass.getEStructuralFeatures().get(7); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachineServiceDescriptor_AdminUsers() { + return (EAttribute)virtualMachineServiceDescriptorEClass.getEStructuralFeatures().get(8); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getPhysicalMachine() { + return physicalMachineEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getPhysicalMachine_ManagerPortNumber() { + return (EAttribute)physicalMachineEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getVirtualMachine() { + return virtualMachineEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachine_FunctionIndex() { + return (EAttribute)virtualMachineEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachine_KvmName() { + return (EAttribute)virtualMachineEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachine_Vnc() { + return (EAttribute)virtualMachineEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getVirtualMachine_Gateway() { + return (EAttribute)virtualMachineEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getInstallationStep() { + return installationStepEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getInstallationStep_ApplicationId() { + return (EAttribute)installationStepEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getShellInstallationStep() { + return shellInstallationStepEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getShellInstallationStep_Command() { + return (EAttribute)shellInstallationStepEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getMavenArtifactInstallationStep() { + return mavenArtifactInstallationStepEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getMavenArtifactInstallationStep_GroupId() { + return (EAttribute)mavenArtifactInstallationStepEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getMavenArtifactInstallationStep_ArtifactId() { + return (EAttribute)mavenArtifactInstallationStepEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getMavenArtifactInstallationStep_Version() { + return (EAttribute)mavenArtifactInstallationStepEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getMavenArtifactInstallationStep_Type() { + return (EAttribute)mavenArtifactInstallationStepEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getMavenArtifactInstallationStep_AssemblyId() { + return (EAttribute)mavenArtifactInstallationStepEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getHttpInstallationStep() { + return httpInstallationStepEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getHttpInstallationStep_Url() { + return (EAttribute)httpInstallationStepEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getHttpInstallationStep_UserName() { + return (EAttribute)httpInstallationStepEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getHttpInstallationStep_Password() { + return (EAttribute)httpInstallationStepEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getHttpInstallationStep_Type() { + return (EAttribute)httpInstallationStepEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getHttpInstallationStep_ArtifactId() { + return (EAttribute)httpInstallationStepEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VmFactory getVmFactory() { + return (VmFactory)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 + virtualMachineServiceEClass = createEClass(VIRTUAL_MACHINE_SERVICE); + createEReference(virtualMachineServiceEClass, VIRTUAL_MACHINE_SERVICE__INSTANCES); + createEAttribute(virtualMachineServiceEClass, VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER); + createEOperation(virtualMachineServiceEClass, VIRTUAL_MACHINE_SERVICE___UPDATE_DEPLOYMENT_STATUS); + + virtualMachineServiceInstanceEClass = createEClass(VIRTUAL_MACHINE_SERVICE_INSTANCE); + createEReference(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION); + createEReference(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE); + createEReference(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS); + createEReference(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER); + createEReference(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS); + createEReference(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER); + createEReference(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN); + createEAttribute(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES); + createEReference(virtualMachineServiceInstanceEClass, VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS); + + virtualMachineServiceConfigurationEClass = createEClass(VIRTUAL_MACHINE_SERVICE_CONFIGURATION); + createEAttribute(virtualMachineServiceConfigurationEClass, VIRTUAL_MACHINE_SERVICE_CONFIGURATION__CONFIGURATION); + + virtualMachineServiceDescriptorEClass = createEClass(VIRTUAL_MACHINE_SERVICE_DESCRIPTOR); + createEAttribute(virtualMachineServiceDescriptorEClass, VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_PACKAGE); + createEAttribute(virtualMachineServiceDescriptorEClass, VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_CLASS); + createEAttribute(virtualMachineServiceDescriptorEClass, VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__SERVICE_INSTANCE_CLASS); + createEAttribute(virtualMachineServiceDescriptorEClass, VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__VM_TYPE); + createEAttribute(virtualMachineServiceDescriptorEClass, VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_PORT_NUMBER); + createEAttribute(virtualMachineServiceDescriptorEClass, VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__MANAGER_USER); + createEAttribute(virtualMachineServiceDescriptorEClass, VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ENCRYPTED_PASSWORD); + createEAttribute(virtualMachineServiceDescriptorEClass, VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__USERS); + createEAttribute(virtualMachineServiceDescriptorEClass, VIRTUAL_MACHINE_SERVICE_DESCRIPTOR__ADMIN_USERS); + + physicalMachineEClass = createEClass(PHYSICAL_MACHINE); + createEAttribute(physicalMachineEClass, PHYSICAL_MACHINE__MANAGER_PORT_NUMBER); + + virtualMachineEClass = createEClass(VIRTUAL_MACHINE); + createEAttribute(virtualMachineEClass, VIRTUAL_MACHINE__FUNCTION_INDEX); + createEAttribute(virtualMachineEClass, VIRTUAL_MACHINE__KVM_NAME); + createEAttribute(virtualMachineEClass, VIRTUAL_MACHINE__VNC); + createEAttribute(virtualMachineEClass, VIRTUAL_MACHINE__GATEWAY); + + installationStepEClass = createEClass(INSTALLATION_STEP); + createEAttribute(installationStepEClass, INSTALLATION_STEP__APPLICATION_ID); + + shellInstallationStepEClass = createEClass(SHELL_INSTALLATION_STEP); + createEAttribute(shellInstallationStepEClass, SHELL_INSTALLATION_STEP__COMMAND); + + mavenArtifactInstallationStepEClass = createEClass(MAVEN_ARTIFACT_INSTALLATION_STEP); + createEAttribute(mavenArtifactInstallationStepEClass, MAVEN_ARTIFACT_INSTALLATION_STEP__GROUP_ID); + createEAttribute(mavenArtifactInstallationStepEClass, MAVEN_ARTIFACT_INSTALLATION_STEP__ARTIFACT_ID); + createEAttribute(mavenArtifactInstallationStepEClass, MAVEN_ARTIFACT_INSTALLATION_STEP__VERSION); + createEAttribute(mavenArtifactInstallationStepEClass, MAVEN_ARTIFACT_INSTALLATION_STEP__TYPE); + createEAttribute(mavenArtifactInstallationStepEClass, MAVEN_ARTIFACT_INSTALLATION_STEP__ASSEMBLY_ID); + + httpInstallationStepEClass = createEClass(HTTP_INSTALLATION_STEP); + createEAttribute(httpInstallationStepEClass, HTTP_INSTALLATION_STEP__URL); + createEAttribute(httpInstallationStepEClass, HTTP_INSTALLATION_STEP__USER_NAME); + createEAttribute(httpInstallationStepEClass, HTTP_INSTALLATION_STEP__PASSWORD); + createEAttribute(httpInstallationStepEClass, HTTP_INSTALLATION_STEP__TYPE); + createEAttribute(httpInstallationStepEClass, HTTP_INSTALLATION_STEP__ARTIFACT_ID); + } + + /** + * <!-- 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 = (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + org.openecomp.ncomp.core.CorePackage theCorePackage_1 = (org.openecomp.ncomp.core.CorePackage)EPackage.Registry.INSTANCE.getEPackage(org.openecomp.ncomp.core.CorePackage.eNS_URI); + ServerPackage theServerPackage = (ServerPackage)EPackage.Registry.INSTANCE.getEPackage(ServerPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + virtualMachineServiceEClass.getESuperTypes().add(theServicePackage.getDcaeService()); + virtualMachineServiceInstanceEClass.getESuperTypes().add(theServicePackage.getDcaeServiceInstance()); + virtualMachineServiceInstanceEClass.getESuperTypes().add(this.getVirtualMachineServiceConfiguration()); + virtualMachineServiceDescriptorEClass.getESuperTypes().add(theServicePackage.getDcaeServiceDescriptor()); + physicalMachineEClass.getESuperTypes().add(theServerPackage.getDcaeBasicServer()); + virtualMachineEClass.getESuperTypes().add(theServerPackage.getDcaeBasicServer()); + installationStepEClass.getESuperTypes().add(theCorePackage_1.getNamedEntity()); + shellInstallationStepEClass.getESuperTypes().add(this.getInstallationStep()); + mavenArtifactInstallationStepEClass.getESuperTypes().add(this.getInstallationStep()); + httpInstallationStepEClass.getESuperTypes().add(this.getInstallationStep()); + + // Initialize classes, features, and operations; add parameters + initEClass(virtualMachineServiceEClass, VirtualMachineService.class, "VirtualMachineService", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getVirtualMachineService_Instances(), this.getVirtualMachineServiceInstance(), this.getVirtualMachineServiceInstance_Service(), "instances", null, 0, -1, VirtualMachineService.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineService_ManagerPortNumber(), theEcorePackage.getEInt(), "managerPortNumber", "9999", 0, 1, VirtualMachineService.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getVirtualMachineService__UpdateDeploymentStatus(), null, "updateDeploymentStatus", 0, 1, !IS_UNIQUE, IS_ORDERED); + + initEClass(virtualMachineServiceInstanceEClass, VirtualMachineServiceInstance.class, "VirtualMachineServiceInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getVirtualMachineServiceInstance_Location(), theServicePackage.getDcaeLocation(), null, "location", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getVirtualMachineServiceInstance_VmType(), theCorePackage.getVirtualMachineType(), null, "vmType", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getVirtualMachineServiceInstance_Users(), theCorePackage_1.getUser(), null, "users", null, 0, -1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getVirtualMachineServiceInstance_AdminUsers(), theCorePackage_1.getUser(), null, "adminUsers", null, 0, -1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_ApplicationIds(), theEcorePackage.getEString(), "applicationIds", null, 0, -1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_AdminId(), theEcorePackage.getEString(), "adminId", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_NumberOfServers(), theEcorePackage.getEInt(), "numberOfServers", "1", 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_AvailabilityZone(), theEcorePackage.getEString(), "availabilityZone", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_ManagerPortNumber(), theEcorePackage.getEIntegerObject(), "managerPortNumber", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getVirtualMachineServiceInstance_Servers(), theServerPackage.getDcaeBasicServer(), null, "servers", null, 0, -1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getVirtualMachineServiceInstance_LeaderServer(), theServerPackage.getDcaeBasicServer(), null, "leaderServer", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getVirtualMachineServiceInstance_Service(), this.getVirtualMachineService(), this.getVirtualMachineService_Instances(), "service", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_IedsAdmin(), theEcorePackage.getEString(), "iedsAdmin", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_ChefUser(), theEcorePackage.getEString(), "chefUser", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_ChefOrg(), theEcorePackage.getEString(), "chefOrg", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_ChefTopology(), theEcorePackage.getEString(), "chefTopology", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_OpenstackFlavor(), theEcorePackage.getEString(), "openstackFlavor", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_ServiceFqdn(), theEcorePackage.getEString(), "serviceFqdn", null, 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceInstance_DeploymentTimeoutMinutes(), theEcorePackage.getEInt(), "deploymentTimeoutMinutes", "90", 0, 1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getVirtualMachineServiceInstance_Steps(), this.getInstallationStep(), null, "steps", null, 0, -1, VirtualMachineServiceInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(virtualMachineServiceConfigurationEClass, VirtualMachineServiceConfiguration.class, "VirtualMachineServiceConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getVirtualMachineServiceConfiguration_Configuration(), theEcorePackage.getEString(), "configuration", null, 0, 1, VirtualMachineServiceConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(virtualMachineServiceDescriptorEClass, VirtualMachineServiceDescriptor.class, "VirtualMachineServiceDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getVirtualMachineServiceDescriptor_ServicePackage(), theEcorePackage.getEString(), "servicePackage", null, 0, 1, VirtualMachineServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceDescriptor_ServiceClass(), theEcorePackage.getEString(), "serviceClass", null, 0, 1, VirtualMachineServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceDescriptor_ServiceInstanceClass(), theEcorePackage.getEString(), "serviceInstanceClass", null, 0, 1, VirtualMachineServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceDescriptor_VmType(), theEcorePackage.getEString(), "vmType", null, 0, 1, VirtualMachineServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceDescriptor_ManagerPortNumber(), theEcorePackage.getEString(), "managerPortNumber", null, 0, 1, VirtualMachineServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceDescriptor_ManagerUser(), theEcorePackage.getEString(), "managerUser", null, 0, 1, VirtualMachineServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceDescriptor_EncryptedPassword(), theEcorePackage.getEString(), "encryptedPassword", null, 0, 1, VirtualMachineServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceDescriptor_Users(), theEcorePackage.getEString(), "users", null, 0, -1, VirtualMachineServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachineServiceDescriptor_AdminUsers(), theEcorePackage.getEString(), "adminUsers", null, 0, -1, VirtualMachineServiceDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(physicalMachineEClass, PhysicalMachine.class, "PhysicalMachine", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getPhysicalMachine_ManagerPortNumber(), theEcorePackage.getEIntegerObject(), "managerPortNumber", null, 0, 1, PhysicalMachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(virtualMachineEClass, VirtualMachine.class, "VirtualMachine", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getVirtualMachine_FunctionIndex(), theEcorePackage.getEInt(), "functionIndex", null, 0, 1, VirtualMachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachine_KvmName(), theEcorePackage.getEString(), "kvmName", null, 0, 1, VirtualMachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachine_Vnc(), theEcorePackage.getEString(), "vnc", null, 0, 1, VirtualMachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVirtualMachine_Gateway(), theEcorePackage.getEString(), "gateway", null, 0, 1, VirtualMachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(installationStepEClass, InstallationStep.class, "InstallationStep", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getInstallationStep_ApplicationId(), theEcorePackage.getEString(), "applicationId", "dcae", 0, 1, InstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(shellInstallationStepEClass, ShellInstallationStep.class, "ShellInstallationStep", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getShellInstallationStep_Command(), theEcorePackage.getEString(), "command", null, 0, 1, ShellInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(mavenArtifactInstallationStepEClass, MavenArtifactInstallationStep.class, "MavenArtifactInstallationStep", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getMavenArtifactInstallationStep_GroupId(), theEcorePackage.getEString(), "groupId", null, 0, 1, MavenArtifactInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getMavenArtifactInstallationStep_ArtifactId(), theEcorePackage.getEString(), "artifactId", null, 0, 1, MavenArtifactInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getMavenArtifactInstallationStep_Version(), theEcorePackage.getEString(), "version", null, 0, 1, MavenArtifactInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getMavenArtifactInstallationStep_Type(), theEcorePackage.getEString(), "type", null, 0, 1, MavenArtifactInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getMavenArtifactInstallationStep_AssemblyId(), theEcorePackage.getEString(), "assemblyId", null, 0, 1, MavenArtifactInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(httpInstallationStepEClass, HttpInstallationStep.class, "HttpInstallationStep", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getHttpInstallationStep_Url(), theEcorePackage.getEString(), "url", null, 0, 1, HttpInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getHttpInstallationStep_UserName(), theEcorePackage.getEString(), "userName", null, 0, 1, HttpInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getHttpInstallationStep_Password(), theEcorePackage.getEString(), "password", null, 0, 1, HttpInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getHttpInstallationStep_Type(), theEcorePackage.getEString(), "type", null, 0, 1, HttpInstallationStep.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getHttpInstallationStep_ArtifactId(), theEcorePackage.getEString(), "artifactId", null, 0, 1, HttpInstallationStep.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" + }); + } + + /** + * 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 + (getVirtualMachineService_ManagerPortNumber(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getVirtualMachineServiceInstance_VmType(), + source, + new String[] { + "type", "service" + }); + addAnnotation + (getVirtualMachineServiceInstance_Users(), + source, + new String[] { + "type", "service" + }); + addAnnotation + (getVirtualMachineServiceInstance_AdminUsers(), + source, + new String[] { + "type", "service" + }); + addAnnotation + (getVirtualMachineServiceInstance_NumberOfServers(), + source, + new String[] { + "type", "service" + }); + addAnnotation + (getVirtualMachineServiceInstance_AvailabilityZone(), + source, + new String[] { + "type", "service" + }); + addAnnotation + (getVirtualMachineServiceInstance_ManagerPortNumber(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getVirtualMachineServiceInstance_Servers(), + source, + new String[] { + "type", "operational" + }); + addAnnotation + (getVirtualMachineServiceInstance_Service(), + source, + new String[] { + "type", "operational" + }); + addAnnotation + (getVirtualMachineServiceConfiguration_Configuration(), + source, + new String[] { + "type", "configuration" + }); + addAnnotation + (getPhysicalMachine_ManagerPortNumber(), + source, + new String[] { + "type", "configuration" + }); + } + +} //VmPackageImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/util/VmAdapterFactory.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/util/VmAdapterFactory.java new file mode 100644 index 0000000..e7818a4 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/util/VmAdapterFactory.java @@ -0,0 +1,440 @@ + +/*- + * ============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.vm.util; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; + +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.vm.*; + +import org.openecomp.ncomp.core.HasOperationalState; +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.logs.LogMessageContainer; + +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.vm.VmPackage + * @generated + */ +public class VmAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static VmPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VmAdapterFactory() { + if (modelPackage == null) { + modelPackage = VmPackage.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 VmSwitch<Adapter> modelSwitch = + new VmSwitch<Adapter>() { + @Override + public Adapter caseVirtualMachineService(VirtualMachineService object) { + return createVirtualMachineServiceAdapter(); + } + @Override + public Adapter caseVirtualMachineServiceInstance(VirtualMachineServiceInstance object) { + return createVirtualMachineServiceInstanceAdapter(); + } + @Override + public Adapter caseVirtualMachineServiceConfiguration(VirtualMachineServiceConfiguration object) { + return createVirtualMachineServiceConfigurationAdapter(); + } + @Override + public Adapter caseVirtualMachineServiceDescriptor(VirtualMachineServiceDescriptor object) { + return createVirtualMachineServiceDescriptorAdapter(); + } + @Override + public Adapter casePhysicalMachine(PhysicalMachine object) { + return createPhysicalMachineAdapter(); + } + @Override + public Adapter caseVirtualMachine(VirtualMachine object) { + return createVirtualMachineAdapter(); + } + @Override + public Adapter caseInstallationStep(InstallationStep object) { + return createInstallationStepAdapter(); + } + @Override + public Adapter caseShellInstallationStep(ShellInstallationStep object) { + return createShellInstallationStepAdapter(); + } + @Override + public Adapter caseMavenArtifactInstallationStep(MavenArtifactInstallationStep object) { + return createMavenArtifactInstallationStepAdapter(); + } + @Override + public Adapter caseHttpInstallationStep(HttpInstallationStep object) { + return createHttpInstallationStepAdapter(); + } + @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 caseHasOperationalState(HasOperationalState object) { + return createHasOperationalStateAdapter(); + } + @Override + public Adapter caseLogMessageContainer(LogMessageContainer object) { + return createLogMessageContainerAdapter(); + } + @Override + public Adapter caseDcaeBasicServer(DcaeBasicServer object) { + return createDcaeBasicServerAdapter(); + } + @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.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.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 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.VirtualMachineServiceDescriptor <em>Virtual Machine 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.vm.VirtualMachineServiceDescriptor + * @generated + */ + public Adapter createVirtualMachineServiceDescriptorAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.PhysicalMachine <em>Physical Machine</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.PhysicalMachine + * @generated + */ + public Adapter createPhysicalMachineAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachine <em>Virtual Machine</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.VirtualMachine + * @generated + */ + public Adapter createVirtualMachineAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.InstallationStep <em>Installation Step</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.InstallationStep + * @generated + */ + public Adapter createInstallationStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.ShellInstallationStep <em>Shell Installation Step</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.ShellInstallationStep + * @generated + */ + public Adapter createShellInstallationStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.MavenArtifactInstallationStep <em>Maven Artifact Installation Step</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.MavenArtifactInstallationStep + * @generated + */ + public Adapter createMavenArtifactInstallationStepAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.HttpInstallationStep <em>Http Installation Step</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.HttpInstallationStep + * @generated + */ + public Adapter createHttpInstallationStepAdapter() { + 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 an object of class '{@link org.openecomp.ncomp.core.HasOperationalState <em>Has Operational State</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.HasOperationalState + * @generated + */ + public Adapter createHasOperationalStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.logs.LogMessageContainer <em>Log Message Container</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.logs.LogMessageContainer + * @generated + */ + public Adapter createLogMessageContainerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer <em>Dcae Basic 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.dcae.controller.core.server.DcaeBasicServer + * @generated + */ + public Adapter createDcaeBasicServerAdapter() { + 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; + } + +} //VmAdapterFactory diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/util/VmSwitch.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/util/VmSwitch.java new file mode 100644 index 0000000..a8baa5a --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vm/util/VmSwitch.java @@ -0,0 +1,458 @@ + +/*- + * ============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.vm.util; + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer; + +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.vm.*; + +import org.openecomp.ncomp.core.HasOperationalState; +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.logs.LogMessageContainer; + +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.vm.VmPackage + * @generated + */ +public class VmSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static VmPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VmSwitch() { + if (modelPackage == null) { + modelPackage = VmPackage.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 VmPackage.VIRTUAL_MACHINE_SERVICE: { + VirtualMachineService virtualMachineService = (VirtualMachineService)theEObject; + T result = caseVirtualMachineService(virtualMachineService); + if (result == null) result = caseDcaeService(virtualMachineService); + if (result == null) result = caseNamedEntity(virtualMachineService); + if (result == null) result = defaultCase(theEObject); + return result; + } + case VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE: { + VirtualMachineServiceInstance virtualMachineServiceInstance = (VirtualMachineServiceInstance)theEObject; + T result = caseVirtualMachineServiceInstance(virtualMachineServiceInstance); + if (result == null) result = caseDcaeServiceInstance(virtualMachineServiceInstance); + if (result == null) result = caseVirtualMachineServiceConfiguration(virtualMachineServiceInstance); + if (result == null) result = caseNamedEntity(virtualMachineServiceInstance); + if (result == null) result = defaultCase(theEObject); + return result; + } + case VmPackage.VIRTUAL_MACHINE_SERVICE_CONFIGURATION: { + VirtualMachineServiceConfiguration virtualMachineServiceConfiguration = (VirtualMachineServiceConfiguration)theEObject; + T result = caseVirtualMachineServiceConfiguration(virtualMachineServiceConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case VmPackage.VIRTUAL_MACHINE_SERVICE_DESCRIPTOR: { + VirtualMachineServiceDescriptor virtualMachineServiceDescriptor = (VirtualMachineServiceDescriptor)theEObject; + T result = caseVirtualMachineServiceDescriptor(virtualMachineServiceDescriptor); + if (result == null) result = caseDcaeServiceDescriptor(virtualMachineServiceDescriptor); + if (result == null) result = caseNamedEntity(virtualMachineServiceDescriptor); + if (result == null) result = defaultCase(theEObject); + return result; + } + case VmPackage.PHYSICAL_MACHINE: { + PhysicalMachine physicalMachine = (PhysicalMachine)theEObject; + T result = casePhysicalMachine(physicalMachine); + if (result == null) result = caseDcaeBasicServer(physicalMachine); + if (result == null) result = caseNamedEntity(physicalMachine); + if (result == null) result = caseHasOperationalState(physicalMachine); + if (result == null) result = caseLogMessageContainer(physicalMachine); + if (result == null) result = defaultCase(theEObject); + return result; + } + case VmPackage.VIRTUAL_MACHINE: { + VirtualMachine virtualMachine = (VirtualMachine)theEObject; + T result = caseVirtualMachine(virtualMachine); + if (result == null) result = caseDcaeBasicServer(virtualMachine); + if (result == null) result = caseNamedEntity(virtualMachine); + if (result == null) result = caseHasOperationalState(virtualMachine); + if (result == null) result = caseLogMessageContainer(virtualMachine); + if (result == null) result = defaultCase(theEObject); + return result; + } + case VmPackage.INSTALLATION_STEP: { + InstallationStep installationStep = (InstallationStep)theEObject; + T result = caseInstallationStep(installationStep); + if (result == null) result = caseNamedEntity(installationStep); + if (result == null) result = defaultCase(theEObject); + return result; + } + case VmPackage.SHELL_INSTALLATION_STEP: { + ShellInstallationStep shellInstallationStep = (ShellInstallationStep)theEObject; + T result = caseShellInstallationStep(shellInstallationStep); + if (result == null) result = caseInstallationStep(shellInstallationStep); + if (result == null) result = caseNamedEntity(shellInstallationStep); + if (result == null) result = defaultCase(theEObject); + return result; + } + case VmPackage.MAVEN_ARTIFACT_INSTALLATION_STEP: { + MavenArtifactInstallationStep mavenArtifactInstallationStep = (MavenArtifactInstallationStep)theEObject; + T result = caseMavenArtifactInstallationStep(mavenArtifactInstallationStep); + if (result == null) result = caseInstallationStep(mavenArtifactInstallationStep); + if (result == null) result = caseNamedEntity(mavenArtifactInstallationStep); + if (result == null) result = defaultCase(theEObject); + return result; + } + case VmPackage.HTTP_INSTALLATION_STEP: { + HttpInstallationStep httpInstallationStep = (HttpInstallationStep)theEObject; + T result = caseHttpInstallationStep(httpInstallationStep); + if (result == null) result = caseInstallationStep(httpInstallationStep); + if (result == null) result = caseNamedEntity(httpInstallationStep); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * 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>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>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 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>Virtual Machine Service Descriptor</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineServiceDescriptor(VirtualMachineServiceDescriptor object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Physical Machine</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>Physical Machine</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T casePhysicalMachine(PhysicalMachine object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Virtual Machine</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</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachine(VirtualMachine object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Installation Step</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>Installation Step</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseInstallationStep(InstallationStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Shell Installation Step</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>Shell Installation Step</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseShellInstallationStep(ShellInstallationStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Maven Artifact Installation Step</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>Maven Artifact Installation Step</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMavenArtifactInstallationStep(MavenArtifactInstallationStep object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Http Installation Step</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>Http Installation Step</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseHttpInstallationStep(HttpInstallationStep 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>Has Operational State</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>Has Operational State</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseHasOperationalState(HasOperationalState object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Log Message Container</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>Log Message Container</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLogMessageContainer(LogMessageContainer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Dcae Basic 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>Dcae Basic Server</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeBasicServer(DcaeBasicServer 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; + } + +} //VmSwitch diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VirtualMachineManager.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VirtualMachineManager.java new file mode 100644 index 0000000..ec06281 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VirtualMachineManager.java @@ -0,0 +1,40 @@ + +/*- + * ============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.vmmanager; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Virtual Machine Manager</b></em>'. + * <!-- end-user-doc --> + * + * + * @see org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage#getVirtualMachineManager() + * @model + * @generated + */ +public interface VirtualMachineManager extends DcaeManager, AbstractManagementServer { +} // VirtualMachineManager diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VmmanagerFactory.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VmmanagerFactory.java new file mode 100644 index 0000000..823a4b1 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VmmanagerFactory.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.vmmanager; + +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.vmmanager.VmmanagerPackage + * @generated + */ +public interface VmmanagerFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + VmmanagerFactory eINSTANCE = org.openecomp.dcae.controller.service.vmmanager.impl.VmmanagerFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Virtual Machine Manager</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Virtual Machine Manager</em>'. + * @generated + */ + VirtualMachineManager createVirtualMachineManager(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the package supported by this factory. + * @generated + */ + VmmanagerPackage getVmmanagerPackage(); + +} //VmmanagerFactory diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VmmanagerPackage.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VmmanagerPackage.java new file mode 100644 index 0000000..ebb15f5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/VmmanagerPackage.java @@ -0,0 +1,336 @@ + +/*- + * ============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.vmmanager; + +import org.openecomp.dcae.controller.core.manager.ManagerPackage; + +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.vmmanager.VmmanagerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-vm-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service'" + * annotation="http://www.eclipse.org/emf/2011/Xcore ecomp='http://openecomp.org'" + * @generated + */ +public interface VmmanagerPackage extends EPackage { + /** + * The package name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "vmmanager"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.vmmanager"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "vmmanager"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + VmmanagerPackage eINSTANCE = org.openecomp.dcae.controller.service.vmmanager.impl.VmmanagerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl <em>Virtual Machine Manager</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl + * @see org.openecomp.dcae.controller.service.vmmanager.impl.VmmanagerPackageImpl#getVirtualMachineManager() + * @generated + */ + int VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_MANAGER__CONFIGURATION = ManagerPackage.DCAE_MANAGER_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Component</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER__COMPONENT = ManagerPackage.DCAE_MANAGER_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Virtual Machine Manager</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT = ManagerPackage.DCAE_MANAGER_FEATURE_COUNT + 2; + + /** + * The operation id for the '<em>Test</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___TEST = ManagerPackage.DCAE_MANAGER___TEST; + + /** + * The operation id for the '<em>Suspend</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___SUSPEND = ManagerPackage.DCAE_MANAGER___SUSPEND; + + /** + * The operation id for the '<em>Resume</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_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 VIRTUAL_MACHINE_MANAGER___UPDATE_STREAMS__ELIST_ELIST = ManagerPackage.DCAE_MANAGER___UPDATE_STREAMS__ELIST_ELIST; + + /** + * The operation id for the '<em>Logs</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___LOGS__JSONOBJECT_ELIST = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 0; + + /** + * The operation id for the '<em>Metrics</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___METRICS__JSONOBJECT_ELIST = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 1; + + /** + * The operation id for the '<em>Properties</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___PROPERTIES__JSONOBJECT_ELIST = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 2; + + /** + * The operation id for the '<em>Upload Info</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___UPLOAD_INFO__JSONOBJECT_ELIST = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 3; + + /** + * The operation id for the '<em>Get Values</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 4; + + /** + * The operation id for the '<em>Get Values All</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 5; + + /** + * The operation id for the '<em>Get Messages</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 6; + + /** + * The operation id for the '<em>Get Request Logger</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 7; + + /** + * The operation id for the '<em>Evaluate</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___EVALUATE__STRING_FUNCTION = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 8; + + /** + * The operation id for the '<em>Update</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER___UPDATE__STRING_FUNCTION = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 9; + + /** + * The number of operations of the '<em>Virtual Machine Manager</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT = ManagerPackage.DCAE_MANAGER_OPERATION_COUNT + 10; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager <em>Virtual Machine Manager</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Virtual Machine Manager</em>'. + * @see org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager + * @generated + */ + EClass getVirtualMachineManager(); + + /** + * 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 + */ + VmmanagerFactory getVmmanagerFactory(); + + /** + * <!-- 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.vmmanager.impl.VirtualMachineManagerImpl <em>Virtual Machine Manager</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl + * @see org.openecomp.dcae.controller.service.vmmanager.impl.VmmanagerPackageImpl#getVirtualMachineManager() + * @generated + */ + EClass VIRTUAL_MACHINE_MANAGER = eINSTANCE.getVirtualMachineManager(); + + } + +} //VmmanagerPackage diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VirtualMachineManagerImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VirtualMachineManagerImpl.java new file mode 100644 index 0000000..0eef01d --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VirtualMachineManagerImpl.java @@ -0,0 +1,515 @@ + +/*- + * ============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.vmmanager.impl; + +import org.openecomp.dcae.controller.core.manager.impl.DcaeManagerImpl; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; + +import org.openecomp.ncomp.component.Component; +import org.openecomp.ncomp.core.function.Function; +import org.openecomp.ncomp.core.function.ValuePair; +import org.openecomp.ncomp.core.logs.LogMessage; +import org.openecomp.ncomp.core.metrics.DoubleMetric; +import org.openecomp.ncomp.core.metrics.Metric; +import org.openecomp.ncomp.core.metrics.MetricValueOption; +import org.openecomp.ncomp.sirius.manager.properties.AbstractProperty; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration; +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; +import org.openecomp.ncomp.sirius.manager.server.ManagementInfo; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; +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; +import org.json.JSONObject; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Virtual Machine Manager</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl#getConfiguration <em>Configuration</em>}</li> + * <li>{@link org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl#getComponent <em>Component</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class VirtualMachineManagerImpl extends DcaeManagerImpl implements VirtualMachineManager { + /** + * The cached value of the '{@link #getConfiguration() <em>Configuration</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getConfiguration() + * @generated + * @ordered + */ + protected AbstractManagementServerConfiguration configuration; + /** + * The cached value of the '{@link #getComponent() <em>Component</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getComponent() + * @generated + * @ordered + */ + protected Component component; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected VirtualMachineManagerImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return VmmanagerPackage.Literals.VIRTUAL_MACHINE_MANAGER; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AbstractManagementServerConfiguration getConfiguration() { + return configuration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetConfiguration(AbstractManagementServerConfiguration newConfiguration, NotificationChain msgs) { + AbstractManagementServerConfiguration oldConfiguration = configuration; + configuration = newConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, VmmanagerPackage.VIRTUAL_MACHINE_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(AbstractManagementServerConfiguration newConfiguration) { + if (newConfiguration != configuration) { + NotificationChain msgs = null; + if (configuration != null) + msgs = ((InternalEObject)configuration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION, null, msgs); + if (newConfiguration != null) + msgs = ((InternalEObject)newConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION, null, msgs); + msgs = basicSetConfiguration(newConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION, newConfiguration, newConfiguration)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Component getComponent() { + return component; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetComponent(Component newComponent, NotificationChain msgs) { + Component oldComponent = component; + component = newComponent; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT, oldComponent, newComponent); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setComponent(Component newComponent) { + if (newComponent != component) { + NotificationChain msgs = null; + if (component != null) + msgs = ((InternalEObject)component).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT, null, msgs); + if (newComponent != null) + msgs = ((InternalEObject)newComponent).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT, null, msgs); + msgs = basicSetComponent(newComponent, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT, newComponent, newComponent)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<DoubleMetric> getValues(JSONObject cx, String path, Long start, Long end, MetricValueOption option, boolean relativeInterval) { + // 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<DoubleMetric> getValuesAll(JSONObject cx, String path, EList<String> metrics, Long start, Long end, MetricValueOption option, boolean relativeInterval) { + // 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<LogMessage> getMessages(JSONObject cx, String path, Long start, Long end) { + // 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 LoggerInfo getRequestLogger(String userName, String action, String resourcePath, JSONObject context) { + // 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<ValuePair> evaluate(String path, Function function) { + // 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 void update(String path, Function function) { + // 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 void uploadInfo(JSONObject cx, EList<ManagementInfo> info) { + // 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 void logs(JSONObject cx, EList<LogMessage> logs) { + // 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 void metrics(JSONObject cx, EList<Metric> metrics) { + // 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 void properties(JSONObject cx, EList<AbstractProperty> l) { + // 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 VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION: + return basicSetConfiguration(null, msgs); + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT: + return basicSetComponent(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 VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION: + return getConfiguration(); + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT: + return getComponent(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION: + setConfiguration((AbstractManagementServerConfiguration)newValue); + return; + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT: + setComponent((Component)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION: + setConfiguration((AbstractManagementServerConfiguration)null); + return; + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT: + setComponent((Component)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION: + return configuration != null; + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT: + return component != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { + if (baseClass == SouthBoundApi.class) { + switch (derivedFeatureID) { + default: return -1; + } + } + if (baseClass == SouthBoundApiWithProxy.class) { + switch (derivedFeatureID) { + default: return -1; + } + } + if (baseClass == AbstractManagementServer.class) { + switch (derivedFeatureID) { + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION: return ServerPackage.ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION; + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT: return ServerPackage.ABSTRACT_MANAGEMENT_SERVER__COMPONENT; + 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 == SouthBoundApi.class) { + switch (baseFeatureID) { + default: return -1; + } + } + if (baseClass == SouthBoundApiWithProxy.class) { + switch (baseFeatureID) { + default: return -1; + } + } + if (baseClass == AbstractManagementServer.class) { + switch (baseFeatureID) { + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER__COMPONENT: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT; + 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 == SouthBoundApi.class) { + switch (baseOperationID) { + case ServerPackage.SOUTH_BOUND_API___LOGS__JSONOBJECT_ELIST: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___LOGS__JSONOBJECT_ELIST; + case ServerPackage.SOUTH_BOUND_API___METRICS__JSONOBJECT_ELIST: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___METRICS__JSONOBJECT_ELIST; + case ServerPackage.SOUTH_BOUND_API___PROPERTIES__JSONOBJECT_ELIST: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___PROPERTIES__JSONOBJECT_ELIST; + default: return -1; + } + } + if (baseClass == SouthBoundApiWithProxy.class) { + switch (baseOperationID) { + case ServerPackage.SOUTH_BOUND_API_WITH_PROXY___UPLOAD_INFO__JSONOBJECT_ELIST: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPLOAD_INFO__JSONOBJECT_ELIST; + default: return -1; + } + } + if (baseClass == AbstractManagementServer.class) { + switch (baseOperationID) { + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___EVALUATE__STRING_FUNCTION: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___EVALUATE__STRING_FUNCTION; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___UPDATE__STRING_FUNCTION: return VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPDATE__STRING_FUNCTION; + default: return -1; + } + } + return super.eDerivedOperationID(baseOperationID, baseClass); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + @SuppressWarnings("unchecked") + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN: + return getValues((JSONObject)arguments.get(0), (String)arguments.get(1), (Long)arguments.get(2), (Long)arguments.get(3), (MetricValueOption)arguments.get(4), (Boolean)arguments.get(5)); + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN: + return getValuesAll((JSONObject)arguments.get(0), (String)arguments.get(1), (EList<String>)arguments.get(2), (Long)arguments.get(3), (Long)arguments.get(4), (MetricValueOption)arguments.get(5), (Boolean)arguments.get(6)); + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG: + return getMessages((JSONObject)arguments.get(0), (String)arguments.get(1), (Long)arguments.get(2), (Long)arguments.get(3)); + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT: + return getRequestLogger((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (JSONObject)arguments.get(3)); + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___EVALUATE__STRING_FUNCTION: + return evaluate((String)arguments.get(0), (Function)arguments.get(1)); + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPDATE__STRING_FUNCTION: + update((String)arguments.get(0), (Function)arguments.get(1)); + return null; + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPLOAD_INFO__JSONOBJECT_ELIST: + uploadInfo((JSONObject)arguments.get(0), (EList<ManagementInfo>)arguments.get(1)); + return null; + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___LOGS__JSONOBJECT_ELIST: + logs((JSONObject)arguments.get(0), (EList<LogMessage>)arguments.get(1)); + return null; + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___METRICS__JSONOBJECT_ELIST: + metrics((JSONObject)arguments.get(0), (EList<Metric>)arguments.get(1)); + return null; + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___PROPERTIES__JSONOBJECT_ELIST: + properties((JSONObject)arguments.get(0), (EList<AbstractProperty>)arguments.get(1)); + return null; + } + return super.eInvoke(operationID, arguments); + } + +} //VirtualMachineManagerImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VmmanagerFactoryImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VmmanagerFactoryImpl.java new file mode 100644 index 0000000..6c457f2 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VmmanagerFactoryImpl.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.vmmanager.impl; + +import org.openecomp.dcae.controller.service.vmmanager.*; + +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 VmmanagerFactoryImpl extends EFactoryImpl implements VmmanagerFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static VmmanagerFactory init() { + try { + VmmanagerFactory theVmmanagerFactory = (VmmanagerFactory)EPackage.Registry.INSTANCE.getEFactory(VmmanagerPackage.eNS_URI); + if (theVmmanagerFactory != null) { + return theVmmanagerFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new VmmanagerFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VmmanagerFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case VmmanagerPackage.VIRTUAL_MACHINE_MANAGER: return createVirtualMachineManager(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VirtualMachineManager createVirtualMachineManager() { + VirtualMachineManagerImpl virtualMachineManager = new VirtualMachineManagerImpl(); + return virtualMachineManager; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VmmanagerPackage getVmmanagerPackage() { + return (VmmanagerPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @deprecated + * @generated + */ + @Deprecated + public static VmmanagerPackage getPackage() { + return VmmanagerPackage.eINSTANCE; + } + +} //VmmanagerFactoryImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VmmanagerPackageImpl.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VmmanagerPackageImpl.java new file mode 100644 index 0000000..3c01a4e --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/impl/VmmanagerPackageImpl.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.vmmanager.impl; + +import org.openecomp.dcae.controller.core.manager.ManagerPackage; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerFactory; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; + +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; +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 VmmanagerPackageImpl extends EPackageImpl implements VmmanagerPackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass virtualMachineManagerEClass = 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.vmmanager.VmmanagerPackage#eNS_URI + * @see #init() + * @generated + */ + private VmmanagerPackageImpl() { + super(eNS_URI, VmmanagerFactory.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 VmmanagerPackage#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 VmmanagerPackage init() { + if (isInited) return (VmmanagerPackage)EPackage.Registry.INSTANCE.getEPackage(VmmanagerPackage.eNS_URI); + + // Obtain or create and register package + VmmanagerPackageImpl theVmmanagerPackage = (VmmanagerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof VmmanagerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new VmmanagerPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + ServerPackage.eINSTANCE.eClass(); + ManagerPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theVmmanagerPackage.createPackageContents(); + + // Initialize created meta-data + theVmmanagerPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theVmmanagerPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(VmmanagerPackage.eNS_URI, theVmmanagerPackage); + return theVmmanagerPackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getVirtualMachineManager() { + return virtualMachineManagerEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VmmanagerFactory getVmmanagerFactory() { + return (VmmanagerFactory)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 + virtualMachineManagerEClass = createEClass(VIRTUAL_MACHINE_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 + ManagerPackage theManagerPackage = (ManagerPackage)EPackage.Registry.INSTANCE.getEPackage(ManagerPackage.eNS_URI); + ServerPackage theServerPackage = (ServerPackage)EPackage.Registry.INSTANCE.getEPackage(ServerPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + virtualMachineManagerEClass.getESuperTypes().add(theManagerPackage.getDcaeManager()); + virtualMachineManagerEClass.getESuperTypes().add(theServerPackage.getAbstractManagementServer()); + + // Initialize classes, features, and operations; add parameters + initEClass(virtualMachineManagerEClass, VirtualMachineManager.class, "VirtualMachineManager", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + } + + /** + * 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" + }); + } + +} //VmmanagerPackageImpl diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/util/VmmanagerAdapterFactory.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/util/VmmanagerAdapterFactory.java new file mode 100644 index 0000000..2be21cd --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/util/VmmanagerAdapterFactory.java @@ -0,0 +1,218 @@ + +/*- + * ============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.vmmanager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.vmmanager.*; + +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.vmmanager.VmmanagerPackage + * @generated + */ +public class VmmanagerAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static VmmanagerPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VmmanagerAdapterFactory() { + if (modelPackage == null) { + modelPackage = VmmanagerPackage.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 VmmanagerSwitch<Adapter> modelSwitch = + new VmmanagerSwitch<Adapter>() { + @Override + public Adapter caseVirtualMachineManager(VirtualMachineManager object) { + return createVirtualMachineManagerAdapter(); + } + @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 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.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.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 the default case. + * <!-- begin-user-doc --> + * This default implementation returns null. + * <!-- end-user-doc --> + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //VmmanagerAdapterFactory diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/util/VmmanagerSwitch.java b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/util/VmmanagerSwitch.java new file mode 100644 index 0000000..afcc7b5 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/vmmanager/util/VmmanagerSwitch.java @@ -0,0 +1,200 @@ + +/*- + * ============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.vmmanager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; + +import org.openecomp.dcae.controller.service.vmmanager.*; + +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.vmmanager.VmmanagerPackage + * @generated + */ +public class VmmanagerSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static VmmanagerPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public VmmanagerSwitch() { + if (modelPackage == null) { + modelPackage = VmmanagerPackage.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 VmmanagerPackage.VIRTUAL_MACHINE_MANAGER: { + VirtualMachineManager virtualMachineManager = (VirtualMachineManager)theEObject; + T result = caseVirtualMachineManager(virtualMachineManager); + if (result == null) result = caseDcaeManager(virtualMachineManager); + if (result == null) result = caseAbstractManagementServer(virtualMachineManager); + if (result == null) result = caseSouthBoundApiWithProxy(virtualMachineManager); + if (result == null) result = caseSouthBoundApi(virtualMachineManager); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * 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>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>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; + } + +} //VmmanagerSwitch diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore/manager.xcore b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore/manager.xcore new file mode 100644 index 0000000..5306afe --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-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-vm-model/src/main/xcore-gen") +package org.openecomp.dcae.controller.service.vmmanager + +import org.openecomp.dcae.controller.core.manager.DcaeManager +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer + +annotation "http://openecomp.org" as ecomp + +// correspond to a BsaApplication +class VirtualMachineManager extends DcaeManager, AbstractManagementServer { +} + diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore/service.xcore b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore/service.xcore new file mode 100644 index 0000000..44dea74 --- /dev/null +++ b/dcae-controller-service-vm/dcae-controller-service-vm-model/src/main/xcore/service.xcore @@ -0,0 +1,132 @@ + +/*- + * ============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-vm-model/src/main/xcore-gen") +package org.openecomp.dcae.controller.service.vm + +import org.openecomp.dcae.controller.core.server.DcaeBasicServer +import org.openecomp.dcae.controller.core.service.DcaeLocation +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.ncomp.core.User +import org.openecomp.ncomp.openstack.core.VirtualMachineType +import org.openecomp.ncomp.core.NamedEntity + +annotation "http://openecomp.org" as ecomp + +// correspond to a BsaApplication +class VirtualMachineService extends DcaeService { + contains VirtualMachineServiceInstance[] instances opposite service + @ecomp(^type = "configuration") + int managerPortNumber = "9999" + op void updateDeploymentStatus() +} + +class VirtualMachineServiceInstance extends DcaeServiceInstance, VirtualMachineServiceConfiguration { + refers DcaeLocation location + @ecomp(^type = "service") + refers VirtualMachineType vmType + @ecomp(^type = "service") + refers User[] users + @ecomp(^type = "service") + refers User[] adminUsers + String[] applicationIds + String adminId + @ecomp(^type = "service") + int numberOfServers = "1" + @ecomp(^type = "service") + String availabilityZone + @ecomp(^type = "configuration") + Integer managerPortNumber + // @ecomp(^type = "operational") + // contains SecurityRule[] incomingSecurityRules + // @ecomp(^type = "operational") + // contains SecurityRule[] outboundSecurityRules + @ecomp(^type = "operational") + contains DcaeBasicServer[] servers + refers DcaeBasicServer leaderServer + @ecomp(^type = "operational") + refers VirtualMachineService service opposite instances + String iedsAdmin + String chefUser + String chefOrg + String chefTopology + String openstackFlavor + String serviceFqdn + int deploymentTimeoutMinutes = "90" + contains InstallationStep[] steps +} + +class VirtualMachineServiceConfiguration { + @ecomp(^type = "configuration") + String configuration +} + +class VirtualMachineServiceDescriptor extends DcaeServiceDescriptor { + String servicePackage // "org.openecomp.dcae.controller.service.sample.sdnl.service", + String serviceClass // "ControllerServiceSampleSdnlService", + String serviceInstanceClass // "ControllerServiceSampleSdnlServiceInstance", + String vmType // "sample-sdnl", + String managerPortNumber // "9996", + String managerUser // "console", + String encryptedPassword // "rsa:asfdsf" + String[] users + String[] adminUsers +} + +class PhysicalMachine extends DcaeBasicServer { + @ecomp(^type = "configuration") + Integer managerPortNumber +} + +class VirtualMachine extends DcaeBasicServer { + int functionIndex + String kvmName + String vnc // 1.2.3.4:4005 IP:PORT + String gateway +} + +abstract class InstallationStep extends NamedEntity { + String applicationId = "dcae" +} + +class ShellInstallationStep extends InstallationStep { + String command +} + +class MavenArtifactInstallationStep extends InstallationStep { + String groupId + String artifactId + String version + String ^type + String assemblyId +} + +class HttpInstallationStep extends InstallationStep { + String url + String userName + String password + String ^type + String artifactId +} + diff --git a/dcae-controller-service-vm/pom.xml b/dcae-controller-service-vm/pom.xml new file mode 100644 index 0000000..fd6822c --- /dev/null +++ b/dcae-controller-service-vm/pom.xml @@ -0,0 +1,86 @@ +<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-vm</artifactId> + <version>0.1.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <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-vm-model</module> + <module>dcae-controller-service-vm-adaptor</module> + + <module>dcae-controller-service-common-vm</module> + </modules> + <name>dcae-controller-service-vm</name> + + <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> |