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

storage service edit mode: check which attached resources are compliant to selected capabilities #1218

Conversation

OrGur1987
Copy link
Contributor

@OrGur1987 OrGur1987 commented Apr 10, 2023

issue: ManageIQ/manageiq-ui-classic#8749

added button in service edit mode which enables user to check what currently attached resources will comply with the selected capabilities.

this PR adds the action to the api controller and to api.yml

@OrGur1987
Copy link
Contributor Author

@miq-bot cross-repo-tests ManageIQ/manageiq#22450

miq-bot pushed a commit to ManageIQ/manageiq-cross_repo-tests that referenced this pull request Apr 10, 2023
@OrGur1987
Copy link
Contributor Author

cross repo passed:
ManageIQ/manageiq-cross_repo-tests#774

@OrGur1987
Copy link
Contributor Author

@miq-bot cross-repo-tests ManageIQ/manageiq#22450

miq-bot pushed a commit to ManageIQ/manageiq-cross_repo-tests that referenced this pull request Apr 17, 2023
@OrGur1987 OrGur1987 force-pushed the add_resource_compliance_check_to_service_update branch from 3002692 to 34b8e00 Compare May 1, 2023 06:25
@OrGur1987
Copy link
Contributor Author

@bdunne @kbrock
ready for review, thanks

@OrGur1987
Copy link
Contributor Author

@miq-bot cross-repo-tests ManageIQ/manageiq#22450

miq-bot pushed a commit to ManageIQ/manageiq-cross_repo-tests that referenced this pull request May 1, 2023
@agrare agrare closed this May 2, 2023
@agrare agrare reopened this May 2, 2023
@OrGur1987
Copy link
Contributor Author

hi @agrare,
@jeffibm merged the ui for this issue

Comment on lines 25 to 26
def check_compliant_resources_resource(type, _id = nil, data = {})
data["_id"] = _id
Copy link
Member

Choose a reason for hiding this comment

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

definitely want to use id and not _id

Also, do we want data["id"] or is that underscore correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no problem changing the method param name to id, but changing the data hash key to id raises the following error in api_ems_resource: Resource id or href should not be specified for creating a new storage_services.

perhaps I shouldn't have used api_ems_resource if it's intended for creating new records only?
I used it because it appeared in the existing validate action that I based upon:

def validate_resource(type, _id = nil, data = {})

is there an alternative?

if data["_id"] can stay that way, I prefer using api_ems_resource since things are working right now..

thanks

@kbrock kbrock self-assigned this May 15, 2023
@OrGur1987 OrGur1987 force-pushed the add_resource_compliance_check_to_service_update branch from 34b8e00 to 9fd3066 Compare May 21, 2023 10:46
…rrently attached resources will comply with the selected capabilities.
@OrGur1987 OrGur1987 force-pushed the add_resource_compliance_check_to_service_update branch from 9fd3066 to 8b1dc51 Compare May 21, 2023 13:57
@miq-bot
Copy link
Member

miq-bot commented May 21, 2023

Checked commit Autosde@8b1dc51 with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint
1 file checked, 0 offenses detected
Everything looks fine. 🍰

@agrare agrare merged commit c49eac7 into ManageIQ:master May 30, 2023
4 checks passed
@Fryguy Fryguy added this to the Petrosian milestone Sep 14, 2023
@Fryguy Fryguy added this to Petrosian in Roadmap Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Roadmap
  
Petrosian
Development

Successfully merging this pull request may close these issues.

None yet

5 participants