From 4fcaccd5a24f05a6bb8abaea85f59e6e1b922489 Mon Sep 17 00:00:00 2001 From: Timur Sufiev Date: Wed, 9 Apr 2014 20:17:58 +0400 Subject: [PATCH] Update dynamic UI sample - according to the new format New top-level attributes are Version, Templates and Application (while unitTemplates is dropped), forms -> Forms. Also, thanks to the commit https://review.openstack.org/#/c/86377/ it is no longer necessary to explicitly specify YAQL expressions in dynamic UI - now YAQL expressions are parsed automatically during YAML parsing. Another dependency is the https://review.openstack.org/#/c/86883/ commit which simplifies `repeat` function. Change-Id: I2f3ce3121616749bd653e18b965d5c011a2894f1 --- .../UI/ui.yaml | 52 +++++++++++++------ 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/meta/io.murano.windows.ActiveDirectory/UI/ui.yaml b/meta/io.murano.windows.ActiveDirectory/UI/ui.yaml index 4097d206..9ab4cf1d 100644 --- a/meta/io.murano.windows.ActiveDirectory/UI/ui.yaml +++ b/meta/io.murano.windows.ActiveDirectory/UI/ui.yaml @@ -1,10 +1,36 @@ -unitTemplates: - - isMaster: true - recoveryPassword: {YAQL: $.serviceConfiguration.recoveryPassword} - - isMaster: false - recoveryPassword: {YAQL: $.serviceConfiguration.recoveryPassword} +Version: 2 -forms: +Templates: + primaryController: + ?: + type: io.murano.services.windows.activeDirectory.PrimaryController + host: + ?: + type: io.murano.services.windows.Host + adminPassword: $.serviceConfiguration.adminPassword + name: interpolate($.serviceConfiguration.unitNamingPattern, 1) + flavor: $.instanceConfiguration.flavor + image: $.instanceConfiguration.osImage + + secondaryController: + ?: + type: io.murano.services.windows.activeDirectory.SecondaryController + host: + ?: + type: io.murano.services.windows.Host + adminPassword: $.serviceConfiguration.adminPassword + name: interpolate($.serviceConfiguration.unitNamingPattern, $index + 1) + flavor: $.instanceConfiguration.flavor + image: $.instanceConfiguration.osImage + +Application: + ?: + type: io.murano.services.windows.activeDirectory.ActiveDirectory + name: $.serviceConfiguration.name + primaryController: $primaryController + secondaryControllers: repeat($secondaryController, $.serviceConfiguration.dcInstances - 1) + +Forms: - serviceConfiguration: fields: - name: configuration @@ -21,7 +47,6 @@ forms: DNS server will be automatically set up on each of the Domain Controller instances. Note: Only first 15 characters or characters before first period is used as NetBIOS name. - attributeNames: [name, domain] minLength: 2 maxLength: 255 validators: @@ -47,13 +72,12 @@ forms: Just letters, numbers and dashes are allowed. A dot can be used to create subdomains - name: dcInstances - type: instance + type: integer label: Instance Count description: >- You can create several Active Directory instances by setting instance number larger than one. One primary Domain Controller and a few secondary DCs will be created. - attributeNames: units minValue: 1 maxValue: 100 initial: 1 @@ -81,7 +105,6 @@ forms: - name: recoveryPassword type: password label: Recovery password - attributeNames: false - name: assignFloatingIP required: false type: floatingip @@ -91,7 +114,7 @@ forms: initial: false required: false widgetMedia: - css: {all: [muranodashboard/css/checkbox.css]} + css: {all: ['muranodashboard/css/checkbox.css']} - name: unitNamingPattern type: string label: Hostname template @@ -107,11 +130,11 @@ forms: helpText: Optional field for a machine hostname template # temporaryHack widgetMedia: - js: [muranodashboard/js/support_placeholder.js] - css: {all: [muranodashboard/css/support_placeholder.css]} + js: ['muranodashboard/js/support_placeholder.js'] + css: {all: ['muranodashboard/css/support_placeholder.css']} validators: # if unitNamingPattern is given and dcInstances > 1, then '#' should occur in unitNamingPattern - - expr: {YAQL: $.serviceConfiguration.dcInstances < 2 or not $.serviceConfiguration.unitNamingPattern.bool() or '#' in $.serviceConfiguration.unitNamingPattern} + - expr: $.serviceConfiguration.dcInstances < 2 or not $.serviceConfiguration.unitNamingPattern.bool() or '#' in $.serviceConfiguration.unitNamingPattern message: Incrementation symbol "#" is required in the Hostname template - instanceConfiguration: fields: @@ -119,7 +142,6 @@ forms: type: string required: false hidden: true - attributeNames: false descriptionTitle: Instance Configuration description: Specify some instance parameters on which service would be created. - name: flavor