From 7899a6d42ba6a92cf372fadcb079e2763917da30 Mon Sep 17 00:00:00 2001 From: Nikolay Mahotkin Date: Mon, 6 Jun 2016 11:35:53 +0300 Subject: [PATCH] Split deploy method on 2 methods * deploy method is now splitted on 2 methods: deployInstance and deployApplication. * Put the package CiCdUtils in the right place so the script prepare_packages.sh builds it before building Jenkins/Gerrit/LDAP/Zuul/Nodepool Change-Id: Ia5367cfa74bb07f42e56bc64a7e1bbac1f0702ae --- .../Classes/CombinableApplication.yaml | 22 +++++++++++++++++++ murano-apps/CiCdUtils/package/manifest.yaml | 2 +- tools/prepare_packages.sh | 2 +- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 murano-apps/CiCdUtils/package/Classes/CombinableApplication.yaml diff --git a/murano-apps/CiCdUtils/package/Classes/CombinableApplication.yaml b/murano-apps/CiCdUtils/package/Classes/CombinableApplication.yaml new file mode 100644 index 0000000..d1ebc3d --- /dev/null +++ b/murano-apps/CiCdUtils/package/Classes/CombinableApplication.yaml @@ -0,0 +1,22 @@ +Namespaces: + =: org.openstack.ci_cd_pipeline_murano_app.utils + res: io.murano.resources + std: io.murano + sys: io.murano.system + +Name: CombinableApplication + +Methods: + deploy: + Body: + - $instance: $.deployInstance() + - $.deployApplication($instance) + + # This method should be overriden in child classes. + deployInstance: + + # This method should be overriden in child classes. + deployApplication: + Arguments: + - instance: + Contract: $.class(res:Instance).notNull() diff --git a/murano-apps/CiCdUtils/package/manifest.yaml b/murano-apps/CiCdUtils/package/manifest.yaml index fbf8e98..d1b07eb 100644 --- a/murano-apps/CiCdUtils/package/manifest.yaml +++ b/murano-apps/CiCdUtils/package/manifest.yaml @@ -9,6 +9,6 @@ Author: 'Mirantis, Inc' Tags: [CI, Utils] Classes: org.openstack.ci_cd_pipeline_murano_app.utils.net.Hosts: net/Hosts.yaml + org.openstack.ci_cd_pipeline_murano_app.utils.CombinableApplication: CombinableApplication.yaml Require: org.openstack.ci_cd_pipeline_murano_app.puppet.Puppet: - diff --git a/tools/prepare_packages.sh b/tools/prepare_packages.sh index b8acc46..9eef35f 100755 --- a/tools/prepare_packages.sh +++ b/tools/prepare_packages.sh @@ -13,7 +13,7 @@ function check_dir () { fi } -default_packages="Puppet SystemConfig OpenLDAP Gerrit Jenkins Zuul Nodepool CiCdEnvironment CiCdUtils" +default_packages="Puppet SystemConfig CiCdUtils OpenLDAP Gerrit Jenkins Zuul Nodepool CiCdEnvironment" source_dir="murano-apps" destination_dir="." refresh_existing_packages=false