Bug 1302250 - Cannot add Environment options in the vmFields argument of create_provision_request
Summary: Cannot add Environment options in the vmFields argument of create_provision_r...
Keywords:
Status: CLOSED DUPLICATE of bug 1297335
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: GA
: 5.6.0
Assignee: Greg McCullough
QA Contact: Milan Falešník
URL:
Whiteboard: automate
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-27 10:08 UTC by Peter McGowan
Modified: 2019-10-10 11:01 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-22 16:46:19 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:


Attachments (Terms of Use)

Description Peter McGowan 2016-01-27 10:08:24 UTC
Description of problem:
I'm not sure if this is a bug or an RFE, but I don't seem to be able to add any options from the Environment provisioning dialog tab to my vmFields argument in a call to create_provision_request. In particular for a cloud instance provision it would be useful to be able to set options such as :cloud_network or :cloud_tenant.

Looking through the code in miq_provision_virt_workflow I can see that it's hard-coding "values[:placement_auto] = [true, 1]", so there's a possible assumption that Environment processing is not required. Certainly ws_vm_fields does not try to handle any environment fields; there's no ws_environment_fields method to handle the insertion of any environment values. If I try setting the value :cloud_network in my vmFields argument I see the message:

"Unprocessed key <cloud_network> with value <"1000000000002">"

This was probably a reasonable assumption when we purely had Infrastructure VM provisioning, but now with Cloud Instance provisioning to multiple tenants it would be useful to be able to override the auto_placement values.

Version-Release number of selected component (if applicable):
5.5.0.13

How reproducible:
Every time

Steps to Reproduce:
1. Code a call to $evm.execute('create_provision_request', args) with a templateFields argument specifying an OpenStack image name, and a vmFields (arg3) value containing "cloud_network=1000000000002|cloud_tenant=1000000000001" (specify valid object IDs)
2. Call the method
3. 

Actual results:
Observe in log/evm.log:

Unprocessed key <cloud_network> with value <"1000000000002">
Unprocessed key <cloud_tenant> with value <"1000000000001">

Expected results:
The specified cloud_network and cloud_tenant should be set in the provision request.

Additional info:
I note that we can override this behaviour ourselves by passing Environment value as ws_values arguments, and then special-casing them in an openstack_CustomizeRequest, but the need to do this is not intuitive, and not documented.

Comment 3 Shveta 2016-02-03 00:14:27 UTC
Assigning to add test case

Comment 5 Greg McCullough 2016-04-22 16:46:19 UTC

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


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