Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
devops
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osm
devops
Commits
8bc90dcf
Commit
8bc90dcf
authored
6 years ago
by
calvinosanch
Browse files
Options
Downloads
Patches
Plain Diff
Adding validations to upgrade and validate scripts(VDU-ID and OM-MGT)
Signed-off-by:
gcalvino
<
guillermo.calvinosanchez@altran.com
>
parent
eb0de08b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
descriptor-packages/tools/upgrade_descriptor_version.py
+15
-0
15 additions, 0 deletions
descriptor-packages/tools/upgrade_descriptor_version.py
descriptor-packages/tools/validate_descriptor.py
+15
-0
15 additions, 0 deletions
descriptor-packages/tools/validate_descriptor.py
with
30 additions
and
0 deletions
descriptor-packages/tools/upgrade_descriptor_version.py
+
15
−
0
View file @
8bc90dcf
...
...
@@ -135,8 +135,23 @@ if __name__=="__main__":
vnfd_list
=
vnfd_descriptor
[
"
vnfd
"
]
mgmt_iface
=
False
for
vnfd
in
vnfd_list
:
vdu_list
=
vnfd
[
"
vdu
"
]
for
vdu
in
vdu_list
:
interface_list
=
[]
external_interface_list
=
vdu
.
pop
(
"
external-interface
"
,
())
for
external_interface
in
external_interface_list
:
if
external_interface
.
get
(
"
virtual-interface
"
,
{}).
get
(
"
type
"
)
==
"
OM-MGMT
"
:
raise
KeyError
(
"
Wrong
'
Virtual-interface type
'
: Deprecated
'
OM-MGMT
'
value. Please, use
'
VIRTIO
'
instead
"
)
interface_list
=
vdu
.
pop
(
"
interface
"
,
())
for
interface
in
interface_list
:
if
interface
.
get
(
"
virtual-interface
"
,
{}).
get
(
"
type
"
)
==
"
OM-MGMT
"
:
raise
KeyError
(
"
Wrong
'
Virtual-interface type
'
: Deprecated
'
OM-MGMT
'
value. Please, use
'
VIRTIO
'
instead
"
)
if
vnfd
.
get
(
"
mgmt-interface
"
):
mgmt_iface
=
True
if
vnfd
[
"
mgmt-interface
"
].
get
(
"
vdu-id
"
):
raise
KeyError
(
"'
mgmt-iface
'
: Deprecated
'
vdu-id
'
field. Please, use
'
cp
'
field instead
"
)
if
not
mgmt_iface
:
raise
KeyError
(
"'
mgmt-iface
'
is a mandatory field and it is not defined
"
)
myvnfd
=
vnfd_catalog
.
vnfd
()
...
...
This diff is collapsed.
Click to expand it.
descriptor-packages/tools/validate_descriptor.py
+
15
−
0
View file @
8bc90dcf
...
...
@@ -119,8 +119,23 @@ if __name__=="__main__":
vnfd_list
=
vnfd_descriptor
[
"
vnfd
"
]
mgmt_iface
=
False
for
vnfd
in
vnfd_list
:
vdu_list
=
vnfd
[
"
vdu
"
]
for
vdu
in
vdu_list
:
interface_list
=
[]
external_interface_list
=
vdu
.
pop
(
"
external-interface
"
,
())
for
external_interface
in
external_interface_list
:
if
external_interface
.
get
(
"
virtual-interface
"
,
{}).
get
(
"
type
"
)
==
"
OM-MGMT
"
:
raise
KeyError
(
"
Wrong
'
Virtual-interface type
'
: Deprecated
'
OM-MGMT
'
value. Please, use
'
VIRTIO
'
instead
"
)
interface_list
=
vdu
.
pop
(
"
interface
"
,
())
for
interface
in
interface_list
:
if
interface
.
get
(
"
virtual-interface
"
,
{}).
get
(
"
type
"
)
==
"
OM-MGMT
"
:
raise
KeyError
(
"
Wrong
'
Virtual-interface type
'
: Deprecated
'
OM-MGMT
'
value. Please, use
'
VIRTIO
'
instead
"
)
if
vnfd
.
get
(
"
mgmt-interface
"
):
mgmt_iface
=
True
if
vnfd
[
"
mgmt-interface
"
].
get
(
"
vdu-id
"
):
raise
KeyError
(
"'
mgmt-iface
'
: Deprecated
'
vdu-id
'
field. Please, use
'
cp
'
field instead
"
)
if
not
mgmt_iface
:
raise
KeyError
(
"'
mgmt-iface
'
is a mandatory field and it is not defined
"
)
myvnfd
=
vnfd_catalog
.
vnfd
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment