From 97ffbddee07b96e5778b93d74b73244b617cccc0 Mon Sep 17 00:00:00 2001 From: Prabhu Sreenivasan Date: Tue, 17 Sep 2019 05:29:50 -0700 Subject: [PATCH 1/9] fix license header --- Makefile | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index d2f9b1fe07..d7b93967ea 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,21 @@ -####################################################################### -# -# Copyright 2019 Broadcom. All rights reserved. -# The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -# -####################################################################### +################################################################################ +# # +# Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or # +# its subsidiaries. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +################################################################################ .PHONY: all clean cleanall codegen rest-server rest-clean yamlGen cli From e1721a3045b7575570d6488f5188a168078e2758 Mon Sep 17 00:00:00 2001 From: Sachin Holla Date: Tue, 17 Sep 2019 06:18:13 -0700 Subject: [PATCH 2/9] Updated license statement for REST server sources --- models/Makefile | 24 ++++++++++++++----- models/yang/Makefile | 24 ++++++++++++++----- src/rest/Makefile | 24 ++++++++++++++----- src/rest/main/main.go | 24 ++++++++++++++----- src/rest/main/main_test.go | 19 +++++++++++++++ src/rest/server/context.go | 24 ++++++++++++++----- src/rest/server/context_test.go | 24 ++++++++++++++----- src/rest/server/error.go | 24 ++++++++++++++----- src/rest/server/error_test.go | 24 ++++++++++++++----- src/rest/server/handler.go | 24 ++++++++++++++----- src/rest/server/handler_test.go | 24 ++++++++++++++----- src/rest/server/pamAuth.go | 19 +++++++++++++++ src/rest/server/pamAuth_test.go | 23 ++++++++++++++---- src/rest/server/req_validate.go | 24 ++++++++++++++----- src/rest/server/router.go | 24 ++++++++++++++----- .../go-server/src/swagger/routes.go | 23 ++++++++++++++---- 16 files changed, 290 insertions(+), 82 deletions(-) diff --git a/models/Makefile b/models/Makefile index fa432ca938..8f542e905d 100644 --- a/models/Makefile +++ b/models/Makefile @@ -1,9 +1,21 @@ -####################################################################### -# -# Copyright 2019 Broadcom. All rights reserved. -# The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -# -####################################################################### +################################################################################ +# # +# Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or # +# its subsidiaries. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +################################################################################ TOPDIR := .. ABS_TOPDIR := $(abspath $(TOPDIR)) diff --git a/models/yang/Makefile b/models/yang/Makefile index 721feecb21..228fa75751 100644 --- a/models/yang/Makefile +++ b/models/yang/Makefile @@ -1,9 +1,21 @@ -####################################################################### -# -# Copyright 2019 Broadcom. All rights reserved. -# The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -# -####################################################################### +################################################################################ +# # +# Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or # +# its subsidiaries. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +################################################################################ TOPDIR := ../.. BUILD_DIR := $(TOPDIR)/build diff --git a/src/rest/Makefile b/src/rest/Makefile index 1eb352a88d..9f1e4c6ff1 100644 --- a/src/rest/Makefile +++ b/src/rest/Makefile @@ -1,9 +1,21 @@ -####################################################################### -# -# Copyright 2019 Broadcom. All rights reserved. -# The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -# -####################################################################### +################################################################################ +# # +# Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or # +# its subsidiaries. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +################################################################################ TOPDIR ?= ../.. ABS_TOPDIR ?= $(abspath $(TOPDIR)) diff --git a/src/rest/main/main.go b/src/rest/main/main.go index 1c69290d38..e44056c733 100644 --- a/src/rest/main/main.go +++ b/src/rest/main/main.go @@ -1,9 +1,21 @@ -/////////////////////////////////////////////////////////////////////// -// -// Copyright 2019 Broadcom. All rights reserved. -// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -// -/////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// package main diff --git a/src/rest/main/main_test.go b/src/rest/main/main_test.go index 2ab6a40702..50ee1010da 100644 --- a/src/rest/main/main_test.go +++ b/src/rest/main/main_test.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package main import ( diff --git a/src/rest/server/context.go b/src/rest/server/context.go index 2a7b4eb292..883679e343 100644 --- a/src/rest/server/context.go +++ b/src/rest/server/context.go @@ -1,9 +1,21 @@ -/////////////////////////////////////////////////////////////////////// -// -// Copyright 2019 Broadcom. All rights reserved. -// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -// -/////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// package server diff --git a/src/rest/server/context_test.go b/src/rest/server/context_test.go index d4635e9668..1df7fc3857 100644 --- a/src/rest/server/context_test.go +++ b/src/rest/server/context_test.go @@ -1,9 +1,21 @@ -/////////////////////////////////////////////////////////////////////// -// -// Copyright 2019 Broadcom. All rights reserved. -// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -// -/////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// package server diff --git a/src/rest/server/error.go b/src/rest/server/error.go index 3b05140975..0335e70eac 100644 --- a/src/rest/server/error.go +++ b/src/rest/server/error.go @@ -1,9 +1,21 @@ -/////////////////////////////////////////////////////////////////////// -// -// Copyright 2019 Broadcom. All rights reserved. -// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -// -/////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// package server diff --git a/src/rest/server/error_test.go b/src/rest/server/error_test.go index 9ae5857dc8..7dfdfce3df 100644 --- a/src/rest/server/error_test.go +++ b/src/rest/server/error_test.go @@ -1,9 +1,21 @@ -/////////////////////////////////////////////////////////////////////// -// -// Copyright 2019 Broadcom. All rights reserved. -// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -// -/////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// package server diff --git a/src/rest/server/handler.go b/src/rest/server/handler.go index 7b8c1eb036..5596c310f9 100644 --- a/src/rest/server/handler.go +++ b/src/rest/server/handler.go @@ -1,9 +1,21 @@ -/////////////////////////////////////////////////////////////////////// -// -// Copyright 2019 Broadcom. All rights reserved. -// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -// -/////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// package server diff --git a/src/rest/server/handler_test.go b/src/rest/server/handler_test.go index eac69616c4..16e1ca21f5 100644 --- a/src/rest/server/handler_test.go +++ b/src/rest/server/handler_test.go @@ -1,9 +1,21 @@ -/////////////////////////////////////////////////////////////////////// -// -// Copyright 2019 Broadcom. All rights reserved. -// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -// -/////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// package server diff --git a/src/rest/server/pamAuth.go b/src/rest/server/pamAuth.go index d726d35229..4ad9f0180e 100644 --- a/src/rest/server/pamAuth.go +++ b/src/rest/server/pamAuth.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package server import ( diff --git a/src/rest/server/pamAuth_test.go b/src/rest/server/pamAuth_test.go index 3726d895ce..d3015ea09d 100644 --- a/src/rest/server/pamAuth_test.go +++ b/src/rest/server/pamAuth_test.go @@ -1,8 +1,21 @@ -/////////////////////////////////////////////////////////////////////// -// -// Copyright 2019 Broadcom. All rights reserved. -// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -// +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// // // Test cases for REST Server PAM Authentication module. // diff --git a/src/rest/server/req_validate.go b/src/rest/server/req_validate.go index d5a394f867..4571d8a100 100644 --- a/src/rest/server/req_validate.go +++ b/src/rest/server/req_validate.go @@ -1,9 +1,21 @@ -/////////////////////////////////////////////////////////////////////// -// -// Copyright 2019 Broadcom. All rights reserved. -// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -// -/////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// package server diff --git a/src/rest/server/router.go b/src/rest/server/router.go index 6442213965..aa01d193e5 100644 --- a/src/rest/server/router.go +++ b/src/rest/server/router.go @@ -1,9 +1,21 @@ -/////////////////////////////////////////////////////////////////////// -// -// Copyright 2019 Broadcom. All rights reserved. -// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -// -/////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// package server diff --git a/tools/swagger_codegen/go-server/src/swagger/routes.go b/tools/swagger_codegen/go-server/src/swagger/routes.go index f21baa80f2..ce305b72aa 100644 --- a/tools/swagger_codegen/go-server/src/swagger/routes.go +++ b/tools/swagger_codegen/go-server/src/swagger/routes.go @@ -1,8 +1,21 @@ -/////////////////////////////////////////////////// -// -// Copyright 2019 Broadcom Inc. -// -/////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// package swagger From 6f63b84d020a54a9acfbf2b71bcabb5f49a2cd27 Mon Sep 17 00:00:00 2001 From: Partha Dutta Date: Tue, 17 Sep 2019 19:40:36 +0530 Subject: [PATCH 3/9] Update license header --- src/cvl/Makefile | 19 +++++++++++++++++++ src/cvl/cvl.go | 19 +++++++++++++++++++ src/cvl/cvl_api.go | 19 +++++++++++++++++++ src/cvl/cvl_luascript.go | 19 +++++++++++++++++++ src/cvl/cvl_test.go | 19 +++++++++++++++++++ src/cvl/internal/util/util.go | 19 +++++++++++++++++++ src/cvl/internal/yparser/yparser.go | 19 +++++++++++++++++++ src/cvl/jsondata_test.go | 19 +++++++++++++++++++ src/cvl/schema/Makefile | 19 +++++++++++++++++++ src/cvl/tests/Makefile | 19 +++++++++++++++++++ src/cvl/tests/cfg_validator.go | 19 +++++++++++++++++++ src/cvl/tests/cv_acl.go | 19 +++++++++++++++++++ src/cvl/tests/cv_edit_op.go | 19 +++++++++++++++++++ src/cvl/tests/cv_vlan.go | 19 +++++++++++++++++++ 14 files changed, 266 insertions(+) diff --git a/src/cvl/Makefile b/src/cvl/Makefile index 4f85259fc4..658ca0cf06 100644 --- a/src/cvl/Makefile +++ b/src/cvl/Makefile @@ -1,3 +1,22 @@ +################################################################################ +# # +# Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or # +# its subsidiaries. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +################################################################################ + all: precheck deps schema tests GO?=/usr/local/go/bin/go SRC_FILES=$(shell find . -name '*.go' | grep -v '_test.go' | grep -v '/tests/') diff --git a/src/cvl/cvl.go b/src/cvl/cvl.go index f90486ecd9..7701372c7f 100644 --- a/src/cvl/cvl.go +++ b/src/cvl/cvl.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package cvl import ( "fmt" diff --git a/src/cvl/cvl_api.go b/src/cvl/cvl_api.go index 26bc6ea7f7..83b6842519 100644 --- a/src/cvl/cvl_api.go +++ b/src/cvl/cvl_api.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package cvl import ( diff --git a/src/cvl/cvl_luascript.go b/src/cvl/cvl_luascript.go index ac94c04db5..fd4c863ad1 100644 --- a/src/cvl/cvl_luascript.go +++ b/src/cvl/cvl_luascript.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package cvl import ( "github.com/go-redis/redis" diff --git a/src/cvl/cvl_test.go b/src/cvl/cvl_test.go index 74d51df3d0..3f5b0b3904 100644 --- a/src/cvl/cvl_test.go +++ b/src/cvl/cvl_test.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package cvl_test import ( diff --git a/src/cvl/internal/util/util.go b/src/cvl/internal/util/util.go index b57f8f1141..7404500d04 100644 --- a/src/cvl/internal/util/util.go +++ b/src/cvl/internal/util/util.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package util import ( diff --git a/src/cvl/internal/yparser/yparser.go b/src/cvl/internal/yparser/yparser.go index d08f66c702..2bc208fedf 100644 --- a/src/cvl/internal/yparser/yparser.go +++ b/src/cvl/internal/yparser/yparser.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package yparser /* Yang parser using libyang library */ diff --git a/src/cvl/jsondata_test.go b/src/cvl/jsondata_test.go index 65adaa8200..592ef71268 100644 --- a/src/cvl/jsondata_test.go +++ b/src/cvl/jsondata_test.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package cvl_test var json_edit_config_create_acl_table_dependent_data = []string{`{ diff --git a/src/cvl/schema/Makefile b/src/cvl/schema/Makefile index 1408bb1f58..8cd6016f0b 100644 --- a/src/cvl/schema/Makefile +++ b/src/cvl/schema/Makefile @@ -1,3 +1,22 @@ +################################################################################ +# # +# Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or # +# its subsidiaries. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +################################################################################ + src_files=$(wildcard *.yang) out=$(patsubst %.yang, %.yin, $(src_files)) out_ext=$(patsubst %.yang, %.tree, $(src_files)) diff --git a/src/cvl/tests/Makefile b/src/cvl/tests/Makefile index 36ddbc1a33..3dda07a255 100644 --- a/src/cvl/tests/Makefile +++ b/src/cvl/tests/Makefile @@ -1,3 +1,22 @@ +################################################################################ +# # +# Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or # +# its subsidiaries. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +################################################################################ + SRC_FILES=$(wildcard *.go) OUT=$(patsubst %.go, %, $(SRC_FILES)) TOPDIR := $(abspath ../../..) diff --git a/src/cvl/tests/cfg_validator.go b/src/cvl/tests/cfg_validator.go index b7be94fe89..f5a532da95 100644 --- a/src/cvl/tests/cfg_validator.go +++ b/src/cvl/tests/cfg_validator.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package main import ( diff --git a/src/cvl/tests/cv_acl.go b/src/cvl/tests/cv_acl.go index 0bb61e0478..cb12c0109b 100644 --- a/src/cvl/tests/cv_acl.go +++ b/src/cvl/tests/cv_acl.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package main import ( diff --git a/src/cvl/tests/cv_edit_op.go b/src/cvl/tests/cv_edit_op.go index 6eb65fa67f..a9035bcf51 100644 --- a/src/cvl/tests/cv_edit_op.go +++ b/src/cvl/tests/cv_edit_op.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package main import ( diff --git a/src/cvl/tests/cv_vlan.go b/src/cvl/tests/cv_vlan.go index d3e13c42dc..b230e86b5a 100644 --- a/src/cvl/tests/cv_vlan.go +++ b/src/cvl/tests/cv_vlan.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package main From 31b70f2ad7aad4f032dbcfd763c1e573c3a5952a Mon Sep 17 00:00:00 2001 From: Faraaz Mohammed Date: Tue, 17 Sep 2019 19:56:05 +0530 Subject: [PATCH 4/9] update broadcom license for pyang plugin for openAPI --- tools/pyang/pyang_plugins/openapi.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/tools/pyang/pyang_plugins/openapi.py b/tools/pyang/pyang_plugins/openapi.py index 649cb7e975..45a407d88d 100644 --- a/tools/pyang/pyang_plugins/openapi.py +++ b/tools/pyang/pyang_plugins/openapi.py @@ -1,6 +1,21 @@ -## Open Api Spec output plugin(swagger 2.0) -## Author: Mohammed Faraaz C -## Company: Broadcom Inc. +################################################################################ +# # +# Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or # +# its subsidiaries. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +################################################################################ import optparse import sys From ae3ddf517ded00edfaca6b7d99f2486901d6fd6e Mon Sep 17 00:00:00 2001 From: Mayank Maheshwari Date: Tue, 17 Sep 2019 22:12:05 +0530 Subject: [PATCH 5/9] Updated License statement --- src/translib/acl_app.go | 24 ++++++++++++++++++------ src/translib/acl_app_test.go | 19 +++++++++++++++++++ src/translib/app_utils.go | 24 ++++++++++++++++++------ src/translib/nonyang_app.go.demo | 24 ++++++++++++++++++------ src/translib/path_utils.go | 24 ++++++++++++++++++------ src/translib/path_utils_test.go | 19 +++++++++++++++++++ src/translib/translib_test.go | 23 +++++++++++++++++++++-- 7 files changed, 131 insertions(+), 26 deletions(-) diff --git a/src/translib/acl_app.go b/src/translib/acl_app.go index f7e94af58f..0678cde7aa 100644 --- a/src/translib/acl_app.go +++ b/src/translib/acl_app.go @@ -1,9 +1,21 @@ -/////////////////////////////////////////////////////////////////////// -// -// Copyright 2019 Broadcom. All rights reserved. -// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -// -/////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// package translib diff --git a/src/translib/acl_app_test.go b/src/translib/acl_app_test.go index 88065982b8..d1773866ac 100644 --- a/src/translib/acl_app_test.go +++ b/src/translib/acl_app_test.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package translib import ( diff --git a/src/translib/app_utils.go b/src/translib/app_utils.go index 90875968f7..0fa8b66fd3 100644 --- a/src/translib/app_utils.go +++ b/src/translib/app_utils.go @@ -1,9 +1,21 @@ -/////////////////////////////////////////////////////////////////////// -// -// Copyright 2019 Broadcom. All rights reserved. -// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -// -/////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// package translib diff --git a/src/translib/nonyang_app.go.demo b/src/translib/nonyang_app.go.demo index 3e3a5f686e..17553ce328 100644 --- a/src/translib/nonyang_app.go.demo +++ b/src/translib/nonyang_app.go.demo @@ -1,9 +1,21 @@ -/////////////////////////////////////////////////////////////////////// -// -// Copyright 2019 Broadcom. All rights reserved. -// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -// -/////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// package translib diff --git a/src/translib/path_utils.go b/src/translib/path_utils.go index 8d12ecdfcd..bf7a35dcab 100644 --- a/src/translib/path_utils.go +++ b/src/translib/path_utils.go @@ -1,9 +1,21 @@ -/////////////////////////////////////////////////////////////////////// -// -// Copyright 2019 Broadcom. All rights reserved. -// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -// -/////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// package translib diff --git a/src/translib/path_utils_test.go b/src/translib/path_utils_test.go index 5379c00afa..e8d9c19b63 100644 --- a/src/translib/path_utils_test.go +++ b/src/translib/path_utils_test.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package translib import ( diff --git a/src/translib/translib_test.go b/src/translib/translib_test.go index 7d391757b2..9ceb1e1a80 100644 --- a/src/translib/translib_test.go +++ b/src/translib/translib_test.go @@ -1,10 +1,29 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package translib_test import ( "fmt" "path/filepath" - "runtime" "reflect" + "runtime" "testing" ) @@ -36,5 +55,5 @@ func equals(tb testing.TB, exp, act interface{}) { } func Test_Create(t *testing.T) { - + } From cafc7342009e291fb7079020558b555f1b90442d Mon Sep 17 00:00:00 2001 From: Anand Kumar Subramanian Date: Tue, 17 Sep 2019 12:20:38 -0700 Subject: [PATCH 6/9] Update broadcom license --- src/translib/app_interface.go | 24 ++++++++++++++++++------ src/translib/subscribe.go | 23 ++++++++++++++++++----- src/translib/test/translibtest.go | 19 +++++++++++++++++++ src/translib/translib.go | 26 ++++++++++++++++++-------- 4 files changed, 73 insertions(+), 19 deletions(-) diff --git a/src/translib/app_interface.go b/src/translib/app_interface.go index a64d568065..0a8b477403 100644 --- a/src/translib/app_interface.go +++ b/src/translib/app_interface.go @@ -1,8 +1,21 @@ -/////////////////////////////////////////////////// -// -// Copyright 2019 Broadcom Inc. -// -/////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// /* Package translib defines the interface for all the app modules @@ -12,7 +25,6 @@ It exposes register function for all the app modules to register It stores all the app module information in a map and presents it to the tranlib infra when it asks for the same. - */ package translib diff --git a/src/translib/subscribe.go b/src/translib/subscribe.go index d48c9ac12d..a22e04c6e1 100644 --- a/src/translib/subscribe.go +++ b/src/translib/subscribe.go @@ -1,8 +1,21 @@ -/////////////////////////////////////////////////// -// -// Copyright 2019 Broadcom Inc. -// -/////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// /* Package translib defines the functions to be used by the subscribe diff --git a/src/translib/test/translibtest.go b/src/translib/test/translibtest.go index 0d87d472d4..24450736b3 100644 --- a/src/translib/test/translibtest.go +++ b/src/translib/test/translibtest.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package main import ( diff --git a/src/translib/translib.go b/src/translib/translib.go index c482dc7567..3170128a21 100644 --- a/src/translib/translib.go +++ b/src/translib/translib.go @@ -1,8 +1,21 @@ -/////////////////////////////////////////////////// -// -// Copyright 2019 Broadcom Inc. -// -/////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// /* Package translib implements APIs like Create, Get, Subscribe etc. @@ -16,9 +29,6 @@ Redis ABNF format and persisting them in the Redis DB. It can also translate the ABNF format to YANG specific JSON IETF format This package can also talk to non-DB clients. - -Example: TBD - */ package translib From 16a13061d2b74c4e64b857b9a9b1b508b8ca7de4 Mon Sep 17 00:00:00 2001 From: Arun Barboza <29963827+a-barboza@users.noreply.github.com> Date: Tue, 17 Sep 2019 11:58:58 -0700 Subject: [PATCH 7/9] DB Access Layer: Update Broadcom License --- src/translib/db/db.go | 22 ++++++++++++++++++---- src/translib/db/db_test.go | 22 ++++++++++++++++++---- src/translib/db/map.go | 22 ++++++++++++++++++---- src/translib/db/subscribe.go | 22 ++++++++++++++++++---- src/translib/db/test/arloIssue29.go | 19 +++++++++++++++++++ src/translib/db/test/testdb.go | 19 +++++++++++++++++++ src/translib/db/test/testmap.go | 19 +++++++++++++++++++ src/translib/db/test/testsubscribe.go | 19 +++++++++++++++++++ 8 files changed, 148 insertions(+), 16 deletions(-) diff --git a/src/translib/db/db.go b/src/translib/db/db.go index 804718dc8d..451bc92383 100644 --- a/src/translib/db/db.go +++ b/src/translib/db/db.go @@ -1,7 +1,21 @@ -/* -Copyright 2019 Broadcom. All rights reserved. -The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -*/ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// /* Package db implements a wrapper over the go-redis/redis. diff --git a/src/translib/db/db_test.go b/src/translib/db/db_test.go index 7f0030537b..edf05b281c 100644 --- a/src/translib/db/db_test.go +++ b/src/translib/db/db_test.go @@ -1,7 +1,21 @@ -/* -Copyright 2019 Broadcom. All rights reserved. -The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -*/ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// package db diff --git a/src/translib/db/map.go b/src/translib/db/map.go index 63551b31c2..9010cfb15f 100644 --- a/src/translib/db/map.go +++ b/src/translib/db/map.go @@ -1,7 +1,21 @@ -/* -Copyright 2019 Broadcom. All rights reserved. -The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -*/ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// /* Package db implements a wrapper over the go-redis/redis. diff --git a/src/translib/db/subscribe.go b/src/translib/db/subscribe.go index 145f6fee12..65ea09811e 100644 --- a/src/translib/db/subscribe.go +++ b/src/translib/db/subscribe.go @@ -1,7 +1,21 @@ -/* -Copyright 2019 Broadcom. All rights reserved. -The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -*/ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// /* Package db implements a wrapper over the go-redis/redis. diff --git a/src/translib/db/test/arloIssue29.go b/src/translib/db/test/arloIssue29.go index 5299f4bf82..d42613d664 100644 --- a/src/translib/db/test/arloIssue29.go +++ b/src/translib/db/test/arloIssue29.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + /* UT for https://github.com/project-arlo/sonic-mgmt-framework/issues/29 diff --git a/src/translib/db/test/testdb.go b/src/translib/db/test/testdb.go index 0756bac16e..c28b368e3a 100644 --- a/src/translib/db/test/testdb.go +++ b/src/translib/db/test/testdb.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package main import ( diff --git a/src/translib/db/test/testmap.go b/src/translib/db/test/testmap.go index 7a8c76f303..728b8842ac 100644 --- a/src/translib/db/test/testmap.go +++ b/src/translib/db/test/testmap.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package main import ( diff --git a/src/translib/db/test/testsubscribe.go b/src/translib/db/test/testsubscribe.go index 751fb3c75c..298bf3443a 100644 --- a/src/translib/db/test/testsubscribe.go +++ b/src/translib/db/test/testsubscribe.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package main import ( From 1b9a60f8ddb99b631f1c8229150cc340329daf35 Mon Sep 17 00:00:00 2001 From: Mayank Maheshwari Date: Wed, 18 Sep 2019 16:19:23 +0530 Subject: [PATCH 8/9] Updated License statement --- src/translib/ocbinds/oc.go | 19 +++++++++++++ src/translib/tlerr/app_errors.go | 24 ++++++++++++----- src/translib/tlerr/tlerr.go | 46 +++++++++++++++++++++----------- 3 files changed, 67 insertions(+), 22 deletions(-) diff --git a/src/translib/ocbinds/oc.go b/src/translib/ocbinds/oc.go index 91b532c907..2e3b833ece 100644 --- a/src/translib/ocbinds/oc.go +++ b/src/translib/ocbinds/oc.go @@ -1,3 +1,22 @@ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// + package ocbinds //go:generate sh -c "/usr/local/go/bin/go run $BUILD_GOPATH/src/github.com/openconfig/ygot/generator/generator.go -generate_fakeroot -output_file ocbinds.go -package_name ocbinds -generate_fakeroot -fakeroot_name=device -compress_paths=false -exclude_modules ietf-interfaces -path . $(find ../../../models/yang -name '*.yang' | sort)" diff --git a/src/translib/tlerr/app_errors.go b/src/translib/tlerr/app_errors.go index dec7b03184..d695954326 100644 --- a/src/translib/tlerr/app_errors.go +++ b/src/translib/tlerr/app_errors.go @@ -1,9 +1,21 @@ -/////////////////////////////////////////////////////////////////////// -// -// Copyright 2019 Broadcom. All rights reserved. -// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -// -/////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// package tlerr diff --git a/src/translib/tlerr/tlerr.go b/src/translib/tlerr/tlerr.go index a0c799b386..8ff1254301 100644 --- a/src/translib/tlerr/tlerr.go +++ b/src/translib/tlerr/tlerr.go @@ -1,7 +1,21 @@ -/* -Copyright 2019 Broadcom. All rights reserved. -The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -*/ +//////////////////////////////////////////////////////////////////////////////// +// // +// Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or // +// its subsidiaries. // +// // +// Licensed under the Apache License, Version 2.0 (the "License"); // +// you may not use this file except in compliance with the License. // +// You may obtain a copy of the License at // +// // +// http://www.apache.org/licenses/LICENSE-2.0 // +// // +// Unless required by applicable law or agreed to in writing, software // +// distributed under the License is distributed on an "AS IS" BASIS, // +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +// See the License for the specific language governing permissions and // +// limitations under the License. // +// // +//////////////////////////////////////////////////////////////////////////////// /* Package tlerr defines the errors of the translib library. @@ -17,15 +31,15 @@ Hence, it cannot occur here. package tlerr import ( -// "fmt" - "golang.org/x/text/message" - "golang.org/x/text/language" + // "fmt" "cvl" -// "errors" -// "strings" + "golang.org/x/text/language" + "golang.org/x/text/message" + // "errors" + // "strings" ) -var p * message.Printer +var p *message.Printer func init() { p = message.NewPrinter(language.English) @@ -48,7 +62,7 @@ func (e TranslibDBNotInit) Error() string { } type TranslibRedisClientEntryNotExist struct { - Entry string + Entry string } func (e TranslibRedisClientEntryNotExist) Error() string { @@ -56,8 +70,8 @@ func (e TranslibRedisClientEntryNotExist) Error() string { } type TranslibCVLFailure struct { - Code int - CVLErrorInfo cvl.CVLErrorInfo + Code int + CVLErrorInfo cvl.CVLErrorInfo } func (e TranslibCVLFailure) Error() string { @@ -80,10 +94,10 @@ func (e TranslibDBSubscribeFail) Error() string { } type TranslibSyntaxValidationError struct { - StatusCode int // status code - ErrorStr error // error message + StatusCode int // status code + ErrorStr error // error message } func (e TranslibSyntaxValidationError) Error() string { - return p.Sprintf("%s", e.ErrorStr) + return p.Sprintf("%s", e.ErrorStr) } From 009158010bb2a67f407e824bbac97780703c9f33 Mon Sep 17 00:00:00 2001 From: Mayank Maheshwari Date: Wed, 18 Sep 2019 16:38:03 +0530 Subject: [PATCH 9/9] Update License statement --- go_server.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/go_server.sh b/go_server.sh index de3be2c253..4c13c1aa2f 100755 --- a/go_server.sh +++ b/go_server.sh @@ -1,5 +1,24 @@ #!/usr/bin/env bash +################################################################################ +# # +# Copyright 2019 Broadcom. The term Broadcom refers to Broadcom Inc. and/or # +# its subsidiaries. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +# # +################################################################################ + set -e TOPDIR=$PWD