'GetPackageUI' API can now be called even if Glare is used
Since Glare support was introduced the 'catalog/packages' part of
Murano API (/v1/catalog/packages) became obsolete and was intended to
be used for "legacy" (i.e. non-glare-based) package storage. The
murano client was supposed to directly call glare to retrieve the
packages.
However, the "GetPackageUI" call (GET
/v1/catalog/packages/%pkg_id%/ui) is different: not all the packages
bundle the UI definitions, some require Murano to generate them based
on the contents of the package. This is true for HOT-based packages
and others, plugin-based ones. In future this will be true for 100% of
the packages when the dynamic ui and object model generation is added.
Because of this that API should be callable even if Glare is
configured as a package storage backend. It should fetch the artifact
from glare, unpack it and use whatever plugin-specific logic required
to generate the UI definitions for this particular package.
This patch introduces appropriate change while maintaining the
backwards compatibility: in the legacy mode (i.e. when murano's DB
acts as package storage) the UI is read directly from an appropriate
DB table without fetching the whole package.
This fixes the issue when the HOT-based packages could not be
deplpoyed properly with murano-dashboard, but the murano-client has to
be updated as well to properly call the modified API even if Glare is
enabled.
Reviewed: https:/ /review. openstack. org/304144 /git.openstack. org/cgit/ openstack/ murano/ commit/ ?id=c81fc4b79a5 054949b253a375b 660c7de33f852f
Committed: https:/
Submitter: Jenkins
Branch: stable/mitaka
commit c81fc4b79a50549 49b253a375b660c 7de33f852f
Author: Alexander Tivelkov <email address hidden>
Date: Tue Apr 5 19:04:27 2016 +0300
'GetPackageUI' API can now be called even if Glare is used
Since Glare support was introduced the 'catalog/packages' part of packages) became obsolete and was intended to
Murano API (/v1/catalog/
be used for "legacy" (i.e. non-glare-based) package storage. The
murano client was supposed to directly call glare to retrieve the
packages.
However, the "GetPackageUI" call (GET catalog/ packages/ %pkg_id% /ui) is different: not all the packages
/v1/
bundle the UI definitions, some require Murano to generate them based
on the contents of the package. This is true for HOT-based packages
and others, plugin-based ones. In future this will be true for 100% of
the packages when the dynamic ui and object model generation is added.
Because of this that API should be callable even if Glare is
configured as a package storage backend. It should fetch the artifact
from glare, unpack it and use whatever plugin-specific logic required
to generate the UI definitions for this particular package.
This patch introduces appropriate change while maintaining the
backwards compatibility: in the legacy mode (i.e. when murano's DB
acts as package storage) the UI is read directly from an appropriate
DB table without fetching the whole package.
This fixes the issue when the HOT-based packages could not be
deplpoyed properly with murano-dashboard, but the murano-client has to
be updated as well to properly call the modified API even if Glare is
enabled.
Change-Id: Id9327e4015e1c0 a1553c0b1a0151a 94ee4da2928
Partial-bug: #1565805