A reusable django webservices app for openstack dashboard.
- Clone this app into your django project as an app.
- Update your django project settings.py to add openstack_dashboard_webservices app.
- Update your django project urls.py to serve the webservice requests.
- Restart your django server.
INSTALLED_APPS = (
'openstack_dashboard',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_nose',
'horizon',
'horizon.dashboards.nova',
'horizon.dashboards.syspanel',
'horizon.dashboards.settings',
'openstack_dashboard_webservices', #Added here
)
urlpatterns = patterns('',
url(r'^$', 'openstack_dashboard.views.splash', name='splash'),
url(r'^qunit/$', 'openstack_dashboard.views.qunit_tests', name='qunit_tests'),
url(r'^soap/','openstack_dashboard_webservices.views.soap_services', name='soap_services'), #Added here
url(r'', include(horizon.urls)))
wsdl:
http://yourhost/soap/?wsdl
rpc:
http://yourhost/soap/get_user?userid=1&username=Tom
soap:
from suds.client import Client
client = Client(url='http://yourhost/soap/?wsdl')
print client
print client.service.get_user(userid=1, username='Tom')