# ============LICENSE_START=======================================================
-# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2019-2022 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
def get_distribution_target(ds_id):
global _cache
- result = [ i for i in _cache if i["dt_id"] == ds_id ]
+ result = [i for i in _cache if i["dt_id"] == ds_id]
return result[0] if result else {}
+
def transform_request(req):
"""Transform request to object to store
req["processGroups"] = []
return req
+
def add_distribution_target(dt):
global _cache
_cache.append(dt)
dt["modified"] = datetime.utcnow().isoformat()
return dt
+
def update_distribution_target(updated_dt):
dt_id = updated_dt["dt_id"]
global _cache
dt["processGroups"].append(process_group)
return process_group
return None
-
-