MAP_PROFILE = {
"infra_controller_profiles": "infra-controllers",
- "infra_config_profiles": "infra-controllers",
+ "infra_config_profiles": "infra-configs",
"resource_profiles": "managed_resources",
"app_profiles": "apps",
}
if "sw_catalog_path" in oka_item:
oka_path = oka_item["sw_catalog_path"]
else:
- oka_type = "infra-controllers"
+ oka_type = MAP_PROFILE[
+ oka_item.get("profile_type", "infra_controller_profiles")
+ ]
oka_name = oka_item["git_name"]
oka_path = f"{oka_type}/{oka_name}/templates"
if "sw_catalog_path" in oka_item:
oka_path = oka_item["sw_catalog_path"]
else:
- oka_type = "infra-controllers"
+ oka_type = MAP_PROFILE[
+ oka_item.get("profile_type", "infra_controller_profiles")
+ ]
oka_name = oka_item["git_name"]
oka_path = f"{oka_type}/{oka_name}/templates"
import yaml
+MAP_PROFILE = {
+ "infra_controller_profiles": "infra-controllers",
+ "infra_config_profiles": "infra-configs",
+ "resource_profiles": "managed_resources",
+ "app_profiles": "apps",
+}
+
+
async def create_oka(self, op_id, op_params, content):
self.logger.info(f"create_oka Enter. Operation {op_id}. Params: {op_params}")
# self.logger.debug(f"Content: {content}")
# Additional params for the workflow
oka_name = content["git_name"].lower()
- oka_type = "infra-controllers"
+ oka_type = MAP_PROFILE[content.get("profile_type", "infra_controller_profiles")]
osm_project_name = "osm_admin" # TODO: get project name from content
# Get the OKA package
# Additional params for the workflow
oka_name = content["git_name"].lower()
- oka_type = "infra-controllers"
+ oka_type = MAP_PROFILE[content.get("profile_type", "infra_controller_profiles")]
osm_project_name = "osm_admin" # TODO: get project name from content
# Get the OKA package
# Additional params for the workflow
oka_name = content["git_name"].lower()
- oka_type = "infra-controllers"
+ oka_type = MAP_PROFILE[content.get("profile_type", "infra_controller_profiles")]
+
osm_project_name = "osm_admin" # TODO: get project name from content
# Render workflow