VoyenceControl: ApiService.buildPushConfigletJobInfo() method returns a JobInfo object with only one TaskInfo
search cancel

VoyenceControl: ApiService.buildPushConfigletJobInfo() method returns a JobInfo object with only one TaskInfo

book

Article ID: 303487

calendar_today

Updated On:

Products

VMware

Issue/Introduction

Symptoms:




ApiService.buildPushConfigletJobInfo returns a JobInfo object with only one TaskInfo.
Cannot create a job to push to multiple devices.

Unable to apply configlet to multiple devices.

Environment

VMware Smart Assurance - NCM

Cause

There is a bug with ApiService.buildPushConfigletJobInfo() whereby no matter how many devices you supply it, it will create a JobInfo object with only one TaskInfo for the first device.

Resolution

You must create the ActionInfo and TaskInfo objects directly for the JobInfo object instead of using the buildPushConfigletJobInfo() convenience method.

For each device that you intend to push configlet data to you must:

  • Create a PushActionInfo. You will need to set all required values including push content and destination.
     
  • Create a PushTaskInfo. You will need to set all required values including the action info created above.

Place each of the PushTaskInfo objects created above into a TaskInfo array. This array is then passed to JobInfo.setTaskInfos().  The JobInfo is then passed to ApiService.scheduleJob() to create the job.