Skip to content

Commit ec214ed

Browse files
committed
Adding support for archiver schema and label fields
1 parent 57ab0d5 commit ec214ed

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

psconfig/perfsonar-psconfig/doc/psconfig-schema.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,9 @@
356356
"data": { "$ref": "#/pSConfig/AnyJSON" },
357357
"transform": { "$ref": "#/pSConfig/ArchiveJQTransformSpecification" },
358358
"ttl": { "$ref": "#/pSConfig/Duration" },
359-
"_meta": { "$ref": "#/pSConfig/AnyJSON" }
359+
"_meta": { "$ref": "#/pSConfig/AnyJSON" },
360+
"label": { "type": "string" },
361+
"schema": { "$ref": "#/pSConfig/Cardinal" }
360362
},
361363
"additionalProperties": false,
362364
"required": [ "archiver", "data"]

psconfig/perfsonar-psconfig/psconfig/client/psconfig/archive.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,17 @@ def ttl(self, val=None):
3232
'''Gets/sets ttl'''
3333

3434
return self._field_duration('ttl', val)
35-
35+
36+
def label(self, val=None):
37+
'''Gets/sets label'''
38+
39+
return self._field('label', val)
40+
41+
def schema(self, val=None):
42+
'''Gets/sets schema'''
43+
44+
return self._field_cardinal('schema', val)
45+
3646
def validate(self):
3747
'''Validates archive against JSON schema. Returns list of errors. Will be empty list if no
3848
errors.'''

psconfig/perfsonar-psconfig/psconfig/client/psconfig/schema.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,9 @@ def psconfig_json_schema(self):
364364
"data": { "$ref": "#/pSConfig/AnyJSON" },
365365
"transform": { "$ref": "#/pSConfig/ArchiveJQTransformSpecification" },
366366
"ttl": { "$ref": "#/pSConfig/Duration" },
367-
"_meta": { "$ref": "#/pSConfig/AnyJSON" }
367+
"_meta": { "$ref": "#/pSConfig/AnyJSON" },
368+
"label": { "type": "string" },
369+
"schema": { "$ref": "#/pSConfig/Cardinal" }
368370
},
369371
"additionalProperties": False,
370372
"required": [ "archiver", "data"]

0 commit comments

Comments
 (0)