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

[WIP] Add validate_vms resource action to transformation mappings #352

Closed

Conversation

jntullo
Copy link

@jntullo jntullo commented Mar 21, 2018

Dependent on ManageIQ/manageiq#17177

Supports import from csv or without any data at all

POST /api/transformation_mappings/:id
{
   "action": "validate_vms"
}
POST /api/transformation_mappings/:id
{
   "action": "validate_vms",
   "import": [
      { "name": "vm_name", "uid": "vm_uid" } 
    ]
}

cc: @bzwei

@miq-bot
Copy link
Member

miq-bot commented Mar 21, 2018

Checked commit jntullo@bbf9b3d with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. ⭐

@bzwei
Copy link
Contributor

bzwei commented Mar 21, 2018

LGTM. Thanks!

@abellotti
Copy link
Member

Short and sweet, Thanks @jntullo this LGTM!! 👍

we just need ManageIQ/manageiq#17177 pushed through.

@bzwei
Copy link
Contributor

bzwei commented Apr 3, 2018

There is a bug in this PR. Here is the sample output

{
    "valid_vms": [
        {
            "href": "http://localhost:3000/api/transformation_mappings/2222",
            "name": "amaya-at",
            "cluster": "Default",
            "path": "RHV/Default",
            "allocated_size": "32212254720.0",
            "id": "2222",
            "reason": "OK"
        }
    ]
}

"href": "http://localhost:3000/api/transformation_mappings/2222" should be for VM, nottransformation_mappings

@abellotti
Copy link
Member

Closing as being replaced/extended with #358

@abellotti abellotti closed this Apr 5, 2018
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.

4 participants