partial implementation of show controller
diff --git a/cli/cli/desc/version200/controller_node.py b/cli/cli/desc/version200/controller_node.py
index 9ebea77..43135b2 100755
--- a/cli/cli/desc/version200/controller_node.py
+++ b/cli/cli/desc/version200/controller_node.py
@@ -16,7 +16,7 @@
import command
import fmtcnv
-"""
+#"""
CONTROLLER_NODE_FORMAT = {
'controller-node' : {
'field-orderings' : {
@@ -170,7 +170,7 @@
}
),
}
-
+#"""
CONTROLLER_NODE_INTERFACE_FORMAT = {
'controller-interface' : {
'field-orderings': {
@@ -1077,4 +1077,4 @@
},
)
}
-"""
\ No newline at end of file
+#"""
diff --git a/cli/sdncon/controller/models.py b/cli/sdncon/controller/models.py
index 8529a3e..e678aa2 100755
--- a/cli/sdncon/controller/models.py
+++ b/cli/sdncon/controller/models.py
@@ -113,7 +113,7 @@
{'name': 'static_flow_pusher_feature', 'rest_name': 'static-flow-pusher-feature'},
{'name': 'performance_monitor_feature','rest_name': 'performance-monitor-feature'},
)
-"""
+'''
#
# ------------------------------------------------------------
@@ -237,7 +237,7 @@
{'name': 'core_priority', 'rest_name': 'core-priority'},
)
-"""
+'''
#
# ------------------------------------------------------------
@@ -384,7 +384,7 @@
{'name': 'logging_level', 'rest_name': 'logging-level'},
)
-"""
+
#
# ------------------------------------------------------------
@@ -409,7 +409,7 @@
class Rest:
NAME = 'controller-alias'
-
+'''
#
# ------------------------------------------------------------
@@ -611,7 +611,7 @@
NAME = 'controller-domain-name-server'
FIELD_INFO = (
)
-"""
+'''
#
# ------------------------------------------------------------
diff --git a/cli/sdncon/rest/views.py b/cli/sdncon/rest/views.py
index e30b429..5b54f3c 100755
--- a/cli/sdncon/rest/views.py
+++ b/cli/sdncon/rest/views.py
@@ -708,6 +708,14 @@
#url = "http://127.0.0.1:8080/wm/onos/registry/switches/json"
if request.META['QUERY_STRING']:
url += '?' + request.META['QUERY_STRING']
+ return get_sdnplatform_response(url)
+
+@safe_rest_view
+def do_controller(request):
+ url = controller_url("onos", "registry", "controllers" ,"json")
+ #url = "http://127.0.0.1:8080/wm/onos/registry/switches/json"
+ if request.META['QUERY_STRING']:
+ url += '?' + request.META['QUERY_STRING']
return get_sdnplatform_response(url)
#'''
diff --git a/cli/sdncon/urls.py b/cli/sdncon/urls.py
index b06bd39..d112dc6 100755
--- a/cli/sdncon/urls.py
+++ b/cli/sdncon/urls.py
@@ -69,7 +69,7 @@
(r'^rest/v1/device', 'sdncon.rest.views.do_device'),
(r'^rest/v1/switches', 'sdncon.rest.views.do_switches'),
(r'^rest/v1/links', 'sdncon.rest.views.do_links'),
- (r'^rest/v1/mastership', 'sdncon.rest.views.do_mastership'),
+ (r'^rest/v1/mastership', 'sdncon.rest.views.do_mastership'),
(r'^rest/v1/vns/device-interface', 'sdncon.rest.views.do_vns_device_interface'),
(r'^rest/v1/vns/interface', 'sdncon.rest.views.do_vns_interface'),
(r'^rest/v1/vns/realtimestats/flow/(?P<vnsName>[A-Za-z0-9_:.|\-]+)/?$', 'sdncon.rest.views.do_vns_realtimestats_flow', {'category': 'vns'}),
@@ -91,7 +91,7 @@
(r'^rest/v1/system/clock/utc/?$', 'sdncon.rest.views.do_system_clock', {'local': False}),
(r'^rest/v1/system/clock/local/?$', 'sdncon.rest.views.do_system_clock', {'local': True}),
(r'^rest/v1/system/timezones/(?P<list_type>[A-Za-z0-9_\-]+)/?$', 'sdncon.rest.views.do_system_time_zone_strings'),
- (r'^rest/v1/system/controller/?$', 'sdncon.rest.views.do_local_controller_id'),
+ (r'^rest/v1/system/controller/?$', 'sdncon.rest.views.do_controller'),
(r'^rest/v1/system/ha/role/?$', 'sdncon.rest.views.do_local_ha_role'),
(r'^rest/v1/system/ha/failback/?$', 'sdncon.rest.views.do_ha_failback'),
(r'^rest/v1/system/ha/provision/?$', 'sdncon.rest.views.do_ha_provision'),