-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Defining complex types in OCCI extensions #130
Comments
I have this problem where i want to create datatype object (with properties) and manage them like a collection (list, array etc.) in resources and mixins (for my VMware extension). |
This problem is now blocking for us. The alternative would be to reduce the perimeter of our OCCI-based REST API. |
Other workarounds (though I'm fully in favour of supporting complex types):
|
A workaround for complex types without lists, arrays, etc. |
Could you provide concrete examples of complex data types you would like the support? |
We can indeed flatten fields, when we do not have collections of complex types. public class RoboconfInstance {
// Simple or flatten fields
String name, path;
// Enum
InstanceStatus status;
// Complex fields
RoboconfComponent component;
Map<String,String> overriddenExports;
Map<String,String> data;
public static class RoboconfComponent {
String name, installerName;
Map<String,String> imports;
}
} Maps can be managed with EMF types. |
Currently, an OCCI extension can only define resources, links and very simple types (that either extend existing types or are enumerations). This is very annoying to model complex objects. There should be a way to define such types.
The only workaround is to create a new resource extension and create links to bridge them. But this makes model navigation much more complex. It may also be a turn-off for OCCIware adopters as soon as extensions become too complex.
The text was updated successfully, but these errors were encountered: