Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flavor-manager-input.py uses strings instead of real types for default values #340

Closed
gndrmnn opened this issue Sep 4, 2023 · 2 comments · Fixed by #341
Closed

flavor-manager-input.py uses strings instead of real types for default values #340

gndrmnn opened this issue Sep 4, 2023 · 2 comments · Fixed by #341
Assignees
Labels
IaaS Issues or pull requests relevant for Team1: IaaS SCS is standardized SCS is standardized SCS-VP10 Related to tender lot SCS-VP10
Milestone

Comments

@gndrmnn
Copy link

gndrmnn commented Sep 4, 2023

Currently, the flavor-manager-input.py produces yaml files which contain strings instead of booleans for certain default values. Namely public and disabled:

def spec_dict():
"return dict with syntax specification"
ref = [{"field": "name", "mandatory_prefix": "SCS-"},
{"field": "public", "default": "true"},
{"field": "disabled", "default": "false"}]
for key in SpecSyntax.vocabulary:
if not fnmck.prefer_old:
ref.append({"field": key})
return {"reference": ref}

We are currently working on unifying the type parsing for the osism-flavor-manager and have encountered the problem, that the yaml file in this repo (SCS-Spec.MandatoryFlavors.verbose.yaml), which will be automatically downloaded by the osism-flavor-manager at the users discretion, contains strings instead of booleans because of the python script mentioned above:

reference:
- field: name
mandatory_prefix: SCS-
- field: public
default: 'true'
- field: disabled
default: 'false'
- field: name
- field: cpus
- field: ram
- field: disk
- field: description
mandatory:

We propose changing the flavor-manager-input.py in this repo and regenerating the yaml file with correctly typed values.

For reference, this is how the osism flavor.yaml file looks like: https://raw.githubusercontent.com/osism/openstack-flavor-manager/main/flavors.yaml

@mbuechse mbuechse self-assigned this Sep 6, 2023
@mbuechse mbuechse added this to the R5 (v6.0.0) milestone Sep 6, 2023
@mbuechse mbuechse added IaaS Issues or pull requests relevant for Team1: IaaS SCS is standardized SCS is standardized SCS-VP10 Related to tender lot SCS-VP10 labels Sep 6, 2023
@mbuechse
Copy link
Contributor

mbuechse commented Sep 6, 2023

@gndrmnn I stumbled upon this issue by coincidence. It would have been good to either assign it to me directly or to mention it in the Team IaaS meeting. At any rate, I will get to work on this soon.

@gndrmnn
Copy link
Author

gndrmnn commented Sep 6, 2023

@gndrmnn I stumbled upon this issue by coincidence. It would have been good to either assign it to me directly or to mention it in the Team IaaS meeting. At any rate, I will get to work on this soon.

Noted, I dont know the procedures just yet :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IaaS Issues or pull requests relevant for Team1: IaaS SCS is standardized SCS is standardized SCS-VP10 Related to tender lot SCS-VP10
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants