Browse Source

Fix neutron-lbaas-dashboard and octavia-dashboard

This patch fixes neutron-lbaas-dashboard to function properly when
installed in horizon with octavia-dashboard.

Story: 2004913
Task: 29266

Change-Id: Ib3e1e4d0bef08745bdbba2437481bfba169931ec
changes/31/642931/8
Michael Johnson 2 years ago
parent
commit
cddbf697e6
  1. 2
      neutron_lbaas_dashboard/api/rest/__init__.py
  2. 38
      neutron_lbaas_dashboard/api/rest/nlbaasv2.py
  3. 2
      neutron_lbaas_dashboard/dashboards/project/ngloadbalancersv2/panel.py
  4. 2
      neutron_lbaas_dashboard/dashboards/project/ngloadbalancersv2/views.py
  5. 4
      neutron_lbaas_dashboard/enabled/_1481_project_ng_loadbalancersv2_panel.py
  6. 94
      neutron_lbaas_dashboard/static/app/core/openstack-service-api/nlbaasv2.service.js
  7. 54
      neutron_lbaas_dashboard/static/app/core/openstack-service-api/nlbaasv2.service.spec.js
  8. 10
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/create/create.action.service.js
  9. 4
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/create/create.action.service.spec.js
  10. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/create/wizard.controller.js
  11. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/create/wizard.controller.spec.js
  12. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/delete/delete.action.service.js
  13. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/delete/delete.action.service.spec.js
  14. 10
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/edit/edit.action.service.js
  15. 4
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/edit/edit.action.service.spec.js
  16. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/edit/wizard.controller.js
  17. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/edit/wizard.controller.spec.js
  18. 12
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/row-actions.service.js
  19. 6
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/row-actions.service.spec.js
  20. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/detail.controller.js
  21. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/detail.controller.spec.js
  22. 6
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/detail.html
  23. 4
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/healthmonitors.module.js
  24. 2
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/healthmonitors.module.spec.js
  25. 14
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/listeners/actions/batch-actions.service.js
  26. 6
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/listeners/actions/batch-actions.service.spec.js
  27. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/listeners/actions/create/wizard.controller.js
  28. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/listeners/actions/create/wizard.controller.spec.js
  29. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/listeners/actions/delete/delete.action.service.js
  30. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/listeners/actions/delete/delete.action.service.spec.js
  31. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/listeners/actions/edit/wizard.controller.js
  32. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/listeners/actions/edit/wizard.controller.spec.js
  33. 16
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/listeners/actions/row-actions.service.js
  34. 6
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/listeners/actions/row-actions.service.spec.js
  35. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/listeners/detail.controller.js
  36. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/listeners/detail.controller.spec.js
  37. 6
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/listeners/detail.html
  38. 4
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/listeners/listeners.module.js
  39. 2
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/listeners/listeners.module.spec.js
  40. 10
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/listeners/table.controller.js
  41. 12
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/listeners/table.controller.spec.js
  42. 6
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/listeners/table.html
  43. 4
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/actions/associate-ip/modal.controller.js
  44. 20
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/actions/associate-ip/modal.controller.spec.js
  45. 0
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/actions/associate-ip/modal.html
  46. 10
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/actions/associate-ip/modal.service.js
  47. 4
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/actions/associate-ip/modal.service.spec.js
  48. 16
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/actions/batch-actions.service.js
  49. 4
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/actions/batch-actions.service.spec.js
  50. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/actions/create/wizard.controller.js
  51. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/actions/create/wizard.controller.spec.js
  52. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/actions/delete/delete.action.service.js
  53. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/actions/delete/delete.action.service.spec.js
  54. 6
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/actions/disassociate-ip/modal.service.js
  55. 4
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/actions/disassociate-ip/modal.service.spec.js
  56. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/actions/edit/wizard.controller.js
  57. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/actions/edit/wizard.controller.spec.js
  58. 16
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/actions/row-actions.service.js
  59. 4
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/actions/row-actions.service.spec.js
  60. 10
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/detail.controller.js
  61. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/detail.controller.spec.js
  62. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/detail.html
  63. 4
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/loadbalancers.module.js
  64. 2
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/loadbalancers.module.spec.js
  65. 10
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/loadbalancers.service.js
  66. 6
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/loadbalancers.service.spec.js
  67. 12
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/table.controller.js
  68. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/table.controller.spec.js
  69. 6
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/loadbalancers/table.html
  70. 10
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/actions/batch-actions.service.js
  71. 4
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/actions/batch-actions.service.spec.js
  72. 6
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/actions/edit-weight/modal.controller.js
  73. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/actions/edit-weight/modal.controller.spec.js
  74. 0
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/actions/edit-weight/modal.html
  75. 10
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/actions/edit-weight/modal.service.js
  76. 4
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/actions/edit-weight/modal.service.spec.js
  77. 10
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/actions/row-actions.service.js
  78. 6
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/actions/row-actions.service.spec.js
  79. 10
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/actions/update-list/update-member-list.service.js
  80. 4
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/actions/update-list/update-member-list.service.spec.js
  81. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/actions/update-list/wizard.controller.js
  82. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/actions/update-list/wizard.controller.spec.js
  83. 12
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/detail.controller.js
  84. 14
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/detail.controller.spec.js
  85. 4
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/detail.html
  86. 4
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/members.module.js
  87. 2
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/members.module.spec.js
  88. 10
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/members.service.js
  89. 6
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/members.service.spec.js
  90. 14
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/table.controller.js
  91. 10
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/table.controller.spec.js
  92. 6
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/members/table.html
  93. 22
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/nlbaasv2.module.js
  94. 18
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/nlbaasv2.module.spec.js
  95. 10
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/nlbaasv2.scss
  96. 10
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/pools/actions/create/create.action.service.js
  97. 4
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/pools/actions/create/create.action.service.spec.js
  98. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/pools/actions/create/wizard.controller.js
  99. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/pools/actions/create/wizard.controller.spec.js
  100. 8
      neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/pools/actions/delete/delete.action.service.js

2
neutron_lbaas_dashboard/api/rest/__init__.py

@ -23,4 +23,4 @@ in https://wiki.openstack.org/wiki/APIChangeGuidelines.
# import REST API modules here
from neutron_lbaas_dashboard.api.rest import barbican # noqa
from neutron_lbaas_dashboard.api.rest import lbaasv2 # noqa
from neutron_lbaas_dashboard.api.rest import nlbaasv2 # noqa

38
neutron_lbaas_dashboard/api/rest/lbaasv2.py → neutron_lbaas_dashboard/api/rest/nlbaasv2.py

@ -406,7 +406,7 @@ class LoadBalancers(generic.View):
"""API for load balancers.
"""
url_regex = r'lbaas/loadbalancers/$'
url_regex = r'nlbaas/loadbalancers/$'
@rest_utils.ajax()
def get(self, request):
@ -436,13 +436,13 @@ class LoadBalancerStatusTree(generic.View):
"""API for retrieving the resource status tree for a single load balancer.
"""
url_regex = r'lbaas/loadbalancers/(?P<loadbalancer_id>[^/]+)/statuses/$'
url_regex = r'nlbaas/loadbalancers/(?P<loadbalancer_id>[^/]+)/statuses/$'
@rest_utils.ajax()
def get(self, request, loadbalancer_id):
"""Get the status tree for a specific load balancer.
http://localhost/api/lbaas/loadbalancers/cc758c90-3d98-4ea1-af44-aab405c9c915/statuses
http://localhost/api/nlbaas/loadbalancers/cc758c90-3d98-4ea1-af44-aab405c9c915/statuses
"""
return neutronclient(request).retrieve_loadbalancer_status(
loadbalancer_id)
@ -453,13 +453,13 @@ class LoadBalancer(generic.View):
"""API for retrieving, updating, and deleting a single load balancer.
"""
url_regex = r'lbaas/loadbalancers/(?P<loadbalancer_id>[^/]+)/$'
url_regex = r'nlbaas/loadbalancers/(?P<loadbalancer_id>[^/]+)/$'
@rest_utils.ajax()
def get(self, request, loadbalancer_id):
"""Get a specific load balancer.
http://localhost/api/lbaas/loadbalancers/cc758c90-3d98-4ea1-af44-aab405c9c915
http://localhost/api/nlbaas/loadbalancers/cc758c90-3d98-4ea1-af44-aab405c9c915
"""
loadbalancer = neutronclient(request).show_loadbalancer(
loadbalancer_id).get('loadbalancer')
@ -479,7 +479,7 @@ class LoadBalancer(generic.View):
def delete(self, request, loadbalancer_id):
"""Delete a specific load balancer.
http://localhost/api/lbaas/loadbalancers/cc758c90-3d98-4ea1-af44-aab405c9c915
http://localhost/api/nlbaas/loadbalancers/cc758c90-3d98-4ea1-af44-aab405c9c915
"""
neutronclient(request).delete_loadbalancer(loadbalancer_id)
@ -489,7 +489,7 @@ class Listeners(generic.View):
"""API for load balancer listeners.
"""
url_regex = r'lbaas/listeners/$'
url_regex = r'nlbaas/listeners/$'
@rest_utils.ajax()
def get(self, request):
@ -531,7 +531,7 @@ class Listener(generic.View):
"""API for retrieving, updating, and deleting a single listener.
"""
url_regex = r'lbaas/listeners/(?P<listener_id>[^/]+)/$'
url_regex = r'nlbaas/listeners/(?P<listener_id>[^/]+)/$'
@rest_utils.ajax()
def get(self, request, listener_id):
@ -541,7 +541,7 @@ class Listener(generic.View):
the details of all resources that exist under the listener will be
returned along with the listener details.
http://localhost/api/lbaas/listeners/cc758c90-3d98-4ea1-af44-aab405c9c915
http://localhost/api/nlbaas/listeners/cc758c90-3d98-4ea1-af44-aab405c9c915
"""
listener = neutronclient(request).show_listener(
listener_id).get('listener')
@ -584,7 +584,7 @@ class Listener(generic.View):
def delete(self, request, listener_id):
"""Delete a specific listener.
http://localhost/api/lbaas/listeners/cc758c90-3d98-4ea1-af44-aab405c9c915
http://localhost/api/nlbaas/listeners/cc758c90-3d98-4ea1-af44-aab405c9c915
"""
neutronclient(request).delete_listener(listener_id)
@ -594,7 +594,7 @@ class Pools(generic.View):
"""API for load balancer pools.
"""
url_regex = r'lbaas/pools/$'
url_regex = r'nlbaas/pools/$'
@rest_utils.ajax()
def post(self, request):
@ -613,7 +613,7 @@ class Pool(generic.View):
"""API for retrieving a single pool.
"""
url_regex = r'lbaas/pools/(?P<pool_id>[^/]+)/$'
url_regex = r'nlbaas/pools/(?P<pool_id>[^/]+)/$'
@rest_utils.ajax()
def get(self, request, pool_id):
@ -623,7 +623,7 @@ class Pool(generic.View):
the details of all resources that exist under the pool will be
returned along with the pool details.
http://localhost/api/lbaas/pools/cc758c90-3d98-4ea1-af44-aab405c9c915
http://localhost/api/nlbaas/pools/cc758c90-3d98-4ea1-af44-aab405c9c915
"""
pool = neutronclient(request).show_lbaas_pool(pool_id).get('pool')
@ -659,7 +659,7 @@ class Pool(generic.View):
def delete(self, request, pool_id):
"""Delete a specific pool.
http://localhost/api/lbaas/pools/cc758c90-3d98-4ea1-af44-aab405c9c915
http://localhost/api/nlbaas/pools/cc758c90-3d98-4ea1-af44-aab405c9c915
"""
neutronclient(request).delete_lbaas_pool(pool_id)
@ -669,7 +669,7 @@ class Members(generic.View):
"""API for load balancer members.
"""
url_regex = r'lbaas/pools/(?P<pool_id>[^/]+)/members/$'
url_regex = r'nlbaas/pools/(?P<pool_id>[^/]+)/members/$'
@rest_utils.ajax()
def get(self, request, pool_id):
@ -708,7 +708,7 @@ class Member(generic.View):
"""API for retrieving a single member.
"""
url_regex = r'lbaas/pools/(?P<pool_id>[^/]+)' + \
url_regex = r'nlbaas/pools/(?P<pool_id>[^/]+)' + \
'/members/(?P<member_id>[^/]+)/$'
@rest_utils.ajax()
@ -737,7 +737,7 @@ class HealthMonitors(generic.View):
"""API for load balancer pool health monitors.
"""
url_regex = r'lbaas/healthmonitors/$'
url_regex = r'nlbaas/healthmonitors/$'
@rest_utils.ajax()
def post(self, request):
@ -754,7 +754,7 @@ class HealthMonitor(generic.View):
"""API for retrieving a single health monitor.
"""
url_regex = r'lbaas/healthmonitors/(?P<healthmonitor_id>[^/]+)/$'
url_regex = r'nlbaas/healthmonitors/(?P<healthmonitor_id>[^/]+)/$'
@rest_utils.ajax()
def get(self, request, healthmonitor_id):
@ -768,7 +768,7 @@ class HealthMonitor(generic.View):
def delete(self, request, healthmonitor_id):
"""Delete a specific health monitor.
http://localhost/api/lbaas/healthmonitors/cc758c90-3d98-4ea1-af44-aab405c9c915
http://localhost/api/nlbaas/healthmonitors/cc758c90-3d98-4ea1-af44-aab405c9c915
"""
neutronclient(request).delete_lbaas_healthmonitor(healthmonitor_id)

