zdog59
Enthusiast
Enthusiast

Does anyone know if these two Items work in VCO?

Jump to solution

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.

0 Kudos
1 Solution

Accepted Solutions
zdog59
Enthusiast
Enthusiast

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

0 Kudos
3 Replies
tschoergez
Leadership
Leadership

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)

0 Kudos
zdog59
Enthusiast
Enthusiast

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.

0 Kudos
zdog59
Enthusiast
Enthusiast

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

0 Kudos