]> xenbits.xensource.com Git - xenrt-citrix/xenrt.git/commitdiff
typo for release license, half pool test case
authorCraig Orendi <craig.orendi@citrix.com>
Mon, 28 Sep 2015 15:51:52 +0000 (16:51 +0100)
committerCraig Orendi <craig.orendi@citrix.com>
Tue, 3 Nov 2015 10:21:40 +0000 (10:21 +0000)
exec/testcases/xenserver/tc/dotnetagentlicensing.py
exec/xenrt/lib/xenserver/dotnetagentlicensing.py
seqs/dotnetagentlicensing.seq

index ae8d4ffc76950323e93df4a3aed75bd7078de797..f04ea7c2915299c13f66c33537fb34445d32018c 100755 (executable)
@@ -20,7 +20,7 @@ class DotNetAgentAdapter(object):
         self.licenseManager.applyLicense(self.v6, hostOrPool, license, licenseinUse)
 
     def releaseLicense(self, hostOrPool):
-        self.applyLicensedHost(hostOrPool, self.unLicensedPool)
+        self.applyLicense(hostOrPool, self.unLicensedPool)
 
     def checkLicenseState(self,hostOrPool):
         hostOrPool.checkLicenseState(self.licensedEdition)
@@ -85,12 +85,36 @@ class TempTest(DotNetAgentTestCases):
         autoupdate = self.agent.getLicensedFeature("AutoUpdate")
         autoupdate.setUserVMUser()
         autoupdate.enable()
-        autoupdate.setURL("http://10.81.29.132:16000")
+        autoupdate.setURL("http://%s:16000"%server.getIP())
         startTime = datetime.datetime.now().time()
         agent.restartAgent()
         xenrt.sleep(200)
         xenrt.TEC().logverbose("Server was pinged: %s"%str(server.isPinged(startTime)))
 
+class poolAutoUpdateToggle(DotNetAgentTestCases):
+
+    def run(self, arglist):
+        server0 = self.adapter.setUpServer(self.getGuest("server"),"16000")
+        server1 = self.adapter.setUpServer(self.getGuest("server"),"16001")
+        agent1 = DotNetAgent(self.getGuest("WS2012(1)"))
+        self.adapter.applyLicense(self.getDefaultPool())
+        autoupdate0 = self.agent.getLicensedFeature("AutoUpdate")
+        autoupdate1 = agent1.getLicensedFeature("AutoUpdate")
+        autoupdate0.disable()
+        autoupdate1.disable()
+        autoupdate0.setURL("http://%s:16000"% server0.getIP())
+        autoupdate1.setURL("http://%s:16001"% server1.getIP())
+        startTime = datetime.datetime.now().time()
+        xenrt.sleep(200)
+        pinged0 = server.isPinged(startTime)
+        pinged1 = server.isPinged(startTime)
+        xenrt.TEC().logverbose("Server0 was pinged: %s"%str(pinged0))
+        xenrt.TEC().logverbose("Server1 was pinged: %s"%str(pinged1))
+        if pinged0:
+            raise xenrt.XRTFailure("Server0 was pinged when it shouldn't be")
+        if pinged1:
+            raise xenrt.XRTFailure("Server1 was pinged when it shouldn't be")
+
 class VMAutoUpdateToggle(DotNetAgentTestCases):
 
     def run(self,arglist):
index 6b43226036569c2a74f3607fe308e07aeab6ff16..548bb19fe7a501ead3343d007d054289ff972cc1 100755 (executable)
@@ -76,7 +76,10 @@ class DotNetAgent(object):
     def getLicensedFeature(self,feature):
         '''VSS or AutoUpdate''' 
         x = self.licensedFeatures[feature]
-        assert isinstance(x, VSS)
+        if feature == "VSS":
+            assert isinstance(x, VSS)
+        else:
+            assert isinstance(x, AutoUpdate)
         return x
 
 
index 99401dcd1eaa893fd76af3adcfc721c9c5993d3d..f56b7c7acf0e01f04127039255a07ee0e6388eef 100755 (executable)
                     <network device="0" />
                     <disk device="0" size="32" />
                 </vm>
+                <vm name="WS2012(1)")">
+                    <distro>ws12-x64</distro>
+                    <arch>x86-64</arch>
+                    <memory>2048</memory>
+                    <vcpus>2</vcpus>
+                    <postinstall action="installDrivers" />
+                    <network device="0" />
+                    <disk device="0" size="32" />
+                </vm>
             </host>
             <host id="1" license="no" defaultlicense="no">
                 <vm name="server">