Change-Id: I01c2e717eec96cb212e6a6f4bdddfa9931fe4385
Signed-off-by: Abukar Mohamed <abukar.mohamed@nokia.com>
validate(instance=instance, schema=schema)
# store the instance
validate(instance=instance, schema=schema)
# store the instance
- data.store_policy_instance(policy_type_id, policy_instance_id, instance)
+ operation = data.store_policy_instance(policy_type_id, policy_instance_id, instance)
# queue rmr send (best effort)
# queue rmr send (best effort)
- a1rmr.queue_instance_send(("CREATE", policy_type_id, policy_instance_id, instance))
+ a1rmr.queue_instance_send((operation, policy_type_id, policy_instance_id, instance))
creation_timestamp = time.time()
# store the instance
creation_timestamp = time.time()
# store the instance
key = _generate_instance_key(policy_type_id, policy_instance_id)
if SDL.get(A1NS, key) is not None:
key = _generate_instance_key(policy_type_id, policy_instance_id)
if SDL.get(A1NS, key) is not None:
# Reset the statuses because this is a new policy instance, even if it was overwritten
_clear_handlers(policy_type_id, policy_instance_id) # delete all the handlers
SDL.set(A1NS, key, instance)
# Reset the statuses because this is a new policy instance, even if it was overwritten
_clear_handlers(policy_type_id, policy_instance_id) # delete all the handlers
SDL.set(A1NS, key, instance)
metadata_key = _generate_instance_metadata_key(policy_type_id, policy_instance_id)
SDL.set(A1NS, metadata_key, {"created_at": creation_timestamp, "has_been_deleted": False})
metadata_key = _generate_instance_metadata_key(policy_type_id, policy_instance_id)
SDL.set(A1NS, metadata_key, {"created_at": creation_timestamp, "has_been_deleted": False})
def get_policy_instance(policy_type_id, policy_instance_id):
"""
def get_policy_instance(policy_type_id, policy_instance_id):
"""
# The Jenkins job uses this string for the tag in the image name
# for example nexus3.o-ran-sc.org:10004/my-image-name:my-tag
---
# The Jenkins job uses this string for the tag in the image name
# for example nexus3.o-ran-sc.org:10004/my-image-name:my-tag
---