This commit moves the horizon code from contrib/horizon to
congress_dashboard to install as plugin. Added README for the same.
http://docs.openstack.org/developer/horizon/tutorials/plugin.html
Note: Passes basic testing with v2 authentication
This commit doesn't address issue with V3 authentication.It is being
fixed as part of Bug: #1602837
Implements: blueprint congress-horizon-plugin
Change-Id: I06da4a47f61739635e6f1756f773b236ebde55c9
novaclient.client.Client is a documented way to initialize novaclient.
Also, it provides a backward compatible layer.
Change-Id: I9dd15abbeda26c5a6a40139ce47a200720decce8
Closes-Bug: #1493576
This commits allows user to specify the kind of policy while
creating policy through horizon
Change-Id: I1f78670afb3aa27ed58e59aba1ccd23d89125e95
Closes-Bug:#1525836
This patch cleans up the devstack directory in contrib, which is no
longer required if devstack plugin model is used.
Change-Id: I3507817eda7222eaeb09ee88f0d55e497d1bcf4e
Implements: blueprint add-devstack-plugin
Depends-On:If6e6fc73673624d6edcb022bd5983c1b30356970
To pass the tests in gate, this commit has 2 separate changes
1) OS_TENANT_NAME is no longer used in the latest devstack, it causes all
datasource driver fail, as well as jenkins gate failure.
This fix changes devstack to use OS_PROJECT_NAME
2) Previously, we tested oslo.policy by mocking out one of the internals
of oslo.policy, just like Neutron. Besides being improper, the newest
release of oslo.policy broke that test, which is what is blocking
the tip of master currently.
This fix shamelessly copies the fix out of Neutron, mocking out
at the layer of HTTPCheck.
Change-Id: I2a4eae714946ce98a060a43dd501b9b3619aa68e
Closes-Bug: #1505057
Closes-bug: #1505750
Tempest plugin framework provides more flexibility for projects.
With this plugin, it's not requiring the tests live in the tempest
tree.
Change-Id: I8681140d02926b4b3e6af84b8f03b9385e62cc72
congress.conf.sample is out of date, some important options don't
present, like: api_workers, and some option name are wrong, like:
datasource_drivers
We should use oslo-config-generator to generate all the options
automatically.
Change-Id: Id898840667116278c55e4a7568cf80497db4833f
Closes-Bug: #1488405
During migration to YAQL 1.0 Murano was broken and as a consequence,
was broken any installation of devstack with Murano.
Now, migration successfully finished and a new python-muranoclient
released.
Murano dsvm jobs is green now.
This patch enables back Murano drivers in Congress.
Change-Id: I1417e6f71bb61e7c64195591ca3333950bd64a15
Tempest tests are still failing non-deterministically. This patch
disables all those tests that are dependent on external services.
Change-Id: Id3a2ed263cfb2b97365775e619009a77fdbf2167
Partially reverts 377b8c7284
This commit made some seemingly innocuous changes to the
devstack script, but now devstack is failing to start in the gate.
So we revert the devstack changes and work from there. (But
we keep the tempest changes.)
Change-Id: Idc3f4978bc04054e6b308ddc040e89eace5639df
Per tempest commandment: [T102] Cannot import OpenStack
python clients in tempest/api & tempest/scenario, we cannot
use any openstack client in tempest code. As restclient queries
catalog to get policy endpoint, we have to create replica policy
service and endpoints so we can start replica congress server and
talk with it via restclient.
Change-Id: Icaac65d5f51ef3214c02fe283b1b643f44d554c2
Depends-On: If59fee2891b5902d92c72e62f3ea979a26201b2c
"basestring" type is not supported in python3
changing it to six.string_types to make congress py3 compatible
Change-Id: I4bdf32ad19ac50a46a3a7f973e8799dc893126bc
Partially-Implements: blueprint support-python3
Our tempest tests couldn't run in the gate because they were
importing python-congressclient, and tempest didn't have
python-congressclient as a dependency.
This change copies the python-congressclient logic
into contrib/tempest/tempest/services/policy/policy_client.py
and tweaks it to work with the standard Keystone HTTP
client.
This approach means manually maintaining separate
copies of the python-congressclient logic. An alternative
is to refactor the python-congressclient so that during
the devstack install, the appropriate code can by copied
into the tempest directory. This would of course violate
a tempest commandment: [T102] Cannot import OpenStack
python clients in tempest/api & tempest/scenario.
Also cleaned up some devstack contribution oddities.
Change-Id: I0300706c94984bfb5872596c6c65c777b6b362e0
- The cls.admin_credentials() is gone. We can use
cls.admin_manager.auth_provider.credentials.
- Glance client now uses list_images() not image_list().
- Fake datasource must provide fake config values
- Using Popen.terminate() will block at Popen.wait(), no idea why yet.
Changed to Popen.kill()
- Force a refresh and sleep 1s to cleanup old neutron data in tables
Also update README.rst to explain listing available test cases and
how to debug a test case.
Change-Id: I328090bbc3ea2a6be26178cc2d585fe54266eaf7
In the tempest test, nova.servers.set_meta() is called once the
reactive enforcement is triggered. And since 'p(x)' from
'execute[p(x)] :- q(x)' doesn't take optional/named arguments,
nova-driver must implement a wrapper for servers.set_metta() to
convert positional args to optional args.
Change-Id: Ic92fbc02db5f1564bc7ba348ef2c718cb01d5399
The changes add additional API to execute an action on a specified
service, e.g. POST v1/data-sources/nova?action=execute
{'name': 'disconnect',
'args': {'positional: ['vm123'],
'named': {'key1': 'value1'}}
Implements: blueprint action-execution-interface
Change-Id: Ie220f4ea7739548e5f6d6855bc03c81ca4f818f4
The Horizon Column class caches objects by id. The ids of the data source
tables are not unique across data sources. When two data sources have a table
with the same id, this causes the cached value of the first object to be
used for the second object. The same value is then always shown in that column
for those two rows in the Data Sources page's DataTable. Fix that by setting a
unique id for each data source table object and storing the actual table id
under another key. Similarly for policy tables on that page.
Change-Id: I6f8a7f05ed9f22013cf9690e89ddac1c1624d920
Closes-Bug: #1413726
When installing python-muranoclient during devstack setup,
the dependent package stevedore is upgraded to 1.4.0 and it
conflicts with versions specified in global-requirements
causing heat failure. This change removes the "-U" from
"pip install" to skip installing a package if it exists
(as in the case of stevedore=1.3.0).
Closes-Bug: #1450010
Change-Id: Ia0fe33d66f7012391d54e28a804eb7540de323d4
The previous version would fetch neutron data once before repeatedly
checking the Congress table for equivalent data. This causes a race
condition because the data can change over time. For example, port
status starts off as BUILD and later changes to ACTIVE. If the test
first samples neutron and finds that the status is BUILD, the test
will wait until the status becomes BUILD; however, the status may have
already changed to ACTIVE and never change back to BUILD. This causes
test failures.
Change-Id: Ia46c3cee3c1d62d33578c46693480219db068563
README and prepare_devstack.sh were using stackforge/congress. However,
with Congress now being part of Openstack this needs to be updated
Change-Id: I26aa9c5b15a695ffe12cfbea89593cc2342bf4fd
Add form to Policy Details page that lets user create a new rule in the policy.
Update Horizon setup in devstack installation script to install JavaScript and
CSS files used in Policies panel.
* congress.py: Rename SERVICE_TABLE_SEPARATOR to more general TABLE_SEPARATOR.
New API functions to create rule and more ways to get data source's schema.
datasources/
* utils.py: Data source related helper functions.
* views.py: Rename constant.
policies/
* urls.py: New url for rule creation form.
* views.py: Generate lists of all data source tables and columns and add them
to the template context.
policies/rules/
* tables.py: New button to show rule creation form.
* views.py: New view for rule creation form.
* workflows.py: Steps in rule creation form. Translate user inputs into
Datalog and send off to the Congress server.
policies/templates/policies/
* detail.html: Change to extend new base file, which includes new static files.
Store lists of data source tables and columns here for use by child
templates.
policies/templates/policies/rules/
* _create_conditions.html: Rule creation step where user defines head column
mapping, join, and negation conditions.
* _create_output.html: Rule creation step where user defines rule metadata plus
policy table name and columns.
* _mapping_row.html: Template for a row of inputs that defines a head column
mapping.
* create.html: Rule creation modal window.
static/admin/css/
* policies.css: Custom CSS used in Policies panel.
static/admin/js/
* policies.js: Custom JavaScript used in Policies panel.
templates/admin/
* _scripts.html: Custom JavaScript files used in Admin dashboard.
* base.html: Custom CSS and JavaScript files used in Admin dashboard.
Includes partial implementation of table aliases for self-joins. Does not
include: usage of builtin tables, data preview before submitting rule, policy
table name and column autocompletion in Output step, redisplay of rule creation
form upon failure to create rule, robust input validation.
Partially Implements: blueprint horizon-create-policies
Change-Id: I6ef7e15c34d639f5eb09303077893dbf289347f9
Missing comma from devstack script is making congress erroneously import a
module named IronicDrivercongress.tests.fake_datasource.
Change-Id: I89c211705326026aaa6931fae072cd9c123b58f0
Use tabs instead of whitespace to indent lines of the here-document. Tabs
indent the text properly in the shell script and are omitted from the output.
Otherwise, running the shell script produces this error:
./prepare_devstack.sh: line 30: warning: here-document at line 21 delimited by
end-of-file (wanted `EOF')
./prepare_devstack.sh: line 31: syntax error: unexpected end of file
Change-Id: I893cd43dfbebd751b0ad5fb3ffff188c40fc862e
* congress.py: New API function to delete a rule from a policy.
policies/rules/
* tables.py: Add new button to delete a rule from a policy.
Partially Implements: blueprint horizon-create-policies
Change-Id: I1b84c3e0f2562cc2a64c431f6ccf98745a8667bb