def file_import(self): """ import """ setup = Setup() setup.clear_tables() setup.drop_constraints() imp = FileImport(self.config) imp.file_import() setup.add_constraints() setup = None imp = None
def _check_if_logged_in(self): """ Check if the user is connected to the current session. If is is not, it is refreshing the internal cookies and logging the user in. :return: True if successfully connected """ self._add_cookies() soup = self._get_soup() if soup.find('title').text.strip() != '': Setup().refresh_internal_cookies() self._check_if_logged_in() return True
def uninstall(): """ uninstall """ setup = Setup() setup.uninstall() setup = None
def install(): """ install """ setup = Setup() setup.install() setup = None
oxd_cert_tmp_fn = '/tmp/{}.crt'.format(oxd_alias) with open(oxd_cert_tmp_fn, 'w') as w: w.write(oxd_cert) setupObject.run([ '/opt/jre/jre/bin/keytool', '-import', '-trustcacerts', '-keystore', '/opt/jre/jre/lib/security/cacerts', '-storepass', 'changeit', '-noprompt', '-alias', oxd_alias, '-file', oxd_cert_tmp_fn ]) if __name__ == '__main__': setup_dir = os.path.join(cur_dir, 'setup') setupObject = Setup(setup_dir) setupObject.log = os.path.join(setup_dir, 'casa_update.log') setupObject.logError = os.path.join(setup_dir, 'casa_update_error.log') setupObject.os_initdaemon = setupObject.detect_initd() setupObject.os_type, setupObject.os_version = setupObject.detect_os_type() updaterObj = casaUpdate() updaterObj.check_if_gluu_upgarded() updaterObj.download_extract_package() if updaterObj.check_and_update_oxd(): updaterObj.update_casa() else: print "Please fix oxd update and re-run this script. Exiting for now ..."
def __init__(self, params): Setup.__init__(self, params)