Overview
An Eclipse plugin is used to model applications and physical chassis.
There are two phases to the modelling process. Type modelling and instance modelling. In the type modelling phase, physical (hardware) and software (application) types are created using a UML-like design tool. In the instance modelling phase, these types are "instantiated" into a specific cluster configuration. Instance modelling is done via a graphical abstraction of a physical cluster.
Type and instance modelling are inter-related. For example, the instantiations on a particular node can be abstracted into a particular node "type". A new copy of that node can then be instantiated in one click during instance modelling or via an API call at runtime.
Type Modelling
Types are modelled with more fundamental entities. For example, the applicaton type "Apache" could be modelled with a Service Group type, a Service Unit type, and a Component type. Configuration specific to the "Apache" application can be associated with this new entity through a YANG management file. These sub-entities are then "wrapped up" into a single box in the UML diagram, representing the "Apache" entity. Double-clicking on the Apache Entity expands the box and shows the interior entities via UML and modeless dialog widgets. Every configuration field can be set to a default value for this entity type. There is also a lock icon. If the lock icon is "locked", instance CANNOT change the default value. If the icon is unlocked, instances can configure the value.
There are NO fundamental (hard-coded) entities in the Type modelling. There is only base files "SAFplusEntityDef.xml" and "SAFplusAmf.yang" that define the fundamental SA-forum entities like Applicaton, Service Group, Service Unit, Component, etc.
Types can also associate templatized code. When the code generation phase is executed this templatized code is applied to the complete chassis type and instance configuration to create the output code.
All application modelling is defined by XML files.
- UML
- Nested, recursive (zoom out view is a single entity)
- Export/import
- Applications are made up of entities (SG, SU, comp, custom) which have configuration modeless dialog that is defined by YANG.
- set of YANG config that is associated with a component can be "selected" to be the config for the zoomed out view.
Types can be imported and/or exported.
YANG modelling
- UML to YANG
Cluster modelling
Cluster modelling instantiates defined types. During cluster modelling, any fields defined by the type and "unlocked" can have instance-specific values assigned.
- Based on Eclipse EMF
- graphical chassis representation
TO DO list
Instance Editor
- Add a delete tool (red X) that will delete an instance
- [Done using "Select tool" and key press "Delete", delete tool button still needed ]
- Export XML
[Done. Dynamic SU/Node are in progress. Need to change structure SU/NODE at SAFplusAMF.yang]
- Enable/disable dynamic SU assignment: In this feature, a SU is defined but not assigned to any node. The AMF will automatically apply it to an eligible node.
- in the Select tool (arrow) if you click on any cell in the node by SG array, it should "enable" or "disable" (visually, grey it out) the cell.
- SG object needs a new member variable: the set of "eligible" nodes.
- XML language extended
- dynamic New node: In this feature, the IDE defines the behavior that should be applied to every new node that enters the cluster.
use a well known node name instance name to define this node - "New <EntityType>", for example "New sysctrl"
- this node should ALWAYS be shown last in the node list
- this node should be shown with some special coloring
- XML language extended with a boolean flag indicating that this is the "new" node.
- You can click on the cell to enable or disable the dynamic SU assignment onto this new node (see Enable/disable dynamic SU assignment)
- Dropping a SU instance on this node is allowed. It means that a new SU instance will be created every time the new node enters the cluster.
- If any drawn instance is clicked with the "Select" button, show its configuration in the instance details dialog.
- If SI is clicked, show both SI configuration and the child CSI keys and values.
- Show "component" children of "SUs" inside the graphical box which is the SU. These are needed so that you can click on them to show their configuration in the instance details dialog. But they cannot be otherwise manipulated.
- Create new instances: Right now, you can duplicate an instance using select tool and typing ctrl-v.
- We need a graphical copy button b. We need some way to show the entities and let you create additional instances. Right now the SGs and Nodes are shown with tool buttons. We need something that shows more detail -- this needs to be designed before being implemented.
=> Done "#1,2,5,6,7", #3,4 are in progress
umlEditor
- Save uml box and arrow location information
- Arrows should start and end at any point on the perimeter of the uml boxes
- if a subnetwork links only to a single entity and that entities parent that subnetwork can be collapsed inside the single entity
=> Done "#1,2", #3 is in progress
detailsEditor
- convert control to use a hypertreelist (wx.lib.agw.hypertreelist)
- For integers, include a edit control where you can manually enter in a value to the left of the slider. So the user can choose whatever input method is easiest for him.
- description text needs to be shorter for many entities.
- sash should automatically widen/narrow if item is double clicked
=> Done "#1,2,3", #4 is in progress
Integration
standalone app with all editors => hypertreelist got exeption with standalone but not entityDetailsDialog.py, I'm investigating root cause. Fixed: app = wxApp(0) => this help to initialize some wxWidgets function
codeblocks app with all editors =>
- Code Generate
- Validate value change and fallback error if there anychange on entityDetailsDialog
=> Done