Previously, list packages with parameter 'search',
search content in any attributes, but packages are unordered
With this change, packages are ordered.
Such as: list package with 'search=mysql'
the packages whose name like 'mysql' are ahead of others
whose afn like 'mysql',and so on
Change-Id: Iecc3038ac40e731788975cff0cdf7d42e7f97112
Closes-Bug:#1467487
Rewrite docstrings in murano/common/wsgi.py to make it
more clear. Fix typo in other files.
TrivialFix
Change-Id: Iaa6bde5f3b0356b6ac9e67f39ebf0f7feff4ee45
Add `session.begin(nested=True` inside get tags to prevent duplicate
tags creation if murano executes in amount of threads.
Change-Id: I10968e2f2f758a5904943d273a9302a5cfb1a8c9
Closes-Bug: #1498097
This also adds a check to murano/hacking/checks.py that
should catch this error in the future.
Blueprint murano-python-3-support
Change-Id: Ib8b2b91a40577d18739f0c1bf2c37b7cf4060560
Search with name only matches package name and
search with keyword can matches names, tags ..etc
Change-Id: Ia86befcf0a126f4e532c847df44170a898b38824
Closes-Bug: #1500865
This patch enhances the GET /catalog/packages Murano API call with
option to filter packages by id.
Partially implements bp assign-category-button
Change-Id: I86bbdbde74a7fa086197adef7a91199704811f72
Previously, end user will receive a conflict message "Class with the same full
name is already registered in the visibility scope" when publish package
conflict with one public package with same fqn. The "class" concept might be
not familiar to end user who doesn't know murano package details.
And in most cases, user will modify the class name in package. So it would be
better to check the duplicate fqn at first, which it give back a more straight
message "Package with the same Name is already made public" in this case.
Change-Id: I721ce60cb213fc446f62755b3b59523aca5d5fcb
Closes-Bug: #1506703
CLI delete package give the error with """
murano package-delete pakage_id
403 Forbidden: Package is not owned by the tenant
"0c5581f43593479d9c44d9ca1ed1ca69" (HTTP 403)
Change-Id: I4634eaab9eb5a29e70e33214b3a3803e411ec134
Closes-Bug: #1506466
On some HA database deployments such as MySQL Galera the transaction
locks are optimistic, and if the same data gets modifyed concurrently
DB server may throw a DBDeadlock error which is intended to be handled
by the caller app.
This patch adds appropriate retrying logic into the catalog db api
methods, so the operation to upload, modify or delete the package gets
retryed if the deadlock occurs due to this optimistic locking behavior.
It uses oslo_db_api.wrap_db_retry helper decorator from oslo library.
Closes-Bug: #1502589
Change-Id: I8d7b3dfb02a31eba6d55ba0bf89ac0cf05f1313d
But only if modification of public packages are allowed in policy file.
Turn off managing public packagef for non-admin users by default.
Currently non-admin users are able to see only their own packages
despite of the policy setting.
Corresponding tests were updated.
Change-Id: I5510f6b8b82d7d28358e1b7dcbffe275079512ee
Closes-Bug: #1496418
1.Locate to these two pages:
Horizon->Murano->Application Catalog->Applications
Horizon->Murano->Manage->Package Definitions
2.Input the unicode characters in the Filter TextBox.
3.Click Filter Button.
4.Throw error informations.
Change-Id: Ib65457adbbce3f904a2570c35a638318bde33c9d
Closes-Bug: #1496267
Currently default sort is a 'name'.
But in case there are more packages in catalog
with same name more then 'limit' parameter, all of them will be ignored.
Adding additional sort key is fixing that problem.
Change-Id: Idd86275dc48cbdb2862987f6e3151e1d9fb4e00f
Closes-Bug: #1448782
Since package name is not unique anymore, abilty to get packages
from CLI by fqn was deleted
Change-Id: I3a205730adf8934460619b58d9d55c640c0bbf5e
Closes-Bug: #1447244
To follow latest community practices we need to use oslo_log in
murano instead of handcrafted libs.
Unsupported log level 'audit' was changed to 'info'.
Change-Id: I40c0f3790e34bf80d0b63554e86b3cbc019eefca
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: I975592f3694be42d52685ebf606f6d3012caf1a8
Introduce catalogue parameter to allow distinguishing between catalogue
of applications (packages that one can deploy) and managable-apps
(packages that one can edit).
Streamline include_disabled filtering.
Allow filtering out your own packages for admin requests.
Change-Id: I19a90b26abebe0833878c560169d6569a9d7421e
Partial-Bug: #1448226
Relates-Bug: #1448135
The database constraints which were present were enforcing the global
uniqueness of package FQNs and the names of classes defined in them.
This behavior was not correct, as the uniqueness should be enforced per
tenant, so the same package may be uploaded into two isolated tenants
without affecting each other.
This behavior lead to a very serious security issue: any tenant could
upload a package, leave it private and thus block all other tenants of
the cloud from uploading the package with the same name or even other
packages which contain at least one class in common with it. This could
be used to intentionally block all the operations of Murano on any
public environments.
This fix modifies the package name constraint to be unique only in
combination with owner_id, i.e. makes packages unique per tenant. Also
it removes the class name uniquness check from database (as there is no
cross-DB way to check it in a proper way) and adds a check method in
db.api module instead.
As the packages may be made public, this introduces a potential
collision: if the user owns some package, and there is a public package
with the same fully-qualified-name (or defining same class(es)) then the
class loader of the engine will have to choise between these packages
and/or classes defined in them.
To resolve this collision this commit adds a logic to fetch all the
patching packages and then pick the best match. Packages owned by the
current tenant are the most preferred, then the engine will pick public
packages, and non-owned non-public packages are the least preferred
(there may be no such packages now, they may appear when we add other
ways of package sharing).
Closes-bug: #1440094
Change-Id: I5c9b49642dfb6e955cf0c98b42f418da3b82060a
This prevents from the situation, when tenant is no longer exist
and there is no way to delete an application
Change-Id: I1539d0331634e8c665ff056f1bfde4de47880985
Closes-Bug: #1436618
Adds new API calls, responsible for add,
browse and delete categories.
Implements blueprint enable-category-management
Change-Id: I9da0680cfa244ef225be0706a54f492644c0dcba
* Set admin rule for a several API calls and remove direct check in code
* Now admin can configure policy.json and enable package management for regular users
* Update common policy module
Closes-Bug: #1412868
Change-Id: I8d0725b613564529d32a5acef289f4822f32915c
Remove gettextutils in favor of oslo.i18n suite for
internationalization purposes. Wrap murano.common.i18n around
oslo.i18n. Mark all logs messages of levels higher than
DEBUG for translation with _/_LI/_LW/_LE/_LC to conform with
oslo.i18n guidelines.
Change-Id: I09a2e2fc802e404f5c59fa4edd2a2124ad24101a
Implements: blueprint organize-translation
Current API package search will return applications sorted by date
created in ascending order. Users naturally will want to see these
ordered alphabetically by name. Change default 'order_by' to name
Change-Id: I880fafb85729fea296ebd0330fcd976279d51a9c
Closes-Bug: 1391607
Removed #noqa from gettextutils and added them to import_exceptions.
I think it is better to specify option in one place (tox.ini) than
every time take care that you do not forget to specify this tag.
Also removed a few unused imports that were revealed in the process.
Change-Id: Ic4ca9cf374870075a36b88269ff8aea5a8e24a90
* H202 assertRaises Exception too broad
* H402 one line docstring needs punctuation
* H404 multi line docstring should start without a leading new line
Change-Id: I2f662b8b97d14daa501620c8237bf93bd2251243
Problems we had:
1. If the collation of the DB and table is utf8 and the columns we want to
index are 512 chars, it is too big for the index since the max key length
is 767 bytes. Following error message observed:
(OperationalError) (1071, 'Specified key was too long; max key length is 767 bytes')
2. During migration to Alembic we missed the unique field for the
'fully_qualified_name' column of the table 'package'. This change
fixes that issue.
Fixes:
1. Reduce length of indexed columns to fix problem. 128 chars should be probably enough
2. Add uniqe paramater for column fully_qualified_name of table package
Additional changes:
* Test that column is unique in DB migration tests (on real databases)
* Introduced base for DB-related unit-tests. These tests use in-memory
instance of SQLite
* Test that column is unique in DB-related unit-tests
Closes-Bug: #1339201
Closes-Bug: #1339728
Change-Id: I4816790e11f225c5dbb130747535094fdf06733e
If package lookup by id fails, filter by fully_qualified_name
and choose the first (and what will be only) result. Also allows
delete and update to use FQN as well as ID.
This may need revisiting to allow non-unique FQNs.
Change-Id: I84fb8e155b5aa4bc036f8b598101b6b969962325
Implements: blueprint id-fqn-equivalence
That way it works like Glance (see http://tinyurl.com/jwqtj23) and
allows for complex query pagination (to cycle through pages filtered
by some criteria, muranoclient uses 'next_marker' pointer).
Implements: blueprint app-catalog-pagination
Change-Id: If71da70fa835a1ee7a271ebf7238c0a4c64d4123