File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -731,6 +731,19 @@ def get_post_resource(res):
731731 return newres
732732
733733
734+ def get_patch_resource (res ):
735+ """
736+ Creates the payload for the PATCH resource admin request
737+ :param res: configuration resource
738+ :returns: resource patch
739+ """
740+
741+ if 'extents' in res .keys ():
742+ return {'extents' : res ['extents' ]}
743+ else :
744+ return ''
745+
746+
734747def get_admin (cfg : dict ) -> dict :
735748
736749 schema_dict = get_config_schema ()
@@ -907,7 +920,7 @@ def get_admin(cfg: dict) -> dict:
907920 'description' : 'Updates admin configuration resource' ,
908921 'content' : {
909922 'application/json' : {
910- 'example' : { 'extents' : res_eg [res_eg_key ][ 'extents' ]} ,
923+ 'example' : get_patch_resource ( res_eg [res_eg_key ]) ,
911924 'schema' : schema_dict ['properties' ]['resources' ]['patternProperties' ]['^.*$' ] # noqa
912925 }
913926 },
You can’t perform that action at this time.
0 commit comments