Templating and Property Toolkit
Use OneFuse Templating and Property Toolkit features with the Python module
2 minute read
Refer to Getting started for prerequisites, resources and more.
After configuring OneFuse Manager, make REST calls to OneFuse and use provided methods to easily integrate with OneFuse Modules.
Quickly print a list of available methods for the OneFuseManager class.
# Run the following in the Python Console
# Returns a list of all methods (ignores properties)
method_list = [method for method in dir(OneFuseManager) if method.startswith('__') is False]
print(method_list)
Quickly get help on available methods for the OneFuseManager class.
#Run the following in the Python Console
help(OneFuseManager)
## Get help on a specific OneFuseManager method ##
#Format: help(ofm.<methodName>)
#Example uses the 'render' method
help(OneFuseManager.render)
Summary of available method names for OneFuse Modules. Refer to each module page for further details on expected input parameters.
| OneFuse module | Module key | Method name(s) |
|---|---|---|
| Ansible Tower | ansible_tower |
provision_ansible_tower |
| Ansible Tower | ansible_tower |
deprovision_ansible_tower |
| DNS | dns |
provision_dns |
| DNS | dns |
deprovision_dns |
| IPAM | ipam |
provision_ipam |
| IPAM | ipam |
deprovision_ipam |
| Microsoft Active Directory | ad |
provision_ad |
| Microsoft Active Directory | ad |
move_ou |
| Microsoft Active Directory | ad |
deprovision_ad |
| Naming | naming |
provision_naming |
| Naming | naming |
deprovision_naming |
| Pluggable Modules | module |
export_pluggable_module |
| Pluggable Modules | module |
upload_pluggable_module |
| Pluggable Modules | module |
provision_module |
| Pluggable Modules | module |
deprovision_module |
| Property Toolkit | - | get_create_properties |
| Property Toolkit | - | get_sps_by_name |
| Property Toolkit | - | get_sps_properties |
| Property Toolkit | - | render |
| Scripting | scripting |
provision_scripting |
| Scripting | scripting |
deprovision_scripting |
| ServiceNow CMDB | cmdb |
provision_cmdb |
| ServiceNow CMDB | cmdb |
update_cmdb |
| ServiceNow CMDB | cmdb |
deprovision_cmdb |
| VMware vRealize Automation | vra |
provision_vra |
| VMware vRealize Automation | vra |
deprovision_vra |
Utilize a Tracking ID to link multiple different OneFuse Policy Executions together along with the resulting OneFuse Managed Objects.
create_tracking_id(): Generate a unique Tracking ID to link OneFuse Policy Executions and the resulting Managed Objects together.
get_tracking_id_from_mo('<Path to OneFuse Managed Object>'): Get the Tracking ID from a OneFuse Managed Object.
add_tracking_id_to_headers('<Tracking ID>'): Add Tracking ID into request headers. Use when making custom requests to OneFuse instead of using the OneFuse Python Module methods provided.
Learn more about OneFuse Tracking ID.
| Operation | Output |
|---|---|
| Provision / Update | Outputs the request’s response_json that can be captured in a variable. |
| Deprovision | Outputs the destroyed OneFuse Managed Object path. |
Use OneFuse Templating and Property Toolkit features with the Python module
Configure and use the OneFuse Ansible Tower module with the Python module
Configure and use the OneFuse DNS module with the Python module
Configure and use the OneFuse IPAM module with the Python module
Configure and use the OneFuse Microsoft Active Directory module with the Python module
Configure and use the OneFuse Naming module with the Python module
Configure and use OneFuse Pluggable Modules with the Python module
Configure and use the OneFuse Scripting module with the Python module
Configure and use the OneFuse ServiceNow CMDB module with the Python module
Configure and use the OneFuse VMware Aria Automation module with the Python module