GithubHelp home page GithubHelp logo

occiware / ecore Goto Github PK

View Code? Open in Web Editor NEW
13.0 20.0 8.0 101.79 MB

Ecore meta-model and examples

Java 90.99% Shell 0.15% Xtend 2.51% GAP 1.44% Erlang 0.01% Alloy 4.91%
occi ecore-metamodel occi-meta-model occi-dynamic-extensions java emf infrastructure docker ecore runtime

ecore's People

Contributors

barais avatar diarraa avatar fifiant avatar fzalila avatar maelaudren avatar mehdiahmed avatar philippemerle avatar vincent-zurczak avatar wpiers avatar xia0ben avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ecore's Issues

Errors in infrastructure.occie

File .....infrastructure/model/ infrastructure.occie contains several errors:

  • the type of the attribute "occi.network.state" of the network kind must be NetworkStatus instead of ComputeStatus
  • the default of some attributes must not be defined instead of setting with an empty string.

On create resource and link diagram, id should be a generated unique identifier (uuid)

Hello,

On OCCI specification document (GFD.185 - RESTful HTTP Rendering, section 3.1 - p6), the id representing a resource must be identified with a unique UUID.
For server usage and saving resource purpose, CloudDesigner should generate an uuid (v4?) on id to replace "r1", "r2", "rN".
The method is fairly simple like this :

public static String createUUID() {
        return UUID.randomUUID().toString();
}

The attribute "occi.core.id" must be set as given by the spec with urn.

Factorizing code between generators

All the Cloud Designer generators have some common Acceleo services like getNow(), getFilePath(), getFileName(), etc. These services are currently duplicated in each generator.
These services could be shared in the project clouddesigner.occi in order to avoid code duplication.

OCCI editor can not open Docker configurations

OCCI editor can only open OCCI configurations containing both OCCI Resource and Link objects.
OCCI editor can not open configurations containing instances of sub-classes of both Resource and Link.
This is due to a strong limitation of XText.

[ OCCIE Modeller ] Attribute edition bugs

Affected version: Cloud Designer 0.1.0.201602261035

  1. Create an OCCI extension.
  2. Add a kind and an attribute to this kind (by default, it is called attribute1: String).
  3. Click the attribute to edit it (example: name: String).
  4. Type in 'Enter'. The modeler shows name: String: String.
  5. Try to edit it again and again, you will keep the same label. 😢
    It is necessary to use the Xtext (or a text) editor to fix it.

[ XText editor for OCCI Extensions ] Error messages and warnings are not clear

Affected version: Cloud Designer 0.1.0.201602261035

  1. Create a new OCCi extension.
  2. Add a new kind on the diagram (without any relation to anything).
  3. Save and close the graphical modeler.
  4. Open the occie file with the XText editor.

Warnings appear with the following message.

The 'Kind::EntityKindIsRootParent' constraint is violated for
   'org.occiware.clouddesigner.occi.impl.KindImpl@73da9db7{platform:/resource/occi-extension-for-roboconf-graph/model/roboconf.occie#/0/@kinds[term='RoboconfComponent']}'

This message indicates a constraint on the meta-model is violated.
But a user would expect something he can understand. Messages should be clear.

Curl generator server address

Hello,

I had generated a curl schell script with designer, and i have the value on my generated script :
OCCI_SERVER_URL=$1

I need to have for example :
OCCI_SERVER_URL=http://localhost:8080

Is it possible to add a textfield somewhere in designer for adding this value ?

The extension modeler is marked as dirty on first opening

Affected version: Cloud Designer 0.1.0.201602261035

  1. Create a new extension project.
  2. The wizards completes by opening the extension file in the modeler. But the Eclipse editor is marked as dirty.
  3. Save and close the file.
  4. Reopen it. The editor is marked as dirty, again, while no modification was made by the user.

Clouddesigner erro when generated EMF Tooling

When I'm trying to generate the "EMF Tooling" from the Clouddesigner I got this error:

