Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.stsci.edu/spst/UnixTransition/doc/pass_product.html
Дата изменения: Fri Apr 8 12:46:15 2016
Дата индексирования: Mon Apr 11 02:09:08 2016
Кодировка:
Python: module pass_product
 
 
pass_product (version 16.02.01)
index
pass_product.py

PURPOSE --
A super-class for PASS products
 
NOTE: On Unix, this tool needs Python 2.0 or greater.
 
DEVELOPER --
Greg Wenzel and Don Chance
 
MODIFICATION HISTORY --
 
o  initial implementation  GWW   03/08/02
o  always create a new script in run_prep. drc 2/9/04
o  add new 2-gyro & lga comm products. drc 11/12/04
o  another change for new lga comm products. drc 3/10/05
o  remove some references to SSSP1. drc 11/9/05
o  add qbf loads. drc 12/16/10
o  add hga_*.rpt to CCS MS files. drc 3/15/11
o  add hga_*.rpt to EWS MS files. drc 4/2/14
o  code cleanup drc 5/21/15
o  turn off file renaming on EWS transfers. drc 11/30/15
o  add REVISION_LETTERS global drc 2/1/16

 
Modules
       
ccs_util
configure_util
ephem_util
file_util
os
spss_sys_util
string
time_util
transfer_util

 
Classes
       
configure_util.pickled_product
pass_product

 
class pass_product(configure_util.pickled_product)
    An abstract class from which other PASS product classes are derived.
 
  Methods defined here:
__init__(self, product_type, span=None, comment=None, runonvms=None)
__repr__(self)
archive(self, archive_type)
Create a zip or bck file.
create_namelist(self)
Create the namelist for this product.
 
Must be overriden by the subclasses.
create_script(self)
Create the script to run this product.
 
Must be overriden by the subclasses.
get_ccs_product(self)
returns ccs product transfer object
get_ccs_transfer_time(self)
Return the ccs transfer time.
get_config_file(self)
Return the path to the config file.
get_namelist(self)
Return the path to the namelist file.
 
Must be overriden by the subclasses.
get_namelist_template(self)
get_output_directory(self)
Get the output directory.
get_output_file(self, extension)
Given a file extension (the part after the dot), return a list of
files with that extension located in the output directory.
get_pass_archive_glob_list(self)
returns a list of files to be archived and or transfered to
pass test system on spunix
get_rsh_logfile(self)
Return the path to the log file for rsh output.
get_run_name(self)
Get the run name this product is associated with.
get_run_time(self)
gets the run time
get_run_type(self)
gets run type (test,flight)
get_runonvms(self)
returns runonvms flag
get_script_obj(self)
get_software_version(self)
Return the software version to be used when running these products.
get_sssp1_transfer_time(self)
Return the SSSP/SSSP1 transfer time.
remove(self, which_prods='o')
Delete the current set of products.
 
'which_prods' must one or more characters from 'oalsnc'.
 
Depending on 'which_prods', the following items will be deleted:
   o = output directory (and everything it contains)
   l = log file
   s = script file
   n = namelist
   c = config file
   a = all of the above
run(self, verbose=0)
Generate this product.
run_prep(self)
Make sure whatever needs to be done before running
this product is done.
send_ews(self, node=1)
Send products to the Engineering Workstation Data Store.
send_sssp1(self)
send products to sssp
set_ccs_product(self, xfer_type='ops', string_list=['I', 'J', 'K'], pnm_directory=None)
sets/creates ccs product transfer object
set_config_file(self, config_file)
Set the config file to the input file name.
set_namelist_template(self, file)
set_output_directory(self, directory=None)
Set the output directory and also the scratch directory.
set_root_output_path(self, path)
top level of output
expected to be:
               '/vms/spst_ms/' for ops run
               '/vms/spst_ms/<accountname>/<date>/' for test run.
set_run_name(self, run_name)
set the run name this product is associated with.
set_run_time(self, runtime)
sets the run time
set_run_type(self, run_type)
set run_type parameter to either test,or flight
set_runonvms(self, runonvms=False)
set runonvms to true of false
set_script_created(self, val)
set_software_version(self, ver)
set software version for running pass
set_sssp1_transfer_time(self, transfer_time=2016.099:09:45:10)
Set the SSSP/SSSP1 transfer time.
submit(self, verbose=0)
Submit a run of this product to a batch queue.

