z3 is a new kind of theory where rules are treated by Microsoft Z3 engine.
The end-user must explicitly mark policies using this engine.
Change-Id: I519821ccb8a14d9a28bf890bb98c55c01c2a0e9c
Partially-implements: blueprint alternative-engine-z3
This commit enables 'include_rules' option for library policies
in client lib
Depends-On: Ib27119ba03d5658ff937f514f6ff3abfe5c390fe
Change-Id: I2271579f655481b156ec66382d887b8784b13ad6
This commit adds support in client library for create_policy to
accept params 'library_policy' as expected by server for activating
a library policy. Change needed by dashboard, for activating library
policy.
Change-Id: I0c4a70002bd172c0b5842cc7de1c9bb5ad0bcf5a
Closes-Bug:#1731194
Openstack client now defaults to unlimited max-width
instead of the previous fit-to-terminal width. As a
result, many commands have very wide and unreadable
output. This change fixes the issue by setting a
default max width of 80 (traditional terminal width).
User still has the option to set a different max-width
or specify --fit-width to fit to terminal width.
Change-Id: I5898639942bd4eb17b69c403277b46eb69951265
When max-width was not specified, the default to 40 is too small.
Instead use the traditional terminal default of 80.
Change-Id: If10e891757cf38012261648017384cb2c8f34d4a
In further testing, the default output without limit is unreadable on some consoles. The --fit-width option can be specified to fit to terminal width.
I think this is a new behavior that has to do with an openstackclient change that defaults fit-width to off. Reverting this change given the new situation.
This reverts commit 46e4bc630aa510c1689652f6a045067982021f51.
Change-Id: Ia43dd7e4dad8e8ca37d8822ffedaad750c73ba6c
We tend to use 'project' rather than 'tenant' when switching to openstackclient
command, such as:
openstack role add --user <user> --project <project> <role>
Change-Id: Iddfa57ccd0e419d452534cb2e0a927ebc792f2a0
Not yet integrated into or tested with OSC CLI.
Client methods put in place first to allow GUI dev to proceed.
Partial-Bug: 1693623
Partially implements: blueprint policy-library
Change-Id: Ib94dd4de6242faeb29756f43afaa05621b7df1ac
Delete the "max_width" in ShowDatasourceActions because we should
let the terminal to make the max_width of the output fit the screen.
Change-Id: Id51462cff8f14c912a6d0a24e2b85d67a8c7567c
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848
Change-Id: Ibfbd501b07ddf1ecfe737f520bbfd033a26ba73c
Because pre-Ocata congress-server did not support
datasource delete by name(+), client code that attempts
to delete by name(++) fails with pre-Ocata server
This patch fixes the regression by falling back to
delete by UUID when delete by name fails.
For backward compatibility with pre-Ocata congress-server
that does not have this patch:
(+) added in this patch:
https://review.openstack.org/#/c/412303/
(++) introduced in this patch:
https://review.openstack.org/#/c/407329/
Change-Id: Ib8a86304bcff70b9e777d6923d0eaf88cbce7d60
This commit adds method to retrieve single datasource.
Call will be used in horizon.
Related-Bug:#1651037
Depends-On: I1005d571b49e1378aab27b4eb045f49051827e04
Change-Id: I04de77bfc5b5df4a0749ebf62e92571326428b3c
This commit removes unnecessary db calls to list_datasources
as the api calls work for both datasource name or id
Change-Id: I4028f88cbdabe2752b2b78250dbc2a011532604e
Closes-Bug:#1647535
As part of the first community-wide goal [1], teams were asked
to remove the openstack/common package of their projects
if one existed. This was a byproduct of the old oslo-incubator
form of syncing common functionality.
- Most of the apiclient package was not actually used in code,
only the exceptions were. So remove most of it.
- Copy the exceptions from apiclient to an existing top level
location.
- Create an i18n module to remove the gettextutils dependency,
this creates a new requirement - oslo.i18n.
- Remove a test (test_base) since it was testing the
functionality of apiclient.base, which was not used in
congressclient.
- General cleanup to other openstack/common references
[1] http://governance.openstack.org/goals/ocata/remove-incubated-oslo-code.html
Change-Id: I2f7f5d2d43e6a5c2e4dfe35266951efb4293093d
The message is sometimes reached not on delete:
"Multiple resources have this name %s. Delete by id." % name
Minor edit to make it clearer.
Change-Id: I7ef8219646c0f3d322a1cd3ab42cbc8f1b5a585b
No need to depend on python-keystoneclient any more.
And also, the example in add_client() is out-of-date.
So remove it.
Change-Id: Ie092414220ff9e8a97cf5883081cc0cab7986d74
In Python 3 __ne__ by default delegates to __eq__ and inverts the
result, but in Python 2 they urge you to define __ne__ when you
define __eq__ for it to work properly [1].There are no implied
relationships among the comparison operators. The truth of x==y
does not imply that x!=y is false. Accordingly, when defining
__eq__(), one should also define __ne__() so that the operators
will behave as expected.
[1]https://docs.python.org/2/reference/datamodel.html#object.__ne__
Change-Id: I50234892bd3dadcda533d97c03414067e06ef0f4
Closes-Bug: #1586268
keystoneclient.adapter.Adapter is deprecated as of 2.1.0
release. So replace the same with keystoneauth1
Change-Id: If1d005ecd656a52f33acdebc2af24b081934b0a1
CongressClient expects all datasource driver has dict object in
config field. It raises an error when a datasource doesn't have
any config.
This patch allows config fields to be None object.
Change-Id: I73354f1073f3f814854652eaeaa4b3bbe4bfcf7d
This commit displays driver field while listing datasources and
hides the type field as it is None always
Change-Id: I9b8550f3fb97fecee14f74a6447d908550cfdfc4
This commit is to update the help messages to support datasource
related data can be queried using both datasource name or ID
Change-Id: I93eb5063f02cf114715ba876b081f32818872187
Closes-Bug:#1552212
This commit reuses the code from oslo libraries for better
maintainability of code.
Change-Id: I75594b47f62f284b0027d6035cd2338838000a36
Closes-Bug:#1497180
depending on any oslo-incubator code from another project is
dangerous. keystoneclient makes its exceptions public and it's
not recommended to use any code from
keystoneclient.openstack.common.apiclient since it's maintained
by oslo-incubator.
Change-Id: Ief63705f8ff1325bdd91491b47221d00cd767181
Replace assertEqual(None, *) with assertIsNone in tests to have
more clear messages in case of failure.
Change-Id: I429c8ab3eb4e79a7556ea6f966dd7aa32ee9b86d
Closes-bug: #1280522
When we create policy with long abbreviation that more than
5 chars, like: "test_abbr", API exception is raised from
Congress server side. Add some help infomation to remind users
inputing "abbreviation" arguments with right format.
Change-Id: I48cab945286aacc12c1474c5074f6febb941e723
Related-Bug: #1497881