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

Add manageiq to the extra_var before launching a job #14354

Merged
merged 1 commit into from
Mar 22, 2017

Conversation

bzwei
Copy link
Contributor

@bzwei bzwei commented Mar 15, 2017

Expose selected manageiq data to playbook through extra_vars

https://www.pivotaltracker.com/story/show/141706117

@bzwei
Copy link
Contributor Author

bzwei commented Mar 15, 2017

@gmcculloug @mkanoor please review

@bzwei
Copy link
Contributor Author

bzwei commented Mar 15, 2017

@miq-bot add_label providers/ansible_tower
@miq-bot add_label enhancement
@miq-bot add_label euwe/no
@miq-bot assign @gmcculloug

'MIQ_URL' => MiqRegion.my_region.remote_ws_url,
'MIQ_TOKEN' => Api::UserTokenService.new.generate_token(evm_owner.userid, 'api'),
'MIQ_SERVICE' => id,
'MIQ_REQUESTOR' => evm_owner.userid,
Copy link
Contributor

Choose a reason for hiding this comment

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

@bzwei This should also be the slug

{
'MIQ_URL' => MiqRegion.my_region.remote_ws_url,
'MIQ_TOKEN' => Api::UserTokenService.new.generate_token(evm_owner.userid, 'api'),
'MIQ_SERVICE' => id,
Copy link
Contributor

Choose a reason for hiding this comment

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

@bzwei
This should use the slug on the service object
Should we all also add Service Action which will come in handy when the same playbook is used for Provisioning, Reconfig and Retirement

Copy link
Member

Choose a reason for hiding this comment

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

I suggested using id until we get url slug support in PR #14344. I would hold off merging this until then, but it gives us something to work with.

@bzwei bzwei changed the title [WIP] Add manageiq to the extra_var before launching a job Add manageiq to the extra_var before launching a job Mar 21, 2017
@bzwei
Copy link
Contributor Author

bzwei commented Mar 21, 2017

@miq-bot remove_label wip

@miq-bot miq-bot removed the wip label Mar 21, 2017
'miq_token' => Api::UserTokenService.new.generate_token(evm_owner.userid, 'api'),
'miq_service' => href_slug,
'miq_requestor' => evm_owner.href_slug,
'miq_request_task' => miq_request_task.href_slug
Copy link
Contributor

Choose a reason for hiding this comment

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

@bzwei would miq_request_task be present when doing retirement?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure. We can try it out.

'miq_url' => MiqRegion.my_region.remote_ws_url,
'miq_token' => Api::UserTokenService.new.generate_token(evm_owner.userid, 'api'),
'miq_service' => href_slug,
'miq_requestor' => evm_owner.href_slug
Copy link
Member

Choose a reason for hiding this comment

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

Since these are already under the 'manageiq' key I would say we can drop the miq_ prefix.

Suggested key names:

api_url
api_token
service
user

Open to other suggestions.

@miq-bot
Copy link
Member

miq-bot commented Mar 22, 2017

Checked commit bzwei@31383b0 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks good. 🏆

@mkanoor
Copy link
Contributor

mkanoor commented Mar 22, 2017

👍

@gmcculloug gmcculloug merged commit 9ee9a16 into ManageIQ:master Mar 22, 2017
@gmcculloug gmcculloug added this to the Sprint 57 Ending Mar 27, 2017 milestone Mar 22, 2017
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.

5 participants