fix type file references 15/17515/1
authorTony Hansen <tony@att.com>
Fri, 6 Oct 2017 21:01:05 +0000 (21:01 +0000)
committerTony Hansen <tony@att.com>
Fri, 6 Oct 2017 21:01:13 +0000 (21:01 +0000)
try to fix blueprints to where the files actually are in nexus

note: relationships types file is still missing

Change-Id: If7ee9a2b35828a4ce9f630141bc07290a1852280
Signed-off-by: Tony Hansen <tony@att.com>
Issue-ID: DCAEGEN2-128

12 files changed:
blueprints/DeploymentHandler.yaml-template
blueprints/DockerBP.yaml
blueprints/cdap_broker.yaml
blueprints/config_binding_service.yaml
blueprints/inventory.yaml
blueprints/pgaas-cluster.yaml-template
blueprints/pgaas-database.yaml-template
blueprints/pgaas-disk.yaml-template
blueprints/pgaas-getdbinfo.yaml-template
blueprints/pgaas.yaml-template
blueprints/policy_handler.yaml-template
mvn-phase-script.sh

index ba17495..f68ecce 100644 (file)
@@ -29,7 +29,7 @@ description: >
 
 imports:
   - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
-  - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/docker/2.1.0/node-type.yaml"
+  - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/docker-node-type.yaml
   - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/relationship/1.0.0/node-type.yaml"
 
 inputs:
index c07fd05..46c991b 100644 (file)
@@ -27,7 +27,7 @@ imports:
   - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dnsdesig/dns_types.yaml
   - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/sshkeyshare/sshkey_types.yaml
   - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/relationship/1.0.0/node-type.yaml
-  - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/docker/2.3.0/node-type.yaml
+  - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/docker-node-type.yaml
  
 inputs:
   registered_dockerhost_name:
index 2d51b9c..fd96133 100644 (file)
@@ -25,8 +25,8 @@ description: >
 
 imports:
   - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
-  - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/cdap/14.2.4/cdap_types.yaml
-  - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/docker/2.3.0/node-type.yaml
+  - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/cdap_types.yaml
+  - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/docker-node-type.yaml
   - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/relationship/1.0.0/node-type.yaml
 
 inputs:
index 68cb553..d20d9c3 100644 (file)
@@ -25,7 +25,7 @@ description: >
 
 imports:
   - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
-  - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/docker/2.3.0/node-type.yaml
+  - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/docker-node-type.yaml
   - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/relationship/1.0.0/node-type.yaml
 
 inputs:
index 798f721..76ea5f1 100644 (file)
@@ -29,7 +29,7 @@ description: >
 imports:
   - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
   - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/relationship/1.0.0/node-type.yaml
-  - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/docker/2.3.0/node-type.yaml
+  - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/docker-node-type.yaml
 
 inputs:
 
index e7b227d..6e63941 100644 (file)
@@ -37,9 +37,9 @@ imports:
   - http://www.getcloudify.org/spec/openstack-plugin/1.4/plugin.yaml
   - http://www.getcloudify.org/spec/fabric-plugin/1.4.1/plugin.yaml
 
-  - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dnsdesig/dns_types.yaml"
+  - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dnsdesig/dns_types.yaml"
   - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/relationship/1.0.0/node-type.yaml"
-  - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/pgaas_plugin/1.0.0/pgaas_types.yaml"
+  - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/pgaas_types.yaml"
 
 inputs:
   # environment info
index 6d1088e..6ee5297 100644 (file)
@@ -35,7 +35,7 @@ description: |-
 imports:
   - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
 
-  - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/pgaas_plugin/1.0.0/pgaas_types.yaml"
+  - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/pgaas_types.yaml"
 
 inputs:
   # environment info
index 3629ef4..65244bf 100644 (file)
@@ -38,10 +38,10 @@ imports:
   - http://www.getcloudify.org/spec/openstack-plugin/1.4/plugin.yaml
   - http://www.getcloudify.org/spec/fabric-plugin/1.4.1/plugin.yaml
 
