Quantcast
Channel: VMware Communities : Discussion List - vSphere Client SDK
Viewing all articles
Browse latest Browse all 2218

create a task vsphere sdk

$
0
0

Hi all ,

We are working on the vSphere plugin and currently got stuck with creating a tasks in the vSphere webclients recent tasks.

we need to add a task to the recent tasks tab for any operation we do on the plugin we are developing .

My code looks like this :

    UserSession userSession = _userSessionService.getUserSession();
        ServerInfo[] sinfo = userSession.serversInfo;
        String sessionCookie = sinfo[0].sessionCookie;
        String serviceUrl = sinfo[0].serviceUrl;
        ServiceContent serviceContent = getServiceContent(sinfo[0].serviceGuid);
       
        ManagedObjectReference extensionReference = serviceContent.getExtensionManager(); 
         _taskMgrReference = serviceContent.getTaskManager();
         _vimPort.createTask(extensionReference, _taskMgrReference, "Rakesh", "Bandari", true, "Administrator", "TestFault");

    UserSession userSession = _userSessionService.getUserSession();
    ServerInfo[] sinfo = userSession.serversInfo;
    String sessionCookie = sinfo[0].sessionCookie;
    String serviceUrl = sinfo[0].serviceUrl;
    ServiceContent serviceContent = getServiceContent(sinfo[0].serviceGuid);
       
    ManagedObjectReference extensionReference = serviceContent.getExtensionManager(); 
    _taskMgrReference = serviceContent.getTaskManager();
   _vimPort.createTask(extensionReference,_taskMgrReference,"Rakesh","Bandari",true,"Administrator","TestFault");

 

this code doesn't work for me .Can some one please let me know how can i create a cutom task in the vPsphere plugin .

 

Thanks,

RakeshBandari


Viewing all articles
Browse latest Browse all 2218

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>