diff --git a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.controller.js b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.controller.js
index 736f3e65..ad219f54 100644
--- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.controller.js
+++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.controller.js
@@ -39,6 +39,7 @@
function ListenerDetailsController($scope, gettext) {
var ctrl = this;
ctrl.protocolChange = protocolChange;
+ ctrl.createChange = createChange;
// Error text for invalid fields
ctrl.portNumberError = gettext('The port must be a number between 1 and 65535.');
@@ -71,6 +72,14 @@
}
}
+ function createChange() {
+ if ($scope.model.context.create_listener === false) {
+ // Disabling listener form disables pool form and monitor form
+ $scope.model.context.create_pool = false;
+ $scope.model.context.create_monitor = false;
+ }
+ }
+
function listenerPortExists(port) {
return $scope.model.listenerPorts.some(function(element) {
return element === port;
diff --git a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.controller.spec.js b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.controller.spec.js
index eb9fb62b..aca2d4ab 100644
--- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.controller.spec.js
+++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.controller.spec.js
@@ -36,6 +36,11 @@
};
scope = {
model: {
+ context: {
+ create_listener: true,
+ create_pool: true,
+ create_monitor: true
+ },
listenerPorts: [80],
members: [{port: ''}, {port: ''}],
spec: {
@@ -118,6 +123,18 @@
});
});
+ it('should update create_pool and create_monitor flags', function() {
+ scope.model.context.create_listener = true;
+ ctrl.createChange();
+ expect(scope.model.context.create_pool).toBe(true);
+ expect(scope.model.context.create_monitor).toBe(true);
+
+ scope.model.context.create_listener = false;
+ ctrl.createChange();
+ expect(scope.model.context.create_pool).toBe(false);
+ expect(scope.model.context.create_monitor).toBe(false);
+ });
+
});
});
})();
diff --git a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.html b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.html
index bae57227..37de5ef3 100644
--- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.html
+++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.html
@@ -1,250 +1,17 @@
Provide the details for the listener.
-
+
-
-
-
-
-
-
- Protocol
-
-
-
- {$ protocol $}
-
-
-
-
-
-
-
- Port
-
-
-
-
- {$ ::ctrl.portNumberError $}
-
-
- {$ ::ctrl.portUniqueError $}
-
-
-
-
-
-
-
-
-
-
-
- Client Data Timeout
-
-
-
- {$ ::ctrl.timeoutError $}
-
-
-
-
-
-
-
- TCP Inspect Timeout
-
-
-
- {$ ::ctrl.timeoutError $}
-
-
-
-
-
-
-
-
-
-
-
- Member Connect Timeout
-
-
-
- {$ ::ctrl.timeoutError $}
-
-
-
-
-
-
-
- Member Data Timeout
-
-
-
- {$ ::ctrl.timeoutError $}
-
-
-
-
-
-
-
-
-
-
-
- Connection Limit
-
-
-
-
- {$ ::ctrl.connectionLimitError $}
-
-
-
-
-
-
-
- Default Pool ID
-
-
- None
-
- {$ pool_id $}
-
-
-
-
-
-
-
-
- Allowed Cidrs
-
-
-
-
-
-
-
-
-
-
-
- TLS Cipher String
-
-
- {$ ::ctrl.tls_ciphersError $}
-
-
-
-
-
-
-
Insert Headers
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ Protocol
+
+
+
+ {$ protocol $}
+
+
+
+
+
+
+
+ Port
+
+
+
+
+ {$ ::ctrl.portNumberError $}
+
+
+ {$ ::ctrl.portUniqueError $}
+
+
+
+
+
+
+
+
+
+
+
+ Client Data Timeout
+
+
+
+ {$ ::ctrl.timeoutError $}
+
+
+
+
+
+
+
+ TCP Inspect Timeout
+
+
+
+ {$ ::ctrl.timeoutError $}
+
+
+
+
+
+
+
+
+
+
+
+ Member Connect Timeout
+
+
+
+ {$ ::ctrl.timeoutError $}
+
+
+
+
+
+
+
+ Member Data Timeout
+
+
+
+ {$ ::ctrl.timeoutError $}
+
+
+
+
+
+
+
+
+
+
+
+ Connection Limit
+
+
+
+
+ {$ ::ctrl.connectionLimitError $}
+
+
+
+
+
+
+
+ Default Pool ID
+
+
+ None
+
+ {$ pool_id $}
+
+
+
+
+
+
+
+
+ Allowed Cidrs
+
+
+
+
+
+
+
+
+
+
+
+ TLS Cipher String
+
+
+ {$ ::ctrl.tls_ciphersError $}
+
+
+
+
+
+
+
Insert Headers
+
+
+
+
+
+
diff --git a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/members/members.html b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/members/members.html
index 1f74f8ce..cb28a7f3 100644
--- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/members/members.html
+++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/members/members.html
@@ -1,4 +1,5 @@
-
+
Add members to the load balancer pool.
Provide the details for the health monitor.
-
-
-
-
-
-
-
-
-
- Max Retries Down
-
-
-
-
- {$ ::ctrl.retryDownError $}
-
-
-
-
-
-
-
-
-
-
-
- Delay (sec)
-
-
-
-
- {$ ::ctrl.intervalError $}
-
-
-
-
-
-
-
- Max Retries
-
-
-
-
- {$ ::ctrl.retryError $}
-
-
-
-
-
-
-
- Timeout (sec)
-
-
-
-
- {$ ::ctrl.timeoutError $}
-
-
-
-
-
-
-
-
-
-
-
-
- Expected Codes
-
-
- {$ ::ctrl.statusError $}
-
-
-
-
-
-
- URL Path
-
-
- {$ ::ctrl.pathError $}
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ Max Retries Down
+
+
+
+
+ {$ ::ctrl.retryDownError $}
+
+
+
+
+
+
+
+
+
+
+
+ Delay (sec)
+
+
+
+
+ {$ ::ctrl.intervalError $}
+
+
+
+
+
+
+
+ Max Retries
+
+
+
+
+ {$ ::ctrl.retryError $}
+
+
+
+
+
+
+
+ Timeout (sec)
+
+
+
+
+ {$ ::ctrl.timeoutError $}
+
+
+
+
+
+
+
+
+
+
+
+
+ Expected Codes
+
+
+ {$ ::ctrl.statusError $}
+
+
+
+
+
+
+ URL Path
+
+
+ {$ ::ctrl.pathError $}
+
+
+
+
+
+
+
+
+
diff --git a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.controller.js b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.controller.js
index d57867f9..e1753e5a 100644
--- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.controller.js
+++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.controller.js
@@ -38,6 +38,17 @@
function PoolDetailsController($scope, gettext) {
var ctrl = this;
+ ctrl.createChange = createChange;
+
+ function createChange() {
+ if ($scope.model.context.create_pool) {
+ // Enabling pool form enables listener form
+ $scope.model.context.create_listener = true;
+ } else {
+ // Disabling pool form disables monitor form
+ $scope.model.context.create_monitor = false;
+ }
+ }
// Error text for invalid fields
ctrl.tls_ciphersError = gettext('The cipher string must conform to OpenSSL syntax.');
diff --git a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.controller.spec.js b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.controller.spec.js
index a96b975d..33fac221 100644
--- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.controller.spec.js
+++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.controller.spec.js
@@ -24,8 +24,16 @@
describe('PoolDetailsController', function() {
var ctrl, scope;
- beforeEach(inject(function($controller, $rootScope) {
- scope = $rootScope.$new();
+ beforeEach(inject(function($controller) {
+ scope = {
+ model: {
+ context: {
+ create_listener: true,
+ create_pool: true,
+ create_monitor: true
+ }
+ }
+ };
ctrl = $controller('PoolDetailsController', {
$scope: scope
});
@@ -35,6 +43,18 @@
expect(ctrl.tls_ciphersError).toBeDefined();
});
+ it('should update create_listener and create_monitor flags', function() {
+ scope.model.context.create_pool = true;
+ ctrl.createChange();
+ expect(scope.model.context.create_listener).toBe(true);
+ expect(scope.model.context.create_monitor).toBe(true);
+
+ scope.model.context.create_pool = false;
+ ctrl.createChange();
+ expect(scope.model.context.create_listener).toBe(true);
+ expect(scope.model.context.create_monitor).toBe(false);
+ });
+
});
});
})();
diff --git a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.html b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.html
index cc855dc1..bb4bc808 100644
--- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.html
+++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.html
@@ -1,99 +1,17 @@
Provide the details for the pool.
-
+
-
-
-
-
-
-
- Algorithm
-
-
-
-
-
-
-
-
-
-
- Protocol
-
-
-
-
- {$ protocol $}
-
-
-
-
-
-
-
-
-
-
-
-
- Session Persistence
-
-
- None
-
- {$ type $}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
+
+
+
+ Algorithm
+
+
+
+
+
+
-
diff --git a/releasenotes/notes/allows-creation-of-single-resources-9ec5fe87acc7c93c.yaml b/releasenotes/notes/allows-creation-of-single-resources-9ec5fe87acc7c93c.yaml
new file mode 100644
index 00000000..ea9644ee
--- /dev/null
+++ b/releasenotes/notes/allows-creation-of-single-resources-9ec5fe87acc7c93c.yaml
@@ -0,0 +1,7 @@
+---
+fixes:
+ - |
+ Allows the creation of single resources (i.e Load Balancer) without
+ enforcing the creation of children resources (Listeners, Pools, Health
+ monitors). A switch has been added in the children resource wizards to
+ avoid resource creation.