Yes, here is extension code:
http://pastebin.com/btYQjwnr
service plugin code:
http://pastebin.com/ikKf80Fr

and script, which makes requests to neutron:
from neutronclient.neutron import client

c = client.Client('2.0',
                  tenant_name='admin',
                  username='admin',
                  password='59d29892353346f0',
                  auth_token='dc22bf0fc886484d813b9d168b99dae2',
                  endpoint_url='http://127.0.0.1:9696/',
                  auth_url='http://127.0.0.1:5000/v2.0')
c.do_request('GET', '/floatingports')

I was trying with urls like /floatingport, /floatingports, Floatingports etc., but none of them works. Also after pasting plugin functions to ML2 plugin

Regards,
Maciej


W dniu 29.07.2014, 10:14, Jaume Devesa pisze:
Hello Maciej,

can I see your code somewhere? I have written an extension recently and
I might can help you. The blog post is quite similar of what I've done,
so you should be close to get it work.

Regards,
jaume



On 29 July 2014 08:28, Maciej Nabożny <[email protected]
<mailto:[email protected]>> wrote:

    Hello!
    This is my first mail on this mailing list, so - hello everybody :)

    I'm trying to write extension and service plugin for Neutron, which
    adds support for something like "floating port". This should be
    dnat/snat service for virtual machines. I was following this tutorial:

    
http://control-that-vm.__blogspot.in/2014/05/writing-__api-extensions-in-neutron.__html?view=flipcard
    
<http://control-that-vm.blogspot.in/2014/05/writing-api-extensions-in-neutron.html?view=flipcard>

    I have created extension with some resources
    (RESOURCE_ATTRIBUTE_MAP) and service plugin for it. In logs, neutron
    says, that extension is working and it has backend (service plugin).
    It is also listed in extension list through neutron api. The only
    problem, which I have is how to access my functions. As far as I
    understand, it should work in this way:
    - GET /v2.0/floatingport/ calls function get_floatingport(...)
    - GET /v2.0/floatingports/id/ calls function get_floatingports(...)
    and so on for all CRUD methods. Could you tell me how should I
    register this functions to be available in neutron's api? Each time
    when I call GET /v2.0/gloatingport/ i got 404. The same is through
    neutronclient python module with:
             c.do_request('GET', '/floatingip')
    I have also tried to paste all my methods to ml2 plugin, but also
    they are not accessible through api.

    I will be grateful for your help
    Regards!
    Maciek

    _________________________________________________
    OpenStack-dev mailing list
    [email protected].__org
    <mailto:[email protected]>
    http://lists.openstack.org/__cgi-bin/mailman/listinfo/__openstack-dev 
<http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev>




--
Jaume Devesa
Software Engineer at Midokura


_______________________________________________
OpenStack-dev mailing list
[email protected]
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


_______________________________________________
OpenStack-dev mailing list
[email protected]
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to