Methods inherited from configure_util.pickled_product:
configure_pickle(self, pickle_directory='/data/scheduling/spss_flight_data/pass/pickles', new_pickle_name=None, verbose=False)
configures product to pickle file.
copy(self)
return a copy of self with current create time
get_comment(self)
returns the comment line
get_create_time(self)
returns create time
get_pickle_path(self)
get_span(self)
Span of configured product is the intersection of all the
spans of the configured files.
should be overiden by inheriting class if needed.
get_type(self)
returns the product type
report(self)
print out a detailed report of objects information
overide to add more detail if needed.
report_sum(self)
print out summary of objects information.
set_comment(self, comment)
sets product comment line
set_create_time(self)
sets create time
set_pickle_path(self, path)
set_product_type(self, product_type)
product type must be a pickle type
set_span(self, t1=None, t2=None)
sets the time span for which this product is valid.
should be overiden by inheriting class if needed.
validate(self)
checks all configured files in product for existence
and returns false if any data is missing.
 
should be overiden by inheriting class if needed.

 
Data
        ARCHIVE_CCS_CL_FILES = ['ctreport.rpt', 'clcprpt.rpt', '.erl', 'cldfmsg.rpt', 'clnsmsg.rpt', 'clmsg.rpt', 'clrtsinx.rpt', 'ctmline.rpt', 'cltabapx.rpt', 'cluplink.rpt', 'lchk*.rpt', '.ers']
ARCHIVE_CCS_MEGG_FILES = []
ARCHIVE_CCS_MOSR_FILES = []
ARCHIVE_CCS_MS_FILES = ['.ran', '*.rat', '*.rel', '*.rg*', '*.roc', '*.bas', '*.ros', '*.rsm', '*.rul', '*.rms', '*.rso', '*.rsa', '*.ped', '*.psd', '*.rsv', '*.ps', '*.els', 'mosr.rpt', 'lga_*.pdf', 'hga_.rpt', ...]
ARCHIVE_CCS_OPC_FILES = ['.map', '*.spc', '*.qbf', 'op.cat']
ARCHIVE_EWS_CL_FILES = ['ctreport.rpt', '.erl', '*.ers', '*.map', 'clnsmsg.rpt', 'clmsg.rpt', 'cltabapx.rpt', 'clrtsinx.rpt', '*.spc', '*.qbf', 'ctmline.rpt', 'cluplink.rpt', 'cl*.cat', 'op*.cat', 'lchk*.rpt', 'ps.evt']
ARCHIVE_EWS_MEGG_FILES = []
ARCHIVE_EWS_MOSR_FILES = []
ARCHIVE_EWS_MS_FILES = ['.ran', '*.rat', '*.rdo', '*.rel', '*.ers', '*.rfa', '*.rg*', '*.roc', '*.bas', '*.ros', '*.rsm', '*.rul', '*.rms', '*.rso', '*.rsa', '*.ped', '*.psd', '*.rsv', '*.ps', '.els', ...]
ARCHIVE_EWS_OPC_FILES = []
ARCHIVE_FILES_DICT = {'cl': {'ALL': '.*', 'CCS': ['ctreport.rpt', 'clcprpt.rpt', '*.erl', 'cldfmsg.rpt', 'clnsmsg.rpt', 'clmsg.rpt', 'clrtsinx.rpt', 'ctmline.rpt', 'cltabapx.rpt', 'cluplink.rpt', 'lchk*.rpt', '*.ers'], 'EWS': ['ctreport.rpt', '*.erl', '*.ers', '*.map', 'clnsmsg.rpt', 'clmsg.rpt', 'cltabapx.rpt', 'clrtsinx.rpt', '*.spc', '*.qbf', 'ctmline.rpt', 'cluplink.rpt', 'cl*.cat', 'op*.cat', 'lchk*.rpt', 'ps*.evt'], 'SSSP1': ['ctreport.rpt', '*.erl', '*.ers', '*.map', 'clnsmsg.rpt', 'clmsg.rpt', 'cltabapx.rpt', 'clrtsinx.rpt', '*.spc', '*.qbf', 'ctmline.rpt', 'cluplink.rpt', 'cl*.cat', 'op*.cat', 'lchk*.rpt', 'ps*.evt'], 'SSSP1_DIR': 'appsw:[data.sms.cl.%s]'}, 'megg': {'ALL': '*.*', 'CCS': [], 'EWS': [], 'SSSP1': [], 'SSSP1_DIR': 'appsw:[data.sms.ms.%s]'}, 'ms': {'ALL': '*.*', 'CCS': ['*.ran', '*.rat', '*.rel', '*.rg*', '*.roc', '*.bas', '*.ros', '*.rsm', '*.rul', '*.rms', '*.rso', '*.rsa', '*.ped', '*.psd', '*.rsv', '*.ps', '*.els', 'mosr.rpt', 'lga_*.pdf', 'hga_*.rpt', ...], 'EWS': ['*.ran', '*.rat', '*.rdo', '*.rel', '*.ers', '*.rfa', '*.rg*', '*.roc', '*.bas', '*.ros', '*.rsm', '*.rul', '*.rms', '*.rso', '*.rsa', '*.ped', '*.psd', '*.rsv', '*.ps', '*.els', ...], 'SSSP1': ['*.ran', '*.rat', '*.rdo', '*.rel', '*.ers', '*.rfa', '*.rg*', '*.roc', '*.bas', '*.ros', '*.rsm', '*.rul', '*.rms', '*.rso', '*.rsa', '*.ped', '*.psd', '*.rsv', '*.ps', '*.els', ...], 'SSSP1_DIR': 'appsw:[data.sms.ms.%s]'}, 'opc': {'ALL': '*.*', 'CCS': ['*.map', '*.spc', '*.qbf', 'op*.cat'], 'EWS': [], 'SSSP1': [], 'SSSP1_DIR': 'appsw:[data.sms.cl.%s.opc]'}, 'xmr': {'ALL': '*.', 'CCS': [], 'EWS': [], 'SSSP1': [], 'SSSP1_DIR': 'appsw:[data.sms.ms.%s]'}}
ARCHIVE_SSSP1_CL_FILES = ['ctreport.rpt', '.erl', '*.ers', '*.map', 'clnsmsg.rpt', 'clmsg.rpt', 'cltabapx.rpt', 'clrtsinx.rpt', '*.spc', '*.qbf', 'ctmline.rpt', 'cluplink.rpt', 'cl*.cat', 'op*.cat', 'lchk*.rpt', 'ps.evt']
ARCHIVE_SSSP1_MEGG_FILES = []
ARCHIVE_SSSP1_MOSR_FILES = []
ARCHIVE_SSSP1_MS_FILES = ['.ran', '*.rat', '*.rdo', '*.rel', '*.ers', '*.rfa', '*.rg*', '*.roc', '*.bas', '*.ros', '*.rsm', '*.rul', '*.rms', '*.rso', '*.rsa', '*.ped', '*.psd', '*.rsv', '*.ps', '.els', ...]
ARCHIVE_SSSP1_OPC_FILES = []
COMPUTERS = ['486', 'nssc']
LOAD_BREAK_TYPES = ['fixed', 'forced']
NCC_SCHEDULING_MODES = ['i', 'f', 'g']
PASS_MSIN_DIRECTORY = '/data/scheduling/spss_flight_data/pass/msin/'
PASS_SOFTWARE_VERSIONS = ['ops', 'old', 'new', 'spec']
PASS_SYSTEM = 'ops'
REVISION_LETTERS = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', ...]
RUN_TYPES = ['flight', 'test']
SMS_TYPES = ['continuity', 'cold start']
SSSP1_SMS_DIR = 'appsw:[data.sms.moc.sms]'
START_MODES = ['reopen', 'initial', 'closeout']
__version__ = '16.02.01'
l = 'Z'
revision_letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'