Beispiel #1
0
def main(args=None):
    parser = argparse.ArgumentParser(
        description='CAIRIS quick setup script - headless')
    parser.add_argument('--dbHost',
                        dest='dbHost',
                        help='Database host name',
                        default='localhost')
    parser.add_argument('--dbPort',
                        dest='dbPort',
                        help='Database port number',
                        default='3306')
    parser.add_argument('--dbRootPassword',
                        dest='dbRootPassword',
                        help='Database root password',
                        default='')
    parser.add_argument('--tmpDir',
                        dest='tmpDir',
                        help='Temp directory',
                        default='/tmp')
    defaultRootDir = os.path.split(
        os.path.split(os.path.realpath(os.path.dirname(__file__)))[0])[0]
    parser.add_argument('--rootDir',
                        dest='rootDir',
                        help='Root directory',
                        default=defaultRootDir + '/cairis')
    homeDir = os.environ['HOME']
    parser.add_argument(
        '--configFile',
        dest='configFile',
        help='CAIRIS configuration file name (fully qualified path)',
        default=homeDir + '/cairis.cnf')
    parser.add_argument('--webPort',
                        dest='webPort',
                        help='Web port',
                        default='7071')
    parser.add_argument('--logLevel',
                        dest='logLevel',
                        help='Log level',
                        default='warning')
    parser.add_argument('--staticDir',
                        dest='staticDir',
                        help='Static directory',
                        default=defaultRootDir + '/cairis/dist')
    parser.add_argument('--assetDir',
                        dest='assetDir',
                        help='Asset directory',
                        default=defaultRootDir + '/cairis/dist')
    parser.add_argument('--user',
                        dest='userName',
                        help='Initial username',
                        default='test')
    parser.add_argument('--password',
                        dest='passWd',
                        help='Initial password',
                        default='test')
    args = parser.parse_args()
    quick_setup(args.dbHost, int(args.dbPort), args.dbRootPassword,
                args.tmpDir, args.rootDir, args.configFile, int(args.webPort),
                args.logLevel, args.staticDir, args.assetDir, args.userName,
                args.passWd)
Beispiel #2
0
 def on_ok(self):
   try:
     quick_setup(self.theHost.value,int(self.thePort.value),self.theRootPassword.value,self.theTmpDir.value,self.theRootDir.value,self.theFileName.value,int(self.theWebPort.value),self.theLogLevel.value,self.theStaticDir.value,self.theAssetDir.value,self.theUsername.value,self.thePassword.value)
     self.parentApp.setNextForm(None)
   except ARMException as e:
     np.notify_confirm(str(e), title = 'Error')
   except SQLAlchemyError as e:
     np.notify_confirm('Error adding CAIRIS user: '******'Error')
Beispiel #3
0
 def on_ok(self):
     try:
         quick_setup(self.theHost.value, int(self.thePort.value),
                     self.theRootPassword.value, self.theTmpDir.value,
                     self.theRootDir.value, self.theFileName.value,
                     int(self.theWebPort.value), self.theLogLevel.value,
                     self.theStaticDir.value, self.theAssetDir.value,
                     self.theUsername.value, self.thePassword.value)
         self.parentApp.setNextForm(None)
     except ARMException as e:
         np.notify_confirm(str(e), title='Error')
     except SQLAlchemyError as e:
         np.notify_confirm('Error adding CAIRIS user: '******'Error')
Beispiel #4
0
def main(args=None):
  parser = argparse.ArgumentParser(description='CAIRIS quick setup script - headless')
  parser.add_argument('--dbHost',dest='dbHost',help='Database host name', default='localhost')
  parser.add_argument('--dbPort',dest='dbPort',help='Database port number',default='3306')
  parser.add_argument('--dbRootPassword',dest='dbRootPassword',help='Database root password',default='')
  parser.add_argument('--tmpDir',dest='tmpDir',help='Temp directory',default='/tmp')
  defaultRootDir = os.path.split(os.path.split(os.path.realpath(os.path.dirname(__file__)))[0])[0]
  parser.add_argument('--rootDir',dest='rootDir',help='Root directory',default=defaultRootDir + '/cairis')
  homeDir = os.environ['HOME']
  parser.add_argument('--configFile',dest='configFile',help='CAIRIS configuration file name (fully qualified path)',default=homeDir + '/cairis.cnf')
  parser.add_argument('--webPort',dest='webPort',help='Web port',default='7071')
  parser.add_argument('--logLevel',dest='logLevel',help='Log level',default='warning')
  parser.add_argument('--staticDir',dest='staticDir',help='Static directory',default=defaultRootDir + '/cairis/web')
  parser.add_argument('--assetDir',dest='assetDir',help='Asset directory',default=defaultRootDir + '/cairis/web/assets')
  parser.add_argument('--user',dest='userName',help='Initial username',default='test')
  parser.add_argument('--password',dest='passWd',help='Initial password',default='test')
  args = parser.parse_args() 
  quick_setup(args.dbHost,int(args.dbPort),args.dbRootPassword,args.tmpDir,args.rootDir,args.configFile,int(args.webPort),args.logLevel,args.staticDir,arg.assetDir,args.userName,args.passWd)