def run(self, arglist=None): step("Testing ALLOWED RBAC accounts.") for key in self.ALLOWED_ROLES: self.runSubcase("runRBACTest", (True, key, self.ALLOWED_ROLES[key]), "allowed", key) step("Testing PROHIBITED RBAC accounts.") for key in self.PROHIBITED_ROLES: self.runSubcase("runRBACTest", (False, key, self.PROHIBITED_ROLES[key]), "prohibited", key)
def run(self, arglist=None): step("Check command length restricted to 1024 bytes") self.runCase(self.verifyCommandLength) xenrt.sleep(self.COMMAND_INTERVAL) step("Check stdout is truncated properly.") self.runCase(self.verifyStdoutLength)
def run(self, arglist=None): host = self.getDefaultHost() guest = self.guests[0] # This only pass on fresh install. step("Check default value is set off") if self.isRemoteExecEnabled(): raise xenrt.XRTFailure("Feature is on by default.") step("Try run command while feature is disabled.") if self.verifyWorks(guest): raise xenrt.XRTFailure("Guest executed command while %s is disabled." % self.POOL_OPTION) xenrt.sleep(self.COMMAND_INTERVAL) step("Turn it on and check feature works.") self.enableRemoteExecAPI() if not self.verifyWorks(guest): raise xenrt.XRTFailure("Feature did not work after %s is enabled." % self.POOL_OPTION) xenrt.sleep(self.COMMAND_INTERVAL) step("Check guest level configuration.") self.disableRemoteExecFromGuest(guest) if self.verifyWorks(guest): raise xenrt.XRTFailure("Guest executed command while registry is set.") if not self.verifyWorks(self.guests[1]): raise xenrt.XRTFailure("Guest failed to execute command while registry is NOT set and %s is enabled." % \ (self.POOL_OPTION)) xenrt.sleep(self.COMMAND_INTERVAL) self.enableRemoteExecFromGuest(guest) if not self.verifyWorks(guest): raise xenrt.XRTFailure("Guest failed to execute command while after registry key is removed.")
def run(self, arglist=[]): log("Using %s(%s) SR to test." % (self.xsr.name, self.xsr.uuid)) step("Store initial status of local disk.") self.initialStatus = self.getRawProperties() step("Verify initial status of SR") self.verifyInitialProperties() step("Verify status of SR after a linux VM is installed.") self.verifyAfterGuestInstalled() step("Verify status of SR after an empty VDI is created.") self.verifyAfterVDICreated() step("Verify status of SR after fill VDI.") self.verifyAfterVDIFilled()
def run(self, arglist=[]): log ("Using %s(%s) SR to test." % (self.xsr.name, self.xsr.uuid)) step("Store initial status of local disk.") self.initialStatus = self.getRawProperties() step("Verify initial status of SR") self.verifyInitialProperties() step("Verify status of SR after a linux VM is installed.") self.verifyAfterGuestInstalled() step("Verify status of SR after an empty VDI is created.") self.verifyAfterVDICreated() step("Verify status of SR after fill VDI.") self.verifyAfterVDIFilled()
def run(self, arglist=None): step("Start all longRunning jobs.") self.runCase(self.executeLongRunningCommand) step("Verify next command is blocked by XAPI.") self.runCase(self.verifyDualCommandProhibited) step("Verify VM power ops are blocked by XAPI.") self.runCase(self.verifyVMOPsProhibited) step("Verify force reboot VM cancels existing job.") self.runCase(self.verifyCommandCancelled)
def run(self, arglist=[]): log("Running Basic functionality with %s method." % self.METHOD) step("Running valid command.") self.runSubcase("runCase", (self.verifyBasicFuncPosCase,), "Positive case", self.METHOD) xenrt.sleep(self.COMMAND_INTERVAL) step("Running invlaid command.") self.runSubcase("runCase", (self.verifyBasicFuncNegCase,), "Negative case", self.METHOD) xenrt.sleep(self.COMMAND_INTERVAL) step("Running empty command.") self.runSubcase("runCase", (self.verifyBasicFuncEmptyCommand,), "Empty command", self.METHOD) xenrt.sleep(self.COMMAND_INTERVAL)
def run(self, arglist=None): host = self.getDefaultHost() guest = self.guests[0] # This only pass on fresh install. step("Check default value is set off") if self.isRemoteExecEnabled(): raise xenrt.XRTFailure("Feature is on by default.") step("Try run command while feature is disabled.") if self.verifyWorks(guest): raise xenrt.XRTFailure( "Guest executed command while %s is disabled." % self.POOL_OPTION) xenrt.sleep(self.COMMAND_INTERVAL) step("Turn it on and check feature works.") self.enableRemoteExecAPI() if not self.verifyWorks(guest): raise xenrt.XRTFailure( "Feature did not work after %s is enabled." % self.POOL_OPTION) xenrt.sleep(self.COMMAND_INTERVAL) step("Check guest level configuration.") self.disableRemoteExecFromGuest(guest) if self.verifyWorks(guest): raise xenrt.XRTFailure( "Guest executed command while registry is set.") if not self.verifyWorks(self.guests[1]): raise xenrt.XRTFailure("Guest failed to execute command while registry is NOT set and %s is enabled." % \ (self.POOL_OPTION)) xenrt.sleep(self.COMMAND_INTERVAL) self.enableRemoteExecFromGuest(guest) if not self.verifyWorks(guest): raise xenrt.XRTFailure( "Guest failed to execute command while after registry key is removed." )
def run(self, arglist=[]): log("Running Basic functionality with %s method." % self.METHOD) step("Running valid command.") self.runSubcase("runCase", (self.verifyBasicFuncPosCase, ), "Positive case", self.METHOD) xenrt.sleep(self.COMMAND_INTERVAL) step("Running invlaid command.") self.runSubcase("runCase", (self.verifyBasicFuncNegCase, ), "Negative case", self.METHOD) xenrt.sleep(self.COMMAND_INTERVAL) step("Running empty command.") self.runSubcase("runCase", (self.verifyBasicFuncEmptyCommand, ), "Empty command", self.METHOD) xenrt.sleep(self.COMMAND_INTERVAL)