rPath Appliance Platform Agent:Plugin Development Process
From rPath Wiki
|
Use the process outlined on this page as part of Plugin Development to develop an rPath Appliance Platform Agent plugin for an appliance project.
Prior to coding your first plugin, rPath recommends performing the following tasks:
- Set up the plugin development environment.
- Deploy an example plugin for reference.
- Create the initial visual layout of the plugin in the rAP web interface.
Outline Actions
Before coding, outline the actions accomplished by the plugin. Typically, a plugin is designed for a single action. However, a partitioned or tabbed interface could be established using the same plugin for multiple related actions. For each action, identify:
- Conditions in which a user should be able to perform the action (such as only for the admin role or only if accessing locally)
- Input required from the rPath Appliance Platform user
- System operations that should occur to process the input and produce the desired results
- Output that should be displayed to the Appliance Platform user
Code the Action
The plugin action is driven by plugin tasks handled by the web and service components, and the web component can request either immediate or scheduled execution by the service component. How these tasks are coded has no specific instructions, but rPath provides the following references and examples that can be used when creating the Python code related pieces used to accomplish the task:
- Use plugin decorators in the plugin code to modify plugin behavior in ways that the Appliance Platform can interpret and use.
- Create plugin database tables if desired to handle data beyond simple input and output operations.
- Add notification functionality to notify rAP users by email regarding an important event related to the plugin.
Code the Input Mechanism
- REMAINING CONTENT IN DEVELOPMENT
Code the Output Mechanism
- REMAINING CONTENT IN DEVELOPMENT
