vedaniks's Posts

Hello Denis, Thanks for the reply. When I put the below in plugin-multi-manifest.json, I get the below error while deploying plugin. {   "manifestVersion": "1.0.0",   "manifests": [     "plugin... See more...
Hello Denis, Thanks for the reply. When I put the below in plugin-multi-manifest.json, I get the below error while deploying plugin. {   "manifestVersion": "1.0.0",   "manifests": [     "plugin-80.json",     "plugin-70.json"   ] } Missing plug-in manifest. Make sure that the manifest is present at the plug-in location. If I put below in the plugin-multi-manifest.json,, plugin deployment works. {   "manifestVersion": "1.0.0",   "manifests": [     "plugin-80.json",     "plugin.json"   ] } Can you tell me why this might be happening?
I am trying deploy my remote plugin on vCenter Server 7.x and 8.x using multi-manifest files. From vCenter 8.0 support for Italian language has beed added. I am trying to do the same with plugin. I h... See more...
I am trying deploy my remote plugin on vCenter Server 7.x and 8.x using multi-manifest files. From vCenter 8.0 support for Italian language has beed added. I am trying to do the same with plugin. I have followed guidelines given here for multi-manifest support. However, I am getting error while deploying the plugin on vcenters depending on the order of manifest files I specify in plugin-multi-manifest.json file. If I specify manifest file for vCenter 7.x first, then I am not able to deploy plugin on vCenter 8.x and vice versa.  I had verified both the manifest files by separately deploying plugin on vcenter servers. Attached below is zip file that contains manifest files. Please let me know what I am doing wrong. Thanks! @Denis_Chorbadzh ,   
Thanks for this. It was the issue in my API call. I had used vc-guid [hyphen] instead of vc_guid [underscore] Do you know if we can fetch the vc_guid in the global plugin page using htmlclientsdk? [... See more...
Thanks for this. It was the issue in my API call. I had used vc-guid [hyphen] instead of vc_guid [underscore] Do you know if we can fetch the vc_guid in the global plugin page using htmlclientsdk? [see attached image] I know that on object page we get the vc_guid from URL like "VirtualMachine:vm-15:f17d2a70-9cfa-49ee-b5ec-2bd080beb123/summary". But, I want to fetch vc_guid from global plugin page. Thanks in advance!
The below code worked for me: #imports from pyVmomi import vim, vmodl from pyVim import connect import ssl #Use below code after fetching session clone ticket from "/vcenter/session/clone-ticket" A... See more...
The below code worked for me: #imports from pyVmomi import vim, vmodl from pyVim import connect import ssl #Use below code after fetching session clone ticket from "/vcenter/session/clone-ticket" API if hasattr(ssl, '_create_unverified_context'): ssl._create_default_https_context = ssl._create_unverified_context stub = connect.SmartStubAdapter(host="vcenter-fqdn/IP") si = vim.ServiceInstance("ServiceInstance", stub) content = si.RetrieveContent() try: user_session = content.sessionManager.CloneSession(session_clone_ticket) session_id = si.content.sessionManager.currentSession.key auth_manager = si.content.authorizationManager root_folder = si.content.rootFolder privileges = ["VcIntegrity.lifecycleSettings.Read","VcIntegrity.Baseline.com.vmware.vcIntegrity.AssignBaselines","VcIntegrity.Baseline.com.vmware.vcIntegrity.ManageBaselines","VcIntegrity.General.com.vmware.vcIntegrity.Configure"] result = auth_manager.HasPrivilegeOnEntity(root_folder, session_id, privileges) except Exception as ex: print(f'Something went wrong cloning the session {ex}')  
Hello, I am trying to clone session from plugin UI to back end using python for back-end development. [basically this] I've successfully retrieved the clone ticket from vCenter API endpoint and but... See more...
Hello, I am trying to clone session from plugin UI to back end using python for back-end development. [basically this] I've successfully retrieved the clone ticket from vCenter API endpoint and but struggling to clone the session using it. I've come across this post which details the problem of cloning the session using clone ticket with python. I've seen in the pyvmomi sample code where there is code to convert python suds cookies over to pyvmomi session cookies. The comments in the pyvmomi code note that there is no way to connect to call the CloneSession() function on vCenter through pyvmomi without having already been logged in. Is this actually true? This seems like a chicken or the egg problem. How can I call CloneSession() without already being logged in? Because if I could be already logged then I wouldn't need to call CloneSession(). Any suggestions on what course to take to resolve this little puzzle?   If anyone has done the "Clone Session using Python" already, can you please show how to do it? Any help is appreciated. Thanks in advance!
Hello, I could successfully clone the UserSession from VC plugin UI to VC plugin server. [Using this: Ref] Now, I want to check if the logged in user has certain permissions. I have to do certain a... See more...
Hello, I could successfully clone the UserSession from VC plugin UI to VC plugin server. [Using this: Ref] Now, I want to check if the logged in user has certain permissions. I have to do certain action if the user has the below privileges : // vLCM Privileges Configure.Configure Service VMware vSphere Lifecycle Manager.Lifecycle Manager: Settings Privileges.Read Is there any way to do this using the cloned UserSession? Any pointers on this will be helpful.    
Hello, I am following this guide to delegate session authority to the plug-in server. On the plug-in UI, I got the sessionToken using app.getSessioninfo() method. When I try to get the session_clo... See more...
Hello, I am following this guide to delegate session authority to the plug-in server. On the plug-in UI, I got the sessionToken using app.getSessioninfo() method. When I try to get the session_clone_ticket using REST API endpoint /api/ui/vcenter/session/clone-ticket, I get the following error: [401] Something went wrong. Check the server logs for more information Which logs should I check? Can someone please help me debug why I am getting this error. My POST request looks like this: OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\r\n \"vc-guid\": \"223b94f2-af15-4613-5d1a-a278b19abc09\"\r\n}"); Request request = new Request.Builder() .url("https://vc-fqdn/api/ui/vcenter/session/clone-ticket") .method("POST", body) .addHeader("Content-Type", "application/json") .addHeader("Accept", "application/json") .addHeader("vmware-api-session-id", "\"vmw-sid:[issuer:e7b5f32e-3b70-4668-9b52-b3bd17075008,version:2,value:bdMkwgnaXutxYpTWdvYdV1SJuXxVF8AFiOJh+v/E2/s=]\"") .build(); Response response = client.newCall(request).execute();   Note: I have also tried using only value from sessionToken bdMkwgnaXutxYpTWdvYdV1SJuXxVF8AFiOJh+v/E2/s= as vmware-api-session-id, but still got the same error. Thanks in advance!