Bug 1300167

Summary: [RFE] VPC (AWS provider) details in the Cloudforms RESTAPI
Product: Red Hat CloudForms Management Engine Reporter: Prasad Mukhedkar <pmukhedk>
Component: APIAssignee: Gregg Tanzillo <gtanzill>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Kourim <mkourim>
Severity: high Docs Contact:
Priority: high    
Version: 5.5.0CC: cpelland, dajohnso, gtanzill, hhudgeon, jhardy, obarenbo, simaishi
Target Milestone: GAKeywords: FutureFeature
Target Release: 5.6.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: ec2:rest
Fixed In Version: 5.6.0.2 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-24 14:28:13 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 Prasad Mukhedkar 2016-01-20 05:51:50 UTC
Description of problem:

Do we expose VPC (AWS provider) details in the Cloudforms RESTAPI. It doesn't appear to be. Need confirmation on this. 

Please confirm if we can associate a particular vpc while creating VM in AWS through RESTAPI. If yes, what is the input attribute. Is there any sample JSON available for reference? Version: Cloudforms 4.0

If the functionality is not there atm, Are there any plan to include this in the future of cloudforms? RFE required? 


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

Comment 10 Tim Wade 2017-03-06 21:49:20 UTC
This should have been completed in https://github.com/ManageIQ/manageiq/pull/6388

Comment 12 Martin Kourim 2017-03-09 14:18:11 UTC
Verified on 5.6.4.2 using
POST /api/provision_requests
{
    "action": "create",
    "version": "1.1",
    "template_fields": {
        "guid": "36739c86-04af-11e7-9911-00505696be97"
    },
    "vm_fields": {
        "vm_name": "test-vm01",
        "instance_type": 42,
        "request_type": "template",
        "placement_auto": false,
        "cloud_network": 1,
        "cloud_subnet": 2,
        "placement_availability_zone": 3,
        "security_groups": 27,
        "guest_access_key_pair": 65,
        "monitoring": "basic"
    },
    "requester": {
        "user_name": "admin",
        "owner_first_name": "Administrator",
        "owner_last_name": "Administratorovich",
        "owner_email": "admin",
        "auto_approve": true
    }
}

with result "Vm Provisioned Successfully".


Ids of cloud_subnet, placement_availability_zone and security_groups can be figured from
GET /api/cloud_networks/:id?attributes=security_groups,cloud_subnets
Unfortunately cloud_networks collection is not available in 5.6