Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* flavor-add-extra-specs.py: Adds extra specs to SCS flavors. This helper inspects existing SCS- flavors, does some snaity checks and and adds the needed extra specs defined in scs-0104-v1. * The relevant standard is 0103 not 0104. * Add scs:cpu-type and disk0-type checks and setting. * Improve documentation. * You can explicitly pass --cpu-type and FLAVORS now. This generates the SCS extra specs even for non-SCS flavors. Mostly for operators, that are still finding their way into the SCS ecosystem and would want to see how their existing flavors map. * Add scs:name-v3 as requested in #630. * Mute flake8. * Add -n|--no-change mode. * use isinstance * Remove commented out imports. * Simplify OS_CLOUD default pickup from environment. As suggested by Matthias Büchse <[email protected]>. * Drop setting scs:name-v3 again. * Improve check_name_extra(). This is however not yet the big rewrite as intended ... * Implement flavor_filter as suggested by mbuechse. * Save one variable (compute). * simplify logic using extant (partly improved) library * adapt unit test * simplify flavor filter logic, improve error output * Fix computation of which extra_specs to remove * appease flake8 * implement actions report, ask, apply * Bugfix: do not report existing values when no value exists * appease flake8 * Demote error to warning because we can't tell if it's a mistake * Convert our RAM in GiB to OpenStack RAM in MiB. * Option -A/--all-names to produce all scs:name-vN. Normally, if one of them exists, we produce no more. * Revert "Convert our RAM in GiB to OpenStack RAM in MiB." This reverts commit 90a75ab. While it does match what OpenStack expects, it's unused and breaks the CI. Needs more investigation. * Use longest SCS- name to derive reference specs. * Update help text to document -A|--all-names * Reenable -q|--quiet. Report changes without it. * Fix import order: builtins, external, internal * use logger consistently, decouple `usage` a bit * remove redundant code * use all flavornames, not just one reference name Signed-off-by: Kurt Garloff <[email protected]> Signed-off-by: Matthias Büchse <[email protected]> Co-authored-by: Matthias Büchse <[email protected]>