Plugins

Extend Cloud Management Platform (CMP) with your own Python code, running inside CMP with full access to its data model

A plugin is Python code that runs on the CMP server. Because it runs there, it can read and write CMP data through Django’s object-relational mapper, and reach out to any system the appliance can. Plugins are one of the six action types, so a plugin can be attached to a trigger point, offered as a button on a server or resource, or run as a blueprint build step.

Plugin files are stored on the CMP server’s filesystem or loaded dynamically from a URL. By default, newly created plugins are saved under the appliance’s uploads directory, at static/uploads/hooks.

Where to get help

This section covers the basics of plugin authoring. The Content Library and the CloudBolt Forge hold working plugins you can import and adapt. If you have a more specific use case you want to discuss, contact Support.


Structure of a plugin

What a plugin module must contain, what it is passed, and what it can return

Special case plugins

Plugins that break the usual pattern, either by running outside a job or by returning something other than the standard tuple

Development tips for plugins

Techniques for reaching outside Cloud Management Platform (CMP) from plugin code: remote hosts, stored credentials, HTTP calls, and child jobs

Plugin examples

Worked examples of common use cases for Cloud Management Platform (CMP) plugins

Plugin parameterization

How Cloud Management Platform (CMP) turns template variables in plugin code into action inputs

Resources for writing plugins

How to explore the Cloud Management Platform (CMP) models interactively, learn Django’s ORM, and step through a plugin as it runs

Use Django ORM

Query and update the Cloud Management Platform (CMP) database from Python instead of SQL