def run(self, cmd, timeout=None, comments=True): if self.remote_ip == None: # (ret, output) = commands.getstatusoutput(cmd, timeout) ret, output = LocalSH.local_run(cmd, timeout, comments) else: ret, output = RemoteSH.remote_run(cmd, self.remote_ip, self.username, self.password, timeout) # ret, output = RemoteSH.run_pexpect(cmd, self.remote_ip, self.username, self.password, timeout) return ret, output
def remote_put(self, from_path, to_path): RemoteSH.remote_put(self.remote_ip, self.username, self.password, from_path, to_path)
def __import_manifest(self, sam_server): cmd = "headpin -u admin -p admin provider import_manifest --org=ACME_Corporation --name='Red Hat' --file=/root/sam_install_manifest.zip" RemoteSH.remote_run(cmd, sam_server, "root", "xxoo2014", 1800)
def __deploy_sam(self, sam_server): cmd = "katello-configure --deployment=sam --user-pass=admin" RemoteSH.remote_run(cmd, sam_server, "root", "xxoo2014", 1800)
def run_interact(self, cmd, timeout=None, comments=True): ret, output = RemoteSH.run_paramiko_interact(cmd, self.remote_ip, self.username, self.password, timeout) return ret, output
def run(self, cmd, timeout=None, comments=True): if self.remote_ip == None: ret, output = LocalSH.local_run(cmd, timeout, comments) else: ret, output = RemoteSH.remote_run(cmd, self.remote_ip, self.username, self.password, timeout, comments) return ret, output
def __import_manifest(self, sam_server): cmd = "headpin -u admin -p admin provider import_manifest --org=ACME_Corporation --name='Red Hat' --file=/root/sam_install_manifest.zip" RemoteSH.remote_run(cmd, sam_server, "root", "red2015", 1800)
def __deploy_sam(self, sam_server): cmd = "katello-configure --deployment=sam --user-pass=admin" RemoteSH.remote_run(cmd, sam_server, "root", "red2015", 1800)