示例#1
0
 def check_dmid(prod_ls, contactid=None):
     # find all the submitted products that are nlaps and reject them
     not_avail = nlaps.products_are_nlaps(prod_ls)
     if not_avail:
         raise InventoryException(not_avail)
     token = inventory.get_cached_session()
     return inventory.get_cached_verify_scenes(token, prod_ls)
示例#2
0
 def check_dmid(prod_ls, contactid=None):
     try:
         token = inventory.get_cached_session()
         return inventory.check_valid(token, prod_ls)
     except Exception as e:
         msg = 'Could not connect to EarthExplorer source'
         logger.critical(msg + str(e))
         raise InventoryConnectionException(msg)
示例#3
0
 def check_dmid(prod_ls, contactid=None):
     # find all the submitted products that are nlaps and reject them
     not_avail = nlaps.products_are_nlaps(prod_ls)
     if not_avail:
         raise InventoryException(not_avail)
     logger.info('@@ VERIFY: FETCH via MACHINE-TO-MACHINE')
     token = inventory.get_cached_session()
     results = inventory.get_cached_verify_scenes(token, prod_ls)
     logger.info('@@ VERIFY: COMPLETE via MACHINE-TO-MACHINE')
     return results
示例#4
0
 def setUp(self):
     os.environ['espa_api_testing'] = 'True'
     self.token = inventory.get_cached_session()  # Initial "real" request
     self.collection_ids = [
         'LC08_L1TP_156063_20170207_20170216_01_T1',
         'LE07_L1TP_028028_20130510_20160908_01_T1',
         'LT05_L1TP_032028_20120425_20160830_01_T1'
     ]
     _ = inventory.get_cached_convert(self.token, self.collection_ids)
     _ = inventory.get_cached_verify_scenes(self.token, self.collection_ids)
示例#5
0
 def test_cached_login(self):
     token = inventory.get_cached_session()
     self.assertIsInstance(token, basestring)
示例#6
0
 def check_dmid(prod_ls, contactid=None):
     token = inventory.get_cached_session()
     return inventory.check_valid(token, prod_ls)