parameters: (self, root_dir, tarball_url)
return_statement: return ret, output
docstring: Return tuple (ret, ouput).
docstring_summary: Return tuple (ret, ouput).
docstring_tokens: Return tuple ( ret ouput ) .
function: def install(self, root_dir, tarball_url):
          """Return tuple (ret, ouput)."""
          # Install mongod, if 'root_dir' does not exist.
          if os.path.isdir(root_dir):
              LOGGER.warning("Root dir %s already exists", root_dir)
          else:
              _do_install_mongod(bin_dir=self.bin_dir, tarball_url=tarball_url, root_dir=root_dir)
          self.bin_dir = get_bin_dir(root_dir)
          if not self.bin_dir:
              ret, output = execute_cmd("ls -lR '{}'".format(root_dir), use_file=True)
              LOGGER.debug(output)
              return 1, "No bin dir can be found under {}".format(root_dir)
          self.bin_path = os.path.join(self.bin_dir, self.process_name)
          # We need to instantiate the Service when installing, since the bin_path
          # is only known after install_mongod runs.
          self.service = self._service("mongod-powercycle-test", self.bin_path, self.mongod_options(),
                                       db_path=None)
          ret, output = self.service.create()
          return ret, output
function_tokens: def install ( self , root_dir , tarball_url ) : # Install mongod, if 'root_dir' does not exist. if os . path . isdir ( root_dir ) : LOGGER . warning ( "Root dir %s already exists" , root_dir ) else : _do_install_mongod ( bin_dir = self . bin_dir , tarball_url = tarball_url , root_dir = root_dir ) self . bin_dir = get_bin_dir ( root_dir ) if not self . bin_dir : ret , output = execute_cmd ( "ls -lR '{}'" . format ( root_dir ) , use_file = True ) LOGGER . debug ( output ) return 1 , "No bin dir can be found under {}" . format ( root_dir ) self . bin_path = os . path . join ( self . bin_dir , self . process_name ) # We need to instantiate the Service when installing, since the bin_path # is only known after install_mongod runs. self . service = self . _service ( "mongod-powercycle-test" , self . bin_path , self . mongod_options ( ) , db_path = None ) ret , output = self . service . create ( ) return ret , output