def get_campaigns_for_report(stix_id): campaigns = [] try: campaigns = extract.get_campaigns_simple(None,stix_id,None) except NoDocFoundError: print("No campaigns found.") return campaigns
def get_all_stix_campaigns( ): camps = [] camp_docs = extract.get_campaigns_simple() # camp_docs = db.campaigns.find({"status":CampaignStatus.TERM_ONGOING}) # get = dict_repr.get for c in camp_docs: #camp_status = VocabString.from_dict(c.get('status')) camps.append(Campaign.from_dict(c)) return camps
def get_unknown_campaigns( ): unk_camps = extract.get_campaigns_simple('Unknown', None, None) return unk_camps
def get_ongoing_campaigns( ): ongoing_camps = extract.get_campaigns_simple(CampaignStatus.TERM_ONGOING, None, None) return ongoing_camps
def get_historic_campaigns( ): historic_camps = extract.get_campaigns_simple(CampaignStatus.TERM_HISTORIC, None, None) return historic_camps
def get_future_campaigns( ): future_camps = extract.get_campaigns_simple(CampaignStatus.TERM_FUTURE, None, None) return future_camps