Changing vCenter Url to take only fqdn of vCenter Server
This commit is contained in:
Родитель
4213072ca7
Коммит
b8dea9bad3
|
@ -10,7 +10,7 @@ export class VmOperations {
|
||||||
public static getCmdCommonArgs(): string {
|
public static getCmdCommonArgs(): string {
|
||||||
var cmdArgs = "";
|
var cmdArgs = "";
|
||||||
var vCenterConnectionName: string = tl.getInput("vCenterConnection", true);
|
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 endPointAuthCreds = tl.getEndpointAuthorization(vCenterConnectionName, false)["parameters"];
|
||||||
var vCenterUserName: string = this.escapeDoubleQuotes(endPointAuthCreds["username"]);
|
var vCenterUserName: string = this.escapeDoubleQuotes(endPointAuthCreds["username"]);
|
||||||
var vCenterPassword: string = this.escapeDoubleQuotes(endPointAuthCreds["password"]);
|
var vCenterPassword: string = this.escapeDoubleQuotes(endPointAuthCreds["password"]);
|
||||||
|
|
|
@ -44,7 +44,7 @@ describe("getCmdCommonArgs", (): void => {
|
||||||
|
|
||||||
var cmdArgs = vmOperations.VmOperations.getCmdCommonArgs();
|
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("-vCenterUserName \"dummyuser\"");
|
||||||
cmdArgs.should.contain("-vCenterPassword \"dummypassword\"");
|
cmdArgs.should.contain("-vCenterPassword \"dummypassword\"");
|
||||||
cmdArgs.should.contain("-vmList \"" + dummyVmList + "\"");
|
cmdArgs.should.contain("-vmList \"" + dummyVmList + "\"");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче