Hi
I have a model with parent and child objects, and the same is reflected in sonic-<model>.yang using leafref (from child to parent's key)
With following steps I get an error -
1. Configure parent object
2. Configure child object
3. Delete parent object
Expectation with step 3 is delete both parent and child objects, but I am getting error like
Reason: Internal Server Error
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/yang-data+json', 'Date': 'Wed, 04 Jan 2023 11:43:39 GMT', 'Content-Length': '383'})
HTTP response body: {"ietf-restconf:errors":{"error":[{"error-type":"application","error-tag":"invalid-value","error-app-tag":"instance-in-use","error-message":"Validation failed for Delete operation, given instance is in use","error-info":{"cvl-error":{"error-code":1002,"description":"Config Validation Semantic Error","message":"Validation failed for Delete operation, given instance is in use"}}}]}}
Is there any way to handle this ?