def export_dse_home_in_dse_env_sh(self):
    "\n        Due to the way CCM lays out files, separating the repository\n        from the node(s) confs, the `dse-env.sh` script of each node\n        needs to have its DSE_HOME var set and exported. Since DSE\n        4.5.x, the stock `dse-env.sh` file includes a commented-out\n        place to do exactly this, intended for installers.\n        Basically: read in the file, write it back out and add the two\n        lines.\n        'sstableloader' is an example of a node script that depends on\n        this, when used in a CCM-built cluster.\n        "
    with open((self.get_bin_dir() + '/dse-env.sh'), 'r') as dse_env_sh:
        buf = dse_env_sh.readlines()
    with open((self.get_bin_dir() + '/dse-env.sh'), 'w') as out_file:
        for line in buf:
            out_file.write(line)
            if (line == '# This is here so the installer can force set DSE_HOME\n'):
                out_file.write((('DSE_HOME=' + self.get_install_dir()) + '\nexport DSE_HOME\n'))
Due to the way CCM lays out files, separating the repository
from the node(s) confs, the `dse-env.sh` script of each node
needs to have its DSE_HOME var set and exported. Since DSE
4.5.x, the stock `dse-env.sh` file includes a commented-out
place to do exactly this, intended for installers.
Basically: read in the file, write it back out and add the two
lines.
'sstableloader' is an example of a node script that depends on
this, when used in a CCM-built cluster.
def export_dse_home_in_dse_env_sh(self):
    "\n        Due to the way CCM lays out files, separating the repository\n        from the node(s) confs, the `dse-env.sh` script of each node\n        needs to have its DSE_HOME var set and exported. Since DSE\n        4.5.x, the stock `dse-env.sh` file includes a commented-out\n        place to do exactly this, intended for installers.\n        Basically: read in the file, write it back out and add the two\n        lines.\n        'sstableloader' is an example of a node script that depends on\n        this, when used in a CCM-built cluster.\n        "
    with open((self.get_bin_dir() + '/dse-env.sh'), 'r') as dse_env_sh:
        buf = dse_env_sh.readlines()
    with open((self.get_bin_dir() + '/dse-env.sh'), 'w') as out_file:
        for line in buf:
            out_file.write(line)
            if (line == '# This is here so the installer can force set DSE_HOME\n'):
                out_file.write((('DSE_HOME=' + self.get_install_dir()) + '\nexport DSE_HOME\n'))