diff --git a/cmd/climc/shell/compute/network_ip_mac.go b/cmd/climc/shell/compute/network_ip_mac.go index db9b8411804..876b2cdc3ad 100644 --- a/cmd/climc/shell/compute/network_ip_mac.go +++ b/cmd/climc/shell/compute/network_ip_mac.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 compute import ( diff --git a/cmd/host-health/main.go b/cmd/host-health/main.go index 46088f6a122..b79315f30cf 100644 --- a/cmd/host-health/main.go +++ b/cmd/host-health/main.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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/cmd/scheduledtask/main.go b/cmd/scheduledtask/main.go index 9e6e9552e35..291bacbe804 100644 --- a/cmd/scheduledtask/main.go +++ b/cmd/scheduledtask/main.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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/go.mod b/go.mod index 3b968006572..9fe0e3f2d7b 100644 --- a/go.mod +++ b/go.mod @@ -83,14 +83,14 @@ require ( k8s.io/client-go v0.19.3 k8s.io/cluster-bootstrap v0.19.3 moul.io/http2curl/v2 v2.3.0 - yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231012115531-f16047235f44 + yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231018082106-f915f3964b90 yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32 yunion.io/x/jsonutils v1.0.1-0.20230613121553-0f3b41e2ef19 yunion.io/x/log v1.0.1-0.20230411060016-feb3f46ab361 yunion.io/x/ovsdb v0.0.0-20230306173834-f164f413a900 yunion.io/x/pkg v1.0.1-0.20231012131524-8a175238485b yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e - yunion.io/x/sqlchemy v1.1.2-0.20231011114043-0d203453d3e2 + yunion.io/x/sqlchemy v1.1.2-0.20231017172907-561e7f013926 yunion.io/x/structarg v0.0.0-20231017124457-df4d5009457c ) diff --git a/go.sum b/go.sum index b120e710a2b..ebd11d0bbda 100644 --- a/go.sum +++ b/go.sum @@ -1179,6 +1179,8 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231018082106-f915f3964b90 h1:93t8aEG7NTZtyOL4TUQlvare78yz9g/lYNdSAfQ5Wsw= +yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231018082106-f915f3964b90/go.mod h1:McRjoG2gaOUisB+Qa41kLCNZhr0lsCu4apEjTiphXVY= yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32 h1:v7POYkQwo1XzOxBoIoRVr/k0V9Y5JyjpshlIFa9raug= yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws= yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634= @@ -1196,7 +1198,7 @@ yunion.io/x/pkg v1.0.1-0.20231012131524-8a175238485b h1:0eDqhMiGCPcbYLXRuCprsNCO yunion.io/x/pkg v1.0.1-0.20231012131524-8a175238485b/go.mod h1:ksCJVQ+DwKrJ5QBEoU8pzrDFfDaZVAFH/iJ6yQCYxJk= yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e h1:v+EzIadodSwkdZ/7bremd7J8J50Cise/HCylsOJngmo= yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo= -yunion.io/x/sqlchemy v1.1.2-0.20231011114043-0d203453d3e2 h1:DB6wG9VXsnJGaABcfN89wRjRPCCCuJSsd8xob48BD8Q= -yunion.io/x/sqlchemy v1.1.2-0.20231011114043-0d203453d3e2/go.mod h1:uuPVZEyEq3sWd5vf9VjGSy6lZzof22X87OEHw9sddJQ= +yunion.io/x/sqlchemy v1.1.2-0.20231017172907-561e7f013926 h1:FJ+2J0MwmxUcuN/8ukWHdK2XIoV3GGCotTCgi0w4L+w= +yunion.io/x/sqlchemy v1.1.2-0.20231017172907-561e7f013926/go.mod h1:uuPVZEyEq3sWd5vf9VjGSy6lZzof22X87OEHw9sddJQ= yunion.io/x/structarg v0.0.0-20231017124457-df4d5009457c h1:QuLab2kSRECZRxo4Lo2KcYn6XjQFDGaZ1+x0pYDVVwQ= yunion.io/x/structarg v0.0.0-20231017124457-df4d5009457c/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng= diff --git a/pkg/apis/identity/organization_test.go b/pkg/apis/identity/organization_test.go index bdcec071917..8236eaab5c5 100644 --- a/pkg/apis/identity/organization_test.go +++ b/pkg/apis/identity/organization_test.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 identity import ( diff --git a/pkg/apis/websocket/const.go b/pkg/apis/websocket/const.go index e20d3f6a91a..3d60fb51fd5 100644 --- a/pkg/apis/websocket/const.go +++ b/pkg/apis/websocket/const.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 websocket const ( diff --git a/pkg/cloudcommon/consts/resource_translate.go b/pkg/cloudcommon/consts/resource_translate.go index 7b5e4fddc35..4dcfba82598 100644 --- a/pkg/cloudcommon/consts/resource_translate.go +++ b/pkg/cloudcommon/consts/resource_translate.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 consts import ( diff --git a/pkg/compute/guestdrivers/volcengine.go b/pkg/compute/guestdrivers/volcengine.go index 69a0c04cd70..250f8b52353 100644 --- a/pkg/compute/guestdrivers/volcengine.go +++ b/pkg/compute/guestdrivers/volcengine.go @@ -1,4 +1,4 @@ -// Copyright 2023 Yunion +// Copyright 2019 Yunion // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -115,18 +115,14 @@ func (self *SVolcengineGuestDriver) GetInstanceCapability() cloudprovider.SInsta }, Storages: cloudprovider.Storage{ DataDisk: []cloudprovider.StorageInfo{ - cloudprovider.StorageInfo{ - {StorageType: api.STORAGE_VOLCENGINE_PTSSD, MaxSizeGb: 8192, MinSizeGb: 20, StepSizeGb: 1, Resizable: true}, - {StorageType: api.STORAGE_VOLCENGINE_PL0, MaxSizeGb: 32768, MinSizeGb: 20, StepSizeGb: 1, Resizable: true}, - {StorageType: api.STORAGE_VOLCENGINE_FlexPL, MaxSizeGb: 32768, MinSizeGb: 20, StepSizeGb: 1, Resizable: true}, - }, + {StorageType: api.STORAGE_VOLC_CLOUD_PTSSD, MaxSizeGb: 8192, MinSizeGb: 20, StepSizeGb: 1, Resizable: true}, + {StorageType: api.STORAGE_VOLC_CLOUD_PL0, MaxSizeGb: 32768, MinSizeGb: 20, StepSizeGb: 1, Resizable: true}, + {StorageType: api.STORAGE_VOLC_CLOUD_FLEXPL, MaxSizeGb: 32768, MinSizeGb: 20, StepSizeGb: 1, Resizable: true}, }, SysDisk: []cloudprovider.StorageInfo{ - cloudprovider.StorageInfo{ - {StorageType: api.STORAGE_VOLCENGINE_PTSSD, MaxSizeGb: 500, MinSizeGb: 40, StepSizeGb: 1, Resizable: true}, - {StorageType: api.STORAGE_VOLCENGINE_PL0, MaxSizeGb: 2048, MinSizeGb: 40, StepSizeGb: 1, Resizable: true}, - {StorageType: api.STORAGE_VOLCENGINE_FlexPL, MaxSizeGb: 2048, MinSizeGb: 40, StepSizeGb: 1, Resizable: true}, - }, + {StorageType: api.STORAGE_VOLC_CLOUD_PTSSD, MaxSizeGb: 500, MinSizeGb: 40, StepSizeGb: 1, Resizable: true}, + {StorageType: api.STORAGE_VOLC_CLOUD_PL0, MaxSizeGb: 2048, MinSizeGb: 40, StepSizeGb: 1, Resizable: true}, + {StorageType: api.STORAGE_VOLC_CLOUD_FLEXPL, MaxSizeGb: 2048, MinSizeGb: 40, StepSizeGb: 1, Resizable: true}, }, }, } diff --git a/pkg/compute/hostdrivers/volcengine.go b/pkg/compute/hostdrivers/volcengine.go index 627feebf35e..ea020a7e538 100644 --- a/pkg/compute/hostdrivers/volcengine.go +++ b/pkg/compute/hostdrivers/volcengine.go @@ -1,4 +1,4 @@ -// Copyright 2023 Yunion +// Copyright 2019 Yunion // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/compute/models/network_ip_mac.go b/pkg/compute/models/network_ip_mac.go index 856dc71e56b..619ea8cece3 100644 --- a/pkg/compute/models/network_ip_mac.go +++ b/pkg/compute/models/network_ip_mac.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 models import ( diff --git a/pkg/compute/regiondrivers/volcengine.go b/pkg/compute/regiondrivers/volcengine.go index 55ff05220c7..11b600ae8ea 100644 --- a/pkg/compute/regiondrivers/volcengine.go +++ b/pkg/compute/regiondrivers/volcengine.go @@ -1,4 +1,4 @@ -// Copyright 2023 Yunion +// Copyright 2019 Yunion // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/devtool/utils/gen_telegraf_conf.go b/pkg/devtool/utils/gen_telegraf_conf.go index f4ca97c1624..85ff13e100b 100644 --- a/pkg/devtool/utils/gen_telegraf_conf.go +++ b/pkg/devtool/utils/gen_telegraf_conf.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 ( diff --git a/pkg/devtool/utils/gen_telegraf_conf_test.go b/pkg/devtool/utils/gen_telegraf_conf_test.go index dc7d3293738..bcbdc5fcc44 100644 --- a/pkg/devtool/utils/gen_telegraf_conf_test.go +++ b/pkg/devtool/utils/gen_telegraf_conf_test.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 ( diff --git a/pkg/hostman/host_health/service.go b/pkg/hostman/host_health/service.go index 8ba1494719d..c189ca78a83 100644 --- a/pkg/hostman/host_health/service.go +++ b/pkg/hostman/host_health/service.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 host_health import ( diff --git a/pkg/hostman/isolated_device/nvidia_vgpu.go b/pkg/hostman/isolated_device/nvidia_vgpu.go index 9aaa325c443..e21affd561a 100644 --- a/pkg/hostman/isolated_device/nvidia_vgpu.go +++ b/pkg/hostman/isolated_device/nvidia_vgpu.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 isolated_device import ( diff --git a/pkg/hostman/isolated_device/sriov_base.go b/pkg/hostman/isolated_device/sriov_base.go index fa851f04713..e6607d199ac 100644 --- a/pkg/hostman/isolated_device/sriov_base.go +++ b/pkg/hostman/isolated_device/sriov_base.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 isolated_device import ( diff --git a/pkg/hostman/isolated_device/sriov_vgpu.go b/pkg/hostman/isolated_device/sriov_vgpu.go index 5c165fabeb4..bfad55c88fa 100644 --- a/pkg/hostman/isolated_device/sriov_vgpu.go +++ b/pkg/hostman/isolated_device/sriov_vgpu.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 isolated_device import ( diff --git a/pkg/hostman/storageman/disk_lvm.go b/pkg/hostman/storageman/disk_lvm.go index 2df7a20f7f7..2077ff78b3c 100644 --- a/pkg/hostman/storageman/disk_lvm.go +++ b/pkg/hostman/storageman/disk_lvm.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 storageman import ( diff --git a/pkg/hostman/storageman/disk_nvme.go b/pkg/hostman/storageman/disk_nvme.go index 2a4385cf3c6..f077bb48d0e 100644 --- a/pkg/hostman/storageman/disk_nvme.go +++ b/pkg/hostman/storageman/disk_nvme.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 storageman import ( diff --git a/pkg/hostman/storageman/imagecache_lvm.go b/pkg/hostman/storageman/imagecache_lvm.go index 765f4d086b4..2180a57761d 100644 --- a/pkg/hostman/storageman/imagecache_lvm.go +++ b/pkg/hostman/storageman/imagecache_lvm.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 storageman import ( diff --git a/pkg/hostman/storageman/imagecachemanager_lvm.go b/pkg/hostman/storageman/imagecachemanager_lvm.go index ee6384d7b65..38345cce219 100644 --- a/pkg/hostman/storageman/imagecachemanager_lvm.go +++ b/pkg/hostman/storageman/imagecachemanager_lvm.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 storageman import ( diff --git a/pkg/hostman/storageman/lvmutils/lvmutils.go b/pkg/hostman/storageman/lvmutils/lvmutils.go index 4e081189177..9a0d9af9ffa 100644 --- a/pkg/hostman/storageman/lvmutils/lvmutils.go +++ b/pkg/hostman/storageman/lvmutils/lvmutils.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 lvmutils import ( diff --git a/pkg/hostman/storageman/storage_lvm.go b/pkg/hostman/storageman/storage_lvm.go index f3be2404263..12517a2e0ae 100644 --- a/pkg/hostman/storageman/storage_lvm.go +++ b/pkg/hostman/storageman/storage_lvm.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 storageman import ( diff --git a/pkg/hostman/storageman/storage_nvme.go b/pkg/hostman/storageman/storage_nvme.go index 3c026c7404b..02700f83228 100644 --- a/pkg/hostman/storageman/storage_nvme.go +++ b/pkg/hostman/storageman/storage_nvme.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 storageman import ( diff --git a/pkg/keystone/cache/doc.go b/pkg/keystone/cache/doc.go new file mode 100644 index 00000000000..9fe843d1e10 --- /dev/null +++ b/pkg/keystone/cache/doc.go @@ -0,0 +1,15 @@ +// Copyright 2019 Yunion +// +// 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 cache // import "yunion.io/x/onecloud/pkg/keystone/cache" diff --git a/pkg/keystone/driver/oauth2/bingoiam/sync.go b/pkg/keystone/driver/oauth2/bingoiam/sync.go index ccea278501e..da0d6377487 100644 --- a/pkg/keystone/driver/oauth2/bingoiam/sync.go +++ b/pkg/keystone/driver/oauth2/bingoiam/sync.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 bingoiam import ( diff --git a/pkg/mcclient/modules/compute/mod_network_ip_macs.go b/pkg/mcclient/modules/compute/mod_network_ip_macs.go index c34b9ae9160..6386d713b2a 100644 --- a/pkg/mcclient/modules/compute/mod_network_ip_macs.go +++ b/pkg/mcclient/modules/compute/mod_network_ip_macs.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 compute import ( diff --git a/pkg/mcclient/modules/websocket/doc.go b/pkg/mcclient/modules/websocket/doc.go index e2ffc254cb4..e63ee1d2ae3 100644 --- a/pkg/mcclient/modules/websocket/doc.go +++ b/pkg/mcclient/modules/websocket/doc.go @@ -1 +1,15 @@ +// Copyright 2019 Yunion +// +// 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 websocket // import "yunion.io/x/cloudpods/pkg/mcclient/modules/websocket" diff --git a/pkg/mcclient/modules/websocket/managers.go b/pkg/mcclient/modules/websocket/managers.go index 281aabfbf75..64b4d9b3338 100644 --- a/pkg/mcclient/modules/websocket/managers.go +++ b/pkg/mcclient/modules/websocket/managers.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 websocket import ( diff --git a/pkg/mcclient/modules/websocket/register.go b/pkg/mcclient/modules/websocket/register.go old mode 100755 new mode 100644 index cb07c81d2e7..4e3dc4e075f --- a/pkg/mcclient/modules/websocket/register.go +++ b/pkg/mcclient/modules/websocket/register.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 websocket import "yunion.io/x/onecloud/pkg/mcclient/modulebase" diff --git a/pkg/notify/sender/smsdriver/const.go b/pkg/notify/sender/smsdriver/const.go index cb51c83806e..153073e243c 100644 --- a/pkg/notify/sender/smsdriver/const.go +++ b/pkg/notify/sender/smsdriver/const.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 smsdriver import "yunion.io/x/pkg/errors" diff --git a/pkg/scheduler/core/analysor.go b/pkg/scheduler/core/analysor.go index 3b135250286..77ff178b56a 100644 --- a/pkg/scheduler/core/analysor.go +++ b/pkg/scheduler/core/analysor.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 core import ( diff --git a/pkg/scheduler/core/analysor_test.go b/pkg/scheduler/core/analysor_test.go index 6485ba8d6e9..5831410f1d4 100644 --- a/pkg/scheduler/core/analysor_test.go +++ b/pkg/scheduler/core/analysor_test.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 core import ( diff --git a/pkg/scheduler/data_manager/cloudaccount/cloudaccount.go b/pkg/scheduler/data_manager/cloudaccount/cloudaccount.go index f0a6e4f2ae5..eea28732ee2 100644 --- a/pkg/scheduler/data_manager/cloudaccount/cloudaccount.go +++ b/pkg/scheduler/data_manager/cloudaccount/cloudaccount.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 cloudaccount import ( diff --git a/pkg/scheduler/data_manager/cloudaccount/doc.go b/pkg/scheduler/data_manager/cloudaccount/doc.go index ffa8edf4200..17c35c61e5b 100644 --- a/pkg/scheduler/data_manager/cloudaccount/doc.go +++ b/pkg/scheduler/data_manager/cloudaccount/doc.go @@ -1 +1,15 @@ +// Copyright 2019 Yunion +// +// 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 cloudaccount // import "yunion.io/x/onecloud/pkg/scheduler/data_manager/cloudaccount" diff --git a/pkg/scheduler/data_manager/cloudprovider/cloudprovider.go b/pkg/scheduler/data_manager/cloudprovider/cloudprovider.go index dc2f225c449..560e43b1f62 100644 --- a/pkg/scheduler/data_manager/cloudprovider/cloudprovider.go +++ b/pkg/scheduler/data_manager/cloudprovider/cloudprovider.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 cloudprovider import ( diff --git a/pkg/scheduler/data_manager/cloudprovider/doc.go b/pkg/scheduler/data_manager/cloudprovider/doc.go index 37ba75ceb86..209a4d706ff 100644 --- a/pkg/scheduler/data_manager/cloudprovider/doc.go +++ b/pkg/scheduler/data_manager/cloudprovider/doc.go @@ -1 +1,15 @@ +// Copyright 2019 Yunion +// +// 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 cloudprovider // import "yunion.io/x/onecloud/pkg/scheduler/data_manager/cloudprovider" diff --git a/pkg/scheduler/data_manager/cloudregion/cloudregion.go b/pkg/scheduler/data_manager/cloudregion/cloudregion.go index 9c82098c75e..9b1e44ab368 100644 --- a/pkg/scheduler/data_manager/cloudregion/cloudregion.go +++ b/pkg/scheduler/data_manager/cloudregion/cloudregion.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 cloudregion import ( diff --git a/pkg/scheduler/data_manager/cloudregion/doc.go b/pkg/scheduler/data_manager/cloudregion/doc.go index bebb6354315..fdac8a6e87d 100644 --- a/pkg/scheduler/data_manager/cloudregion/doc.go +++ b/pkg/scheduler/data_manager/cloudregion/doc.go @@ -1 +1,15 @@ +// Copyright 2019 Yunion +// +// 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 cloudregion // import "yunion.io/x/onecloud/pkg/scheduler/data_manager/cloudregion" diff --git a/pkg/scheduler/data_manager/common/common.go b/pkg/scheduler/data_manager/common/common.go index aaa14a4b7d3..83c56d95c8b 100644 --- a/pkg/scheduler/data_manager/common/common.go +++ b/pkg/scheduler/data_manager/common/common.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 common import ( diff --git a/pkg/scheduler/data_manager/common/doc.go b/pkg/scheduler/data_manager/common/doc.go index 12c7395e4bd..4dc7d66579d 100644 --- a/pkg/scheduler/data_manager/common/doc.go +++ b/pkg/scheduler/data_manager/common/doc.go @@ -1 +1,15 @@ +// Copyright 2019 Yunion +// +// 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 common // import "yunion.io/x/onecloud/pkg/scheduler/data_manager/common" diff --git a/pkg/scheduler/data_manager/netinterface/doc.go b/pkg/scheduler/data_manager/netinterface/doc.go index e7261562193..ee18f17c77b 100644 --- a/pkg/scheduler/data_manager/netinterface/doc.go +++ b/pkg/scheduler/data_manager/netinterface/doc.go @@ -1 +1,15 @@ +// Copyright 2019 Yunion +// +// 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 netinterface // import "yunion.io/x/onecloud/pkg/scheduler/data_manager/netinterface" diff --git a/pkg/scheduler/data_manager/netinterface/netinterface.go b/pkg/scheduler/data_manager/netinterface/netinterface.go index 434a71561e1..02f04a51507 100644 --- a/pkg/scheduler/data_manager/netinterface/netinterface.go +++ b/pkg/scheduler/data_manager/netinterface/netinterface.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 netinterface import ( diff --git a/pkg/scheduler/data_manager/network/doc.go b/pkg/scheduler/data_manager/network/doc.go index 437ae7530cd..db426937afc 100644 --- a/pkg/scheduler/data_manager/network/doc.go +++ b/pkg/scheduler/data_manager/network/doc.go @@ -1 +1,15 @@ +// Copyright 2019 Yunion +// +// 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 network // import "yunion.io/x/onecloud/pkg/scheduler/data_manager/network" diff --git a/pkg/scheduler/data_manager/network/network.go b/pkg/scheduler/data_manager/network/network.go index 532ef2e66b0..db830264c27 100644 --- a/pkg/scheduler/data_manager/network/network.go +++ b/pkg/scheduler/data_manager/network/network.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 network import ( diff --git a/pkg/scheduler/data_manager/schedtag/cache.go b/pkg/scheduler/data_manager/schedtag/cache.go index a9e1b3fd1ec..5a7ca411653 100644 --- a/pkg/scheduler/data_manager/schedtag/cache.go +++ b/pkg/scheduler/data_manager/schedtag/cache.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 schedtag import ( diff --git a/pkg/scheduler/data_manager/schedtag/doc.go b/pkg/scheduler/data_manager/schedtag/doc.go index a429f3f9cdc..8a82edff52a 100644 --- a/pkg/scheduler/data_manager/schedtag/doc.go +++ b/pkg/scheduler/data_manager/schedtag/doc.go @@ -1 +1,15 @@ +// Copyright 2019 Yunion +// +// 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 schedtag // import "yunion.io/x/onecloud/pkg/scheduler/data_manager/schedtag" diff --git a/pkg/scheduler/data_manager/schedtag/schedtag.go b/pkg/scheduler/data_manager/schedtag/schedtag.go index cf2b3a91c6b..144f18e88ab 100644 --- a/pkg/scheduler/data_manager/schedtag/schedtag.go +++ b/pkg/scheduler/data_manager/schedtag/schedtag.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 schedtag import ( diff --git a/pkg/scheduler/data_manager/schedtag/sync.go b/pkg/scheduler/data_manager/schedtag/sync.go index 22af8e73016..88bf919376a 100644 --- a/pkg/scheduler/data_manager/schedtag/sync.go +++ b/pkg/scheduler/data_manager/schedtag/sync.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 schedtag import ( diff --git a/pkg/scheduler/data_manager/wire/doc.go b/pkg/scheduler/data_manager/wire/doc.go index 8861057af54..287807980c4 100644 --- a/pkg/scheduler/data_manager/wire/doc.go +++ b/pkg/scheduler/data_manager/wire/doc.go @@ -1 +1,15 @@ +// Copyright 2019 Yunion +// +// 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 wire // import "yunion.io/x/onecloud/pkg/scheduler/data_manager/wire" diff --git a/pkg/scheduler/data_manager/wire/wire.go b/pkg/scheduler/data_manager/wire/wire.go index 90043544c71..87087e749d4 100644 --- a/pkg/scheduler/data_manager/wire/wire.go +++ b/pkg/scheduler/data_manager/wire/wire.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 wire import ( diff --git a/pkg/scheduler/data_manager/zone/doc.go b/pkg/scheduler/data_manager/zone/doc.go index 134545a390a..fdc7d9ee9be 100644 --- a/pkg/scheduler/data_manager/zone/doc.go +++ b/pkg/scheduler/data_manager/zone/doc.go @@ -1 +1,15 @@ +// Copyright 2019 Yunion +// +// 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 zone // import "yunion.io/x/onecloud/pkg/scheduler/data_manager/zone" diff --git a/pkg/scheduler/data_manager/zone/zone.go b/pkg/scheduler/data_manager/zone/zone.go index f15db869c7d..8ad16cf5969 100644 --- a/pkg/scheduler/data_manager/zone/zone.go +++ b/pkg/scheduler/data_manager/zone/zone.go @@ -1,3 +1,17 @@ +// Copyright 2019 Yunion +// +// 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 zone import ( diff --git a/pkg/util/yunionmeta/doc.go b/pkg/util/yunionmeta/doc.go index 87e415e733d..cfd4e7dd8a6 100644 --- a/pkg/util/yunionmeta/doc.go +++ b/pkg/util/yunionmeta/doc.go @@ -1 +1,15 @@ +// Copyright 2019 Yunion +// +// 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 yunionmeta // import "yunion.io/x/onecloud/pkg/util/yunionmeta" diff --git a/pkg/webconsole/helper/doc.go b/pkg/webconsole/helper/doc.go index 1fe8dbea3f8..f708829608f 100644 --- a/pkg/webconsole/helper/doc.go +++ b/pkg/webconsole/helper/doc.go @@ -1 +1,15 @@ +// Copyright 2019 Yunion +// +// 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 helper // import "yunion.io/x/onecloud/pkg/webconsole/helper" diff --git a/scripts/gencopyright.sh b/scripts/gencopyright.sh index 3fc64e2fcdd..07c8e9f906b 100755 --- a/scripts/gencopyright.sh +++ b/scripts/gencopyright.sh @@ -32,7 +32,7 @@ function patch() { for top in $@ do - for f in $(find $top ! -name "*zz_generated*.go" -iname "*.go") + for f in $(find $top ! -name "*zz_generated*.go" ! -name "*.pb.go" -iname "*.go") do patch $f done diff --git a/vendor/modules.txt b/vendor/modules.txt index 98eeb7e9213..5407a377c80 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1438,7 +1438,7 @@ sigs.k8s.io/structured-merge-diff/v4/value # sigs.k8s.io/yaml v1.2.0 ## explicit; go 1.12 sigs.k8s.io/yaml -# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231012115531-f16047235f44 => /root/projects/cloudmux +# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231018082106-f915f3964b90 ## explicit; go 1.18 yunion.io/x/cloudmux/pkg/apis yunion.io/x/cloudmux/pkg/apis/billing @@ -1594,7 +1594,7 @@ yunion.io/x/pkg/utils # yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e ## explicit; go 1.12 yunion.io/x/s3cli -# yunion.io/x/sqlchemy v1.1.2-0.20231011114043-0d203453d3e2 +# yunion.io/x/sqlchemy v1.1.2-0.20231017172907-561e7f013926 ## explicit; go 1.17 yunion.io/x/sqlchemy yunion.io/x/sqlchemy/backends @@ -1604,4 +1604,3 @@ yunion.io/x/sqlchemy/backends/sqlite # yunion.io/x/structarg v0.0.0-20231017124457-df4d5009457c ## explicit; go 1.12 yunion.io/x/structarg -# yunion.io/x/cloudmux => /root/projects/cloudmux diff --git a/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/compact_ips.go b/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/compact_ips.go index aeb83e36664..e90f38dc408 100644 --- a/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/compact_ips.go +++ b/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/compact_ips.go @@ -103,3 +103,14 @@ func compactIPs(ips []string) string { } return strings.Join(lines, ";") } + +func compactMacs(macs []string) string { + ret := make([]string, 0) + sort.Strings(macs) + for i := range macs { + if len(ret) == 0 || ret[len(ret)-1] != macs[i] { + ret = append(ret, macs[i]) + } + } + return strings.Join(macs, ",") +} diff --git a/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/manager.go b/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/manager.go index 66f7f35c5e8..782119fb904 100644 --- a/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/manager.go +++ b/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/manager.go @@ -691,7 +691,7 @@ func (cli *SESXiClient) GetCapabilities() []string { caps := []string{ cloudprovider.CLOUD_CAPABILITY_PROJECT, cloudprovider.CLOUD_CAPABILITY_COMPUTE, - // cloudprovider.CLOUD_CAPABILITY_NETWORK, + cloudprovider.CLOUD_CAPABILITY_NETWORK, // cloudprovider.CLOUD_CAPABILITY_LOADBALANCER, // cloudprovider.CLOUD_CAPABILITY_OBJECTSTORE, // cloudprovider.CLOUD_CAPABILITY_RDS, diff --git a/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/tags.go b/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/tags.go index e973bb1538d..77767ce9d48 100644 --- a/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/tags.go +++ b/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/tags.go @@ -24,10 +24,13 @@ func (wire *sWire) GetSysTags() map[string]string { if dc != nil { tags["datacenter"] = dc.GetName() } - ips, _ := wire.getAvailableIps() + ips, macs, _ := wire.getAvailableIpsMacs() if len(ips) > 0 { tags["vm_ips"] = compactIPs(ips) } + if len(macs) > 0 { + tags["vm_macs"] = compactMacs(macs) + } paths := wire.network.GetPath() for i := 3; i < len(paths); i++ { tags[fmt.Sprintf("folder_%d", i-3)] = paths[i] diff --git a/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/virtualmachine.go b/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/virtualmachine.go index 77937dd3047..6f605026c36 100644 --- a/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/virtualmachine.go +++ b/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/virtualmachine.go @@ -863,10 +863,7 @@ func (svm *SVirtualMachine) fetchHardwareInfo() error { if reflectutils.StructContains(devType, etherType) { vnic := NewVirtualNIC(svm, dev, len(svm.vnics)) - if len(vnic.GetIP()) > 0 { - // only nics with ip is valid - svm.vnics = append(svm.vnics, vnic) - } + svm.vnics = append(svm.vnics, vnic) } else if reflectutils.StructContains(devType, diskType) { svm.vdisks = append(svm.vdisks, NewVirtualDisk(svm, dev, len(svm.vdisks))) } else if reflectutils.StructContains(devType, vgaType) { diff --git a/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/wire.go b/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/wire.go index 129282cf9b7..96ccfd54019 100644 --- a/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/wire.go +++ b/vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/wire.go @@ -16,11 +16,11 @@ package esxi import ( "fmt" - "sort" "time" "github.com/vmware/govmomi/vim25/mo" "yunion.io/x/pkg/errors" + "yunion.io/x/pkg/util/netutils" "yunion.io/x/pkg/util/regutils" "yunion.io/x/cloudmux/pkg/apis/compute" @@ -101,50 +101,60 @@ func (wire *sWire) CreateINetwork(opts *cloudprovider.SNetworkCreateOptions) (cl return nil, errors.ErrNotSupported } -func (wire *sWire) getAvailableIps() ([]string, error) { +func (wire *sWire) getAvailableIpsMacs() ([]string, []string, error) { var hosts []mo.HostSystem err := wire.client.references2Objects(wire.network.GetHosts(), HOST_PROPS, &hosts) if err != nil { - return nil, errors.Wrap(err, "references2Objects HOST_PROPS") + return nil, nil, errors.Wrap(err, "references2Objects HOST_PROPS") } - ret := make([]string, 0) + retIps := make([]string, 0) + retMacs := make([]string, 0) for i := range hosts { h := hosts[i] - ips, err := wire.getAvailableIpsOnHost(h) + ips, macs, err := wire.getAvailableIpsMacsOnHost(h) if err != nil { - return nil, errors.Wrapf(err, "getAvailableIpsOnHost %s", h.Name) + return nil, nil, errors.Wrapf(err, "getAvailableIpsOnHost %s", h.Name) } - ret = append(ret, ips...) + retIps = append(retIps, ips...) + retMacs = append(retMacs, macs...) } - return ret, nil + return retIps, retMacs, nil } -func (wire *sWire) getAvailableIpsOnVM(vm mo.VirtualMachine) []string { - ret := make([]string, 0) +func (wire *sWire) getAvailableIpsMacsOnVM(vm mo.VirtualMachine) ([]string, []string) { + ips := make([]string, 0) + macs := make([]string, 0) for _, net := range vm.Guest.Net { if net.Network != wire.GetName() { continue } + if len(net.MacAddress) > 0 { + mac := netutils.FormatMacAddr(net.MacAddress) + if len(mac) > 0 { + macs = append(macs, mac) + } + } for _, ip := range net.IpAddress { if regutils.MatchIP4Addr(ip) { - ret = append(ret, ip) + ips = append(ips, ip) } } } - return ret + return ips, macs } -func (wire *sWire) getAvailableIpsOnHost(host mo.HostSystem) ([]string, error) { +func (wire *sWire) getAvailableIpsMacsOnHost(host mo.HostSystem) ([]string, []string, error) { var vms []mo.VirtualMachine err := wire.client.references2Objects(host.Vm, VM_PROPS, &vms) if err != nil { - return nil, errors.Wrap(err, "references2Objects VM_PROPS") + return nil, nil, errors.Wrap(err, "references2Objects VM_PROPS") } - ret := make([]string, 0) + retIps := make([]string, 0) + retMacs := make([]string, 0) for _, vm := range vms { - ips := wire.getAvailableIpsOnVM(vm) - ret = append(ret, ips...) + ips, macs := wire.getAvailableIpsMacsOnVM(vm) + retIps = append(retIps, ips...) + retMacs = append(retMacs, macs...) } - sort.Strings(ret) - return ret, nil + return retIps, retMacs, nil } diff --git a/vendor/yunion.io/x/cloudmux/pkg/multicloud/volcengine/disk.go b/vendor/yunion.io/x/cloudmux/pkg/multicloud/volcengine/disk.go index 1e1aebedf16..1219805b0f5 100644 --- a/vendor/yunion.io/x/cloudmux/pkg/multicloud/volcengine/disk.go +++ b/vendor/yunion.io/x/cloudmux/pkg/multicloud/volcengine/disk.go @@ -293,14 +293,14 @@ func (region *SRegion) CreateDisk(zoneId string, category string, name string, s func (region *SRegion) getDisk(diskId string) (*SDisk, error) { disks, _, err := region.GetDisks("", "", "", []string{diskId}, 1, 50) if err != nil { - return nil, errors.Wrapf(err, fmt.Sprint("%s not found", diskId)) + return nil, errors.Wrapf(err, fmt.Sprintf("%s not found", diskId)) } for _, disk := range disks { if disk.VolumeId == diskId { return &disk, nil } } - return nil, errors.Wrapf(cloudprovider.ErrNotFound, fmt.Sprint("%s not found", diskId)) + return nil, errors.Wrapf(cloudprovider.ErrNotFound, fmt.Sprintf("%s not found", diskId)) } func (region *SRegion) DeleteDisk(diskId string) error { diff --git a/vendor/yunion.io/x/cloudmux/pkg/multicloud/volcengine/natgateway.go b/vendor/yunion.io/x/cloudmux/pkg/multicloud/volcengine/natgateway.go index 30432c40dfa..28cc044777c 100644 --- a/vendor/yunion.io/x/cloudmux/pkg/multicloud/volcengine/natgateway.go +++ b/vendor/yunion.io/x/cloudmux/pkg/multicloud/volcengine/natgateway.go @@ -282,7 +282,7 @@ func (region *SRegion) CreateNatGateway(opts *cloudprovider.NatGatewayCreateOpti return &nat, nil } } - return nil, errors.Wrapf(cloudprovider.ErrNotFound, "%s not found", natId) + return nil, errors.Wrapf(err, "%s not found", natId) } func (region *SRegion) DeleteNatGateway(natId string, isForce bool) error { diff --git a/vendor/yunion.io/x/cloudmux/pkg/multicloud/volcengine/zone.go b/vendor/yunion.io/x/cloudmux/pkg/multicloud/volcengine/zone.go index 2c304b603b7..24fda145787 100644 --- a/vendor/yunion.io/x/cloudmux/pkg/multicloud/volcengine/zone.go +++ b/vendor/yunion.io/x/cloudmux/pkg/multicloud/volcengine/zone.go @@ -79,7 +79,7 @@ func (zone *SZone) GetGlobalId() string { } func (zone *SZone) GetName() string { - return fmt.Sprintf("%s", zone.ZoneId) + return fmt.Sprintf(zone.ZoneId) } func (zone *SZone) GetI18n() cloudprovider.SModelI18nTable { diff --git a/vendor/yunion.io/x/sqlchemy/backends/mysql/column.go b/vendor/yunion.io/x/sqlchemy/backends/mysql/column.go index 85b5704d413..5b1e324ab33 100644 --- a/vendor/yunion.io/x/sqlchemy/backends/mysql/column.go +++ b/vendor/yunion.io/x/sqlchemy/backends/mysql/column.go @@ -95,7 +95,12 @@ func (c *SBooleanColumn) ConvertFromString(str string) interface{} { // ConvertFromValue implementation of STristateColumn for IColumnSpec func (c *SBooleanColumn) ConvertFromValue(val interface{}) interface{} { - bVal := val.(bool) + var bVal bool + if c.IsPointer() { + bVal = *val.(*bool) + } else { + bVal = val.(bool) + } if bVal { return 1 }