2
neutron_lbaas_dashboard/dashboards/project/ngloadbalancersv2/panel.py

@ -24,7 +24,7 @@ LOG = logging.getLogger(__name__)
class NGLoadBalancers(horizon.Panel):
name = _("Load Balancers")
name = _("Neutron Load Balancers")
slug = 'ngloadbalancersv2'
permissions = ('openstack.services.network',)

2
neutron_lbaas_dashboard/dashboards/project/ngloadbalancersv2/views.py

@ -17,4 +17,4 @@ from horizon.views import HorizonTemplateView
class IndexView(HorizonTemplateView):
template_name = 'project/ngloadbalancersv2/index.html'
page_title = 'Load Balancers'
page_title = 'Neutron Load Balancers'

4
neutron_lbaas_dashboard/enabled/_1481_project_ng_loadbalancersv2_panel.py

@ -26,8 +26,8 @@ ADD_PANEL = (
ADD_INSTALLED_APPS = ['neutron_lbaas_dashboard']
ADD_ANGULAR_MODULES = ['horizon.dashboard.project.lbaasv2']
ADD_ANGULAR_MODULES = ['horizon.dashboard.project.nlbaasv2']
ADD_SCSS_FILES = ['dashboard/project/lbaasv2/lbaasv2.scss']
ADD_SCSS_FILES = ['dashboard/project/nlbaasv2/nlbaasv2.scss']
AUTO_DISCOVER_STATIC_FILES = True

94
neutron_lbaas_dashboard/static/app/core/openstack-service-api/lbaasv2.service.js → neutron_lbaas_dashboard/static/app/core/openstack-service-api/nlbaasv2.service.js

@ -18,7 +18,7 @@
angular
.module('horizon.app.core.openstack-service-api')
.factory('horizon.app.core.openstack-service-api.lbaasv2', lbaasv2API);
.factory('horizon.app.core.openstack-service-api.nlbaasv2', lbaasv2API);
lbaasv2API.$inject = [
'horizon.framework.util.http.service',
@ -68,7 +68,7 @@
// Load Balancers
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.getLoadBalancers
* @name horizon.app.core.openstack-service-api.nlbaasv2.getLoadBalancers
* @description
* Get a list of load balancers.
* @param {boolean} full
@ -78,14 +78,14 @@
function getLoadBalancers(full) {
var params = { full: full };
return apiService.get('/api/lbaas/loadbalancers/', { params: params })
return apiService.get('/api/nlbaas/loadbalancers/', { params: params })
.error(function () {
toastService.add('error', gettext('Unable to retrieve load balancers.'));
});
}
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.getLoadBalancer
* @name horizon.app.core.openstack-service-api.nlbaasv2.getLoadBalancer
* @description
* Get a single load balancer by ID
* @param {string} id
@ -95,14 +95,14 @@
function getLoadBalancer(id, full) {
var params = { full: full };
return apiService.get('/api/lbaas/loadbalancers/' + id + '/', { params: params })
return apiService.get('/api/nlbaas/loadbalancers/' + id + '/', { params: params })
.error(function () {
toastService.add('error', gettext('Unable to retrieve load balancer.'));
});
}
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.deleteLoadBalancer
* @name horizon.app.core.openstack-service-api.nlbaasv2.deleteLoadBalancer
* @description
* Delete a single load balancer by ID
* @param {string} id
@ -111,14 +111,14 @@
*/
function deleteLoadBalancer(id, quiet) {
var promise = apiService.delete('/api/lbaas/loadbalancers/' + id + '/');
var promise = apiService.delete('/api/nlbaas/loadbalancers/' + id + '/');
return quiet ? promise : promise.error(function () {
toastService.add('error', gettext('Unable to delete load balancer.'));
});
}
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.createLoadBalancer
* @name horizon.app.core.openstack-service-api.nlbaasv2.createLoadBalancer
* @description
* Create a new load balancer
* @param {object} spec
@ -126,14 +126,14 @@
*/
function createLoadBalancer(spec) {
return apiService.post('/api/lbaas/loadbalancers/', spec)
return apiService.post('/api/nlbaas/loadbalancers/', spec)
.error(function () {
toastService.add('error', gettext('Unable to create load balancer.'));
});
}
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.editLoadBalancer
* @name horizon.app.core.openstack-service-api.nlbaasv2.editLoadBalancer
* @description
* Edit a load balancer
* @param {string} id
@ -142,14 +142,14 @@
*/
function editLoadBalancer(id, spec) {
return apiService.put('/api/lbaas/loadbalancers/' + id + '/', spec)
return apiService.put('/api/nlbaas/loadbalancers/' + id + '/', spec)
.error(function () {
toastService.add('error', gettext('Unable to update load balancer.'));
});
}
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.getLoadBalancerStatusTree
* @name horizon.app.core.openstack-service-api.nlbaasv2.getLoadBalancerStatusTree
* @description
* Get the status tree for a load balancer
* @param {string} id
@ -157,7 +157,7 @@
*/
function getLoadBalancerStatusTree(id) {
return apiService.get('/api/lbaas/loadbalancers/' + id + '/statuses/')
return apiService.get('/api/nlbaas/loadbalancers/' + id + '/statuses/')
.error(function () {
toastService.add('error', gettext('Unable to retrieve load balancer status tree.'));
});
@ -166,7 +166,7 @@
// Listeners
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.getListeners
* @name horizon.app.core.openstack-service-api.nlbaasv2.getListeners
* @description
* Get the list of listeners.
* If a loadbalancer ID is passed as a parameter, the returning list of
@ -181,14 +181,14 @@
function getListeners(id) {
var params = id ? {params: {loadbalancerId: id}} : {};
return apiService.get('/api/lbaas/listeners/', params)
return apiService.get('/api/nlbaas/listeners/', params)
.error(function () {
toastService.add('error', gettext('Unable to retrieve listeners.'));
});
}
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.getListener
* @name horizon.app.core.openstack-service-api.nlbaasv2.getListener
* @description
* Get a single listener by ID.
* @param {string} id
@ -201,14 +201,14 @@
var params = includeChildResources
? {params: {includeChildResources: includeChildResources}}
: {};
return apiService.get('/api/lbaas/listeners/' + id + '/', params)
return apiService.get('/api/nlbaas/listeners/' + id + '/', params)
.error(function () {
toastService.add('error', gettext('Unable to retrieve listener.'));
});
}
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.createListener
* @name horizon.app.core.openstack-service-api.nlbaasv2.createListener
* @description
* Create a new listener
* @param {object} spec
@ -216,14 +216,14 @@
*/
function createListener(spec) {
return apiService.post('/api/lbaas/listeners/', spec)
return apiService.post('/api/nlbaas/listeners/', spec)
.error(function () {
toastService.add('error', gettext('Unable to create listener.'));
});
}
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.editListener
* @name horizon.app.core.openstack-service-api.nlbaasv2.editListener
* @description
* Edit a listener
* @param {string} id
@ -233,14 +233,14 @@
*/
function editListener(id, spec) {
return apiService.put('/api/lbaas/listeners/' + id + '/', spec)
return apiService.put('/api/nlbaas/listeners/' + id + '/', spec)
.error(function () {
toastService.add('error', gettext('Unable to update listener.'));
});
}
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.deleteListener
* @name horizon.app.core.openstack-service-api.nlbaasv2.deleteListener
* @description
* Delete a single listener by ID
* @param {string} id
@ -249,7 +249,7 @@
*/
function deleteListener(id, quiet) {
var promise = apiService.delete('/api/lbaas/listeners/' + id + '/');
var promise = apiService.delete('/api/nlbaas/listeners/' + id + '/');
return quiet ? promise : promise.error(function () {
toastService.add('error', gettext('Unable to delete listener.'));
});
@ -258,7 +258,7 @@
// Pools
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.getPool
* @name horizon.app.core.openstack-service-api.nlbaasv2.getPool
* @description
* Get a single Pool by ID.
* @param {string} id
@ -271,14 +271,14 @@
var params = includeChildResources
? {params: {includeChildResources: includeChildResources}}
: {};
return apiService.get('/api/lbaas/pools/' + id + '/', params)
return apiService.get('/api/nlbaas/pools/' + id + '/', params)
.error(function () {
toastService.add('error', gettext('Unable to retrieve pool.'));
});
}
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.createPool
* @name horizon.app.core.openstack-service-api.nlbaasv2.createPool
* @description
* Create a new pool
* @param {object} spec
@ -286,14 +286,14 @@
*/
function createPool(spec) {
return apiService.post('/api/lbaas/pools/', spec)
return apiService.post('/api/nlbaas/pools/', spec)
.error(function () {
toastService.add('error', gettext('Unable to create pool.'));
});
}
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.editPool
* @name horizon.app.core.openstack-service-api.nlbaasv2.editPool
* @description
* Edit a pool
* @param {string} id
@ -303,14 +303,14 @@
*/
function editPool(id, spec) {
return apiService.put('/api/lbaas/pools/' + id + '/', spec)
return apiService.put('/api/nlbaas/pools/' + id + '/', spec)
.error(function () {
toastService.add('error', gettext('Unable to update pool.'));
});
}
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.deletePool
* @name horizon.app.core.openstack-service-api.nlbaasv2.deletePool
* @description
* Delete a single pool by ID
* @param {string} id
@ -319,7 +319,7 @@
*/
function deletePool(id, quiet) {
var promise = apiService.delete('/api/lbaas/pools/' + id + '/');
var promise = apiService.delete('/api/nlbaas/pools/' + id + '/');
return quiet ? promise : promise.error(function () {
toastService.add('error', gettext('Unable to delete pool.'));
});
@ -328,7 +328,7 @@
// Members
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.getMembers
* @name horizon.app.core.openstack-service-api.nlbaasv2.getMembers
* @description
* Get a list of members.
* @param {string} poolId
@ -339,14 +339,14 @@
*/
function getMembers(poolId) {
return apiService.get('/api/lbaas/pools/' + poolId + '/members/')
return apiService.get('/api/nlbaas/pools/' + poolId + '/members/')
.error(function () {
toastService.add('error', gettext('Unable to retrieve members.'));
});
}
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.getMember
* @name horizon.app.core.openstack-service-api.nlbaasv2.getMember
* @description
* Get a single pool Member by ID.
* @param {string} poolId
@ -356,14 +356,14 @@
*/
function getMember(poolId, memberId) {
return apiService.get('/api/lbaas/pools/' + poolId + '/members/' + memberId + '/')
return apiService.get('/api/nlbaas/pools/' + poolId + '/members/' + memberId + '/')
.error(function () {
toastService.add('error', gettext('Unable to retrieve member.'));
});
}
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.editMember
* @name horizon.app.core.openstack-service-api.nlbaasv2.editMember
* @description
* Edit a pool member.
* @param {string} id
@ -373,14 +373,14 @@
*/
function editMember(poolId, memberId, spec) {
return apiService.put('/api/lbaas/pools/' + poolId + '/members/' + memberId + '/', spec)
return apiService.put('/api/nlbaas/pools/' + poolId + '/members/' + memberId + '/', spec)
.error(function () {
toastService.add('error', gettext('Unable to update member.'));
});
}
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.updateMemberList
* @name horizon.app.core.openstack-service-api.nlbaasv2.updateMemberList
* @description
* Update the list of pool members by adding or removing the necessary members.
* @param {string} poolId
@ -390,7 +390,7 @@
*/
function updateMemberList(poolId, spec) {
return apiService.put('/api/lbaas/pools/' + poolId + '/members/', spec)
return apiService.put('/api/nlbaas/pools/' + poolId + '/members/', spec)
.error(function () {
toastService.add('error', gettext('Unable to update member list.'));
});
@ -399,7 +399,7 @@
// Health Monitors
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.getHealthMonitor
* @name horizon.app.core.openstack-service-api.nlbaasv2.getHealthMonitor
* @description
* Get a single pool health monitor by ID.
* @param {string} monitorId
@ -407,14 +407,14 @@
*/
function getHealthMonitor(monitorId) {
return apiService.get('/api/lbaas/healthmonitors/' + monitorId + '/')
return apiService.get('/api/nlbaas/healthmonitors/' + monitorId + '/')
.error(function () {
toastService.add('error', gettext('Unable to retrieve health monitor.'));
});
}
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.editHealthMonitor
* @name horizon.app.core.openstack-service-api.nlbaasv2.editHealthMonitor
* @description
* Edit a health monitor
* @param {string} id
@ -424,14 +424,14 @@
*/
function editHealthMonitor(id, spec) {
return apiService.put('/api/lbaas/healthmonitors/' + id + '/', spec)
return apiService.put('/api/nlbaas/healthmonitors/' + id + '/', spec)
.error(function () {
toastService.add('error', gettext('Unable to update health monitor.'));
});
}
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.deleteHealthMonitor
* @name horizon.app.core.openstack-service-api.nlbaasv2.deleteHealthMonitor
* @description
* Delete a single health monitor by ID
* @param {string} id
@ -440,14 +440,14 @@
*/
function deleteHealthMonitor(id, quiet) {
var promise = apiService.delete('/api/lbaas/healthmonitors/' + id + '/');
var promise = apiService.delete('/api/nlbaas/healthmonitors/' + id + '/');
return quiet ? promise : promise.error(function () {
toastService.add('error', gettext('Unable to delete health monitor.'));
});
}
/**
* @name horizon.app.core.openstack-service-api.lbaasv2.createHealthMonitor
* @name horizon.app.core.openstack-service-api.nlbaasv2.createHealthMonitor
* @description
* Create a new health monitor
* @param {object} spec
@ -455,7 +455,7 @@
*/
function createHealthMonitor(spec) {
return apiService.post('/api/lbaas/healthmonitors/', spec)
return apiService.post('/api/nlbaas/healthmonitors/', spec)
.error(function () {
toastService.add('error', gettext('Unable to create health monitor.'));
});

54
neutron_lbaas_dashboard/static/app/core/openstack-service-api/lbaasv2.service.spec.js → neutron_lbaas_dashboard/static/app/core/openstack-service-api/nlbaasv2.service.spec.js

@ -27,7 +27,7 @@
beforeEach(module('horizon.app.core.openstack-service-api'));
beforeEach(inject(['horizon.app.core.openstack-service-api.lbaasv2', function(lbaasv2API) {
beforeEach(inject(['horizon.app.core.openstack-service-api.nlbaasv2', function(lbaasv2API) {
service = lbaasv2API;
}]));
@ -39,7 +39,7 @@
{
func: 'getLoadBalancers',
method: 'get',
path: '/api/lbaas/loadbalancers/',
path: '/api/nlbaas/loadbalancers/',
error: 'Unable to retrieve load balancers.',
testInput: [ true ],
data: { params: { full: true } }
@ -47,7 +47,7 @@
{
func: 'getLoadBalancer',
method: 'get',
path: '/api/lbaas/loadbalancers/1234/',
path: '/api/nlbaas/loadbalancers/1234/',
error: 'Unable to retrieve load balancer.',
testInput: [ '1234', true ],
data: { params: { full: true } }
@ -55,21 +55,21 @@
{
func: 'deleteLoadBalancer',
method: 'delete',
path: '/api/lbaas/loadbalancers/1234/',
path: '/api/nlbaas/loadbalancers/1234/',
error: 'Unable to delete load balancer.',
testInput: [ '1234' ]
},
{
func: 'getLoadBalancerStatusTree',
method: 'get',
path: '/api/lbaas/loadbalancers/1234/statuses/',
path: '/api/nlbaas/loadbalancers/1234/statuses/',
error: 'Unable to retrieve load balancer status tree.',
testInput: [ '1234' ]
},
{
func: 'getListeners',
method: 'get',
path: '/api/lbaas/listeners/',
path: '/api/nlbaas/listeners/',
error: 'Unable to retrieve listeners.',
testInput: [ '1234' ],
data: { params: { loadbalancerId: '1234' } }
@ -77,14 +77,14 @@
{
func: 'getListeners',
method: 'get',
path: '/api/lbaas/listeners/',
path: '/api/nlbaas/listeners/',
data: {},
error: 'Unable to retrieve listeners.'
},
{
func: 'getListener',
method: 'get',
path: '/api/lbaas/listeners/1234/',
path: '/api/nlbaas/listeners/1234/',
data: { params: { includeChildResources: true } },
error: 'Unable to retrieve listener.',
testInput: [ '1234', true ]
@ -92,7 +92,7 @@
{
func: 'getListener',
method: 'get',
path: '/api/lbaas/listeners/1234/',
path: '/api/nlbaas/listeners/1234/',
data: {},
error: 'Unable to retrieve listener.',
testInput: [ '1234', false ]
@ -100,7 +100,7 @@
{
func: 'getPool',
method: 'get',
path: '/api/lbaas/pools/1234/',
path: '/api/nlbaas/pools/1234/',
data: { params: { includeChildResources: true } },
error: 'Unable to retrieve pool.',
testInput: [ '1234', true ]
@ -108,7 +108,7 @@
{
func: 'getPool',
method: 'get',
path: '/api/lbaas/pools/1234/',
path: '/api/nlbaas/pools/1234/',
data: {},
error: 'Unable to retrieve pool.',
testInput: [ '1234', false ]
@ -116,28 +116,28 @@
{
func: 'deletePool',
method: 'delete',
path: '/api/lbaas/pools/1234/',
path: '/api/nlbaas/pools/1234/',
error: 'Unable to delete pool.',
testInput: [ '1234' ]
},
{
func: 'getMembers',
method: 'get',
path: '/api/lbaas/pools/1234/members/',
path: '/api/nlbaas/pools/1234/members/',
error: 'Unable to retrieve members.',
testInput: [ '1234' ]
},
{
func: 'getMember',
method: 'get',
path: '/api/lbaas/pools/1234/members/5678/',
path: '/api/nlbaas/pools/1234/members/5678/',
error: 'Unable to retrieve member.',
testInput: [ '1234', '5678' ]
},
{
func: 'editMember',
method: 'put',
path: '/api/lbaas/pools/1234/members/5678/',
path: '/api/nlbaas/pools/1234/members/5678/',
error: 'Unable to update member.',
data: { weight: 2 },
testInput: [ '1234', '5678', { weight: 2 } ]
@ -145,14 +145,14 @@
{
func: 'getHealthMonitor',
method: 'get',
path: '/api/lbaas/healthmonitors/1234/',
path: '/api/nlbaas/healthmonitors/1234/',
error: 'Unable to retrieve health monitor.',
testInput: [ '1234' ]
},
{
func: 'editHealthMonitor',
method: 'put',
path: '/api/lbaas/healthmonitors/1234/',
path: '/api/nlbaas/healthmonitors/1234/',
error: 'Unable to update health monitor.',
data: { name: 'healthmonitor-1' },
testInput: [ '1234', { name: 'healthmonitor-1' } ]
@ -160,14 +160,14 @@
{
func: 'deleteHealthMonitor',
method: 'delete',
path: '/api/lbaas/healthmonitors/1234/',
path: '/api/nlbaas/healthmonitors/1234/',
error: 'Unable to delete health monitor.',
testInput: [ '1234' ]
},
{
func: 'createLoadBalancer',
method: 'post',
path: '/api/lbaas/loadbalancers/',
path: '/api/nlbaas/loadbalancers/',
error: 'Unable to create load balancer.',
data: { name: 'loadbalancer-1' },
testInput: [ { name: 'loadbalancer-1' } ]
@ -175,7 +175,7 @@
{
func: 'editLoadBalancer',
method: 'put',
path: '/api/lbaas/loadbalancers/1234/',
path: '/api/nlbaas/loadbalancers/1234/',
error: 'Unable to update load balancer.',
data: { name: 'loadbalancer-1' },
testInput: [ '1234', { name: 'loadbalancer-1' } ]
@ -183,7 +183,7 @@
{
func: 'createListener',
method: 'post',
path: '/api/lbaas/listeners/',
path: '/api/nlbaas/listeners/',
error: 'Unable to create listener.',
data: { name: 'listener-1' },
testInput: [ { name: 'listener-1' } ]
@ -191,7 +191,7 @@
{
func: 'editListener',
method: 'put',
path: '/api/lbaas/listeners/1234/',
path: '/api/nlbaas/listeners/1234/',
error: 'Unable to update listener.',
data: { name: 'listener-1' },
testInput: [ '1234', { name: 'listener-1' } ]
@ -199,14 +199,14 @@
{
func: 'deleteListener',
method: 'delete',
path: '/api/lbaas/listeners/1234/',
path: '/api/nlbaas/listeners/1234/',
error: 'Unable to delete listener.',
testInput: [ '1234' ]
},
{
func: 'createPool',
method: 'post',
path: '/api/lbaas/pools/',
path: '/api/nlbaas/pools/',
error: 'Unable to create pool.',
data: { name: 'pool-1' },
testInput: [ { name: 'pool-1' } ]
@ -214,7 +214,7 @@
{
func: 'editPool',
method: 'put',
path: '/api/lbaas/pools/1234/',
path: '/api/nlbaas/pools/1234/',
error: 'Unable to update pool.',
data: { name: 'pool-1' },
testInput: [ '1234', { name: 'pool-1' } ]
@ -222,7 +222,7 @@
{
func: 'createHealthMonitor',
method: 'post',
path: '/api/lbaas/healthmonitors/',
path: '/api/nlbaas/healthmonitors/',
error: 'Unable to create health monitor.',
data: { name: 'healthmonitor-1' },
testInput: [ { name: 'healthmonitor-1' } ]
@ -230,7 +230,7 @@
{
func: 'updateMemberList',
method: 'put',
path: '/api/lbaas/pools/1234/members/',
path: '/api/nlbaas/pools/1234/members/',
error: 'Unable to update member list.',
data: { name: 'member-1' },
testInput: [ '1234', { name: 'member-1' } ]

10
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/healthmonitors/actions/create/create.action.service.js → neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/create/create.action.service.js

@ -17,13 +17,13 @@
'use strict';
angular
.module('horizon.dashboard.project.lbaasv2.healthmonitors')
.factory('horizon.dashboard.project.lbaasv2.healthmonitors.actions.create', createService);
.module('horizon.dashboard.project.nlbaasv2.healthmonitors')
.factory('horizon.dashboard.project.nlbaasv2.healthmonitors.actions.create', createService);
createService.$inject = [
'$q',
'$location',
'horizon.dashboard.project.lbaasv2.workflow.modal',
'horizon.dashboard.project.nlbaasv2.workflow.modal',
'horizon.app.core.openstack-service-api.policy',
'horizon.framework.util.i18n.gettext',
'horizon.framework.util.q.extensions'
@ -31,7 +31,7 @@
/**
* @ngDoc factory
* @name horizon.dashboard.project.lbaasv2.healthmonitors.actions.createService
* @name horizon.dashboard.project.nlbaasv2.healthmonitors.actions.createService
* @description
* Provides the service for creating a health monitor resource.
* @param $q The angular service for promises.
@ -47,7 +47,7 @@
var loadbalancerId, listenerId, poolId, statePromise;
var create = workflowModal.init({
controller: 'CreateHealthMonitorWizardController',
controller: 'nLBaaSCreateHealthMonitorWizardController',
message: gettext('A new health monitor is being created.'),
handle: onCreate,
allowed: allowed

4
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/healthmonitors/actions/create/create.action.service.spec.js → neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/create/create.action.service.spec.js

@ -38,7 +38,7 @@
beforeEach(module('horizon.framework.conf'));
beforeEach(module('horizon.framework.widgets'));
beforeEach(module('horizon.app.core.openstack-service-api'));
beforeEach(module('horizon.dashboard.project.lbaasv2'));
beforeEach(module('horizon.dashboard.project.nlbaasv2'));
beforeEach(module(function($provide) {
$provide.value('$uibModal', {
@ -59,7 +59,7 @@
$q = $injector.get('$q');
policy = $injector.get('horizon.app.core.openstack-service-api.policy');
$location = $injector.get('$location');
service = $injector.get('horizon.dashboard.project.lbaasv2.healthmonitors.actions.create');
service = $injector.get('horizon.dashboard.project.nlbaasv2.healthmonitors.actions.create');
init = service.init;
loadBalancerState = $q.defer();
}));

8
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/healthmonitors/actions/create/wizard.controller.js → neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/create/wizard.controller.js

@ -17,14 +17,14 @@
'use strict';
angular
.module('horizon.dashboard.project.lbaasv2.healthmonitors')
.controller('CreateHealthMonitorWizardController', CreateHealthMonitorWizardController);
.module('horizon.dashboard.project.nlbaasv2.healthmonitors')
.controller('nLBaaSCreateHealthMonitorWizardController', CreateHealthMonitorWizardController);
CreateHealthMonitorWizardController.$inject = [
'$scope',
'$routeParams',
'horizon.dashboard.project.lbaasv2.workflow.model',
'horizon.dashboard.project.lbaasv2.workflow.workflow',
'horizon.dashboard.project.nlbaasv2.workflow.model',
'horizon.dashboard.project.nlbaasv2.workflow.workflow',
'horizon.framework.util.i18n.gettext'
];

8
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/healthmonitors/actions/create/wizard.controller.spec.js → neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/create/wizard.controller.spec.js

@ -32,14 +32,14 @@
};
beforeEach(module('horizon.framework.util'));
beforeEach(module('horizon.dashboard.project.lbaasv2'));
beforeEach(module('horizon.dashboard.project.nlbaasv2'));
beforeEach(module(function ($provide) {
$provide.value('horizon.dashboard.project.lbaasv2.workflow.model', model);
$provide.value('horizon.dashboard.project.lbaasv2.workflow.workflow', workflow);
$provide.value('horizon.dashboard.project.nlbaasv2.workflow.model', model);
$provide.value('horizon.dashboard.project.nlbaasv2.workflow.workflow', workflow);
}));
beforeEach(inject(function ($controller) {
spyOn(model, 'initialize');
ctrl = $controller('CreateHealthMonitorWizardController', { $scope: scope });
ctrl = $controller('nLBaaSCreateHealthMonitorWizardController', { $scope: scope });
}));
it('defines the controller', function() {

8
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/healthmonitors/actions/delete/delete.action.service.js → neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/delete/delete.action.service.js

@ -17,22 +17,22 @@
'use strict';
angular
.module('horizon.dashboard.project.lbaasv2.healthmonitors')
.factory('horizon.dashboard.project.lbaasv2.healthmonitors.actions.delete', deleteService);
.module('horizon.dashboard.project.nlbaasv2.healthmonitors')
.factory('horizon.dashboard.project.nlbaasv2.healthmonitors.actions.delete', deleteService);
deleteService.$inject = [
'$q',
'$location',
'$route',
'horizon.framework.widgets.modal.deleteModalService',
'horizon.app.core.openstack-service-api.lbaasv2',
'horizon.app.core.openstack-service-api.nlbaasv2',
'horizon.app.core.openstack-service-api.policy',
'horizon.framework.util.i18n.gettext'
];
/**
* @ngDoc factory
* @name horizon.dashboard.project.lbaasv2.healthmonitors.actions.deleteService
* @name horizon.dashboard.project.nlbaasv2.healthmonitors.actions.deleteService
* @description
* Brings up the delete health monitor confirmation modal dialog.
* On submit, deletes selected health monitor.

8
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/healthmonitors/actions/delete/delete.action.service.spec.js → neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/delete/delete.action.service.spec.js

@ -52,7 +52,7 @@
beforeEach(module('horizon.framework.conf'));
beforeEach(module('horizon.framework.widgets'));
beforeEach(module('horizon.app.core.openstack-service-api'));
beforeEach(module('horizon.dashboard.project.lbaasv2'));
beforeEach(module('horizon.dashboard.project.nlbaasv2'));
beforeEach(function() {
monitor = { id: '1', name: 'HealthMonitor1' };
@ -66,7 +66,7 @@
};
}
});
$provide.value('horizon.app.core.openstack-service-api.lbaasv2', {
$provide.value('horizon.app.core.openstack-service-api.nlbaasv2', {
deleteHealthMonitor: function() {
return makePromise();
}
@ -80,13 +80,13 @@
beforeEach(inject(function ($injector) {
policy = $injector.get('horizon.app.core.openstack-service-api.policy');
lbaasv2Api = $injector.get('horizon.app.core.openstack-service-api.lbaasv2');
lbaasv2Api = $injector.get('horizon.app.core.openstack-service-api.nlbaasv2');
modal = $injector.get('horizon.framework.widgets.modal.deleteModalService');
$scope = $injector.get('$rootScope').$new();
$location = $injector.get('$location');
$q = $injector.get('$q');
toast = $injector.get('horizon.framework.widgets.toast.service');
service = $injector.get('horizon.dashboard.project.lbaasv2.healthmonitors.actions.delete');
service = $injector.get('horizon.dashboard.project.nlbaasv2.healthmonitors.actions.delete');
service.init('1', '2', '3', isActionable('active'));
$scope.$apply();
}));

10
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/healthmonitors/actions/edit/edit.action.service.js → neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/edit/edit.action.service.js

@ -17,20 +17,20 @@
'use strict';
angular
.module('horizon.dashboard.project.lbaasv2.healthmonitors')
.factory('horizon.dashboard.project.lbaasv2.healthmonitors.actions.edit', editService);
.module('horizon.dashboard.project.nlbaasv2.healthmonitors')
.factory('horizon.dashboard.project.nlbaasv2.healthmonitors.actions.edit', editService);
editService.$inject = [
'$q',
'$route',
'horizon.dashboard.project.lbaasv2.workflow.modal',
'horizon.dashboard.project.nlbaasv2.workflow.modal',
'horizon.app.core.openstack-service-api.policy',
'horizon.framework.util.i18n.gettext'
];
/**
* @ngDoc factory
* @name horizon.dashboard.project.lbaasv2.healthmonitors.actions.editService
* @name horizon.dashboard.project.nlbaasv2.healthmonitors.actions.editService
* @description
* Provides the service for editing a health monitor resource.
* @param $q The angular service for promises.
@ -45,7 +45,7 @@
var statePromise;
var edit = workflowModal.init({
controller: 'EditHealthMonitorWizardController',
controller: 'nLBaaSEditHealthMonitorWizardController',
message: gettext('The health monitor has been updated.'),
handle: handle,
allowed: allowed

4
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/healthmonitors/actions/edit/edit.action.service.spec.js → neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/edit/edit.action.service.spec.js

@ -38,7 +38,7 @@
beforeEach(module('horizon.framework.conf'));
beforeEach(module('horizon.framework.widgets'));
beforeEach(module('horizon.app.core.openstack-service-api'));
beforeEach(module('horizon.dashboard.project.lbaasv2'));
beforeEach(module('horizon.dashboard.project.nlbaasv2'));
beforeEach(module(function($provide) {
$provide.value('$uibModal', {
@ -59,7 +59,7 @@
$q = $injector.get('$q');
policy = $injector.get('horizon.app.core.openstack-service-api.policy');
$route = $injector.get('$route');
service = $injector.get('horizon.dashboard.project.lbaasv2.healthmonitors.actions.edit');
service = $injector.get('horizon.dashboard.project.nlbaasv2.healthmonitors.actions.edit');
init = service.init;
loadBalancerState = $q.defer();
}));

8
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/healthmonitors/actions/edit/wizard.controller.js → neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/edit/wizard.controller.js

@ -17,13 +17,13 @@
'use strict';
angular
.module('horizon.dashboard.project.lbaasv2.healthmonitors')
.controller('EditHealthMonitorWizardController', EditHealthMonitorWizardController);
.module('horizon.dashboard.project.nlbaasv2.healthmonitors')
.controller('nLBaaSEditHealthMonitorWizardController', EditHealthMonitorWizardController);
EditHealthMonitorWizardController.$inject = [
'$scope',
'horizon.dashboard.project.lbaasv2.workflow.model',
'horizon.dashboard.project.lbaasv2.workflow.workflow',
'horizon.dashboard.project.nlbaasv2.workflow.model',
'horizon.dashboard.project.nlbaasv2.workflow.workflow',
'horizon.framework.util.i18n.gettext'
];

8
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/healthmonitors/actions/edit/wizard.controller.spec.js → neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/edit/wizard.controller.spec.js

@ -32,14 +32,14 @@
};
beforeEach(module('horizon.framework.util'));
beforeEach(module('horizon.dashboard.project.lbaasv2'));
beforeEach(module('horizon.dashboard.project.nlbaasv2'));
beforeEach(module(function ($provide) {
$provide.value('horizon.dashboard.project.lbaasv2.workflow.model', model);
$provide.value('horizon.dashboard.project.lbaasv2.workflow.workflow', workflow);
$provide.value('horizon.dashboard.project.nlbaasv2.workflow.model', model);
$provide.value('horizon.dashboard.project.nlbaasv2.workflow.workflow', workflow);
}));
beforeEach(inject(function ($controller) {
spyOn(model, 'initialize');
ctrl = $controller('EditHealthMonitorWizardController', { $scope: scope });
ctrl = $controller('nLBaaSEditHealthMonitorWizardController', { $scope: scope });
}));
it('defines the controller', function() {

12
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/healthmonitors/actions/row-actions.service.js → neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/row-actions.service.js

@ -17,20 +17,20 @@
'use strict';
angular
.module('horizon.dashboard.project.lbaasv2.healthmonitors')
.factory('horizon.dashboard.project.lbaasv2.healthmonitors.actions.rowActions',
.module('horizon.dashboard.project.nlbaasv2.healthmonitors')
.factory('horizon.dashboard.project.nlbaasv2.healthmonitors.actions.rowActions',
rowActions);
rowActions.$inject = [
'horizon.framework.util.i18n.gettext',
'horizon.dashboard.project.lbaasv2.loadbalancers.service',
'horizon.dashboard.project.lbaasv2.healthmonitors.actions.edit',
'horizon.dashboard.project.lbaasv2.healthmonitors.actions.delete'
'horizon.dashboard.project.nlbaasv2.loadbalancers.service',
'horizon.dashboard.project.nlbaasv2.healthmonitors.actions.edit',
'horizon.dashboard.project.nlbaasv2.healthmonitors.actions.delete'
];
/**
* @ngdoc service
* @ngname horizon.dashboard.project.lbaasv2.healthmonitors.actions.rowActions
* @ngname horizon.dashboard.project.nlbaasv2.healthmonitors.actions.rowActions
*
* @description
* Provides the service for the health monitor row actions.

6
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/healthmonitors/actions/row-actions.service.spec.js → neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/actions/row-actions.service.spec.js

@ -23,14 +23,14 @@
beforeEach(module('horizon.framework.conf'));
beforeEach(module('horizon.framework.widgets'));
beforeEach(module('horizon.app.core.openstack-service-api'));
beforeEach(module('horizon.dashboard.project.lbaasv2'));
beforeEach(module('horizon.dashboard.project.nlbaasv2'));
beforeEach(inject(function ($injector) {
var rowActionsService = $injector.get(
'horizon.dashboard.project.lbaasv2.healthmonitors.actions.rowActions');
'horizon.dashboard.project.nlbaasv2.healthmonitors.actions.rowActions');
actions = rowActionsService.init('1', '2', '3').actions();
var loadbalancerService = $injector.get(
'horizon.dashboard.project.lbaasv2.loadbalancers.service');
'horizon.dashboard.project.nlbaasv2.loadbalancers.service');
spyOn(loadbalancerService, 'isActionable').and.returnValue(true);
}));

8
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/healthmonitors/detail.controller.js → neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/detail.controller.js

@ -17,12 +17,12 @@
'use strict';
angular
.module('horizon.dashboard.project.lbaasv2.healthmonitors')
.controller('HealthMonitorDetailController', HealthMonitorDetailController);
.module('horizon.dashboard.project.nlbaasv2.healthmonitors')
.controller('nLBaaSHealthMonitorDetailController', HealthMonitorDetailController);
HealthMonitorDetailController.$inject = [
'horizon.app.core.openstack-service-api.lbaasv2',
'horizon.dashboard.project.lbaasv2.healthmonitors.actions.rowActions',
'horizon.app.core.openstack-service-api.nlbaasv2',
'horizon.dashboard.project.nlbaasv2.healthmonitors.actions.rowActions',
'$routeParams',
'$q'
];

8
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/healthmonitors/detail.controller.spec.js → neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/detail.controller.spec.js

@ -45,7 +45,7 @@
}
function createController() {
return $controller('HealthMonitorDetailController', {
return $controller('nLBaaSHealthMonitorDetailController', {
$routeParams: {
loadbalancerId: 'loadbalancerId',
listenerId: 'listenerId',
@ -61,7 +61,7 @@
beforeEach(module('horizon.framework.widgets'));
beforeEach(module('horizon.framework.conf'));
beforeEach(module('horizon.app.core.openstack-service-api'));
beforeEach(module('horizon.dashboard.project.lbaasv2'));
beforeEach(module('horizon.dashboard.project.nlbaasv2'));
beforeEach(module(function($provide) {
apiFail = false;
@ -71,7 +71,7 @@
}));
beforeEach(inject(function($injector) {
lbaasv2API = $injector.get('horizon.app.core.openstack-service-api.lbaasv2');
lbaasv2API = $injector.get('horizon.app.core.openstack-service-api.nlbaasv2');
spyOn(lbaasv2API, 'getHealthMonitor').and.callFake(fakeAPI);
spyOn(lbaasv2API, 'getPool').and.callFake(fakeAPI);
spyOn(lbaasv2API, 'getListener').and.callFake(fakeAPI);
@ -79,7 +79,7 @@
$controller = $injector.get('$controller');
}));
it('should invoke lbaasv2 apis', function() {
it('should invoke nlbaasv2 apis', function() {
var ctrl = createController();
expect(lbaasv2API.getHealthMonitor).toHaveBeenCalledWith('healthmonitorId');
expect(lbaasv2API.getPool).toHaveBeenCalledWith('poolId');

6
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/healthmonitors/detail.html → neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/detail.html

@ -1,5 +1,5 @@
<div ng-controller="HealthMonitorDetailController as ctrl">
<detail-status loading="ctrl.loading" error="ctrl.error"></detail-status>
<div ng-controller="nLBaaSHealthMonitorDetailController as ctrl">
<nlbaas-detail-status loading="ctrl.loading" error="ctrl.error"></nlbaas-detail-status>
<div ng-if="!ctrl.loading && !ctrl.error">
<div class="page-header">
<ol class="breadcrumb">
@ -39,4 +39,4 @@
</div>
</div>
</div>
</div>
</div>

4
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/healthmonitors/healthmonitors.module.js → neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/healthmonitors.module.js

@ -18,7 +18,7 @@
/**
* @ngdoc overview
* @ngname horizon.dashboard.project.lbaasv2.healthmonitors
* @ngname horizon.dashboard.project.nlbaasv2.healthmonitors
*
* @description
* Provides the services and widgets required to support and display the project healthmonitors
@ -26,6 +26,6 @@
*/
angular
.module('horizon.dashboard.project.lbaasv2.healthmonitors', []);
.module('horizon.dashboard.project.nlbaasv2.healthmonitors', []);
})();

2
neutron_lbaas_dashboard/static/dashboard/project/lbaasv2/healthmonitors/healthmonitors.module.spec.js → neutron_lbaas_dashboard/static/dashboard/project/nlbaasv2/healthmonitors/healthmonitors.module.spec.js

@ -18,7 +18,7 @@
describe('LBaaS v2 Healthmonitors Module', function() {
it('should exist', function() {
expect(angular.module('horizon.dashboard.project.lbaasv2.healthmonitors')).toBeDefined();