-
Notifications
You must be signed in to change notification settings - Fork 4
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
Generate GX conformant credentials for VM Images #67
Comments
Convert GX Schema to python classesWe need a bunch of classes, such as CPU, GPU, Memory, Disk, Cryptography, ... to create valid Gaia-X Credentials in JSON-LD. We can create these python classes manually, which is error-prone and cause a huge maintenance overhead. We have to adapt classes are every change of Gaia-X Credential schema. A better way, would be to read OWL ontology of Gaia-X Credential schema and generate python classes automatically. There are python lib, which do this work for use... owlready2 rdflib: linkml You can install linkml via pip pip install linkml To call linkml python generator from CLI, use gen-python gaia-x.yaml >> gx_schema.py
|
Mandatory attributes in Gaia-X Credential SchemaThere is a challenge with Gaia-X mandatory attributes for VM images. A VM Image is a sub-class of a Virtual Resource, it inherits mandatory attributes |
|
Is was a hard job to figure out default values for right owner and license of all operation systems. And as I'm not a legal expert, I do not know, if I did everything correctly. The default values, available in config/config.yaml, should be reviewed by an expert, definitely. |
For VM images, I decided to use the following strategy for default values for mandatory attributes:
|
Random-number generator device '"hwRngTypeOfImage"Gaia-X supports the following values for random-number generator: Electrical noise, Chaos-based, Free-running oscillators, Quantum, and None. In contrast to that, Openstack Image metadata allows |
Image EncryptionOpenStack does not yet support image encryption. There is a spec regarding encryption, but not feature update yet. We will skip this attribute in generator. |
GPU RequirementsOpenStack does not yet support to define GPU requirements, like it is possible for CPU (e.g. architecture, number of cores, number of thread, ...) . Hence, generator will skip generation of GPU requirements. |
JSON-LD SerializationGX Credentials are serialized in JSON-LD. However, there is a challenge in serialization of Python objects in JSON-LD. Build in method See, e.g. the following instance of a VM Image: classDiagram
class VMImage{
copyrightOwnedBy=["TBA"]
license = ["https://license.de"]
resourcePolicy: ["default: allow intent"]
}
JSON Serialization {
"copyrightOwnedBy": [
"TBA"
],
"license": [
"https://tba.de"
],
"resourcePolicy": [
"default: allow intent"
]
}
JSON-LD serialization {
"@type": [
"http://w3id.org/gaia-x/gx-trust-framework/VMImage"
],
"http://w3id.org/gaia-x/gx-trust-framework/copyrightOwnedBy": [
{
"@value": "TBA"
}
],
"http://w3id.org/gaia-x/gx-trust-framework/license": [
{
"@type": "http://www.w3.org/2001/XMLSchema#anyURI",
"@value": "https://tba.de"
}
],
"http://w3id.org/gaia-x/gx-trust-framework/resourcePolicy": [
{
"@value": "default: allow intent"
}
]
}
|
Data type of many attributes in GX Credential Schema are unions of types. GX Credential Schema is described with linkML. LinkML defines attribute's data type with key word class VirtualResource:
...
attributes:
license:
required: true
multivalued: true
description: A list of SPDX identifiers or URL to document.
any_of:
- range: SPDX
- range: uri
... We use LinkMLs python generator to convert yaml files into python classes. However, LinkML's python generator does not evaluate key word Missing consideration of keyword |
I have to correct myself. Looking deeper in to linkML's source code and playing around, I figured out: Supporting keyword I decided to go with a simple workaround and wait for upstream to fix the bug. Bug report was created, see linkml/linkml#1813. I figured out, that data types of object's properties are checked at initialization time only. You can change object's properties afterward to arbitrary types.I used this bug(?)/feature to set property's type explicit and evaluate this type in |
Supporting property aggregationOfResourcesGaia-X support to describe VM images in more detail by property |
Extending of Gaia-X Credential SchemaTo support all properties defined in SCS Image Metadata Standard, two minor changes ind current Gaia-X Credential Schema was necessary. See the following MR in Gaia-X Service Characteristics GitLab |
Motivation
As a potential cloud customer, I want to know what VM (virtual machine) images are provided by a SCS cloud service provider. Gaia-X provides special class VM_Image to describe offered VM Images as temper-evident Gaia-X Credential.
Task
Write/Update script to generate Gaia-X Credentials for VM Images.
The following Gaia-X Image properties MUST be generated:
The following Gaia-X Image properties SHOULD be generated:
The following Gaia-X Image properties MAY be generated:
gpuReq- not yet supported by OpenStack. See Generate GX conformant credentials for VM Images #67 (comment)encryption- not yet supported by OpenStack, see Generate GX conformant credentials for VM Images #67 (comment)hwRngTypeOfImage- information provided in image metadata is not sufficient/compatible with Gaia-X see Generate GX conformant credentials for VM Images #67 (comment)Prerequisites
The text was updated successfully, but these errors were encountered: