update codedellemc/goscaleio

update thecodeteam/goscaleio

fix problem
This commit is contained in:
moriadry
2019-07-19 02:11:46 +08:00
parent c1ebabed42
commit bacda8aaca
33 changed files with 308 additions and 677 deletions

View File

@@ -1,420 +0,0 @@
*.*-e
.*-e
*-e
vendor/
.build/
.rpmbuild/
example
release/*
golang-crosscompile/
.project
*.d
*.out
.gaesdk/
# Created by https://www.gitignore.io
### Windows ###
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
### OSX ###
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Eclipse ###
*.pydevproject
.metadata
.gradle
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
# Eclipse Core
.project
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# CDT-specific
.cproject
# JDT-specific (Eclipse Java Development Tools)
.classpath
# PDT-specific
.buildpath
# sbteclipse plugin
.target
# TeXlipse plugin
.texlipse
### Go ###
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
# Folders
_obj
_test
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
*.test
*.prof
### SublimeText ###
# cache files for sublime text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
# workspace files are user-specific
*.sublime-workspace
# project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using SublimeText
# *.sublime-project
# sftp configuration file
sftp-config.json
### VisualStudio ###
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
# Visual Studo 2015 cache/options directory
.vs/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding addin-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# Windows Azure Build Output
csx/
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
*.[Cc]ache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
### Maven ###
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
### Java ###
*.class
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries
# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml
# Gradle:
# .idea/gradle.xml
# .idea/libraries
# Mongo Explorer plugin:
# .idea/mongoSettings.xml
## File-based project format:
*.ipr
*.iws
## Plugin-specific files:
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties

View File

@@ -1,10 +0,0 @@
language: go
install:
- go get -t ./...
- go get code.google.com/p/go.tools/cmd/cover
- go get github.com/mattn/goveralls
script:
- PATH="$HOME/gopath/bin:$PATH"
- script/coverage --coveralls

17
vendor/github.com/thecodeteam/goscaleio/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,17 @@
# Binaries for programs and plugins
*.exe
*.dll
*.so
*.dylib
# Test binary, build with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
.glide/
# A macOS metadata file
.DS_Store

11
vendor/github.com/thecodeteam/goscaleio/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,11 @@
go_import_path: github.com/thecodeteam/goscaleio
language: go
go:
- 1.8.3
- 1.9.1
os:
- linux
install: true
script: go build

View File

@@ -16,12 +16,12 @@ go_library(
"user.go",
"volume.go",
],
importmap = "k8s.io/kubernetes/vendor/github.com/codedellemc/goscaleio",
importpath = "github.com/codedellemc/goscaleio",
importmap = "k8s.io/kubernetes/vendor/github.com/thecodeteam/goscaleio",
importpath = "github.com/thecodeteam/goscaleio",
visibility = ["//visibility:public"],
deps = [
"//vendor/github.com/codedellemc/goscaleio/types/v1:go_default_library",
"//vendor/github.com/sirupsen/logrus:go_default_library",
"//vendor/github.com/thecodeteam/goscaleio/types/v1:go_default_library",
],
)
@@ -36,7 +36,7 @@ filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//vendor/github.com/codedellemc/goscaleio/types/v1:all-srcs",
"//vendor/github.com/thecodeteam/goscaleio/types/v1:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],

27
vendor/github.com/thecodeteam/goscaleio/Gopkg.lock generated vendored Normal file
View File

@@ -0,0 +1,27 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
name = "github.com/sirupsen/logrus"
packages = ["."]
revision = "f006c2ac4710855cf0f916dd6b77acf6b048dc6e"
version = "v1.0.3"
[[projects]]
branch = "master"
name = "golang.org/x/crypto"
packages = ["ssh/terminal"]
revision = "2509b142fb2b797aa7587dad548f113b2c0f20ce"
[[projects]]
branch = "master"
name = "golang.org/x/sys"
packages = ["unix","windows"]
revision = "164713f0dfcec4e80be8b53e1f0811f5f0d84578"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "9a4df6c2b9cbc7b6a8c1f52444dc0bace4dc5e03a39109d0e2f7956c62319982"
solver-name = "gps-cdcl"
solver-version = 1

4
vendor/github.com/thecodeteam/goscaleio/Gopkg.toml generated vendored Normal file
View File

@@ -0,0 +1,4 @@
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# Refer to https://github.com/toml-lang/toml for detailed TOML docs.

1
vendor/github.com/thecodeteam/goscaleio/VERSION generated vendored Normal file
View File

@@ -0,0 +1 @@
0.1.0

View File

@@ -16,7 +16,7 @@ import (
"strings"
"time"
types "github.com/codedellemc/goscaleio/types/v1"
types "github.com/thecodeteam/goscaleio/types/v1"
log "github.com/sirupsen/logrus"
)

View File

@@ -8,7 +8,7 @@ import (
"io/ioutil"
"reflect"
types "github.com/codedellemc/goscaleio/types/v1"
types "github.com/thecodeteam/goscaleio/types/v1"
)
type Device struct {

View File

@@ -8,7 +8,7 @@ import (
"io/ioutil"
"strings"
types "github.com/codedellemc/goscaleio/types/v1"
types "github.com/thecodeteam/goscaleio/types/v1"
)
func (client *Client) GetInstance(systemhref string) (systems []*types.System, err error) {

View File

@@ -7,7 +7,7 @@ import (
"fmt"
"io/ioutil"
types "github.com/codedellemc/goscaleio/types/v1"
types "github.com/thecodeteam/goscaleio/types/v1"
)
type ProtectionDomain struct {

View File

@@ -3,7 +3,7 @@ package goscaleio
import (
"fmt"
types "github.com/codedellemc/goscaleio/types/v1"
types "github.com/thecodeteam/goscaleio/types/v1"
)
func (system *System) GetScsiInitiator() (scsiInitiators []types.ScsiInitiator, err error) {

View File

@@ -10,7 +10,7 @@ import (
"reflect"
"strings"
types "github.com/codedellemc/goscaleio/types/v1"
types "github.com/thecodeteam/goscaleio/types/v1"
)
type Sdc struct {
@@ -131,7 +131,7 @@ func GetSdcLocalGUID() (sdcGUID string, err error) {
out, err := exec.Command("/opt/emc/scaleio/sdc/bin/drv_cfg", "--query_guid").Output()
if err != nil {
return "", fmt.Errorf("Error querying volumes: ", err)
return "", fmt.Errorf("GetSdcLocalGUID: query vols failed: %v", err)
}
sdcGUID = strings.Replace(string(out), "\n", "", -1)

View File

@@ -8,7 +8,7 @@ import (
"io/ioutil"
"reflect"
types "github.com/codedellemc/goscaleio/types/v1"
types "github.com/thecodeteam/goscaleio/types/v1"
)
type Sds struct {
@@ -41,13 +41,13 @@ func (protectionDomain *ProtectionDomain) CreateSds(name string, ipList []string
return "", fmt.Errorf("Must provide at least 1 SDS IP")
} else if len(ipList) == 1 {
sdsIP := types.SdsIp{IP: ipList[0], Role: "all"}
sdsIPList := &types.SdsIpList{sdsIP}
sdsIPList := &types.SdsIpList{SdsIP: sdsIP}
sdsParam.IPList = append(sdsParam.IPList, sdsIPList)
} else if len(ipList) >= 2 {
sdsIP1 := types.SdsIp{IP: ipList[0], Role: "sdcOnly"}
sdsIP2 := types.SdsIp{IP: ipList[1], Role: "sdsOnly"}
sdsIPList1 := &types.SdsIpList{sdsIP1}
sdsIPList2 := &types.SdsIpList{sdsIP2}
sdsIPList1 := &types.SdsIpList{SdsIP: sdsIP1}
sdsIPList2 := &types.SdsIpList{SdsIP: sdsIP2}
sdsParam.IPList = append(sdsParam.IPList, sdsIPList1)
sdsParam.IPList = append(sdsParam.IPList, sdsIPList2)
}

View File

@@ -7,7 +7,7 @@ import (
"fmt"
"io/ioutil"
types "github.com/codedellemc/goscaleio/types/v1"
types "github.com/thecodeteam/goscaleio/types/v1"
)
type StoragePool struct {

View File

@@ -6,7 +6,7 @@ import (
"errors"
"fmt"
types "github.com/codedellemc/goscaleio/types/v1"
types "github.com/thecodeteam/goscaleio/types/v1"
)
type System struct {

View File

@@ -3,8 +3,8 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = ["types.go"],
importmap = "k8s.io/kubernetes/vendor/github.com/codedellemc/goscaleio/types/v1",
importpath = "github.com/codedellemc/goscaleio/types/v1",
importmap = "k8s.io/kubernetes/vendor/github.com/thecodeteam/goscaleio/types/v1",
importpath = "github.com/thecodeteam/goscaleio/types/v1",
visibility = ["//visibility:public"],
)

View File

@@ -3,7 +3,7 @@ package goscaleio
import (
"fmt"
types "github.com/codedellemc/goscaleio/types/v1"
types "github.com/thecodeteam/goscaleio/types/v1"
)
func (system *System) GetUser() (user []types.User, err error) {

View File

@@ -12,7 +12,7 @@ import (
"sort"
"strings"
types "github.com/codedellemc/goscaleio/types/v1"
types "github.com/thecodeteam/goscaleio/types/v1"
)
type SdcMappedVolume struct {
@@ -140,7 +140,8 @@ func GetLocalVolumeMap() (mappedVolumes []*SdcMappedVolume, err error) {
out, err := exec.Command("/opt/emc/scaleio/sdc/bin/drv_cfg", "--query_vols").Output()
if err != nil {
return []*SdcMappedVolume{}, fmt.Errorf("Error querying volumes: ", err)
return []*SdcMappedVolume{},
fmt.Errorf("GetLocalVolumeMap: query vols failed: %v", err)
}
result := string(out)