This ML is deprecated and not related to your subject. You should try to
send it to openstack dev ML.

Regards

-Emilien
On Sep 26, 2012 1:04 PM, "Trinath Somanchi" <trinath.soman...@gmail.com>
wrote:

> Hi All-
>
>
> I'm new to development of Openstack Nova API.
>
> I'm learning to write extensions for the NOVA API.
>
> But NOVA API is not working fine with my extension.
>
>
>
> My extension makes a list of servers in a project who have the user/client
> given metadata info.
>
> I have written an Resource extension, with parent member and collection as
> server.
>
> below is the Serve_actions class. I named my extension this way.
>
> class Server_actions(extensions.ExtensionDescriptor):
>     def get_resources(self):
>         resources = []
>         resource = extensions.ResourceExtension('server_actions',
>                                                  ServerActionsController(),
>
>  member_actions={"metadetail":"GET"},
>                                                  
> parent=dict(member_name='server',
> collection_name='servers'))
>         resources.append(resource)
>         return resources
>
>
>
> Here, the parent is the Server expert controller and the extension is the
> Resource extension.
>
> But I execute the URL as "GET
> http://10.232.90.82:8774/v2/e216fcb54dc944a8ab16e4e325299643/servers/metadetail?key=Created+By&value=TestApp.py
> "
>
> I see that the API, is not mapping the URI to the newly created extension
> which handles the "metadetail" request.
>
> In the logs, 'wsgiorg.routing_args': (<routes.util.URLGenerator object at
> 0x38a5050>, {'action': u'show', 'controller': 
> <nova.api.openstack.wsgi.Resource
> object at 0x2bb6810>, 'project_id': u'e216fcb54dc944a8ab16e4e325299643',
> 'id': u'metadetail'}), actions is reported as "Show" rather than
> "metadetail".
>
> Can any one guide me on where I was wrong in my new extension
> implementation.
>
> Also, I have few more doubts while I gone through sc of Openstack Nova API.
>
> How do URL get mapped to the extensions of the expert classes?
>
> What are Controller and Resource extension? How are they different?
>
> --
> Regards,
> ----------------------------------------------
> Trinath Somanchi,
> +91 9866 235 130
>
>
> --
> Mailing list: https://launchpad.net/~netstack
> Post to     : netstack@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~netstack
> More help   : https://help.launchpad.net/ListHelp
>
>
-- 
Mailing list: https://launchpad.net/~netstack
Post to     : netstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~netstack
More help   : https://help.launchpad.net/ListHelp

Reply via email to