예제 #1
0
 def create_candlepin_pool(pool_uuid=None, account_id=None, product_id=None, product_name=None):
     if not pool_uuid:
         pool_uuid = "unit_test_pool_id"
     if not account_id:
         account_id = "1"
     if not product_id:
         product_id = "unit_test_product_id"
     if not product_name:
         product_name = "unit_test_product_name"
     pool = Pool(
         uuid=pool_uuid,
         account=account_id,
         product_id=product_id,
         product_name=product_name,
         created=datetime.now(tzutc()),
         start_date=datetime.now(tzutc()),
         end_date=datetime.now(tzutc()),
         updated=datetime.now(tzutc()),
         quantity=1,
     )
     pool.save()
     return pool
예제 #2
0
파일: api.py 프로젝트: splice/report_server
 def get_existing(self, obj):
     return Pool.objects(uuid=obj.uuid).first()
예제 #3
0
 def drop_pools(self):
     from report_server.sreport.models import Pool
     Pool.drop_collection()
예제 #4
0
 def drop_collections(self):
     Pool.drop_collection()