From b8dea9bad3bdacdfcd28c7c6eaa32abe6466747e Mon Sep 17 00:00:00 2001 From: Subrahmanyam Mandavilli Date: Thu, 24 Dec 2015 10:15:50 +0530 Subject: [PATCH] Changing vCenter Url to take only fqdn of vCenter Server --- src/Tasks/vmOperations/vmOperations.ts | 2 +- tests/Tasks/vmOperations/vmOperationsTests.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tasks/vmOperations/vmOperations.ts b/src/Tasks/vmOperations/vmOperations.ts index efff956..bcc4904 100644 --- a/src/Tasks/vmOperations/vmOperations.ts +++ b/src/Tasks/vmOperations/vmOperations.ts @@ -10,7 +10,7 @@ export class VmOperations { public static getCmdCommonArgs(): string { var cmdArgs = ""; var vCenterConnectionName: string = tl.getInput("vCenterConnection", true); - var vCenterUrl: string = tl.getEndpointUrl(vCenterConnectionName, false); + var vCenterUrl: string = tl.getEndpointUrl(vCenterConnectionName, false) + "sdk/vimService"; var endPointAuthCreds = tl.getEndpointAuthorization(vCenterConnectionName, false)["parameters"]; var vCenterUserName: string = this.escapeDoubleQuotes(endPointAuthCreds["username"]); var vCenterPassword: string = this.escapeDoubleQuotes(endPointAuthCreds["password"]); diff --git a/tests/Tasks/vmOperations/vmOperationsTests.ts b/tests/Tasks/vmOperations/vmOperationsTests.ts index 58f4b43..d09a62f 100644 --- a/tests/Tasks/vmOperations/vmOperationsTests.ts +++ b/tests/Tasks/vmOperations/vmOperationsTests.ts @@ -44,7 +44,7 @@ describe("getCmdCommonArgs", (): void => { var cmdArgs = vmOperations.VmOperations.getCmdCommonArgs(); - cmdArgs.should.contain("-vCenterUrl \"" + dummyEndpointUrl + "\""); + cmdArgs.should.contain("-vCenterUrl \"" + dummyEndpointUrl + "sdk/vimService\""); cmdArgs.should.contain("-vCenterUserName \"dummyuser\""); cmdArgs.should.contain("-vCenterPassword \"dummypassword\""); cmdArgs.should.contain("-vmList \"" + dummyVmList + "\"");