Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • lennart.thiesen/de.ugoe.cs.rwm.mocci
  • rwm/de.ugoe.cs.rwm.mocci
2 results
Select Git revision
Show changes
Showing
with 1837 additions and 157 deletions
/**
* Copyright (c) 2018-2019 University of Goettingen
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* - Johannes Erbel <johannes.erbel@cs.uni-goettingen.de>
*/
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.crtp.CrtpPackage;
import org.eclipse.cmf.occi.docker.DockerPackage;
import org.eclipse.cmf.occi.infrastructure.InfrastructurePackage;
import org.eclipse.emf.ecore.resource.Resource;
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;
import de.ugoe.cs.rwm.docci.connector.Connector;
import de.ugoe.cs.rwm.docci.deprovisioner.Deprovisioner;
import de.ugoe.cs.rwm.docci.executor.Executor;
import de.ugoe.cs.rwm.docci.provisioner.Provisioner;
import de.ugoe.cs.rwm.docci.retriever.ModelRetriever;
import de.ugoe.cs.rwm.domain.workload.WorkloadPackage;
import de.ugoe.cs.rwm.tocci.Transformator;
import modmacao.ModmacaoPackage;
import monitoring.MonitoringPackage;
import openstackruntime.OpenstackruntimePackage;
import ossweruntime.OssweruntimePackage;
public class RegistryAndLoggerSetup {
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 = "I2Nsb3VkLWNvbmZpZwpydW5jbWQ6CiAgLSBbIHN5c3RlbWN0bCwgc3RvcCwgYXB0LWRhaWx5LnNlcnZpY2UgXQogIC0gWyBzeXN0ZW1jdGwsIGtpbGwsIC0ta2lsbC13aG89YWxsLCBhcHQtZGFpbHkuc2VydmljZSBd";
public static void setup() {
loggerSetup();
registrySetup();
}
private static void loggerSetup() {
Logger.getLogger(Transformator.class.getName()).setLevel(Level.OFF);
Logger.getLogger(Connector.class.getName()).setLevel(Level.OFF);
Logger.getLogger(ModelRetriever.class.getName()).setLevel(Level.OFF);
Logger.getLogger(Comparator.class.getName()).setLevel(Level.OFF);
Logger.getLogger(Provisioner.class.getName()).setLevel(Level.OFF);
Logger.getLogger(Deployer.class.getName()).setLevel(Level.INFO);
Logger.getLogger(Deprovisioner.class.getName()).setLevel(Level.OFF);
Logger.getLogger(Executor.class.getName()).setLevel(Level.INFO);
Logger.getLogger(MartAppDeployerSlave.class.getName()).setLevel(Level.INFO);
}
private static void registrySetup() {
InfrastructurePackage.eINSTANCE.eClass();
OCCIPackage.eINSTANCE.eClass();
ModmacaoPackage.eINSTANCE.eClass();
OpenstackruntimePackage.eINSTANCE.eClass();
PlacementPackage.eINSTANCE.eClass();
OssweruntimePackage.eINSTANCE.eClass();
AnsibleconfigurationPackage.eINSTANCE.eClass();
MonitoringPackage.eINSTANCE.eClass();
PlatformPackage.eINSTANCE.eClass();
CrtpPackage.eINSTANCE.eClass();
WorkloadPackage.eINSTANCE.eClass();
DockerPackage.eINSTANCE.eClass();
OcciRegistry.getInstance().registerExtension("http://schemas.ugoe.cs.rwm/domain/workload#",
OCCIPackage.class.getClassLoader().getResource("model/workload.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/occi/platform#",
OCCIPackage.class.getClassLoader().getResource("model/platform.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/modmacao#",
OCCIPackage.class.getClassLoader().getResource("model/modmacao.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/openstack/runtime#",
OCCIPackage.class.getClassLoader().getResource("model/openstackruntime.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/openstack/swe#",
OCCIPackage.class.getClassLoader().getResource("model/openstackruntime.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/placement#",
PlacementPackage.class.getClassLoader().getResource("model/placement.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.ogf.org/occi/infrastructure#",
OCCIPackage.class.getClassLoader().getResource("model/Infrastructure.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.ogf.org/occi/core#",
OCCIPackage.class.getClassLoader().getResource("model/Core.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/openstack/swe#",
OCCIPackage.class.getClassLoader().getResource("model/ossweruntime.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/occi/ansible#",
OCCIPackage.class.getClassLoader().getResource("model/ansibleconfiguration.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.ugoe.cs.rwm/monitoring#",
OCCIPackage.class.getClassLoader().getResource("model/monitoring.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.ogf.org/occi/infrastructure/compute/template/1.1#",
OCCIPackage.class.getClassLoader().getResource("model/crtp.occie").toString());
OcciRegistry.getInstance().registerExtension("http://occiware.org/occi/docker#",
OCCIPackage.class.getClassLoader().getResource("model/docker.occie").toString());
for (String ext : OcciRegistry.getInstance().getRegisteredExtensions()) {
System.out.println(ext);
}
System.out.println(OcciRegistry.getInstance().getFileURI("http://schemas.ugoe.cs.rwm/domain/workload#"));
System.out.println(OcciRegistry.getInstance().getFileURI("http://schemas.modmacao.org/placement#"));
Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;
reg.INSTANCE.getExtensionToFactoryMap().put("*", new OCCIResourceFactoryImpl());
}
}
/**
* Copyright (c) 2018-2019 University of Goettingen
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* - Johannes Erbel <johannes.erbel@cs.uni-goettingen.de>
*/
package de.ugoe.cs.rwm.mocci;
import java.nio.file.Path;
import org.eclipse.cmf.occi.core.AttributeState;
import org.eclipse.cmf.occi.core.Configuration;
import org.eclipse.cmf.occi.core.Mixin;
import org.eclipse.cmf.occi.core.MixinBase;
import org.eclipse.cmf.occi.infrastructure.Compute;
import org.eclipse.cmf.occi.infrastructure.ComputeStatus;
import org.eclipse.cmf.occi.infrastructure.Ipnetworkinterface;
import org.eclipse.cmf.occi.infrastructure.Networkinterface;
import org.eclipse.emf.ecore.resource.Resource;
import org.modmacao.occi.platform.Component;
import org.modmacao.occi.platform.Componentlink;
import org.modmacao.placement.Placementlink;
import de.ugoe.cs.rwm.docci.ModelUtility;
import de.ugoe.cs.rwm.docci.connector.Connector;
import monitoring.*;
import ossweruntime.Ubuntu_xenialxerus;
public class UpScaler extends AbsScaler {
public UpScaler(Connector conn, Path runtimePath) {
this.conn = conn;
this.runtimePath = runtimePath;
}
@SuppressWarnings("unused")
public Resource upScaleNodes() {
runtimeModel = ModelUtility.loadOCCIintoEMFResource(conn.loadRuntimeModel(runtimePath));
Configuration config = ((Configuration) runtimeModel.getContents().get(0));
Compute monVM = (Compute) getResourceById(config.getResources(),
"urn:uuid:37829092-c690-494a-98fa-335b2fd660ea");
Compute comp = addCompute(config);
Component worker = addWorkerComponent(config, comp);
Sensor sens = addSensor(config, comp);
Datagatherer dg = addDataGatherer(config, comp, sens);
Dataprocessor dp = addDataProcessor(config, comp, sens, dg);
Resultprovider rp = addResultProvider(config, comp, sens, dp);
return runtimeModel;
}
private Compute addCompute(Configuration config) {
System.out.println(" Adding Compute Node to Model");
Compute comp = iFactory.createCompute();
comp.setOcciComputeState(ComputeStatus.ACTIVE);
// comp.setKind(DockerFactory.eINSTANCE.createContainer().getKind());
AttributeState state = factory.createAttributeState();
state.setName("occi.compute.state");
state.setValue("active");
comp.getAttributes().add(state);
config.getResources().add(comp);
Ubuntu_xenialxerus mixOs = osFactory.createUbuntu_xenialxerus();
comp.getParts().add(mixOs);
Networkinterface nwi = iFactory.createNetworkinterface();
nwi.setTarget(getResourceById(config.getResources(), "urn:uuid:29d78078-fb4c-47aa-a9af-b8aaf3339591"));
nwi.setSource(comp);
Ipnetworkinterface mixB = iFactory.createIpnetworkinterface();
String ip = interfaces.get(0);
mixB.setOcciNetworkinterfaceAddress(ip);
nwi.getParts().add(mixB);
AttributeState ipAttr = factory.createAttributeState();
ipAttr.setName("occi.networkinterface.address");
ipAttr.setValue(ip);
nwi.getAttributes().add(ipAttr);
String ipadjusted = ip.replace(".", "-");
comp.setTitle("hadoop-worker-additional-" + ipadjusted);
AttributeState hostname = factory.createAttributeState();
hostname.setName("occi.compute.hostname");
hostname.setValue("hadoop-worker-additional-" + ipadjusted);
comp.getAttributes().add(hostname);
System.out.println(" Ip in Hadoop Network: " + interfaces.get(0));
interfaces.remove(0);
Networkinterface nwimon = iFactory.createNetworkinterface();
nwimon.setTarget(getResourceById(config.getResources(), "urn:uuid:7a9fca2c-24fb-473c-aa9c-8dc9e68a432a"));
nwimon.setSource(comp);
return comp;
}
private Component addWorkerComponent(Configuration config, Compute comp) {
System.out.println(" Adding Worker Component to Model");
Component worker = pFactory.createComponent();
worker.setTitle("worker-component");
// worker.setOcciComponentState(Status.ACTIVE);
config.getResources().add(worker);
AttributeState attr = factory.createAttributeState();
attr.setName("occi.core.id");
attr.setValue(worker.getId());
worker.getAttributes().add(attr);
MixinBase mBase = factory.createMixinBase();
mBase.setMixin(getMixin("hworker", config));
worker.getParts().add(mBase);
Placementlink pLink = placeFactory.createPlacementlink();
pLink.setSource(worker);
pLink.setTarget(comp);
Componentlink compLink = pFactory.createComponentlink();
compLink.setSource(getResourceById(config.getResources(), "urn:uuid:a4888ba9-a0ea-48f2-a29e-901c876ab42d"));
compLink.setTarget(worker);
MAPE.newComp = worker;
return worker;
}
private Sensor addSensor(Configuration config, Compute comp) {
System.out.println(" Adding Sensor to Model");
Sensor sens = mFactory.createSensor();
sens.setTitle("CPUSensor");
config.getResources().add(sens);
AttributeState attr = factory.createAttributeState();
attr.setName("occi.core.id");
attr.setValue(sens.getId());
sens.getAttributes().add(attr);
Monitorableproperty mp = mFactory.createMonitorableproperty();
mp.setTitle("monProp");
mp.setMonitoringProperty("CPU");
AttributeState attrProp = factory.createAttributeState();
attrProp.setName("monitoring.property");
attrProp.setValue("CPU");
mp.getAttributes().add(attrProp);
mp.setSource(sens);
mp.setTarget(comp);
return sens;
}
private Datagatherer addDataGatherer(Configuration config, Compute comp, Sensor sens) {
System.out.println(" Adding Datagatherer to Model");
Datagatherer dg = mFactory.createDatagatherer();
dg.setTitle("CPUGatherer");
config.getResources().add(dg);
AttributeState attr = factory.createAttributeState();
attr.setName("occi.core.id");
attr.setValue(dg.getId());
dg.getAttributes().add(attr);
MixinBase mBase = factory.createMixinBase();
mBase.setMixin(getMixin("cpugatherer", config));
dg.getParts().add(mBase);
Componentlink c1 = pFactory.createComponentlink();
c1.setSource(sens);
c1.setTarget(dg);
Placementlink pl = placeFactory.createPlacementlink();
pl.setSource(dg);
pl.setTarget(comp);
return dg;
}
private Dataprocessor addDataProcessor(Configuration config, Compute comp, Sensor sens, Datagatherer dg) {
System.out.println(" Adding Dataprocessor to Model");
Dataprocessor dp = mFactory.createDataprocessor();
dp.setTitle("CPUProcessor");
config.getResources().add(dp);
AttributeState attr = factory.createAttributeState();
attr.setName("occi.core.id");
attr.setValue(dp.getId());
dp.getAttributes().add(attr);
MixinBase mBase = factory.createMixinBase();
mBase.setMixin(getMixin("cpuprocessorlocal", config));
dp.getParts().add(mBase);
Componentlink c2 = pFactory.createComponentlink();
c2.setSource(sens);
c2.setTarget(dp);
Placementlink pl = placeFactory.createPlacementlink();
pl.setSource(dp);
pl.setTarget(comp);
Componentlink cl = pFactory.createComponentlink();
cl.setSource(dp);
cl.setTarget(dg);
return dp;
}
private Resultprovider addResultProvider(Configuration config, Compute comp, Sensor sens, Dataprocessor dp) {
System.out.println(" Adding Resultprovider to Model");
Resultprovider rp = mFactory.createResultprovider();
rp.setTitle("CPUProvider");
config.getResources().add(rp);
Occiresultprovider orp = mFactory.createOcciresultprovider();
orp.setResultProviderEndpoint("192.168.35.45:8080");
AttributeState attrOP = factory.createAttributeState();
attrOP.setName("result.provider.endpoint");
attrOP.setValue("192.168.35.45:8080");
rp.getAttributes().add(attrOP);
rp.getParts().add(orp);
MixinBase mBase = factory.createMixinBase();
mBase.setMixin(getMixin("cpupublisher", config));
rp.getParts().add(mBase);
AttributeState attr = factory.createAttributeState();
attr.setName("occi.core.id");
attr.setValue(rp.getId());
rp.getAttributes().add(attr);
Componentlink c3 = pFactory.createComponentlink();
c3.setSource(sens);
c3.setTarget(rp);
Placementlink pl = placeFactory.createPlacementlink();
pl.setSource(rp);
pl.setTarget(comp);
Componentlink cl = pFactory.createComponentlink();
cl.setSource(rp);
cl.setTarget(dp);
return rp;
}
private Mixin getMixin(String string, Configuration config) {
for (Mixin mix : config.getMixins()) {
if (mix.getTerm().equals(string)) {
return mix;
}
}
return null;
}
}
/**
* Copyright (c) 2018-2019 University of Goettingen
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* - Johannes Erbel <johannes.erbel@cs.uni-goettingen.de>
*/
package de.ugoe.cs.rwm.mocci;
import de.ugoe.cs.rwm.docci.ModelUtility;
import de.ugoe.cs.rwm.docci.connector.Connector;
import de.ugoe.cs.rwm.domain.workload.Componentsim;
import de.ugoe.cs.rwm.domain.workload.Computesim;
import de.ugoe.cs.rwm.domain.workload.Sensorsim;
import de.ugoe.cs.rwm.domain.workload.WorkloadFactory;
import monitoring.*;
import org.eclipse.cmf.occi.core.AttributeState;
import org.eclipse.cmf.occi.core.Configuration;
import org.eclipse.cmf.occi.core.Mixin;
import org.eclipse.cmf.occi.core.MixinBase;
import org.eclipse.cmf.occi.docker.Container;
import org.eclipse.cmf.occi.docker.DockerFactory;
import org.eclipse.cmf.occi.infrastructure.Compute;
import org.eclipse.cmf.occi.infrastructure.ComputeStatus;
import org.eclipse.emf.ecore.resource.Resource;
import org.modmacao.occi.platform.Application;
import org.modmacao.occi.platform.Component;
import org.modmacao.occi.platform.Componentlink;
import org.modmacao.placement.Placementlink;
import java.nio.file.Path;
public class UpScalerSim extends AbsScaler {
public UpScalerSim(Connector conn, Path runtimePath) {
this.conn = conn;
this.runtimePath = runtimePath;
}
@SuppressWarnings("unused")
public Resource upScaleNodes() {
runtimeModel = ModelUtility.loadOCCIintoEMFResource(conn.loadRuntimeModel(runtimePath));
Configuration config = ((Configuration) runtimeModel.getContents().get(0));
Compute comp = addCompute(config);
Component worker = addWorkerComponent(config, comp);
Sensor sens = addSensor(config, comp);
Resultprovider rp = addResultProvider(config, comp, sens);
config.getResources().add(comp);
config.getResources().add(worker);
config.getResources().add(sens);
config.getResources().add(rp);
return runtimeModel;
}
private Compute addCompute(Configuration config) {
System.out.println(" Adding Compute Node to Model");
Compute comp = iFactory.createCompute();
comp.setOcciComputeState(ComputeStatus.ACTIVE);
Container cont = DockerFactory.eINSTANCE.createContainer();
comp.setKind(cont.getKind());
AttributeState state = factory.createAttributeState();
state.setName("occi.compute.state");
state.setValue("active");
comp.getAttributes().add(state);
config.getResources().add(comp);
comp.setTitle("Hadoop-worker-additional");
AttributeState hostname = factory.createAttributeState();
hostname.setName("occi.compute.hostname");
hostname.setValue("Hadoop-worker-additional");
comp.getAttributes().add(hostname);
Computesim sim = WorkloadFactory.eINSTANCE.createComputesim();
comp.getParts().add(sim);
return comp;
}
private Component addWorkerComponent(Configuration config, Compute comp) {
System.out.println(" Adding Worker Component to Model");
Component worker = pFactory.createComponent();
worker.setTitle("hWorker");
// worker.setOcciComponentState(Status.ACTIVE);
config.getResources().add(worker);
AttributeState attr = factory.createAttributeState();
attr.setName("occi.core.id");
attr.setValue(worker.getId());
worker.getAttributes().add(attr);
MixinBase mBase = factory.createMixinBase();
mBase.setMixin(getMixin("hadoop-worker", config));
worker.getParts().add(mBase);
Placementlink pLink = placeFactory.createPlacementlink();
pLink.setSource(worker);
pLink.setTarget(comp);
Componentlink compLink = pFactory.createComponentlink();
compLink.setSource(getResourceById(config.getResources(), getApplicationId(config)));
compLink.setTarget(worker);
Componentsim sim = WorkloadFactory.eINSTANCE.createComponentsim();
worker.getParts().add(sim);
MAPE.newComp = worker;
return worker;
}
private String getApplicationId(Configuration config) {
for (org.eclipse.cmf.occi.core.Resource res : config.getResources()) {
if (res instanceof Application) {
if (res.getTitle().toLowerCase().contains("hadoop")) {
return res.getId();
}
}
}
return "";
}
private Sensor addSensor(Configuration config, Compute comp) {
System.out.println(" Adding Sensor to Model");
Sensor sens = mFactory.createSensor();
sens.setTitle("sensor");
AttributeState attrName = factory.createAttributeState();
attrName.setName("occi.app.name");
attrName.setValue("sensor");
sens.getAttributes().add(attrName);
AttributeState attrContext = factory.createAttributeState();
attrContext.setName("occi.app.context");
attrContext.setValue("http://www.de");
sens.getAttributes().add(attrContext);
AttributeState attrUrl = factory.createAttributeState();
attrUrl.setName("occi.app.url");
attrUrl.setValue("http://www.de");
sens.getAttributes().add(attrUrl);
AttributeState attr = factory.createAttributeState();
attr.setName("occi.core.id");
attr.setValue(sens.getId());
sens.getAttributes().add(attr);
Monitorableproperty mp = mFactory.createMonitorableproperty();
mp.setTitle("monProp");
mp.setMonitoringProperty("CPU");
AttributeState attrProp = factory.createAttributeState();
attrProp.setName("monitoring.property");
attrProp.setValue("CPU");
mp.getAttributes().add(attrProp);
mp.setSource(sens);
mp.setTarget(comp);
Sensorsim sim = WorkloadFactory.eINSTANCE.createSensorsim();
String simString = "None, None, High, Critical";
sim.setSimChangeRate(3000);
sim.setSimMonitoringResults(simString);
AttributeState attrRes = factory.createAttributeState();
attrRes.setName("sim.monitoring.results");
attrRes.setValue(simString);
sim.getAttributes().add(attrRes);
sens.getParts().add(sim);
config.getResources().add(sens);
return sens;
}
private Datagatherer addDataGatherer(Configuration config, Compute comp, Sensor sens) {
System.out.println(" Adding Datagatherer to Model");
Datagatherer dg = mFactory.createDatagatherer();
dg.setTitle("CPUGatherer");
config.getResources().add(dg);
AttributeState attr = factory.createAttributeState();
attr.setName("occi.core.id");
attr.setValue(dg.getId());
dg.getAttributes().add(attr);
MixinBase mBase = factory.createMixinBase();
mBase.setMixin(getMixin("cpugatherer", config));
dg.getParts().add(mBase);
Componentlink c1 = pFactory.createComponentlink();
c1.setSource(sens);
c1.setTarget(dg);
Placementlink pl = placeFactory.createPlacementlink();
pl.setSource(dg);
pl.setTarget(comp);
return dg;
}
private Dataprocessor addDataProcessor(Configuration config, Compute comp, Sensor sens, Datagatherer dg) {
System.out.println(" Adding Dataprocessor to Model");
Dataprocessor dp = mFactory.createDataprocessor();
dp.setTitle("CPUProcessor");
config.getResources().add(dp);
AttributeState attr = factory.createAttributeState();
attr.setName("occi.core.id");
attr.setValue(dp.getId());
dp.getAttributes().add(attr);
MixinBase mBase = factory.createMixinBase();
mBase.setMixin(getMixin("cpuprocessorlocal", config));
dp.getParts().add(mBase);
Componentlink c2 = pFactory.createComponentlink();
c2.setSource(sens);
c2.setTarget(dp);
Placementlink pl = placeFactory.createPlacementlink();
pl.setSource(dp);
pl.setTarget(comp);
Componentlink cl = pFactory.createComponentlink();
cl.setSource(dp);
cl.setTarget(dg);
return dp;
}
private Resultprovider addResultProvider(Configuration config, Compute comp, Sensor sens) {
System.out.println(" Adding Resultprovider to Model");
Resultprovider rp = mFactory.createResultprovider();
// rp.setTitle("CPUProvider");
config.getResources().add(rp);
Occiresultprovider orp = mFactory.createOcciresultprovider();
orp.setResultProviderEndpoint("localhost:8080");
AttributeState attrOP = factory.createAttributeState();
attrOP.setName("result.provider.endpoint");
attrOP.setValue("localhost:8080");
rp.getAttributes().add(attrOP);
rp.getParts().add(orp);
MixinBase mBase = factory.createMixinBase();
mBase.setMixin(getMixin("cpupublisher", config));
rp.getParts().add(mBase);
AttributeState attr = factory.createAttributeState();
attr.setName("occi.core.id");
attr.setValue(rp.getId());
rp.getAttributes().add(attr);
Componentlink c3 = pFactory.createComponentlink();
c3.setSource(sens);
c3.setTarget(rp);
Placementlink pl = placeFactory.createPlacementlink();
pl.setSource(rp);
pl.setTarget(comp);
Componentsim sim = WorkloadFactory.eINSTANCE.createComponentsim();
rp.getParts().add(sim);
return rp;
}
private Mixin getMixin(String string, Configuration config) {
for (Mixin mix : config.getMixins()) {
if (mix.getTerm().equals(string)) {
return mix;
}
}
return null;
}
}
/**
* Copyright (c) 2018-2019 University of Goettingen
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
* <p>
* Contributors:
* - Johannes Erbel <johannes.erbel@cs.uni-goettingen.de>
*/
package de.ugoe.cs.rwm.mocci;
import java.nio.file.Path;
import org.eclipse.cmf.occi.core.*;
import org.eclipse.cmf.occi.infrastructure.Compute;
import org.eclipse.cmf.occi.infrastructure.ComputeStatus;
import org.eclipse.emf.ecore.resource.Resource;
import org.modmacao.occi.platform.Application;
import org.modmacao.occi.platform.Component;
import org.modmacao.occi.platform.Componentlink;
import org.modmacao.placement.Placementlink;
import de.ugoe.cs.rwm.docci.ModelUtility;
import de.ugoe.cs.rwm.docci.connector.Connector;
import monitoring.*;
public class UpScalerSpark extends AbsScaler {
private String index;
public UpScalerSpark(Connector conn, Path runtimePath) {
this.conn = conn;
this.runtimePath = runtimePath;
}
public Resource upScaleNodes() {
runtimeModel = ModelUtility.loadOCCIintoEMFResource(conn.loadRuntimeModel(runtimePath));
Configuration config = ((Configuration) runtimeModel.getContents().get(0));
Compute comp = addCompute(config);
Component worker = addWorkerComponent(config, comp);
Sensor sens = addSensor(config, comp);
Datagatherer dg = addDataGatherer(config, comp, sens);
Dataprocessor dp = addDataProcessor(config, comp, sens, dg);
Resultprovider rp = addResultProvider(config, comp, sens, dp);
config.getResources().add(comp);
config.getResources().add(worker);
config.getResources().add(sens);
config.getResources().add(rp);
return runtimeModel;
}
private Compute addCompute(Configuration config) {
System.out.println(" Adding Compute Node to Model");
Compute comp = iFactory.createCompute();
comp.setOcciComputeState(ComputeStatus.ACTIVE);
AttributeState state = factory.createAttributeState();
state.setName("occi.compute.state");
state.setValue("active");
comp.getAttributes().add(state);
config.getResources().add(comp);
index = Integer.toString(getIndex(config));
comp.setTitle("Hadoop-worker-" + index);
AttributeState hostname = factory.createAttributeState();
hostname.setName("occi.compute.hostname");
hostname.setValue("Hadoop-worker-" + index);
comp.getAttributes().add(hostname);
System.out.println(" " + comp.getTitle());
return comp;
}
private int getIndex(Configuration config) {
int max = 1;
int i = 0;
for (org.eclipse.cmf.occi.core.Resource res : config.getResources()) {
if (res instanceof Compute) {
if (res.getTitle() != null && res.getTitle().contains("worker")) {
i = Integer.valueOf(getIndexOf((Compute) res));
if (i > max) {
max = i;
}
}
}
}
return max + 1;
}
private String getIndexOf(Compute res) {
String[] arr = res.getTitle().split("-");
return arr[arr.length - 1];
}
private Component addWorkerComponent(Configuration config, Compute comp) {
System.out.println(" Adding Worker Component to Model");
Component worker = pFactory.createComponent();
worker.setTitle("hWorker");
config.getResources().add(worker);
AttributeState attr = factory.createAttributeState();
attr.setName("occi.core.id");
attr.setValue(worker.getId());
worker.getAttributes().add(attr);
MixinBase mBase = factory.createMixinBase();
mBase.setMixin(getMixin("hadoop-worker", config));
worker.getParts().add(mBase);
Placementlink pLink = placeFactory.createPlacementlink();
pLink.setSource(worker);
pLink.setTarget(comp);
Componentlink compLink = pFactory.createComponentlink();
compLink.setSource(getResourceById(config.getResources(), getApplicationId(config)));
compLink.setTarget(worker);
Componentlink compLinkToMaster = pFactory.createComponentlink();
Component master = getMaster(config);
compLinkToMaster.setSource(getResourceById(config.getResources(), master.getId()));
compLinkToMaster.setTarget(worker);
MixinBase mBase2 = factory.createMixinBase();
mBase2.setMixin(getExecDepFromMaster(master));
compLinkToMaster.getParts().add(mBase2);
MAPE.newComp = worker;
return worker;
}
private Mixin getExecDepFromMaster(Component master) {
for (Link link : master.getLinks()) {
if (link instanceof Componentlink) {
for (MixinBase mixB : link.getParts()) {
if (mixB.getMixin().getTerm().toLowerCase().equals("executiondependency")) {
return mixB.getMixin();
}
}
}
}
return null;
}
private String getMasterId(Configuration config) {
for (org.eclipse.cmf.occi.core.Resource res : config.getResources()) {
if (res instanceof Component) {
if (res.getTitle().toLowerCase().contains("master")) {
return res.getId();
}
}
}
return "";
}
private Component getMaster(Configuration config) {
for (org.eclipse.cmf.occi.core.Resource res : config.getResources()) {
if (res instanceof Component) {
if (res.getTitle().toLowerCase().contains("master")) {
return (Component) res;
}
}
}
return null;
}
private String getApplicationId(Configuration config) {
for (org.eclipse.cmf.occi.core.Resource res : config.getResources()) {
if (res instanceof Application) {
if (res.getTitle().toLowerCase().contains("hadoop")) {
return res.getId();
}
}
}
return "";
}
private Sensor addSensor(Configuration config, Compute comp) {
System.out.println(" Adding Sensor to Model");
Sensor sens = mFactory.createSensor();
sens.setTitle("sensor");
AttributeState attrName = factory.createAttributeState();
attrName.setName("occi.app.name");
attrName.setValue("sensor");
sens.getAttributes().add(attrName);
AttributeState attrContext = factory.createAttributeState();
attrContext.setName("occi.app.context");
attrContext.setValue("http://www.de");
sens.getAttributes().add(attrContext);
AttributeState attrUrl = factory.createAttributeState();
attrUrl.setName("occi.app.url");
attrUrl.setValue("http://www.de");
sens.getAttributes().add(attrUrl);
AttributeState attr = factory.createAttributeState();
attr.setName("occi.core.id");
attr.setValue(sens.getId());
sens.getAttributes().add(attr);
Monitorableproperty mp = mFactory.createMonitorableproperty();
mp.setTitle("monProp");
mp.setMonitoringProperty("CPU");
AttributeState attrProp = factory.createAttributeState();
attrProp.setName("monitoring.property");
attrProp.setValue("CPU");
mp.getAttributes().add(attrProp);
mp.setSource(sens);
mp.setTarget(comp);
config.getResources().add(sens);
return sens;
}
private Datagatherer addDataGatherer(Configuration config, Compute comp, Sensor sens) {
System.out.println(" Adding Datagatherer to Model");
Datagatherer dg = mFactory.createDatagatherer();
dg.setTitle("glances");
config.getResources().add(dg);
AttributeState attr = factory.createAttributeState();
attr.setName("occi.core.id");
attr.setValue(dg.getId());
dg.getAttributes().add(attr);
MixinBase mBase = factory.createMixinBase();
mBase.setMixin(getMixin("cpugatherer", config));
dg.getParts().add(mBase);
Componentlink c1 = pFactory.createComponentlink();
c1.setSource(sens);
c1.setTarget(dg);
Placementlink pl = placeFactory.createPlacementlink();
pl.setSource(dg);
pl.setTarget(comp);
return dg;
}
private Dataprocessor addDataProcessor(Configuration config, Compute comp, Sensor sens, Datagatherer dg) {
System.out.println(" Adding Dataprocessor to Model");
Dataprocessor dp = mFactory.createDataprocessor();
dp.setTitle("dataprocessor");
config.getResources().add(dp);
AttributeState attr = factory.createAttributeState();
attr.setName("occi.core.id");
attr.setValue(dp.getId());
dp.getAttributes().add(attr);
MixinBase mBase = factory.createMixinBase();
mBase.setMixin(getMixin("cpuprocessor", config));
dp.getParts().add(mBase);
Componentlink c2 = pFactory.createComponentlink();
c2.setSource(sens);
c2.setTarget(dp);
Placementlink pl = placeFactory.createPlacementlink();
pl.setSource(dp);
Compute monVM = getMonVM(config);
if (monVM == null) {
monVM = comp;
}
pl.setTarget(monVM);
Componentlink cl = pFactory.createComponentlink();
cl.setSource(dp);
cl.setTarget(dg);
return dp;
}
private Resultprovider addResultProvider(Configuration config, Compute comp, Sensor sens, Dataprocessor dp) {
System.out.println(" Adding Resultprovider to Model");
Resultprovider rp = mFactory.createResultprovider();
rp.setTitle("resultprovider");
config.getResources().add(rp);
Occiresultprovider orp = mFactory.createOcciresultprovider();
orp.setResultProviderEndpoint("192.168.35.45:8080");
AttributeState attrOP = factory.createAttributeState();
attrOP.setName("result.provider.endpoint");
attrOP.setValue("192.168.35.45:8080");
rp.getAttributes().add(attrOP);
rp.getParts().add(orp);
MixinBase mBase = factory.createMixinBase();
mBase.setMixin(getMixin("cpupublisher", config));
rp.getParts().add(mBase);
AttributeState attr = factory.createAttributeState();
attr.setName("occi.core.id");
attr.setValue(rp.getId());
rp.getAttributes().add(attr);
Componentlink c3 = pFactory.createComponentlink();
c3.setSource(sens);
c3.setTarget(rp);
Componentlink cl = pFactory.createComponentlink();
cl.setSource(rp);
cl.setTarget(dp);
Placementlink pl = placeFactory.createPlacementlink();
pl.setSource(rp);
Compute monVM = getMonVM(config);
if (monVM == null) {
monVM = comp;
}
pl.setTarget(monVM);
return rp;
}
private Mixin getMixin(String string, Configuration config) {
for (Mixin mix : config.getMixins()) {
if (mix.getTerm().equals(string)) {
return mix;
}
}
return null;
}
private Compute getMonVM(Configuration config) {
for (org.eclipse.cmf.occi.core.Resource res : config.getResources()) {
if (res instanceof Compute) {
Compute comp = (Compute) res;
for (Link rlink : comp.getRlinks()) {
if (rlink instanceof Placementlink && (rlink.getSource() instanceof Dataprocessor
|| rlink.getSource() instanceof Resultprovider)) {
return comp;
}
}
}
}
return null;
}
}
/**
*
*/
/**
* Main package that includes util classes as well as the monitoring interface.
*
......
......@@ -9,10 +9,10 @@
<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">
<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.title" value="Hadoop-master"/>
<attributes name="occi.core.summary" value=""/>
<attributes name="occi.compute.architecture" value="x86"/>
<attributes name="occi.compute.cores" value="2"/>
......@@ -43,10 +43,10 @@
</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="">
<resources xsi:type="platform:Component" id="urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255896" title="HJob" 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.title" value="HJob"/>
<attributes name="occi.core.summary" value=""/>
<attributes name="occi.component.state" value="undeployed"/>
<attributes name="occi.component.state.message" value=""/>
......@@ -57,10 +57,10 @@
<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="">
<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.title" value="HMaster"/>
<attributes name="occi.core.summary" value=""/>
<attributes name="occi.component.state" value="undeployed"/>
<attributes name="occi.component.state.message" value=""/>
......@@ -73,10 +73,10 @@
<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">
<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="undeployed">
<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"/>
<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"/>
......@@ -88,10 +88,10 @@
<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" occiComputeCores="2" occiComputeHostname="vm2" occiComputeMemory="4096.0" occiComputeState="active">
<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" 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.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"/>
......@@ -112,9 +112,6 @@
<parts>
<mixin href="http://schemas.modmacao.org/openstack/swe#//@mixins[term='ubuntu_xenialxerus']"/>
</parts>
<parts>
<mixin href="http://schemas.ugoe.cs.rwm/monitoring#//@mixins[term='monitoringproperties']"/>
</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"/>
......@@ -134,10 +131,10 @@
</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="">
<resources xsi:type="platform:Component" id="urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255898" title="HWorker" 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.title" value="HWorker"/>
<attributes name="occi.core.summary" value=""/>
<attributes name="occi.component.state" value="undeployed"/>
<attributes name="occi.component.state.message" value=""/>
......@@ -149,10 +146,10 @@
<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">
<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.title" value="HNetwork"/>
<attributes name="occi.core.summary" value=""/>
<attributes name="occi.network.vlan" value="0"/>
<attributes name="occi.network.label" value=""/>
......@@ -163,17 +160,11 @@
<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">
<resources xsi:type="monitoring:Sensor" id="urn:uuid:efb0f50a-7a7c-4153-b939-4846d6554dbb" title="CPUSensor">
<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.title" value="CPUSensor"/>
<attributes name="occi.core.summary" value=""/>
<attributes name="occi.sensor.timebase" value=""/>
<attributes name="occi.sensor.timestart" value=""/>
<attributes name="occi.sensor.timestop" value=""/>
<attributes name="occi.sensor.period" value=""/>
<attributes name="occi.sensor.granularity" value=""/>
<attributes name="occi.sensor.accuracy" 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">
......@@ -191,11 +182,17 @@
<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" 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"/>
<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 xsi:type="monitoring:Datagatherer" id="urn:uuid:051affdc-d686-48f8-884c-83fe81718a48" title="Glances" rlinks="//@resources.7/@links.0 //@resources.9/@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"/>
<attributes name="occi.core.title" value="Glances"/>
<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']"/>
......@@ -203,10 +200,10 @@
<attributes name="occi.core.title" value="link1"/>
</links>
</resources>
<resources xsi:type="monitoring:Processor" 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='processor']"/>
<resources xsi:type="monitoring:Dataprocessor" id="urn:uuid:1bda25ab-723b-47e7-9704-5134db26ebdc" title="CPUAggregator" 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"/>
<attributes name="occi.core.title" value="CPUAggregator"/>
<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']"/>
......@@ -219,11 +216,15 @@
<attributes name="occi.core.title" value="link2"/>
</links>
</resources>
<resources xsi:type="monitoring:Publisher" id="urn:uuid:588f705e-5279-4847-9337-846af2c86972" title="Publisher" rlinks="//@resources.7/@links.2">
<kind href="http://schemas.ugoe.cs.rwm/monitoring#//@kinds[term='publisher']"/>
<resources xsi:type="monitoring:Resultprovider" id="urn:uuid:588f705e-5279-4847-9337-846af2c86972" title="CPUProvider" 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="Publisher"/>
<attributes name="occi.core.title" value="CPUProvider"/>
<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"/>
......@@ -235,7 +236,7 @@
<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" occiComputeHostname="monVM" occiComputeState="inactive">
<resources xsi:type="infrastructure:Compute" id="urn:uuid:37829092-c690-494a-98fa-335b2fd660ea" title="MonVm" rlinks="//@resources.9/@links.1 //@resources.10/@links.1" occiComputeState="active" occiComputeHostname="monVM">
<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"/>
......@@ -260,7 +261,7 @@
</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">
<resources xsi:type="infrastructure:Network" id="urn:uuid:7a9fca2c-24fb-473c-aa9c-8dc9e68a432a" title="MonitoringNetwork" occiNetworkState="active" rlinks="//@resources.11/@links.0 //@resources.4/@links.1">
<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"/>
......@@ -280,4 +281,5 @@
<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="CPUProcessorLocal" scheme="http://schemas.modmacao.org/usermixins#" title="CPUProcessorLocal"/>
</occi:Configuration>
<?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:ansibleconfiguration="http://schemas.modmacao.org/occi/ansible/ecore" 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:openstackruntime="http://schemas.modmacao.org/openstack/runtime/ecore" xmlns:ossweruntime="http://schemas.modmacao.org/openstack/swe/ecore" xmlns:placement="http://schemas.modmacao.org/placement/ecore" xmlns:platform="http://schemas.modmacao.org/occi/platform/ecore">
<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/sugarcrm#/"/>
<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.ugoe.cs.rwm/workflow#/"/>
<use href="http://schemas.modmacao.org/toscabasetypes#/"/>
<use href="http://schemas.modmacao.org/toscaspecifictypes#/"/>
<use href="http://schemas.modmacao.org/placement#/"/>
<use href="http://schemas.modmacao.org/occi/ansible#/"/>
<use href="http://schemas.modmacao.org/openstack/swe#/"/>
<use href="http://schemas.ugoe.cs.rwm/monitoring#/"/>
<resources xsi:type="platform:Application" id="a4888ba9-a0ea-48f2-a29e-901c876ab42d" location="/application/urn:uuid:a4888ba9-a0ea-48f2-a29e-901c876ab42d/" occiAppState="error">
<kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='application']"/>
<attributes name="occi.core.id" value="a4888ba9-a0ea-48f2-a29e-901c876ab42d"/>
<attributes name="occi.core.title" value="hadoopcluster"/>
<attributes name="occi.core.summary" value=""/>
<attributes name="occi.app.name" value=""/>
<attributes name="occi.app.context" value="0"/>
<attributes name="occi.app.url" value="0"/>
<attributes name="occi.app.state" value="undeployed"/>
<attributes name="occi.app.state.message" value=""/>
<links xsi:type="platform:Componentlink" id="7890f02b-6f56-4809-865f-d8c686fd9da1" 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="7890f02b-6f56-4809-865f-d8c686fd9da1"/>
<attributes name="occi.core.title" value="link4"/>
</links>
<links xsi:type="platform:Componentlink" id="9aa31c50-c605-4370-aa60-2c7c461051ef" location="/componentlink/urn:uuid:9aa31c50-c605-4370-aa60-2c7c461051ef/" target="//@resources.13">
<kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/>
<attributes name="occi.core.id" value="9aa31c50-c605-4370-aa60-2c7c461051ef"/>
<attributes name="occi.core.title" value="ComponentLink"/>
</links>
</resources>
<resources xsi:type="monitoring:Sensor" id="efb0f50a-7a7c-4153-b939-4846d6554dbb" location="/sensor/urn:uuid:efb0f50a-7a7c-4153-b939-4846d6554dbb/" occiAppState="inactive" occiAppStateMessage="" occiSensorTimebase="" occiSensorTimestart="" occiSensorTimestop="" occiSensorPeriod="" occiSensorGranularity="" occiSensorAccuracy="">
<kind href="http://schemas.ugoe.cs.rwm/monitoring#//@kinds[term='sensor']"/>
<attributes name="occi.core.id" value="efb0f50a-7a7c-4153-b939-4846d6554dbb"/>
<attributes name="occi.core.title" value="Sensor"/>
<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.app.name" value=""/>
<attributes name="occi.app.context" value="0"/>
<attributes name="occi.app.url" value="0"/>
<attributes name="occi.app.state" value="undeployed"/>
<attributes name="occi.app.state.message" value=""/>
<attributes name="occi.sensor.timebase" value=""/>
<attributes name="occi.sensor.timestart" value=""/>
<attributes name="occi.sensor.timestop" value=""/>
<attributes name="occi.sensor.period" value=""/>
<attributes name="occi.sensor.granularity" value=""/>
<attributes name="occi.sensor.accuracy" value=""/>
<links xsi:type="platform:Componentlink" id="93f08e31-f350-42b7-a73b-c139eba4a8e3" location="/componentlink/urn:uuid:93f08e31-f350-42b7-a73b-c139eba4a8e3/" target="//@resources.7">
<kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/>
<attributes name="occi.core.id" value="93f08e31-f350-42b7-a73b-c139eba4a8e3"/>
<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"/>
</links>
<links xsi:type="platform:Componentlink" id="9c604867-3135-4fa1-af9e-2bb11018ff5a" location="/componentlink/urn:uuid:9c604867-3135-4fa1-af9e-2bb11018ff5a/" target="//@resources.2">
<kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/>
<attributes name="occi.core.id" value="9c604867-3135-4fa1-af9e-2bb11018ff5a"/>
<attributes name="occi.core.title" value="link2"/>
</links>
<links xsi:type="platform:Componentlink" id="04cf6483-706d-4a2a-9114-9918ab2bb52a" location="/componentlink/urn:uuid:04cf6483-706d-4a2a-9114-9918ab2bb52a/" target="//@resources.11">
<kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/>
<attributes name="occi.core.id" value="04cf6483-706d-4a2a-9114-9918ab2bb52a"/>
<attributes name="occi.core.title" value="link1"/>
<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="monitoring:Processor" id="1bda25ab-723b-47e7-9704-5134db26ebdc" location="/processor/urn:uuid:1bda25ab-723b-47e7-9704-5134db26ebdc/" rlinks="//@resources.7/@links.0 //@resources.1/@links.1" occiComponentState="inactive">
<kind href="http://schemas.ugoe.cs.rwm/monitoring#//@kinds[term='processor']"/>
<attributes name="occi.core.id" value="1bda25ab-723b-47e7-9704-5134db26ebdc"/>
<attributes name="occi.core.title" value="Processor"/>
<resources xsi:type="platform:Component" id="urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255896" title="HJob" 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="HJob"/>
<attributes name="occi.core.summary" value=""/>
<attributes name="occi.component.state" value="undeployed"/>
<attributes name="occi.component.state.message" value=""/>
<parts mixin="//@mixins.4"/>
<links xsi:type="platform:Componentlink" id="1a821776-7886-4cb4-8b80-46a8403acf40" location="/componentlink/urn:uuid:1a821776-7886-4cb4-8b80-46a8403acf40/" target="//@resources.11">
<kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/>
<attributes name="occi.core.id" value="1a821776-7886-4cb4-8b80-46a8403acf40"/>
<attributes name="occi.core.title" value="link1"/>
</links>
<links xsi:type="placement:Placementlink" id="ff7019e4-a9dc-48dc-83c3-ab77714a25f4" location="/placementlink/urn:uuid:ff7019e4-a9dc-48dc-83c3-ab77714a25f4/" target="//@resources.10">
<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="ff7019e4-a9dc-48dc-83c3-ab77714a25f4"/>
<attributes name="occi.core.title" value="link2"/>
<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="infrastructure:Network" id="29d78078-fb4c-47aa-a9af-b8aaf3339590" location="/network/urn:uuid:29d78078-fb4c-47aa-a9af-b8aaf3339590/" rlinks="//@resources.10/@links.0 //@resources.8/@links.2 //@resources.9/@links.0">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='network']"/>
<attributes name="occi.core.id" value="29d78078-fb4c-47aa-a9af-b8aaf3339590"/>
<attributes name="occi.core.title" value="Management Network"/>
<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="inactive"/>
<attributes name="occi.network.state.message" value=""/>
<parts xsi:type="openstackruntime:Runtimeid" openstackRuntimeId="75a4639e-9ce7-4058-b859-8a711b0e2e7b">
<mixin href="http://schemas.modmacao.org/openstack/runtime#//@mixins[term='runtimeid']"/>
<attributes name="openstack.runtime.id" value="75a4639e-9ce7-4058-b859-8a711b0e2e7b"/>
</parts>
</resources>
<resources xsi:type="infrastructure:Network" id="29d78078-fb4c-47aa-a9af-b8aaf3339591" title="hNetwork" location="/network/urn:uuid:29d78078-fb4c-47aa-a9af-b8aaf3339591/" rlinks="//@resources.8/@links.1 //@resources.9/@links.1" occiNetworkVlan="0" occiNetworkLabel="" occiNetworkState="active" occiNetworkStateMessage="">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='network']"/>
<attributes name="occi.core.id" value="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 xsi:type="infrastructure:Ipnetwork" occiNetworkAddress="10.254.1.1/24">
<mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ipnetwork']"/>
<attributes name="occi.network.address" value="10.254.1.1/24"/>
<attributes name="occi.network.gateway" value=""/>
<attributes name="occi.network.allocation" value="dynamic"/>
</parts>
<parts xsi:type="openstackruntime:Runtimeid" openstackRuntimeId="ffb9aca8-7599-4cb1-999f-306a0b8efd0e">
<mixin href="http://schemas.modmacao.org/openstack/runtime#//@mixins[term='runtimeid']"/>
</parts>
</resources>
<resources xsi:type="platform:Component" id="f934d445-d0c8-4f2f-8086-d9f1a8255898" location="/component/urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255898/" rlinks="//@resources.0/@links.0" occiComponentState="error" occiComponentStateMessage="">
<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="f934d445-d0c8-4f2f-8086-d9f1a8255898"/>
<attributes name="occi.core.title" value="Worker"/>
<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.2"/>
<links xsi:type="placement:Placementlink" id="ff292f08-d263-41b6-88c8-84d33783b917" location="/placementlink/urn:uuid:ff292f08-d263-41b6-88c8-84d33783b917/" target="//@resources.8">
<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="ff292f08-d263-41b6-88c8-84d33783b917"/>
<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="infrastructure:Network" id="7a9fca2c-24fb-473c-aa9c-8dc9e68a432a" title="MonitoringNetwork" location="/network/urn:uuid:7a9fca2c-24fb-473c-aa9c-8dc9e68a432a/" rlinks="//@resources.10/@links.1 //@resources.8/@links.0" occiNetworkVlan="0" occiNetworkLabel="" occiNetworkState="active" occiNetworkStateMessage="">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='network']"/>
<attributes name="occi.core.id" value="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 xsi:type="infrastructure:Ipnetwork" occiNetworkAddress="100.254.1.1/24">
<mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ipnetwork']"/>
<attributes name="occi.network.address" value="100.254.1.1/24"/>
<attributes name="occi.network.gateway" value=""/>
<attributes name="occi.network.allocation" value="dynamic"/>
</parts>
<parts xsi:type="openstackruntime:Runtimeid" openstackRuntimeId="a78e379b-83d7-4afe-95ec-6266a1ada35d">
<mixin href="http://schemas.modmacao.org/openstack/runtime#//@mixins[term='runtimeid']"/>
</parts>
</resources>
<resources xsi:type="monitoring:Publisher" id="588f705e-5279-4847-9337-846af2c86972" location="/publisher/urn:uuid:588f705e-5279-4847-9337-846af2c86972/" rlinks="//@resources.1/@links.0" occiComponentState="inactive">
<kind href="http://schemas.ugoe.cs.rwm/monitoring#//@kinds[term='publisher']"/>
<attributes name="occi.core.id" value="588f705e-5279-4847-9337-846af2c86972"/>
<attributes name="occi.core.title" value="Publisher"/>
<attributes name="occi.core.summary" value=""/>
<attributes name="occi.component.state" value="undeployed"/>
<attributes name="occi.component.state.message" value=""/>
<parts mixin="//@mixins.5"/>
<links xsi:type="platform:Componentlink" id="9551c357-59f8-4ac1-8c85-0e886e206b80" location="/componentlink/urn:uuid:9551c357-59f8-4ac1-8c85-0e886e206b80/" target="//@resources.2">
<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="undeployed">
<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="9551c357-59f8-4ac1-8c85-0e886e206b80"/>
<attributes name="occi.core.title" value="link1"/>
<attributes name="occi.core.id" value="urn:uuid:9aa31c50-c605-4370-aa60-2c7c461051ef"/>
<attributes name="occi.core.title" value="ComponentLink"/>
</links>
<links xsi:type="placement:Placementlink" id="275b5bce-084c-46f0-88bc-1f6f31bf3616" location="/placementlink/urn:uuid:275b5bce-084c-46f0-88bc-1f6f31bf3616/" target="//@resources.10">
<kind href="http://schemas.modmacao.org/placement#//@kinds[term='placementlink']"/>
<attributes name="occi.core.id" value="275b5bce-084c-46f0-88bc-1f6f31bf3616"/>
<attributes name="occi.core.title" value="link2"/>
<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="2e6a73d0-faaa-476a-bd25-ca461dd166cf" title="hadoop-worker-1" location="/compute/urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166cf/" rlinks="//@resources.11/@links.0 //@resources.5/@links.0" occiComputeCores="2" occiComputeHostname="hadoop-worker-1" occiComputeShare="0" occiComputeSpeed="0.0" occiComputeMemory="4096.0" occiComputeState="active" occiComputeStateMessage="">
<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="2e6a73d0-faaa-476a-bd25-ca461dd166cf"/>
<attributes name="occi.core.title" value="hadoop-worker-1"/>
<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"/>
......@@ -184,154 +101,144 @@
<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: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 xsi:type="ossweruntime:Ubuntu_xenialxerus">
<mixin href="http://schemas.modmacao.org/openstack/swe#//@mixins[term='ubuntu_xenialxerus']"/>
<attributes name="openstack.runtime.id" value="5437eae8-7c47-4834-929c-a314de77d291"/>
</parts>
<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="monitoring:Monitoringproperties">
<mixin href="http://schemas.ugoe.cs.rwm/monitoring#//@mixins[term='monitoringproperties']"/>
<attributes name="monitoring.properties" value=""/>
<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 xsi:type="openstackruntime:Runtimeid" openstackRuntimeId="d3cade51-e0c2-48d5-ad75-0706dd301caf">
<mixin href="http://schemas.modmacao.org/openstack/runtime#//@mixins[term='runtimeid']"/>
<parts>
<mixin href="http://schemas.modmacao.org/openstack/swe#//@mixins[term='ubuntu_xenialxerus']"/>
</parts>
<links xsi:type="infrastructure:Networkinterface" id="03f91178-136f-4023-876e-84509f8a5a2d" location="/networkinterface/urn:uuid:03f91178-136f-4023-876e-84509f8a5a2d/" target="//@resources.6">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='networkinterface']"/>
<attributes name="occi.core.id" value="03f91178-136f-4023-876e-84509f8a5a2d"/>
<attributes name="occi.core.title" value="monNwLink"/>
<attributes name="occi.networkinterface.interface" value=""/>
<attributes name="occi.networkinterface.mac" value=""/>
<attributes name="occi.networkinterface.state" value="active"/>
<attributes name="occi.networkinterface.state.message" value=""/>
<attributes name="occi.networkinterface.address" value="100.254.1.35"/>
<attributes name="occi.networkinterface.gateway" value=""/>
<attributes name="occi.networkinterface.allocation" value="dynamic"/>
<parts xsi:type="infrastructure:Ipnetworkinterface" occiNetworkinterfaceAddress="100.254.1.35">
<mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ipnetworkinterface']"/>
</parts>
<parts xsi:type="openstackruntime:Runtimeid" openstackRuntimeId="fb5e8706-c5a5-48b1-a5f7-554be26b1f0b">
<mixin href="http://schemas.modmacao.org/openstack/runtime#//@mixins[term='runtimeid']"/>
</parts>
</links>
<links xsi:type="infrastructure:Networkinterface" id="c8c49905-3d5e-43b2-8d09-fabf92d29722" location="/networkinterface/urn:uuid:c8c49905-3d5e-43b2-8d09-fabf92d29722/" target="//@resources.4">
<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="c8c49905-3d5e-43b2-8d09-fabf92d29722"/>
<attributes name="occi.core.id" value="urn:uuid:c8c49905-3d5e-43b2-8d09-fabf92d29722"/>
<attributes name="occi.core.title" value="link2"/>
<attributes name="occi.networkinterface.interface" value=""/>
<attributes name="occi.networkinterface.mac" value=""/>
<attributes name="occi.networkinterface.state" value="active"/>
<attributes name="occi.networkinterface.state.message" value=""/>
<attributes name="occi.networkinterface.address" value="10.254.1.8"/>
<attributes name="occi.networkinterface.gateway" value=""/>
<attributes name="occi.networkinterface.allocation" value="dynamic"/>
<parts xsi:type="infrastructure:Ipnetworkinterface" occiNetworkinterfaceAddress="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>
<parts xsi:type="openstackruntime:Runtimeid" openstackRuntimeId="beffdcda-b4f3-4acd-a6ba-8d1cb4642d9d">
<mixin href="http://schemas.modmacao.org/openstack/runtime#//@mixins[term='runtimeid']"/>
</parts>
</links>
<links xsi:type="infrastructure:Networkinterface" id="a81f796a-c59f-46d7-8411-e3811ddfc58d" location="/networkinterface/urn:uuid:a81f796a-c59f-46d7-8411-e3811ddfc58d/" target="//@resources.3">
<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="a81f796a-c59f-46d7-8411-e3811ddfc58d"/>
<attributes name="occi.core.title" value="hadoop-worker-1 -> Management Network"/>
<attributes name="occi.networkinterface.interface" value=""/>
<attributes name="occi.networkinterface.mac" value=""/>
<attributes name="occi.networkinterface.state" value="active"/>
<attributes name="occi.networkinterface.state.message" value=""/>
<attributes name="occi.networkinterface.address" value=""/>
<attributes name="occi.networkinterface.gateway" value=""/>
<attributes name="occi.networkinterface.allocation" value="dynamic"/>
<parts xsi:type="infrastructure:Ipnetworkinterface" occiNetworkinterfaceAddress="10.0.0.25">
<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>
<parts xsi:type="ansibleconfiguration:Ansibleendpoint">
<mixin href="http://schemas.modmacao.org/occi/ansible#//@mixins[term='ansibleendpoint']"/>
</parts>
<parts xsi:type="openstackruntime:Runtimeid" openstackRuntimeId="59fbe73d-0707-401e-9941-97539f59b108">
<mixin href="http://schemas.modmacao.org/openstack/runtime#//@mixins[term='runtimeid']"/>
</parts>
</links>
</resources>
<resources xsi:type="infrastructure:Compute" id="2e6a73d0-faaa-476a-bd25-ca461dd166ce" title="hadoop-master" location="/compute/urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166ce/" rlinks="//@resources.13/@links.0 //@resources.12/@links.0" occiComputeCores="2" occiComputeHostname="hadoop-master" occiComputeShare="0" occiComputeSpeed="0.0" occiComputeMemory="4096.0" occiComputeState="active" occiComputeStateMessage="">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='compute']"/>
<attributes name="occi.core.id" value="2e6a73d0-faaa-476a-bd25-ca461dd166ce"/>
<attributes name="occi.core.title" value="hadoop-master"/>
<resources xsi:type="platform:Component" id="urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255898" title="HWorker" 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.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: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 xsi:type="ossweruntime:Ubuntu_xenialxerus">
<mixin href="http://schemas.modmacao.org/openstack/swe#//@mixins[term='ubuntu_xenialxerus']"/>
<attributes name="openstack.runtime.id" value="5437eae8-7c47-4834-929c-a314de77d291"/>
</parts>
<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="openstackruntime:Runtimeid" openstackRuntimeId="a8193a3f-d0a6-48e2-900f-f40a972186f6">
<mixin href="http://schemas.modmacao.org/openstack/runtime#//@mixins[term='runtimeid']"/>
<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>
<links xsi:type="infrastructure:Networkinterface" id="576fa64d-bf7e-4c15-bd20-d3e13c03ad64" location="/networkinterface/urn:uuid:576fa64d-bf7e-4c15-bd20-d3e13c03ad64/" target="//@resources.3">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='networkinterface']"/>
<attributes name="occi.core.id" value="576fa64d-bf7e-4c15-bd20-d3e13c03ad64"/>
<attributes name="occi.core.title" value="hadoop-master -> Management Network"/>
<attributes name="occi.networkinterface.interface" value=""/>
<attributes name="occi.networkinterface.mac" value=""/>
<attributes name="occi.networkinterface.state" value="active"/>
<attributes name="occi.networkinterface.state.message" value=""/>
<attributes name="occi.networkinterface.address" value=""/>
<attributes name="occi.networkinterface.gateway" value=""/>
<attributes name="occi.networkinterface.allocation" value="dynamic"/>
<parts xsi:type="infrastructure:Ipnetworkinterface" occiNetworkinterfaceAddress="10.0.0.16">
<mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ipnetworkinterface']"/>
</parts>
<parts xsi:type="ansibleconfiguration:Ansibleendpoint">
<mixin href="http://schemas.modmacao.org/occi/ansible#//@mixins[term='ansibleendpoint']"/>
</parts>
<parts xsi:type="openstackruntime:Runtimeid" openstackRuntimeId="2322b413-a434-4262-ba6d-e082f5d4a0cf">
<mixin href="http://schemas.modmacao.org/openstack/runtime#//@mixins[term='runtimeid']"/>
</parts>
</resources>
<resources xsi:type="monitoring:Sensor" id="urn:uuid:efb0f50a-7a7c-4153-b939-4846d6554dbb" title="CPUSensor">
<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="CPUSensor"/>
<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="infrastructure:Networkinterface" id="ea482951-5c26-471d-aa1b-8e03b1e6096c" location="/networkinterface/urn:uuid:ea482951-5c26-471d-aa1b-8e03b1e6096c/" target="//@resources.4">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='networkinterface']"/>
<attributes name="occi.core.id" value="ea482951-5c26-471d-aa1b-8e03b1e6096c"/>
<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"/>
<attributes name="occi.networkinterface.interface" value=""/>
<attributes name="occi.networkinterface.mac" value=""/>
<attributes name="occi.networkinterface.state" value="active"/>
<attributes name="occi.networkinterface.state.message" value=""/>
<attributes name="occi.networkinterface.address" value="10.254.1.5"/>
<attributes name="occi.networkinterface.gateway" value=""/>
<attributes name="occi.networkinterface.allocation" value="dynamic"/>
<parts xsi:type="infrastructure:Ipnetworkinterface" occiNetworkinterfaceAddress="10.254.1.5">
<mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ipnetworkinterface']"/>
</parts>
<parts xsi:type="openstackruntime:Runtimeid" openstackRuntimeId="f9a171b5-050a-455e-acf8-582e9a2db090">
<mixin href="http://schemas.modmacao.org/openstack/runtime#//@mixins[term='runtimeid']"/>
</parts>
</links>
<links xsi:type="monitoring:Monitorableproperty" id="urn:uuid:ba16f4ee-1601-4192-a259-eae4274aed72" title="CPU" 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"/>
<attributes name="monitoring.property" value="CPU"/>
</links>
</resources>
<resources xsi:type="monitoring:Datagatherer" id="urn:uuid:051affdc-d686-48f8-884c-83fe81718a48" title="Glances" 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="Glances"/>
<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="CPUAggregator" 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="CPUAggregator"/>
<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="CPUProvider" 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="CPUProvider"/>
<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="37829092-c690-494a-98fa-335b2fd660ea" title="MonVm" location="/compute/urn:uuid:37829092-c690-494a-98fa-335b2fd660ea/" rlinks="//@resources.7/@links.1 //@resources.2/@links.1" occiComputeCores="2" occiComputeHostname="monVM" occiComputeShare="0" occiComputeSpeed="0.0" occiComputeMemory="4096.0" occiComputeState="active" occiComputeStateMessage="">
<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="active">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='compute']"/>
<attributes name="occi.core.id" value="37829092-c690-494a-98fa-335b2fd660ea"/>
<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"/>
......@@ -342,110 +249,102 @@
<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: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 xsi:type="ossweruntime:Ubuntu_xenialxerus">
<parts>
<mixin href="http://schemas.modmacao.org/openstack/swe#//@mixins[term='ubuntu_xenialxerus']"/>
<attributes name="openstack.runtime.id" value="5437eae8-7c47-4834-929c-a314de77d291"/>
</parts>
<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="openstackruntime:Runtimeid" openstackRuntimeId="426dd30a-4aed-42f3-854d-217e6e74f4a8">
<mixin href="http://schemas.modmacao.org/openstack/runtime#//@mixins[term='runtimeid']"/>
</parts>
<links xsi:type="infrastructure:Networkinterface" id="efe27a6b-e6e3-4fe8-ab52-9b4039fba9e5" location="/networkinterface/urn:uuid:efe27a6b-e6e3-4fe8-ab52-9b4039fba9e5/" target="//@resources.3">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='networkinterface']"/>
<attributes name="occi.core.id" value="efe27a6b-e6e3-4fe8-ab52-9b4039fba9e5"/>
<attributes name="occi.core.title" value="MonVm -> Management Network"/>
<attributes name="occi.networkinterface.interface" value=""/>
<attributes name="occi.networkinterface.mac" value=""/>
<attributes name="occi.networkinterface.state" value="active"/>
<attributes name="occi.networkinterface.state.message" value=""/>
<attributes name="occi.networkinterface.address" value=""/>
<attributes name="occi.networkinterface.gateway" value=""/>
<attributes name="occi.networkinterface.allocation" value="dynamic"/>
<parts xsi:type="infrastructure:Ipnetworkinterface" occiNetworkinterfaceAddress="10.0.0.9">
<mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ipnetworkinterface']"/>
</parts>
<parts xsi:type="ansibleconfiguration:Ansibleendpoint">
<mixin href="http://schemas.modmacao.org/occi/ansible#//@mixins[term='ansibleendpoint']"/>
</parts>
<parts xsi:type="openstackruntime:Runtimeid" openstackRuntimeId="0bf1a760-6db1-4347-938e-e24b25556ec0">
<mixin href="http://schemas.modmacao.org/openstack/runtime#//@mixins[term='runtimeid']"/>
</parts>
</links>
<links xsi:type="infrastructure:Networkinterface" id="00d6889d-b644-44bf-af13-3fe350e926ed" location="/networkinterface/urn:uuid:00d6889d-b644-44bf-af13-3fe350e926ed/" target="//@resources.6">
<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="00d6889d-b644-44bf-af13-3fe350e926ed"/>
<attributes name="occi.core.id" value="urn:uuid:00d6889d-b644-44bf-af13-3fe350e926ed"/>
<attributes name="occi.core.title" value="link1"/>
<attributes name="occi.networkinterface.interface" value=""/>
<attributes name="occi.networkinterface.mac" value=""/>
<attributes name="occi.networkinterface.state" value="active"/>
<attributes name="occi.networkinterface.state.message" value=""/>
<attributes name="occi.networkinterface.address" value=""/>
<attributes name="occi.networkinterface.gateway" value=""/>
<attributes name="occi.networkinterface.allocation" value="dynamic"/>
<parts xsi:type="infrastructure:Ipnetworkinterface">
<parts xsi:type="infrastructure:Ipnetworkinterface" occiNetworkinterfaceAddress="100.254.1.25">
<mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ipnetworkinterface']"/>
</parts>
<parts xsi:type="openstackruntime:Runtimeid" openstackRuntimeId="1a9c2480-618e-405f-bebc-532c5ff6d546">
<mixin href="http://schemas.modmacao.org/openstack/runtime#//@mixins[term='runtimeid']"/>
</parts>
</links>
</resources>
<resources xsi:type="monitoring:Datagatherer" id="051affdc-d686-48f8-884c-83fe81718a48" location="/datagatherer/urn:uuid:051affdc-d686-48f8-884c-83fe81718a48/" rlinks="//@resources.1/@links.2 //@resources.2/@links.0" occiComponentState="inactive">
<kind href="http://schemas.ugoe.cs.rwm/monitoring#//@kinds[term='datagatherer']"/>
<attributes name="occi.core.id" value="051affdc-d686-48f8-884c-83fe81718a48"/>
<attributes name="occi.core.title" value="DataGatherer"/>
<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="active">
<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.component.state" value="undeployed"/>
<attributes name="occi.component.state.message" value=""/>
<attributes name="occi.collector.period" value=""/>
<attributes name="occi.collector.granularity" value=""/>
<attributes name="occi.collector.accuracy" value=""/>
<parts mixin="//@mixins.3"/>
<links xsi:type="placement:Placementlink" id="60cc05ca-4fd7-465b-8fd0-945dcbf8867f" location="/placementlink/urn:uuid:60cc05ca-4fd7-465b-8fd0-945dcbf8867f/" target="//@resources.8">
<kind href="http://schemas.modmacao.org/placement#//@kinds[term='placementlink']"/>
<attributes name="occi.core.id" value="60cc05ca-4fd7-465b-8fd0-945dcbf8867f"/>
<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>
</resources>
<resources xsi:type="platform:Component" id="f934d445-d0c8-4f2f-8086-d9f1a8255896" 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="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="ff292f08-d263-41b6-88c8-84d33783b929" location="/placementlink/urn:uuid:ff292f08-d263-41b6-88c8-84d33783b929/" target="//@resources.9">
<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="ff292f08-d263-41b6-88c8-84d33783b929"/>
<attributes name="occi.core.title" value="link1"/>
<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="platform:Component" id="f934d445-d0c8-4f2f-8086-d9f1a8255897" location="/component/urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255897/" rlinks="//@resources.0/@links.1" occiComponentState="error" occiComponentStateMessage="">
<kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='component']"/>
<attributes name="occi.core.id" value="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="ff292f08-d263-41b6-88c8-84d33783b928" location="/placementlink/urn:uuid:ff292f08-d263-41b6-88c8-84d33783b928/" target="//@resources.9">
<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="ff292f08-d263-41b6-88c8-84d33783b928"/>
<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#"/>
<mixins name="hmaster" scheme="http://schemas.modmacao.org/usermixins#"/>
<mixins name="hworker" scheme="http://schemas.modmacao.org/usermixins#"/>
<mixins name="cpugatherer" scheme="http://schemas.modmacao.org/usermixins#"/>
<mixins name="cpuprocessor" scheme="http://schemas.modmacao.org/usermixins#"/>
<mixins name="cpupublisher" scheme="http://schemas.modmacao.org/usermixins#"/>
<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"/>
<mixins name="CPUProcessorLocal" scheme="http://schemas.modmacao.org/usermixins#" title="CPUProcessorLocal"/>
</occi:Configuration>
src/main/resources/de/ugoe/cs/rwm/mocci/occi/initial.jpg

130 KiB

#! /bin/bash
state=DownScaled
sequence=3
url='http://localhost:8080/monitorableproperty?attribute=monitoring.result&value=Critical'
echo "Starting MAPE script"
echo "Requesting $url every $sequence seconds!"
while true; do
echo "Monitor"
m=$(curl -s $url)
echo "$m"
echo "Analyze"
if echo $m | grep -q /compute/ ; then
echo "Critical Compute Detected"
echo "Plan: Scale up VM"
if [ "$state" == DownScaled ]; then
state=UpScaled
echo "State: $state"
echo "Execute"
curl -v -X PUT http://localhost:8080/compute/urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166cf/ -H 'Content-Type: text/occi' -H 'Category: compute; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="kind", ssh_key; scheme="http://schemas.ogf.org/occi/infrastructure/credentials#"; class="mixin", user_data; scheme="http://schemas.ogf.org/occi/infrastructure/compute#"; class="mixin", ubuntu_xenialxerus; scheme="http://schemas.modmacao.org/openstack/swe#"; class="mixin"' -H 'X-OCCI-Attribute:occi.core.id="urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166cf", occi.core.title="hadoop-worker-1", occi.core.summary="", occi.compute.architecture="x86", occi.compute.cores="8", occi.compute.hostname="hadoop-worker-1", occi.compute.share="0", occi.compute.speed="0", occi.compute.memory="8192", occi.compute.state="active", occi.compute.state.message="", occi.credentials.ssh.publickey="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6H7Ydi45BTHid4qNppGAi5mzjbnZgt7bi6xLGmZG9CiLmhMsxOuk3Z05Nn+pmoN98qS0eY8S240PPk5VOlYqBY0vdRAwrZSHHaLdMp6I7ARNrI2KraYduweqz7ZQxPXQfwIeYx2HKQxEF2r+4//Fo4WfgdBkLuulvl/Gw3TUzJNQHvgpaiNo9+PI5CZydHnZbjUkRikS12pT+CbNKj+0QKeQztbCd41aKxDv5H0DjltVRcpPppv4dmiU/zoCAIngWLO1PPgfYWyze8Z9IoyBT7Qdg30U91TYZBuxzXR5lq7Fh64y/IZ/SjdOdSIvIuDjtmJDULRdLJzrvubrKY+YH Generated-by-Nova", occi.compute.userdata="I2Nsb3VkLWNvbmZpZwoKIyBVcGdyYWRlIHRoZSBpbnN0YW5jZSBvbiBmaXJzdCBib290CiMgKGllIHJ1biBhcHQtZ2V0IHVwZ3JhZGUpCiMKIyBEZWZhdWx0OiBmYWxzZQojIEFsaWFzZXM6IGFwdF91cGdyYWRlCnBhY2thZ2VfdXBncmFkZTogdHJ1ZQoKcGFja2FnZXM6CiAtIHB5dGhvbgoKd3JpdGVfZmlsZXM6CiAgLSBwYXRoOiAvZXRjL25ldHdvcmsvaW50ZXJmYWNlcy5kLzUwLWNsb3VkLWluaXQuY2ZnCiAgICBjb250ZW50OiB8CiAgICAgIGF1dG8gbG8KICAgICAgaWZhY2UgbG8gaW5ldCBsb29wYmFjawogICAgICAKICAgICAgYXV0byBlbnMwCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMAogICAgICBpZmFjZSBlbnMwIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMQogICAgICBpZmFjZSBlbnMxIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMyCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMgogICAgICBpZmFjZSBlbnMyIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMzCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMwogICAgICBpZmFjZSBlbnMzIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM0CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNAogICAgICBpZmFjZSBlbnM0IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM1CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNQogICAgICBpZmFjZSBlbnM1IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM2CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNgogICAgICBpZmFjZSBlbnM2IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM3CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNwogICAgICBpZmFjZSBlbnM3IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM4CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOAogICAgICBpZmFjZSBlbnM4IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM5CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOQogICAgICBpZmFjZSBlbnM5IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxMAogICAgICBhbGxvdy1ob3RwbHVnIGVuczEwCiAgICAgIGlmYWNlIGVuczEwIGluZXQgZGhjcAoKIyMj"'
fi
else
echo "No Crtical Compute Detected"
echo "Plan: Scale down VM"
if [ "$state" == UpScaled ]; then
state=DownScaled
echo "State: $state"
curl -v -X PUT http://localhost:8080/compute/urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166cf/ -H 'Content-Type: text/occi' -H 'Category: compute; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="kind", ssh_key; scheme="http://schemas.ogf.org/occi/infrastructure/credentials#"; class="mixin", user_data; scheme="http://schemas.ogf.org/occi/infrastructure/compute#"; class="mixin", ubuntu_xenialxerus; scheme="http://schemas.modmacao.org/openstack/swe#"; class="mixin"' -H 'X-OCCI-Attribute:occi.core.id="urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166cf", occi.core.title="hadoop-worker-1", occi.core.summary="", occi.compute.architecture="x86", occi.compute.cores="2", occi.compute.hostname="hadoop-worker-1", occi.compute.share="0", occi.compute.speed="0", occi.compute.memory="4096", occi.compute.state="active", occi.compute.state.message="", occi.credentials.ssh.publickey="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6H7Ydi45BTHid4qNppGAi5mzjbnZgt7bi6xLGmZG9CiLmhMsxOuk3Z05Nn+pmoN98qS0eY8S240PPk5VOlYqBY0vdRAwrZSHHaLdMp6I7ARNrI2KraYduweqz7ZQxPXQfwIeYx2HKQxEF2r+4//Fo4WfgdBkLuulvl/Gw3TUzJNQHvgpaiNo9+PI5CZydHnZbjUkRikS12pT+CbNKj+0QKeQztbCd41aKxDv5H0DjltVRcpPppv4dmiU/zoCAIngWLO1PPgfYWyze8Z9IoyBT7Qdg30U91TYZBuxzXR5lq7Fh64y/IZ/SjdOdSIvIuDjtmJDULRdLJzrvubrKY+YH Generated-by-Nova", occi.compute.userdata="I2Nsb3VkLWNvbmZpZwoKIyBVcGdyYWRlIHRoZSBpbnN0YW5jZSBvbiBmaXJzdCBib290CiMgKGllIHJ1biBhcHQtZ2V0IHVwZ3JhZGUpCiMKIyBEZWZhdWx0OiBmYWxzZQojIEFsaWFzZXM6IGFwdF91cGdyYWRlCnBhY2thZ2VfdXBncmFkZTogdHJ1ZQoKcGFja2FnZXM6CiAtIHB5dGhvbgoKd3JpdGVfZmlsZXM6CiAgLSBwYXRoOiAvZXRjL25ldHdvcmsvaW50ZXJmYWNlcy5kLzUwLWNsb3VkLWluaXQuY2ZnCiAgICBjb250ZW50OiB8CiAgICAgIGF1dG8gbG8KICAgICAgaWZhY2UgbG8gaW5ldCBsb29wYmFjawogICAgICAKICAgICAgYXV0byBlbnMwCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMAogICAgICBpZmFjZSBlbnMwIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMQogICAgICBpZmFjZSBlbnMxIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMyCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMgogICAgICBpZmFjZSBlbnMyIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMzCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMwogICAgICBpZmFjZSBlbnMzIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM0CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNAogICAgICBpZmFjZSBlbnM0IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM1CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNQogICAgICBpZmFjZSBlbnM1IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM2CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNgogICAgICBpZmFjZSBlbnM2IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM3CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNwogICAgICBpZmFjZSBlbnM3IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM4CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOAogICAgICBpZmFjZSBlbnM4IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM5CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOQogICAgICBpZmFjZSBlbnM5IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxMAogICAgICBhbGxvdy1ob3RwbHVnIGVuczEwCiAgICAgIGlmYWNlIGVuczEwIGluZXQgZGhjcAoKIyMj"'
fi
fi
sleep $sequence
done
package de.ugoe.cs.rwm.mocci;
import static org.junit.Assert.assertTrue;
import org.eclipse.cmf.occi.core.Configuration;
import org.eclipse.cmf.occi.core.Link;
import org.eclipse.cmf.occi.core.OCCIFactory;
import org.eclipse.cmf.occi.core.impl.OCCIFactoryImpl;
import org.eclipse.cmf.occi.infrastructure.Compute;
import org.eclipse.cmf.occi.infrastructure.InfrastructureFactory;
import org.eclipse.cmf.occi.infrastructure.impl.InfrastructureFactoryImpl;
import org.junit.BeforeClass;
import org.junit.Test;
import org.modmacao.occi.platform.Componentlink;
import org.modmacao.occi.platform.PlatformFactory;
import org.modmacao.occi.platform.impl.PlatformFactoryImpl;
import monitoring.Datagatherer;
import monitoring.Dataprocessor;
import monitoring.Monitorableproperty;
import monitoring.MonitoringFactory;
import monitoring.Resultprovider;
import monitoring.Sensor;
import monitoring.impl.MonitoringFactoryImpl;
public class CreateMonitoringElementsTest {
@BeforeClass
public static void OCCIRegistrySetup() {
TestUtility.loggerSetup();
TestUtility.extensionRegistrySetup();
}
@Test
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();
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;
}
}
......@@ -5,47 +5,34 @@ 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.eclipse.epsilon.eol.exceptions.EolRuntimeException;
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 DeployHadoopMonitoringTest {
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";
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";
@BeforeClass
public static void OCCIRegistrySetup() {
public static void OCCIRegistrySetup() {
TestUtility.loggerSetup();
TestUtility.extensionRegistrySetup();
}
@Before
public void deprovisionEverything() {
CachedResourceSet.getCache().clear();
......@@ -56,27 +43,80 @@ public class DeployHadoopMonitoringTest {
}
@Test
public void deployHadoopWithNewMonitoring() {
public void deployHadoopWithCPUMonitoring() {
CachedResourceSet.getCache().clear();
System.out.println(OcciRegistry.getInstance().getRegisteredExtensions());
//Logger.getRootLogger().setLevel(Level.FATAL);
Path occiPath = Paths.get(ModelUtility.getPathToResource("occi/hadoopClusterNewExt.occic"));
Path occiPath = Paths.get(ModelUtility.getPathToResource("occi/hadoopClusterCPU.occic"));
Resource model = ModelUtility.loadOCCIintoEMFResource(occiPath);
Transformator trans = TransformatorFactory.getTransformator("OCCI2OCCI");
trans.transform(occiPath, occiPath);
OCCI2OPENSTACKTransformator trans2 = OCCI2OPENSTACKTransformator.getInstance();
try {
trans.transform(model, occiPath);
} catch (EolRuntimeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
model = ModelUtility.loadOCCIintoEMFResource(occiPath);
OCCI2OPENSTACKTransformator trans2 = new OCCI2OPENSTACKTransformator();
trans2.setTransformationProperties(manNWRuntimeId, sshKey, userData, manNWid);
trans2.transform(occiPath, occiPath);
try {
trans2.transform(model, occiPath);
} catch (EolRuntimeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
model = ModelUtility.loadOCCIintoEMFResource(occiPath);
Connector conn = new LocalhostConnector("localhost", 8080, "ubuntu");
MartDeployer deployer = new MartDeployer(conn);
deployer.deploy(occiPath);
assertTrue(TestUtility.equalsRuntime(occiPath, conn));
deployer.deploy(model);
assertTrue(TestUtility.equalsRuntime(model, conn));
}
@Test
public void deployHadoopWithCPUAndMemMonitoring() {
CachedResourceSet.getCache().clear();
System.out.println(OcciRegistry.getInstance().getRegisteredExtensions());
Path occiPath = Paths.get(ModelUtility.getPathToResource("occi/hadoopClusterNewExtWithMem.occic"));
Resource model = ModelUtility.loadOCCIintoEMFResource(occiPath);
Transformator trans = TransformatorFactory.getTransformator("OCCI2OCCI");
try {
trans.transform(model, occiPath);
} catch (EolRuntimeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
model = ModelUtility.loadOCCIintoEMFResource(occiPath);
OCCI2OPENSTACKTransformator trans2 = new OCCI2OPENSTACKTransformator();
trans2.setTransformationProperties(manNWRuntimeId, sshKey, userData, manNWid);
try {
trans2.transform(model, occiPath);
} catch (EolRuntimeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
model = ModelUtility.loadOCCIintoEMFResource(occiPath);
Connector conn = new LocalhostConnector("localhost", 8080, "ubuntu");
MartDeployer deployer = new MartDeployer(conn);
deployer.deploy(model);
assertTrue(TestUtility.equalsRuntime(model, conn));
}
}
package de.ugoe.cs.rwm.mocci;
import static org.junit.Assert.assertTrue;
import java.nio.file.Path;
import java.nio.file.Paths;
import org.eclipse.cmf.occi.core.Configuration;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.epsilon.emc.emf.CachedResourceSet;
import org.junit.Before;
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.LocalhostConnector;
public class MapeTest {
@BeforeClass
public static void OCCIRegistrySetup() {
TestUtility.loggerSetup();
TestUtility.extensionRegistrySetup();
}
@Before
public void resetEverything() {
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);
InitialDeployment.main(new String[0]);
}
@Test
public void Monitor() {
Monitor monitor = MAPE.monitor();
assertTrue(monitor.getAllCPUs() == 1);
}
@Test
public void Analyze() {
Monitor monitor = MAPE.monitor();
String analysis = MAPE.analyze(monitor);
if (monitor.getCritCPUs() == 1) {
assertTrue(analysis.equals("upScale"));
}
if (monitor.getNoneCPUs() == 1) {
assertTrue(analysis.equals("downScale"));
}
}
@Test
public void Plan() {
Monitor monitor = MAPE.monitor();
String analysis = MAPE.analyze(monitor);
Resource res = MAPE.plan(analysis);
if (analysis.equals("upScale")) {
Configuration pre = (Configuration) MAPE.runtimeModel.getContents().get(0);
Configuration post = (Configuration) res.getContents().get(0);
assertTrue(pre.getResources().size() < post.getResources().size());
}
}
@Test
public void Execute() {
Monitor monitor = MAPE.monitor();
String analysis = MAPE.analyze(monitor);
MAPE.runtimeModel = MAPE.plan(analysis);
MAPE.execute(MAPE.runtimeModel);
assertTrue(TestUtility.equalsRuntime(MAPE.runtimeModel, MAPE.conn));
}
@Test
public void Iterations() {
int iterations = 20;
int count = 0;
int interval = 1000;
while (count < iterations) {
try {
System.out.println("\n--------------------Waiting for new MAPE-K Cycle: Sleeping " + interval
+ "--------------------");
Thread.sleep(interval);
Monitor monitor = MAPE.monitor();
String analysis = MAPE.analyze(monitor);
MAPE.runtimeModel = MAPE.plan(analysis);
MAPE.execute(MAPE.runtimeModel);
count++;
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
......@@ -5,62 +5,48 @@ 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 ResolveProxyTest {
@BeforeClass
public static void OCCIRegistrySetup() {
public static void OCCIRegistrySetup() {
TestUtility.loggerSetup();
TestUtility.extensionRegistrySetup();
}
@Test
public void resolveProxies() {
Path newOCCI = Paths.get(de.ugoe.cs.rwm.docci.ModelUtility.getPathToResource("occi/hadoopClusterNewExt.occic"));
Path newOCCI = Paths
.get(de.ugoe.cs.rwm.docci.ModelUtility.getPathToResource("occi/hadoopClusterNewExtWithMem.occic"));
Resource ress = de.ugoe.cs.rwm.docci.ModelUtility.loadOCCIintoEMFResource(newOCCI);
@SuppressWarnings("unused")
ResourceSet resSet = ress.getResourceSet();
EList<EObject> newModel = de.ugoe.cs.rwm.docci.ModelUtility.loadOCCI(newOCCI);
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()));
}
}
}
......
package de.ugoe.cs.rwm.mocci;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
......@@ -10,29 +9,26 @@ import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;
import org.eclipse.cmf.occi.core.OCCIPackage;
import org.eclipse.cmf.occi.core.util.OcciRegistry;
import org.eclipse.cmf.occi.crtp.CrtpPackage;
import org.eclipse.cmf.occi.docker.DockerPackage;
import org.eclipse.cmf.occi.infrastructure.InfrastructurePackage;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
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.cocci.ComparatorFactory;
import de.ugoe.cs.rwm.docci.Deployer;
import de.ugoe.cs.rwm.docci.ModelUtility;
import de.ugoe.cs.rwm.docci.appdeployer.MartAppDeployerMaster;
import de.ugoe.cs.rwm.docci.appdeployer.MartAppDeployerSlave;
import de.ugoe.cs.rwm.docci.connector.Connector;
import de.ugoe.cs.rwm.docci.deprovisioner.Deprovisioner;
import de.ugoe.cs.rwm.docci.executor.Executor;
import de.ugoe.cs.rwm.docci.extractor.Extractor;
import de.ugoe.cs.rwm.docci.provisioner.Provisioner;
import de.ugoe.cs.rwm.docci.updater.ElementAdapter;
import de.ugoe.cs.rwm.tocci.Transformator;
import de.ugoe.cs.rwm.domain.workload.WorkloadPackage;
import modmacao.ModmacaoPackage;
import monitoring.MonitoringPackage;
import openstackruntime.OpenstackruntimePackage;
import ossweruntime.OssweruntimePackage;
import workflow.WorkflowPackage;
public class TestUtility {
public static void extensionRegistrySetup() {
......@@ -40,20 +36,22 @@ public class TestUtility {
OCCIPackage.eINSTANCE.eClass();
ModmacaoPackage.eINSTANCE.eClass();
OpenstackruntimePackage.eINSTANCE.eClass();
PlacementPackage.eINSTANCE.eClass();
WorkflowPackage.eINSTANCE.eClass();
OssweruntimePackage.eINSTANCE.eClass();
AnsibleconfigurationPackage.eINSTANCE.eClass();
MonitoringPackage.eINSTANCE.eClass();
CrtpPackage.eINSTANCE.eClass();
PlatformPackage.eINSTANCE.eClass();
WorkloadPackage.eINSTANCE.eClass();
DockerPackage.eINSTANCE.eClass();
OcciRegistry.getInstance().registerExtension("http://schemas.ugoe.cs.rwm/monitoring#",
MonitoringPackage.class.getClassLoader().getResource("model/monitoring.occie").toString());
//OcciRegistry.getInstance().registerExtension("http://schemas.ugoe.cs.rwm/monitoring#",
// MonitoringPackage.class.getClassLoader().getResource("model/monitoring.occie").toString());
OcciRegistry.getInstance().registerExtension("http://occiware.org/occi/docker#",
OCCIPackage.class.getClassLoader().getResource("model/docker.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.ugoe.cs.rwm/domain/workload#",
OCCIPackage.class.getClassLoader().getResource("model/workload.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/occi/platform#",
PlatformPackage.class.getClassLoader().getResource("model/platform.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/modmacao#",
ModmacaoPackage.class.getClassLoader().getResource("model/modmacao.occie").toString());
......@@ -67,29 +65,31 @@ public class TestUtility {
InfrastructurePackage.class.getClassLoader().getResource("model/Infrastructure.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.ogf.org/occi/core#",
OCCIPackage.class.getClassLoader().getResource("model/Core.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.ugoe.cs.rwm/workflow#",
OCCIPackage.class.getClassLoader().getResource("model/workflow.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/openstack/swe#",
OCCIPackage.class.getClassLoader().getResource("model/ossweruntime.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/occi/ansible#",
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());
OcciRegistry.getInstance().registerExtension("http://schemas.ogf.org/occi/infrastructure/compute/template/1.1#",
OCCIPackage.class.getClassLoader().getResource("model/crtp.occie").toString());
}
public static void loggerSetup() {
File log4jfile = new File(ModelUtility.getPathToResource("log4j.properties"));
PropertyConfigurator.configure(log4jfile.getAbsolutePath());
Logger.getLogger(Executor.class.getName()).setLevel(Level.DEBUG);
//Logger.getLogger(Extractor.class.getName()).setLevel(Level.DEBUG);
//Logger.getLogger(Provisioner.class.getName()).setLevel(Level.DEBUG);
Logger.getLogger(Comparator.class.getName()).setLevel(Level.DEBUG);
Logger.getLogger(Deprovisioner.class.getName()).setLevel(Level.INFO);
//Logger.getLogger(Connector.class.getName()).setLevel(Level.DEBUG);
//Logger.getLogger(ElementAdapter.class.getName()).setLevel(Level.INFO);
// Logger.getLogger(Extractor.class.getName()).setLevel(Level.DEBUG);
// Logger.getLogger(Provisioner.class.getName()).setLevel(Level.DEBUG);
// Logger.getLogger(Comparator.class.getName()).setLevel(Level.DEBUG);
// Logger.getLogger(Deprovisioner.class.getName()).setLevel(Level.INFO);
// Logger.getLogger(Connector.class.getName()).setLevel(Level.DEBUG);
// Logger.getLogger(ElementAdapter.class.getName()).setLevel(Level.INFO);
Logger.getLogger(Deployer.class.getName()).setLevel(Level.INFO);
Logger.getLogger(MartAppDeployerMaster.class.getName()).setLevel(Level.DEBUG);
Logger.getLogger(MartAppDeployerSlave.class.getName()).setLevel(Level.DEBUG);
//Logger.getLogger(Transformator.class.getName()).setLevel(Level.DEBUG);
// Logger.getLogger(MartAppDeployerMaster.class.getName()).setLevel(Level.DEBUG);
// Logger.getLogger(MartAppDeployerSlave.class.getName()).setLevel(Level.DEBUG);
// Logger.getLogger(Transformator.class.getName()).setLevel(Level.DEBUG);
}
public static boolean equalsRuntime(Path desiredModelPath, Connector conn) {
......@@ -122,5 +122,34 @@ public class TestUtility {
}
return assertion;
}
public static boolean equalsRuntime(Resource desiredModel, Connector conn) {
Path deployedOCCI = Paths.get(System.getProperty("user.home") + "/.rwm/runtime.occic");
conn.loadRuntimeModel(deployedOCCI);
org.eclipse.emf.ecore.resource.Resource runtimeModel = ModelUtility.loadOCCIintoEMFResource(deployedOCCI);
Comparator comp = ComparatorFactory.getComparator("Simple", desiredModel, runtimeModel);
boolean assertion = true;
System.out.println("MISSING ELEMENTS:");
for (EObject obj : comp.getMissingElements()) {
// Network check due to provider network
if (obj.eClass().getName().equals("Network") == false) {
System.out.println(obj);
assertion = false;
}
}
System.out.println("NEW ELEMENTS:");
for (EObject obj : comp.getNewElements()) {
// Network check due to provider network
if (obj.eClass().getName().equals("Network") == false) {
System.out.println(obj);
assertion = false;
}
}
return assertion;
}
}
......@@ -5,34 +5,19 @@ 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.eclipse.epsilon.eol.exceptions.EolRuntimeException;
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.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;
import monitoring.MonitoringPackage;
public class DeployHadoopMonitoringTestLive {
String manNWid = "urn:uuid:29d78078-fb4c-47aa-a9af-b8aaf3339590";
......@@ -40,14 +25,12 @@ public class DeployHadoopMonitoringTestLive {
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() {
public static void OCCIRegistrySetup() {
TestUtility.loggerSetup();
TestUtility.extensionRegistrySetup();
}
@Before
public void deprovisionEverything() {
CachedResourceSet.getCache().clear();
Path occiPath = Paths.get(ModelUtility.getPathToResource("occi/Empty.occic"));
......@@ -59,22 +42,31 @@ public class DeployHadoopMonitoringTestLive {
@Test
public void deployHadoopWithNewMonitoring() {
CachedResourceSet.getCache().clear();
Path occiPath = Paths.get(ModelUtility.getPathToResource("occi/hadoopClusterNewExt.occic"));
Path occiPath = Paths.get(ModelUtility.getPathToResource("occi/hadoopClusterNewExtWithMem.occic"));
Transformator trans = TransformatorFactory.getTransformator("OCCI2OCCI");
trans.transform(occiPath, occiPath);
OCCI2OPENSTACKTransformator trans2 = OCCI2OPENSTACKTransformator.getInstance();
try {
trans.transform(occiPath, occiPath);
} catch (EolRuntimeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
OCCI2OPENSTACKTransformator trans2 = new OCCI2OPENSTACKTransformator();
trans2.setTransformationProperties(manNWRuntimeId, sshKey, userData, manNWid);
trans2.transform(occiPath, occiPath);
try {
trans2.transform(occiPath, occiPath);
} catch (EolRuntimeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
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));
}
......
package de.ugoe.cs.rwm.mocci.live;
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;
public class EmptyTestLive {
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();
}
@Test
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);
}
}
/**
*
*/
/**
* Main package that includes MOCCI live tests.
*
* @author erbel
*
*/
package de.ugoe.cs.rwm.mocci.live;
No preview for this file type
No preview for this file type