vCO Workflow Script to Create a Distributed Virtual Switch – Part 1

The following is a multi-part series of vCO Workflow Scripts to Create a Distributed Virtual Switch РPart 1

 

 

System.log("====================================================================================================");

System.log("===== Building an Array of dvSwitch Uplink Port Names");

var arrUplinkPortNames;
	arrUplinkPortNames = new Array();
	arrUplinkPortNames.push("dvUplink-Fault-Tolerance-A");
	arrUplinkPortNames.push("dvUplink-Fault-Tolerance-B");
	arrUplinkPortNames.push("dvUplink-Management-A");
	arrUplinkPortNames.push("dvUplink-Management-B");
	arrUplinkPortNames.push("dvUplink-vMotion-A");
	arrUplinkPortNames.push("dvUplink-vMotion-B");

System.log("===== Building an Array of dvSwitch Port Group Configuration Values");

var arrPortGroups;
	arrPortGroups = new Array();
	arrPortGroups.push(["pgVLAN-106-Management", 106, ["dvUplink-Management-A","dvUplink-Management-B"], "loadbalance_loadbased"]);
	arrPortGroups.push(["pgVLAN-106-Trend-Micro", 106, ["dvUplink-Management-A","dvUplink-Management-B"], "loadbalance_loadbased"]);
	arrPortGroups.push(["pgVLAN-750-vMotion-A", 750, ["dvUplink-vMotion-A"], "loadbalance_loadbased"]);
	arrPortGroups.push(["pgVLAN-750-vMotion-B", 750, ["dvUplink-vMotion-B"], "loadbalance_loadbased"]);
	arrPortGroups.push(["pgVLAN-754-Fault-Tolerance", 754, ["dvUplink-Fault-Tolerance-A","dvUplink-Fault-Tolerance-B"], "loadbalance_loadbased"]);

System.log("====================================================================================================");

Leave a Reply