From bccc1f25ac7a64446d1f283397b5598c5209af95 Mon Sep 17 00:00:00 2001 From: velandy Date: Sat, 17 Dec 2016 04:29:13 +0000 Subject: [PATCH] Bug 133 - Changed vnfd-connection-point-ref to leafref Signed-off-by: velandy --- models/plugins/yang/nsd.yang | 50 ++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/models/plugins/yang/nsd.yang b/models/plugins/yang/nsd.yang index ac0987c9..cc6b7ed1 100644 --- a/models/plugins/yang/nsd.yang +++ b/models/plugins/yang/nsd.yang @@ -292,34 +292,28 @@ module nsd } } - leaf vnfd-id-ref { - description - "A reference to a vnfd. This is a - leafref to path: - ../../nsd:constituent-vnfd - + [nsd:id = current()/../nsd:id-ref] - + /nsd:vnfd-id-ref - NOTE: An issue with confd is preventing the - use of xpath. Seems to be an issue with leafref - to leafref, whose target is in a different module. - Once that is resovled this will switched to use - leafref"; - type string; - } - - leaf vnfd-connection-point-ref { - description - "A reference to a connection point name - in a vnfd. This is a leafref to path: - /vnfd:vnfd-catalog/vnfd:vnfd - + [vnfd:id = current()/../nsd:vnfd-id-ref] - + /vnfd:connection-point/vnfd:name - NOTE: An issue with confd is preventing the - use of xpath. Seems to be an issue with leafref - to leafref, whose target is in a different module. - Once that is resovled this will switched to use - leafref"; - type string; + leaf vnfd-id-ref { + description + "A reference to a vnfd. This is a + leafref to path: + ../../nsd:constituent-vnfd + + [nsd:id = current()/../nsd:id-ref] + + /nsd:vnfd-id-ref + NOTE: An issue with confd is preventing the + use of xpath. Seems to be an issue with leafref + to leafref, whose target is in a different module. + Once that is resovled this will switched to use + leafref"; + type string; + } + + leaf vnfd-connection-point-ref { + description "A reference to a connection point name"; + type leafref { + path "/vnfd:vnfd-catalog/vnfd:vnfd" + + "[vnfd:id = current()/../vnfd-id-ref]/" + + "vnfd:connection-point/vnfd:name"; + } } } -- 2.25.1