Beispiel #1
0
        public void serverArrayCurrentInstances()
        {
            ServerArray serverarray = ServerArray.show(liveTestServerArrayID, null);

            Assert.IsNotNull(serverarray);
            List <Instance> currInstances = serverarray.currentInstances;

            Assert.IsNotNull(currInstances);
        }
Beispiel #2
0
        public void serverArrayTags()
        {
            ServerArray serverarray = ServerArray.show(liveTestServerArrayID, null);

            Assert.IsNotNull(serverarray);
            List <Tag> tags = serverarray.tags;

            Assert.IsTrue(true);
        }
Beispiel #3
0
        public void serverArrayNextInstance()
        {
            ServerArray serverarray = ServerArray.show(liveTestServerArrayID, null);

            Assert.IsNotNull(serverarray);
            Instance inst = serverarray.nextInstance;

            Assert.IsNotNull(inst);
        }
Beispiel #4
0
        public void serverArrayAlertSpecs()
        {
            ServerArray serverarray = ServerArray.show(liveTestServerArrayID, null);

            Assert.IsNotNull(serverarray);
            List <AlertSpec> alertSpecs = serverarray.alertSpecs;

            Assert.IsNotNull(alertSpecs);
        }
Beispiel #5
0
        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);
        }
Beispiel #7
0
        public void ServerArrayShow()
        {
            ServerArray serverarray = ServerArray.show(liveTestServerArrayID, null);

            Assert.IsNotNull(serverarray);
        }