Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iopsys
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Feed
iopsys
Commits
d51a6fe3
Commit
d51a6fe3
authored
6 months ago
by
Vivek Dutta
Browse files
Options
Downloads
Patches
Plain Diff
bbfdm: Support to handler vendor extensions
parent
05b0f91a
Branches
Branches containing commit
No related tags found
1 merge request
!1425
Vendor specific datamodel extensions
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bbfdm/Makefile
+1
-1
1 addition, 1 deletion
bbfdm/Makefile
bbfdm/tools/bbfdm.sh
+20
-2
20 additions, 2 deletions
bbfdm/tools/bbfdm.sh
with
21 additions
and
3 deletions
bbfdm/Makefile
+
1
−
1
View file @
d51a6fe3
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
include
$(TOPDIR)/rules.mk
include
$(TOPDIR)/rules.mk
PKG_NAME
:=
bbfdm
PKG_NAME
:=
bbfdm
PKG_VERSION
:=
1.14.
1
PKG_VERSION
:=
1.14.
2
USE_LOCAL
:=
0
USE_LOCAL
:=
0
ifneq
($(USE_LOCAL),1)
ifneq
($(USE_LOCAL),1)
...
...
This diff is collapsed.
Click to expand it.
bbfdm/tools/bbfdm.sh
+
20
−
2
View file @
d51a6fe3
...
@@ -9,10 +9,11 @@ SCRIPT=0
...
@@ -9,10 +9,11 @@ SCRIPT=0
DIAG
=
0
DIAG
=
0
PLUGIN
=
0
PLUGIN
=
0
DEST
=
""
DEST
=
""
VENDOR_EXTN
=
""
TOOLS
=
"
$(
cd
--
"
$(
dirname
"
$0
"
)
"
>
/dev/null 2>&1
;
pwd
-P
)
"
TOOLS
=
"
$(
cd
--
"
$(
dirname
"
$0
"
)
"
>
/dev/null 2>&1
;
pwd
-P
)
"
SRC
=
""
SRC
=
""
while
getopts
":mpsdt
u
:"
opt
;
do
while
getopts
":mpsdt
v
:"
opt
;
do
case
${
opt
}
in
case
${
opt
}
in
m
)
m
)
MICRO_SERVICE
=
1
MICRO_SERVICE
=
1
...
@@ -29,6 +30,9 @@ while getopts ":mpsdtu:" opt; do
...
@@ -29,6 +30,9 @@ while getopts ":mpsdtu:" opt; do
t
)
t
)
INPUT_FILE
=
1
INPUT_FILE
=
1
;;
;;
v
)
VENDOR_EXTN
=
${
OPTARG
}
;;
?
)
?
)
echo
"Invalid option:
${
OPTARG
}
"
echo
"Invalid option:
${
OPTARG
}
"
exit
1
exit
1
...
@@ -88,6 +92,10 @@ bbfdm_install_dm()
...
@@ -88,6 +92,10 @@ bbfdm_install_dm()
minfile
=
$(
mktemp
)
minfile
=
$(
mktemp
)
jq
-c
'del(..|.description?)'
${
src
}
>
${
minfile
}
jq
-c
'del(..|.description?)'
${
src
}
>
${
minfile
}
if
[
-n
"
${
VENDOR_EXTN
}
"
]
;
then
sed
-i
"s/{BBF_VENDOR_PREFIX}/
${
VENDOR_EXTN
}
/g"
${
minfile
}
fi
src
=
${
minfile
}
src
=
${
minfile
}
if
dpkg
-s
python3-jsonschema
>
/dev/null 2>&1
;
then
if
dpkg
-s
python3-jsonschema
>
/dev/null 2>&1
;
then
echo
"Verifying bbfdm Datamodel JSON file"
echo
"Verifying bbfdm Datamodel JSON file"
...
@@ -125,6 +133,7 @@ fi
...
@@ -125,6 +133,7 @@ fi
if
[
"
${
INPUT_FILE
}
"
-eq
"1"
]
;
then
if
[
"
${
INPUT_FILE
}
"
-eq
"1"
]
;
then
tempfile
=
""
if
[
!
-f
"
${
SRC
}
"
]
;
then
if
[
!
-f
"
${
SRC
}
"
]
;
then
echo
"# Datamodel Input file
${
SRC
}
not available"
echo
"# Datamodel Input file
${
SRC
}
not available"
exit
1
exit
1
...
@@ -140,9 +149,18 @@ if [ "${INPUT_FILE}" -eq "1" ]; then
...
@@ -140,9 +149,18 @@ if [ "${INPUT_FILE}" -eq "1" ]; then
exit
1
exit
1
fi
fi
tempfile
=
$(
mktemp
)
cp
${
SRC
}
${
tempfile
}
if
[
-n
"
${
VENDOR_EXTN
}
"
]
;
then
sed
-i
"s/{BBF_VENDOR_PREFIX}/
${
VENDOR_EXTN
}
/g"
${
tempfile
}
fi
install_dir
${
DEST
}
/etc/bbfdm/services
install_dir
${
DEST
}
/etc/bbfdm/services
install_data
${
SRC
}
${
DEST
}
/etc/bbfdm/services/
${
DATA
}
.json
install_data
${
tempfile
}
${
DEST
}
/etc/bbfdm/services/
${
DATA
}
.json
if
[
-f
"
${
tempfile
}
"
]
;
then
rm
${
tempfile
}
fi
exit
0
exit
0
fi
fi
...
...
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