Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EmbeddedAnsible seeding] assign "manager_ref" for default cred
The `manager_ref` column is used by the authentications table to reference a external resource id for a given provider. Not required for all uses, but generally used by provider authentications so we have a general idea of what uniq id we are referencing when doing a refresh so we aren't clobbering existing records, and can add/update/delete properly when doing so. With EmbeddedAnsible now not using ansible tower, this is no longer needed by default, but there are certain places where it is still being called, like `ServiceTemplateAnsiblePlaybook.build_parameter_list`. With the change to `EmbeddedAnsible::AutomationManager::Credential`'s `native_ref` method including a `Integer` type casting being ported over from the `manageiq-provider-ansible_tower` repo (not part of the original POC by Jason), this caused errors with `nil` `manager_ref` ids when trying to create a new `ServiceTemplateAnsiblePlaybook` and using the default credential. This fix will just make sure the default credential includes a `manager_ref` value so `native_ref` will work as it previously had. We just use the `manager_id` value since it is "technically" true (though, in practice, redundant).
- Loading branch information