Skip to content

Commit

Permalink
confd: bump and add a migrate script for infix-routing
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiaswal committed Sep 20, 2024
1 parent 2a57132 commit 1ed37ed
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package/confd/confd.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
################################################################################

CONFD_VERSION = 1.0
CONFD_VERSION = 1.1
CONFD_SITE_METHOD = local
CONFD_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/confd
CONFD_LICENSE = BSD-3-Clause
Expand Down
3 changes: 2 additions & 1 deletion src/confd/configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_PREREQ(2.61)
# confd version is same as system YANG model version, step on breaking changes
AC_INIT([confd], [1.0], [https://github.com/kernelkit/infix/issues])
AC_INIT([confd], [1.1], [https://github.com/kernelkit/infix/issues])
AM_INIT_AUTOMAKE(1.11 foreign subdir-objects)
AM_SILENT_RULES(yes)

Expand All @@ -14,6 +14,7 @@ AC_CONFIG_FILES([
share/test.d/Makefile
share/migrate/Makefile
share/migrate/1.0/Makefile
share/migrate/1.1/Makefile
src/Makefile
yang/Makefile
])
Expand Down
7 changes: 7 additions & 0 deletions src/confd/share/migrate/1.1/10-infix-routing-type.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
# migrate ietf-routing-type => infix-routing-type
file=$1
temp=$1.tmp

jq '(.["ietf-routing:routing"]."control-plane-protocols"."control-plane-protocol"[] | select(.type == "ietf-ospf:ospfv2").type) |= "infix-routing:ospfv2"' "$file" > "$temp"
jq '(.["ietf-routing:routing"]."control-plane-protocols"."control-plane-protocol"[] | select(.type == "static").type) |= "infix-routing:static"' "$temp" > "$file"
2 changes: 2 additions & 0 deletions src/confd/share/migrate/1.1/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
migratedir = $(pkgdatadir)/migrate/1.1
dist_migrate_DATA = 10-infix-routing-type.sh
2 changes: 1 addition & 1 deletion src/confd/share/migrate/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
SUBDIRS = 1.0
SUBDIRS = 1.0 1.1
migratedir = $(pkgdatadir)/migrate

0 comments on commit 1ed37ed

Please sign in to comment.