[openstack-dev] [Congress] Push Type Driver implementation

Tim Hinrichs tim at styra.com
Fri Mar 18 00:56:26 UTC 2016


I tried the doctor driver out.  I just added the file to
congress/datasources, and set up /etc/congress/congress.conf to include
congress.datasources.doctor_driver.DoctorDriver.

I could create a new doctor driver, but afterwards I couldn't list all the
datasources, and I couldn't push any data to it.  See transcript below.

$ openstack congress datasource create doctor doctor
+-------------+--------------------------------------+
| Field       | Value                                |
+-------------+--------------------------------------+
| config      | None                                 |
| description | None                                 |
| driver      | doctor                               |
| enabled     | True                                 |
| id          | 906c6327-15f1-4f3c-aa51-1590540c06b9 |
| name        | doctor                               |
| type        | None                                 |
+-------------+--------------------------------------+

$ openstack congress datasource list
'NoneType' object has no attribute 'items'

The other problem I saw was that the schema was fixed for the doctor
driver.  So I tried to create a push driver that would accept any
collection of tuples.  This wouldn't allow the user to push arbitrary JSON,
but they could push any tuples they'd like.  While experimenting, I fixed
the problem mentioned above by adding a single (unnecessary) configuration
option.  Then I ran into a Datasource not found problem.  I pushed the code
to review so we can all take a look.

https://review.openstack.org/294348

$ curl -g -i -X PUT
http://localhost:1789/v1/data-sources/push/tables/data/rows -H "User-Agent:
python-congressclient" -H "Content-Type: application/json" -H "Accept:
application/json" -d '[[1]]'
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=UTF-8
Content-Length: 102
X-Openstack-Request-Id: req-23432974-b107-4657-9bbc-c2e05fd25a98
Date: Thu, 17 Mar 2016 21:13:03 GMT

{"error": {"message": "Not Found::Datasource not found push", "error_data":
null, "error_code": 404}}

Masahito: do you know what the Datasource Not Found problem is? If not,
could you look into it? I ran into it with the Doctor Driver too.

Tim


On Thu, Mar 17, 2016 at 2:31 AM Masahito MUROI <muroi.masahito at lab.ntt.co.jp>
wrote:

> Hi folks,
>
> This[1] is the driver I mentioned at meeting. It is used for OPNFV
> Doctor[2]. So I plan to push it into master in Newton release, since
> feature freeze for Mitaka was passed and the schema of its translator is
> under the discussion.
>
> If it's worth to push it in current release to test push driver, I don't
> mind doing it.
>
> [1]
>
> https://github.com/muroi/congress/blob/doctor-poc/congress/datasources/doctor_driver.py
> [2] https://wiki.opnfv.org/doctor
>
> --
> 室井 雅仁(Masahito MUROI)
> Software Innovation Center, NTT
> Tel: +81-422-59-4539
>
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160318/30c984ae/attachment.html>


More information about the OpenStack-dev mailing list