diff options
Diffstat (limited to 'kud/tests')
-rwxr-xr-x | kud/tests/plugin_collection_v2.sh | 56 |
1 files changed, 25 insertions, 31 deletions
diff --git a/kud/tests/plugin_collection_v2.sh b/kud/tests/plugin_collection_v2.sh index ffa366f1..f6cb3a06 100755 --- a/kud/tests/plugin_collection_v2.sh +++ b/kud/tests/plugin_collection_v2.sh @@ -60,10 +60,16 @@ sub_composite_profile_name1="test_composite_profile1" sub_composite_profile_name2="test_composite_profile2" composite_profile_description="test_composite_profile_description" -genericPlacementIntentName1="test_gen_placement_intent1" -genericPlacementIntentName2="test_gen_placement_intent2" +genericPlacementIntentName="test_gen_placement_intent1" genericPlacementIntentDesc="test_gen_placement_intent_desc" logicalCloud="logical_cloud_name" + +appIntentNameForApp1="appIntentForApp1" +appIntentForApp1Desc="AppIntentForApp1Desc" +appIntentNameForApp2="appIntentForApp2" +appIntentForApp2Desc="AppIntentForApp2Desc" +providerName1="aws" +providerName2="azure" clusterName1="edge1" clusterName2="edge2" clusterLabelName1="east-us1" @@ -225,25 +231,7 @@ print_msg "Registering GenericPlacementIntent for app1" payload="$(cat <<EOF { "metadata":{ - "name":"${genericPlacementIntentName1}", - "description":"${genericPlacementIntentDesc}", - "userData1":"${userData1}", - "userData2":"${userData2}" - }, - "spec":{ - "logical-cloud":"${logicalCloud}" - } -} -EOF -)" -call_api -d "${payload}" "${base_url}/projects/${project_name}/composite-apps/${composite_app_name}/${composite_app_version}/generic-placement-intents" - - -print_msg "Registering GenericPlacementIntent for app2" -payload="$(cat <<EOF -{ - "metadata":{ - "name":"${genericPlacementIntentName2}", + "name":"${genericPlacementIntentName}", "description":"${genericPlacementIntentDesc}", "userData1":"${userData1}", "userData2":"${userData2}" @@ -262,8 +250,8 @@ print_msg "Adding placement intent for app1(collectd)" payload="$(cat <<EOF { "metadata":{ - "name":"${genericPlacementIntentName1}", - "description":"${genericPlacementIntentDesc}", + "name":"${appIntentNameForApp1}", + "description":"${appIntentForApp1Desc}", "userData1":"${userData1}", "userData2":"${userData2}" }, @@ -271,18 +259,21 @@ payload="$(cat <<EOF "app-name":"${app1_name}", "intent":{ "allOf":[ - { + { "provider-name":"${providerName1}", "cluster-name":"${clusterName1}" }, { + "provider-name":"${providerName2}", "cluster-name":"${clusterName2}" }, { "anyOf":[ { + "provider-name":"${providerName1}", "cluster-label-name":"${clusterLabelName1}" }, { + "provider-name":"${providerName2}", "cluster-label-name":"${clusterLabelName2}" } ] @@ -293,14 +284,14 @@ payload="$(cat <<EOF } EOF )" -call_api -d "${payload}" "${base_url}/projects/${project_name}/composite-apps/${composite_app_name}/${composite_app_version}/generic-placement-intents/${genericPlacementIntentName1}/app-intents" +call_api -d "${payload}" "${base_url}/projects/${project_name}/composite-apps/${composite_app_name}/${composite_app_version}/generic-placement-intents/${genericPlacementIntentName}/app-intents" print_msg "Adding placement intent for app2(prometheus)" payload="$(cat <<EOF { "metadata":{ - "name":"${genericPlacementIntentName2}", - "description":"${genericPlacementIntentDesc}", + "name":"${appIntentNameForApp2}", + "description":"${appIntentForApp2Desc}", "userData1":"${userData1}", "userData2":"${userData2}" }, @@ -309,17 +300,21 @@ payload="$(cat <<EOF "intent":{ "allOf":[ { + "provider-name":"${providerName1}", "cluster-name":"${clusterName1}" }, { + "provider-name":"${providerName2}", "cluster-name":"${clusterName2}" }, { "anyOf":[ { + "provider-name":"${providerName1}", "cluster-label-name":"${clusterLabelName1}" }, { + "provider-name":"${providerName2}", "cluster-label-name":"${clusterLabelName2}" } ] @@ -330,7 +325,7 @@ payload="$(cat <<EOF } EOF )" -call_api -d "${payload}" "${base_url}/projects/${project_name}/composite-apps/${composite_app_name}/${composite_app_version}/generic-placement-intents/${genericPlacementIntentName2}/app-intents" +call_api -d "${payload}" "${base_url}/projects/${project_name}/composite-apps/${composite_app_name}/${composite_app_version}/generic-placement-intents/${genericPlacementIntentName}/app-intents" # END: Adding placement intent for each app in the composite app. # BEGIN: Registering DeploymentIntentGroup in the database @@ -370,7 +365,7 @@ call_api -d "${payload}" "${base_url}/projects/${project_name}/composite-apps/${ # END: Registering DeploymentIntentGroup in the database # BEGIN: Adding intents to an intent group -print_msg "Adding two intents to the intent group" +print_msg "Adding the genericPlacement intent to the deploymentIntent group" payload="$(cat <<EOF { "metadata":{ @@ -381,8 +376,7 @@ payload="$(cat <<EOF }, "spec":{ "intent":{ - "generic-placement-intent":"${genericPlacementIntentName1}", - "generic-placement-intent":"${genericPlacementIntentName2}" + "generic-placement-intent":"${genericPlacementIntentName}" } } } |