public void serverArrayCurrentInstances() { ServerArray serverarray = ServerArray.show(liveTestServerArrayID, null); Assert.IsNotNull(serverarray); List <Instance> currInstances = serverarray.currentInstances; Assert.IsNotNull(currInstances); }
public void serverArrayTags() { ServerArray serverarray = ServerArray.show(liveTestServerArrayID, null); Assert.IsNotNull(serverarray); List <Tag> tags = serverarray.tags; Assert.IsTrue(true); }
public void serverArrayNextInstance() { ServerArray serverarray = ServerArray.show(liveTestServerArrayID, null); Assert.IsNotNull(serverarray); Instance inst = serverarray.nextInstance; Assert.IsNotNull(inst); }
public void serverArrayAlertSpecs() { ServerArray serverarray = ServerArray.show(liveTestServerArrayID, null); Assert.IsNotNull(serverarray); List <AlertSpec> alertSpecs = serverarray.alertSpecs; Assert.IsNotNull(alertSpecs); }
public void serverArrayDeployment() { ServerArray serverarray = ServerArray.show(liveTestServerArrayID, null); Assert.IsNotNull(serverarray); Deployment dep = serverarray.deployment; Assert.IsNotNull(dep); Assert.IsTrue(dep.name.Length > 0); }
protected override bool PerformRightScaleTask(CodeActivityContext context) { bool retVal = false; bool isReady = false; LogInformation("Beginning query to get status of ServerArray id: " + this.serverArrayID.Get(context)); int operationalCount = 0; int minServers = 1; if (this.minNumServers == null) { if (this.minNumServers.Get(context) > 0) { minServers = this.minNumServers.Get(context); } } if (base.authClient(context)) { ServerArray array = ServerArray.show(this.serverArrayID.Get(context), "default"); foreach (Instance inst in array.currentInstances) { if (inst.state.ToLower().ToString() == "operational") { operationalCount++; if (operationalCount >= minServers) { isReady = true; retVal = true; break; } } } } this.isOperational.Set(context, isReady); this.operationalCount.Set(context, operationalCount); LogInformation("Completed query to get status of ServerArray id: " + this.serverArrayID.Get(context) + " with isOperational = " + retVal.ToString() + " and operationalCount = " + operationalCount.ToString()); return(retVal); }
public void ServerArrayShow() { ServerArray serverarray = ServerArray.show(liveTestServerArrayID, null); Assert.IsNotNull(serverarray); }