OCCI-Studio is a set of Eclipse plugins implementing the current Open Cloud Computing Interface (OCCI) specification.
You can refer to the following materials in order to familiarize with OCCI-Studio:
OCCI Studio
License: Eclipse Public License 1.0
OCCI-Studio is a set of Eclipse plugins implementing the current Open Cloud Computing Interface (OCCI) specification.
You can refer to the following materials in order to familiarize with OCCI-Studio:
When we create an extension configuration, the resolveKind() method is invoked.
If the concerned extension is not registered, the resolveKind() add in the namespace2extension map the metamodelURI associated to the Core OCCI extension.
It is wrong (an error: term is not found into extension) but necessary to load the resource.
Once the OCCI extension is registered, the error always appears.
A possible solution consists to update the namespace2extension map when a new extension is registered.
Model changes are not taken into account in designer, requires OCCI-Studio workspace and redoing extension completely ;_; Even when deleting inner eclipse's workspace and deleting & regenerating .ecore, .genmodel, src, .edit, .designer & registering extension. Doing all that even ends with having an empty palette or worse, having a representations.aird that can't open anymore and therefore no more sirius instance diagrams at all.
Eclipse logs showed a "no viewpoint for openshift" error, but I don't have them anymore, since I had to delete my OCCI-Studio workspace THRICE (like it had been installed anew) until I had the changes I wanted in tje OpenShift extension.
This is maybe rather an enhancement than a bug, but it really kills productivity.
Add a new OcciException on throws signature on CRUD methods
Referenced on MartServer Issue as well : occiware/MartServer#50
Replace Eclipse by "OCCI Studio"
Hello,
I find a major problem with import extension feature :
I use after Extensions Registry and i import the registered and desired extension.
Missing materials.zip at https://drive.google.com/file/d/0B7zqdAuZr708ZFdoVEtvaUJ1V2c/view linked from README.
Hello,
Adding a json generator will be an added value to perform occi task on runtime (MartServer and others).
First step : migrate json part from MartServer to OCCI core (studio), in MartServer, json objects will be used from occi core dependency.
Second step : add a new json generator project to OCCI-Studio to perform curl operations with json format.
Third step : Add a feature to import OCCI json and create automatically the configuration model.
Recently, the build process of OCCI-Studio fails.
It is strange because the process finishes successfully on our local machines (me and @cgourdin).
The log of Travis shows:
Killed
The command "sh travis/build.sh" exited with 137.
According to several posts (post1, post2), this behavior is due to running out of memory.
Any idea about that?
Hello,
When i generate a connector with "new connector java project" wizard from my extension i have this error :
Before generating, i use the register command OCCI-Studio-->Register OCCI extension.
It is maybe related to issue #10 .
Currently, the label of mixin bases inside resource containers are in 10 points but should be in 12 points. The label of mixin bases inside link containers seems to be already in 12 points.
After creating my model through the visual interface I clicked on the .occie file and select "Generate EMF tooling"
Then I updated the model then I regenerated the EMF tooling. As a consequence two line are added to my generated source code each time I use the generation.
Those lines are :
createEOperation(providerEClass, PROVIDER___APPLIES_CONSTRAINT__DIAGNOSTICCHAIN_MAP_1);
and
createEOperation(credentialsEClass, CREDENTIALS___APPLIES_CONSTRAINT__DIAGNOSTICCHAIN_MAP_1);
In my model, provider and credentials are mixins and the number goes to 2, 3, etc each time I click on generate.
Removing those lines enable to fix the compilation issue introduced.
Hello,
Textile rendering fail with mixin table.
I've notice it is due to a lost carriage return after the table (depends or applied to).
| *Term* | copys3object |
| *Scheme* | http://occiware.org/occi/infrastructure/aws/s3# |
| *Title* | |
**Carriage returned here !**
Depends on:
* <a href="s3.textile#mixin-s3objectmetadatas">http://occiware.org/occi/infrastructure/aws/s3#s3objectmetadatas</a>
Applies to:
* <a href="s3.textile#kind-bucketlink">http://occiware.org/occi/infrastructure/aws/s3#bucketlink</a>
Thanks in advance to add a carriage return after the table as in this exemple.
Hello,
Objective : Implement complex datatypes on MartServer.
I have problems setting attributes with OCCIHelper, complex type are not eAttributeType but are ReferenceImpl type, i use OCCIHelper.setAttributes method with AttributeStates object but for complex type i can't pass attributeStates because its not a generic attribute type.
It throws IllegalArgumentException : Ecore structural feature 'arrayTest' is not an Ecore attribute!
My extension is set as this :
I have another question :
For my rendering output with json i need an ecore eValue object, as i don't have an EAttributeType, i can't obtain the instance value of the attribute.
for Example i want to render from my extension : arrayTest and counterRecord from my entity.
/**
* Read attributes from entity (used by link and resource) from attributeState list and return an attribute map.
* @param readAttrs
* @param entity
* @return
*/
private Map<String, Object> readAttributesToAttributesMap(final List<AttributeState> readAttrs, final Entity entity) {
Map<String, Object> attributes = new LinkedHashMap<>();
for (AttributeState attr : readAttrs) {
String key = attr.getName();
String val = attr.getValue();
boolean complexType = false;
if (val != null) {
if (!key.equals(Constants.OCCI_CORE_SUMMARY) && !key.equals(Constants.OCCI_CORE_TITLE)
&& !key.equals(Constants.OCCI_CORE_ID)
&& !key.equals(Constants.OCCI_CORE_SOURCE)
&& !key.equals(Constants.OCCI_CORE_TARGET)) {
EDataType eAttrType = null;
// Determine attribute type.
Optional<EDataType> optEDataType = EntityManager.getEAttributeType(entity, key);
Optional<Object> optEValue = EntityManager.getEMFValueObject(entity, key);
Object eValue = null;
if (optEValue.isPresent()) {
eValue = optEValue.get();
}
if (optEDataType.isPresent()) {
eAttrType = optEDataType.get();
}
// Specific to EEnum, must be rendered as String.
if (eAttrType != null && eAttrType instanceof EEnum) {
System.out.println("Attribute : " + key + " is an enum, render as String, value : " + val);
attributes.put(key, val);
continue;
}
if (eAttrType == null) {
LOGGER.warn("Unknown type for attribute: " + key + " value: " + val);
// Display as a string for all others.
attributes.put(key, val);
continue;
}
if (eValue == null) {
// Get default eValue.
eValue = eAttrType.getDefaultValue();
if (eValue != null) {
System.out.println("Default value : " + eValue.toString());
} else {
System.out.println("No value and no default value for " + key + " val:" + val);
// Render if its a number or if its a String.
Optional<Number> optNum = EntityManager.getAttrValueNumber(entity, key, val);
if (optNum.isPresent()) {
attributes.put(key, optNum.get());
} else {
attributes.put(key, val);
}
continue;
}
}
attributes.put(key, eValue);
}
}
}
return attributes;
}
Helper methods to get eAttributeType :
/**
* Return an ecore type from attribute name and entity object.
*
* @param entity
* @param attrName
* @return
*/
public static Optional<EDataType> getEAttributeType(Entity entity, String attrName) {
EDataType eDataType = null;
String eAttributeName = Occi2Ecore.convertOcciAttributeName2EcoreAttributeName(attrName);
final EStructuralFeature eStructuralFeature = entity.eClass().getEStructuralFeature(eAttributeName);
if (eStructuralFeature != null) {
if ((eStructuralFeature instanceof EAttribute)) {
// Obtain the attribute type.
eDataType = ((EAttribute) eStructuralFeature).getEAttributeType();
}
}
return Optional.ofNullable(eDataType);
}
To get attribute object value :
/**
* @param entity
* @param attrName
* @return an object container value from EMF attribute object.
*/
public static Optional<Object> getEMFValueObject(Entity entity, String attrName) {
EAttribute eAttr;
Object result = null;
String eAttributeName = Occi2Ecore.convertOcciAttributeName2EcoreAttributeName(attrName);
final EStructuralFeature eStructuralFeature = entity.eClass().getEStructuralFeature(eAttributeName);
if (eStructuralFeature != null) {
if ((eStructuralFeature instanceof EAttribute)) {
eAttr = (EAttribute) eStructuralFeature;
result = entity.eGet(eAttr);
}
}
return Optional.ofNullable(result);
}
I'm lost here, so my main question how to manage (set and get) complex datatypes and value objects programmatically ?
Hello,
I had a problem with FSM on my aws infrastructure extension (ec2), i have created a FSM for instance EC2 with action provided by compute (start, restart etc.).
OCL give me errors on my design and specifies me that it is forbidden :
Is this really forbidden ?
Has a workaround i use my own actions on instance EC2 but its not OCCI infrastructure compliant.
The generated textual DSL is missing indentation, all is in a single line.
Hello,
After generating EMF tools, i have errors on my ec2 extension :
On Ec2Tables.java :
And on Impl package this create an ecore file ! It's strange as it is not the location for ecore file (in model directory, not in java source directory).
I didn't find any clue for a workaround method.
Note that i use the latest version of OCCI-Studio and it happen within my development on Multi-Cloud Studio.
Hello,
Using MixinBase is not a good solution for this particular mixin (not an extension mixin but a configuration mixin), MixinBase objects are used mainly for implementation and display. Mixin tags has no implementation as they are created on demand by users. To avoid memory leaks (instanciation of MixinBases), find a simple way to manage mixin tags in studio core v2 (optimized way) and how to use them in MartServer application.
Thanks.
Link source & target are the opposite in the metamodel vs in instances (in sirius diagram as well as XML file) ?!
See OpenShift extension screenshots https://github.com/occiware/occiware-openshift/tree/master/screenshots
To allow edition of documentation for categories (kind, mixin etc.) when designing an extension.
This field will be used on documentation generation (textile, latex) and will be rendered with model@runtime on model description output.
To edit description, this feature will use a memo (multi-line editor).
Hello,
To implement generic operations like Import from provider, we need an interface to describe general operations method, Connector generator must be updated after consequently to generate default implementation of this interface.
On configuration part, the implementation is a singleton and will be instantiated by the Connector general factory after connector plugins is added on java class path.
This functionality will give import from provider on Model@Runtime server, Mart server will be updated to manage this interface and set reserved url automatically by connectors.
The main objective is for the user to access import from provider on Mart server in a standard way.
Hello,
I found a bug with EMF Generate tools, when i open my project (AWS) in another eclipse application instance via "run as" --> Eclipse application.
I have validated my model with OCL validation before launching EMF Tools generation.
This give me model validation error :
My main eclipse give this on console after clicking on OK button :
!ENTRY org.eclipse.ui 4 0 2018-01-03 15:41:59.306
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.get(ArrayList.java:429)
at org.eclipse.cmf.occi.core.gen.emf.ui.popup.actions.OCCI2EMFGeneratorAction.generateEMFCode(OCCI2EMFGeneratorAction.java:260)
at org.eclipse.cmf.occi.core.gen.emf.ui.popup.actions.OCCI2EMFGeneratorAction.run(OCCI2EMFGeneratorAction.java:152)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:247)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4258)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1502)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1525)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1510)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1314)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4082)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3699)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
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:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
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:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
As the error state it, the bug provide from this line in OCCI2GeneratorAction class in method generateEMFCode :
editOp.addGeneratorAndArguments(GenModelUtil.createGenerator(genModels.get(0)), genModels.get(0),
"org.eclipse.emf.codegen.ecore.genmodel.generator.EditProject", "Edit");
This issue is maybe linked with issue #34 .
Currently an Entity
has a method getAttributes()
which returns all AttributeState
s that belong to the Entity
itself. To additionally retrieve all AttributeState
s that are defined by the MixinBase
s belonging to the Entity
, one has to retrieve the MixinBase
s first and then collect all their AttributeState
s.
For convenience, I suggest to add another method for Entity
, e.g., getAllAttributes()
that returns a combined list comprising the AttributeState
s that are part of the Entity
AND those that are part of its MixinBase
s.
Hello,
We have a problem with mixins, particularly with infrastructure mixins.
The occi specification give a schema for ssh_key (and some others) that point to a scheme that is not equals to infrastructure main scheme (this is a sub scheme).
When calling OCCIHelper to create a concrete mixin implementation in connector via the method
public static MixinBase createMixinBase(Entity entity, Mixin mixin)
We have this error :
EPackage http://schemas.ogf.org/occi/infrastructure/credentials/ecore not found!
2017-10-24 08:43:53.472 WARN Couldnt create mixin base for mixin : http://schemas.ogf.org/occi/infrastructure/credentials#ssh_key
So we can't use the mixin concrete implementation Ssh_Key_connector because it instantiate the mixin on MixinBaseImpl only.
Note if mixins have the same scheme as infrastructure, creation method works.
Currently the label of entity/mixin boxes includes the category term, e.g., "vm1: compute", ": networkinterface", "ipnetworkinterface", etc.
It would be more useful to use the category name instead of the term, e.g., "vm1: Compute", ": NetworkInterface", "IpNetworkInterface", etc.
More useful because the name could be in camel case when the term is always in lower case.
Actually, if the generator fail it fail silently if some pre-requires are not ok, for example i have an extension imported by another and the imported extension doesn't have a genmodel file. When launching the EMF tooling and i was not informed about why it doesn't work.
At least, the workaround to manage this is to look on logs with "eclipse inception" mode.
Add a new view in the OCCI Designer to only display the graph of extensions (without their contents) and the import relations between them. If the user double-clicks on an extension then open a new view on the contain of the selected extension.
There is no way to place an item beyond the displayed parts of the diagram, meaning there is nowhere to place it when existing items take already more than all the displayed place.
Workaround : place it anywhere in a white space (not in another item), then drag'n drop it where it should be to expand the diagram's size.
It could be useful that the generator of extension designers generates several containment views for the same extension. For instance for MoDMaCAO we could have two views. First view could be application-oriented, i.e., components are contained into its owning application. Second view could be compute-oriented, i.e., components are contained into its hosting compute.
The current generated view without containment would be kept.
With my development environment i have this error when i right click on my occie model file, this is maybe a dependency problem but may cause unexpected behaviors :
!MESSAGE Plug-in org.eclipse.cmf.occi.infrastructure was unable to load class org.eclipse.cmf.occi.core.ui.popup.actions.ExtensionConfiguration2OCCICAction.
!STACK 0
java.lang.ClassNotFoundException: org.eclipse.cmf.occi.core.ui.popup.actions.ExtensionConfiguration2OCCICAction cannot be found by org.eclipse.cmf.occi.infrastructure_1.0.0.qualifier
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
Hello,
The designer has no component to set a password field.
How to build a component that set * to replace password text ?
Is this a specific datatype or a new component ?
Note that this may impact model@runtime renderings.
Hello,
The p2 repository is : http://dl.bintray.com/occiware/OCCI-Studio/update-site/current-release
In content.xml is not the good one because it references a bad version of OCCI-Studio (feb. 2018).
This impact all substudio on build (multi-cloud studio etc.) with a P2 jar error message (file not found).
<artifact classifier='org.eclipse.update.feature' id='org.eclipse.cmf.occi' version='1.0.0.201802221456'/>
Hello,
I have an issue with all studios, when opening my workspace, i have a lot of extension to register manually (OCCI Studio --> register OCCI extension).
Typically i use import extensions from other extensions projects that are present in the workspace.
Eclipse give me errors on all imported extension from the same workspace like this box:
Is there any way to auto-register all extension (.occie) when loading workspace (or just before loading the extension occie in modeling view) ?
Hi,
This would be useful to put an Eclipse update site online.
We have projects with a Tycho configuration that depend on some of these plug-ins. Without an update site, these projects can only be built on the developer's machine, by hijacking the project's class path.
Having a regular update site online is the right Eclipse way and would make our project builds portable.
Minor point : there is no way to rename kind on diagram (but in Properties view it works).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.