Bug 1412269 - cannot publish blueprint using REST API
Summary: cannot publish blueprint using REST API
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: GA
: cfme-future
Assignee: Jillian Tullo
QA Contact: Martin Kourim
URL:
Whiteboard: api:rest
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-11 16:19 UTC by Martin Kourim
Modified: 2017-12-05 15:07 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-24 16:57:43 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:


Attachments (Terms of Use)

Description Martin Kourim 2017-01-11 16:19:26 UTC
Description of problem:
I'm getting following error when trying to publish blueprint:
{
  "error": {
    "kind": "bad_request",
    "message": "Failed to publish blueprint - undefined method `resource_actions' for nil:NilClass",
    "klass": "Api::BadRequestError"
  }
}

For creating and publishing blueprints I'm following this document -  https://github.com/abellotti/manageiq_docs/blob/api_v230/api/reference/blueprints.adoc

I tried this also with more complete blueprints (with existing service_dialog and service_catalog):
{
  "name": "blueprintavailability",
  "description": "testing",
  "ui_properties": {
    "num_items": 1,
    "visibility": {"id": 800, "name": "Private"},
    "service_dialog": {"id": 1},
    "service_catalog": {"id": 4},
    "chart_data_model": {
      "nodes": [{
         "x": 87,
         "y": 131,
         "id": 10000000000004,
         "icon": "pf pficon-bundle",
         "name": "Deploy RHEL7 with PostgreSQL",
         "tags": [],
         "image": "http://localhost:8001/pictures/10r4.jpg",
         "width": 150,
         "bundle": true,
         "fontFamily": "PatternFlyIcons-webfont",
         "fontContent": "",
         "backgroundColor": "#fff"
      }]
    },
    "automate_entrypoints": {
      "Provision": "Service/Provisioning/StateMachines/ServiceProvision_Template/default",
      "Retirement": "/Service/Retirement/StateMachines/ServiceRetirement/Default",
      "Reconfigure": null
    }
  }
}


Version-Release number of selected component:
5.7.0.17


How reproducible:
100%


Steps to Reproduce:
1. create blueprint:
POST /api/blueprints
{
  "action" : "create",
  "resource" : {
    "name" : "test_blueprint",
    "description" : "Test Blueprint",
    "ui_properties" : {
      "service_catalog"      : {},
      "service_dialog"       : {},
      "automate_entrypoints" : {},
      "chart_data_model"     : {}
    }
  }
}

2. publish blueprint:
POST /api/blueprints/:id
{ "action" : "publish" }

Comment 2 Jillian Tullo 2017-10-24 16:57:43 UTC
closing as this feature is soon to be removed https://github.com/ManageIQ/manageiq-api/pull/139


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