The repo is Python 3 now, so update hacking to version 2.0 which
supports Python 3.
Fix problems found.
Update local hacking checks for new flake8.
Change-Id: I5cb9b15a3391bf32bb6e43958f8f6ffbcd6bcf07
1.As mentioned in [1], we should avoid using six.iteritems to achieve
iterators. We can use dict.items instead, as it will return iterators
in PY3 as well. And dict.items/keys will more readable.
2.In py2, the performance about list should be negligible, see the
link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: Ib3740617715c7097efeb5852338a669dc0bf8ff7
OpenStack common has a wrapper for generating uuids. We should
use that function when generating uuids for consistency.
Change-Id: Ie6c8ac0d70e200f60415e720bc0f94980ec11147
Patch added validation to both CLI and UI. Validation triggers
only manifest checks in order to be executed quickly. To run full set
of checks CLI tool murano-ppkg-check should used.
Depends-On: Iae6b56b2f7d32c75515ee92f0e33f9e3af9924e9
Change-Id: I94e395c09483dc2b5061df75c952bc87f60327aa
In Python3 the pretty table output is a binary type (encoded)
so print function output looks like
b'+-----+-----+\n| foo | bar |\n+-----+-----++\n
instead of
+-----+-----+
| foo | bar |
+-----+-----+
This commit adds a PY3 check and decodes the output before printing.
This brings Murano client in line with other clients which have this
fix already (e.g. Nova, Heat, Cinder, etc)
Change-Id: I102c28828a3ec96266600dd82dcddd8bcf42318d
MuranoClient needs to analyse package classes (names and inheritance
chains) to properly add packages to Glare. This requires it to
properly resolve class names in the appropriate namespaces.
Since Mitaka Murano supports multi-class yamls, i.e. yaml files
containing multiple MuranoPL classes in a single yaml file using it
multi-document format. Optionally this allows to reuse a single
namespace definition for multiple classes defined in the same file.
Client was not aware of this feature, always loading classes as
single-document yamls. It was also always using the current-class
namespace definitions, thus likely to fail if the shared namespace
definition is in use.
This has been addressed.
Closes-bug: #1608440
Change-Id: Ibd08454f71e0266c76a2ac517b441df97311d8b9
This commit changes the loader, that loads MuranoPL classes during
package upload to DummyYaqlYamlLoader. This would allow importing and parsing
packages that contain '!yaql' tag without any errors, when importing to
glare.
Change-Id: I9071bb479019cac20bf61f110154082063c9d777
Closes-Bug: #1586028
Before this patch yaml.Loader was used by the client to create custom
yaql-enabled yaml loader. It is unsfae do to so, because yaml.Loader is
capable of creating custom python objects from specifically constructed
yaml files.
UI parsing functions also fell back to yaml.Loader if
the custom loader was not supplied.
After this patch all yaml load operations are performed with safe
loaders instead.
Change-Id: Id9bb6eabda35522271ec394f8758a974878cbb4b
Closes-Bug: #1586078
Package and its dependencies are being imported in random
order which allows to import package and then get an error while
importing its dependency.
This patch uses OrderedDict ordered by topological sort instead
of regular dict to fix that.
Cyclic requirements are imported in random order.
Tests to check order of import are also added.
Change-Id: Ia6cb087679b3ae4613ac3d1d19279a9826e537ef
Closes-bug: #1585420
Co-Authored-By: ksnihyr <ksnihyr@mirantis.com>
Use bundle-import import a not regular-bundle json file, no error output.
Here should give the error: 'Can't parse bundle contents'
Change-Id: Ice069f0e9a4caa51c1bfc8a1fffb89647250aba9
Closes-Bug: #1550196
Used six.iteritems, where relevant.
Used SimpleHTTPServer, ConfigParser from six.moves
Replaced iter.next() with next(iter)
Replaced dict.keys()[0] with list(dict.keys())[0]
This patch was generated by the following tool using
'all' option.
https://github.com/haypo/sixer
Command:
python sixer.py -w all muranoclient/
Blueprint client-py34-support
Change-Id: I1cc978f13ac6ea2f0d33b1027362102c6c77ca6e
Use six versions of StringIO, urllib and raw_input
Use BytesIO instead of StringIO, where relevant
Added ability to distinguish binary and non-binary modes in utils.File
Use six.b for lyterals where relevant
Use six.iteritems, where relevant
Targets blueprint: client-py34-support
Depends-On: Id0e92840eb896ed487aafdcc39074aedefb55dda
Change-Id: I78a914cd77da7263d2bd0f871b8a478b5adadaee
When using "package-import --is-public" to import a Murano package,
make sure glance images automatically imported are also public.
Change-Id: I9460360e84cc40d7414aa5cd9f7367f5a80b8466
Partial-Bug: #1507139
This is the same fix as in https://review.openstack.org/#/c/199109/
This code was copied to python-muranoclient from murano but was
fixed then only in one place. Despite the bug exist for many releases
it didn't affected murano until recent changes to HOT translator
(or at least it was never reported)
See https://review.openstack.org/#/c/199109/ commit message
for more details
Change-Id: I910f4117050430433fd9fdd291f0ba9659f75825
Closes-Bug: #1501570
This patch adds a support of 'Murano Package' Glance artifact type to
the murano client. The ArtifactRepo class wraps the standard Glance's
V3 client and provides access to Glance Artifacts as to Murano
Packages.
Another class, called PackageManagerAdapter provides a temporary
facade which makes artifact-based packages compatible with the legacy
packages.
Depends-on: I11efa3758cea5eb459a101d62c93355f34bb42f9
Change-Id: I35d71bb7c03b23b01722e060c3ef770a24168ada
Implements-Blueprint: artifact-repository-support
This commit adds helper function, that traverses resulting object-model
before sending it to API and replaces any occurances of ===id1===,
===id2===, etc. with generated uuids.
Helper function keeps track of already generated ids.
Targets blueprint: env-configuration-from-cli
Change-Id: Iea20a2601a5dc4b8f92c3e935074ac2d7828d005
Adds 2 params to environment_show:
* --only-apps: only show apps of the environment, without any
frame or additional formatting
* --session-id: allows listing of environment services of a specific
configuration session
Targets blueprint: env-configuration-from-cli
Change-Id: I55d33a9b8cd0e19d26ed76f4a5524a70795a2251
There are situations when user doesn't have access to the Internet
from his cloud with murano. Patch adds new command to client allowing
user to download bundle of packages with dependencies
Partially-Implements: bp bundle-save
Change-Id: I1cc2b745b60681de9494aa2d14e54fcb807f29eb
There were situations, when image was upload twice automatically,
because it was updated and it's hash changed.
But since these images have the same name and some of our applications
currently rely on image name, when constructing heat template it caused
problems in heat, as it could not resolve this situation,
while deploying template, generated by Murano.
Change-Id: Ib8f86f4934b2420d3c1c7e952dcbb47bcc9ab81c
Closes-Bug: #1443936
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names.
The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.
Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.
Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages
Change-Id: I5d325e9397404211df00d9e39195b63d9a2f2e76
Bundles now have a .bundle extension when importing by name
Error/success reporting for bundles, packages and images improved
greatly
Change-Id: I4dee6a3c4ce9e873ad97a2edd682102fa0d0478b
If the bundle is being installed from a local file
first attempt to search for files in the folder, relatvie
to the directory of the bundle, next check the URL attribute and
finally check repository. Same for requirements and images.
Change-Id: I8a40ad274e60d97111602bdd0d7b08eb39126a6d
If a package contains a file with a list of required images
check if they are present in glance and attempt to download them
if not. Supports v1 glanceclient only.
Change-Id: Ibb39fbbadef109b117094afefd383fe24de0a792
Partially implements: blueprint muranoclient-marketplace-support
Support for parsing of Require section of manifest.yaml
Recursively downloads required packages, keeping track of
all dependencies. It is later possible to reuse downloaded packages
for package creation.
Change-Id: I0ae9dc1226439855e4196970df39071c96f30db4
Partially implements: blueprint muranoclient-marketplace-support
Add bundle-import command to allow importing
bundles of packages from local files,
urls or base murano repository.
Change-Id: Ia51fdb242f5730af69dc6825fd48bc7e2e695968
Partially implements: blueprint muranoclient-marketplace-support
Extend PackageManager.create to allow
importing from external repository by name.
Repository base URL can be set with cli option or env var.
Change-Id: I3107d9319183c11b324753bb96a8082ad7c4e9fb
Partially implements: blueprint muranoclient-marketplace-support
This command composes application package from heat
templates and for muranoPL classes. Manifest file
is generated automatically. For a list values, such as
tags and categories comma is used.
Partly-implements: blueprint murano-cli-client
Change-Id: I6005bf24761e5537681156fe4fa17bcc11bc7501
Do not output the INFO messages into the Console
Proper output of exceptions
"Wrong-Version" message displays proper service name
(we are grateful to Glance for providing a copy-paste source :)
but let's still call our service Application catalog, not Openstack Images )
Targets-blueprint: murano-cli-client
Change-Id: I484fa4d494584472f705fdffc35e2dc70f1f3e8a