Browse Source

Add shared-file-system guideline

Refstack backend was missing shared-file-system in the mapping
which resulted in backend not being able to parse the Shared
File System guideline download from the interop repo.
The refstack-ui needs to be edited as well so that it can properly
render the Shared File System guideline on the website.

Change-Id: I017a331ab010f94b223add22a2b55a02b6996db5
changes/34/779034/8
Martin Kopec 4 months ago
parent
commit
ec4a8a9547
11 changed files with 42 additions and 11 deletions
  1. +1
    -0
      refstack-ui/app/components/guidelines/guidelines.html
  2. +10
    -2
      refstack-ui/app/components/guidelines/guidelinesController.js
  3. +1
    -0
      refstack-ui/app/components/home/home.html
  4. +1
    -0
      refstack-ui/app/components/products/partials/testsTable.html
  5. +2
    -1
      refstack-ui/app/components/products/productController.js
  6. +1
    -0
      refstack-ui/app/components/results-report/partials/editTestModal.html
  7. +1
    -0
      refstack-ui/app/components/results-report/resultsReport.html
  8. +10
    -3
      refstack-ui/app/components/results-report/resultsReportController.js
  9. +1
    -0
      refstack-ui/app/components/results/results.html
  10. +6
    -2
      refstack-ui/app/components/results/resultsController.js
  11. +8
    -3
      refstack/api/guidelines.py

+ 1
- 0
refstack-ui/app/components/guidelines/guidelines.html View File

@ -20,6 +20,7 @@
<option value="object">OpenStack Powered Object Storage</option>
<option value="dns">OpenStack with DNS</option>
<option value="orchestration">OpenStack with Orchestration</option>
<option value="shared-file-system">OpenStack with Shared File System</option>
</select>
</div>
</div>


+ 10
- 2
refstack-ui/app/components/guidelines/guidelinesController.js View File

