fuel plugin builder fails validation for upload_file task using YAQL

Bug #1646616 reported by Scott Hussey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Won't Fix
Medium
Fuel Sustaining
Mitaka
Confirmed
Medium
Fuel Sustaining

Bug Description

Detailed bug description:
  Fuel Plugin Builder v4.1 wont' build a plugin with deployment_tasks.yaml that includes
  a upload_file task with a YAQL expression for content. This same construct is used in
  the standard fuel-library task.
Steps to reproduce:
  1. Install FPB v4.1
  2. Build an empty plugin as instructed in plugin dev guide: 'fpb --create fuel-plugin-test'
  3. Update deployment_tasks.yaml to include a task similar to below:
# create astute.yaml on the node
- id: fuel-plugin-test-file
  type: upload_file
  version: 2.1.0
  groups: ['master', '/.*/']
  requires: [fuel-plugin-test-deployment-puppet]
  required_for: [deploy_end]
  refresh_on: ['*']
  parameters:
    path: /etc/fuel/cluster/{CLUSTER_ID}/astute.yaml
    permissions: '0640'
    dir_permissions: '0750'
    timeout: 180
    data:
      yaql_exp: '$.toYaml()'

  4. Build plugin via 'fpb --build fuel-plugin-test --debug'
Expected results:
  Successful build of plugin because fuel-library/deployment/puppet/osnailyfacter/modular/astute/tasks.yaml uses the same construct for building astute.yaml

Actual result:

Validation failed
File 'fuel-plugin-test/deployment_tasks.yaml', {'yaql_exp': '$.toYaml()'} is not of type 'string', value path '2 -> parameters -> data'

Reproducibility:
  Consistently reproducible.

Workaround:
  None

Impact:
  Unable to build a plugin using this apparently valid task.

Description of the environment:
 Operation system: CentOS Linux release 7.2.1511 (Core)
 Versions of components: FPB 4.1, Fuel 9.0/kilo branch

Additional information:
  I did validate in the fuel-plugins/fuel_plugin_builder/validators/schemas/v4.py the upload_file schema does appear to require a string type parameter for data. The task validator in the Nailgun API in fuel-web does not validate task parameters for the different task types.

Tags: area-python
Changed in fuel:
milestone: none → 9.2
assignee: nobody → Fuel Sustaining (fuel-sustaining-team)
importance: Undecided → High
status: New → Confirmed
importance: High → Medium
tags: added: area-python
Roman Vyalov (r0mikiam)
Changed in fuel:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.