Change from Django 1.5 and earlier queryset() to Django 1.6 and later get_queryset()
Change-Id: I41c743a1f3d18d9591300a3a705ad963e027bbfd
use 'body_format: json' when sending JSON to ONOS
Change-Id: I2f3ade2d530fd889ae04c9d48fdb8cfc4cf0c27c
diff --git a/xos/admin.py b/xos/admin.py
index f7347ae..d33a3eb 100644
--- a/xos/admin.py
+++ b/xos/admin.py
@@ -72,7 +72,7 @@
suit_form_includes = (('onosadmin.html', 'top', 'administration'),
)
- def queryset(self, request):
+ def get_queryset(self, request):
return ONOSService.get_service_objects_by_user(request.user)
class ONOSAppForm(forms.ModelForm):
@@ -118,7 +118,7 @@
suit_form_tabs = (('general','Details'), ('tenantattrs', 'Attributes'))
- def queryset(self, request):
+ def get_queryset(self, request):
return ONOSApp.get_tenant_objects_by_user(request.user)
admin.site.register(ONOSService, ONOSServiceAdmin)
diff --git a/xos/synchronizer/steps/sync_onosapp.yaml b/xos/synchronizer/steps/sync_onosapp.yaml
index 8235286..ee8846c 100644
--- a/xos/synchronizer/steps/sync_onosapp.yaml
+++ b/xos/synchronizer/steps/sync_onosapp.yaml
@@ -92,7 +92,7 @@
uri:
url: http://{{ '{{' }} onosaddr.stdout {{ '}}' }}:8181/{{ '{{' }} item.endpoint {{ '}}' }}
body: "{{ '{{' }} item.body {{ '}}' }}"
- body_format: raw
+ body_format: json
method: POST
user: karaf
password: karaf
@@ -164,7 +164,7 @@
uri:
url: http://{{ '{{' }} onosaddr.stdout {{ '}}' }}:8181/{{ '{{' }} item.endpoint {{ '}}' }} #http://localhost:8181/onos/v1/network/configuration/
body: "{{ '{{' }} item.body {{ '}}' }}"
- body_format: raw
+ body_format: json
method: POST
user: karaf
password: karaf
diff --git a/xos/synchronizer/steps/sync_onosapp_nocontainer.yaml b/xos/synchronizer/steps/sync_onosapp_nocontainer.yaml
index 33b456e..7e18bf0 100644
--- a/xos/synchronizer/steps/sync_onosapp_nocontainer.yaml
+++ b/xos/synchronizer/steps/sync_onosapp_nocontainer.yaml
@@ -55,7 +55,7 @@
uri:
url: http://{{ rest_hostname }}:{{ rest_port }}/{{ '{{' }} item.endpoint {{ '}}' }} #http://localhost:8181/onos/v1/network/configuration/
body: "{{ '{{' }} item.body {{ '}}' }}"
- body_format: raw
+ body_format: json
method: POST
user: karaf
password: karaf