From: garciadeblas Date: Thu, 10 Dec 2020 17:32:36 +0000 (+0000) Subject: Revisited KDU augment to follow previous structure in old IM X-Git-Tag: v9.0.0 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=f839f7b435cab3ef97b2c4583feb0a96419632ed;p=osm%2FIM.git Revisited KDU augment to follow previous structure in old IM Change-Id: I37d5d4de757e25d64b446deb9e84630b42dbd8eb Signed-off-by: garciadeblas --- diff --git a/models/augments/configuration.yang b/models/augments/configuration.yang index 94a226d..8120c5a 100644 --- a/models/augments/configuration.yang +++ b/models/augments/configuration.yang @@ -28,9 +28,6 @@ module configuration { prefix day1-2; } - import kdu { - prefix kdu; - } grouping extended-vnf-configuration { leaf vnf-configuration-id { description @@ -51,42 +48,11 @@ module configuration { } } - grouping extended-kdu-configuration { - list kdu-profile { - key "name"; - - leaf name { - description - "Reference to the KDU"; - type leafref { - path "/vnfd:vnfd/kdu:kdu/kdu:name"; - } - } - - leaf kdu-configuration-id { - description - "Reference to the KDU configuration to use in this DF"; - type leafref { - path "/vnfd:vnfd/kdu:kdu-configuration/kdu:id"; - } - } - - leaf kdu-model-id { - description - "Reference to the KDU model to use in this DF"; - type leafref { - path "/vnfd:vnfd/kdu:kdu-model/kdu:id"; - } - } - } - } - augment "/vnfd:vnfd/vnfd:df" { uses extended-vnf-configuration; - uses extended-kdu-configuration; } augment "/vnfd:vnfd/vnfd:df/vnfd:vdu-profile" { uses extended-vdu-configuration; } -} \ No newline at end of file +} diff --git a/models/augments/kdu.yang b/models/augments/kdu.yang index 9e0021f..2800082 100644 --- a/models/augments/kdu.yang +++ b/models/augments/kdu.yang @@ -41,13 +41,7 @@ module kdu { } grouping extended-kdu-configuration { - list kdu-configuration { - key "id"; - leaf id { - description - "Internal identifier for the KDU configuration"; - type string; - } + container kdu-configuration { uses common:vnfc-configuration; uses common:vdu-config-access; @@ -64,47 +58,6 @@ module kdu { } } - grouping extended-kdu-model { - list kdu-model { - key "id"; - - leaf id { - description - "Internal identifier for the KDU model"; - type string; - } - - leaf kdu-model-type { - description - "Indicates the KDU model, either as a helm-chart or as a juju-bundle."; - - type enumeration { - enum helm-chart; - enum juju-bundle; - } - } - - leaf kdu-model-helm-version { - description - "Helm version to use for this helm-chart, v3 by default."; - - type enumeration { - enum v2; - enum v3; - } - default v3; - } - - leaf kdu-model-locator { - description - "Indicates the KDU model location, either as a path to a folder in the - package or as a URL where to fetch the model."; - - type string; - } - } - } - grouping extended-kdu { list kdu { description @@ -122,6 +75,50 @@ module kdu { "Description of the KDU."; type string; } + + choice kdu-model { + description + "Indicates the KDU model, either as a helm-chart or as a juju-bundle."; + + case helm-chart { + leaf helm-chart { + description + "Helm chart that models the KDU, in any of the following ways: + - / + - + - + - + "; + type string; + } + + leaf helm-version { + description + "Helm version to use for this helm-chart, v3 by default"; + type enumeration { + enum v2; + enum v3; + } + default v3; + } + } + + case juju-bundle { + leaf juju-bundle { + description + "Juju bundle that models the KDU, in any of the following ways: + - / + - + - + - + "; + type string; + } + } + } + + uses extended-kdu-configuration; + } container k8s-cluster { @@ -166,8 +163,6 @@ module kdu { augment "/vnfd:vnfd" { uses extended-kdu; - uses extended-kdu-configuration; - uses extended-kdu-model; } augment "/vnfd:vnfd/vnfd:ext-cpd/vnfd:cp-connection" { diff --git a/tests/examples/magma_knf_sol006.yaml b/tests/examples/magma_knf_sol006.yaml index 58bdb96..228e3a4 100644 --- a/tests/examples/magma_knf_sol006.yaml +++ b/tests/examples/magma_knf_sol006.yaml @@ -31,14 +31,5 @@ vnfd: kdu: - name: orc8r + helm-chart: magma/orc8r - kdu-model: - - id: orc8r-model - kdu-model-type: helm-chart - kdu-model-locator: magma/orc8r - - df: - - id: kdu-df - kdu-profile: - - name: orc8r - kdu-model-id: orc8r-model \ No newline at end of file