Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1871711

Summary: Unable to create VMWare compute resource from hammer CLI.
Product: Red Hat Satellite Reporter: Jameer Pathan <jpathan>
Component: Compute Resources - VMWareAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Jameer Pathan <jpathan>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.8.0CC: chrobert, mhulan, oezr, tbrisker
Target Milestone: UnspecifiedKeywords: AutomationBlocker, Regression
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-24 08:35:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jameer Pathan 2020-08-24 05:36:30 UTC
Description of problem:
Unable to create VMWare compute resource from hammer CLI.

Version-Release number of selected component (if applicable):
- Satellite 6.8.0 snap 12

How reproducible:
- Always

Steps to Reproduce:
1. compute-resource create --name "COMPUTE_RESOURCE_NAME_VMWARE" --provider VMware --server "VMWARE_URL" --location-ids 2 --organization-ids 1 --datacenter "VMWARE_DATACENTER" --user "VMWARE_USERNAME" --password "VMWARE_PASSWORD"

Actual results:
Could not create the compute resource:
  Datacenter can't be blank

Expected results:
- VMWare compute resource created successfully.

Additional info:
- This works fine for Satellite 6.7.0

- Log from /var/log/foreman/production.log

2020-08-24T01:25:30 [I|app|30f32e4c] Started POST "/api/compute_resources" for 127.0.0.1 at 2020-08-24 01:25:30 -0400
2020-08-24T01:25:30 [I|app|30f32e4c] Processing by Api::V2::ComputeResourcesController#create as JSON
2020-08-24T01:25:30 [I|app|30f32e4c]   Parameters: {"compute_resource"=>{"name"=>"COMPUTE_RESOURCE_NAME_VMWARE", "provider"=>"VMware", "user"=>"VMWARE_USERNAME", "password"=>"[FILTERED]", "datacenter"=>"VMWARE_DATACENTER", "server"=>"VMWARE_URL", "location_ids"=>[2], "organization_ids"=>[1]}, "apiv"=>"v2"}
2020-08-24T01:25:30 [D|app|30f32e4c] Authenticated user admin against INTERNAL authentication source
2020-08-24T01:25:30 [D|app|30f32e4c] Post-login processing for admin
2020-08-24T01:25:30 [I|app|30f32e4c] Authorized user admin(Admin User)
2020-08-24T01:25:30 [D|app|30f32e4c] Post-login processing for admin
2020-08-24T01:25:30 [D|tax|30f32e4c] Current location set to none
2020-08-24T01:25:30 [D|tax|30f32e4c] Current organization set to none
2020-08-24T01:25:30 [D|tax|30f32e4c] Current location set to none
2020-08-24T01:25:30 [D|tax|30f32e4c] Current organization set to none
2020-08-24T01:25:30 [E|app|30f32e4c] Unprocessable entity Foreman::Model::Vmware (id: new):
  Datacenter can't be blank

2020-08-24T01:25:30 [I|app|30f32e4c]   Rendering api/v2/errors/unprocessable_entity.json.rabl within api/v2/layouts/error_layout
2020-08-24T01:25:30 [I|app|30f32e4c]   Rendered api/v2/errors/unprocessable_entity.json.rabl within api/v2/layouts/error_layout (Duration: 6.9ms | Allocations: 6738)
2020-08-24T01:25:30 [D|app|30f32e4c] Body: {
  "error": {"id":null,"errors":{"datacenter":["can't be blank"]},"full_messages":["Datacenter can't be blank"]}
}

Comment 2 Tomer Brisker 2020-08-24 08:35:45 UTC
This is BZ 1867895 which is already Modified

*** This bug has been marked as a duplicate of bug 1867895 ***