ManageIQ Automate Domain of shared utilities to be used by other ManageIQ domains.
The high level features of this ManageIQ extension.
Infrastructure/VM/Provisioning/Naming/vmname
implementation with support for variable suffix counter length and specified domain nameInformation on the provided Automate.
Instances where this domain overrides defaults provided in ManageIQ
Infrastructure/VM/Provisioning/Email
(Schema)
Infrastructure/VM/Provisioning/Email/MiqProvision
* (Instances)
method
to MiqProvision_Update
rather then event specific methodsInfrastructure/VM/Provisioning/Naming/vmname
(Method)
Infrastructure/VM/Provisioning/StateMachines/Methods/PostProvision
(Instance)
common_meth1
to call process_telemetry_data
Infrastructure/VM/Provisioning/StateMachines/ProvisionRequestApproval/Default
(Instance)
max_vms
to 10Infrastructure/VM/Provisioning/StateMachines/VMProvision_VM/update_provision_status
(Method)
ae_status_step
Infrastructure/VM/Retirement/Email/
* (Instances)
Infrastructure/VM/Retirement/Email/vm_retirement_emails
(Method)
Infrastructure/VM/Retirement/StateMachines/Methods/check_pre_retirement
unknown
from list of power states to stop looping for Infrastructure/VM/Retirement/StateMachines/Methods/check_removed_from_provider
(Method)
Service/Provisioning/Email/
* (Instances)
method1
to ServiceProvision_Update
rather then event specific methodsService/Provisioning/StateMachines/ServiceProvision_Template/CatalogItemInitialization
(Instance)
post5
step to call /Service/Provisioning/StateMachines/Methods/ProcessTelemetryData
Service/Provisioning/StateMachines/ServiceProvision_Template/update_serviceprovision_status
(Method)
ae_status_step
This namespace serves as a "standard library" of CloudForms (ManageIQ) Automation code. The goal is for common methods to be collected here, and to be suitbale for inclusion as "Embedded Methods".
See: https://cloudformsblog.redhat.com/2018/04/17/embedded-methods/ for conceptual background.
This project now includes a new mechanism for storing and accessing configuration settings. This has some advantages over traditional processes for configuration (instance variables or constants within a method). The settings can all be stored in one location, and being code, edited in something more featureful than a text box. The settings values can be any ruby data structure directly, and do not require juggling between yaml or json as commonly happens. Additionally, as the settings are grouped into global/default/region, then one can configure common and region-specific settings in a single place, for multi region deployments, useful for either a replication setup, or a dev/prod envionment split, pulling code from one git source.
/StdLib/Settings/settings provides the core lookup functionality. /StdLib/Settings/settingsstore holds setting values.
To leverage your own custom settings, one can simply copy settings.rb up to a top priority domain, and edit it per norm. However, to isolate out ones own domain's settings, there is a mechanism ot merge in settings from different files.
Using the commented code in settings.rb as a template, create a new (ruby) class that extends RedHatConsulting_Utilities::StdLib::Core::Settings and has a PRIORITY and SETTINGS class values.
Copy our settings.rb to a high priority domain. Configure it to have embedded methods of all other settings.rb you wish to include (but not the one from this project). Ordered inclusion is impossible to guarantee with the UX currently, the PRIORITY setting, however, is honoured in merging the hashes. In practice, you are going to want to use non-overlapping key values, or manually reconcile the desired values in the settings.rb in the high priority domain.
miq_provision_redhat_dialogs_template_no_required_fields
miq_provision_redhat_dialogs_template
only with all required fields set to not required. This is useful when calling create_provision_request
and not wanting to pass in all fields and rather determining them later. For example determining the vlan
bassed on placement rather then before calling create_provision_request
.miq_provision_vmware_dialogs_template
only with all required fields set to not required. This is useful when calling create_provision_request
and not wanting to pass in all fields and rather determining them later. For example determining the vlan
bassed on placement rather then before calling create_provision_request
.https://github.com/rhtconsulting/miq-Utilities.git
To run the test suite, you first require a functional ManageIQ development environment, specifically, able to run the test suite of https://github.com/ManageIQ/manageiq-content/ . Link in this project to that, per
manageiq-content/content/automate/RedHatConsulting_Utilities -> miq-Utilities/Automate/RedHatConsulting_Utilities manageiq-content/spec/content/automate/RedHatConsulting_Utilities -> miq-Utilities/UnitTests/spec/content/RedHatConsulting_Utilities manageiq-content/spec/factories/RedHatConsulting_Utilities -> miq-Utilities/UnitTests/spec/factories/RedHatConsulting_Utilities
and then run $ bundle exec rake or, e.g., $ bundle exec rspec --format documentation --pattern spec/content/automate/RedHatConsulting_Utilities/*/_spec.rb
The master branch of this repository will aim to support the current CloudForms release. If breaking changes for previous CloudForms versions are introduced in Master, version specific branches and tags will be created for those previous versions, as long as those releases are still supported by Red Hat. The version-specific release branches will be no longer be maintained once that version of CloudForms is end of life.
CloudForms Product Lifecycle Information:
https://github.com/RedHatOfficial/miq-Utilities/graphs/contributors