From 990840122db9488d6185b5eb9af6edd4f8df51c9 Mon Sep 17 00:00:00 2001 From: Mahesh Jethanandani Date: Tue, 12 Mar 2019 14:09:28 -0700 Subject: [PATCH] Fix for bug#225 --- example-data/nfv.xml | 4 ++-- src/yang/etsi-nfv-common.yang | 25 ++++++++++++++++++++++++- src/yang/etsi-nfv-vnf.yang | 10 ++++------ 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/example-data/nfv.xml b/example-data/nfv.xml index a956b2b..c1c1619 100644 --- a/example-data/nfv.xml +++ b/example-data/nfv.xml @@ -36,7 +36,7 @@ asa-vsd - root + root-storage 0 @@ -131,7 +131,7 @@ csr-vsd - root + root-storage 0 diff --git a/src/yang/etsi-nfv-common.yang b/src/yang/etsi-nfv-common.yang index 2f6a69a..b50297c 100644 --- a/src/yang/etsi-nfv-common.yang +++ b/src/yang/etsi-nfv-common.yang @@ -216,7 +216,30 @@ submodule etsi-nfv-common { reference "GS NFV IFA011: Section 7.1.6.10 Checksum information element."; } - + + identity storage-type { + description + "Base type of storage that identities can derive from."; + } + + identity root-storage { + base storage-type; + description + "Root type of storage."; + } + + identity swap-storage { + base storage-type; + description + "Swap type of storage."; + } + + identity ephemeral-storage { + base storage-type; + description + "Ephemeral type of storage."; + } + /* * Typedefs */ diff --git a/src/yang/etsi-nfv-vnf.yang b/src/yang/etsi-nfv-vnf.yang index 28e8160..ed971b9 100755 --- a/src/yang/etsi-nfv-vnf.yang +++ b/src/yang/etsi-nfv-vnf.yang @@ -733,12 +733,10 @@ submodule etsi-nfv-vnf { leaf type-of-storage { // Needed to be able to onboard images - type enumeration { - enum "root"; - enum "swap"; - enum "ephemeral"; - } - default "root"; + default "root-storage"; + type identityref { + base storage-type; + } description "Type of virtualised storage resource (e.g. volume, object)."; -- GitLab