Esempio n. 1
0
        public void serverArrayCloneDestroy()
        {
            string newServerArrayID = ServerArray.clone(liveTestServerArrayID);

            Assert.IsNotNull(newServerArrayID);
            bool retVal = ServerArray.destroy(newServerArrayID);

            Assert.IsTrue(retVal);
        }
Esempio n. 2
0
        public void serverArrayCreateDestroyAlert()
        {
            string array_type = "alert";
            List <ElasticityParam> elasticityParams = new List <ElasticityParam>();

            elasticityParams.Add(new ElasticityParam(new AlertSpecificParam("voterTagPredicate", "80"), new Bound(1, 2), new Pacing(1, 1, 15), new List <ScheduleEntry>()));
            string newArrayID = ServerArray.create(array_type, new List <DataCenterPolicy>(), elasticityParams, cloudID, liveTestDeploymentID, serverTemplateID, "API Test Array", "disabled");

            Assert.IsNotNull(newArrayID);
            Assert.IsTrue(newArrayID.Length > 0);
            bool isDeleted = ServerArray.destroy(newArrayID);

            Assert.IsTrue(isDeleted);
        }
Esempio n. 3
0
        //this is just a cleanup method--leaving it in place so that if/when I need to clean out a bunch of extra arrays from my acct it's here.
        //[TestMethod]
        public void cleanOutOldServerArrays()
        {
            int i = 0;
            List <ServerArray> serverArrays = ServerArray.index();

            foreach (ServerArray sa in serverArrays)
            {
                if (sa.name.Contains("API Testing ST"))
                {
                    if (ServerArray.destroy(sa.ID))
                    {
                        i++;
                    }
                    else
                    {
                    }
                }
            }
            Assert.IsTrue(i > 0);
        }