VMware Cloud Community
zdog59
Enthusiast
Enthusiast
Jump to solution

Does anyone know if these two Items work in VCO?

Grabbed this from another post.   Added some logging as a test....but no tasks are returned.

var hosts = VcPlugin.allSdkConnections;

//var allClusters = VcPlugin.getAllClusterComputeResources();

System.log(hosts[0]);

var tm = hosts[0].taskManager;

System.log(tm);

var allTasks = tm.recentTask;

System.log(allTasks);

Tried this one as well:

var hosts = VcPlugin.vimHosts;

var tm = hosts[0].taskManager;

tasks = tm.recentTask;

System.log(tasks.length);

for (var i in tasks) {

   System.log(tasks[i].info.name);

}

Add to boot tried the

getAllTasks method from the VcPlugin and VcSdkconnection.

Got nothing returned.

Reply
0 Kudos
1 Solution

Accepted Solutions
zdog59
Enthusiast
Enthusiast
Jump to solution

Upgrading to the latest 5.1 VCplugin Version 5.1.2-562 resolved the issue.  Apparently the original plugin was not reloading task information and working with cached.  This also appears to have corrected an issue with the vim3WaitTask action that relies on the VC task object information being updated to return a value.


Cheers

View solution in original post

Reply
0 Kudos
3 Replies
tschoergez
Leadership
Leadership
Jump to solution

Can you check in Managed Object Browser if you can see the tasks there?

(To rule out that it's really a problem in vCO, rather than in vcenter)

Reply
0 Kudos
zdog59
Enthusiast
Enthusiast
Jump to solution

I'm not able to verify via MOB, however if I call the Get-Task cmdlet in powerCli connected to that particular vCenter server, I do rec a list of the recent tasks.

Reply
0 Kudos
zdog59
Enthusiast
Enthusiast
Jump to solution

Upgrading to the latest 5.1 VCplugin Version 5.1.2-562 resolved the issue.  Apparently the original plugin was not reloading task information and working with cached.  This also appears to have corrected an issue with the vim3WaitTask action that relies on the VC task object information being updated to return a value.


Cheers

Reply
0 Kudos