Mgmt reorg -- submodule and build rules for sonic-mgmt-common (#4765)
- Why I did it New repo sonic-mgmt-common is introduced for the common translib related code. This commit adds build rules for this new repo. - How I did it Added sonic-mgmt-common submodule Added build rules for the new sonic-mgmt-common repo. It creates two deb packages -- sonic-mgmt-common_1.0.0_{arch}.deb and sonic-mgmt-common-codegen_1.0.0_{arch}.deb. Package cache is enabled. Added dependency on sonic-mgmt-common for mgmt-framework and telemetry debs and dockers. - How to verify it Full build and incremental builds Basic ACL and interface opreations through REST, KLISH CLI and gNMI - Description for the changelog Git submodule and build rules for the new sonic-mgmt-common repo.
This commit is contained in:
parent
c6dcd7d9a1
commit
0d809d0d59
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -82,3 +82,6 @@
|
||||
path = src/sonic-restapi
|
||||
url = https://github.com/Azure/sonic-restapi.git
|
||||
branch = master
|
||||
[submodule "src/sonic-mgmt-common"]
|
||||
path = src/sonic-mgmt-common
|
||||
url = https://github.com/Azure/sonic-mgmt-common.git
|
||||
|
@ -6,6 +6,7 @@ DOCKER_MGMT_FRAMEWORK_DBG = $(DOCKER_MGMT_FRAMEWORK_STEM)-$(DBG_IMAGE_MARK).gz
|
||||
|
||||
$(DOCKER_MGMT_FRAMEWORK)_PATH = $(DOCKERS_PATH)/$(DOCKER_MGMT_FRAMEWORK_STEM)
|
||||
|
||||
$(DOCKER_MGMT_FRAMEWORK)_DEPENDS += $(SONIC_MGMT_COMMON)
|
||||
$(DOCKER_MGMT_FRAMEWORK)_DEPENDS += $(REDIS_TOOLS) $(SONIC_MGMT_FRAMEWORK)
|
||||
$(DOCKER_MGMT_FRAMEWORK)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS)
|
||||
$(DOCKER_MGMT_FRAMEWORK)_DBG_DEPENDS += $(REDIS_TOOLS) $(SONIC_MGMT_FRAMEWORK_DBG)
|
||||
|
@ -6,6 +6,7 @@ DOCKER_TELEMETRY_DBG = $(DOCKER_TELEMETRY_STEM)-$(DBG_IMAGE_MARK).gz
|
||||
|
||||
$(DOCKER_TELEMETRY)_PATH = $(DOCKERS_PATH)/$(DOCKER_TELEMETRY_STEM)
|
||||
|
||||
$(DOCKER_TELEMETRY)_DEPENDS += $(SONIC_MGMT_COMMON)
|
||||
$(DOCKER_TELEMETRY)_DEPENDS += $(REDIS_TOOLS) $(SONIC_TELEMETRY)
|
||||
$(DOCKER_TELEMETRY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS)
|
||||
|
||||
|
12
rules/sonic-mgmt-common.dep
Normal file
12
rules/sonic-mgmt-common.dep
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
SPATH := $($(SONIC_MGMT_COMMON)_SRC_PATH)
|
||||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/sonic-mgmt-common.mk rules/sonic-mgmt-common.dep
|
||||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
||||
SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files))
|
||||
|
||||
$(SONIC_MGMT_COMMON)_CACHE_MODE := GIT_CONTENT_SHA
|
||||
$(SONIC_MGMT_COMMON)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
|
||||
$(SONIC_MGMT_COMMON)_DEP_FILES := $(DEP_FILES)
|
||||
$(SONIC_MGMT_COMMON)_SMDEP_FILES := $(SMDEP_FILES)
|
||||
$(SONIC_MGMT_COMMON)_SMDEP_PATHS := $(SPATH)
|
||||
|
12
rules/sonic-mgmt-common.mk
Normal file
12
rules/sonic-mgmt-common.mk
Normal file
@ -0,0 +1,12 @@
|
||||
# SONiC mgmt-common package
|
||||
|
||||
MGMT_COMMON_VERSION = 1.0.0
|
||||
SONIC_MGMT_COMMON = sonic-mgmt-common_$(MGMT_COMMON_VERSION)_$(CONFIGURED_ARCH).deb
|
||||
$(SONIC_MGMT_COMMON)_SRC_PATH = $(SRC_PATH)/sonic-mgmt-common
|
||||
$(SONIC_MGMT_COMMON)_DEPENDS = $(LIBYANG_DEV) $(LIBYANG)
|
||||
$(SONIC_MGMT_COMMON)_RDEPENDS = $(LIBYANG)
|
||||
SONIC_DPKG_DEBS += $(SONIC_MGMT_COMMON)
|
||||
|
||||
SONIC_MGMT_COMMON_CODEGEN = sonic-mgmt-common-codegen_$(MGMT_COMMON_VERSION)_$(CONFIGURED_ARCH).deb
|
||||
$(eval $(call add_derived_package,$(SONIC_MGMT_COMMON),$(SONIC_MGMT_COMMON_CODEGEN)))
|
||||
|
@ -4,8 +4,8 @@ ifeq ($(ENABLE_MGMT_FRAMEWORK), y)
|
||||
|
||||
SONIC_MGMT_FRAMEWORK = sonic-mgmt-framework_1.0-01_$(CONFIGURED_ARCH).deb
|
||||
$(SONIC_MGMT_FRAMEWORK)_SRC_PATH = $(SRC_PATH)/sonic-mgmt-framework
|
||||
$(SONIC_MGMT_FRAMEWORK)_DEPENDS = $(LIBYANG_DEV) $(LIBYANG)
|
||||
$(SONIC_MGMT_FRAMEWORK)_RDEPENDS = $(LIBYANG)
|
||||
$(SONIC_MGMT_FRAMEWORK)_DEPENDS = $(SONIC_MGMT_COMMON) $(SONIC_MGMT_COMMON_CODEGEN)
|
||||
$(SONIC_MGMT_FRAMEWORK)_RDEPENDS =
|
||||
SONIC_DPKG_DEBS += $(SONIC_MGMT_FRAMEWORK)
|
||||
|
||||
SONIC_MGMT_FRAMEWORK_DBG = sonic-mgmt-framework-dbg_1.0-01_$(CONFIGURED_ARCH).deb
|
||||
|
@ -2,6 +2,6 @@
|
||||
|
||||
SONIC_TELEMETRY = sonic-telemetry_0.1_$(CONFIGURED_ARCH).deb
|
||||
$(SONIC_TELEMETRY)_SRC_PATH = $(SRC_PATH)/sonic-telemetry
|
||||
$(SONIC_TELEMETRY)_DEPENDS = $(LIBYANG_DEV) $(LIBYANG)
|
||||
$(SONIC_TELEMETRY)_RDEPENDS = $(LIBYANG)
|
||||
$(SONIC_TELEMETRY)_DEPENDS = $(SONIC_MGMT_COMMON) $(SONIC_MGMT_COMMON_CODEGEN)
|
||||
$(SONIC_TELEMETRY)_RDEPENDS =
|
||||
SONIC_DPKG_DEBS += $(SONIC_TELEMETRY)
|
||||
|
1
src/sonic-mgmt-common
Submodule
1
src/sonic-mgmt-common
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 444aa9ac1f57b9d92581092a9ea807dc57cb712d
|
@ -1 +1 @@
|
||||
Subproject commit f789b295f4c775ac303b4370d9380ebba8ac6272
|
||||
Subproject commit 3c3384cec8d15e493e6889bff6361a5a280a8811
|
@ -1 +1 @@
|
||||
Subproject commit aaa9188fda4b6f36dd5da00cdb240933fedae5ce
|
||||
Subproject commit fa8d49878c7c37e93f7aa7c982b67f0aea8ff440
|
Loading…
Reference in New Issue
Block a user