Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate | Services | Changed CatalogItemInitialization automate method for Orchestration provisioning. #4416

Merged
merged 4 commits into from Sep 25, 2015

Conversation

tinaafitz
Copy link
Member

Changed CatalogItemInitialization automate method to pass dialog
fields to the Orchestration provision item when used with a bundle.

CatalogBundleInitialization/CatalogItemInitialization methods were
designed to work with VM provisioning, before Orchestration provisioning
was introduced. These methods were designed to assist in passing
parameters from a bundle service down to individual VM provision tasks.
Orchestration provisioning uses a different configuration of tasks to
perform provisioning which is not supported by the current methods.

https://bugzilla.redhat.com/show_bug.cgi?id=1260436

fields to the Orchestration provision item when used with a bundle.

CatalogBundleInitialization/CatalogItemInitialization methods were
designed to work with VM provisioning, before Orchestration provisioning
 was introduced. These methods were designed to assist in passing
parameters from a bundle service down to individual VM provision tasks.
Orchestration provisioning uses a different configuration of tasks to
perform provisioning which is not supported by the current methods.

https://bugzilla.redhat.com/show_bug.cgi?id=1260436
@tinaafitz
Copy link
Member Author

@gmcculloug, @mkanoor
Please review.

@gmcculloug
Copy link
Member

cc @bzwei


def destination_key_name(key)
key.to_s.starts_with?("dialog_") ? key.to_s : "dialog_#{key}"
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tinaafitz To support something like a password key with syntax password::dialog_var1 this logic needs to be updated. What do you think of this?

def destination_key_name(key)
  key = key.to_s
  return key if key.include?("::") || key.starts_with?("dialog_")
  "dialog_#{key}"
end

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gmcculloug
That looks good, I'll make the change.
The orchestration side will have to modified to look for the password format, correct?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the field gets set in the destination (in this case service object) the same as it would if it was just a catalog item being ordered directly. But it would be useful if @bzwei could validate this as well.

@miq-bot
Copy link
Member

miq-bot commented Sep 22, 2015

Checked commits tinaafitz/manageiq@1c94f4b~...ef947e9 with ruby 1.9.3, rubocop 0.33.0, and haml-lint 0.13.0
2 files checked, 0 offenses detected
Everything looks good. 🍪

gmcculloug added a commit that referenced this pull request Sep 25, 2015
Automate | Services | Changed CatalogItemInitialization automate method for Orchestration provisioning.
@gmcculloug gmcculloug merged commit 11d7af4 into ManageIQ:master Sep 25, 2015
@gmcculloug gmcculloug added this to the Sprint 30 Ending Oct 5, 2015 milestone Sep 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants