nuagenetworks/vspk-ansible

Jobs with parameters fail

Closed this issue · 2 comments

When a job which requires parameters is executed, the job fails with error 'Internal server error':

"properties": {
               "command": "GET_ZFB_INFO",
               "parameters": "{ 'mediaType': 'YAML', 'NSGType': 'NSG-AMI', 'associatedEntityType': 'NSGATEWAY', 'associatedEntityId': '2eed7b37-57df-4757-9db6-42fe5ec00e5f' }"
           },
           "state": "present",
           "type": "Job"
       },
       "module_name": "nuage_vspk"
   },
   "msg": "Unable to create entity: [HTTP 500(Internal Server Error)] [{u'property': u'', u'descriptions': [{u'description': u'Server encountered an unknown exception, please report it back', u'title': u'Internal server error'}]}]"
}

Discovered by @jonasvermeulen

Parameters to a job have to be defined in proper YAML format, matching the required parameters for the job. Example:

parameters:
  mediaType: "YAML"
  NSGType: "NSG-AMI"
  associatedEntityType: "NSGATEWAY"
  associatedEntityID: "{{ nuage_nsg.id }}"