Changeset 6cda7c1 in flex_extract.git
- Timestamp:
- Nov 27, 2018, 11:48:40 PM (5 years ago)
- Branches:
- master, ctbto, dev
- Children:
- b2e95c3
- Parents:
- 2d56c04
- Location:
- source/python
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
source/python/_config.py
rd8785f8 r6cda7c1 31 31 32 32 QUEUES_LIST = ['ecgate', 'cca', 'ccb'] 33 34 INSTALL_TARGETS = ['local', 'ecgate', 'cca'] 33 35 34 36 # up-to-date available maximum level numbers at ECMWF, 05.10.2018 -
source/python/classes/ControlFile.py
r2d56c04 r6cda7c1 504 504 return 505 505 506 def check_install_conditions(self):507 '''Checks a couple of necessary attributes and conditions508 for the installation such as if they exist and contain values.509 Otherwise set default values.510 511 Parameters512 ----------513 514 Return515 ------516 517 '''518 519 if self.install_target and \520 self.install_target not in ['local', 'ecgate', 'cca']:521 print('ERROR: unknown or missing installation target ')522 print('target: ', self.install_target)523 print('please specify correct installation target ' +524 '(local | ecgate | cca)')525 print('use -h or --help for help')526 sys.exit(1)527 528 if self.install_target and self.install_target != 'local':529 if not self.ecgid or not self.ecuid or \530 not self.gateway or not self.destination:531 print('Please enter your ECMWF user id and group id as well ' +532 'as the \nname of the local gateway and the ectrans ' +533 'destination ')534 print('with command line options --ecuid --ecgid \535 --gateway --destination')536 print('Try "' + sys.argv[0].split('/')[-1] + \537 ' -h" to print usage information')538 print('Please consult ecaccess documentation or ECMWF user \539 support for further details')540 sys.exit(1)541 542 if not self.flexpart_root_scripts:543 self.flexpart_root_scripts = '${HOME}'544 else:545 self.flexpart_root_scripts = self.flexpart_root_scripts546 else: # local547 if not self.flexpart_root_scripts:548 self.flexpart_root_scripts = _config.PATH_FLEXEXTRACT_DIR549 550 return551 552 506 def to_list(self): 553 507 '''Just generates a list of strings containing the attributes and -
source/python/install.py
r3946de5 r6cda7c1 80 80 c = ControlFile(args.controlfile) 81 81 c.assign_args_to_control(args) 82 c .check_install_conditions()82 check_install_conditions(c) 83 83 84 84 install_via_gateway(c) … … 218 218 219 219 return 220 221 def check_install_conditions(c): 222 '''Checks a couple of necessary attributes and conditions 223 for the installation such as if they exist and contain values. 224 Otherwise set default values. 225 226 Parameters 227 ---------- 228 c : :obj:`ControlFile` 229 Contains all the parameters of CONTROL file and 230 command line. 231 232 233 Return 234 ------ 235 236 ''' 237 238 if c.install_target and \ 239 c.install_target not in _config.INSTALL_TARGETS: 240 print('ERROR: unknown or missing installation target ') 241 print('target: ', c.install_target) 242 print('please specify correct installation target ' + 243 str(INSTALL_TARGETS)) 244 print('use -h or --help for help') 245 sys.exit(1) 246 247 if c.install_target and c.install_target != 'local': 248 if not c.ecgid or not c.ecuid or \ 249 not c.gateway or not c.destination: 250 print('Please enter your ECMWF user id and group id as well ' + 251 'as the \nname of the local gateway and the ectrans ' + 252 'destination ') 253 print('with command line options --ecuid --ecgid \ 254 --gateway --destination') 255 print('Try "' + sys.argv[0].split('/')[-1] + \ 256 ' -h" to print usage information') 257 print('Please consult ecaccess documentation or ECMWF user \ 258 support for further details') 259 sys.exit(1) 260 261 if not c.flexpart_root_scripts: 262 c.flexpart_root_scripts = '${HOME}' 263 else: 264 c.flexpart_root_scripts = c.flexpart_root_scripts 265 else: # local 266 if not c.flexpart_root_scripts: 267 c.flexpart_root_scripts = _config.PATH_FLEXEXTRACT_DIR 268 269 return 270 220 271 221 272 def mk_tarball(tarball_path, target):
Note: See TracChangeset
for help on using the changeset viewer.