java.lang.NullPointerException
    at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.setDefaultValue(EStructuralFeatureImpl.java:161)
    at org.occiware.clouddesigner.occi.emfgen.OCCIExtension2Ecore.convertAttribute(OCCIExtension2Ecore.java:156)
    at org.occiware.clouddesigner.occi.emfgen.OCCIExtension2Ecore.convertKind(OCCIExtension2Ecore.java:113)
    at org.occiware.clouddesigner.occi.emfgen.OCCIExtension2Ecore.convertExtension(OCCIExtension2Ecore.java:62)
    at org.occiware.clouddesigner.occi.emfgen.ui.popup.actions.ConvertAction.generateEMFModels(ConvertAction.java:147)
    at org.occiware.clouddesigner.occi.emfgen.ui.popup.actions.ConvertAction.run(ConvertAction.java:90)
    at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:247)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4230)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1491)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1514)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1499)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1299)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4072)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3698)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1488)

Do you have any idea ?

Compositing Sirius designers

OCCIware Cloud Designer will provide several Sirius-based designers:

  • OCCI Designer for both OCCI extensions and configurations
  • Docker Designer for Docker configurations
  • Infrastructure Designer for Infrastructure configurations
  • Roboconf Designer for Roboconf configurations
  • etc.

At the end, this will be nice to allow to easily compose several designers to build a new one.
For instance, a designer allowing to define OCCI configurations mixing Docker, Infrastructure, Roboconf, etc. entities.

fragmentation of configuration files

The goal of this task is to find a way to fragment a configuration file into several files.
Then a configuration fragment could be reused into different configurations.
The configuration of a single resource could be split into different files, for instance, one file by concerns like simulation, sla, monitoring, security, etc.

generate xml & textile files with no type or title on eclipse mars

After running the generator (on eclipse Mars), the files contain the definition for DataTypes, Kinds, etc., but in the attributes the types and titles are not inserted.

see below eclipse logs:
!ENTRY org.eclipse.acceleo.engine 2 2 2015-08-18 12:41:44.994
!MESSAGE Undefined argument a.type.instanceClassName of invocation at line 0 in Module generate for block toXMLtype(a.type.instanceClassName). Last recorded value of self was org.occiware.clouddesigner.occi.impl.AttributeImpl@235ebba9 (name: occi.core.summary, mutable: true, required: false, default: null, description: A summarising description of the Resource instance., multiple_values: false). Problem found while generating the file '/occiware/workspace/dev-tools/eclipse/samples/org.occiware.linkeddata/src-gen/xml/core.xml'.
!STACK 0
org.eclipse.acceleo.engine.AcceleoEvaluationException: Undefined argument a.type.instanceClassName of invocation at line 0 in Module generate for block toXMLtype(a.type.instanceClassName). Last recorded value of self was org.occiware.clouddesigner.occi.impl.AttributeImpl@235ebba9 (name: occi.core.summary, mutable: true, required: false, default: null, description: A summarising description of the Resource instance., multiple_values: false). Problem found while generating the file '/occiware/workspace/dev-tools/eclipse/samples/org.occiware.linkeddata/src-gen/xml/core.xml'.
at generate.attribute(Attribute)(generate.mtl:0)
at generate.attribute(Attribute)(generate.mtl:64)
at generate.kind(Kind)(generate.mtl:0)
at generate.kind(Kind)(generate.mtl:37)
at generate.kind(Kind)(generate.mtl:31)
at generate.extension(Extension)(generate.mtl:0)
at generate.extension(Extension)(generate.mtl:21)
at generate.extension(Extension)(generate.mtl:13)
at generate.extension(Extension)(generate.mtl:12)
at generate.main(Extension)(generate.mtl:0)
at generate.main(Extension)(generate.mtl:7)
at generate.main(Extension)(generate.mtl:4)

Cloud Designer User's Guide

Need to produce the Cloud Designer User's Guide.
This guide will present how users ould use all the features of Cloud Designer:

  • Create a new OCCI extension
  • Create a new OCCI configuration
  • OCCI Designer
  • OCCI Editor
  • Textile documentation generator
  • XML erocci generator
  • Curl-based script generator
  • Docker Designer
  • Docker scripts generator
  • etc.

Migrating to Docker 1.9

Docker 1.9 offers a new feature to manage Docker Network allowing to create private networks and connect containers to networks.

Using OCCI schemes instead of referencing .occie files

