Bug 1695797 - ConversionHost model is missing validations
Summary: ConversionHost model is missing validations
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: V2V
Version: 5.10.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.11.0
Assignee: Fabien Dupont
QA Contact: Shveta
Red Hat CloudForms Documentation
URL:
Whiteboard: v2v
Depends On:
Blocks: 1696437
TreeView+ depends on / blocked
 
Reported: 2019-04-03 18:33 UTC by Daniel Berger
Modified: 2019-12-13 15:09 UTC (History)
5 users (show)

Fixed In Version: 5.11.0.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1696437 (view as bug list)
Environment:
Last Closed: 2019-12-13 15:09:37 UTC
Category: ---
Cloudforms Team: V2V
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Daniel Berger 2019-04-03 18:33:43 UTC
The ConversionHost model is missing important validations that would otherwise prevent potentially bad data from entering the system. This includes validating the presence of a name, associated resource and IP address.

To replicate, simply try to create a conversion host record without a name or associated resource.

Comment 4 Satoe Imaishi 2019-04-25 21:58:18 UTC
Also https://github.com/ManageIQ/manageiq/pull/18690

Comment 5 Shveta 2019-07-02 21:58:59 UTC
Create conversion host with REST API with missing resources like resource Id.


{ "name": "env-rhv43-01.cfme2.lab.eng.rdu2.redhat.com", 
  "resource_type": "ManageIQ::Providers::Redhat::InfraManager::Host",
  "resource_id": "",
  "conversion_host_ssh_private_key": "Bag Attributes\n <No Attributes>\n-----BEGIN PRIVATE KEY-----.....-----END PRIVATE KEY-----\n",
  "vmware_vddk_package_url": "http://10.11.5.7/~kkulkarn/VMware-vix-disklib-6.7.1-10362358.x86_64.tar.gz",
  "auth_user": "root" }

Validation is shown for resource Id.
Verified in 5.11.0.11.20190625161125_392c61e


Note You need to log in before you can comment on or make changes to this bug.