Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mgmt reorg -- submodule and build rules for sonic-mgmt-common #4765

Merged
merged 5 commits into from
Jun 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions rules/docker-sonic-mgmt-framework.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions rules/docker-telemetry.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
12 changes: 12 additions & 0 deletions rules/sonic-mgmt-common.dep
Original file line number Diff line number Diff line change
@@ -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 changes: 12 additions & 0 deletions rules/sonic-mgmt-common.mk
Original file line number Diff line number Diff line change
@@ -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 changes: 2 additions & 2 deletions rules/sonic-mgmt-framework.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions rules/telemetry.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 change: 1 addition & 0 deletions src/sonic-mgmt-common
Submodule sonic-mgmt-common added at 444aa9
2 changes: 1 addition & 1 deletion src/sonic-mgmt-framework
2 changes: 1 addition & 1 deletion src/sonic-telemetry