From df28c136cc720e3a40c23ca48927958390932d75 Mon Sep 17 00:00:00 2001 From: erbel <johannes.erbel@cs.uni-goettingen.de> Date: Thu, 17 Jan 2019 13:15:49 +0100 Subject: [PATCH] Added ShadowJar Creation --- README.md | 6 +- build.gradle | 9 + .../rwm/mocci/connector/ComponentManager.java | 2 +- .../src-gen/monitoring/Datagatherer.java | 2 +- settings.gradle | 3 +- .../ugoe/cs/rwm/mocci/InitialDeployment.java | 85 +++++ src/main/java/de/ugoe/cs/rwm/mocci/MAPE.java | 75 +--- .../java/de/ugoe/cs/rwm/mocci/MartQuery.java | 58 --- .../cs/rwm/mocci/RegistryAndLoggerSetup.java | 10 +- .../java/de/ugoe/cs/rwm/mocci/UpScaler.java | 12 +- .../occi/hadoopClusterNewExtWithMem.occic | 349 ++++++++++++++++++ ...java => CreateMonitoringElementsTest.java} | 65 +++- .../rwm/mocci/DeployHadoopMonitoringTest.java | 3 +- .../cs/rwm/mocci/DeployHadoopNode2Test.java | 82 ---- .../java/de/ugoe/cs/rwm/mocci/EmptyTest.java | 2 +- .../java/de/ugoe/cs/rwm/mocci/MapeTest.java | 60 ++- .../ugoe/cs/rwm/mocci/ResolveProxyTest.java | 5 +- .../mocci/live/DeployHadoopNode2TestLive.java | 64 ---- .../de.ugoe.cs.rwm.mocci.connector.dummy.jar | Bin 10696 -> 15301 bytes src/test/resources/roles/vcsshark/README.md | 38 -- .../roles/vcsshark/defaults/main.yml | 2 - .../roles/vcsshark/handlers/main.yml | 2 - .../resources/roles/vcsshark/meta/main.yml | 246 ------------ .../resources/roles/vcsshark/tasks/main.yml | 51 --- .../resources/roles/vcsshark/tasks/main16.yml | 93 ----- .../resources/roles/vcsshark/tasks/main18.yml | 55 --- .../resources/roles/vcsshark/tests/inventory | 1 - .../resources/roles/vcsshark/tests/test.yml | 5 - .../resources/roles/vcsshark/vars/main.yml | 2 - .../resources/roles/vcssharkjob/README.md | 38 -- .../roles/vcssharkjob/defaults/main.yml | 2 - .../roles/vcssharkjob/handlers/main.yml | 2 - .../resources/roles/vcssharkjob/meta/main.yml | 246 ------------ .../roles/vcssharkjob/tasks/main.yml | 42 --- .../roles/vcssharkjob/tests/inventory | 1 - .../roles/vcssharkjob/tests/test.yml | 5 - .../resources/roles/vcssharkjob/vars/main.yml | 8 - 37 files changed, 600 insertions(+), 1131 deletions(-) create mode 100644 src/main/java/de/ugoe/cs/rwm/mocci/InitialDeployment.java delete mode 100644 src/main/java/de/ugoe/cs/rwm/mocci/MartQuery.java create mode 100644 src/main/resources/de/ugoe/cs/rwm/mocci/occi/hadoopClusterNewExtWithMem.occic rename src/test/java/de/ugoe/cs/rwm/mocci/{CreateElementsTest.java => CreateMonitoringElementsTest.java} (56%) delete mode 100644 src/test/java/de/ugoe/cs/rwm/mocci/DeployHadoopNode2Test.java delete mode 100644 src/test/java/de/ugoe/cs/rwm/mocci/live/DeployHadoopNode2TestLive.java delete mode 100644 src/test/resources/roles/vcsshark/README.md delete mode 100644 src/test/resources/roles/vcsshark/defaults/main.yml delete mode 100644 src/test/resources/roles/vcsshark/handlers/main.yml delete mode 100644 src/test/resources/roles/vcsshark/meta/main.yml delete mode 100644 src/test/resources/roles/vcsshark/tasks/main.yml delete mode 100644 src/test/resources/roles/vcsshark/tasks/main16.yml delete mode 100644 src/test/resources/roles/vcsshark/tasks/main18.yml delete mode 100644 src/test/resources/roles/vcsshark/tests/inventory delete mode 100644 src/test/resources/roles/vcsshark/tests/test.yml delete mode 100644 src/test/resources/roles/vcsshark/vars/main.yml delete mode 100644 src/test/resources/roles/vcssharkjob/README.md delete mode 100644 src/test/resources/roles/vcssharkjob/defaults/main.yml delete mode 100644 src/test/resources/roles/vcssharkjob/handlers/main.yml delete mode 100644 src/test/resources/roles/vcssharkjob/meta/main.yml delete mode 100644 src/test/resources/roles/vcssharkjob/tasks/main.yml delete mode 100644 src/test/resources/roles/vcssharkjob/tests/inventory delete mode 100644 src/test/resources/roles/vcssharkjob/tests/test.yml delete mode 100644 src/test/resources/roles/vcssharkjob/vars/main.yml diff --git a/README.md b/README.md index 2538163..ef331e5 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Project Title +# MOCCI [](https://gitlab.gwdg.de/rwm/de.ugoe.cs.rwm.mocci/commits/master) -Mocci is a toolchain using the Open Cloud Computing Interface (OCCI) to enable a model-driven cloud orchestration of cloud deployments and its monitoring instruments. -Moreover, a runtime model manager is provided that grants access to gathered monitoring data. +Mocci is an extension for the Open Cloud Computing Interface (OCCI) to enable a model-driven management of monitoring instruments in the cloud, as well as storing their results within an OCCI runtime model. +Together with other tools from the OCCI ecosystem it provides a testing and execution environment for self-adaptive systems. The following instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. diff --git a/build.gradle b/build.gradle index 3f05861..c7ec961 100644 --- a/build.gradle +++ b/build.gradle @@ -6,6 +6,7 @@ apply plugin: 'findbugs' apply plugin: 'maven' apply plugin: "com.github.psxpaul.execfork" apply plugin: 'jacoco' +apply plugin: 'com.github.johnrengelman.shadow' subprojects { @@ -29,6 +30,7 @@ buildscript { } dependencies { classpath "gradle.plugin.com.github.psxpaul:gradle-execfork-plugin:0.1.8" + classpath "com.github.jengelman.gradle.plugins:shadow:4.0.3" } } @@ -117,6 +119,13 @@ project(':de.ugoe.cs.rwm.mocci.connector.dummy') { } +jar { + manifest { + attributes 'Main-Class': 'de.ugoe.cs.rwm.mocci.MAPE' + } +} + +tasks.shadowJar.dependsOn("build") configurations.all { // Check for updates every build diff --git a/de.ugoe.cs.rwm.mocci.connector.dummy/src-gen/de/ugoe/cs/rwm/mocci/connector/ComponentManager.java b/de.ugoe.cs.rwm.mocci.connector.dummy/src-gen/de/ugoe/cs/rwm/mocci/connector/ComponentManager.java index 5ead918..3b8d3e1 100644 --- a/de.ugoe.cs.rwm.mocci.connector.dummy/src-gen/de/ugoe/cs/rwm/mocci/connector/ComponentManager.java +++ b/de.ugoe.cs.rwm.mocci.connector.dummy/src-gen/de/ugoe/cs/rwm/mocci/connector/ComponentManager.java @@ -9,7 +9,7 @@ import org.modmacao.cm.ConfigurationManagementTool; import org.modmacao.cm.ansible.AnsibleCMTool; import org.modmacao.occi.platform.Component; import org.modmacao.occi.platform.Status; - + public class ComponentManager { diff --git a/de.ugoe.cs.rwm.mocci.model/src-gen/monitoring/Datagatherer.java b/de.ugoe.cs.rwm.mocci.model/src-gen/monitoring/Datagatherer.java index 7598466..d30da36 100644 --- a/de.ugoe.cs.rwm.mocci.model/src-gen/monitoring/Datagatherer.java +++ b/de.ugoe.cs.rwm.mocci.model/src-gen/monitoring/Datagatherer.java @@ -13,7 +13,7 @@ package monitoring; import org.modmacao.occi.platform.Component; - + /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Datagatherer</b></em>'. diff --git a/settings.gradle b/settings.gradle index a04043d..b6233b0 100644 --- a/settings.gradle +++ b/settings.gradle @@ -18,6 +18,5 @@ include 'services:webservice' rootProject.name = 'de.ugoe.cs.rwm.mocci' include 'de.ugoe.cs.rwm.mocci.model' include 'de.ugoe.cs.rwm.mocci.model.edit' -include 'de.ugoe.cs.rwm.mocci.examples' include 'de.ugoe.cs.rwm.mocci.connector' -include 'de.ugoe.cs.rwm.mocci.connector.dummy' \ No newline at end of file +include 'de.ugoe.cs.rwm.mocci.connector.dummy' diff --git a/src/main/java/de/ugoe/cs/rwm/mocci/InitialDeployment.java b/src/main/java/de/ugoe/cs/rwm/mocci/InitialDeployment.java new file mode 100644 index 0000000..3d046b1 --- /dev/null +++ b/src/main/java/de/ugoe/cs/rwm/mocci/InitialDeployment.java @@ -0,0 +1,85 @@ +package de.ugoe.cs.rwm.mocci; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URL; +import java.nio.file.Path; + +import org.eclipse.emf.ecore.resource.Resource; + +import de.ugoe.cs.rwm.docci.MartDeployer; +import de.ugoe.cs.rwm.docci.ModelUtility; +import de.ugoe.cs.rwm.docci.connector.Connector; +import de.ugoe.cs.rwm.docci.executor.MartExecutor; +import de.ugoe.cs.rwm.tocci.Transformator; +import de.ugoe.cs.rwm.tocci.TransformatorFactory; +import de.ugoe.cs.rwm.tocci.occi2openstack.OCCI2OPENSTACKTransformator; + +public class InitialDeployment { + private static String manNWid = "urn:uuid:29d78078-fb4c-47aa-a9af-b8aaf3339590"; + private static String manNWRuntimeId = "75a4639e-9ce7-4058-b859-8a711b0e2e7b"; + private static String sshKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6H7Ydi45BTHid4qNppGAi5mzjbnZgt7bi6xLGmZG9CiLmhMsxOuk3Z05Nn+pmoN98qS0eY8S240PPk5VOlYqBY0vdRAwrZSHHaLdMp6I7ARNrI2KraYduweqz7ZQxPXQfwIeYx2HKQxEF2r+4//Fo4WfgdBkLuulvl/Gw3TUzJNQHvgpaiNo9+PI5CZydHnZbjUkRikS12pT+CbNKj+0QKeQztbCd41aKxDv5H0DjltVRcpPppv4dmiU/zoCAIngWLO1PPgfYWyze8Z9IoyBT7Qdg30U91TYZBuxzXR5lq7Fh64y/IZ/SjdOdSIvIuDjtmJDULRdLJzrvubrKY+YH Generated-by-Nova"; + private static String userData = "I2Nsb3VkLWNvbmZpZwoKIyBVcGdyYWRlIHRoZSBpbnN0YW5jZSBvbiBmaXJzdCBib290CiMgKGllIHJ1biBhcHQtZ2V0IHVwZ3JhZGUpCiMKIyBEZWZhdWx0OiBmYWxzZQojIEFsaWFzZXM6IGFwdF91cGdyYWRlCnBhY2thZ2VfdXBncmFkZTogdHJ1ZQoKcGFja2FnZXM6CiAtIHB5dGhvbgoKd3JpdGVfZmlsZXM6CiAgLSBwYXRoOiAvZXRjL25ldHdvcmsvaW50ZXJmYWNlcy5kLzUwLWNsb3VkLWluaXQuY2ZnCiAgICBjb250ZW50OiB8CiAgICAgIGF1dG8gbG8KICAgICAgaWZhY2UgbG8gaW5ldCBsb29wYmFjawogICAgICAKICAgICAgYXV0byBlbnMwCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMAogICAgICBpZmFjZSBlbnMwIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMQogICAgICBpZmFjZSBlbnMxIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMyCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMgogICAgICBpZmFjZSBlbnMyIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMzCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMwogICAgICBpZmFjZSBlbnMzIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM0CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNAogICAgICBpZmFjZSBlbnM0IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM1CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNQogICAgICBpZmFjZSBlbnM1IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM2CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNgogICAgICBpZmFjZSBlbnM2IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM3CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNwogICAgICBpZmFjZSBlbnM3IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM4CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOAogICAgICBpZmFjZSBlbnM4IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM5CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOQogICAgICBpZmFjZSBlbnM5IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxMAogICAgICBhbGxvdy1ob3RwbHVnIGVuczEwCiAgICAgIGlmYWNlIGVuczEwIGluZXQgZGhjcAoKIyMj"; + private Connector conn; + + public InitialDeployment(Connector conn) { + this.conn = conn; + } + + public void deploy() { + System.out.println("Initial Deployment"); + Path occiPath = getModelPath("de/ugoe/cs/rwm/mocci/occi/hadoopClusterNewExtWithMem.occic"); + Resource model = ModelUtility.loadOCCIintoEMFResource(occiPath); + System.out.println(model.getResourceSet().getResources()); + + Transformator trans = TransformatorFactory.getTransformator("OCCI2OCCI"); + trans.transform(model, occiPath); + + model = ModelUtility.loadOCCIintoEMFResource(occiPath); + + OCCI2OPENSTACKTransformator trans2 = OCCI2OPENSTACKTransformator.getInstance(); + trans2.setTransformationProperties(manNWRuntimeId, sshKey, userData, manNWid); + + trans2.transform(model, occiPath); + + model = ModelUtility.loadOCCIintoEMFResource(occiPath); + + MartDeployer deployer = new MartDeployer(conn); + deployer.deploy(model); + MartExecutor executor = new MartExecutor(conn); + executor.executeGetOperation("/resultprovider"); + } + + public static Path getModelPath(String resourceName) { + File file = null; + URL res = ClassLoader.getSystemClassLoader().getResource(resourceName); + if (res.toString().startsWith("jar:")) { + try (InputStream input = ClassLoader.getSystemClassLoader().getResourceAsStream(resourceName)) { + file = File.createTempFile("tempfile", ".occic"); + @SuppressWarnings("resource") + OutputStream out = new FileOutputStream(file); + int read; + int byteArrSize = 1024; + byte[] bytes = new byte[byteArrSize]; + + while ((read = input.read(bytes)) != -1) { + out.write(bytes, 0, read); + } + file.deleteOnExit(); + } catch (IOException ex) { + ex.printStackTrace(); + } + } else { + // this will probably work in your IDE, but not from a JAR + file = new File(res.getFile()); + } + + if (file != null && !file.exists()) { + throw new RuntimeException("Error: File " + file + " not found!"); + } + return file.toPath(); + } +} diff --git a/src/main/java/de/ugoe/cs/rwm/mocci/MAPE.java b/src/main/java/de/ugoe/cs/rwm/mocci/MAPE.java index c66df9e..3446bad 100644 --- a/src/main/java/de/ugoe/cs/rwm/mocci/MAPE.java +++ b/src/main/java/de/ugoe/cs/rwm/mocci/MAPE.java @@ -2,59 +2,25 @@ package de.ugoe.cs.rwm.mocci; import java.nio.file.Path; import java.nio.file.Paths; - -import org.eclipse.cmf.occi.core.AttributeState; -import org.eclipse.cmf.occi.core.Configuration; -import org.eclipse.cmf.occi.core.Link; -import org.eclipse.cmf.occi.core.impl.OCCIFactoryImpl; -import org.eclipse.cmf.occi.infrastructure.Compute; -import org.eclipse.cmf.occi.infrastructure.ComputeStatus; -import org.eclipse.cmf.occi.infrastructure.Networkinterface; -import org.eclipse.cmf.occi.infrastructure.impl.InfrastructureFactoryImpl; -import org.eclipse.emf.common.util.BasicEList; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.epsilon.emc.emf.CachedResourceSet; import org.json.JSONArray; -import org.modmacao.occi.platform.Component; -import org.modmacao.occi.platform.Componentlink; -import org.modmacao.occi.platform.PlatformPackage; -import org.modmacao.occi.platform.Status; -import org.modmacao.occi.platform.impl.PlatformFactoryImpl; -import org.modmacao.placement.Placementlink; -import org.modmacao.placement.impl.PlacementFactoryImpl; import de.ugoe.cs.rwm.docci.MartDeployer; -import de.ugoe.cs.rwm.docci.ModelUtility; import de.ugoe.cs.rwm.docci.connector.Connector; import de.ugoe.cs.rwm.docci.connector.LocalhostConnector; -import de.ugoe.cs.rwm.docci.executor.Executor; -import de.ugoe.cs.rwm.tocci.Transformator; -import de.ugoe.cs.rwm.tocci.TransformatorFactory; -import de.ugoe.cs.rwm.tocci.occi2openstack.OCCI2OPENSTACKTransformator; -import monitoring.Datagatherer; -import monitoring.Dataprocessor; -import monitoring.Monitorableproperty; -import monitoring.Resultprovider; -import monitoring.Sensor; -import monitoring.impl.MonitoringFactoryImpl; +import de.ugoe.cs.rwm.docci.executor.MartExecutor; /**Making javadoc happy. * @author erbel * */ public class MAPE { - static String manNWid = "urn:uuid:29d78078-fb4c-47aa-a9af-b8aaf3339590"; - static String manNWRuntimeId = "75a4639e-9ce7-4058-b859-8a711b0e2e7b"; - static String sshKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6H7Ydi45BTHid4qNppGAi5mzjbnZgt7bi6xLGmZG9CiLmhMsxOuk3Z05Nn+pmoN98qS0eY8S240PPk5VOlYqBY0vdRAwrZSHHaLdMp6I7ARNrI2KraYduweqz7ZQxPXQfwIeYx2HKQxEF2r+4//Fo4WfgdBkLuulvl/Gw3TUzJNQHvgpaiNo9+PI5CZydHnZbjUkRikS12pT+CbNKj+0QKeQztbCd41aKxDv5H0DjltVRcpPppv4dmiU/zoCAIngWLO1PPgfYWyze8Z9IoyBT7Qdg30U91TYZBuxzXR5lq7Fh64y/IZ/SjdOdSIvIuDjtmJDULRdLJzrvubrKY+YH Generated-by-Nova"; - static String userData = "I2Nsb3VkLWNvbmZpZwoKIyBVcGdyYWRlIHRoZSBpbnN0YW5jZSBvbiBmaXJzdCBib290CiMgKGllIHJ1biBhcHQtZ2V0IHVwZ3JhZGUpCiMKIyBEZWZhdWx0OiBmYWxzZQojIEFsaWFzZXM6IGFwdF91cGdyYWRlCnBhY2thZ2VfdXBncmFkZTogdHJ1ZQoKcGFja2FnZXM6CiAtIHB5dGhvbgoKd3JpdGVfZmlsZXM6CiAgLSBwYXRoOiAvZXRjL25ldHdvcmsvaW50ZXJmYWNlcy5kLzUwLWNsb3VkLWluaXQuY2ZnCiAgICBjb250ZW50OiB8CiAgICAgIGF1dG8gbG8KICAgICAgaWZhY2UgbG8gaW5ldCBsb29wYmFjawogICAgICAKICAgICAgYXV0byBlbnMwCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMAogICAgICBpZmFjZSBlbnMwIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMQogICAgICBpZmFjZSBlbnMxIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMyCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMgogICAgICBpZmFjZSBlbnMyIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMzCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMwogICAgICBpZmFjZSBlbnMzIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM0CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNAogICAgICBpZmFjZSBlbnM0IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM1CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNQogICAgICBpZmFjZSBlbnM1IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM2CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNgogICAgICBpZmFjZSBlbnM2IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM3CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNwogICAgICBpZmFjZSBlbnM3IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM4CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOAogICAgICBpZmFjZSBlbnM4IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM5CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOQogICAgICBpZmFjZSBlbnM5IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxMAogICAgICBhbGxvdy1ob3RwbHVnIGVuczEwCiAgICAgIGlmYWNlIGVuczEwIGluZXQgZGhjcAoKIyMj"; protected static final Path RUNTIMEPATH = Paths.get(System.getProperty("user.home") + "/.rwm/runtime.occic"); static Connector conn = new LocalhostConnector("localhost", 8080, "ubuntu"); static MartDeployer deployer = new MartDeployer(conn); - static MartQuery executor = new MartQuery(conn); + static MartExecutor executor = new MartExecutor(conn); static Resource runtimeModel; - static int interval; + static int interval = 10000; /**Making javadoc happy. * @param args Making javadoc happy. @@ -62,12 +28,11 @@ public class MAPE { public static void main(String[] args) { System.out.println("Starting MAPE loop"); RegistryAndLoggerSetup.setup(); - interval=10000; + initialDeploy(conn); - initialDeploy(); while(true) { try { - System.out.println("\n--------------------Waiting for new Cycle: Sleeping " + interval +"--------------------"); + System.out.println("\n--------------------Waiting for new MAPE-K Cycle: Sleeping " + interval +"--------------------"); Thread.sleep(interval); Monitor monitor = monitor(); @@ -81,7 +46,12 @@ public class MAPE { } } -private static Monitor monitor() { +private static void initialDeploy(Connector conn) { + InitialDeployment depl = new InitialDeployment(conn); + depl.deploy(); + } + +public static Monitor monitor() { int critCPUs = getNumberOfCriticalCPUs(); int noneCPUs = getNumberOfNoneCPUs(); int allCPUs = getNumberOfAllCPUs(); @@ -91,7 +61,7 @@ private static Monitor monitor() { } -private static String analyze(Monitor monitor) { +public static String analyze(Monitor monitor) { int noneCPUs = monitor.getNoneCPUs(); int critCPUs = monitor.getCritCPUs(); int allCPUs = monitor.getAllCPUs(); @@ -105,7 +75,7 @@ private static String analyze(Monitor monitor) { } } -private static Resource plan(String analysis) { +public static Resource plan(String analysis) { switch (analysis) { case "upScale": System.out.println("Plan: upScale!"); UpScaler upscaler = new UpScaler(conn, RUNTIMEPATH); @@ -118,28 +88,13 @@ private static Resource plan(String analysis) { } -private static void execute(Resource runtimeModel) { +public static void execute(Resource runtimeModel) { System.out.println("Execute: Deploying adjusted Model"); deployer.deploy(runtimeModel); } - -public static void initialDeploy() { - System.out.println("Initial Deployment"); - Path occiPath = Paths.get(ModelUtility.getPathToResource("occi/hadoopClusterNewExtWithMem.occic")); - Resource model = ModelUtility.loadOCCIintoEMFResource(occiPath); - - Transformator trans = TransformatorFactory.getTransformator("OCCI2OCCI"); - trans.transform(model, occiPath); - - OCCI2OPENSTACKTransformator trans2 = OCCI2OPENSTACKTransformator.getInstance(); - trans2.setTransformationProperties(manNWRuntimeId, sshKey, userData, manNWid); - - trans2.transform(occiPath, occiPath); - deployer.deploy(occiPath); - executor.executeGetOperation("/resultprovider"); -} + private static int getNumberOfNoneCPUs() { String query = "/monitorableproperty?attribute=monitoring.result&value=None"; diff --git a/src/main/java/de/ugoe/cs/rwm/mocci/MartQuery.java b/src/main/java/de/ugoe/cs/rwm/mocci/MartQuery.java deleted file mode 100644 index 8ae31fe..0000000 --- a/src/main/java/de/ugoe/cs/rwm/mocci/MartQuery.java +++ /dev/null @@ -1,58 +0,0 @@ -package de.ugoe.cs.rwm.mocci; - -import java.net.HttpURLConnection; - -import org.eclipse.cmf.occi.core.Action; -import org.eclipse.cmf.occi.core.AttributeState; -import org.eclipse.cmf.occi.core.Entity; -import org.eclipse.cmf.occi.core.Link; -import org.eclipse.cmf.occi.core.Mixin; -import org.eclipse.cmf.occi.core.MixinBase; -import org.eclipse.emf.ecore.EObject; - -import de.ugoe.cs.rwm.docci.connector.Connector; -import de.ugoe.cs.rwm.docci.executor.AbsExecutor; -import de.ugoe.cs.rwm.docci.executor.MartExecutor; - -/** - * Handles execution of OCCI Model Elements. - * - * @author erbel - * - */ -public class MartQuery extends MartExecutor { - - /** - * Creates an Executor to the OCCI API of the specified connection. Sets - * maxTries to 3. - * - * @param conn - */ - public MartQuery(Connector conn) { - super(conn); - } - - /** - * Creates Executor to the OCCI API of the specified connection. maxTries is - * hereby the maximum amount of retries for a request. Should be at least 2 to - * handle connection issues. - * - * @param conn - * @param maxTries - */ - public MartQuery(Connector conn, int maxTries) { - super(conn, maxTries); - } - - - - public String executeGetOperation(String query) { - String adaptedAddress = "http://" + connector.getAddress() + ":" + connector.getPort() + query; - HttpURLConnection conn = establishConnection(adaptedAddress, null, false, null); - conn.setRequestProperty("Accept", "application/json"); - - //System.out.println("GET" + " " + adaptedAddress); - - return getOutput(conn); - } -} diff --git a/src/main/java/de/ugoe/cs/rwm/mocci/RegistryAndLoggerSetup.java b/src/main/java/de/ugoe/cs/rwm/mocci/RegistryAndLoggerSetup.java index 2e06587..205243a 100644 --- a/src/main/java/de/ugoe/cs/rwm/mocci/RegistryAndLoggerSetup.java +++ b/src/main/java/de/ugoe/cs/rwm/mocci/RegistryAndLoggerSetup.java @@ -1,14 +1,16 @@ package de.ugoe.cs.rwm.mocci; + import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.eclipse.cmf.occi.core.OCCIPackage; +import org.eclipse.cmf.occi.core.util.OCCIResourceFactoryImpl; import org.eclipse.cmf.occi.core.util.OcciRegistry; import org.eclipse.cmf.occi.infrastructure.InfrastructurePackage; +import org.eclipse.emf.ecore.resource.Resource.Factory.Registry; import org.modmacao.ansibleconfiguration.AnsibleconfigurationPackage; import org.modmacao.occi.platform.PlatformPackage; import org.modmacao.placement.PlacementPackage; - import de.ugoe.cs.rwm.cocci.Comparator; import de.ugoe.cs.rwm.docci.Deployer; import de.ugoe.cs.rwm.docci.appdeployer.MartAppDeployerSlave; @@ -40,7 +42,7 @@ public class RegistryAndLoggerSetup { Logger.getLogger(Provisioner.class.getName()).setLevel(Level.OFF); Logger.getLogger(Deployer.class.getName()).setLevel(Level.OFF); Logger.getLogger(Deprovisioner.class.getName()).setLevel(Level.OFF); - Logger.getLogger(Executor.class.getName()).setLevel(Level.OFF); + Logger.getLogger(Executor.class.getName()).setLevel(Level.INFO); Logger.getLogger(MartAppDeployerSlave.class.getName()).setLevel(Level.OFF); } @@ -50,6 +52,7 @@ public class RegistryAndLoggerSetup { OCCIPackage.eINSTANCE.eClass(); ModmacaoPackage.eINSTANCE.eClass(); OpenstackruntimePackage.eINSTANCE.eClass(); + PlacementPackage.eINSTANCE.eClass(); WorkflowPackage.eINSTANCE.eClass(); OssweruntimePackage.eINSTANCE.eClass(); @@ -80,5 +83,8 @@ public class RegistryAndLoggerSetup { OCCIPackage.class.getClassLoader().getResource("model/ansibleconfiguration.occie").toString()); OcciRegistry.getInstance().registerExtension("http://schemas.ugoe.cs.rwm/monitoring#", MonitoringPackage.class.getClassLoader().getResource("model/monitoring.occie").toString()); + + Registry.INSTANCE.getExtensionToFactoryMap().put("*", new OCCIResourceFactoryImpl()); + } } diff --git a/src/main/java/de/ugoe/cs/rwm/mocci/UpScaler.java b/src/main/java/de/ugoe/cs/rwm/mocci/UpScaler.java index a71e26b..0a67bcb 100644 --- a/src/main/java/de/ugoe/cs/rwm/mocci/UpScaler.java +++ b/src/main/java/de/ugoe/cs/rwm/mocci/UpScaler.java @@ -45,7 +45,7 @@ public class UpScaler extends AbsScaler { } private Compute addCompute(Configuration config) { - System.out.println("Adding Compute Node to Model"); + System.out.println(" Adding Compute Node to Model"); Compute comp = iFactory.createCompute(); comp.setTitle("hadoop-worker-additional"); comp.setOcciComputeState(ComputeStatus.ACTIVE); @@ -67,7 +67,7 @@ public class UpScaler extends AbsScaler { } private Component addWorkerComponent(Configuration config, Compute comp) { - System.out.println("Adding Worker Component to Model"); + System.out.println(" Adding Worker Component to Model"); Component worker = pFactory.createComponent(); worker.setTitle("worker-component"); worker.setOcciComponentState(Status.ACTIVE); @@ -89,7 +89,7 @@ public class UpScaler extends AbsScaler { } private Sensor addSensor(Configuration config, Compute comp) { - System.out.println("Adding Sensor to Model"); + System.out.println(" Adding Sensor to Model"); Sensor sens = mFactory.createSensor(); sens.setTitle("CPUSensor"); config.getResources().add(sens); @@ -115,7 +115,7 @@ public class UpScaler extends AbsScaler { } private Datagatherer addDataGatherer(Configuration config, Compute comp, Sensor sens) { - System.out.println(" Adding Datagatherer to Model"); + System.out.println(" Adding Datagatherer to Model"); Datagatherer dg = mFactory.createDatagatherer(); dg.setTitle("CPUGatherer"); config.getResources().add(dg); @@ -139,7 +139,7 @@ public class UpScaler extends AbsScaler { } private Dataprocessor addDataProcessor(Configuration config, Compute comp, Sensor sens, Datagatherer dg) { - System.out.println(" Adding Dataprocessor to Model"); + System.out.println(" Adding Dataprocessor to Model"); Dataprocessor dp = mFactory.createDataprocessor(); dp.setTitle("CPUProcessor"); config.getResources().add(dp); @@ -162,7 +162,7 @@ public class UpScaler extends AbsScaler { } private Resultprovider addResultProvider(Configuration config, Compute comp, Sensor sens, Dataprocessor dp) { - System.out.println(" Adding Resultprovider to Model"); + System.out.println(" Adding Resultprovider to Model"); Resultprovider rp = mFactory.createResultprovider(); rp.setTitle("CPUProvider"); config.getResources().add(rp); diff --git a/src/main/resources/de/ugoe/cs/rwm/mocci/occi/hadoopClusterNewExtWithMem.occic b/src/main/resources/de/ugoe/cs/rwm/mocci/occi/hadoopClusterNewExtWithMem.occic new file mode 100644 index 0000000..347251e --- /dev/null +++ b/src/main/resources/de/ugoe/cs/rwm/mocci/occi/hadoopClusterNewExtWithMem.occic @@ -0,0 +1,349 @@ +<?xml version="1.0" encoding="ASCII"?> +<occi:Configuration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:infrastructure="http://schemas.ogf.org/occi/infrastructure/ecore" xmlns:monitoring="http://schemas.ugoe.cs.rwm/monitoring/ecore" xmlns:occi="http://schemas.ogf.org/occi/core/ecore" xmlns:placement="http://schemas.modmacao.org/placement/ecore" xmlns:platform="http://schemas.modmacao.org/occi/platform/ecore"> + <use href="http://schemas.ogf.org/occi/core#/"/> + <use href="http://schemas.ogf.org/occi/infrastructure#/"/> + <use href="http://schemas.modmacao.org/occi/platform#/"/> + <use href="http://schemas.ogf.org/occi/infrastructure/compute/template/1.1#/"/> + <use href="http://schemas.modmacao.org/placement#/"/> + <use href="http://schemas.modmacao.org/openstack/runtime#/"/> + <use href="http://schemas.modmacao.org/modmacao#/"/> + <use href="http://schemas.modmacao.org/openstack/swe#/"/> + <use href="http://schemas.ugoe.cs.rwm/monitoring#/"/> + <resources xsi:type="infrastructure:Compute" id="urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166ce" title="hadoop-master" location="/compute/urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166ce/" rlinks="//@resources.2/@links.0 //@resources.1/@links.0" occiComputeCores="2" occiComputeHostname="vm2" occiComputeMemory="4096.0" occiComputeState="active"> + <kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='compute']"/> + <attributes name="occi.core.id" value="urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166ce"/> + <attributes name="occi.core.title" value="hadoop-master"/> + <attributes name="occi.core.summary" value=""/> + <attributes name="occi.compute.architecture" value="x86"/> + <attributes name="occi.compute.cores" value="2"/> + <attributes name="occi.compute.hostname" value="hadoop-master"/> + <attributes name="occi.compute.share" value="0"/> + <attributes name="occi.compute.speed" value="0"/> + <attributes name="occi.compute.memory" value="4096"/> + <attributes name="occi.compute.state" value="active"/> + <attributes name="occi.compute.state.message" value=""/> + <parts xsi:type="infrastructure:Ssh_key" occiCredentialsSshPublickey="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6H7Ydi45BTHid4qNppGAi5mzjbnZgt7bi6xLGmZG9CiLmhMsxOuk3Z05Nn+pmoN98qS0eY8S240PPk5VOlYqBY0vdRAwrZSHHaLdMp6I7ARNrI2KraYduweqz7ZQxPXQfwIeYx2HKQxEF2r+4//Fo4WfgdBkLuulvl/Gw3TUzJNQHvgpaiNo9+PI5CZydHnZbjUkRikS12pT+CbNKj+0QKeQztbCd41aKxDv5H0DjltVRcpPppv4dmiU/zoCAIngWLO1PPgfYWyze8Z9IoyBT7Qdg30U91TYZBuxzXR5lq7Fh64y/IZ/SjdOdSIvIuDjtmJDULRdLJzrvubrKY+YH Generated-by-Nova"> + <mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ssh_key']"/> + <attributes name="occi.credentials.ssh.publickey" value="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6H7Ydi45BTHid4qNppGAi5mzjbnZgt7bi6xLGmZG9CiLmhMsxOuk3Z05Nn+pmoN98qS0eY8S240PPk5VOlYqBY0vdRAwrZSHHaLdMp6I7ARNrI2KraYduweqz7ZQxPXQfwIeYx2HKQxEF2r+4//Fo4WfgdBkLuulvl/Gw3TUzJNQHvgpaiNo9+PI5CZydHnZbjUkRikS12pT+CbNKj+0QKeQztbCd41aKxDv5H0DjltVRcpPppv4dmiU/zoCAIngWLO1PPgfYWyze8Z9IoyBT7Qdg30U91TYZBuxzXR5lq7Fh64y/IZ/SjdOdSIvIuDjtmJDULRdLJzrvubrKY+YH Generated-by-Nova"/> + </parts> + <parts xsi:type="infrastructure:User_data" occiComputeUserdata="I2Nsb3VkLWNvbmZpZwoKIyBVcGdyYWRlIHRoZSBpbnN0YW5jZSBvbiBmaXJzdCBib290CiMgKGllIHJ1biBhcHQtZ2V0IHVwZ3JhZGUpCiMKIyBEZWZhdWx0OiBmYWxzZQojIEFsaWFzZXM6IGFwdF91cGdyYWRlCnBhY2thZ2VfdXBncmFkZTogdHJ1ZQoKcGFja2FnZXM6CiAtIHB5dGhvbgoKd3JpdGVfZmlsZXM6CiAgLSBwYXRoOiAvZXRjL25ldHdvcmsvaW50ZXJmYWNlcy5kLzUwLWNsb3VkLWluaXQuY2ZnCiAgICBjb250ZW50OiB8CiAgICAgIGF1dG8gbG8KICAgICAgaWZhY2UgbG8gaW5ldCBsb29wYmFjawogICAgICAKICAgICAgYXV0byBlbnMwCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMAogICAgICBpZmFjZSBlbnMwIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMQogICAgICBpZmFjZSBlbnMxIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMyCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMgogICAgICBpZmFjZSBlbnMyIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMzCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMwogICAgICBpZmFjZSBlbnMzIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM0CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNAogICAgICBpZmFjZSBlbnM0IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM1CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNQogICAgICBpZmFjZSBlbnM1IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM2CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNgogICAgICBpZmFjZSBlbnM2IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM3CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNwogICAgICBpZmFjZSBlbnM3IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM4CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOAogICAgICBpZmFjZSBlbnM4IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM5CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOQogICAgICBpZmFjZSBlbnM5IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxMAogICAgICBhbGxvdy1ob3RwbHVnIGVuczEwCiAgICAgIGlmYWNlIGVuczEwIGluZXQgZGhjcAoKIyMj"> + <mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='user_data']"/> + <attributes name="occi.compute.userdata" value="I2Nsb3VkLWNvbmZpZwoKIyBVcGdyYWRlIHRoZSBpbnN0YW5jZSBvbiBmaXJzdCBib290CiMgKGllIHJ1biBhcHQtZ2V0IHVwZ3JhZGUpCiMKIyBEZWZhdWx0OiBmYWxzZQojIEFsaWFzZXM6IGFwdF91cGdyYWRlCnBhY2thZ2VfdXBncmFkZTogdHJ1ZQoKcGFja2FnZXM6CiAtIHB5dGhvbgoKd3JpdGVfZmlsZXM6CiAgLSBwYXRoOiAvZXRjL25ldHdvcmsvaW50ZXJmYWNlcy5kLzUwLWNsb3VkLWluaXQuY2ZnCiAgICBjb250ZW50OiB8CiAgICAgIGF1dG8gbG8KICAgICAgaWZhY2UgbG8gaW5ldCBsb29wYmFjawogICAgICAKICAgICAgYXV0byBlbnMwCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMAogICAgICBpZmFjZSBlbnMwIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMQogICAgICBpZmFjZSBlbnMxIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMyCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMgogICAgICBpZmFjZSBlbnMyIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMzCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMwogICAgICBpZmFjZSBlbnMzIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM0CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNAogICAgICBpZmFjZSBlbnM0IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM1CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNQogICAgICBpZmFjZSBlbnM1IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM2CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNgogICAgICBpZmFjZSBlbnM2IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM3CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNwogICAgICBpZmFjZSBlbnM3IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM4CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOAogICAgICBpZmFjZSBlbnM4IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM5CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOQogICAgICBpZmFjZSBlbnM5IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxMAogICAgICBhbGxvdy1ob3RwbHVnIGVuczEwCiAgICAgIGlmYWNlIGVuczEwIGluZXQgZGhjcAoKIyMj"/> + </parts> + <parts> + <mixin href="http://schemas.modmacao.org/openstack/swe#//@mixins[term='ubuntu_xenialxerus']"/> + </parts> + <links xsi:type="infrastructure:Networkinterface" id="urn:uuid:ea482951-5c26-471d-aa1b-8e03b1e6096c" title="link3" location="/networkinterface/urn:uuid:ea482951-5c26-471d-aa1b-8e03b1e6096c" target="//@resources.6"> + <kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='networkinterface']"/> + <attributes name="occi.core.id" value="urn:uuid:ea482951-5c26-471d-aa1b-8e03b1e6096c"/> + <attributes name="occi.core.title" value="link3"/> + <attributes name="occi.networkinterface.address" value="10.254.1.5"/> + <parts xsi:type="infrastructure:Ipnetworkinterface" occiNetworkinterfaceAddress="10.254.1.5" occiNetworkinterfaceGateway="10.254.1.254"> + <mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ipnetworkinterface']"/> + </parts> + </links> + </resources> + <resources xsi:type="platform:Component" id="urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255896" title="Wordcount" location="/component/urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255896/" occiComponentStateMessage=""> + <kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='component']"/> + <attributes name="occi.core.id" value="urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255896"/> + <attributes name="occi.core.title" value="Wordcount"/> + <attributes name="occi.core.summary" value=""/> + <attributes name="occi.component.state" value="undeployed"/> + <attributes name="occi.component.state.message" value=""/> + <parts mixin="//@mixins.0"/> + <links xsi:type="placement:Placementlink" id="urn:uuid:ff292f08-d263-41b6-88c8-84d33783b929" title="link1" location="/placementlink/urn:uuid:ff292f08-d263-41b6-88c8-84d33783b929/" target="//@resources.0"> + <kind href="http://schemas.modmacao.org/placement#//@kinds[term='placementlink']"/> + <attributes name="occi.core.id" value="urn:uuid:ff292f08-d263-41b6-88c8-84d33783b929"/> + <attributes name="occi.core.title" value="link1"/> + </links> + </resources> + <resources xsi:type="platform:Component" id="urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255897" title="hMaster" location="/component/urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255897/" rlinks="//@resources.3/@links.0" occiComponentStateMessage=""> + <kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='component']"/> + <attributes name="occi.core.id" value="urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255897"/> + <attributes name="occi.core.title" value="hMaster"/> + <attributes name="occi.core.summary" value=""/> + <attributes name="occi.component.state" value="undeployed"/> + <attributes name="occi.component.state.message" value=""/> + <parts mixin="//@mixins.1"/> + <links xsi:type="placement:Placementlink" id="urn:uuid:ff292f08-d263-41b6-88c8-84d33783b928" title="link1" location="/placementlink/urn:uuid:ff292f08-d263-41b6-88c8-84d33783b928/" target="//@resources.0"> + <kind href="http://schemas.modmacao.org/placement#//@kinds[term='placementlink']"/> + <attributes name="occi.core.id" value="urn:uuid:ff292f08-d263-41b6-88c8-84d33783b928"/> + <attributes name="occi.core.title" value="link1"/> + <attributes name="occi.core.source" value="/component/urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255897/"/> + <attributes name="occi.core.target" value="/compute/urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166ce/"/> + </links> + </resources> + <resources xsi:type="platform:Application" id="urn:uuid:a4888ba9-a0ea-48f2-a29e-901c876ab42d" title="hadoopcluster" location="/application/urn:uuid:a4888ba9-a0ea-48f2-a29e-901c876ab42d" occiAppName="" occiAppState="deployed"> + <kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='application']"/> + <attributes name="occi.core.id" value="urn:uuid:a4888ba9-a0ea-48f2-a29e-901c876ab42d"/> + <attributes name="occi.core.title" value="hadoopcluster"/> + <links xsi:type="platform:Componentlink" id="urn:uuid:9aa31c50-c605-4370-aa60-2c7c461051ef" title="ComponentLink" location="/componentlink/urn:uuid:9aa31c50-c605-4370-aa60-2c7c461051ef" target="//@resources.2"> + <kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/> + <attributes name="occi.core.id" value="urn:uuid:9aa31c50-c605-4370-aa60-2c7c461051ef"/> + <attributes name="occi.core.title" value="ComponentLink"/> + </links> + <links xsi:type="platform:Componentlink" id="urn:uuid:7890f02b-6f56-4809-865f-d8c686fd9da1" title="link4" location="/componentlink/urn:uuid:7890f02b-6f56-4809-865f-d8c686fd9da1" target="//@resources.5"> + <kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/> + <attributes name="occi.core.id" value="urn:uuid:7890f02b-6f56-4809-865f-d8c686fd9da1"/> + <attributes name="occi.core.title" value="link4"/> + </links> + </resources> + <resources xsi:type="infrastructure:Compute" id="urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166cf" title="hadoop-worker-1" location="/compute/urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166cf/" rlinks="//@resources.5/@links.0 //@resources.8/@links.0 //@resources.7/@links.3 //@resources.15/@links.3" occiComputeCores="2" occiComputeHostname="vm2" occiComputeMemory="4096.0" occiComputeState="active"> + <kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='compute']"/> + <attributes name="occi.core.id" value="urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166cf"/> + <attributes name="occi.core.title" value="hadoop-worker-1"/> + <attributes name="occi.core.summary" value=""/> + <attributes name="occi.compute.architecture" value="x86"/> + <attributes name="occi.compute.cores" value="2"/> + <attributes name="occi.compute.hostname" value="hadoop-worker-1"/> + <attributes name="occi.compute.share" value="0"/> + <attributes name="occi.compute.speed" value="0"/> + <attributes name="occi.compute.memory" value="4096"/> + <attributes name="occi.compute.state" value="active"/> + <attributes name="occi.compute.state.message" value=""/> + <parts xsi:type="infrastructure:Ssh_key" occiCredentialsSshPublickey="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6H7Ydi45BTHid4qNppGAi5mzjbnZgt7bi6xLGmZG9CiLmhMsxOuk3Z05Nn+pmoN98qS0eY8S240PPk5VOlYqBY0vdRAwrZSHHaLdMp6I7ARNrI2KraYduweqz7ZQxPXQfwIeYx2HKQxEF2r+4//Fo4WfgdBkLuulvl/Gw3TUzJNQHvgpaiNo9+PI5CZydHnZbjUkRikS12pT+CbNKj+0QKeQztbCd41aKxDv5H0DjltVRcpPppv4dmiU/zoCAIngWLO1PPgfYWyze8Z9IoyBT7Qdg30U91TYZBuxzXR5lq7Fh64y/IZ/SjdOdSIvIuDjtmJDULRdLJzrvubrKY+YH Generated-by-Nova"> + <mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ssh_key']"/> + <attributes name="occi.credentials.ssh.publickey" value="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6H7Ydi45BTHid4qNppGAi5mzjbnZgt7bi6xLGmZG9CiLmhMsxOuk3Z05Nn+pmoN98qS0eY8S240PPk5VOlYqBY0vdRAwrZSHHaLdMp6I7ARNrI2KraYduweqz7ZQxPXQfwIeYx2HKQxEF2r+4//Fo4WfgdBkLuulvl/Gw3TUzJNQHvgpaiNo9+PI5CZydHnZbjUkRikS12pT+CbNKj+0QKeQztbCd41aKxDv5H0DjltVRcpPppv4dmiU/zoCAIngWLO1PPgfYWyze8Z9IoyBT7Qdg30U91TYZBuxzXR5lq7Fh64y/IZ/SjdOdSIvIuDjtmJDULRdLJzrvubrKY+YH Generated-by-Nova"/> + </parts> + <parts xsi:type="infrastructure:User_data" occiComputeUserdata="I2Nsb3VkLWNvbmZpZwoKIyBVcGdyYWRlIHRoZSBpbnN0YW5jZSBvbiBmaXJzdCBib290CiMgKGllIHJ1biBhcHQtZ2V0IHVwZ3JhZGUpCiMKIyBEZWZhdWx0OiBmYWxzZQojIEFsaWFzZXM6IGFwdF91cGdyYWRlCnBhY2thZ2VfdXBncmFkZTogdHJ1ZQoKcGFja2FnZXM6CiAtIHB5dGhvbgoKd3JpdGVfZmlsZXM6CiAgLSBwYXRoOiAvZXRjL25ldHdvcmsvaW50ZXJmYWNlcy5kLzUwLWNsb3VkLWluaXQuY2ZnCiAgICBjb250ZW50OiB8CiAgICAgIGF1dG8gbG8KICAgICAgaWZhY2UgbG8gaW5ldCBsb29wYmFjawogICAgICAKICAgICAgYXV0byBlbnMwCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMAogICAgICBpZmFjZSBlbnMwIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMQogICAgICBpZmFjZSBlbnMxIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMyCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMgogICAgICBpZmFjZSBlbnMyIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMzCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMwogICAgICBpZmFjZSBlbnMzIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM0CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNAogICAgICBpZmFjZSBlbnM0IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM1CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNQogICAgICBpZmFjZSBlbnM1IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM2CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNgogICAgICBpZmFjZSBlbnM2IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM3CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNwogICAgICBpZmFjZSBlbnM3IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM4CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOAogICAgICBpZmFjZSBlbnM4IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM5CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOQogICAgICBpZmFjZSBlbnM5IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxMAogICAgICBhbGxvdy1ob3RwbHVnIGVuczEwCiAgICAgIGlmYWNlIGVuczEwIGluZXQgZGhjcAoKIyMj"> + <mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='user_data']"/> + <attributes name="occi.compute.userdata" value="I2Nsb3VkLWNvbmZpZwoKIyBVcGdyYWRlIHRoZSBpbnN0YW5jZSBvbiBmaXJzdCBib290CiMgKGllIHJ1biBhcHQtZ2V0IHVwZ3JhZGUpCiMKIyBEZWZhdWx0OiBmYWxzZQojIEFsaWFzZXM6IGFwdF91cGdyYWRlCnBhY2thZ2VfdXBncmFkZTogdHJ1ZQoKcGFja2FnZXM6CiAtIHB5dGhvbgoKd3JpdGVfZmlsZXM6CiAgLSBwYXRoOiAvZXRjL25ldHdvcmsvaW50ZXJmYWNlcy5kLzUwLWNsb3VkLWluaXQuY2ZnCiAgICBjb250ZW50OiB8CiAgICAgIGF1dG8gbG8KICAgICAgaWZhY2UgbG8gaW5ldCBsb29wYmFjawogICAgICAKICAgICAgYXV0byBlbnMwCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMAogICAgICBpZmFjZSBlbnMwIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMQogICAgICBpZmFjZSBlbnMxIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMyCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMgogICAgICBpZmFjZSBlbnMyIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMzCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMwogICAgICBpZmFjZSBlbnMzIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM0CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNAogICAgICBpZmFjZSBlbnM0IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM1CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNQogICAgICBpZmFjZSBlbnM1IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM2CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNgogICAgICBpZmFjZSBlbnM2IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM3CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNwogICAgICBpZmFjZSBlbnM3IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM4CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOAogICAgICBpZmFjZSBlbnM4IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM5CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOQogICAgICBpZmFjZSBlbnM5IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxMAogICAgICBhbGxvdy1ob3RwbHVnIGVuczEwCiAgICAgIGlmYWNlIGVuczEwIGluZXQgZGhjcAoKIyMj"/> + </parts> + <parts> + <mixin href="http://schemas.modmacao.org/openstack/swe#//@mixins[term='ubuntu_xenialxerus']"/> + </parts> + <links xsi:type="infrastructure:Networkinterface" id="urn:uuid:c8c49905-3d5e-43b2-8d09-fabf92d29722" title="link2" location="/networkinterface/urn:uuid:c8c49905-3d5e-43b2-8d09-fabf92d29722" target="//@resources.6"> + <kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='networkinterface']"/> + <attributes name="occi.core.id" value="urn:uuid:c8c49905-3d5e-43b2-8d09-fabf92d29722"/> + <attributes name="occi.core.title" value="link2"/> + <attributes name="occi.networkinterface.address" value="10.254.1.8"/> + <parts xsi:type="infrastructure:Ipnetworkinterface" occiNetworkinterfaceAddress="10.254.1.8" occiNetworkinterfaceGateway="10.254.1.254"> + <mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ipnetworkinterface']"/> + </parts> + </links> + <links xsi:type="infrastructure:Networkinterface" id="urn:uuid:03f91178-136f-4023-876e-84509f8a5a2d" title="monNwLink" target="//@resources.12" occiNetworkinterfaceInterface="100.254.1.35" occiNetworkinterfaceMac=""> + <kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='networkinterface']"/> + <attributes name="occi.core.id" value="urn:uuid:03f91178-136f-4023-876e-84509f8a5a2d"/> + <attributes name="occi.core.title" value="monNwLink"/> + <attributes name="occi.networkinterface.address" value="100.254.1.35"/> + <parts xsi:type="infrastructure:Ipnetworkinterface" occiNetworkinterfaceAddress="100.254.1.35" occiNetworkinterfaceGateway=""> + <mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ipnetworkinterface']"/> + </parts> + </links> + </resources> + <resources xsi:type="platform:Component" id="urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255898" title="Worker" location="/component/urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255898/" rlinks="//@resources.3/@links.1" occiComponentStateMessage=""> + <kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='component']"/> + <attributes name="occi.core.id" value="urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255898"/> + <attributes name="occi.core.title" value="Worker"/> + <attributes name="occi.core.summary" value=""/> + <attributes name="occi.component.state" value="undeployed"/> + <attributes name="occi.component.state.message" value=""/> + <parts mixin="//@mixins.2"/> + <links xsi:type="placement:Placementlink" id="urn:uuid:ff292f08-d263-41b6-88c8-84d33783b917" title="link1" location="/placementlink/urn:uuid:ff292f08-d263-41b6-88c8-84d33783b917/" target="//@resources.4"> + <kind href="http://schemas.modmacao.org/placement#//@kinds[term='placementlink']"/> + <attributes name="occi.core.id" value="urn:uuid:ff292f08-d263-41b6-88c8-84d33783b917"/> + <attributes name="occi.core.title" value="link1"/> + <attributes name="occi.core.target" value="/compute/urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166ce/"/> + </links> + </resources> + <resources xsi:type="infrastructure:Network" id="urn:uuid:29d78078-fb4c-47aa-a9af-b8aaf3339591" title="hNetwork" location="/network/urn:uuid:29d78078-fb4c-47aa-a9af-b8aaf3339591/" rlinks="//@resources.0/@links.0 //@resources.4/@links.0" occiNetworkState="active"> + <kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='network']"/> + <attributes name="occi.core.id" value="urn:uuid:29d78078-fb4c-47aa-a9af-b8aaf3339591"/> + <attributes name="occi.core.title" value="hNetwork"/> + <attributes name="occi.core.summary" value=""/> + <attributes name="occi.network.vlan" value="0"/> + <attributes name="occi.network.label" value=""/> + <attributes name="occi.network.state" value="active"/> + <attributes name="occi.network.state.message" value=""/> + <parts> + <mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ipnetwork']"/> + <attributes name="occi.network.address" value="10.254.1.1/24"/> + </parts> + </resources> + <resources xsi:type="monitoring:Sensor" id="urn:uuid:efb0f50a-7a7c-4153-b939-4846d6554dbb" title="Sensor"> + <kind href="http://schemas.ugoe.cs.rwm/monitoring#//@kinds[term='sensor']"/> + <attributes name="occi.core.id" value="urn:uuid:efb0f50a-7a7c-4153-b939-4846d6554dbb"/> + <attributes name="occi.core.title" value="Sensor"/> + <attributes name="occi.core.summary" value=""/> + <attributes name="occi.app.state" value="undeployed"/> + <attributes name="occi.app.state.message" value=""/> + <links xsi:type="platform:Componentlink" id="urn:uuid:04cf6483-706d-4a2a-9114-9918ab2bb52a" title="link1" target="//@resources.8"> + <kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/> + <attributes name="occi.core.id" value="urn:uuid:04cf6483-706d-4a2a-9114-9918ab2bb52a"/> + <attributes name="occi.core.title" value="link1"/> + </links> + <links xsi:type="platform:Componentlink" id="urn:uuid:9c604867-3135-4fa1-af9e-2bb11018ff5a" title="link2" target="//@resources.9"> + <kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/> + <attributes name="occi.core.id" value="urn:uuid:9c604867-3135-4fa1-af9e-2bb11018ff5a"/> + <attributes name="occi.core.title" value="link2"/> + </links> + <links xsi:type="platform:Componentlink" id="urn:uuid:93f08e31-f350-42b7-a73b-c139eba4a8e3" title="link3" target="//@resources.10"> + <kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/> + <attributes name="occi.core.id" value="urn:uuid:93f08e31-f350-42b7-a73b-c139eba4a8e3"/> + <attributes name="occi.core.title" value="link3"/> + </links> + <links xsi:type="monitoring:Monitorableproperty" id="urn:uuid:ba16f4ee-1601-4192-a259-eae4274aed72" title="CPU Monitoring" location="" target="//@resources.4" monitoringProperty="CPU" monitoringResult=""> + <kind href="http://schemas.ugoe.cs.rwm/monitoring#//@kinds[term='monitorableproperty']"/> + <attributes name="occi.core.id" value="urn:uuid:ba16f4ee-1601-4192-a259-eae4274aed72"/> + <attributes name="occi.core.title" value="CPU Monitoring"/> + <attributes name="monitoring.property" value="CPU"/> + </links> + </resources> + <resources xsi:type="monitoring:Datagatherer" id="urn:uuid:051affdc-d686-48f8-884c-83fe81718a48" title="DataGatherer" rlinks="//@resources.7/@links.0 //@resources.9/@links.0 //@resources.13/@links.0 //@resources.15/@links.0"> + <kind href="http://schemas.ugoe.cs.rwm/monitoring#//@kinds[term='datagatherer']"/> + <attributes name="occi.core.id" value="urn:uuid:051affdc-d686-48f8-884c-83fe81718a48"/> + <attributes name="occi.core.title" value="DataGatherer"/> + <parts mixin="//@mixins.3"/> + <links xsi:type="placement:Placementlink" id="urn:uuid:60cc05ca-4fd7-465b-8fd0-945dcbf8867f" title="link1" target="//@resources.4"> + <kind href="http://schemas.modmacao.org/placement#//@kinds[term='placementlink']"/> + <attributes name="occi.core.id" value="urn:uuid:60cc05ca-4fd7-465b-8fd0-945dcbf8867f"/> + <attributes name="occi.core.title" value="link1"/> + </links> + </resources> + <resources xsi:type="monitoring:Dataprocessor" id="urn:uuid:1bda25ab-723b-47e7-9704-5134db26ebdc" title="Processor" rlinks="//@resources.10/@links.0 //@resources.7/@links.1"> + <kind href="http://schemas.ugoe.cs.rwm/monitoring#//@kinds[term='dataprocessor']"/> + <attributes name="occi.core.id" value="urn:uuid:1bda25ab-723b-47e7-9704-5134db26ebdc"/> + <attributes name="occi.core.title" value="Processor"/> + <parts mixin="//@mixins.4"/> + <links xsi:type="platform:Componentlink" id="urn:uuid:1a821776-7886-4cb4-8b80-46a8403acf40" title="link1" target="//@resources.8"> + <kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/> + <attributes name="occi.core.id" value="urn:uuid:1a821776-7886-4cb4-8b80-46a8403acf40"/> + <attributes name="occi.core.title" value="link1"/> + </links> + <links xsi:type="placement:Placementlink" id="urn:uuid:ff7019e4-a9dc-48dc-83c3-ab77714a25f4" title="link2" target="//@resources.11"> + <kind href="http://schemas.modmacao.org/placement#//@kinds[term='placementlink']"/> + <attributes name="occi.core.id" value="urn:uuid:ff7019e4-a9dc-48dc-83c3-ab77714a25f4"/> + <attributes name="occi.core.title" value="link2"/> + </links> + </resources> + <resources xsi:type="monitoring:Resultprovider" id="urn:uuid:588f705e-5279-4847-9337-846af2c86972" title="Resultprovider" rlinks="//@resources.7/@links.2"> + <kind href="http://schemas.ugoe.cs.rwm/monitoring#//@kinds[term='resultprovider']"/> + <attributes name="occi.core.id" value="urn:uuid:588f705e-5279-4847-9337-846af2c86972"/> + <attributes name="occi.core.title" value="Resultprovider"/> + <parts mixin="//@mixins.5"/> + <parts xsi:type="monitoring:Occiresultprovider"> + <mixin href="http://schemas.ugoe.cs.rwm/monitoring#//@mixins[term='occiresultprovider']"/> + <attributes name="result.provider.endpoint" value="192.168.35.45:8080"/> + </parts> + <links xsi:type="platform:Componentlink" id="urn:uuid:9551c357-59f8-4ac1-8c85-0e886e206b80" title="link1" target="//@resources.9"> + <kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/> + <attributes name="occi.core.id" value="urn:uuid:9551c357-59f8-4ac1-8c85-0e886e206b80"/> + <attributes name="occi.core.title" value="link1"/> + </links> + <links xsi:type="placement:Placementlink" id="urn:uuid:275b5bce-084c-46f0-88bc-1f6f31bf3616" title="link2" target="//@resources.11"> + <kind href="http://schemas.modmacao.org/placement#//@kinds[term='placementlink']"/> + <attributes name="occi.core.id" value="urn:uuid:275b5bce-084c-46f0-88bc-1f6f31bf3616"/> + <attributes name="occi.core.title" value="link2"/> + </links> + </resources> + <resources xsi:type="infrastructure:Compute" id="urn:uuid:37829092-c690-494a-98fa-335b2fd660ea" title="MonVm" rlinks="//@resources.9/@links.1 //@resources.10/@links.1 //@resources.13/@links.1 //@resources.14/@links.1" occiComputeHostname="monVM" occiComputeState="inactive"> + <kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='compute']"/> + <attributes name="occi.core.id" value="urn:uuid:37829092-c690-494a-98fa-335b2fd660ea"/> + <attributes name="occi.core.title" value="MonVm"/> + <attributes name="occi.core.summary" value=""/> + <attributes name="occi.compute.architecture" value="x86"/> + <attributes name="occi.compute.cores" value="2"/> + <attributes name="occi.compute.hostname" value="monVM"/> + <attributes name="occi.compute.share" value="0"/> + <attributes name="occi.compute.speed" value="0"/> + <attributes name="occi.compute.memory" value="4096"/> + <attributes name="occi.compute.state" value="active"/> + <attributes name="occi.compute.state.message" value=""/> + <parts> + <mixin href="http://schemas.modmacao.org/openstack/swe#//@mixins[term='ubuntu_xenialxerus']"/> + </parts> + <links xsi:type="infrastructure:Networkinterface" id="urn:uuid:00d6889d-b644-44bf-af13-3fe350e926ed" title="link1" target="//@resources.12"> + <kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='networkinterface']"/> + <attributes name="occi.core.id" value="urn:uuid:00d6889d-b644-44bf-af13-3fe350e926ed"/> + <attributes name="occi.core.title" value="link1"/> + <parts xsi:type="infrastructure:Ipnetworkinterface" occiNetworkinterfaceAddress="100.254.1.25"> + <mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ipnetworkinterface']"/> + </parts> + </links> + </resources> + <resources xsi:type="infrastructure:Network" id="urn:uuid:7a9fca2c-24fb-473c-aa9c-8dc9e68a432a" title="MonitoringNetwork" rlinks="//@resources.11/@links.0 //@resources.4/@links.1" occiNetworkState="inactive"> + <kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='network']"/> + <attributes name="occi.core.id" value="urn:uuid:7a9fca2c-24fb-473c-aa9c-8dc9e68a432a"/> + <attributes name="occi.core.title" value="MonitoringNetwork"/> + <attributes name="occi.core.summary" value=""/> + <attributes name="occi.network.vlan" value="0"/> + <attributes name="occi.network.label" value=""/> + <attributes name="occi.network.state" value="active"/> + <attributes name="occi.network.state.message" value=""/> + <parts> + <mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ipnetwork']"/> + <attributes name="occi.network.address" value="100.254.1.1/24"/> + </parts> + </resources> + <resources xsi:type="monitoring:Dataprocessor" id="urn:uuid:1bda25ab-723b-47e7-9704-5134db26ebdd" title="Processor" rlinks="//@resources.14/@links.0 //@resources.15/@links.2"> + <kind href="http://schemas.ugoe.cs.rwm/monitoring#//@kinds[term='dataprocessor']"/> + <attributes name="occi.core.title" value="Processor"/> + <attributes name="occi.core.id" value="urn:uuid:1bda25ab-723b-47e7-9704-5134db26ebdd"/> + <parts mixin="//@mixins.6"/> + <links xsi:type="platform:Componentlink" id="urn:uuid:1a821776-7886-4cb4-8b80-46a8403acf41" title="link1" target="//@resources.8"> + <kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/> + <attributes name="occi.core.id" value="urn:uuid:1a821776-7886-4cb4-8b80-46a8403acf41"/> + <attributes name="occi.core.title" value="link1"/> + </links> + <links xsi:type="placement:Placementlink" id="urn:uuid:ff7019e4-a9dc-48dc-83c3-ab77714a25f5" title="link2" target="//@resources.11"> + <kind href="http://schemas.modmacao.org/placement#//@kinds[term='placementlink']"/> + <attributes name="occi.core.id" value="urn:uuid:ff7019e4-a9dc-48dc-83c3-ab77714a25f5"/> + <attributes name="occi.core.title" value="link2"/> + </links> + </resources> + <resources xsi:type="monitoring:Resultprovider" id="urn:uuid:588f705e-5279-4847-9337-846af2c86973" title="Resultprovider" rlinks="//@resources.15/@links.1"> + <kind href="http://schemas.ugoe.cs.rwm/monitoring#//@kinds[term='resultprovider']"/> + <attributes name="occi.core.id" value="urn:uuid:588f705e-5279-4847-9337-846af2c86973"/> + <attributes name="occi.core.title" value="Resultprovider"/> + <parts mixin="//@mixins.7"/> + <parts xsi:type="monitoring:Occiresultprovider"> + <mixin href="http://schemas.ugoe.cs.rwm/monitoring#//@mixins[term='occiresultprovider']"/> + <attributes name="result.provider.endpoint" value="192.168.35.45:8080"/> + </parts> + <links xsi:type="platform:Componentlink" id="urn:uuid:9551c357-59f8-4ac1-8c85-0e886e206b83" title="link1" target="//@resources.13"> + <kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/> + <attributes name="occi.core.id" value="urn:uuid:9551c357-59f8-4ac1-8c85-0e886e206b83"/> + <attributes name="occi.core.title" value="link1"/> + </links> + <links xsi:type="placement:Placementlink" id="urn:uuid:275b5bce-084c-46f0-88bc-1f6f31bf3618" title="link2" target="//@resources.11"> + <kind href="http://schemas.modmacao.org/placement#//@kinds[term='placementlink']"/> + <attributes name="occi.core.id" value="urn:uuid:275b5bce-084c-46f0-88bc-1f6f31bf3618"/> + <attributes name="occi.core.title" value="link2"/> + </links> + </resources> + <resources xsi:type="monitoring:Sensor" id="urn:uuid:efb0f50a-7a7c-4153-b939-4846d6554dbc" title="Sensor" occiAppStateMessage=""> + <kind href="http://schemas.ugoe.cs.rwm/monitoring#//@kinds[term='sensor']"/> + <attributes name="occi.core.title" value="Sensor"/> + <attributes name="occi.core.id" value="urn:uuid:efb0f50a-7a7c-4153-b939-4846d6554dbc"/> + <attributes name="occi.app.state.message" value=""/> + <links xsi:type="platform:Componentlink" id="urn:uuid:04cf6483-706d-4a2a-9114-9918ab2bb52b" title="link1" target="//@resources.8"> + <kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/> + <attributes name="occi.core.id" value="urn:uuid:04cf6483-706d-4a2a-9114-9918ab2bb52b"/> + <attributes name="occi.core.title" value="link1"/> + </links> + <links xsi:type="platform:Componentlink" id="urn:uuid:9c604867-3135-4fa1-af9e-2bb11018ff5b" title="link2" target="//@resources.14"> + <kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/> + <attributes name="occi.core.id" value="urn:uuid:9c604867-3135-4fa1-af9e-2bb11018ff5b"/> + <attributes name="occi.core.title" value="link2"/> + </links> + <links xsi:type="platform:Componentlink" id="urn:uuid:93f08e31-f350-42b7-a73b-c139eba4a8e4" title="link3" target="//@resources.13"> + <kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/> + <attributes name="occi.core.id" value="urn:uuid:93f08e31-f350-42b7-a73b-c139eba4a8e4"/> + <attributes name="occi.core.title" value="link3"/> + </links> + <links xsi:type="monitoring:Monitorableproperty" id="urn:uuid:ba16f4ee-1601-4192-a259-eae4274aed73" title="MEM Monitoring" location="" target="//@resources.4" monitoringProperty="Mem" monitoringResult=""> + <kind href="http://schemas.ugoe.cs.rwm/monitoring#//@kinds[term='monitorableproperty']"/> + <attributes name="occi.core.title" value="MEM Monitoring"/> + <attributes name="occi.core.id" value="urn:uuid:ba16f4ee-1601-4192-a259-eae4274aed73"/> + <attributes name="monitoring.property" value="Mem"/> + </links> + </resources> + <mixins name="hJob" scheme="http://schemas.modmacao.org/usermixins#" title="Hjob"/> + <mixins name="hMaster" scheme="http://schemas.modmacao.org/usermixins#" title="HMaster"/> + <mixins name="hWorker" scheme="http://schemas.modmacao.org/usermixins#" title="HWorker"/> + <mixins name="CPUGatherer" scheme="http://schemas.modmacao.org/usermixins#" title="CPUGatherer"/> + <mixins name="CPUProcessor" scheme="http://schemas.modmacao.org/usermixins#" title="CPUProcessor"/> + <mixins name="CPUPublisher" scheme="http://schemas.modmacao.org/usermixins#" title="CPUPublisher"/> + <mixins name="MemProcessor" scheme="http://schemas.modmacao.org/usermixins#" title="MemProcessor"/> + <mixins name="MemPublisher" scheme="http://schemas.modmacao.org/usermixins#" title="MemPublisher"/> +</occi:Configuration> diff --git a/src/test/java/de/ugoe/cs/rwm/mocci/CreateElementsTest.java b/src/test/java/de/ugoe/cs/rwm/mocci/CreateMonitoringElementsTest.java similarity index 56% rename from src/test/java/de/ugoe/cs/rwm/mocci/CreateElementsTest.java rename to src/test/java/de/ugoe/cs/rwm/mocci/CreateMonitoringElementsTest.java index 3b95d7f..600aac1 100644 --- a/src/test/java/de/ugoe/cs/rwm/mocci/CreateElementsTest.java +++ b/src/test/java/de/ugoe/cs/rwm/mocci/CreateMonitoringElementsTest.java @@ -28,6 +28,9 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; +import org.modmacao.occi.platform.Componentlink; +import org.modmacao.occi.platform.PlatformFactory; +import org.modmacao.occi.platform.impl.PlatformFactoryImpl; import de.ugoe.cs.rwm.docci.MartDeployer; import de.ugoe.cs.rwm.docci.ModelUtility; @@ -37,12 +40,16 @@ import de.ugoe.cs.rwm.docci.connector.LocalhostConnector; import de.ugoe.cs.rwm.tocci.Transformator; import de.ugoe.cs.rwm.tocci.TransformatorFactory; import de.ugoe.cs.rwm.tocci.occi2openstack.OCCI2OPENSTACKTransformator; +import monitoring.Datagatherer; +import monitoring.Dataprocessor; +import monitoring.Monitorableproperty; import monitoring.MonitoringFactory; import monitoring.MonitoringPackage; +import monitoring.Resultprovider; import monitoring.Sensor; import monitoring.impl.MonitoringFactoryImpl; -public class CreateElementsTest { +public class CreateMonitoringElementsTest { @BeforeClass public static void OCCIRegistrySetup() { @@ -51,18 +58,70 @@ public class CreateElementsTest { } @Test - public void createModel() { + public void createMonitoringElements() { //Factories to create OCCI elements OCCIFactory cFact = new OCCIFactoryImpl(); InfrastructureFactory iFact = new InfrastructureFactoryImpl(); MonitoringFactory mFact = new MonitoringFactoryImpl(); + PlatformFactory pFact = new PlatformFactoryImpl(); //Top level element Configuration config = cFact.createConfiguration(); + Compute comp = iFact.createCompute(); //Resources Sensor sensor = mFact.createSensor(); - Compute comp = iFact.createCompute(); + config.getResources().add(sensor); + config.getResources().add(comp); + + Monitorableproperty mp = mFact.createMonitorableproperty(); + mp.setSource(sensor); + mp.setTarget(comp); + + Datagatherer dg = mFact.createDatagatherer(); + Componentlink cl = pFact.createComponentlink(); + cl.setSource(sensor); + cl.setTarget(dg); + + Dataprocessor dp = mFact.createDataprocessor(); + Componentlink cl1 = pFact.createComponentlink(); + cl1.setSource(sensor); + cl1.setTarget(dp); + + Resultprovider rp = mFact.createResultprovider(); + Componentlink cl2 = pFact.createComponentlink(); + cl2.setSource(sensor); + cl2.setTarget(rp); + + System.out.println("Checking configuration: " + config.getResources()); + + assertTrue(checkSensor(config)); + + } + + + public boolean checkSensor(Configuration conf) { + for(org.eclipse.cmf.occi.core.Resource res: conf.getResources()) { + if(res instanceof Sensor) { + Sensor sens = (Sensor) res; + if(containsDevices(sens)) { + return true; + } + } + } + return false; } + private boolean containsDevices(Sensor sens) { + int count = 0; + for(Link link: sens.getLinks()) { + if(link instanceof Componentlink) { + count++; + } + } + if(count == 3) { + return true; + } + return false; + } } \ No newline at end of file diff --git a/src/test/java/de/ugoe/cs/rwm/mocci/DeployHadoopMonitoringTest.java b/src/test/java/de/ugoe/cs/rwm/mocci/DeployHadoopMonitoringTest.java index a2d65ec..9e4620f 100644 --- a/src/test/java/de/ugoe/cs/rwm/mocci/DeployHadoopMonitoringTest.java +++ b/src/test/java/de/ugoe/cs/rwm/mocci/DeployHadoopMonitoringTest.java @@ -45,7 +45,7 @@ public class DeployHadoopMonitoringTest { TestUtility.loggerSetup(); TestUtility.extensionRegistrySetup(); } - + @Ignore @Before public void deprovisionEverything() { CachedResourceSet.getCache().clear(); @@ -55,6 +55,7 @@ public class DeployHadoopMonitoringTest { deployer.deploy(occiPath); } + @Ignore @Test public void deployHadoopWithNewMonitoring() { CachedResourceSet.getCache().clear(); diff --git a/src/test/java/de/ugoe/cs/rwm/mocci/DeployHadoopNode2Test.java b/src/test/java/de/ugoe/cs/rwm/mocci/DeployHadoopNode2Test.java deleted file mode 100644 index 366b5db..0000000 --- a/src/test/java/de/ugoe/cs/rwm/mocci/DeployHadoopNode2Test.java +++ /dev/null @@ -1,82 +0,0 @@ -package de.ugoe.cs.rwm.mocci; - -import static org.junit.Assert.assertTrue; - -import java.nio.file.Path; -import java.nio.file.Paths; - -import org.apache.log4j.Level; -import org.apache.log4j.Logger; -import org.eclipse.cmf.occi.core.Configuration; -import org.eclipse.cmf.occi.core.Link; -import org.eclipse.cmf.occi.core.Mixin; -import org.eclipse.cmf.occi.core.OCCIPackage; -import org.eclipse.cmf.occi.core.util.OcciRegistry; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.epsilon.emc.emf.CachedResourceSet; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; - -import de.ugoe.cs.rwm.docci.MartDeployer; -import de.ugoe.cs.rwm.docci.ModelUtility; -import de.ugoe.cs.rwm.mocci.TestUtility; -import de.ugoe.cs.rwm.docci.connector.Connector; -import de.ugoe.cs.rwm.docci.connector.LocalhostConnector; -import de.ugoe.cs.rwm.tocci.Transformator; -import de.ugoe.cs.rwm.tocci.TransformatorFactory; -import de.ugoe.cs.rwm.tocci.occi2openstack.OCCI2OPENSTACKTransformator; -import monitoring.MonitoringPackage; - -public class DeployHadoopNode2Test { - String manNWid = "urn:uuid:29d78078-fb4c-47aa-a9af-b8aaf3339590"; - String manNWRuntimeId = "75a4639e-9ce7-4058-b859-8a711b0e2e7b"; - String sshKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6H7Ydi45BTHid4qNppGAi5mzjbnZgt7bi6xLGmZG9CiLmhMsxOuk3Z05Nn+pmoN98qS0eY8S240PPk5VOlYqBY0vdRAwrZSHHaLdMp6I7ARNrI2KraYduweqz7ZQxPXQfwIeYx2HKQxEF2r+4//Fo4WfgdBkLuulvl/Gw3TUzJNQHvgpaiNo9+PI5CZydHnZbjUkRikS12pT+CbNKj+0QKeQztbCd41aKxDv5H0DjltVRcpPppv4dmiU/zoCAIngWLO1PPgfYWyze8Z9IoyBT7Qdg30U91TYZBuxzXR5lq7Fh64y/IZ/SjdOdSIvIuDjtmJDULRdLJzrvubrKY+YH Generated-by-Nova"; - String userData = "I2Nsb3VkLWNvbmZpZwoKIyBVcGdyYWRlIHRoZSBpbnN0YW5jZSBvbiBmaXJzdCBib290CiMgKGllIHJ1biBhcHQtZ2V0IHVwZ3JhZGUpCiMKIyBEZWZhdWx0OiBmYWxzZQojIEFsaWFzZXM6IGFwdF91cGdyYWRlCnBhY2thZ2VfdXBncmFkZTogdHJ1ZQoKcGFja2FnZXM6CiAtIHB5dGhvbgoKd3JpdGVfZmlsZXM6CiAgLSBwYXRoOiAvZXRjL25ldHdvcmsvaW50ZXJmYWNlcy5kLzUwLWNsb3VkLWluaXQuY2ZnCiAgICBjb250ZW50OiB8CiAgICAgIGF1dG8gbG8KICAgICAgaWZhY2UgbG8gaW5ldCBsb29wYmFjawogICAgICAKICAgICAgYXV0byBlbnMwCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMAogICAgICBpZmFjZSBlbnMwIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMQogICAgICBpZmFjZSBlbnMxIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMyCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMgogICAgICBpZmFjZSBlbnMyIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMzCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMwogICAgICBpZmFjZSBlbnMzIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM0CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNAogICAgICBpZmFjZSBlbnM0IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM1CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNQogICAgICBpZmFjZSBlbnM1IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM2CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNgogICAgICBpZmFjZSBlbnM2IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM3CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNwogICAgICBpZmFjZSBlbnM3IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM4CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOAogICAgICBpZmFjZSBlbnM4IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM5CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOQogICAgICBpZmFjZSBlbnM5IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxMAogICAgICBhbGxvdy1ob3RwbHVnIGVuczEwCiAgICAgIGlmYWNlIGVuczEwIGluZXQgZGhjcAoKIyMj"; - - - @BeforeClass - public static void OCCIRegistrySetup() { - TestUtility.loggerSetup(); - TestUtility.extensionRegistrySetup(); - } - - @Before - public void deprovisionEverything() { - CachedResourceSet.getCache().clear(); - Path occiPath = Paths.get(ModelUtility.getPathToResource("occi/Empty.occic")); - Connector conn = new LocalhostConnector("localhost", 8080, "ubuntu"); - MartDeployer deployer = new MartDeployer(conn); - deployer.deploy(occiPath); - } - - @Test - public void deployHadoopWithNewMonitoring() { - CachedResourceSet.getCache().clear(); - System.out.println(OcciRegistry.getInstance().getRegisteredExtensions()); - //Logger.getRootLogger().setLevel(Level.FATAL); - Path occiPath = Paths.get(ModelUtility.getPathToResource("occi/hadoopCluster2Nodes.occic")); - - Transformator trans = TransformatorFactory.getTransformator("OCCI2OCCI"); - trans.transform(occiPath, occiPath); - - OCCI2OPENSTACKTransformator trans2 = OCCI2OPENSTACKTransformator.getInstance(); - trans2.setTransformationProperties(manNWRuntimeId, sshKey, userData, manNWid); - - trans2.transform(occiPath, occiPath); - - - Connector conn = new LocalhostConnector("localhost", 8080, "ubuntu"); - MartDeployer deployer = new MartDeployer(conn); - - deployer.deploy(occiPath); - - assertTrue(TestUtility.equalsRuntime(occiPath, conn)); - - } -} diff --git a/src/test/java/de/ugoe/cs/rwm/mocci/EmptyTest.java b/src/test/java/de/ugoe/cs/rwm/mocci/EmptyTest.java index 0f9bcea..060edfd 100644 --- a/src/test/java/de/ugoe/cs/rwm/mocci/EmptyTest.java +++ b/src/test/java/de/ugoe/cs/rwm/mocci/EmptyTest.java @@ -45,7 +45,7 @@ public class EmptyTest { TestUtility.loggerSetup(); TestUtility.extensionRegistrySetup(); } - + @Ignore @Test public void deprovisionEverything() { CachedResourceSet.getCache().clear(); diff --git a/src/test/java/de/ugoe/cs/rwm/mocci/MapeTest.java b/src/test/java/de/ugoe/cs/rwm/mocci/MapeTest.java index 00f6e08..cb2e69b 100644 --- a/src/test/java/de/ugoe/cs/rwm/mocci/MapeTest.java +++ b/src/test/java/de/ugoe/cs/rwm/mocci/MapeTest.java @@ -1,23 +1,69 @@ package de.ugoe.cs.rwm.mocci; +import java.nio.file.Path; +import java.nio.file.Paths; + import org.eclipse.epsilon.emc.emf.CachedResourceSet; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; import org.modmacao.occi.platform.Componentlink; import org.modmacao.occi.platform.impl.PlatformFactoryImpl; +import de.ugoe.cs.rwm.docci.MartDeployer; +import de.ugoe.cs.rwm.docci.ModelUtility; +import de.ugoe.cs.rwm.docci.connector.Connector; +import de.ugoe.cs.rwm.docci.connector.LocalhostConnector; + public class MapeTest { - @Test - public void deployHadoopWithNewMonitoring() { + @BeforeClass + public static void OCCIRegistrySetup() { TestUtility.loggerSetup(); - TestUtility.extensionRegistrySetup(); - + TestUtility.extensionRegistrySetup(); + } + + @Before + public void deprovisionEverything() { CachedResourceSet.getCache().clear(); - PlatformFactoryImpl pFactory = new PlatformFactoryImpl(); - Componentlink cl = pFactory.createComponentlink(); - System.out.println(cl); + Path occiPath = Paths.get(ModelUtility.getPathToResource("occi/Empty.occic")); + Connector conn = new LocalhostConnector("localhost", 8080, "ubuntu"); + MartDeployer deployer = new MartDeployer(conn); + deployer.deploy(occiPath); + InitialDeployment depl = new InitialDeployment(conn); + depl.deploy(); } + + @Test + public void Monitor() { + Monitor monitor = MAPE.monitor(); + } + + @Test + public void Analyze() { + Monitor monitor = MAPE.monitor(); + String analysis = MAPE.analyze(monitor); + } + + @Test + public void Plan() { + Monitor monitor = MAPE.monitor(); + String analysis = MAPE.analyze(monitor); + MAPE.runtimeModel = MAPE.plan(analysis); + } + + @Test + public void Execute() { + Monitor monitor = MAPE.monitor(); + String analysis = MAPE.analyze(monitor); + MAPE.runtimeModel = MAPE.plan(analysis); + MAPE.execute(MAPE.runtimeModel); + } + } + + \ No newline at end of file diff --git a/src/test/java/de/ugoe/cs/rwm/mocci/ResolveProxyTest.java b/src/test/java/de/ugoe/cs/rwm/mocci/ResolveProxyTest.java index 6b888e2..5445e4d 100644 --- a/src/test/java/de/ugoe/cs/rwm/mocci/ResolveProxyTest.java +++ b/src/test/java/de/ugoe/cs/rwm/mocci/ResolveProxyTest.java @@ -42,7 +42,7 @@ public class ResolveProxyTest { TestUtility.loggerSetup(); TestUtility.extensionRegistrySetup(); } - + @Test public void resolveProxies() { Path newOCCI = Paths.get(de.ugoe.cs.rwm.docci.ModelUtility.getPathToResource("occi/hadoopClusterNewExtWithMem.occic")); @@ -56,14 +56,17 @@ public class ResolveProxyTest { for (org.eclipse.cmf.occi.core.Resource res : de.ugoe.cs.rwm.docci.ModelUtility.getResources(newModel)) { System.out.println("Resource Title: " + res.getTitle()); System.out.println(" Kind: " + res.getKind()); + assertTrue(!(res.getKind().eIsProxy())); for (Link link : res.getLinks()) { System.out.println(" Link: " + link.getTitle()); System.out.println(" " + " Kind:" + link.getKind()); System.out.println(" " + " Target:" + link.getTarget()); + assertTrue(!(link.getKind().eIsProxy())); } for (Mixin mix : res.getMixins()) { System.out.println(" " + mix); System.out.println(" " + mix.getScheme()); + assertTrue(!(mix.eIsProxy())); } } } diff --git a/src/test/java/de/ugoe/cs/rwm/mocci/live/DeployHadoopNode2TestLive.java b/src/test/java/de/ugoe/cs/rwm/mocci/live/DeployHadoopNode2TestLive.java deleted file mode 100644 index 6231848..0000000 --- a/src/test/java/de/ugoe/cs/rwm/mocci/live/DeployHadoopNode2TestLive.java +++ /dev/null @@ -1,64 +0,0 @@ -package de.ugoe.cs.rwm.mocci.live; - -import static org.junit.Assert.assertTrue; - -import java.nio.file.Path; -import java.nio.file.Paths; - -import org.eclipse.epsilon.emc.emf.CachedResourceSet; -import org.junit.BeforeClass; -import org.junit.Test; - -import de.ugoe.cs.rwm.docci.MartDeployer; -import de.ugoe.cs.rwm.docci.ModelUtility; -import de.ugoe.cs.rwm.docci.connector.Connector; -import de.ugoe.cs.rwm.docci.connector.MartConnector; -import de.ugoe.cs.rwm.mocci.TestUtility; -import de.ugoe.cs.rwm.tocci.Transformator; -import de.ugoe.cs.rwm.tocci.TransformatorFactory; -import de.ugoe.cs.rwm.tocci.occi2openstack.OCCI2OPENSTACKTransformator; - -public class DeployHadoopNode2TestLive { - String manNWid = "urn:uuid:29d78078-fb4c-47aa-a9af-b8aaf3339590"; - String manNWRuntimeId = "75a4639e-9ce7-4058-b859-8a711b0e2e7b"; - String sshKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6H7Ydi45BTHid4qNppGAi5mzjbnZgt7bi6xLGmZG9CiLmhMsxOuk3Z05Nn+pmoN98qS0eY8S240PPk5VOlYqBY0vdRAwrZSHHaLdMp6I7ARNrI2KraYduweqz7ZQxPXQfwIeYx2HKQxEF2r+4//Fo4WfgdBkLuulvl/Gw3TUzJNQHvgpaiNo9+PI5CZydHnZbjUkRikS12pT+CbNKj+0QKeQztbCd41aKxDv5H0DjltVRcpPppv4dmiU/zoCAIngWLO1PPgfYWyze8Z9IoyBT7Qdg30U91TYZBuxzXR5lq7Fh64y/IZ/SjdOdSIvIuDjtmJDULRdLJzrvubrKY+YH Generated-by-Nova"; - String userData = "I2Nsb3VkLWNvbmZpZwoKIyBVcGdyYWRlIHRoZSBpbnN0YW5jZSBvbiBmaXJzdCBib290CiMgKGllIHJ1biBhcHQtZ2V0IHVwZ3JhZGUpCiMKIyBEZWZhdWx0OiBmYWxzZQojIEFsaWFzZXM6IGFwdF91cGdyYWRlCnBhY2thZ2VfdXBncmFkZTogdHJ1ZQoKcGFja2FnZXM6CiAtIHB5dGhvbgoKd3JpdGVfZmlsZXM6CiAgLSBwYXRoOiAvZXRjL25ldHdvcmsvaW50ZXJmYWNlcy5kLzUwLWNsb3VkLWluaXQuY2ZnCiAgICBjb250ZW50OiB8CiAgICAgIGF1dG8gbG8KICAgICAgaWZhY2UgbG8gaW5ldCBsb29wYmFjawogICAgICAKICAgICAgYXV0byBlbnMwCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMAogICAgICBpZmFjZSBlbnMwIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMQogICAgICBpZmFjZSBlbnMxIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMyCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMgogICAgICBpZmFjZSBlbnMyIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMzCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMwogICAgICBpZmFjZSBlbnMzIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM0CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNAogICAgICBpZmFjZSBlbnM0IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM1CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNQogICAgICBpZmFjZSBlbnM1IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM2CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNgogICAgICBpZmFjZSBlbnM2IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM3CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNwogICAgICBpZmFjZSBlbnM3IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM4CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOAogICAgICBpZmFjZSBlbnM4IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM5CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOQogICAgICBpZmFjZSBlbnM5IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxMAogICAgICBhbGxvdy1ob3RwbHVnIGVuczEwCiAgICAgIGlmYWNlIGVuczEwIGluZXQgZGhjcAoKIyMj"; - - - @BeforeClass - public static void OCCIRegistrySetup() { - TestUtility.loggerSetup(); - TestUtility.extensionRegistrySetup(); - } - - //public void deprovisionEverything() { - // CachedResourceSet.getCache().clear(); - // Path occiPath = Paths.get(ModelUtility.getPathToResource("occi/Empty.occic")); - // Connector conn = new MartConnector("192.168.35.45", 8080, "ubuntu", "~/key.pem"); - // MartDeployer deployer = new MartDeployer(conn); - // deployer.deploy(occiPath); - //} - - @Test - public void deployHadoopWithNewMonitoring() { - CachedResourceSet.getCache().clear(); - Path occiPath = Paths.get(ModelUtility.getPathToResource("occi/hadoopCluster2Nodes.occic")); - - Transformator trans = TransformatorFactory.getTransformator("OCCI2OCCI"); - trans.transform(occiPath, occiPath); - - OCCI2OPENSTACKTransformator trans2 = OCCI2OPENSTACKTransformator.getInstance(); - trans2.setTransformationProperties(manNWRuntimeId, sshKey, userData, manNWid); - - trans2.transform(occiPath, occiPath); - - - Connector conn = new MartConnector("192.168.35.45", 8080, "ubuntu", "~/key.pem"); - MartDeployer deployer = new MartDeployer(conn); - - deployer.deploy(occiPath); - - assertTrue(TestUtility.equalsRuntime(occiPath, conn)); - - } -} diff --git a/src/test/resources/martserver-plugins/de.ugoe.cs.rwm.mocci.connector.dummy.jar b/src/test/resources/martserver-plugins/de.ugoe.cs.rwm.mocci.connector.dummy.jar index 793d3af5aecf748e6d4f11a219cefd3fdb7b33a1..677d116651a2979d8066624e0464f439447c2349 100644 GIT binary patch delta 6925 zcmaKR1yohf_wS_}Bre_E4bq4p(%o^%3xXH8baN=_5HF#0Nr-eeNUN069g@-^2nY}P z{eQprzQ6U}o3my<bI#g(ubI8(?AbA>+vkm^rHX=z4FX|ef~GzBlJHnj{(`6q>pf_I z?i=#o;l82VcUveQ3h18<MJx{tBkT|GoBJ;y*pUPu&>TtXFV<!vNn$@t=5Vx-3I9q4 z6QtNaMFoLUu|OaZL;?vTAn)P?cX5U~d#GDETiHY1cx_--?(Ql2i@H?$BzKGIPw8Ru zu>nf5xtM+7iM&xx)p8^Z^dhJ~m>PDsxvess)xCBO`WpyjE;lb%F4yEeCyq;n<|v*I zBz9vA*e?g1S-48<9y*JLJSk@oy4Y*>9+lqm4%*5bJ_PPgxPt8gSDpysw=cR~rM}0A zs`dML$vKjlmYBbpOP<I^tksZ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n( zrg_l*9lh>0H?B|rtj~=L-swDIdK3XtmLP-(tF?&=OR2f6gt+<y<6vdQ;E)vj!fI-d zEmQ5HLJn6Si@mH<&_gBGJ?Io*61bWNxP=#4vUIuXQrR{Kg*JPkHiNS`=>63om@z4B zfZ@T8ab%*VwNwZ1ju@Pg|4kw0So1)P1R>ad%=AM>^O&O1g6=}Vl<Zr=)`<VTvUk^B zLBDQ+{J#2s+frnXEceZUMoAOOVxY=ve=Pw|wN#YF_u|`zUTn>z_r{M6lDtl78c<X@ zyHDVs%?SrN4XCh-6-i1h5Q8)Qrl<C?Gso?(L<O`Xgke!dU8DEJQ3dFJj&k3;=co3P z3141k@Xsij=*Z5d6{Qk()g=X{U{-T~nu0Q?DQ!6j^3pwd=s5Zt34@H|U?esIIvXN% ztYvF&PEPB83vB;fJ<!_r5JWmEyVJ4G^DH@$YY7Vv#6yZdfh=z19HKwo9}Ay&Cc7l9 zA@<|L0!I)%6TdA!enp}_jGGJ&T_k!*mN?sblX(LF5(|%KXr8s`u5>^|002wAd(`0! z9R)@Iag{m`lWE|dLr@IOO!*8ov*okG%z)1cGZQ`~kw`v|Auaj5hP30e7wN($)I6Ba zIP=qdS|5T@*38u@Nr(7WLjhaB1e76^w-8l|rv-w)g|u6`EX^;qsi;x#76(-R&t3Mc z>3>1H>MG0M{I|+T?lthwX|se0#3}DCX;QKcW%tVVd*?hQLSh?%0Kk`B``Z2Ce}Z;( iTnzxgM-sv!a0c-gBhjw=h4vPucE|QU0H9H0Z}wjWL22v& diff --git a/src/test/resources/roles/vcsshark/README.md b/src/test/resources/roles/vcsshark/README.md deleted file mode 100644 index 225dd44..0000000 --- a/src/test/resources/roles/vcsshark/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -Requirements ------------- - -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. - -Role Variables --------------- - -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. - -Dependencies ------------- - -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. - -Example Playbook ----------------- - -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: - - - hosts: servers - roles: - - { role: username.rolename, x: 42 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/src/test/resources/roles/vcsshark/defaults/main.yml b/src/test/resources/roles/vcsshark/defaults/main.yml deleted file mode 100644 index 334c046..0000000 --- a/src/test/resources/roles/vcsshark/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for vcsshark diff --git a/src/test/resources/roles/vcsshark/handlers/main.yml b/src/test/resources/roles/vcsshark/handlers/main.yml deleted file mode 100644 index c0feb82..0000000 --- a/src/test/resources/roles/vcsshark/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for vcsshark diff --git a/src/test/resources/roles/vcsshark/meta/main.yml b/src/test/resources/roles/vcsshark/meta/main.yml deleted file mode 100644 index 0a14708..0000000 --- a/src/test/resources/roles/vcsshark/meta/main.yml +++ /dev/null @@ -1,246 +0,0 @@ -galaxy_info: - author: your name - description: - company: your company (optional) - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Some suggested licenses: - # - BSD (default) - # - MIT - # - GPLv2 - # - GPLv3 - # - Apache - # - CC-BY - license: license (GPLv2, CC-BY, etc) - - min_ansible_version: 1.2 - - # Optionally specify the branch Galaxy will use when accessing the GitHub - # repo for this role. During role install, if no tags are available, - # Galaxy will use this branch. During import Galaxy will access files on - # this branch. If travis integration is cofigured, only notification for this - # branch will be accepted. Otherwise, in all cases, the repo's default branch - # (usually master) will be used. - #github_branch: - - # - # Below are all platforms currently available. Just uncomment - # the ones that apply to your role. If you don't see your - # platform on this list, let us know and we'll get it added! - # - #platforms: - #- name: OpenBSD - # versions: - # - all - # - 5.6 - # - 5.7 - # - 5.8 - # - 5.9 - # - 6.0 - # - 6.1 - # - 6.2 - #- name: Fedora - # versions: - # - all - # - 16 - # - 17 - # - 18 - # - 19 - # - 20 - # - 21 - # - 22 - # - 23 - # - 24 - # - 25 - # - 26 - # - 27 - #- name: DellOS - # versions: - # - all - # - 10 - # - 6 - # - 9 - #- name: MacOSX - # versions: - # - all - # - 10.10 - # - 10.11 - # - 10.12 - # - 10.7 - # - 10.8 - # - 10.9 - #- name: Synology - # versions: - # - all - # - any - #- name: Junos - # versions: - # - all - # - any - #- name: Cumulus - # versions: - # - all - # - 2.5 - # - 3.0 - # - 3.1 - # - 3.2 - # - 3.3 - # - 3.4 - # - 3.5 - #- name: GenericBSD - # versions: - # - all - # - any - #- name: Void Linux - # versions: - # - all - # - any - #- name: GenericLinux - # versions: - # - all - # - any - #- name: NXOS - # versions: - # - all - # - any - #- name: macOS - # versions: - # - all - # - Sierra - #- name: IOS - # versions: - # - all - # - any - #- name: Amazon - # versions: - # - all - # - 2013.03 - # - 2013.09 - # - 2016.03 - # - 2016.09 - #- name: ArchLinux - # versions: - # - all - # - any - #- name: FreeBSD - # versions: - # - all - # - 10.0 - # - 10.1 - # - 10.2 - # - 10.3 - # - 10.4 - # - 11.0 - # - 11.1 - # - 8.0 - # - 8.1 - # - 8.2 - # - 8.3 - # - 8.4 - # - 9.0 - # - 9.1 - # - 9.1 - # - 9.2 - # - 9.3 - #- name: Ubuntu - # versions: - # - all - # - artful - # - bionic - # - lucid - # - maverick - # - natty - # - oneiric - # - precise - # - quantal - # - raring - # - saucy - # - trusty - # - utopic - # - vivid - # - wily - # - xenial - # - yakkety - # - zesty - #- name: Debian - # versions: - # - all - # - buster - # - etch - # - jessie - # - lenny - # - sid - # - squeeze - # - stretch - # - wheezy - #- name: Alpine - # versions: - # - all - # - any - #- name: EL - # versions: - # - all - # - 5 - # - 6 - # - 7 - #- name: Windows - # versions: - # - all - # - 2012R2 - #- name: SmartOS - # versions: - # - all - # - any - #- name: opensuse - # versions: - # - all - # - 12.1 - # - 12.2 - # - 12.3 - # - 13.1 - # - 13.2 - #- name: SLES - # versions: - # - all - # - 10SP3 - # - 10SP4 - # - 11 - # - 11SP1 - # - 11SP2 - # - 11SP3 - # - 11SP4 - # - 12 - # - 12SP1 - #- name: GenericUNIX - # versions: - # - all - # - any - #- name: Solaris - # versions: - # - all - # - 10 - # - 11.0 - # - 11.1 - # - 11.2 - # - 11.3 - #- name: eos - # versions: - # - all - # - Any - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is - # a keyword that describes and categorizes the role. - # Users find roles by searching for tags. Be sure to - # remove the '[]' above if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of - # alphanumeric characters. Maximum 20 tags per role. - -dependencies: [] - # List your role dependencies here, one per line. - # Be sure to remove the '[]' above if you add dependencies - # to this list. \ No newline at end of file diff --git a/src/test/resources/roles/vcsshark/tasks/main.yml b/src/test/resources/roles/vcsshark/tasks/main.yml deleted file mode 100644 index 62d7860..0000000 --- a/src/test/resources/roles/vcsshark/tasks/main.yml +++ /dev/null @@ -1,51 +0,0 @@ -- block: - - name: enable ubuntu group - group: name=ubuntu state=present - - name: enable ubuntu user - user: name=ubuntu state=present shell=/bin/bash - - - name: Installing required packages - apt: pkg=python3-pip state=installed force=yes - become_user: root - - - name: Installing required packages - apt: pkg=libgit2-26 state=installed force=yes - become_user: root - - - name: Installing required packages - apt: pkg=libgit2-dev state=installed force=yes - become_user: root - - - name: Installing required packages - apt: pkg=git state=installed - become_user: root - - - name: Creating vcsshark folder - file: path=~/vcsshark state=directory - - - name: Clone vcsSHARK repository - git: - repo: 'https://github.com/smartshark/vcsSHARK.git' - dest: ~/vcsshark - clone: yes - update: no - - - name: Pip install vcsSHARK - shell: pip3 install https://github.com/smartshark/vcsSHARK/zipball/master --process-dependency-links - when: task == "DEPLOY" - remote_user: ubuntu - become_user: ubuntu - -- block: - - name: Configure vcsSHARK - shell: echo "It is advisable to change the location, where the logs are written to. They can be changed in the pyvcsshark/loggerConfiguration.json. There are different file handlers defined. Just change the “filenameâ€-attribute to a location of your wish." - when: task == "CONFIGURE" - remote_user: ubuntu - become_user: "ubuntu" - -- block: - - name: Test vcsSHARK - shell: echo "python3.6 ~/vcsshark/setup.py test" - when: task == "START" - remote_user: ubuntu - become_user: "ubuntu" diff --git a/src/test/resources/roles/vcsshark/tasks/main16.yml b/src/test/resources/roles/vcsshark/tasks/main16.yml deleted file mode 100644 index e986aa5..0000000 --- a/src/test/resources/roles/vcsshark/tasks/main16.yml +++ /dev/null @@ -1,93 +0,0 @@ -- block: - - name: enable ubuntu group - group: name=ubuntu state=present - - name: enable ubuntu user - user: name=ubuntu state=present shell=/bin/bash - - - name: Set LC_ALL - become_user: root - lineinfile: - dest: /etc/environment - state: present - regexp: '^LC_ALL' - line: 'LC_ALL=en_US.UTF-8' - - - name: Set LANG - become_user: root - lineinfile: - dest: /etc/environment - state: present - regexp: '^LANG' - line: 'LANG=en_US.UTF-8' - - - name: Installing required packages - apt: pkg=python3-pip state=installed force=yes - become_user: root - - - name: Installing required packages - apt: pkg=python-pip state=installed force=yes - become_user: root - - - name: Installing required packages - apt: pkg=python3-cffi state=installed force=yes - become_user: root - - - name: Installing CMake - apt: pkg=cmake state=installed force=yes - become_user: root - - - name: Downloading libgit - get_url: - url: https://github.com/libgit2/libgit2/archive/v0.26.3.tar.gz - dest: ~/ - - - name: Unarchive package - shell: tar xzf ~/libgit2-0.26.3.tar.gz - - - name: Cmake - shell: - cmd: cmake . - chdir: ./libgit2-0.26.3 - - - name: Make - shell: - cmd: make - chdir: ./libgit2-0.26.3 - - - name: Pip install - become_user: root - shell: pip install pygit2 - - - name: Installing required packages - apt: pkg=git state=installed - become_user: root - - - name: Creating vcsshark folder - file: path=~/vcsshark state=directory - - - name: Clone vcsSHARK repository - git: - repo: 'https://github.com/smartshark/vcsSHARK.git' - dest: ~/vcsshark - clone: yes - update: no - - - name: Pip install vcsSHARK - shell: pip3 install https://github.com/smartshark/vcsSHARK/zipball/master --process-dependency-links - when: task == "DEPLOY" - remote_user: ubuntu - become_user: ubuntu - -- block: - - name: Configure vcsSHARK - shell: echo "It is advisable to change the location, where the logs are written to. They can be changed in the pyvcsshark/loggerConfiguration.json. There are different file handlers defined. Just change the “filenameâ€-attribute to a location of your wish." - when: task == "CONFIGURE" - remote_user: ubuntu - become_user: "ubuntu" - -- block: - - name: Test vcsSHARK - shell: echo "python3.6 ~/vcsshark/setup.py test" - when: task == "START" - remote_user: ubuntu - become_user: "ubuntu" diff --git a/src/test/resources/roles/vcsshark/tasks/main18.yml b/src/test/resources/roles/vcsshark/tasks/main18.yml deleted file mode 100644 index 862916e..0000000 --- a/src/test/resources/roles/vcsshark/tasks/main18.yml +++ /dev/null @@ -1,55 +0,0 @@ -- block: - - name: enable ubuntu group - group: name=ubuntu state=present - - name: enable ubuntu user - user: name=ubuntu state=present shell=/bin/bash - - - name: Installing required packages - apt: pkg=python3-pip state=installed force=yes - become_user: root - - - name: Installing required packages - apt: pkg=python3-cffi state=installed force=yes - become_user: root - - - name: Installing required packages - apt: pkg=libgit2-26 state=installed force=yes - become_user: root - - - name: Installing required packages - apt: pkg=libgit2-dev state=installed force=yes - become_user: root - - - name: Installing required packages - apt: pkg=git state=installed - become_user: root - - - name: Creating vcsshark folder - file: path=~/vcsshark state=directory - - - name: Clone vcsSHARK repository - git: - repo: 'https://github.com/smartshark/vcsSHARK.git' - dest: ~/vcsshark - clone: yes - update: no - - - name: Pip install vcsSHARK - shell: pip3 install https://github.com/smartshark/vcsSHARK/zipball/master --process-dependency-links - when: task == "DEPLOY" - remote_user: ubuntu - become_user: ubuntu - -- block: - - name: Configure vcsSHARK - shell: echo "It is advisable to change the location, where the logs are written to. They can be changed in the pyvcsshark/loggerConfiguration.json. There are different file handlers defined. Just change the “filenameâ€-attribute to a location of your wish." - when: task == "CONFIGURE" - remote_user: ubuntu - become_user: "ubuntu" - -- block: - - name: Test vcsSHARK - shell: echo "python3.6 ~/vcsshark/setup.py test" - when: task == "START" - remote_user: ubuntu - become_user: "ubuntu" diff --git a/src/test/resources/roles/vcsshark/tests/inventory b/src/test/resources/roles/vcsshark/tests/inventory deleted file mode 100644 index d18580b..0000000 --- a/src/test/resources/roles/vcsshark/tests/inventory +++ /dev/null @@ -1 +0,0 @@ -localhost \ No newline at end of file diff --git a/src/test/resources/roles/vcsshark/tests/test.yml b/src/test/resources/roles/vcsshark/tests/test.yml deleted file mode 100644 index 1cada87..0000000 --- a/src/test/resources/roles/vcsshark/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - vcsshark diff --git a/src/test/resources/roles/vcsshark/vars/main.yml b/src/test/resources/roles/vcsshark/vars/main.yml deleted file mode 100644 index a62ad05..0000000 --- a/src/test/resources/roles/vcsshark/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for vcsshark diff --git a/src/test/resources/roles/vcssharkjob/README.md b/src/test/resources/roles/vcssharkjob/README.md deleted file mode 100644 index 225dd44..0000000 --- a/src/test/resources/roles/vcssharkjob/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -Requirements ------------- - -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. - -Role Variables --------------- - -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. - -Dependencies ------------- - -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. - -Example Playbook ----------------- - -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: - - - hosts: servers - roles: - - { role: username.rolename, x: 42 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/src/test/resources/roles/vcssharkjob/defaults/main.yml b/src/test/resources/roles/vcssharkjob/defaults/main.yml deleted file mode 100644 index 334c046..0000000 --- a/src/test/resources/roles/vcssharkjob/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for vcsshark diff --git a/src/test/resources/roles/vcssharkjob/handlers/main.yml b/src/test/resources/roles/vcssharkjob/handlers/main.yml deleted file mode 100644 index c0feb82..0000000 --- a/src/test/resources/roles/vcssharkjob/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for vcsshark diff --git a/src/test/resources/roles/vcssharkjob/meta/main.yml b/src/test/resources/roles/vcssharkjob/meta/main.yml deleted file mode 100644 index 0a14708..0000000 --- a/src/test/resources/roles/vcssharkjob/meta/main.yml +++ /dev/null @@ -1,246 +0,0 @@ -galaxy_info: - author: your name - description: - company: your company (optional) - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Some suggested licenses: - # - BSD (default) - # - MIT - # - GPLv2 - # - GPLv3 - # - Apache - # - CC-BY - license: license (GPLv2, CC-BY, etc) - - min_ansible_version: 1.2 - - # Optionally specify the branch Galaxy will use when accessing the GitHub - # repo for this role. During role install, if no tags are available, - # Galaxy will use this branch. During import Galaxy will access files on - # this branch. If travis integration is cofigured, only notification for this - # branch will be accepted. Otherwise, in all cases, the repo's default branch - # (usually master) will be used. - #github_branch: - - # - # Below are all platforms currently available. Just uncomment - # the ones that apply to your role. If you don't see your - # platform on this list, let us know and we'll get it added! - # - #platforms: - #- name: OpenBSD - # versions: - # - all - # - 5.6 - # - 5.7 - # - 5.8 - # - 5.9 - # - 6.0 - # - 6.1 - # - 6.2 - #- name: Fedora - # versions: - # - all - # - 16 - # - 17 - # - 18 - # - 19 - # - 20 - # - 21 - # - 22 - # - 23 - # - 24 - # - 25 - # - 26 - # - 27 - #- name: DellOS - # versions: - # - all - # - 10 - # - 6 - # - 9 - #- name: MacOSX - # versions: - # - all - # - 10.10 - # - 10.11 - # - 10.12 - # - 10.7 - # - 10.8 - # - 10.9 - #- name: Synology - # versions: - # - all - # - any - #- name: Junos - # versions: - # - all - # - any - #- name: Cumulus - # versions: - # - all - # - 2.5 - # - 3.0 - # - 3.1 - # - 3.2 - # - 3.3 - # - 3.4 - # - 3.5 - #- name: GenericBSD - # versions: - # - all - # - any - #- name: Void Linux - # versions: - # - all - # - any - #- name: GenericLinux - # versions: - # - all - # - any - #- name: NXOS - # versions: - # - all - # - any - #- name: macOS - # versions: - # - all - # - Sierra - #- name: IOS - # versions: - # - all - # - any - #- name: Amazon - # versions: - # - all - # - 2013.03 - # - 2013.09 - # - 2016.03 - # - 2016.09 - #- name: ArchLinux - # versions: - # - all - # - any - #- name: FreeBSD - # versions: - # - all - # - 10.0 - # - 10.1 - # - 10.2 - # - 10.3 - # - 10.4 - # - 11.0 - # - 11.1 - # - 8.0 - # - 8.1 - # - 8.2 - # - 8.3 - # - 8.4 - # - 9.0 - # - 9.1 - # - 9.1 - # - 9.2 - # - 9.3 - #- name: Ubuntu - # versions: - # - all - # - artful - # - bionic - # - lucid - # - maverick - # - natty - # - oneiric - # - precise - # - quantal - # - raring - # - saucy - # - trusty - # - utopic - # - vivid - # - wily - # - xenial - # - yakkety - # - zesty - #- name: Debian - # versions: - # - all - # - buster - # - etch - # - jessie - # - lenny - # - sid - # - squeeze - # - stretch - # - wheezy - #- name: Alpine - # versions: - # - all - # - any - #- name: EL - # versions: - # - all - # - 5 - # - 6 - # - 7 - #- name: Windows - # versions: - # - all - # - 2012R2 - #- name: SmartOS - # versions: - # - all - # - any - #- name: opensuse - # versions: - # - all - # - 12.1 - # - 12.2 - # - 12.3 - # - 13.1 - # - 13.2 - #- name: SLES - # versions: - # - all - # - 10SP3 - # - 10SP4 - # - 11 - # - 11SP1 - # - 11SP2 - # - 11SP3 - # - 11SP4 - # - 12 - # - 12SP1 - #- name: GenericUNIX - # versions: - # - all - # - any - #- name: Solaris - # versions: - # - all - # - 10 - # - 11.0 - # - 11.1 - # - 11.2 - # - 11.3 - #- name: eos - # versions: - # - all - # - Any - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is - # a keyword that describes and categorizes the role. - # Users find roles by searching for tags. Be sure to - # remove the '[]' above if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of - # alphanumeric characters. Maximum 20 tags per role. - -dependencies: [] - # List your role dependencies here, one per line. - # Be sure to remove the '[]' above if you add dependencies - # to this list. \ No newline at end of file diff --git a/src/test/resources/roles/vcssharkjob/tasks/main.yml b/src/test/resources/roles/vcssharkjob/tasks/main.yml deleted file mode 100644 index 7f60d38..0000000 --- a/src/test/resources/roles/vcssharkjob/tasks/main.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# tasks file for vcsshark -- block: - - name: enable ubuntu group - group: name=ubuntu state=present - - - name: enable ubuntu user - user: name=ubuntu state=present shell=/bin/bash - - - name: Installing required packages - apt: pkg=python3-pip state=installed force=yes - become_user: root - - - name: Installing required packages - shell: pip3 install https://github.com/smartshark/pycoSHARK/zipball/master - when: task == "DEPLOY" - remote_user: ubuntu - become_user: ubuntu - -- block: - - name: Executing help as check - shell: echo "python3.6 ~/vcsshark/vcsshark.py --help" - - - name: Checking out project {{ projectrepo }} - git: - repo: "{{ projectrepo }}" - dest: "{{ projectname }}" - clone: yes - update: no - - - name: Add project to mongo db - shell: mongo --eval "db = db.getSiblingDB('{{ mongodb }}'); db.project.insert({'name'{{ ":" }} '{{ projectname }}'});" - when: task == "CONFIGURE" - remote_user: ubuntu - become_user: ubuntu - -- block: - - name: Start vcsSHARK - shell: python3.6 ~/vcsshark/vcsshark.py -D mongo -DB {{ mongodb }} -H {{ mongolocation }} -p 27017 -n {{ projectname }} --path ~/{{ projectname }} - when: task == "START" - become_user: "ubuntu" - remote_user: ubuntu diff --git a/src/test/resources/roles/vcssharkjob/tests/inventory b/src/test/resources/roles/vcssharkjob/tests/inventory deleted file mode 100644 index d18580b..0000000 --- a/src/test/resources/roles/vcssharkjob/tests/inventory +++ /dev/null @@ -1 +0,0 @@ -localhost \ No newline at end of file diff --git a/src/test/resources/roles/vcssharkjob/tests/test.yml b/src/test/resources/roles/vcssharkjob/tests/test.yml deleted file mode 100644 index 1cada87..0000000 --- a/src/test/resources/roles/vcssharkjob/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - vcsshark diff --git a/src/test/resources/roles/vcssharkjob/vars/main.yml b/src/test/resources/roles/vcssharkjob/vars/main.yml deleted file mode 100644 index b38d3b4..0000000 --- a/src/test/resources/roles/vcssharkjob/vars/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -# vars file for vcsshark -projectrepo: https://github.com/openintents/safe.git -#https://github.com/checkstyle/checkstyle.git -projectname: safe -#checkstyle -mongodb: vcsshark -mongolocation: localhost -- GitLab