diff options
115 files changed, 3473 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..29ee39e --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=gerrit.openecomp.org +port=29418 +project=ncomp/maven.git diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/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/README.md b/README.md new file mode 100644 index 0000000..8ffcec2 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ + +Some Maven related artifacts for Sirius Management Framework + +# Build instructions + +1. Clone the repository +2. Build using Maven: mvn clean install + diff --git a/deptree.text b/deptree.text new file mode 100644 index 0000000..1670a72 --- /dev/null +++ b/deptree.text @@ -0,0 +1 @@ +org.openecomp.ncomp.maven:ncomp-maven:pom:0.1.0-SNAPSHOT diff --git a/ncomp-maven-base/.classpath b/ncomp-maven-base/.classpath new file mode 100644 index 0000000..b9f286d --- /dev/null +++ b/ncomp-maven-base/.classpath @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <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.m2e.MAVEN2_CLASSPATH_CONTAINER"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" output="target/classes" path="src/main/xcore-gen"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" output="target/test-classes" path="src/test/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="output" path="target/classes"/> +</classpath> diff --git a/ncomp-maven-base/.gitignore b/ncomp-maven-base/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/ncomp-maven-base/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/ncomp-maven-base/.project b/ncomp-maven-base/.project new file mode 100644 index 0000000..e4cbe87 --- /dev/null +++ b/ncomp-maven-base/.project @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>ncomp-maven-base</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + </natures> +</projectDescription> diff --git a/ncomp-maven-base/.settings/org.eclipse.core.resources.prefs b/ncomp-maven-base/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/ncomp-maven-base/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/<project>=UTF-8 diff --git a/ncomp-maven-base/.settings/org.eclipse.jdt.core.prefs b/ncomp-maven-base/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..443e085 --- /dev/null +++ b/ncomp-maven-base/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/ncomp-maven-base/.settings/org.eclipse.m2e.core.prefs b/ncomp-maven-base/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-maven-base/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-maven-base/LICENSE.txt b/ncomp-maven-base/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/ncomp-maven-base/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/ncomp-maven-base/pom.xml b/ncomp-maven-base/pom.xml new file mode 100644 index 0000000..6f07bb8 --- /dev/null +++ b/ncomp-maven-base/pom.xml @@ -0,0 +1,111 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.openecomp.ncomp.maven</groupId> + <artifactId>ncomp-maven-base</artifactId> + <version>0.1.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.compiler.target>1.7</maven.compiler.target> + <maven.compiler.source>1.7</maven.compiler.source> + </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> + + + + <distributionManagement> + <repository> + <id>osecomp-nexus-releases</id> + <name>OSECOMP Release Repository</name> + <url>${openecomp.nexus.releases}</url> + </repository> + <snapshotRepository> + <id>osecomp-nexus-snapshots</id> + <name>OSECOMP Snapshot Repository</name> + <url>${openecomp.nexus.snapshots}</url> + </snapshotRepository> + <site> + <id>dcae-javadoc</id> + <url>${site.urlroot}/${project.artifactId}/${project.version}/</url> + </site> + </distributionManagement> + + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>2.10.4</version> + <configuration> + <failOnError>false</failOnError> + <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet> + <docletArtifact> + <groupId>org.umlgraph</groupId> + <artifactId>umlgraph</artifactId> + <version>5.6</version> + </docletArtifact> + <additionalparam>-views</additionalparam> + <useStandardDocletOptions>true</useStandardDocletOptions> + </configuration> + </plugin> + </plugins> + </reporting> + + +</project> diff --git a/ncomp-maven-parent-project/.project b/ncomp-maven-parent-project/.project new file mode 100644 index 0000000..c402e7e --- /dev/null +++ b/ncomp-maven-parent-project/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>ncomp-maven-parent-project</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + </natures> +</projectDescription> diff --git a/ncomp-maven-parent-project/LICENSE.txt b/ncomp-maven-parent-project/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/ncomp-maven-parent-project/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/ncomp-maven-parent-project/src/main/resources/archetype-resources/.gitignore b/ncomp-maven-parent-project/src/main/resources/archetype-resources/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/ncomp-maven-parent-project/src/main/resources/archetype-resources/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/ncomp-maven-parent-project/src/main/resources/archetype-resources/.project b/ncomp-maven-parent-project/src/main/resources/archetype-resources/.project new file mode 100644 index 0000000..b037bcd --- /dev/null +++ b/ncomp-maven-parent-project/src/main/resources/archetype-resources/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>PPPP</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + </natures> +</projectDescription> diff --git a/ncomp-maven-parent-project/src/main/resources/archetype-resources/.settings/org.eclipse.core.resources.prefs b/ncomp-maven-parent-project/src/main/resources/archetype-resources/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/ncomp-maven-parent-project/src/main/resources/archetype-resources/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/<project>=UTF-8 diff --git a/ncomp-maven-parent-project/src/main/resources/archetype-resources/.settings/org.eclipse.m2e.core.prefs b/ncomp-maven-parent-project/src/main/resources/archetype-resources/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-maven-parent-project/src/main/resources/archetype-resources/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-maven-parent-project/src/main/resources/archetype-resources/pom.xml b/ncomp-maven-parent-project/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000..0151c7a --- /dev/null +++ b/ncomp-maven-parent-project/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,25 @@ +<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>GNAMEEEE</groupId> + <artifactId>PPPP</artifactId> + <version>0.1.0-SNAPSHOT</version> + <packaging>pom</packaging> + <name>PPPP</name> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <modules> + MMMM + </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/ncomp-maven-parent-project/src/main/resources/archetype-resources/src/main/resources/setup.sh b/ncomp-maven-parent-project/src/main/resources/archetype-resources/src/main/resources/setup.sh new file mode 100644 index 0000000..33e9e7d --- /dev/null +++ b/ncomp-maven-parent-project/src/main/resources/archetype-resources/src/main/resources/setup.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -v + +#STEP 1 build code +( cd git/GNAMEEE/PPPP ; mvn clean install ) || exit + +#STEP 2 install and start service controller +bin/ncomp-tool install-sirius-controller GNAMEEE PPPP-server 7112 || exit + +#STEP 3 start controller GUI +bin/ncomp-tool install-sirius-controller-gui PPPP-server "XXXX" + + +#STEP 4 start console and create anormaly +echo make console +echo :load scripts/console.groovy + + + + diff --git a/ncomp-maven-parent-project/src/main/resources/new_project.sh b/ncomp-maven-parent-project/src/main/resources/new_project.sh new file mode 100644 index 0000000..997dfcf --- /dev/null +++ b/ncomp-maven-parent-project/src/main/resources/new_project.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +GIT=$1 +PREFIX=$2 +GNAMEEEE=$3 + +RRRR=`echo $PPPP | sed s/-//g` +SSSS=`echo $PPPP | sed s/-/./g` +XXXX=`echo $PPPP | sed sx-x/xg` +##TTTT=`echo $QQQQ | sed s/-/./g` +##YYYY=`echo $QQQQ | sed sx-x/xg` +BBBB=$(tr '[:upper:]' '[:lower:]' <<< $ZZZZ) + +SDIR=$(dirname $0)/archetype-resources + +DIR=$GIT/$PREFIX + + +if [ -e $DIR ]; then + echo $DIR exists + exit 1 +fi + +echo Creating Maven Parent project $DIR + +cp -rp $SDIR $DIR + +find $DIR -type f | xargs -I X sed -i s/PPPP/$PREFIX/g X +find $DIR -type f | xargs -I YY sed -i s/GNAMEEEE/$GNAMEEEE/g YY + +for d1 in $(ls -1d $GIT/$PREFIX-*); do + d=$(basename $d1) + ## echo DIR $d + ## echo sed -i "s=MMMM=<module>../$d</module>\nMMMM=" $DIR/pom.xml + sed -i "s=MMMM=<module>../$d</module>\n MMMM=" $DIR/pom.xml +done +sed -i "s/.*MMMM.*//" $DIR/pom.xml + + diff --git a/ncomp-maven-sirius-project/.project b/ncomp-maven-sirius-project/.project new file mode 100644 index 0000000..931b6ce --- /dev/null +++ b/ncomp-maven-sirius-project/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>ncomp-maven-sirius-project</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + </natures> +</projectDescription> diff --git a/ncomp-maven-sirius-project/.settings/org.eclipse.m2e.core.prefs b/ncomp-maven-sirius-project/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-maven-sirius-project/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-maven-sirius-project/LICENSE.txt b/ncomp-maven-sirius-project/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/ncomp-maven-sirius-project/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/ncomp-maven-sirius-project/pom.xml b/ncomp-maven-sirius-project/pom.xml new file mode 100644 index 0000000..36f1a59 --- /dev/null +++ b/ncomp-maven-sirius-project/pom.xml @@ -0,0 +1,14 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.openecomp.ncomp.maven</groupId> + <artifactId>ncomp-maven-sirius-project</artifactId> + <version>0.1.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <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>
\ No newline at end of file diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/.classpath b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/.classpath new file mode 100644 index 0000000..d2d34b3 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/.classpath @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="config"/> + <classpathentry kind="src" output="target/classes" path="src/main/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" path="src/main/server"/> + <classpathentry kind="src" path="src/main/server-gen"/> + <classpathentry kind="src" path="src/main/sirius-gen"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/> + <classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/> + <classpathentry kind="output" path="target/classes"/> +</classpath> diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/.gitignore b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/.project b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/.project new file mode 100644 index 0000000..3b2eb1b --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/.project @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>NCOMPNAME-PPPP-QQQQ</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</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.groovy.core.groovyNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + </natures> +</projectDescription> diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/.settings/org.eclipse.jdt.core.prefs b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/.settings/org.eclipse.jdt.groovy.core.prefs b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/.settings/org.eclipse.jdt.groovy.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +groovy.compiler.level=24 diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/.settings/org.eclipse.m2e.core.prefs b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/META-INF/MANIFEST.MF b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/META-INF/MANIFEST.MF new file mode 100644 index 0000000..0fcefb1 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/META-INF/MANIFEST.MF @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: NCOMPNAME-PPPP-QQQQ +Bundle-SymbolicName: NCOMPNAME-PPPP-QQQQ +Bundle-Version: 0.1.0.qualifier +Export-Package: NCOMPBASE.SSSS.TTTT.tools, + NCOMPBASE.servers.SSSS +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + NCOMPNAME-PPPP-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0" diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/META-INF/adaptor:MANIFEST.MF b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/META-INF/adaptor:MANIFEST.MF new file mode 100644 index 0000000..0fcefb1 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/META-INF/adaptor:MANIFEST.MF @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: NCOMPNAME-PPPP-QQQQ +Bundle-SymbolicName: NCOMPNAME-PPPP-QQQQ +Bundle-Version: 0.1.0.qualifier +Export-Package: NCOMPBASE.SSSS.TTTT.tools, + NCOMPBASE.servers.SSSS +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + NCOMPNAME-PPPP-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0" diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/META-INF/dcae-cdap-manager:MANIFEST.MF b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/META-INF/dcae-cdap-manager:MANIFEST.MF new file mode 100644 index 0000000..d9e0351 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/META-INF/dcae-cdap-manager:MANIFEST.MF @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: NCOMPNAME-PPPP-QQQQ +Bundle-SymbolicName: NCOMPNAME-PPPP-QQQQ +Bundle-Version: 0.1.0.qualifier +Export-Package: NCOMPBASE.SSSS.TTTT.tools, + NCOMPBASE.SSSS.servers.TTTT +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + NCOMPNAME-PPPP-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0" diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/META-INF/dcae-docker-manager:MANIFEST.MF b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/META-INF/dcae-docker-manager:MANIFEST.MF new file mode 100644 index 0000000..d9e0351 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/META-INF/dcae-docker-manager:MANIFEST.MF @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: NCOMPNAME-PPPP-QQQQ +Bundle-SymbolicName: NCOMPNAME-PPPP-QQQQ +Bundle-Version: 0.1.0.qualifier +Export-Package: NCOMPBASE.SSSS.TTTT.tools, + NCOMPBASE.SSSS.servers.TTTT +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + NCOMPNAME-PPPP-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0" diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/META-INF/dcae-vm-manager:MANIFEST.MF b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/META-INF/dcae-vm-manager:MANIFEST.MF new file mode 100644 index 0000000..d9e0351 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/META-INF/dcae-vm-manager:MANIFEST.MF @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: NCOMPNAME-PPPP-QQQQ +Bundle-SymbolicName: NCOMPNAME-PPPP-QQQQ +Bundle-Version: 0.1.0.qualifier +Export-Package: NCOMPBASE.SSSS.TTTT.tools, + NCOMPBASE.SSSS.servers.TTTT +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + NCOMPNAME-PPPP-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0" diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/Generator.java b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/Generator.java new file mode 100644 index 0000000..763adef --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/Generator.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 NCOMPBASE.SSSS.TTTT.tools;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+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 NCOMPBASE.SSSS.TTTT.ZZZZFactory;
+
+
+public class Generator {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ @SuppressWarnings("unused")
+ ServerPackage f = ServerPackage.eINSTANCE;
+ EObject o = ZZZZFactory.eINSTANCE.createAAAA();
+ 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("PREFIXXXX");
+ m.setPluginName(p.getNsURI());
+ m.setName("AAAA");
+ m.setTitle("AAAA");
+ ControllerGenerator g = new ControllerGenerator(o,m);
+ g.setEnableIRequestHandler(false);
+ g.setEnableISiriusPlugin(false);
+ EObject gui = ModelFactory.eINSTANCE.createGuiClientApi();
+ g.addObject("gui",gui,m);
+ //EObject e = ZZZZFactory.eINSTANCE.createVpnEnterprise();
+ //g.addApi("e",e,m);
+ //g.addFactory("org.openecomp.ncomp.sirius.servers.openstack.OsOpenstackFactory");
+ //g.enableDrools();
+ g.generate(dir);
+ g.generateScripts("src/main/server-gen/bin","PPPP-QQQQ");
+ }
+
+
+}
diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/adaptor:Generator.java b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/adaptor:Generator.java new file mode 100644 index 0000000..cf1b251 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/adaptor:Generator.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 NCOMPBASE.SSSS.TTTT.tools;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+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 NCOMPBASE.SSSS.AAAAFactory;
+
+
+public class Generator {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ @SuppressWarnings("unused")
+ ServerPackage f = ServerPackage.eINSTANCE;
+ EObject o = AAAAFactory.eINSTANCE.createAAAAAdaptor();
+ 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("PREFIXXXX");
+ m.setPluginName(p.getNsURI());
+ m.setName("AAAA");
+ m.setTitle("AAAA");
+ ControllerGenerator g = new ControllerGenerator(o,m);
+ g.setEnableIRequestHandler(false);
+ g.setEnableISiriusPlugin(false);
+ EObject gui = ModelFactory.eINSTANCE.createGuiClientApi();
+ g.addObject("gui",gui,m);
+ //EObject e = ZZZZFactory.eINSTANCE.createVpnEnterprise();
+ //g.addApi("e",e,m);
+ //g.addFactory("org.openecomp.ncomp.sirius.servers.openstack.OsOpenstackFactory");
+ //g.enableDrools();
+ g.generate(dir);
+ g.generateScripts("src/main/server-gen/bin","PPPP-QQQQ");
+ }
+
+
+}
diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/dcae-cdap-manager:Generator.java b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/dcae-cdap-manager:Generator.java new file mode 100644 index 0000000..96e6864 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/dcae-cdap-manager:Generator.java @@ -0,0 +1,88 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR 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 NCOMPBASE.SSSS.TTTT.tools;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.openecomp.dcae.controller.service.cdap.CdapFactory;
+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 NCOMPBASE.SSSS.service.ServiceFactory;
+import NCOMPBASE.SSSS.manager.ManagerFactory;
+
+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.createAAAAManager();
+ 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("AAAAManager");
+ m.setTitle("AAAAManager");
+ 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.generate(dir);
+ g.generateScripts("src/main/server-gen/bin", "PPPP-QQQQ");
+ }
+
+ public static void genService() {
+ EObject o = ServiceFactory.eINSTANCE.createAAAAService();
+ 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("AAAAService");
+ m.setTitle("AAAAService");
+ ControllerGenerator g = new ControllerGenerator(o, m);
+ g.setEnableIRequestHandler(false);
+ g.setEnableISiriusPlugin(true);
+ g.setProvider(CdapFactory.eINSTANCE.createCdapService(), "Dcae");
+ g.generate(dir);
+ }
+
+}
diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/dcae-docker-manager:Generator.java b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/dcae-docker-manager:Generator.java new file mode 100644 index 0000000..88766ec --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/dcae-docker-manager: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 NCOMPBASE.SSSS.TTTT.tools;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.openecomp.dcae.controller.service.docker.DockerFactory;
+import org.openecomp.dcae.controller.service.dockermanager.DockermanagerFactory;
+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 NCOMPBASE.SSSS.service.ServiceFactory;
+import NCOMPBASE.SSSS.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.createAAAAManager();
+ 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("AAAAManager");
+ m.setTitle("AAAAManager");
+ 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(DockermanagerFactory.eINSTANCE.createDockerManager(), "Dcae");
+ g.generate(dir);
+ g.generateScripts("src/main/server-gen/bin", "PPPP-QQQQ");
+ String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging";
+ YamlToJava.convert("src/main/sirius-gen/AAAAManager.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.createAAAAService();
+ 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("AAAAService");
+ m.setTitle("AAAAService");
+ ControllerGenerator g = new ControllerGenerator(o, m);
+ g.setEnableIRequestHandler(false);
+ g.setEnableISiriusPlugin(true);
+ g.setProvider(DockerFactory.eINSTANCE.createDockerService(), "Dcae");
+ g.generate(dir);
+ String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging";
+ YamlToJava.convert("src/main/sirius-gen/AAAAService.yaml", dir + "/logging", pName);
+ }
+
+}
diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/dcae-vm-manager:Generator.java b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/dcae-vm-manager:Generator.java new file mode 100644 index 0000000..fa08130 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/dcae-vm-manager: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 NCOMPBASE.SSSS.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 NCOMPBASE.SSSS.service.ServiceFactory;
+import NCOMPBASE.SSSS.manager.ManagerFactory;
+
+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.createAAAAManager();
+ 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("AAAAManager");
+ m.setTitle("AAAAManager");
+ 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", "PPPP-QQQQ");
+ }
+
+ public static void genService() {
+ EObject o = ServiceFactory.eINSTANCE.createAAAAService();
+ 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("AAAAService");
+ m.setTitle("AAAAService");
+ 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);
+ }
+
+}
diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/dcae-vm-manager:TestManager.java b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/dcae-vm-manager:TestManager.java new file mode 100644 index 0000000..fdc4f7f --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/dcae-vm-manager:TestManager.java @@ -0,0 +1,75 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR 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 NCOMPBASE.SSSS.manager.tools; + +import java.io.IOException; + +import org.json.JSONObject; + +import NCOMPBASE.SSSS.manager.AAAAManager; +import NCOMPBASE.SSSS.manager.ManagerFactory; +import NCOMPBASE.SSSS.servers.manager.DcaeManagerFactory; +import NCOMPBASE.SSSS.servers.service.DcaeServiceFactory; +import NCOMPBASE.SSSS.service.ContrailController; +import NCOMPBASE.SSSS.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); + AAAAManager m = f1.createAAAAManager(); + server.setObject(m); + server.start(); + // Start interacting with the manager. + ServiceFactory f2 = new DcaeServiceFactory(this); + ContrailController x = f2.createContrailController(); + x.setContrailIp("1.2.3.4"); + x.setName("local1"); + m.getLocalControllers().add(x); + 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/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/dcae-vm-manager:TestManagerServer.java b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/dcae-vm-manager:TestManagerServer.java new file mode 100644 index 0000000..c054073 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/dcae-vm-manager: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 NCOMPBASE.SSSS.manager.tools; + +import java.io.File; +import java.io.IOException; +import java.util.TimeZone; + +import org.json.JSONObject; + +import NCOMPBASE.SSSS.servers.manager.DcaeAAAAManagerConsole; +import NCOMPBASE.SSSS.servers.manager.DcaeAAAAManagerServer; +import NCOMPBASE.SSSS.servers.service.DcaeServiceFactory; +import NCOMPBASE.SSSS.service.ContrailController; +import NCOMPBASE.SSSS.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")); + FileUtils.deleteDirectory(new File("data")); + final DcaeAAAAManagerServer s = new DcaeAAAAManagerServer( + "manager.properties"); + Thread t = new Thread("AAAA host server") { + @Override + public void run() { + try { + s.runWebserver(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + }; + t.start(); + DcaeAAAAManagerConsole c = + new DcaeAAAAManagerConsole("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/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/dcae-vm-manager:TestServiceToManager.java b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/dcae-vm-manager:TestServiceToManager.java new file mode 100644 index 0000000..2a66c5a --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/TOOLS/dcae-vm-manager:TestServiceToManager.java @@ -0,0 +1,50 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR 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 NCOMPBASE.SSSS.manager.tools; + +import NCOMPBASE.SSSS.servers.service.DcaeServiceFactory; +import NCOMPBASE.SSSS.service.AAAAService; +import NCOMPBASE.SSSS.service.AAAAServiceInstance; +import NCOMPBASE.SSSS.service.ServiceFactory; +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); + AAAAService s = f.createAAAAService(); + AAAAServiceInstance i = f.createAAAAServiceInstance(); + s.getInstances().add(i); + i.setName("myInstance"); + PhysicalMachine p = VmFactory.eINSTANCE.createPhysicalMachine(); + i.getServers().add(p); + // Setup connection parameters. + p.setPublicIp("localhost"); + p.setManagerPortNumber(9922); + s.pollManagerConfiguration("myInstance"); + // TODO more examples + } + +} diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/build.properties b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/build.properties new file mode 100644 index 0000000..80bc250 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/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/ncomp-maven-sirius-project/src/main/resources/archetype-resources/dcae-cdap-manager:pom.xml b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/dcae-cdap-manager:pom.xml new file mode 100644 index 0000000..6b7040b --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/dcae-cdap-manager:pom.xml @@ -0,0 +1,143 @@ +<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>GNAMEEEE</groupId> + <artifactId>NCOMPNAME-PPPP-QQQQ</artifactId> + <parent> + <groupId>org.openecomp.ncomp.sirius.manager</groupId> + <artifactId>ncomp-sirius-manager-base</artifactId> + <version>0.1.0-SNAPSHOT</version> + </parent> + + <build> + <plugins> + <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</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>GNAMEEEE</groupId> + <artifactId>MODELPROJECTNAME</artifactId> + <version>0.1.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.openecomp.dcae.controller</groupId> + <artifactId>dcae-controller-service-cdap-adaptor</artifactId> + <version>0.1.0-SNAPSHOT</version> + </dependency> + </dependencies> +</project> diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/dcae-docker-manager:pom.xml b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/dcae-docker-manager:pom.xml new file mode 100644 index 0000000..3f62af3 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/dcae-docker-manager:pom.xml @@ -0,0 +1,143 @@ +<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>GNAMEEEE</groupId> + <artifactId>NCOMPNAME-PPPP-QQQQ</artifactId> + <parent> + <groupId>org.openecomp.ncomp.sirius.manager</groupId> + <artifactId>ncomp-sirius-manager-base</artifactId> + <version>0.1.0-SNAPSHOT</version> + </parent> + + <build> + <plugins> + <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</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>GNAMEEEE</groupId> + <artifactId>MODELPROJECTNAME</artifactId> + <version>0.1.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.openecomp.dcae.controller</groupId> + <artifactId>dcae-controller-service-docker-adaptor</artifactId> + <version>0.1.0-SNAPSHOT</version> + </dependency> + </dependencies> +</project> diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/dcae-vm-manager:pom.xml b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/dcae-vm-manager:pom.xml new file mode 100644 index 0000000..4e7deff --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/dcae-vm-manager:pom.xml @@ -0,0 +1,143 @@ +<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>GNAMEEEE</groupId> + <artifactId>NCOMPNAME-PPPP-QQQQ</artifactId> + <parent> + <groupId>org.openecomp.ncomp.sirius.manager</groupId> + <artifactId>ncomp-sirius-manager-base</artifactId> + <version>0.1.0-SNAPSHOT</version> + </parent> + + <build> + <plugins> + <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</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>GNAMEEEE</groupId> + <artifactId>MODELPROJECTNAME</artifactId> + <version>0.1.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.openecomp.dcae.controller</groupId> + <artifactId>dcae-controller-service-vm-adaptor</artifactId> + <version>0.1.0-SNAPSHOT</version> + </dependency> + </dependencies> +</project> diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/pom.xml b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000..00744da --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,187 @@ +<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>GNAMEEEE</groupId> + <artifactId>NCOMPNAME-PPPP-QQQQ</artifactId> + <parent> + <groupId>org.openecomp.ncomp.sirius.manager</groupId> + <artifactId>ncomp-sirius-manager-base</artifactId> + <version>0.1.0-SNAPSHOT</version> + </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>GNAMEEEE</groupId> + <artifactId>MODELPROJECTNAME</artifactId> + <version>0.1.0-SNAPSHOT</version> + </dependency> + </dependencies> +</project> diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/assembly/assemble_zip.xml b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..a1f7ac5 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/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>NCOMPNAME-PPPP-QQQQ-0.1.0-SNAPSHOT.jar</include> + </includes> + </fileSet> + <fileSet> + <directory>target/assembly/</directory> + <outputDirectory>.</outputDirectory> + <excludes> + </excludes> + </fileSet> + <fileSet> + <directory>.</directory> + <outputDirectory>lib</outputDirectory> + <includes> + <include>*.jar</include> + </includes> + </fileSet> + <fileSet> + <directory>src/main/server-gen/bin</directory> + <outputDirectory>bin</outputDirectory> + <fileMode>0744</fileMode> + <excludes> + </excludes> + </fileSet> + <fileSet> + <directory>src/main/server/bin</directory> + <outputDirectory>bin</outputDirectory> + <fileMode>0744</fileMode> + <excludes> + </excludes> + </fileSet> + <fileSet> + <directory>src/main/server-gen/scripts</directory> + <outputDirectory>scripts</outputDirectory> + </fileSet> + <fileSet> + <directory>src/main/server/scripts</directory> + <outputDirectory>scripts</outputDirectory> + </fileSet> + </fileSets> + +</assembly> diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/config/SERVER.properties b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/config/SERVER.properties new file mode 100644 index 0000000..4605389 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/config/SERVER.properties @@ -0,0 +1,7 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = PORT +server.user.console = CONSOLE_PW +server.user.gui = GUI_PW +server.user.client = CLIENT_PW diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/config/console.properties b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/config/console.properties new file mode 100644 index 0000000..4b63607 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/config/console.properties @@ -0,0 +1,3 @@ +localhost.endpoint=http://localhost:PORT +localhost.user=console +localhost.password=CONSOLE_PW diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/config/gui.properties b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/config/gui.properties new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/config/gui.properties diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/config/log4j.properties b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/config/log4j.properties new file mode 100644 index 0000000..8b3b8f9 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/config/log4j.properties @@ -0,0 +1,24 @@ +#log4j.debug=0 +log4j.rootLogger=warn, file +log4j.logger.org.openecomp.ncomp=info, file +log4j.additivity.org.openecomp.ncomp=false +log4j.logger.org.openecomp.ncomp.datarouter=warn, file +log4j.additivity.org.openecomp.ncomp.datarouter=false +log4j.logger.org.apache.http.headers=debug, file +log4j.logger.org.apache.http.wire=debug, file + +## uploaded logger +log4j.logger.org.openecomp.ncomp.sirius.manager.uploaded=info, uploaded +log4j.additivity.org.openecomp.ncomp.sirius.manager.uploaded=false +## request logging +log4j.logger.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=info, requests +log4j.additivity.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=false + + +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.File=logs/BBBB.log +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d %5p [%t] %m %C:%L%n +log4j.appender.file.MaxFileSize=50MB +log4j.appender.file.MaxBackupIndex=5 + diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/config/makefile b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/config/makefile new file mode 100644 index 0000000..e272181 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/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/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/config/pw.sh.sh b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/config/pw.sh.sh new file mode 100644 index 0000000..cd022ae --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/config/pw.sh.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +### used to generate random passwords + + +echo '#!/bin/bash' +echo "" + +echo 'cat \' + +for i in CONSOLE GUI CLIENT +do + echo ' |' sed s/${i}_PW/$(echo $i:$(date +%s) | sha256sum | base64 | head -c 20 ; echo)/ \\ +done +
\ No newline at end of file diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/scripts/adaptor:console.groovy b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/scripts/adaptor:console.groovy new file mode 100644 index 0000000..81a5366 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/scripts/adaptor: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 NCOMPBASE.servers.SSSS.PREFIXXXXAAAAAdaptorConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +TTTT = new PREFIXXXXAAAAAdaptorConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/scripts/console.groovy b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/scripts/console.groovy new file mode 100644 index 0000000..db57072 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/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 NCOMPBASE.SSSS.servers.TTTT.PREFIXXXXAAAAManagerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +TTTT = new PREFIXXXXAAAAManagerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/scripts/dcae-cdap-service:console.groovy b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/scripts/dcae-cdap-service:console.groovy new file mode 100644 index 0000000..e1f1d98 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/scripts/dcae-cdap-service: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 NCOMPBASE.SSSS.servers.TTTT.PREFIXXXXAAAAConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +TTTT = new PREFIXXXXAAAAConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/scripts/dcae-docker-service:console.groovy b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/scripts/dcae-docker-service:console.groovy new file mode 100644 index 0000000..e1f1d98 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/scripts/dcae-docker-service: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 NCOMPBASE.SSSS.servers.TTTT.PREFIXXXXAAAAConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +TTTT = new PREFIXXXXAAAAConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } diff --git a/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/scripts/dcae-vm-service:console.groovy b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/scripts/dcae-vm-service:console.groovy new file mode 100644 index 0000000..e1f1d98 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/archetype-resources/src/main/server/scripts/dcae-vm-service: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 NCOMPBASE.SSSS.servers.TTTT.PREFIXXXXAAAAConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +TTTT = new PREFIXXXXAAAAConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } diff --git a/ncomp-maven-sirius-project/src/main/resources/new_project.sh b/ncomp-maven-sirius-project/src/main/resources/new_project.sh new file mode 100644 index 0000000..1b1acb9 --- /dev/null +++ b/ncomp-maven-sirius-project/src/main/resources/new_project.sh @@ -0,0 +1,65 @@ +#!/bin/bash + +RDIR=$1 +PPPP=$2 +QQQQ=$3 +ZZZZ=$4 +AAAA=$5 +PREFIXXXX=$6 +GNAMEEEE=$7 +MODELPROJECTNAME=$8 +NCOMPBASE=$9 +NCOMPNAME=${10} + +RRRR=`echo $PPPP | sed s/-//g` +SSSS=`echo $PPPP | sed s/-/./g` +XXXX=`echo $PPPP | sed sx-x/xg` +TTTT=`echo $QQQQ | sed s/-/./g` +YYYY=`echo $QQQQ | sed sx-x/xg` + +SDIR=$(dirname $0)/archetype-resources + +DIR=$RDIR + +cp -rp $SDIR $DIR + +find $DIR -type f | xargs -I X54xx sed -i s/PPPP/$PPPP/g X54xx +find $DIR -type f | xargs -I X54xx sed -i s/QQQQ/$QQQQ/g X54xx +find $DIR -type f | xargs -I X54xx sed -i s/RRRR/$RRRR/g X54xx +find $DIR -type f | xargs -I X54xx sed -i s/SSSS/$SSSS/g X54xx +find $DIR -type f | xargs -I X54xx sed -i s/TTTT/$TTTT/g X54xx +find $DIR -type f | xargs -I X54xx sed -i s/ZZZZ/$ZZZZ/g X54xx +find $DIR -type f | xargs -I X54xx sed -i s/AAAA/$AAAA/g X54xx +find $DIR -type f | xargs -I X54xx sed -i s/PREFIXXXX/$PREFIXXXX/g X54xx +find $DIR -type f | xargs -I X54xx sed -i s/GNAMEEEE/$GNAMEEEE/g X54xx +find $DIR -type f | xargs -I X54xx sed -i s/MODELPROJECTNAME/$MODELPROJECTNAME/g X54xx +find $DIR -type f | xargs -I X54xx sed -i s/NCOMPBASE/$NCOMPBASE/g X54xx +find $DIR -type f | xargs -I X54xx sed -i s/NCOMPNAME/$NCOMPNAME/g X54xx + +##for x in PPPP QQQQ RRRR SSSS TTTT ZZZZ AAAA PREFIXXXX GNAMEEEE MODELPROJECTNAME NCOMPBASE NCOMPNAME; do echo $x $(eval echo \$$x); done + +mkdir -p $DIR/config +mkdir -p $DIR/src/main/server +mkdir -p $DIR/src/main/server-gen +mkdir -p $DIR/src/main/sirius-gen +TOOLDIR=$DIR/src/main/java/$(echo $NCOMPBASE | sed sx\\.x/xg)/$XXXX/$YYYY/tools + +##echo TOOLDIR=$TOOLDIR + +mkdir -p $TOOLDIR +mv $DIR/TOOLS/* $TOOLDIR/ +rm -r $DIR/TOOLS + +mv $DIR/src/main/server/config/SERVER.properties $DIR/src/main/server/config/$TTTT.properties + +for file in $(find $DIR -name \*:\*); do + type=$(echo $file | sed sx.*/xx | sed 's/:.*//') + file1=$(echo $file | sed 's/.*://') + ##echo $file $type $file1 + dir=$(dirname $file) + if [ "$ZZZZ" == "$type" ]; then + mv $file $dir/$file1 + else + rm $file + fi +done diff --git a/ncomp-maven-sirius-runtime/.project b/ncomp-maven-sirius-runtime/.project new file mode 100644 index 0000000..398cdb9 --- /dev/null +++ b/ncomp-maven-sirius-runtime/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>ncomp-maven-sirius-runtime</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + </natures> +</projectDescription> diff --git a/ncomp-maven-sirius-runtime/.settings/org.eclipse.m2e.core.prefs b/ncomp-maven-sirius-runtime/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-maven-sirius-runtime/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-maven-sirius-runtime/LICENSE.txt b/ncomp-maven-sirius-runtime/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/ncomp-maven-sirius-runtime/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/ncomp-maven-sirius-runtime/pom.xml b/ncomp-maven-sirius-runtime/pom.xml new file mode 100644 index 0000000..e16e21e --- /dev/null +++ b/ncomp-maven-sirius-runtime/pom.xml @@ -0,0 +1,14 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.openecomp.ncomp.maven</groupId> + <artifactId>ncomp-maven-sirius-runtime</artifactId> + <version>0.1.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <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/ncomp-maven-sirius-runtime/src/main/resources/archetype-resources/config/console.properties b/ncomp-maven-sirius-runtime/src/main/resources/archetype-resources/config/console.properties new file mode 100644 index 0000000..009f8a6 --- /dev/null +++ b/ncomp-maven-sirius-runtime/src/main/resources/archetype-resources/config/console.properties @@ -0,0 +1,3 @@ +localhost.endpoint=http://localhost:5112 +localhost.user=console +localhost.password=PW:console diff --git a/ncomp-maven-sirius-runtime/src/main/resources/archetype-resources/config/gui.properties b/ncomp-maven-sirius-runtime/src/main/resources/archetype-resources/config/gui.properties new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/ncomp-maven-sirius-runtime/src/main/resources/archetype-resources/config/gui.properties diff --git a/ncomp-maven-sirius-runtime/src/main/resources/archetype-resources/config/log4j.properties b/ncomp-maven-sirius-runtime/src/main/resources/archetype-resources/config/log4j.properties new file mode 100644 index 0000000..8b3b8f9 --- /dev/null +++ b/ncomp-maven-sirius-runtime/src/main/resources/archetype-resources/config/log4j.properties @@ -0,0 +1,24 @@ +#log4j.debug=0 +log4j.rootLogger=warn, file +log4j.logger.org.openecomp.ncomp=info, file +log4j.additivity.org.openecomp.ncomp=false +log4j.logger.org.openecomp.ncomp.datarouter=warn, file +log4j.additivity.org.openecomp.ncomp.datarouter=false +log4j.logger.org.apache.http.headers=debug, file +log4j.logger.org.apache.http.wire=debug, file + +## uploaded logger +log4j.logger.org.openecomp.ncomp.sirius.manager.uploaded=info, uploaded +log4j.additivity.org.openecomp.ncomp.sirius.manager.uploaded=false +## request logging +log4j.logger.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=info, requests +log4j.additivity.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=false + + +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.File=logs/BBBB.log +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d %5p [%t] %m %C:%L%n +log4j.appender.file.MaxFileSize=50MB +log4j.appender.file.MaxBackupIndex=5 + diff --git a/ncomp-maven-sirius-runtime/src/main/resources/archetype-resources/config/service.properties b/ncomp-maven-sirius-runtime/src/main/resources/archetype-resources/config/service.properties new file mode 100644 index 0000000..5a95600 --- /dev/null +++ b/ncomp-maven-sirius-runtime/src/main/resources/archetype-resources/config/service.properties @@ -0,0 +1,9 @@ + +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = PORT +server.user.console = PW:console +server.user.gui = PW:gui +server.user.client = PW:client + diff --git a/ncomp-maven-sirius-runtime/src/main/resources/archetype-resources/makefile b/ncomp-maven-sirius-runtime/src/main/resources/archetype-resources/makefile new file mode 100644 index 0000000..ead2f25 --- /dev/null +++ b/ncomp-maven-sirius-runtime/src/main/resources/archetype-resources/makefile @@ -0,0 +1,10 @@ + + +restart: stop start + +start: + M2_HOME=/home/ncomp/.m2 bin/BBBB-controller start +stop: + bin/BBBB-controller stop +console: + bin/BBBB-controller console diff --git a/ncomp-maven-sirius-runtime/src/main/resources/new_project.sh b/ncomp-maven-sirius-runtime/src/main/resources/new_project.sh new file mode 100644 index 0000000..61e18ff --- /dev/null +++ b/ncomp-maven-sirius-runtime/src/main/resources/new_project.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +DIR=$1 +GGGG=$2 +AAAA=$3 +PORT=$4 + +BBBB=`echo $AAAA | sed s/$NCOMPNAME-//g` +CCCC=`echo $AAAA | sed 's/.*-//g'` + +SDIR=git/$GGGG/$AAAA/src/main/server/config + +## for V in RDIR AAAA PORT BBBB CCCC SDIR; do echo $V=$(eval echo \$$V); done + +if [ -e $DIR ]; then echo Directory exists: $DIR; exit; fi +mkdir -p $DIR + +if [ -e $SDIR ]; then + cp -rp $SDIR $DIR/config +fi + +if [ -e $DIR/config/pw.sh.sh ]; then + bash $DIR/config/pw.sh.sh > $DIR/config/pw.sh + chmod +x $DIR/config/pw.sh + rm $DIR/config/pw.sh.sh +fi + +if [ -e $DIR/config ]; then + for V in AAAA PORT BBBB + do + find $DIR/config -type f | xargs -I X sed -i s/$V/$(eval echo \$$V)/g X + done +fi + +if [ -e $DIR/config/pw.sh ]; then + find $DIR/config -type f \! -name pw.sh | xargs -I X echo "cat X | $DIR/config/pw.sh > X.bak; mv X.bak X" | bash +fi + +if [ -e $DIR/config/makefile ]; then + mv $DIR/config/makefile $DIR/makefile +fi + + + diff --git a/ncomp-maven-xcore-project/.project b/ncomp-maven-xcore-project/.project new file mode 100644 index 0000000..2bb4722 --- /dev/null +++ b/ncomp-maven-xcore-project/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>ncomp-maven-xcore-project</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + </natures> +</projectDescription> diff --git a/ncomp-maven-xcore-project/.settings/org.eclipse.m2e.core.prefs b/ncomp-maven-xcore-project/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-maven-xcore-project/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-maven-xcore-project/LICENSE.txt b/ncomp-maven-xcore-project/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/ncomp-maven-xcore-project/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/ncomp-maven-xcore-project/pom.xml b/ncomp-maven-xcore-project/pom.xml new file mode 100644 index 0000000..23fa1a4 --- /dev/null +++ b/ncomp-maven-xcore-project/pom.xml @@ -0,0 +1,14 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.openecomp.ncomp.maven</groupId> + <artifactId>ncomp-maven-xcore-project</artifactId> + <version>0.1.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <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>
\ No newline at end of file diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/.classpath b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/.classpath new file mode 100644 index 0000000..69b19c6 --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/.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/ncomp-maven-xcore-project/src/main/resources/archetype-resources/.gitignore b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/.project b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/.project new file mode 100644 index 0000000..48ae0c9 --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/.project @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>NCOMPNAME-PPPP-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/ncomp-maven-xcore-project/src/main/resources/archetype-resources/.settings/org.eclipse.jdt.core.prefs b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/.settings/org.eclipse.m2e.core.prefs b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/META-INF/MANIFEST.MF b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/META-INF/MANIFEST.MF new file mode 100644 index 0000000..9d848d0 --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/META-INF/MANIFEST.MF @@ -0,0 +1,21 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: NCOMPNAME-PPPP-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: NCOMPBASE.SSSS.BBBB, + NCOMPBASE.SSSS.BBBB.impl, + NCOMPBASE.SSSS.BBBB.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-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0" +Bundle-ActivationPolicy: lazy diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/META-INF/adaptor:MANIFEST.MF b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/META-INF/adaptor:MANIFEST.MF new file mode 100644 index 0000000..2c0b508 --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/META-INF/adaptor:MANIFEST.MF @@ -0,0 +1,21 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: NCOMPNAME-PPPP-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: NCOMPBASE.SSSS, + NCOMPBASE.SSSS.impl, + NCOMPBASE.SSSS.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-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0" +Bundle-ActivationPolicy: lazy diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/META-INF/dcae-cdap-manager:MANIFEST.MF b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/META-INF/dcae-cdap-manager:MANIFEST.MF new file mode 100644 index 0000000..b9b8695 --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/META-INF/dcae-cdap-manager:MANIFEST.MF @@ -0,0 +1,28 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: NCOMPNAME-PPPP-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: NCOMPBASE.SSSS.manager, + NCOMPBASE.SSSS.manager.impl, + NCOMPBASE.SSSS.manager.util, + NCOMPBASE.SSSS.service, + NCOMPBASE.SSSS.service.impl, + NCOMPBASE.SSSS.service.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + dcae-controller-core-model;visibility:=reexport, + ncomp-core-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-openstack-model;visibility:=reexport, + ncomp-sirius-manager-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + dcae-controller-service-cdap-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-sirius-manager-agent-model;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/META-INF/dcae-docker-manager:MANIFEST.MF b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/META-INF/dcae-docker-manager:MANIFEST.MF new file mode 100644 index 0000000..ae75246 --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/META-INF/dcae-docker-manager:MANIFEST.MF @@ -0,0 +1,28 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: NCOMPNAME-PPPP-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: NCOMPBASE.SSSS.manager, + NCOMPBASE.SSSS.manager.impl, + NCOMPBASE.SSSS.manager.util, + NCOMPBASE.SSSS.service, + NCOMPBASE.SSSS.service.impl, + NCOMPBASE.SSSS.service.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + dcae-controller-core-model;visibility:=reexport, + ncomp-core-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-openstack-model;visibility:=reexport, + ncomp-sirius-manager-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + dcae-controller-service-docker-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-sirius-manager-agent-model;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/META-INF/dcae-vm-manager:MANIFEST.MF b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/META-INF/dcae-vm-manager:MANIFEST.MF new file mode 100644 index 0000000..9198ee6 --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/META-INF/dcae-vm-manager:MANIFEST.MF @@ -0,0 +1,28 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: NCOMPNAME-PPPP-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: NCOMPBASE.SSSS.manager, + NCOMPBASE.SSSS.manager.impl, + NCOMPBASE.SSSS.manager.util, + NCOMPBASE.SSSS.service, + NCOMPBASE.SSSS.service.impl, + NCOMPBASE.SSSS.service.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + dcae-controller-core-model;visibility:=reexport, + ncomp-core-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-openstack-model;visibility:=reexport, + ncomp-sirius-manager-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + dcae-controller-service-vm-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-sirius-manager-agent-model;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/build.properties b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/build.properties new file mode 100644 index 0000000..6d35b6f --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/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/ncomp-maven-xcore-project/src/main/resources/archetype-resources/dcae-cdap-manager:plugin.xml b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/dcae-cdap-manager:plugin.xml new file mode 100644 index 0000000..8e8a0ed --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/dcae-cdap-manager: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="NCOMPBASE.SSSS.service" + class="NCOMPBASE.SSSS.service.ServicePackage" + genModel="src/main/xcore/service.xcore"/> + </extension> + + <extension point="org.eclipse.emf.ecore.generated_package"> + <!-- @generated manager --> + <package + uri="NCOMPBASE.SSSS.manager" + class="NCOMPBASE.SSSS.manager.ManagerPackage" + genModel="src/main/xcore/manager.xcore"/> + </extension> + +</plugin> diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/dcae-cdap-manager:pom.xml b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/dcae-cdap-manager:pom.xml new file mode 100644 index 0000000..ec2944d --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/dcae-cdap-manager:pom.xml @@ -0,0 +1,23 @@ +<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>GNAMEEEE</groupId> + <artifactId>NCOMPNAME-PPPP-model</artifactId> + <parent> + <groupId>org.openecomp.ncomp.maven</groupId> + <artifactId>ncomp-maven-xcore</artifactId> + <version>0.1.0-SNAPSHOT</version> + </parent> + <dependencies> + <dependency> + <groupId>org.openecomp.ncomp.sirius.manager</groupId> + <artifactId>ncomp-sirius-manager-model</artifactId> + <version>0.1.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.openecomp.dcae.controller</groupId> + <artifactId>dcae-controller-service-cdap-model</artifactId> + <version>0.1.0-SNAPSHOT</version> + </dependency> + </dependencies> +</project> diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/dcae-docker-manager:plugin.xml b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/dcae-docker-manager:plugin.xml new file mode 100644 index 0000000..8e8a0ed --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/dcae-docker-manager: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="NCOMPBASE.SSSS.service" + class="NCOMPBASE.SSSS.service.ServicePackage" + genModel="src/main/xcore/service.xcore"/> + </extension> + + <extension point="org.eclipse.emf.ecore.generated_package"> + <!-- @generated manager --> + <package + uri="NCOMPBASE.SSSS.manager" + class="NCOMPBASE.SSSS.manager.ManagerPackage" + genModel="src/main/xcore/manager.xcore"/> + </extension> + +</plugin> diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/dcae-docker-manager:pom.xml b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/dcae-docker-manager:pom.xml new file mode 100644 index 0000000..84200c4 --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/dcae-docker-manager:pom.xml @@ -0,0 +1,23 @@ +<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>GNAMEEEE</groupId> + <artifactId>NCOMPNAME-PPPP-model</artifactId> + <parent> + <groupId>org.openecomp.ncomp.maven</groupId> + <artifactId>ncomp-maven-xcore</artifactId> + <version>0.1.0-SNAPSHOT</version> + </parent> + <dependencies> + <dependency> + <groupId>org.openecomp.ncomp.sirius.manager</groupId> + <artifactId>ncomp-sirius-manager-model</artifactId> + <version>0.1.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.openecomp.dcae.controller</groupId> + <artifactId>dcae-controller-service-docker-model</artifactId> + <version>0.1.0-SNAPSHOT</version> + </dependency> + </dependencies> +</project> diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/dcae-vm-manager:plugin.xml b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/dcae-vm-manager:plugin.xml new file mode 100644 index 0000000..8e8a0ed --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/dcae-vm-manager: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="NCOMPBASE.SSSS.service" + class="NCOMPBASE.SSSS.service.ServicePackage" + genModel="src/main/xcore/service.xcore"/> + </extension> + + <extension point="org.eclipse.emf.ecore.generated_package"> + <!-- @generated manager --> + <package + uri="NCOMPBASE.SSSS.manager" + class="NCOMPBASE.SSSS.manager.ManagerPackage" + genModel="src/main/xcore/manager.xcore"/> + </extension> + +</plugin> diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/dcae-vm-manager:pom.xml b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/dcae-vm-manager:pom.xml new file mode 100644 index 0000000..c0ae0c5 --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/dcae-vm-manager:pom.xml @@ -0,0 +1,23 @@ +<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>GNAMEEEE</groupId> + <artifactId>NCOMPNAME-PPPP-model</artifactId> + <parent> + <groupId>org.openecomp.ncomp.maven</groupId> + <artifactId>ncomp-maven-xcore</artifactId> + <version>0.1.0-SNAPSHOT</version> + </parent> + <dependencies> + <dependency> + <groupId>org.openecomp.ncomp.sirius.manager</groupId> + <artifactId>ncomp-sirius-manager-model</artifactId> + <version>0.1.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.openecomp.dcae.controller</groupId> + <artifactId>dcae-controller-service-vm-model</artifactId> + <version>0.1.0-SNAPSHOT</version> + </dependency> + </dependencies> +</project> diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/plugin.properties b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/plugin.properties new file mode 100644 index 0000000..04852d2 --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Router Model +providerName = www.example.org diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/plugin.xml b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/plugin.xml new file mode 100644 index 0000000..f86f5b2 --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/plugin.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<!-- +--> + +<plugin> + + <extension point="org.eclipse.emf.ecore.generated_package"> + <!-- @generated BBBB --> + <package + uri="NCOMPBASE.SSSS" + class="NCOMPBASE.SSSS.ZZZZPackage" + genModel="src/main/xcore/BBBB.xcore"/> + </extension> + +</plugin> diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/pom.xml b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000..564dfb0 --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,17 @@ +<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>GNAMEEEE</groupId> + <artifactId>NCOMPNAME-PPPP-model</artifactId> + <parent> + <groupId>org.openecomp.ncomp.maven</groupId> + <artifactId>ncomp-maven-xcore</artifactId> + <version>0.1.0-SNAPSHOT</version> + </parent> + <dependencies> + <dependency> + <groupId>org.openecomp.ncomp.sirius.manager</groupId> + <artifactId>ncomp-sirius-manager-model</artifactId> + <version>0.1.0-SNAPSHOT</version> + </dependency> + </dependencies> +</project> diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/adaptor:adaptor.xcore b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/adaptor:adaptor.xcore new file mode 100644 index 0000000..6cff5cc --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/adaptor:adaptor.xcore @@ -0,0 +1,30 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR 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="/NCOMPNAME-PPPP-model/src/main/xcore-gen")
+
+
+package NCOMPBASE.SSSS
+
+
+class AAAAAdaptor {
+}
+
diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/dcae-cdap-manager:manager.xcore b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/dcae-cdap-manager:manager.xcore new file mode 100644 index 0000000..4ed7427 --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/dcae-cdap-manager:manager.xcore @@ -0,0 +1,36 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR 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="/NCOMPNAME-PPPP-model/src/main/xcore-gen")
+
+
+package NCOMPBASE.SSSS.manager
+
+
+import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer
+import NCOMPBASE.SSSS.service.AAAAServiceConfiguration
+
+// state of manager
+class AAAAManager extends AbstractManagementServer, AAAAServiceConfiguration {
+ op void restart()
+ op String hello_manager(String str)
+}
+
diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/dcae-cdap-manager:service.xcore b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/dcae-cdap-manager:service.xcore new file mode 100644 index 0000000..2f702b6 --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/dcae-cdap-manager:service.xcore @@ -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============================================ + */ + +@GenModel(modelDirectory="/NCOMPNAME-PPPP-model/src/main/xcore-gen")
+
+
+package NCOMPBASE.SSSS.service
+
+
+import org.openecomp.ncomp.core.IncreasingULongMetricAttribute
+import org.openecomp.dcae.controller.service.cdap.CdapService
+import org.openecomp.dcae.controller.service.cdap.CdapServiceInstance
+import org.openecomp.ncomp.core.NamedEntity
+
+annotation "http://openecomp.org" as ecomp
+
+class AAAAService extends CdapService {
+ op String hello_service(String instanceName, String str)
+ op void restart(String instanceName)
+}
+
+// state in the controller
+class AAAAServiceInstance extends CdapServiceInstance, AAAAServiceConfiguration {
+}
+
+// state in both controller and manager
+class AAAAServiceConfiguration {
+ @ecomp(^type = "configuration")
+ String cdapUrl
+ @ecomp(^type = "operational")
+ IncreasingULongMetricAttribute numberOfCdapRecords
+ @ecomp(^type = "operational")
+ IncreasingULongMetricAttribute numberOfCdapErrors
+ @ecomp(^type = "configuration")
+ contains ContrailController[] localControllers
+}
+
+class ContrailController extends NamedEntity {
+ @ecomp(^type = "configuration")
+ String contailIp
+ @ecomp(^type = "operational")
+ IncreasingULongMetricAttribute numberOfRecords
+ @ecomp(^type = "operational")
+ IncreasingULongMetricAttribute numberOfErrors
+}
+
+
diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/dcae-docker-manager:manager.xcore b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/dcae-docker-manager:manager.xcore new file mode 100644 index 0000000..4be92d2 --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/dcae-docker-manager: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="/NCOMPNAME-PPPP-model/src/main/xcore-gen")
+
+
+package NCOMPBASE.SSSS.manager
+
+
+import org.openecomp.dcae.controller.service.dockermanager.DockerManager
+import NCOMPBASE.SSSS.service.AAAAServiceConfiguration
+
+// state of manager
+class AAAAManager extends DockerManager, AAAAServiceConfiguration {
+}
+
diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/dcae-docker-manager:service.xcore b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/dcae-docker-manager:service.xcore new file mode 100644 index 0000000..18d97ba --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/dcae-docker-manager:service.xcore @@ -0,0 +1,46 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/NCOMPNAME-PPPP-model/src/main/xcore-gen")
+
+
+package NCOMPBASE.SSSS.service
+
+
+import org.openecomp.dcae.controller.service.docker.DockerService
+import org.openecomp.dcae.controller.service.docker.DockerServiceInstance
+
+annotation "http://openecomp.org" as ecomp
+
+class AAAAService extends DockerService {
+}
+
+// state in the controller
+class AAAAServiceInstance extends DockerServiceInstance, AAAAServiceConfiguration {
+}
+
+// state in both controller and manager
+class AAAAServiceConfiguration {
+// @ecomp(^type = "configuration")
+// String cdapUrl
+}
+
+
diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/dcae-vm-manager:manager.xcore b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/dcae-vm-manager:manager.xcore new file mode 100644 index 0000000..421935e --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/dcae-vm-manager:manager.xcore @@ -0,0 +1,36 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR 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="/NCOMPNAME-PPPP-model/src/main/xcore-gen")
+
+
+package NCOMPBASE.SSSS.manager
+
+
+import NCOMPBASE.SSSS.service.AAAAServiceConfiguration
+import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager
+
+// state of manager
+class AAAAManager extends VirtualMachineManager, AAAAServiceConfiguration {
+ op void restart()
+ op String hello_manager(String str)
+}
+
diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/dcae-vm-manager:service.xcore b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/dcae-vm-manager:service.xcore new file mode 100644 index 0000000..cab5096 --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/dcae-vm-manager:service.xcore @@ -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============================================ + */ + +@GenModel(modelDirectory="/NCOMPNAME-PPPP-model/src/main/xcore-gen")
+
+
+package NCOMPBASE.SSSS.service
+
+
+import org.openecomp.ncomp.core.IncreasingULongMetricAttribute
+import org.openecomp.dcae.controller.service.vm.VirtualMachineService
+import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance
+import org.openecomp.ncomp.core.NamedEntity
+
+annotation "http://openecomp.org" as ecomp
+
+class AAAAService extends VirtualMachineService {
+ op String hello_service(String instanceName, String str)
+ op void restart(String instanceName)
+}
+
+// state in the controller
+class AAAAServiceInstance extends VirtualMachineServiceInstance, AAAAServiceConfiguration {
+}
+
+// state in both controller and manager
+class AAAAServiceConfiguration {
+ @ecomp(^type = "configuration")
+ String cdapUrl
+ @ecomp(^type = "operational")
+ IncreasingULongMetricAttribute numberOfCdapRecords
+ @ecomp(^type = "operational")
+ IncreasingULongMetricAttribute numberOfCdapErrors
+ @ecomp(^type = "configuration")
+ contains ContrailController[] localControllers
+}
+
+class ContrailController extends NamedEntity {
+ @ecomp(^type = "configuration")
+ String contrailIp
+ @ecomp(^type = "operational")
+ IncreasingULongMetricAttribute numberOfRecords
+ @ecomp(^type = "operational")
+ IncreasingULongMetricAttribute numberOfErrors
+}
+
+
diff --git a/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/server:server.xcore b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/server:server.xcore new file mode 100644 index 0000000..bcd8cf6 --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/archetype-resources/src/main/xcore/server:server.xcore @@ -0,0 +1,32 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR 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="/NCOMPNAME-PPPP-model/src/main/xcore-gen")
+
+
+package NCOMPBASE.SSSS
+
+import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy
+import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer
+
+class AAAAServer extends SouthBoundApiWithProxy, AbstractManagementServer {
+}
+
diff --git a/ncomp-maven-xcore-project/src/main/resources/new_project.sh b/ncomp-maven-xcore-project/src/main/resources/new_project.sh new file mode 100644 index 0000000..3f0a299 --- /dev/null +++ b/ncomp-maven-xcore-project/src/main/resources/new_project.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +RDIR=$1 +PPPP=$2 +## QQQQ=$3 +ZZZZ=$3 +AAAA=$4 +GNAMEEEE=$5 +NCOMPBASE=$6 +NCOMPNAME=$7 + +RRRR=`echo $PPPP | sed s/-//g` +SSSS=`echo $PPPP | sed s/-/./g` +XXXX=`echo $PPPP | sed sx-x/xg` +##TTTT=`echo $QQQQ | sed s/-/./g` +##YYYY=`echo $QQQQ | sed sx-x/xg` +BBBB=$(tr '[:upper:]' '[:lower:]' <<< $ZZZZ) + +## for x in PPPP RRRR SSSS ZZZZ AAAA GNAMEEEE BBBB XXXX NCOMPBASE NCOMPNAME; do echo $x $(eval echo \$$x); done + +SDIR=$(dirname $0)/archetype-resources + +DIR=$RDIR + +## echo cp -rp $SDIR $DIR +cp -rp $SDIR $DIR + +find $DIR -type f | xargs -I X54xx sed -i s/PPPP/$PPPP/g X54xx +## find $DIR -type f | xargs -I X54xx sed -i s/QQQQ/$QQQQ/g X54xx +find $DIR -type f | xargs -I X54xx sed -i s/RRRR/$RRRR/g X54xx +find $DIR -type f | xargs -I X54xx sed -i s/SSSS/$SSSS/g X54xx +##find $DIR -type f | xargs -I X54xx sed -i s/TTTT/$TTTT/g X54xx +find $DIR -type f | xargs -I X54xx sed -i s/ZZZZ/$ZZZZ/g X54xx +find $DIR -type f | xargs -I X54xx sed -i s/AAAA/$AAAA/g X54xx +find $DIR -type f | xargs -I X54xx sed -i s/BBBB/$BBBB/g X54xx +find $DIR -type f | xargs -I YY sed -i s/GNAMEEEE/$GNAMEEEE/g YY +find $DIR -type f | xargs -I YY sed -i s/NCOMPBASE/$NCOMPBASE/g YY +find $DIR -type f | xargs -I YY sed -i s/NCOMPNAME/$NCOMPNAME/g YY + +for file in $(find $DIR -name \*:\*); do + type=$(echo $file | sed sx.*/xx | sed 's/:.*//') + file1=$(echo $file | sed 's/.*://') + ## echo $file $type $file1 + dir=$(dirname $file) + if [ "$BBBB" == "$type" ]; then + mv $file $dir/$file1 + else + rm $file + fi +done diff --git a/ncomp-maven-xcore/.classpath b/ncomp-maven-xcore/.classpath new file mode 100644 index 0000000..b9f286d --- /dev/null +++ b/ncomp-maven-xcore/.classpath @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <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.m2e.MAVEN2_CLASSPATH_CONTAINER"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" output="target/classes" path="src/main/xcore-gen"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" output="target/test-classes" path="src/test/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="output" path="target/classes"/> +</classpath> diff --git a/ncomp-maven-xcore/.gitignore b/ncomp-maven-xcore/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/ncomp-maven-xcore/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/ncomp-maven-xcore/.project b/ncomp-maven-xcore/.project new file mode 100644 index 0000000..d88264a --- /dev/null +++ b/ncomp-maven-xcore/.project @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>ncomp-maven-xcore</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + </natures> +</projectDescription> diff --git a/ncomp-maven-xcore/.settings/org.eclipse.core.resources.prefs b/ncomp-maven-xcore/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/ncomp-maven-xcore/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/<project>=UTF-8 diff --git a/ncomp-maven-xcore/.settings/org.eclipse.jdt.core.prefs b/ncomp-maven-xcore/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..443e085 --- /dev/null +++ b/ncomp-maven-xcore/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/ncomp-maven-xcore/.settings/org.eclipse.m2e.core.prefs b/ncomp-maven-xcore/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-maven-xcore/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-maven-xcore/LICENSE.txt b/ncomp-maven-xcore/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/ncomp-maven-xcore/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/ncomp-maven-xcore/pom.xml b/ncomp-maven-xcore/pom.xml new file mode 100644 index 0000000..f187c50 --- /dev/null +++ b/ncomp-maven-xcore/pom.xml @@ -0,0 +1,151 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.openecomp.ncomp.maven</groupId> + <artifactId>ncomp-maven-xcore</artifactId> + <version>0.1.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.compiler.target>1.7</maven.compiler.target> + <maven.compiler.source>1.7</maven.compiler.source> + </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> + <sourceDirectory>src/main/xcore-gen</sourceDirectory> + <resources> + <resource> + <directory>src/main/xcore</directory> + </resource> + </resources> + <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-compiler-plugin</artifactId> + <version>3.1</version> + <configuration> + <source /> + <target /> + </configuration> + </plugin> + </plugins> + </build> + + <dependencies> + <dependency> + <groupId>org.eclipse.emf</groupId> + <artifactId>org.eclipse.emf.ecore</artifactId> + <version>2.11.0-v20150123-0347</version> + </dependency> + <dependency> + <groupId>org.eclipse.emf</groupId> + <artifactId>org.eclipse.emf.common</artifactId> + <version>2.11.0-v20150123-0347</version> + </dependency> + <dependency> + <groupId>org.eclipse.xtext</groupId> + <artifactId>org.eclipse.xtext.xbase.lib</artifactId> + <version>2.8.2</version> + </dependency> + <dependency> + <groupId>org.eclipse.core</groupId> + <artifactId>org.eclipse.core.runtime</artifactId> + <version>3.10.0.v20140318-2214</version> + </dependency> + <dependency> + <groupId>org.eclipse.core</groupId> + <artifactId>org.eclipse.core.contenttype</artifactId> + <version>3.4.200.v20140207-1251</version> + </dependency> + </dependencies> + + + <distributionManagement> + <repository> + <id>osecomp-nexus-releases</id> + <name>OSECOMP Release Repository</name> + <url>${openecomp.nexus.releases}</url> + </repository> + <snapshotRepository> + <id>osecomp-nexus-snapshots</id> + <name>OSECOMP Snapshot Repository</name> + <url>${openecomp.nexus.snapshots}</url> + </snapshotRepository> + <site> + <id>dcae-javadoc</id> + <url>${site.urlroot}/${project.artifactId}/${project.version}/</url> + </site> + </distributionManagement> + + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>2.10.4</version> + <configuration> + <failOnError>false</failOnError> + <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet> + <docletArtifact> + <groupId>org.umlgraph</groupId> + <artifactId>umlgraph</artifactId> + <version>5.6</version> + </docletArtifact> + <additionalparam>-views</additionalparam> + <useStandardDocletOptions>true</useStandardDocletOptions> + </configuration> + </plugin> + </plugins> + </reporting> + + +</project> @@ -0,0 +1,114 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.openecomp.ncomp.maven</groupId> + <artifactId>ncomp-maven</artifactId> + <version>0.1.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.compiler.target>1.7</maven.compiler.target> + <maven.compiler.source>1.7</maven.compiler.source> + </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>ncomp-maven-base</module> + <module>ncomp-maven-xcore</module> + </modules> + + + <distributionManagement> + <repository> + <id>osecomp-nexus-releases</id> + <name>OSECOMP Release Repository</name> + <url>${openecomp.nexus.releases}</url> + </repository> + <snapshotRepository> + <id>osecomp-nexus-snapshots</id> + <name>OSECOMP Snapshot Repository</name> + <url>${openecomp.nexus.snapshots}</url> + </snapshotRepository> + <site> + <id>dcae-javadoc</id> + <url>${site.urlroot}/${project.artifactId}/${project.version}/</url> + </site> + </distributionManagement> + + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>2.10.4</version> + <configuration> + <failOnError>false</failOnError> + <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet> + <docletArtifact> + <groupId>org.umlgraph</groupId> + <artifactId>umlgraph</artifactId> + <version>5.6</version> + </docletArtifact> + <additionalparam>-views</additionalparam> + <useStandardDocletOptions>true</useStandardDocletOptions> + </configuration> + </plugin> + </plugins> + </reporting> + +</project> |