Currently, both OCCI extension and configuration XMI files reference .occie files explicitly, e.g.:
href="platform:/plugin/org.occiware.clouddesigner.occi/model/Core.occie#//..."
This should be replaced by:
href="http://schemas.ogf.org/occi/core#//..."
Advantages:

  • OCCI files will not depend anymore of the location of other OCCI extension files.
  • A module containing an OCCI extension could be renamed without breaking all OCCI files referencing this OCCI extension.

Investigating how using CDO with Cloud Designer

Cloud Designer contains a local registry storing OCCI extension models.
This local registry could be connected to a global registry shared between all Cloud Designer instances.
This global registry can be deployed somewhere in the clouds and could be implemented with Eclipse CDO.

Cloud Modeler

Hi @wpiers, I am trying to design the cloud modeler.

Based on my Cloud.odesign file, when I uploaded the metamodels inside my "Cloud configuration", my Cloud.ecore file is becoming wrong (Machine -> null and Machine_openStack attributes are also null) as shown in the figure bellow:

conf

This is the ecore file generated by the EMF Tool: https://gist.github.com/fifiant/35c9d48a4a7e9fe3a34f

Thank.

Cloud Designer Developer's Guide

Need to produce the Cloud Designer Developer's Guide.
This guide will present how developers could extend Cloud Designer:

  • Create a new OCCI extension specific Designer
  • Develop a new generator
  • Develop a new connector
  • etc.

Add a generator of erocci-dbus-java backends

This generator will generate an Eclipse project containing the skeleton of an erocci-dbus-java backend.
Then the skeleton could be completed with business code, which implements actions.
This is also related to #31
Issue raised by Pierre-Yves Gibello (Linagora).
Olivier Barais said he will work on this generator.

Generate all (project Properties-configured) generators at once, up to plug it in the Eclipse Build

Idea: an OCCIware Studio user very probably always needs to trigger the same set of generators, so let's avoid him having to click on all of those all the time.

Solution:

  • step 1: a single "generate all" button that triggers all generators
  • step 2: for each project, let the user specify in Eclipse Project Properties the set of generators that it only needs (to be generated by "generate all"). HOWEVER BEWARE not having everything generated may remove some configuration capabilities at runtime...
  • step 3: plug "generate all" in the Eclipse build framework, so that it is triggered on each .occie/c file save.

Unable to generate EMF tooling (case error)

Affected version: Cloud Designer 0.1.0.201602261035

  1. Create an OCCI extension whose name is Roboconf.
  2. Verify the occie file is named roboconf.occie.
  3. Try to generate the EMF tooling.

No error message is shown.
But the error logs indicates...

org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: java.io.FileNotFoundException: /home/vzurczak/workspaces/occiware/occi-extension-for-roboconf-graph/model/Roboconf.occie (Aucun fichier ou dossier de ce type)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406)
    at org.occiware.clouddesigner.occi.emfgen.ConverterUtils.getRootElement(ConverterUtils.java:59)
    at org.occiware.clouddesigner.occi.emfgen.ui.popup.actions.ConvertAction.generateEMFModels(ConvertAction.java:127)
    at org.occiware.clouddesigner.occi.emfgen.ui.popup.actions.ConvertAction.run(ConvertAction.java:90)
    at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:247)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4481)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1329)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3819)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3430)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
Caused by: java.io.FileNotFoundException: /home/vzurczak/workspaces/occiware/occi-extension-for-roboconf-graph/model/Roboconf.occie (Aucun fichier ou dossier de ce type)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(FileInputStream.java:195)
    at java.io.FileInputStream.<init>(FileInputStream.java:138)
    at org.eclipse.emf.ecore.resource.impl.FileURIHandlerImpl.createInputStream(FileURIHandlerImpl.java:99)
    at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
    at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1269)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
    ... 35 more

The action is looking for a file called Roboconf.occie while it is called roboconf.occie.
As a general matter, when generation fails, a message dialog should be shown indicating what happened and pointing to the error log for more details.

Extension2Ecore - adding support for mixins

Currently the model transformation from OCCI Extension to Ecore EPackage does not support OCCI Mixins. This must be added asap.

