Feature 10509 manual scaling for native k8s charm
Also includes improvements for scale function
Change-Id: I23f51b8c1b219681841d0b1f7f4db3a0d9ed4c7b
Signed-off-by: aktas <emin.aktas@ulakhaberlesme.com.tr>
diff --git a/osm_lcm/data_utils/vnfd.py b/osm_lcm/data_utils/vnfd.py
index 5351c41..17a98a9 100644
--- a/osm_lcm/data_utils/vnfd.py
+++ b/osm_lcm/data_utils/vnfd.py
@@ -101,6 +101,13 @@
)
+def get_kdu_profile(vnfd, kdu_profile_id):
+ return list_utils.find_in_list(
+ vnfd.get("df", ())[0]["kdu-resource-profile"],
+ lambda kdu_profile: kdu_profile["id"] == kdu_profile_id,
+ )
+
+
def get_configuration(vnfd, entity_id):
lcm_ops_config = vnfd.get("df")[0].get("lcm-operations-configuration")
if not lcm_ops_config: