From 847c06d6c6cc9fa4a066f270a482447da62f0c2e Mon Sep 17 00:00:00 2001 From: zhouenhua Date: Wed, 27 Oct 2021 17:54:52 +0800 Subject: [PATCH] Update boilerplate text and OWNER_ALIASES Signed-off-by: zhouenhua --- LICENSE | 15 ------------ OWNERS_ALIASES | 45 ++++++++++++++++++++++++++++++++++++ cmd/nvmfplugin/main.go | 26 +++++++++++++++++---- pkg/nvmf/const.go | 15 ++++++++++++ pkg/nvmf/controllerserver.go | 16 +++++++++++++ pkg/nvmf/disk.go | 17 ++++++++++++++ pkg/nvmf/driver.go | 17 ++++++++++++++ pkg/nvmf/fabrics.go | 22 ++++++++++++++++-- pkg/nvmf/identityserver.go | 16 +++++++++++++ pkg/nvmf/mounter.go | 16 +++++++++++++ pkg/nvmf/nodeserver.go | 22 ++++++++++++++++-- pkg/nvmf/nvmf.go | 19 ++++++++++++++- pkg/nvmf/nvmf_utils.go | 28 ++++++++++++++++++---- pkg/nvmf/server.go | 26 +++++++++++++++++---- pkg/utils/utils.go | 16 +++++++++++++ 15 files changed, 283 insertions(+), 33 deletions(-) create mode 100644 OWNERS_ALIASES diff --git a/LICENSE b/LICENSE index 54fbd46..a7e77cb 100644 --- a/LICENSE +++ b/LICENSE @@ -1,18 +1,3 @@ -Copyright 2020 Bytedance Inc. - -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. - - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES new file mode 100644 index 0000000..2c4838e --- /dev/null +++ b/OWNERS_ALIASES @@ -0,0 +1,45 @@ +# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md + +aliases: + + # SIG-Storage chairs and leads should always have approval rights in all repos. + # Others may be added as needed here or in each repo. + kubernetes-csi-approvers: + - jsafrane + - msau42 + - saad-ali + - xing-yang + + # Reviewers are automatically assigned to new PRs. The following + # reviewers will be active in all repos. Other reviewers can be + # added in each repo. + # + # Reviewers are encouraged to set the "Busy" flag in their GitHub status + # when they are temporarily unable to review PRs. + kubernetes-csi-reviewers: + - andyzhangx + - chrishenzie + - ggriffiths + - gnufied + - humblec + - j-griffith + - Jiawei0227 + - jingxu97 + - jsafrane + - pohly + - xing-yang + +# This documents who previously contributed to Kubernetes-CSI +# as approver. +emeritus_approver: +- lpabon +- sbezverk +- vladimirvivien + +# This documents who previously contributed to Kubernetes-CSI +# as reviewer. +emeritus_reviewer: +- lpabon +- saad-ali +- sbezverk +- vladimirvivien \ No newline at end of file diff --git a/cmd/nvmfplugin/main.go b/cmd/nvmfplugin/main.go index 83ed9f1..62df685 100644 --- a/cmd/nvmfplugin/main.go +++ b/cmd/nvmfplugin/main.go @@ -1,15 +1,33 @@ -package main +/* +Copyright 2021 The Kubernetes Authors. + +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 nvmf import ( - "csi-driver-nvmf/pkg/nvmf" "flag" "fmt" - "github.com/golang/glog" - "github.com/spf13/cobra" "net/http" "os" "sync" "time" + + "github.com/golang/glog" + "github.com/spf13/cobra" + + "csi-driver-nvmf/pkg/nvmf" ) var ( diff --git a/pkg/nvmf/const.go b/pkg/nvmf/const.go index c7b6f4b..42a74c8 100644 --- a/pkg/nvmf/const.go +++ b/pkg/nvmf/const.go @@ -1,3 +1,18 @@ +/* +Copyright 2021 The Kubernetes Authors. + +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 nvmf const ( diff --git a/pkg/nvmf/controllerserver.go b/pkg/nvmf/controllerserver.go index 7c8c3b7..98b1399 100644 --- a/pkg/nvmf/controllerserver.go +++ b/pkg/nvmf/controllerserver.go @@ -1,3 +1,19 @@ +/* +Copyright 2021 The Kubernetes Authors. + +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 nvmf import ( diff --git a/pkg/nvmf/disk.go b/pkg/nvmf/disk.go index 7e248f9..fdd9bbc 100644 --- a/pkg/nvmf/disk.go +++ b/pkg/nvmf/disk.go @@ -1,7 +1,24 @@ +/* +Copyright 2021 The Kubernetes Authors. + +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 nvmf import ( "fmt" + "github.com/container-storage-interface/spec/lib/go/csi" ) diff --git a/pkg/nvmf/driver.go b/pkg/nvmf/driver.go index 156474e..c8726fc 100644 --- a/pkg/nvmf/driver.go +++ b/pkg/nvmf/driver.go @@ -1,7 +1,24 @@ +/* +Copyright 2021 The Kubernetes Authors. + +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 nvmf import ( "fmt" + "github.com/container-storage-interface/spec/lib/go/csi" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/pkg/nvmf/fabrics.go b/pkg/nvmf/fabrics.go index 3f36d0f..e64ff28 100644 --- a/pkg/nvmf/fabrics.go +++ b/pkg/nvmf/fabrics.go @@ -1,13 +1,31 @@ +/* +Copyright 2021 The Kubernetes Authors. + +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 nvmf import ( - "csi-driver-nvmf/pkg/utils" "encoding/json" "fmt" "io/ioutil" - "k8s.io/klog" "os" "strings" + + "k8s.io/klog" + + "csi-driver-nvmf/pkg/utils" ) func getConnector(nvmfInfo *nvmfDiskInfo) *Connector { diff --git a/pkg/nvmf/identityserver.go b/pkg/nvmf/identityserver.go index af124c7..ce4c0d1 100644 --- a/pkg/nvmf/identityserver.go +++ b/pkg/nvmf/identityserver.go @@ -1,3 +1,19 @@ +/* +Copyright 2021 The Kubernetes Authors. + +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 nvmf import ( diff --git a/pkg/nvmf/mounter.go b/pkg/nvmf/mounter.go index 8180b6d..e2d6005 100644 --- a/pkg/nvmf/mounter.go +++ b/pkg/nvmf/mounter.go @@ -1,3 +1,19 @@ +/* +Copyright 2021 The Kubernetes Authors. + +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 nvmf import ( diff --git a/pkg/nvmf/nodeserver.go b/pkg/nvmf/nodeserver.go index 2da1f9e..7392162 100644 --- a/pkg/nvmf/nodeserver.go +++ b/pkg/nvmf/nodeserver.go @@ -1,13 +1,31 @@ +/* +Copyright 2021 The Kubernetes Authors. + +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 nvmf import ( - "csi-driver-nvmf/pkg/utils" + "os" + "github.com/container-storage-interface/spec/lib/go/csi" "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "k8s.io/klog" - "os" + + "csi-driver-nvmf/pkg/utils" ) type NodeServer struct { diff --git a/pkg/nvmf/nvmf.go b/pkg/nvmf/nvmf.go index d099533..82b09d8 100644 --- a/pkg/nvmf/nvmf.go +++ b/pkg/nvmf/nvmf.go @@ -1,11 +1,28 @@ +/* +Copyright 2021 The Kubernetes Authors. + +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 nvmf import ( "fmt" + "os" + "github.com/container-storage-interface/spec/lib/go/csi" "k8s.io/klog" "k8s.io/utils/mount" - "os" ) func AttachDisk(req *csi.NodePublishVolumeRequest, nm nvmfDiskMounter) (string, error) { diff --git a/pkg/nvmf/nvmf_utils.go b/pkg/nvmf/nvmf_utils.go index 58683e1..535c09c 100644 --- a/pkg/nvmf/nvmf_utils.go +++ b/pkg/nvmf/nvmf_utils.go @@ -1,17 +1,35 @@ +/* +Copyright 2021 The Kubernetes Authors. + +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 nvmf import ( - "csi-driver-nvmf/pkg/utils" "context" "fmt" - "github.com/kubernetes-csi/csi-lib-utils/protosanitizer" - log "github.com/sirupsen/logrus" - "google.golang.org/grpc" - "k8s.io/klog" "os" "path/filepath" "strings" "time" + + "github.com/kubernetes-csi/csi-lib-utils/protosanitizer" + log "github.com/sirupsen/logrus" + "google.golang.org/grpc" + "k8s.io/klog" + + "csi-driver-nvmf/pkg/utils" ) func waitForPathToExist(devicePath string, maxRetries, intervalSeconds int, deviceTransport string) (bool, error) { diff --git a/pkg/nvmf/server.go b/pkg/nvmf/server.go index 5972340..db24c78 100644 --- a/pkg/nvmf/server.go +++ b/pkg/nvmf/server.go @@ -1,13 +1,31 @@ +/* +Copyright 2021 The Kubernetes Authors. + +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 nvmf import ( - "csi-driver-nvmf/pkg/utils" - "github.com/container-storage-interface/spec/lib/go/csi" - "google.golang.org/grpc" - "k8s.io/klog" "net" "os" "sync" + + "github.com/container-storage-interface/spec/lib/go/csi" + "google.golang.org/grpc" + "k8s.io/klog" + + "csi-driver-nvmf/pkg/utils" ) // Defines Non blocking GRPC server interfaces diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 265a27c..cd30435 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -1,3 +1,19 @@ +/* +Copyright 2021 The Kubernetes Authors. + +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 utils import (