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.

Types can be imported and/or exported.

YANG modelling

Cluster modelling

Cluster modelling instantiates defined types. During cluster modelling, any fields defined by the type and "unlocked" can have instance-specific values assigned.

TO DO list

Python safplus_ide.py items

  1. [Done] file->save as

  2. [Done] add status bar for code generation
  3. [Done] If a tool does not apply to the currently selected tab, it needs to be greyed out.
  4. 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.

  5. [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.

  6. [Done] file->new change "select" to "Browse"

  7. [Done] need a file->"save as" menu option

  8. [Done with load] load and file->"save as" should default to the directory we last loaded/saved from.

  9. [Done] when code generation is clicked, the "source" part of the model should be filled with the generated files
  10. [Done] add a status bar message "Code generation complete" to the generate button
  11. [Done] When modelling changes, instance buttons and menu options need to be added and removed.
  12. [Done] add "generate code" menu option to the "file" menu
  13. [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.
  14. [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.
  15. [Done] add "Windows" menu (2nd last) that reopens any of the tabs the user might have accidentally closed
  16. add "Help" menu (last) that opens up the welcome tab
  17. [done] so the top menubar looks like this:

File Modelling Instantiation Windows Help

Instance Editor

  1. Add a delete tool (red X) that will delete an instance
    • [Done using "Select tool" and key press "Delete", delete tool button still needed ]
  2. Export XML
    • [Done. Dynamic SU/Node are in progress. Need to change structure SU/NODE at SAFplusAMF.yang]

  3. 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.
    1. 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.
    2. SG object needs a new member variable: the set of "eligible" nodes.
    3. XML language extended

[Hung]: I really don't understand exactly these requirements:

The purpose of this is to allow the designer to say "I don't care which nodes this program is run on. I want to let the AMF pick for me". To do this, the user leaves the SU box in the space on the far left (not "inside" any node).

  1. Clicking a cell to switch its status (enable/disable), right? why do we need to do that?

Enabling the cell ALLOWS the AMF to place the SU into this node, if it wants to. Disabling disallows it. "Enabled" should be the default, and disabling should "grey out" the cell.

  1. What are eligible nodes?

A node that the AMF can run the SU (the program) in. It could be that the designer wants to allow the program to run on ANY NODE except for "Node1" (to just make up a name) because "Node1" is running some high priority process (for example).

  1. what is "The AMF automatically apply it to an eligible node" ? Can you give an example to make SU instance and automatically assigned to an eligible node?

By "automatically apply" I mean the AMF will run the SU on that node. Today, SUs are explicitly applied to a specific node. SU1 can only be run on Node1 for example, SU2 is run on node 2. I want the designer to be able to allow SUX to be run on ANY node 1,2,3, NOT 4, NOT 5, and 6.

Your task is to allow the designer to specify this in the IDE, and to save it to XML (you will have to modify the cluster model). Someone else (probably myself) will deal with the code in the AMF that actually makes this happen.

  1. Dynamic New node: In this feature, the IDE defines the behavior that should be applied to every new node that enters the cluster.
    1. XXX reconsidered: probably not necessary "use a well known node name instance name to define this node - "New <EntityType>", for example "New sysctrl""

    2. XXX reconsidered: probably not necessary "this node should ALWAYS be shown last in the node list"
    3. this node should be shown with some special coloring
    4. XML language extended with a boolean flag indicating that this is the "new" node.
    5. You can click on the cell to enable or disable the dynamic SU assignment onto this new node (see Enable/disable dynamic SU assignment)
    6. 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.

[Hung]: Same as above, I really don't understand exactly these requirements. Is this kind of node different from the other (by clicking on "Node" toolbar then click on the editor and a default Node[i] instance will be created)? what do you mean "the node list" in the case "this node should ALWAYS be shown last in the node list"?

[Andrew]: Let me try to explain the purpose of this feature. If a new node enters the cluster, and is NOT configured, what programs should be run on it? This feature allows the user to use the IDE to specify that all new nodes should be configured like this node. So this vertical "node" image may correspond to a specific node instance, like "PayloadI1", but it also applies to EVERY unknown instance.

The user would create a node as normal in the IDE, and then needs some way to indicate that this "node" is to be be applied to ANY new unknown node (of a particular type). You could do it with a button (click button, click a node), or a menu item. Note that there can be only ONE of these defined per node type, so if a node of that type is already selected in this role, you need move it.

Your task is to allow the designer to specify this in the IDE, and to save it to XML (so you will have to modify the cluster model). Someone else (probably myself) will deal with the code in the AMF that actually makes this happen.

  1. If any drawn instance is clicked with the "Select" button, show its configuration in the instance details dialog.
    1. If SI is clicked, show both SI configuration and the child CSI keys and values.
  2. 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.
  3. Create new instances: Right now, you can duplicate an instance using select tool and typing ctrl-v.
    1. 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,3,5,6,7", #4 are in progress

umlEditor

  1. Save uml box and arrow location information
  2. Arrows should start and end at any point on the perimeter of the uml boxes
  3. 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

  1. convert control to use a hypertreelist (wx.lib.agw.hypertreelist)
  2. 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.
  3. description text needs to be shorter for many entities.
  4. sash should automatically widen/narrow if item is double clicked

=> Done "#1,2,3", #4 is in progress

Integration

  1. 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

  2. codeblocks app with all editors =>

  3. Code Generate
  4. Validate value change and fallback error if there anychange on entityDetailsDialog

=> Done

SAFplus: Cluster Design GUI/Integrated Development Environment (last edited 2016-07-25 03:37:26 by HungTa)