This will be required when supporting Docker Network as both mixins ipnetwork and ipnetworking from OCCI infrastructure will be required.

Docker Designer

  1. Update "new Docker configuration" to "new Docker diagram"
  2. Reorganize the palette
    • Machine/ contains all Machines
    • Network/ contains all related to Network
    • Container/ contains all related to Container

OCCI extension (occie) to ecore

Hello,

After generating OCCI extension (extension.occie) following new -> Cloud Designer -> OCCI extension Project, I don't have the possibility to generate extension.ecore from extension.occie. Even if I use
Cloud Designer -> Generate EMF Tooling.

I'm using Eclipse Mars.1 in Ubuntu 14.04 LTS.

Kind names with spaces in OCCIE modeler => XText editor failure

Affected version: Cloud Designer 0.1.0.201602261035

  1. Create a new OCCI extension and open the OCCIE modeler.
  2. Add a kind called "deploy on".
  3. Save and close.
  4. Try to open the occie file with the XText editor.

The editor fails to open the file (Editor could not be initialized).
Details:

java.lang.RuntimeException: ID 'deployed on' contains invalid characters: ' ' (0x20)
Semantic Object: Extension'Roboconf'.kinds[2]->Kind
    at org.eclipse.xtext.serializer.diagnostic.ISerializationDiagnostic$ExceptionThrowingAcceptor.accept(ISerializationDiagnostic.java:77)
    at org.eclipse.xtext.serializer.tokens.ValueSerializer.serializeAssignedValue(ValueSerializer.java:67)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.getToken(SequenceFeeder.java:462)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:220)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:408)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:454)
    at org.occiware.clouddesigner.occi.xtext.serializer.AbstractOCCISemanticSequencer.sequence_KindDecl(AbstractOCCISemanticSequencer.java:207)
    at org.occiware.clouddesigner.occi.xtext.serializer.AbstractOCCISemanticSequencer.createSequence(AbstractOCCISemanticSequencer.java:86)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:299)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:325)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:239)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:401)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:454)
    at org.occiware.clouddesigner.occi.xtext.serializer.AbstractOCCISemanticSequencer.sequence_ExtensionDecl(AbstractOCCISemanticSequencer.java:198)
    at org.occiware.clouddesigner.occi.xtext.serializer.AbstractOCCISemanticSequencer.createSequence(AbstractOCCISemanticSequencer.java:83)
    at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:86)
    at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:109)
    at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:133)
    at org.eclipse.xtext.resource.XtextResource.doSave(XtextResource.java:354)
    at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1430)
    at org.occiware.clouddesigner.occi.xtext.ui.OCCIDocumentProvider.setDocumentContent(OCCIDocumentProvider.java:42)
    at org.eclipse.ui.editors.text.FileDocumentProvider.setDocumentContent(FileDocumentProvider.java:426)
    at org.eclipse.xtext.ui.editor.model.XtextDocumentProvider.setDocumentContent(XtextDocumentProvider.java:195)
    at org.eclipse.ui.editors.text.StorageDocumentProvider.createDocument(StorageDocumentProvider.java:229)
    at org.eclipse.xtext.ui.editor.model.XtextDocumentProvider.createDocument(XtextDocumentProvider.java:140)
    at org.eclipse.ui.editors.text.FileDocumentProvider.createElementInfo(FileDocumentProvider.java:737)
    at org.eclipse.xtext.ui.editor.model.XtextDocumentProvider.createElementInfo(XtextDocumentProvider.java:263)
    at org.eclipse.ui.texteditor.AbstractDocumentProvider.connect(AbstractDocumentProvider.java:400)
    at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4233)
    at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:237)
    at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1480)
    at org.eclipse.ui.editors.text.TextEditor.doSetInput(TextEditor.java:169)
    at org.eclipse.xtext.ui.editor.XtextEditor.doSetInput(XtextEditor.java:247)
    at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3220)
    at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:463)
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:371)
    at org.eclipse.ui.internal.WorkbenchWindow$14.run(WorkbenchWindow.java:2156)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2152)
    at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3238)
    at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3265)
    at org.eclipse.xtext.ui.editor.XtextEditor.init(XtextEditor.java:288)
    at org.eclipse.ui.internal.EditorReference.initialize(EditorReference.java:361)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:319)
    at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
    at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:898)
    at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:879)
    at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:121)
    at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:345)
    at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:264)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:104)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:73)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:55)
    at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:129)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:971)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:640)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:746)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:717)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:711)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:695)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$1.handleEvent(PartServiceImpl.java:99)
    at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40)
    at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:186)
    at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145)
    at org.eclipse.swt.widgets.Display.syncExec(Display.java:4633)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211)
    at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36)
    at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
    at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
    at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
    at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
    at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:85)
    at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:59)
    at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
    at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:171)
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:494)
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:458)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:724)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:396)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1166)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3234)
    at org.eclipse.ui.internal.WorkbenchPage.access$25(WorkbenchPage.java:3149)
    at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:3131)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3126)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3090)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3080)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:541)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:500)
    at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:360)
    at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:167)
    at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:268)
    at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:233)
    at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
    at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4481)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1329)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3819)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3430)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1488)