-  - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dnsdesig/dns_types.yaml"
+  - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dnsdesig/dns_types.yaml"
   - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/sshkeyshare/sshkey_types.yaml"
   - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/relationship/1.0.0/node-type.yaml"
-  - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/pgaas_plugin/1.0.0/pgaas_types.yaml"
+  - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/pgaas_types.yaml"
 
 inputs:
   # environment info
index 95fd654..e37c604 100644 (file)
@@ -35,7 +35,7 @@ description: |-
 imports: 
   - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
 
-  - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/pgaas_plugin/1.0.0/pgaas_types.yaml"
+  - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/pgaas_types.yaml"
 
 inputs: 
   location_domain: 
index a9aa85b..8589bc0 100644 (file)
@@ -29,10 +29,10 @@ imports:
   - http://www.getcloudify.org/spec/openstack-plugin/1.4/plugin.yaml
   - http://www.getcloudify.org/spec/fabric-plugin/1.4.1/plugin.yaml
 
-  - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dnsdesig/dns_types.yaml"
+  - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dnsdesig/dns_types.yaml"
   - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/sshkeyshare/sshkey_types.yaml"
   - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/relationship/1.0.0/node-type.yaml"
-  - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/pgaas_plugin/1.0.0/pgaas_types.yaml"
+  - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/pgaas_types.yaml"
 
 inputs:
   # environment info
index 9296514..ccb8261 100644 (file)
@@ -27,7 +27,7 @@ description: >
 
 imports:
   - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
-  - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/docker/2.4.0/node-type.yaml"
+  - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/docker-node-type.yaml
   - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/relationship/1.0.0/node-type.yaml"
 
 inputs:
index 8c5c9a9..1aa2f9d 100755 (executable)
@@ -121,7 +121,7 @@ expand_templates()
     return 0
   fi
 
-  echo "====> Resolving the following temaplate from environment variables "
+  echo "====> Expanding the following template from environment variables "
   echo "[$TEMPLATES]"
   SELFFILE=$(echo "$0" | rev | cut -f1 -d '/' | rev)
   for TEMPLATE in $TEMPLATES; do
@@ -149,14 +149,34 @@ expand_templates()
     done
 
     #if [ ! -z "$FILES" ]; then
-    #   echo "====> Resolving template $VALUE to value $VALUE"
+    #   echo "====> Expanding template $VALUE to value $VALUE"
     #   #CMD="grep -rl \"$VALUE\" | tr '\n' '\0' | xargs -0 sed -i \"s/{{[[:space:]]*$VALUE[[:space:]]*}}/$VALUE/g\""
     #   grep -rl "$KEY" | tr '\n' '\0' | xargs -0 sed -i 's/$KEY/$VALUE2/g'
     #   #echo $CMD
     #   #eval $CMD
     #fi
   done
-  echo "====> Done template reolving"
+  echo "====> Done template expanding"
+}
+
+test_templates()
+{
+    # make certain that the type references exist
+    TMP=$(mktemp)
+    trap 'rm -f $TMP' 0 1 2 3 15
+    find . -name '*-template' | sed -e 's/-template$//' |
+    while read file
+    do
+        egrep '^  - .?https?://' < $file
+    done  | awk '{print $2}' | sed -e 's/"//g' | sort -u |
+    while read url
+    do
+       curl -L -w '%{http_code}' -s -o /dev/null "$url" > $TMP
+       case $(< $TMP) in
+           2* ) ;;
+           * ) echo ">>>>>>>>>>>>>>>> $url not found <<<<<<<<<<<<<<<<" ;;
+       esac
+    done
 }
 
 
@@ -357,6 +377,7 @@ compile)
   ;;
 test)
   echo "==> test phase script"
+  test_templates
   ;;
 package)
   echo "==> package phase script"