@ -140,7 +140,10 @@
var targetComponents = null;
var old_type = ctrl.gl_type;
if (ctrl.target === 'dns' || ctrl.target === 'orchestration') {
if (ctrl.target === 'dns' ||
ctrl.target === 'orchestration' ||
ctrl.target === 'shared-file-system'
) {
ctrl.gl_type = ctrl.target;
} else {
ctrl.gl_type = 'powered';
@ -157,7 +160,12 @@
// components.
if (ctrl.target === 'platform' || ctrl.schema >= '2.0') {
if ('add-ons' in ctrl.guidelines) {
targetComponents = ['os_powered_' + ctrl.target];
// replace dashes by underscores in case the filename of
// a specific add-on contains dashes however the component
// name is written with underscores, f.e. like in case of
// shared-file-system.2020.11.json add-on
var target = ctrl.target.replace('-', '_');
targetComponents = ['os_powered_' + target];
} else if (ctrl.schema >= '2.0') {
var platformsMap = {
'platform': 'OpenStack Powered Platform',


+ 1
- 0
refstack-ui/app/components/home/home.html View File

@ -30,6 +30,7 @@
<li>OpenStack Powered Object Storage</li>
<li>OpenStack with DNS</li>
<li>OpenStack with Orchestration</li>
<li>OpenStack with Shared File System</li>
</ul>
</div>
</div>

+ 1
- 0
refstack-ui/app/components/products/partials/testsTable.html View File

@ -94,6 +94,7 @@
<option value="object">OpenStack Powered Object Storage</option>
<option value="dns">OpenStack with DNS</option>
<option value="orchestration">OpenStack with Orchestration</option>
<option value="shared-file-system">OpenStack with Shared File System</option>
</select>
<a ng-if="!result.targetEdit"
ng-click="result.targetEdit = true"


+ 2
- 1
refstack-ui/app/components/products/productController.js View File

@ -60,7 +60,8 @@
'compute': 'OpenStack Powered Compute',
'object': 'OpenStack Powered Object Storage',
'dns': 'OpenStack with DNS',
'orchestration': 'OpenStack with Orchestration'
'orchestration': 'OpenStack with Orchestration',
'shared-file-system': 'OpenStack with Shared File System'
};
// Pagination controls.


+ 1
- 0
refstack-ui/app/components/results-report/partials/editTestModal.html View File

@ -29,6 +29,7 @@
<option value="object">OpenStack Powered Object Storage</option>
<option value="dns">OpenStack with DNS</option>
<option value="orchestration">OpenStack with Orchestration</option>
<option value="shared-file-system">OpenStack with Shared File System</option>
</select>
<hr>
<strong>Associated Product:</strong>


+ 1
- 0
refstack-ui/app/components/results-report/resultsReport.html View File

@ -87,6 +87,7 @@
<option value="object">OpenStack Powered Object Storage</option>
<option value="dns">OpenStack with DNS</option>
<option value="orchestration">OpenStack with Orchestration</option>
<option value="shared-file-system">OpenStack with Shared File System</option>
</select>
</div>
</div>


+ 10
- 3
refstack-ui/app/components/results-report/resultsReportController.js View File

@ -68,7 +68,8 @@
'compute': 'OpenStack Powered Compute',
'object': 'OpenStack Powered Object Storage',
'dns': 'OpenStack with DNS',
'orchestration': 'OpenStack with orchestration'
'orchestration': 'OpenStack with orchestration',
'shared-file-system': 'OpenStack with Shared File System'
};
/** The schema version of the currently selected guideline data. */
@ -90,7 +91,10 @@
* Sample API return array: ["2015.03.json", "2015.04.json"]
*/
function getVersionList() {
if (ctrl.target === 'dns' || ctrl.target === 'orchestration') {
if (ctrl.target === 'dns' ||
ctrl.target === 'orchestration' ||
ctrl.target === 'shared-file-system'
) {
ctrl.gl_type = ctrl.target;
} else {
@ -279,7 +283,10 @@
var targetCaps = {};
var targetComponents = null;
var old_type = ctrl.gl_type;
if (ctrl.target === 'dns' || ctrl.target === 'orchestration') {
if (ctrl.target === 'dns' ||
ctrl.target === 'orchestration' ||
ctrl.target === 'shared-file-system'
) {
ctrl.gl_type = ctrl.target;
} else {
ctrl.gl_type = 'powered';


+ 1
- 0
refstack-ui/app/components/results/results.html View File

@ -157,6 +157,7 @@
<option value="object">OpenStack Powered Object Storage</option>
<option value="dns">OpenStack with DNS</option>
<option value="orchestration">OpenStack with Orchestration</option>
<option value="shared-file-system">OpenStack with Shared File System</option>
</select>
<a ng-if="!result.targetEdit"
ng-click="result.targetEdit = true;"


+ 6
- 2
refstack-ui/app/components/results/resultsController.js View File

@ -42,7 +42,10 @@
ctrl.associateProductVersion = associateProductVersion;
ctrl.getProductVersions = getProductVersions;
ctrl.prepVersionEdit = prepVersionEdit;
if (ctrl.target === 'dns' || ctrl.target === 'orchestration') {
if (ctrl.target === 'dns' ||
ctrl.target === 'orchestration' ||
ctrl.target === 'shared-file-system'
) {
ctrl.gl_type = ctrl.target;
} else {
ctrl.gl_type = 'powered';
@ -54,7 +57,8 @@
'compute': 'OpenStack Powered Compute',
'object': 'OpenStack Powered Object Storage',
'dns': 'OpenStack with DNS',
'orchestration': 'OpenStack with Orchestration'
'orchestration': 'OpenStack with Orchestration',
'shared-file-system': 'OpenStack with Shared File System'
};
/** Initial page to be on. */


+ 8
- 3
refstack/api/guidelines.py View File

@ -162,11 +162,16 @@ class Guidelines:
'compute': 'OpenStack Powered Compute',
'object': 'OpenStack Powered Storage',
'dns': 'OpenStack with DNS',
'orchestration': 'OpenStack with Orchestration'
'orchestration': 'OpenStack with Orchestration',
'shared-file-system': 'OpenStack with Shared File System'
}
if target == 'dns' or target == 'orchestration':
targets = ['os_powered_' + target]
if target in ['dns', 'orchestration', 'shared-file-system']:
# replace dashes by underscores in case the filename of
# a specific add-on contains dashes however the component name
# is written with underscores, f.e. like in case of
# shared-file-system.2020.11.json add-on
targets = ['os_powered_' + target.replace('-', '_')]
else:
comps = \
guideline_json['platforms'][platformsMap[target]


Loading…
Cancel
Save