Either spaces are allowed in kind names, and then the XText editor should not fail in opening such a file. Or it is forbidden and the modeler should prevent the user from typing such characters.

Add a jOCCI-based connector

This connector will allow to interact with OCCI servers (erocci and rOCCI):

  • import OCCI entities from an OCCI server
  • create/read/update/delete OCCI entities hosted by an OCCI server
  • execute OCCI actions on OCCI entities

This connector will be based on jOCCI, a Java-based OCCI client library.

Curl generator : some attributes are not included

Hello,
When i generate my curl script from my infrastructure configuration, some attributes are not include in the shell script.
For ex : i create a resource like this :

resource "vm1/e00cfdb8-0a74-488c-ae2e-234068337948" : infrastructure.compute
mixins infrastructure.os_tpl {
    state occi.core.id = "e00cfdb8-0a74-488c-ae2e-234068337948"
    state occi.compute.architecture = "x64"
    state occi.compute.hostname = "occiwareInstanceWeb"
    state occi.compute.speed = "3"
    state occi.compute.memory = "4"
    state occi.compute.state = "inactive"

Generated script give me :
curl $CURL_OPTS -X PUT $OCCI_SERVER_URL/compute/vm1/e00cfdb8-0a74-488c-ae2e-234068337948 -H 'Content-Type: text/occi' -H 'Category: compute; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="kind", os_tpl; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="mixin";' -H 'X-OCCI-Attribute: occi.core.id="e00cfdb8-0a74-488c-ae2e-234068337948"'
Only the attributes "occi.core.id" is included. The others have disappear.
infratest.zip

Restructure documentation

We must merge all existing docs into one, here is what could be the structure :
clouddesigner/org.occiware.clouddesigner.doc
"User guide"
dl & install studio (https://github.com/occiware/dev-tools/blob/master/eclipse/README.md)
basic tuto (attached pdf)
linkdata tuto (https://github.com/occiware/dev-tools/blob/master/eclipse/README.md)
"Developer guide"
acceleo (https://github.com/occiware/dev-tools/blob/master/eclipse/README.md)
install sources (https://github.com/occiware/dev-tools/blob/master/eclipse/README.md)

clouddesigner/org.occiware.clouddesigner.occi.connector.jocci.doc (https://github.com/occiware/ecore/blob/master/clouddesigner/org.occiware.clouddesigner.occi.connector.jocci/README.md)

Any plugin, like the jocci connector, requiring aspecific doc, might have its own .doc plugin next.

XML generation misses attribute types (causing erocci parse error + crash)

Considering the definition below in .occie extension:

kind instance extends core.resource {
title "Instance"
attribute roboconf.overriddenExports : Map
}
datatype Map : "java.util.HashMap"

The XML generation produces the following element for roboconf.overriddenExports attribute:

<occi:attribute name="roboconf.overriddenExports" immutable="true" use="optional" type="" title=""/>

The type is empty (should it be "Map" ??). If the XML is used as an Erocci schema, it causes a parse error then Erocci crashes.

Adding an Alloy generator

This generator will translate OCCI extensions (.occie) to Alloy specifications (.als).
These Alloy specifications would be used for verification of OCCI extensions,
especially verification of behavioural aspects.

Split the Modeler

Split the docker modeler into two. The idea is to have one designer that will use only to design and the second one to design and running it inside the execution environment.

Generate Erocci backend java project

Ci-dessous, une description de ce qu'il faudrait générer... avec un exemple d'appli et de schéma appelé "Roboconf".

A chaque fois que le schéma Roboconf.xml contient une entrée comme çà (déclaration de kind) :
<occi:kind term="instance" scheme="http://schemas.occiware.org/roboconf#" title="Instance">

attachments.zip

Il faut générer une classe RoboconfInstanceEntity (donc, Entity.java) comme suit (remplacer "Roboconf" par et Instance par ) :

package org.occiware.roboconf.erocci.backend;

import java.util.List;
import java.util.Map;
import java.util.logging.Logger;

import org.ow2.erocci.model.Entity;

/**

  • OCCI entity that represents a Roboconf instance (OCCI kind "instance").
    */
    public class RoboconfInstanceEntity extends Entity {

    private Logger logger = Logger.getLogger(this.getClass().getName());

    public RoboconfInstanceEntity(String id, int type, String kind,
    List mixins, Map<String, String> attributes, String owner, int serial) {
    super(id, type, kind, mixins, attributes, owner, serial);
    }

    // Specific code to be inserted here...

    @OverRide
    public void occiPostCreate() {
    // TODO Auto-generated method stub
    logger.info("Roboconf Instance occiPostCreate());
    }

    @OverRide
    public void occiPostUpdate(Map<String, String> attributes) {
    // TODO Auto-generated method stub
    logger.info("Roboconf Instance occiPostUpdate());
    }

    @OverRide
    public void occiPreDelete() {
    // TODO Auto-generated method stub
    logger.info("Roboconf Instance occiPreDelete()");
    }

}

Il faut aussi générer 2 autres classes (au total, quel que soit le nombre de kind) :

Une classe RoboconfDBusService (DBusService), comme suit :

package org.occiware.roboconf.erocci.backend;

import org.ow2.erocci.backend.BackendDBusService;

/**

  • Roboconf erocci backend DBus service implementation.

  • @author Pierre-Yves Gibello - Linagora
    *
    */
    public class RoboconfDBusService extends BackendDBusService{

    public static void main(String[] args) {
    new RoboconfDBusService()
    .setSchema(RoboconfDBusService.class.getResourceAsStream("/Roboconf.xml"))
    .setDefaultEntityFactory(new RoboconfEntityFactory())
    .start("org.occiware.roboconf.erocci.backend");
    }

}

Et une classe RoboconfEntityFactory (<NomduschemaEntityFactory), qui contient un bloc de "IF" pour chaque kind, comme suit :

package org.occiware.roboconf.erocci.backend;

import java.util.List;
import java.util.Map;

import org.ow2.erocci.model.Entity;
import org.ow2.erocci.model.EntityFactory;

/**

  • Entity factory to create Roboconf OCCI entities.
    */
    public class RoboconfEntityFactory implements EntityFactory {

    @OverRide
    public Entity newEntity(String id, int type, String kind,
    List mixins, Map<String, String> attributes, String owner,
    int serial) {

    if(kind.endsWith("#instance")) {
        return new RoboconfInstanceEntity(id, type, kind, mixins, attributes, owner, serial);
    } else { //default
        return null;
    }
    

    }

}

Enfin, j'attache les fichiers pom.xml et erocci-dbus-java.config, à générer à la racine du projet.
En n'oubliant pas le schéma généré par le studio (Roboconf.xml), à poser dans src/main/resources .

Le projet final ressemblera donc à çà (quand il y a N kind, il contient N+2 classes) :

roboconf-erocci-backend/
├── pom.xml
├── roboconf-erocci-backend.config
└── src
└── main
├── java
│ └── org
│ └── occiware
│ └── roboconf
│ └── erocci
│ └── backend
│ ├── RoboconfDBusService.java
│ ├── RoboconfEntityFactory.java (avec un bloc "if" pour chaque kind)
│ └── RoboconfInstanceEntity.java (une classe RoboconfEntity par kind !)
└── resources
└── Roboconf.xml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.