Skip to content
Snippets Groups Projects
Commit 682f2e77 authored by Utz-Uwe Haus's avatar Utz-Uwe Haus
Browse files

Implement attribute default value handling

not fully working
parent b42a22fc
Branches
Tags
No related merge requests found
...@@ -124,36 +124,35 @@ unsigned char ecmwf_yaml[] = { ...@@ -124,36 +124,35 @@ unsigned char ecmwf_yaml[] = {
0x3d, 0x31, 0x2c, 0x20, 0x6d, 0x61, 0x78, 0x3d, 0x35, 0x30, 0x29, 0x0a, 0x3d, 0x31, 0x2c, 0x20, 0x6d, 0x61, 0x78, 0x3d, 0x35, 0x30, 0x29, 0x0a,
0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64,
0x3a, 0x20, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3a, 0x20, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20,
0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x20, 0x46, 0x61, 0x6c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x20, 0x30, 0x0a, 0x20,
0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d,
0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x4e, 0x75,
0x6d, 0x62, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20,
0x65, 0x6e, 0x73, 0x65, 0x6d, 0x62, 0x6c, 0x65, 0x20, 0x73, 0x65, 0x74,
0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x2d, 0x20, 0x6b, 0x65, 0x79, 0x3a, 0x20,
0x22, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x0a, 0x20,
0x20, 0x20, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x69, 0x6e, 0x74,
0x28, 0x6d, 0x69, 0x6e, 0x3d, 0x31, 0x2c, 0x20, 0x6d, 0x61, 0x78, 0x3d,
0x31, 0x33, 0x37, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x71,
0x75, 0x69, 0x72, 0x65, 0x64, 0x3a, 0x20, 0x46, 0x61, 0x6c, 0x73, 0x65,
0x0a, 0x20, 0x20, 0x20, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
0x3a, 0x20, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20,
0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x3a, 0x20, 0x56, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x20,
0x6c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65,
0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x61, 0x73,
0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74,
0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x20,
0x74, 0x79, 0x70, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x2d, 0x20, 0x6b,
0x65, 0x79, 0x3a, 0x20, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x22, 0x0a,
0x20, 0x20, 0x20, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x69, 0x6e,
0x74, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x71, 0x75,
0x69, 0x72, 0x65, 0x64, 0x3a, 0x20, 0x54, 0x72, 0x75, 0x65, 0x0a, 0x20,
0x20, 0x20, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x55, 0x6e, 0x69, 0x71, 0x65, 0x20, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72,
0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x20, 0x66, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6e, 0x73, 0x65,
0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x6d, 0x62, 0x6c, 0x65, 0x20, 0x73, 0x65, 0x74, 0x2e, 0x0a, 0x0a, 0x20,
0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x6d, 0x65, 0x74, 0x65, 0x6f, 0x72, 0x20, 0x2d, 0x20, 0x6b, 0x65, 0x79, 0x3a, 0x20, 0x22, 0x6c, 0x65, 0x76,
0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x71, 0x75, 0x61, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x74,
0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x0a 0x79, 0x70, 0x65, 0x3a, 0x20, 0x69, 0x6e, 0x74, 0x28, 0x6d, 0x69, 0x6e,
0x3d, 0x31, 0x2c, 0x20, 0x6d, 0x61, 0x78, 0x3d, 0x31, 0x33, 0x37, 0x29,
0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
0x64, 0x3a, 0x20, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20,
0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x20, 0x30, 0x0a,
0x20, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x56, 0x65, 0x72, 0x74, 0x69,
0x63, 0x61, 0x6c, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x69, 0x66,
0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x6f, 0x6e,
0x65, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64,
0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x65,
0x76, 0x65, 0x6c, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x0a, 0x0a, 0x20,
0x20, 0x2d, 0x20, 0x6b, 0x65, 0x79, 0x3a, 0x20, 0x22, 0x70, 0x61, 0x72,
0x61, 0x6d, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x74, 0x79, 0x70, 0x65,
0x3a, 0x20, 0x69, 0x6e, 0x74, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20,
0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x3a, 0x20, 0x54, 0x72,
0x75, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d,
0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x55, 0x6e,
0x69, 0x71, 0x65, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69,
0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66,
0x69, 0x65, 0x6c, 0x64, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x6d, 0x65,
0x74, 0x65, 0x6f, 0x72, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c,
0x20, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x0a
}; };
const unsigned int ecmwf_yaml_len = 1867; const unsigned int ecmwf_yaml_len = 1859;
...@@ -62,13 +62,13 @@ maestro-attributes: ...@@ -62,13 +62,13 @@ maestro-attributes:
- key: "number" - key: "number"
type: int(min=1, max=50) type: int(min=1, max=50)
required: False required: False
default: False default: 0
documentation: Number in the ensemble set. documentation: Number in the ensemble set.
- key: "levelist" - key: "levelist"
type: int(min=1, max=137) type: int(min=1, max=137)
required: False required: False
default: False default: 0
documentation: Vertical level if there is one associated with the level type. documentation: Vertical level if there is one associated with the level type.
- key: "param" - key: "param"
......
This diff is collapsed.
...@@ -7,26 +7,27 @@ schema-version: 0 ...@@ -7,26 +7,27 @@ schema-version: 0
schema-namespace: ".maestro.core." schema-namespace: ".maestro.core."
# Values permitted in user-defined types used # Values permitted in user-defined types used
schema-type-values: #schema-type-values:
# FIXME: user-defined types currently broken
# values occuring in lifetime-strictness flag # values occuring in lifetime-strictness flag
- &lifetime-strictness-values enum('optional', 'required') # - &lifetime-strictness-values enum('optional', 'required')
# values occuring in lifetime-strictness flag # values occuring in lifetime-strictness flag
- &access-mode-values enum('rw', 'r') #- &access-mode-values enum('rw', 'r')
# user-defined types used in this schema # user-defined types used in this schema
schema-types: #schema-types:
- typename: lifetime-interval # - typename: lifetime-interval
typespec: map() # typespec: map()
documentation: CDO lifetime type # documentation: CDO lifetime type
- typename: lifetime-strictness # - typename: lifetime-strictness
typespec: *lifetime-strictness-values # typespec: *lifetime-strictness-values
documentation: CDO lifetime specifier interpretation # documentation: CDO lifetime specifier interpretation
- typename: access-mode # - typename: access-mode
typespec: *access-mode-values # typespec: *access-mode-values
documentation: CDO access mode # documentation: CDO access mode
# Individual attribute descriptions # Individual attribute descriptions
maestro-attributes: maestro-attributes:
...@@ -71,12 +72,12 @@ maestro-attributes: ...@@ -71,12 +72,12 @@ maestro-attributes:
documentation: Request/advise maestro storage management for the documentation: Request/advise maestro storage management for the
CDO (no RAW-PTR will be provided or can be obtained) CDO (no RAW-PTR will be provided or can be obtained)
- key: "cdo.access-mode" # - key: "cdo.access-mode"
type: access-mode # type: access-mode
required: False # required: False
default: *access-mode-values # default: *access-mode-values
documentation: Indicates how the CDO will be accessed by the user # documentation: Indicates how the CDO will be accessed by the user
(read-write, read-only, etc.). # (read-write, read-only, etc.).
- key: "cdo.transfer-asap" - key: "cdo.transfer-asap"
type: bool() type: bool()
...@@ -94,15 +95,15 @@ maestro-attributes: ...@@ -94,15 +95,15 @@ maestro-attributes:
performance optimizations. performance optimizations.
## Lifetime related ## Lifetime related
- key: "cdo.lifetime" # - key: "cdo.lifetime"
type: lifetime-interval # type: lifetime-interval
required: False # required: False
documentation: CDO lifetime specification. # documentation: CDO lifetime specification.
- key: "cdo.lifetime-strictness" # - key: "cdo.lifetime-strictness"
type: lifetime-strictness # type: lifetime-strictness
required: False # required: False
default: *lifetime-strictness-values # default: *lifetime-strictness-values
documentation: CDO lifetime specification. # documentation: CDO lifetime specification.
## SCOPE related ## SCOPE related
......
This diff is collapsed.
...@@ -32,7 +32,7 @@ struct mstro_symtab_entry_key { ...@@ -32,7 +32,7 @@ struct mstro_symtab_entry_key {
const void *permanent_address; /**< set to the address of constants const void *permanent_address; /**< set to the address of constants
* that get interned. NULL for 'not * that get interned. NULL for 'not
* permanent' */ * permanent' */
char fullname[0]; /**< the fully-qualified name; char fullname[]; /**< the fully-qualified name;
* auto-extended at mstro_intern * auto-extended at mstro_intern
* time */ * time */
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment