From 0bc6b8c151e3a33025c7301bf223fb6b47457e2a Mon Sep 17 00:00:00 2001 From: akutz Date: Wed, 7 Dec 2016 13:49:34 -0600 Subject: [PATCH] Build Tag Activated Drivers/Executors This patch enables the specific activation of storage drivers/executors via build tags. The tags `libstorage_storage_driver` and `libstorage_storage_executor`, if absent, will result in all drivers/executors being activated. This is the previous, default behavior. However, if the tags `libstorage_storage_driver` and `libstorage_storage_executor` are present along with `libstorage_storage_driver_NAME` and `libstorage_storage_executor_NAME`, where NAME is the name of a driver, ex. `ebs`, then only that driver and executor are considered for compilation. --- .travis.yml | 17 +++-- Makefile | 12 +++- client/client.go | 67 +++++++++++-------- drivers/storage/ebs/ebs.go | 2 + drivers/storage/ebs/ebs_config_compat.go | 2 + drivers/storage/ebs/executor/ebs_executor.go | 2 + drivers/storage/ebs/storage/ebs_storage.go | 2 + drivers/storage/ebs/tests/ebs_test.go | 2 + drivers/storage/ebs/utils/utils.go | 2 + drivers/storage/ebs/utils/utils_go17.go | 1 + drivers/storage/ebs/utils/utils_pre_go17.go | 1 + drivers/storage/ebs/utils/utils_test.go | 2 + drivers/storage/ebs/utils/utils_unix.go | 1 + drivers/storage/efs/efs.go | 2 + drivers/storage/efs/executor/efs_executor.go | 2 + drivers/storage/efs/storage/efs_storage.go | 2 + drivers/storage/efs/tests/efs_test.go | 2 + drivers/storage/efs/utils/utils.go | 2 + drivers/storage/efs/utils/utils_go17.go | 1 + drivers/storage/efs/utils/utils_pre_go17.go | 1 + drivers/storage/efs/utils/utils_test.go | 2 + .../isilon/executor/isilon_executor.go | 2 + drivers/storage/isilon/isilon.go | 2 + .../storage/isilon/storage/isilon_storage.go | 2 + drivers/storage/isilon/tests/isilon_test.go | 2 + .../rackspace/executor/rackspace_executor.go | 2 + drivers/storage/rackspace/rackspace.go | 2 + .../rackspace/storage/rackspace_storage.go | 2 + .../storage/rackspace/tests/rackspace_test.go | 2 + .../scaleio/executor/scaleio_executor.go | 2 + drivers/storage/scaleio/scaleio.go | 2 + .../scaleio/storage/scaleio_storage.go | 2 + drivers/storage/scaleio/tests/scaleio_test.go | 2 + drivers/storage/vbox/client/vbox_client.go | 2 + .../storage/vbox/client/vbox_client_test.go | 2 + drivers/storage/vbox/client/vbox_machine.go | 2 + drivers/storage/vbox/client/vbox_soap.go | 2 + .../storage/vbox/executor/vbox_executor.go | 2 + drivers/storage/vbox/storage/vbox_storage.go | 2 + drivers/storage/vbox/tests/vbox_test.go | 2 + drivers/storage/vbox/vbox.go | 2 + drivers/storage/vfs/client/vfs_client.go | 2 + drivers/storage/vfs/executor/vfs_executor.go | 2 + drivers/storage/vfs/storage/vfs_storage.go | 2 + .../storage/vfs/storage/vfs_storage_snap.go | 2 + .../storage/vfs/storage/vfs_storage_vol.go | 2 + drivers/storage/vfs/tests/vfs_test.go | 2 + drivers/storage/vfs/vfs.go | 2 + imports/executors/imports_executor.go | 6 +- imports/executors/imports_executor_ebs.go | 8 +++ imports/executors/imports_executor_efs.go | 8 +++ imports/executors/imports_executor_isilon.go | 8 +++ imports/executors/imports_executor_scaleio.go | 8 +++ imports/executors/imports_executor_vbox.go | 8 +++ imports/executors/imports_executor_vfs.go | 8 +++ imports/remote/imports_remote.go | 2 + imports/remote/imports_remote_ebs.go | 8 +++ imports/remote/imports_remote_efs.go | 8 +++ imports/remote/imports_remote_isilon.go | 8 +++ imports/remote/imports_remote_scaleio.go | 8 +++ imports/remote/imports_remote_vbox.go | 8 +++ imports/remote/imports_remote_vfs.go | 8 +++ 62 files changed, 245 insertions(+), 40 deletions(-) create mode 100644 imports/executors/imports_executor_ebs.go create mode 100644 imports/executors/imports_executor_efs.go create mode 100644 imports/executors/imports_executor_isilon.go create mode 100644 imports/executors/imports_executor_scaleio.go create mode 100644 imports/executors/imports_executor_vbox.go create mode 100644 imports/executors/imports_executor_vfs.go create mode 100644 imports/remote/imports_remote_ebs.go create mode 100644 imports/remote/imports_remote_efs.go create mode 100644 imports/remote/imports_remote_isilon.go create mode 100644 imports/remote/imports_remote_scaleio.go create mode 100644 imports/remote/imports_remote_vbox.go create mode 100644 imports/remote/imports_remote_vfs.go diff --git a/.travis.yml b/.travis.yml index 22b25511..333a512c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,13 +9,19 @@ go: os: - linux +env: + - BUILD_TAGS="gofig pflag libstorage_integration_driver_docker libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs" + - BUILD_TAGS="gofig pflag libstorage_integration_driver_docker" + - BUILD_TAGS="" + matrix: allow_failures: - - go: 1.6.3 - - go: tip + - go: 1.6.3 + - go: tip fast_finish: true before_install: + - if [ "$BUILD_TAGS" = "$DEFAULT_BUILD_TAGS" ] && [ "$TRAVIS_GO_VERSION" = "$COVERED_GO_VERSION" ]; then echo coverage enabled; fi - git config --global 'url.https://gopkg.in/yaml.v1.insteadof' 'https://gopkg.in/yaml.v1/' - git config --global 'url.https://gopkg.in/yaml.v2.insteadof' 'https://gopkg.in/yaml.v2/' - git config --global 'url.https://gopkg.in/fsnotify.v1.insteadof' 'https://gopkg.in/fsnotify.v1/' @@ -28,12 +34,11 @@ before_install: script: - make gometalinter-all - make -j build - - make -j test - - VFS_INSTANCEID_USE_FIELDS=true ./drivers/storage/vfs/tests/vfs.test - - go clean -i ./client && go build ./client + - if [ "$BUILD_TAGS" = "$DEFAULT_BUILD_TAGS" ] && [ "$TRAVIS_GO_VERSION" = "$COVERED_GO_VERSION" ]; then make -j test; fi + - if [ "$BUILD_TAGS" = "$DEFAULT_BUILD_TAGS" ] && [ "$TRAVIS_GO_VERSION" = "$COVERED_GO_VERSION" ]; then VFS_INSTANCEID_USE_FIELDS=true ./drivers/storage/vfs/tests/vfs.test; fi after_success: - - make -j cover + - if [ "$BUILD_TAGS" = "$DEFAULT_BUILD_TAGS" ] && [ "$TRAVIS_GO_VERSION" = "$COVERED_GO_VERSION" ]; then make -j cover; fi addons: apt: diff --git a/Makefile b/Makefile index c8fb594a..1c421797 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,15 @@ SHELL := /bin/bash ifeq (undefined,$(origin BUILD_TAGS)) -BUILD_TAGS := gofig pflag libstorage_integration_driver_docker +BUILD_TAGS := gofig \ + pflag \ + libstorage_integration_driver_docker +ifneq (true,$(TRAVIS)) +BUILD_TAGS += libstorage_storage_driver \ + libstorage_storage_driver_vfs \ + libstorage_storage_executor \ + libstorage_storage_executor_vfs +endif endif all: @@ -184,7 +192,7 @@ else GOVERSION := $(shell go version | awk '{print $$3}' | cut -c3-) endif -ifeq (1.7.1,$(TRAVIS_GO_VERSION)) +ifeq (1.7.4,$(TRAVIS_GO_VERSION)) ifeq (linux,$(TRAVIS_OS_NAME)) COVERAGE_ENABLED := 1 endif diff --git a/client/client.go b/client/client.go index ebbfaea8..d0712835 100644 --- a/client/client.go +++ b/client/client.go @@ -62,22 +62,25 @@ func New(goCtx gocontext.Context, config gofig.Config) (types.Client, error) { context.ServiceKey, config.GetString(types.ConfigService)) } - storageDriverName := config.GetString(types.ConfigStorageDriver) - if c.sd, err = registry.NewStorageDriver(storageDriverName); err != nil { - return nil, err - } - if err = c.sd.Init(c.ctx, config); err != nil { - return nil, err - } - if papi, ok := c.sd.(types.ProvidesAPIClient); ok { - c.api = papi.API() - } - if pxli, pxliOk := c.sd.(types.ProvidesStorageExecutorCLI); pxliOk { - c.xli = pxli.XCLI() + storDriverName := config.GetString(types.ConfigStorageDriver) + if storDriverName == "" { + c.ctx.Warn("no storage driver found") + } else { + if c.sd, err = registry.NewStorageDriver(storDriverName); err != nil { + return nil, err + } + if err = c.sd.Init(c.ctx, config); err != nil { + return nil, err + } + if papi, ok := c.sd.(types.ProvidesAPIClient); ok { + c.api = papi.API() + } + if pxli, pxliOk := c.sd.(types.ProvidesStorageExecutorCLI); pxliOk { + c.xli = pxli.XCLI() + } + c.ctx.Info("storage driver initialized") } - c.ctx.Info("storage driver initialized") - // if the API or XLI are nil, then the storage driver is not the libStorage // storage driver, and we should jump avoid any more initialization if c.api == nil || c.xli == nil { @@ -86,23 +89,31 @@ func New(goCtx gocontext.Context, config gofig.Config) (types.Client, error) { } osDriverName := config.GetString(types.ConfigOSDriver) - if c.od, err = registry.NewOSDriver(osDriverName); err != nil { - return nil, err - } - if err = c.od.Init(c.ctx, config); err != nil { - return nil, err + if osDriverName == "" { + c.ctx.Warn("no os driver found") + } else { + if c.od, err = registry.NewOSDriver(osDriverName); err != nil { + return nil, err + } + if err = c.od.Init(c.ctx, config); err != nil { + return nil, err + } + c.ctx.Info("os driver initialized") } - c.ctx.Info("os driver initialized") - integrationDriverName := config.GetString(types.ConfigIntegrationDriver) - if c.id, err = registry.NewIntegrationDriver( - integrationDriverName); err != nil { - return nil, err - } - if err := c.id.Init(c.ctx, config); err != nil { - return nil, err + intDriverName := config.GetString(types.ConfigIntegrationDriver) + if intDriverName == "" { + c.ctx.Warn("no integration driver found") + } else { + if c.id, err = registry.NewIntegrationDriver( + intDriverName); err != nil { + return nil, err + } + if err := c.id.Init(c.ctx, config); err != nil { + return nil, err + } + c.ctx.Info("integration driver initialized") } - c.ctx.Info("integration driver initialized") c.ctx.Info("created libStorage client") return c, nil diff --git a/drivers/storage/ebs/ebs.go b/drivers/storage/ebs/ebs.go index 2237ffb1..3cf15773 100644 --- a/drivers/storage/ebs/ebs.go +++ b/drivers/storage/ebs/ebs.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_ebs + package ebs import ( diff --git a/drivers/storage/ebs/ebs_config_compat.go b/drivers/storage/ebs/ebs_config_compat.go index 99494129..56453e89 100644 --- a/drivers/storage/ebs/ebs_config_compat.go +++ b/drivers/storage/ebs/ebs_config_compat.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_ebs + package ebs import ( diff --git a/drivers/storage/ebs/executor/ebs_executor.go b/drivers/storage/ebs/executor/ebs_executor.go index 315ce916..d9d5cb67 100644 --- a/drivers/storage/ebs/executor/ebs_executor.go +++ b/drivers/storage/ebs/executor/ebs_executor.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_executor libstorage_storage_executor_ebs + package executor import ( diff --git a/drivers/storage/ebs/storage/ebs_storage.go b/drivers/storage/ebs/storage/ebs_storage.go index eed43f42..2588526c 100644 --- a/drivers/storage/ebs/storage/ebs_storage.go +++ b/drivers/storage/ebs/storage/ebs_storage.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_ebs + package storage import ( diff --git a/drivers/storage/ebs/tests/ebs_test.go b/drivers/storage/ebs/tests/ebs_test.go index a527b3fe..692f3471 100644 --- a/drivers/storage/ebs/tests/ebs_test.go +++ b/drivers/storage/ebs/tests/ebs_test.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_ebs + package ebs import ( diff --git a/drivers/storage/ebs/utils/utils.go b/drivers/storage/ebs/utils/utils.go index 1dd7cd00..6088abca 100644 --- a/drivers/storage/ebs/utils/utils.go +++ b/drivers/storage/ebs/utils/utils.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_ebs + package utils import ( diff --git a/drivers/storage/ebs/utils/utils_go17.go b/drivers/storage/ebs/utils/utils_go17.go index 1450aa3f..d36ff5de 100644 --- a/drivers/storage/ebs/utils/utils_go17.go +++ b/drivers/storage/ebs/utils/utils_go17.go @@ -1,4 +1,5 @@ // +build go1.7 +// +build !libstorage_storage_driver libstorage_storage_driver_ebs package utils diff --git a/drivers/storage/ebs/utils/utils_pre_go17.go b/drivers/storage/ebs/utils/utils_pre_go17.go index c55a2d59..51021d6b 100644 --- a/drivers/storage/ebs/utils/utils_pre_go17.go +++ b/drivers/storage/ebs/utils/utils_pre_go17.go @@ -1,4 +1,5 @@ // +build !go1.7 +// +build !libstorage_storage_driver libstorage_storage_driver_ebs package utils diff --git a/drivers/storage/ebs/utils/utils_test.go b/drivers/storage/ebs/utils/utils_test.go index 47ae6bff..537e1d6e 100644 --- a/drivers/storage/ebs/utils/utils_test.go +++ b/drivers/storage/ebs/utils/utils_test.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_ebs + package utils import ( diff --git a/drivers/storage/ebs/utils/utils_unix.go b/drivers/storage/ebs/utils/utils_unix.go index 5f6e5636..e82e0934 100644 --- a/drivers/storage/ebs/utils/utils_unix.go +++ b/drivers/storage/ebs/utils/utils_unix.go @@ -1,4 +1,5 @@ // +build !windows +// +build !libstorage_storage_driver libstorage_storage_driver_ebs package utils diff --git a/drivers/storage/efs/efs.go b/drivers/storage/efs/efs.go index 4e1f517c..abcb7932 100644 --- a/drivers/storage/efs/efs.go +++ b/drivers/storage/efs/efs.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_efs + package efs import ( diff --git a/drivers/storage/efs/executor/efs_executor.go b/drivers/storage/efs/executor/efs_executor.go index c36ac2d0..55a5f322 100644 --- a/drivers/storage/efs/executor/efs_executor.go +++ b/drivers/storage/efs/executor/efs_executor.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_executor libstorage_storage_executor_efs + package executor import ( diff --git a/drivers/storage/efs/storage/efs_storage.go b/drivers/storage/efs/storage/efs_storage.go index f7274a81..4af17941 100644 --- a/drivers/storage/efs/storage/efs_storage.go +++ b/drivers/storage/efs/storage/efs_storage.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_efs + package storage import ( diff --git a/drivers/storage/efs/tests/efs_test.go b/drivers/storage/efs/tests/efs_test.go index ff1dc08e..7c880974 100644 --- a/drivers/storage/efs/tests/efs_test.go +++ b/drivers/storage/efs/tests/efs_test.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_efs + package efs import ( diff --git a/drivers/storage/efs/utils/utils.go b/drivers/storage/efs/utils/utils.go index 453ffa20..ab41b0c3 100644 --- a/drivers/storage/efs/utils/utils.go +++ b/drivers/storage/efs/utils/utils.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_efs + package utils import ( diff --git a/drivers/storage/efs/utils/utils_go17.go b/drivers/storage/efs/utils/utils_go17.go index 1450aa3f..348e9a86 100644 --- a/drivers/storage/efs/utils/utils_go17.go +++ b/drivers/storage/efs/utils/utils_go17.go @@ -1,4 +1,5 @@ // +build go1.7 +// +build !libstorage_storage_driver libstorage_storage_driver_efs package utils diff --git a/drivers/storage/efs/utils/utils_pre_go17.go b/drivers/storage/efs/utils/utils_pre_go17.go index c55a2d59..a1c73c43 100644 --- a/drivers/storage/efs/utils/utils_pre_go17.go +++ b/drivers/storage/efs/utils/utils_pre_go17.go @@ -1,4 +1,5 @@ // +build !go1.7 +// +build !libstorage_storage_driver libstorage_storage_driver_efs package utils diff --git a/drivers/storage/efs/utils/utils_test.go b/drivers/storage/efs/utils/utils_test.go index dc624bc7..6deec0a8 100644 --- a/drivers/storage/efs/utils/utils_test.go +++ b/drivers/storage/efs/utils/utils_test.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_efs + package utils import ( diff --git a/drivers/storage/isilon/executor/isilon_executor.go b/drivers/storage/isilon/executor/isilon_executor.go index f318a8d9..923da300 100644 --- a/drivers/storage/isilon/executor/isilon_executor.go +++ b/drivers/storage/isilon/executor/isilon_executor.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_executor libstorage_storage_executor_isilon + package executor import ( diff --git a/drivers/storage/isilon/isilon.go b/drivers/storage/isilon/isilon.go index 85361c86..dbb2de11 100644 --- a/drivers/storage/isilon/isilon.go +++ b/drivers/storage/isilon/isilon.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_isilon + package isilon import ( diff --git a/drivers/storage/isilon/storage/isilon_storage.go b/drivers/storage/isilon/storage/isilon_storage.go index a89bf3e8..1dd3e48c 100644 --- a/drivers/storage/isilon/storage/isilon_storage.go +++ b/drivers/storage/isilon/storage/isilon_storage.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_isilon + package storage import ( diff --git a/drivers/storage/isilon/tests/isilon_test.go b/drivers/storage/isilon/tests/isilon_test.go index 86e63810..cf0dc5e2 100644 --- a/drivers/storage/isilon/tests/isilon_test.go +++ b/drivers/storage/isilon/tests/isilon_test.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_isilon + package isilon import ( diff --git a/drivers/storage/rackspace/executor/rackspace_executor.go b/drivers/storage/rackspace/executor/rackspace_executor.go index 453731ac..f313c6f6 100644 --- a/drivers/storage/rackspace/executor/rackspace_executor.go +++ b/drivers/storage/rackspace/executor/rackspace_executor.go @@ -1,3 +1,5 @@ +// +build none + package executor import ( diff --git a/drivers/storage/rackspace/rackspace.go b/drivers/storage/rackspace/rackspace.go index adf8584e..71b0f023 100644 --- a/drivers/storage/rackspace/rackspace.go +++ b/drivers/storage/rackspace/rackspace.go @@ -1,3 +1,5 @@ +// +build none + package rackspace import ( diff --git a/drivers/storage/rackspace/storage/rackspace_storage.go b/drivers/storage/rackspace/storage/rackspace_storage.go index 1c56294f..d63ab184 100644 --- a/drivers/storage/rackspace/storage/rackspace_storage.go +++ b/drivers/storage/rackspace/storage/rackspace_storage.go @@ -1,3 +1,5 @@ +// +build none + package storage import ( diff --git a/drivers/storage/rackspace/tests/rackspace_test.go b/drivers/storage/rackspace/tests/rackspace_test.go index 032591c2..a3a4fcc5 100644 --- a/drivers/storage/rackspace/tests/rackspace_test.go +++ b/drivers/storage/rackspace/tests/rackspace_test.go @@ -1,3 +1,5 @@ +// +build none + package rackspace import ( diff --git a/drivers/storage/scaleio/executor/scaleio_executor.go b/drivers/storage/scaleio/executor/scaleio_executor.go index 59562663..04b5fd9e 100644 --- a/drivers/storage/scaleio/executor/scaleio_executor.go +++ b/drivers/storage/scaleio/executor/scaleio_executor.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_executor libstorage_storage_executor_scaleio + package executor import ( diff --git a/drivers/storage/scaleio/scaleio.go b/drivers/storage/scaleio/scaleio.go index 42142a18..9fe733cf 100644 --- a/drivers/storage/scaleio/scaleio.go +++ b/drivers/storage/scaleio/scaleio.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_scaleio + package scaleio import ( diff --git a/drivers/storage/scaleio/storage/scaleio_storage.go b/drivers/storage/scaleio/storage/scaleio_storage.go index 32c9fd05..d9f1781f 100644 --- a/drivers/storage/scaleio/storage/scaleio_storage.go +++ b/drivers/storage/scaleio/storage/scaleio_storage.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_scaleio + package storage import ( diff --git a/drivers/storage/scaleio/tests/scaleio_test.go b/drivers/storage/scaleio/tests/scaleio_test.go index 672688b7..e232be6c 100644 --- a/drivers/storage/scaleio/tests/scaleio_test.go +++ b/drivers/storage/scaleio/tests/scaleio_test.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_scaleio + package scaleio import ( diff --git a/drivers/storage/vbox/client/vbox_client.go b/drivers/storage/vbox/client/vbox_client.go index ef996270..e8f8ffe3 100644 --- a/drivers/storage/vbox/client/vbox_client.go +++ b/drivers/storage/vbox/client/vbox_client.go @@ -1,3 +1,5 @@ +// +build none + package client import ( diff --git a/drivers/storage/vbox/client/vbox_client_test.go b/drivers/storage/vbox/client/vbox_client_test.go index 50270990..016f1157 100644 --- a/drivers/storage/vbox/client/vbox_client_test.go +++ b/drivers/storage/vbox/client/vbox_client_test.go @@ -1,3 +1,5 @@ +// +build none + package client import ( diff --git a/drivers/storage/vbox/client/vbox_machine.go b/drivers/storage/vbox/client/vbox_machine.go index b47bec57..50185370 100644 --- a/drivers/storage/vbox/client/vbox_machine.go +++ b/drivers/storage/vbox/client/vbox_machine.go @@ -1,3 +1,5 @@ +// +build none + package client // Machine represents an installed virtual machine in vbox. diff --git a/drivers/storage/vbox/client/vbox_soap.go b/drivers/storage/vbox/client/vbox_soap.go index 97667138..7958e74b 100644 --- a/drivers/storage/vbox/client/vbox_soap.go +++ b/drivers/storage/vbox/client/vbox_soap.go @@ -1,3 +1,5 @@ +// +build none + package client import "encoding/xml" diff --git a/drivers/storage/vbox/executor/vbox_executor.go b/drivers/storage/vbox/executor/vbox_executor.go index 4f274f8d..9ce1bcfe 100644 --- a/drivers/storage/vbox/executor/vbox_executor.go +++ b/drivers/storage/vbox/executor/vbox_executor.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_executor libstorage_storage_executor_vbox + package executor import ( diff --git a/drivers/storage/vbox/storage/vbox_storage.go b/drivers/storage/vbox/storage/vbox_storage.go index f9b45686..7fa2d11b 100644 --- a/drivers/storage/vbox/storage/vbox_storage.go +++ b/drivers/storage/vbox/storage/vbox_storage.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_vbox + package storage import ( diff --git a/drivers/storage/vbox/tests/vbox_test.go b/drivers/storage/vbox/tests/vbox_test.go index c7390754..0bc43373 100644 --- a/drivers/storage/vbox/tests/vbox_test.go +++ b/drivers/storage/vbox/tests/vbox_test.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_vbox + package vbox import ( diff --git a/drivers/storage/vbox/vbox.go b/drivers/storage/vbox/vbox.go index b6883b75..6bfd97b0 100644 --- a/drivers/storage/vbox/vbox.go +++ b/drivers/storage/vbox/vbox.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_vbox + package vbox import ( diff --git a/drivers/storage/vfs/client/vfs_client.go b/drivers/storage/vfs/client/vfs_client.go index 424c11a2..5083f169 100644 --- a/drivers/storage/vfs/client/vfs_client.go +++ b/drivers/storage/vfs/client/vfs_client.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_vfs + package client import ( diff --git a/drivers/storage/vfs/executor/vfs_executor.go b/drivers/storage/vfs/executor/vfs_executor.go index 02744e2f..3ebbf2e8 100644 --- a/drivers/storage/vfs/executor/vfs_executor.go +++ b/drivers/storage/vfs/executor/vfs_executor.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_executor libstorage_storage_executor_vfs + package executor import ( diff --git a/drivers/storage/vfs/storage/vfs_storage.go b/drivers/storage/vfs/storage/vfs_storage.go index 55417b00..259e8c11 100644 --- a/drivers/storage/vfs/storage/vfs_storage.go +++ b/drivers/storage/vfs/storage/vfs_storage.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_vfs + package storage import ( diff --git a/drivers/storage/vfs/storage/vfs_storage_snap.go b/drivers/storage/vfs/storage/vfs_storage_snap.go index 453203f7..d5d36bbd 100644 --- a/drivers/storage/vfs/storage/vfs_storage_snap.go +++ b/drivers/storage/vfs/storage/vfs_storage_snap.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_vfs + package storage import ( diff --git a/drivers/storage/vfs/storage/vfs_storage_vol.go b/drivers/storage/vfs/storage/vfs_storage_vol.go index 8e767ecb..e5d97362 100644 --- a/drivers/storage/vfs/storage/vfs_storage_vol.go +++ b/drivers/storage/vfs/storage/vfs_storage_vol.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_vfs + package storage import ( diff --git a/drivers/storage/vfs/tests/vfs_test.go b/drivers/storage/vfs/tests/vfs_test.go index 43cab2c2..e7a1e238 100644 --- a/drivers/storage/vfs/tests/vfs_test.go +++ b/drivers/storage/vfs/tests/vfs_test.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_vfs + package vfs import ( diff --git a/drivers/storage/vfs/vfs.go b/drivers/storage/vfs/vfs.go index 0512c360..884d3d23 100644 --- a/drivers/storage/vfs/vfs.go +++ b/drivers/storage/vfs/vfs.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver libstorage_storage_driver_vfs + package vfs import ( diff --git a/imports/executors/imports_executor.go b/imports/executors/imports_executor.go index b64d9f76..9b792f68 100644 --- a/imports/executors/imports_executor.go +++ b/imports/executors/imports_executor.go @@ -1,15 +1,13 @@ +// +build !libstorage_storage_executor + package executors import ( // load the storage executors _ "github.com/codedellemc/libstorage/drivers/storage/ebs/executor" _ "github.com/codedellemc/libstorage/drivers/storage/efs/executor" - //_ "github.com/codedellemc/libstorage/drivers/storage/gce/executor" _ "github.com/codedellemc/libstorage/drivers/storage/isilon/executor" - //_ "github.com/codedellemc/libstorage/drivers/storage/openstack/executor" _ "github.com/codedellemc/libstorage/drivers/storage/scaleio/executor" _ "github.com/codedellemc/libstorage/drivers/storage/vbox/executor" _ "github.com/codedellemc/libstorage/drivers/storage/vfs/executor" - //_ "github.com/codedellemc/libstorage/drivers/storage/vmax/executor" - //_ "github.com/codedellemc/libstorage/drivers/storage/xtremio/executor" ) diff --git a/imports/executors/imports_executor_ebs.go b/imports/executors/imports_executor_ebs.go new file mode 100644 index 00000000..35e14600 --- /dev/null +++ b/imports/executors/imports_executor_ebs.go @@ -0,0 +1,8 @@ +// +build libstorage_storage_executor,libstorage_storage_executor_ebs + +package executors + +import ( + // load the packages + _ "github.com/codedellemc/libstorage/drivers/storage/ebs/executor" +) diff --git a/imports/executors/imports_executor_efs.go b/imports/executors/imports_executor_efs.go new file mode 100644 index 00000000..efe64f6f --- /dev/null +++ b/imports/executors/imports_executor_efs.go @@ -0,0 +1,8 @@ +// +build libstorage_storage_executor,libstorage_storage_executor_efs + +package executors + +import ( + // load the packages + _ "github.com/codedellemc/libstorage/drivers/storage/efs/executor" +) diff --git a/imports/executors/imports_executor_isilon.go b/imports/executors/imports_executor_isilon.go new file mode 100644 index 00000000..4a10fc93 --- /dev/null +++ b/imports/executors/imports_executor_isilon.go @@ -0,0 +1,8 @@ +// +build libstorage_storage_executor,libstorage_storage_executor_isilon + +package executors + +import ( + // load the packages + _ "github.com/codedellemc/libstorage/drivers/storage/isilon/executor" +) diff --git a/imports/executors/imports_executor_scaleio.go b/imports/executors/imports_executor_scaleio.go new file mode 100644 index 00000000..329bc8e7 --- /dev/null +++ b/imports/executors/imports_executor_scaleio.go @@ -0,0 +1,8 @@ +// +build libstorage_storage_executor,libstorage_storage_executor_scaleio + +package executors + +import ( + // load the packages + _ "github.com/codedellemc/libstorage/drivers/storage/scaleio/executor" +) diff --git a/imports/executors/imports_executor_vbox.go b/imports/executors/imports_executor_vbox.go new file mode 100644 index 00000000..05440bc8 --- /dev/null +++ b/imports/executors/imports_executor_vbox.go @@ -0,0 +1,8 @@ +// +build libstorage_storage_executor,libstorage_storage_executor_vbox + +package executors + +import ( + // load the packages + _ "github.com/codedellemc/libstorage/drivers/storage/vbox/executor" +) diff --git a/imports/executors/imports_executor_vfs.go b/imports/executors/imports_executor_vfs.go new file mode 100644 index 00000000..02ad97dd --- /dev/null +++ b/imports/executors/imports_executor_vfs.go @@ -0,0 +1,8 @@ +// +build libstorage_storage_executor,libstorage_storage_executor_vfs + +package executors + +import ( + // load the packages + _ "github.com/codedellemc/libstorage/drivers/storage/vfs/executor" +) diff --git a/imports/remote/imports_remote.go b/imports/remote/imports_remote.go index cd6d1d0c..34535df3 100644 --- a/imports/remote/imports_remote.go +++ b/imports/remote/imports_remote.go @@ -1,3 +1,5 @@ +// +build !libstorage_storage_driver + package remote import ( diff --git a/imports/remote/imports_remote_ebs.go b/imports/remote/imports_remote_ebs.go new file mode 100644 index 00000000..477996a6 --- /dev/null +++ b/imports/remote/imports_remote_ebs.go @@ -0,0 +1,8 @@ +// +build libstorage_storage_driver,libstorage_storage_driver_ebs + +package remote + +import ( + // load the packages + _ "github.com/codedellemc/libstorage/drivers/storage/ebs/storage" +) diff --git a/imports/remote/imports_remote_efs.go b/imports/remote/imports_remote_efs.go new file mode 100644 index 00000000..8fc70722 --- /dev/null +++ b/imports/remote/imports_remote_efs.go @@ -0,0 +1,8 @@ +// +build libstorage_storage_driver,libstorage_storage_driver_efs + +package remote + +import ( + // load the packages + _ "github.com/codedellemc/libstorage/drivers/storage/efs/storage" +) diff --git a/imports/remote/imports_remote_isilon.go b/imports/remote/imports_remote_isilon.go new file mode 100644 index 00000000..488da260 --- /dev/null +++ b/imports/remote/imports_remote_isilon.go @@ -0,0 +1,8 @@ +// +build libstorage_storage_driver,libstorage_storage_driver_isilon + +package remote + +import ( + // load the packages + _ "github.com/codedellemc/libstorage/drivers/storage/isilon/storage" +) diff --git a/imports/remote/imports_remote_scaleio.go b/imports/remote/imports_remote_scaleio.go new file mode 100644 index 00000000..8179f20b --- /dev/null +++ b/imports/remote/imports_remote_scaleio.go @@ -0,0 +1,8 @@ +// +build libstorage_storage_driver,libstorage_storage_driver_scaleio + +package remote + +import ( + // load the packages + _ "github.com/codedellemc/libstorage/drivers/storage/scaleio/storage" +) diff --git a/imports/remote/imports_remote_vbox.go b/imports/remote/imports_remote_vbox.go new file mode 100644 index 00000000..8fbe0eeb --- /dev/null +++ b/imports/remote/imports_remote_vbox.go @@ -0,0 +1,8 @@ +// +build libstorage_storage_driver,libstorage_storage_driver_vbox + +package remote + +import ( + // load the packages + _ "github.com/codedellemc/libstorage/drivers/storage/vbox/storage" +) diff --git a/imports/remote/imports_remote_vfs.go b/imports/remote/imports_remote_vfs.go new file mode 100644 index 00000000..a56f89b7 --- /dev/null +++ b/imports/remote/imports_remote_vfs.go @@ -0,0 +1,8 @@ +// +build libstorage_storage_driver,libstorage_storage_driver_vfs + +package remote + +import ( + // load the packages + _ "github.com/codedellemc/libstorage/drivers/storage/vfs/storage" +)