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
Python safplus_ide.py items
file->save as
- [Done] add status bar for code generation
- [Done] If a tool does not apply to the currently selected tab, it needs to be greyed out.
Consolidate common tools. To to this we need to create a dictionary of common tools attached to the GuiPlaces class { "zoom": tool, "delete": tool }. Then when a tab is created, that panel can check the dictionary to see if a tool matches by well known name (e.g "zoom"). If a tool matches, then the panel does not create a new tool, it registers itself into the common tool via a custom API. The handlers of the common tools need to identify what tab Panel is active and if that Panel has registered itself then it calls that handler. If not, it calls the default handler.
[Done] file->new should auto-fill SAFplusAmf.yang as the data model. Its is the only allowed data model [FUTURE: allow you to select multiple datamodel files and SAFplusAMF.yang is optional]
[Hung] Q: SAFplusAmf.yang is the input for file->new. Why is it auto-filled? [Andrew] Its auto-filled as the data model. SAFplusAmf.yang is what defines SGs, SUs, comps, etc. For the first release, we are only going to support the IDE editing SAFplus defined objects. So only SAFplusAmf.yang. For subsequent releases, the user will be able to add multiple data models.
[Done] file->new change "select" to "Browse"
need a file->"save as" menu option
[Haft done] load and file->"save as" should default to the directory we last loaded/saved from.
- when code generation is clicked, the "source" part of the model should be filled with the generated files
- [Done] add a status bar message "Code generation complete" to the generate button
- [Done] When modelling changes, instance buttons and menu options need to be added and removed.
- [Done] add "generate code" menu option to the "file" menu
- [done] Add a "Modelling" menu that has all of the dynamic modellable object (currently shown as buttons) -- note that these are DYNAMICALLY created based on the data model. See the button creation code.
- [Done] And a "Instantiation" menu that has all of the instances (currently shown as buttons) -- note that these are DYNAMICALLY created based on the Modelling, see the button creation code.
- [Done] add "Windows" menu (2nd last) that reopens any of the tabs the user might have accidentally closed
- add "Help" menu (last) that opens up the welcome tab
- [done] so the top menubar looks like this:
File Modelling Instantiation Windows Help
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