def current(self): if self.os_type == "Ubuntu": command = "dpkg -s " + self.name + " | grep Version" cmd = sshexec(self.node.servername, self.node.username, command) result = cmd.run() #cleanup if self.os_type == "Ubuntu": if "not installed" in result[0]: return None else: result = result[0].split(' ')[-1] return result.rstrip()
def install(self): if self.os_type == "Ubuntu": command = self.provider + self.name cmd = sshexec(self.node.servername, self.node.username, command) result = cmd.run()