def run(self, arglist):
     self.adapter.applyLicense(self.getDefaultPool())
     vss = self.agent.getLicensedFeature("VSS")
     autoUpdate = self.agent.getLicensedFeature("AutoUpdate")
     assertions.assertTrue(vss.isLicensed(),"Xenstore indicates VSS is Not Licensed")
     assertions.assertTrue(autoUpdate.isLicensed(),"Xenstore indicates AutoUpdate is Not Licensed")
     self.adapter.releaseLicense(self.getHost("RESOURCE_HOST_1"))
     assertions.assertFalse(vss.isLicensed(),"Xenstore indicates VSS is Licensed")
     assertions.assertFalse(autoUpdate.isLicensed(),"Xenstore indicates AutoUpdate is Licensed")
 def run(self, arglist):
     server = self.adapter.setUpServer(self.getGuest("server"),"16000")
     server.createCatalog("99.0.0.0")
     msiHandler = NonCryptoMSIHandler()
     msiHandler.getMSIs(server)
     self.adapter.applyLicense(self.getDefaultPool())
     autoupdate = self.agent.getLicensedFeature("AutoUpdate")
     autoupdate.enable()
     autoupdate.setURL("http://%s:16000"%server.getIP())
     self.agent.restartAgent()
     xenrt.sleep(200)
     assertions.assertNotNone(autoupdate.checkDownloadedMSI(),"msi has not downloaded")
     assertions.assertFalse(msiHandler.installed(self.win1),"Non cryprographically signed msi installed")
 def run(self, arglist):
     self.adapter.applyLicense(self.getDefaultPool())
     path = self.adapter.exportVM(self.win1)
     self.adapter.releaseLicense(self.getDefaultPool())
     self.adapter.importVM(self.win1,self.getHost("RESOURCE_HOST_1"),path)
     vss = self.agent.getLicensedFeature("VSS")
     autoupdate = self.agent.getLicensedFeature("AutoUpdate")
     assertions.assertFalse(vss.isLicensed() or autoupdate.isLicensed(),"Agent features are licensed when they shouldn't be")
     path = self.adapter.exportVM(self.win1)
     self.adapter.applyLicense(self.getDefaultPool())
     self.adapter.importVM(self.win1,self.getHost("RESOURCE_HOST_0"),path)
     vss = self.agent.getLicensedFeature("VSS")
     autoupdate = self.agent.getLicensedFeature("AutoUpdate")
     assertions.assertTrue(vss.isLicensed() or autoupdate.isLicensed(),"Auto Update features are not licensed when they should be")
 def run(self,arglist):
     trigger = AgentTrigger(self.agent)
     server = self.adapter.setUpServer(self.getGuest("server"),"16000")
     self.adapter.applyLicense(self.getDefaultPool())
     autoupdate = self.agent.getLicensedFeature("AutoUpdate")
     autoupdate.setUserVMUser()
     autoupdate.disable()
     autoupdate.setURL("http://%s:16000"% server.getIP())
     self._shouldNotBePinged(trigger,server)
     autoupdate.enable()
     self._shouldBePinged(trigger,server)
     self.adapter.releaseLicense(self.getDefaultPool())
     assertions.assertFalse(autoupdate.isLicensed(),"autoupdate is licensed when it shouldn't be")
     self._shouldNotBePinged(trigger,server)
 def run(self, arglist):
     trigger = AgentTrigger(self.agent)
     server = self.adapter.setUpServer(self.getGuest("server"),"16000")
     self.adapter.applyLicense(self.getDefaultPool())
     autoupdate = self.agent.getLicensedFeature("AutoUpdate")
     autoupdate.disable()
     assertions.assertTrue(autoupdate.checkKeyPresent() and not autoupdate.isActive(),"Xapi does not indicate that AutoUpdate is disabled")
     autoupdate.setUserVMUser()
     assertions.assertFalse(autoupdate.checkKeyPresent(),"DisableAutoUpdate reg key is present")
     self._shouldNotBePinged(trigger, server)
     autoupdate.enable()
     assertions.assertTrue(autoupdate.checkKeyPresent(), "DisableAutoUpdate reg key is not present")
     self._shouldNotBePinged(trigger,server)
     autoupdate.setUserPoolAdmin()
     autoupdate.enable()
     assertions.assertTrue(autoupdate.checkKeyPresent() and autoupdate.isActive(),"Xapi does not indicate that AutoUpdate is enabled")
     autoupdate.setUserVMUser()
     autoupdate.disable()
     assertions.assertTrue(autoupdate.checkKeyPresent() and not autoupdate.isActive(),"registry does not indicate that AutoUpdate is disabled")
     self._shouldNotBePinged(trigger,server)
 def run(self, arglist):
     self.adapter.applyLicense(self.getDefaultPool())
     vss = self.agent.getLicensedFeature("VSS")
     assertions.assertFalse(vss.isSnapshotPossible(),"VSS Snapshot Taken on Non Serverclass Windows")
     self.adapter.releaseLicense(self.getDefaultPool())
     assertions.assertFalse(vss.isSnapshotPossible(), "VSS Snapshot Taken on Non Serverclass Windows")
 def run(self, arglist):
     self.adapter.applyLicense(self.getDefaultPool())
     vss = self.agent.getLicensedFeature("VSS")
     assertions.assertTrue(vss.isSnapshotPossible(),"snapshot failed in licensed pool")
     self.adapter.releaseLicense(self.getDefaultPool())
     assertions.assertFalse(vss.isSnapshotPossible(),"snapshot succeeded in unlicensed pool")
 def _shouldNotBePinged(self,trigger,server):
     pinged = self._pingServer(trigger,server)
     assertions.assertFalse(pinged,"Server was pinged when it shouldn't be")