id
int32
0
167k
repo
stringlengths
5
54
path
stringlengths
4
155
func_name
stringlengths
1
118
original_string
stringlengths
52
85.5k
language
stringclasses
1 value
code
stringlengths
52
85.5k
code_tokens
listlengths
21
1.41k
docstring
stringlengths
6
2.61k
docstring_tokens
listlengths
3
215
sha
stringlengths
40
40
url
stringlengths
85
252
143,800
libopenstorage/openstorage
graph/drivers/layer0/layer0.go
Exists
func (l *Layer0) Exists(id string) bool { id = l.realID(id) return l.Driver.Exists(id) }
go
func (l *Layer0) Exists(id string) bool { id = l.realID(id) return l.Driver.Exists(id) }
[ "func", "(", "l", "*", "Layer0", ")", "Exists", "(", "id", "string", ")", "bool", "{", "id", "=", "l", ".", "realID", "(", "id", ")", "\n", "return", "l", ".", "Driver", ".", "Exists", "(", "id", ")", "\n", "}" ]
// Exists checks if leyr exists
[ "Exists", "checks", "if", "leyr", "exists" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/graph/drivers/layer0/layer0.go#L291-L294
143,801
libopenstorage/openstorage
graph/drivers/layer0/layer0.go
GetMetadata
func (l *Layer0) GetMetadata(id string) (map[string]string, error) { id = l.realID(id) return l.Driver.GetMetadata(id) }
go
func (l *Layer0) GetMetadata(id string) (map[string]string, error) { id = l.realID(id) return l.Driver.GetMetadata(id) }
[ "func", "(", "l", "*", "Layer0", ")", "GetMetadata", "(", "id", "string", ")", "(", "map", "[", "string", "]", "string", ",", "error", ")", "{", "id", "=", "l", ".", "realID", "(", "id", ")", "\n", "return", "l", ".", "Driver", ".", "GetMetadata", "(", "id", ")", "\n", "}" ]
// GetMetadata returns key-value pairs
[ "GetMetadata", "returns", "key", "-", "value", "pairs" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/graph/drivers/layer0/layer0.go#L297-L300
143,802
libopenstorage/openstorage
pkg/auth/userinfo.go
ContextSaveUserInfo
func ContextSaveUserInfo(ctx context.Context, u *UserInfo) context.Context { return context.WithValue(ctx, InterceptorContextTokenKey, u) }
go
func ContextSaveUserInfo(ctx context.Context, u *UserInfo) context.Context { return context.WithValue(ctx, InterceptorContextTokenKey, u) }
[ "func", "ContextSaveUserInfo", "(", "ctx", "context", ".", "Context", ",", "u", "*", "UserInfo", ")", "context", ".", "Context", "{", "return", "context", ".", "WithValue", "(", "ctx", ",", "InterceptorContextTokenKey", ",", "u", ")", "\n", "}" ]
// ContextSaveUserInfo saves user information in the context for other functions to consume
[ "ContextSaveUserInfo", "saves", "user", "information", "in", "the", "context", "for", "other", "functions", "to", "consume" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/pkg/auth/userinfo.go#L43-L45
143,803
libopenstorage/openstorage
pkg/auth/userinfo.go
NewUserInfoFromContext
func NewUserInfoFromContext(ctx context.Context) (*UserInfo, bool) { u, ok := ctx.Value(InterceptorContextTokenKey).(*UserInfo) return u, ok }
go
func NewUserInfoFromContext(ctx context.Context) (*UserInfo, bool) { u, ok := ctx.Value(InterceptorContextTokenKey).(*UserInfo) return u, ok }
[ "func", "NewUserInfoFromContext", "(", "ctx", "context", ".", "Context", ")", "(", "*", "UserInfo", ",", "bool", ")", "{", "u", ",", "ok", ":=", "ctx", ".", "Value", "(", "InterceptorContextTokenKey", ")", ".", "(", "*", "UserInfo", ")", "\n", "return", "u", ",", "ok", "\n", "}" ]
// NewUserInfoFromContext returns user information in the context if available. // If not available means that the system is running without auth.
[ "NewUserInfoFromContext", "returns", "user", "information", "in", "the", "context", "if", "available", ".", "If", "not", "available", "means", "that", "the", "system", "is", "running", "without", "auth", "." ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/pkg/auth/userinfo.go#L49-L52
143,804
libopenstorage/openstorage
api/server/sdk/server.go
New
func New(config *ServerConfig) (*Server, error) { if config == nil { return nil, fmt.Errorf("Must provide configuration") } // If no security set, initialize the object as empty if config.Security == nil { config.Security = &SecurityConfig{} } // Check if the socket is provided to enable the REST gateway to communicate // to the unix domain socket if len(config.Socket) == 0 { return nil, fmt.Errorf("Must provide unix domain socket for SDK") } if len(config.RestPort) == 0 { return nil, fmt.Errorf("Must provide REST Gateway port for the SDK") } // Set default log locations var ( accessLog, auditLog *os.File err error ) if config.AuditOutput == nil { auditLog, err = openLog(defaultAuditLog) if err != nil { return nil, err } config.AuditOutput = auditLog } if config.AccessOutput == nil { accessLog, err := openLog(defaultAccessLog) if err != nil { return nil, err } config.AccessOutput = accessLog } // Create a gRPC server on the network netServer, err := newSdkGrpcServer(config) if err != nil { return nil, err } // Create a gRPC server on a unix domain socket udsConfig := *config udsConfig.Net = "unix" udsConfig.Address = config.Socket udsServer, err := newSdkGrpcServer(&udsConfig) if err != nil { return nil, err } // Create REST Gateway and connect it to the unix domain socket server restGateway, err := newSdkRestGateway(config, udsServer) if err != nil { return nil, err } return &Server{ config: *config, netServer: netServer, udsServer: udsServer, restGateway: restGateway, auditLog: auditLog, accessLog: accessLog, }, nil }
go
func New(config *ServerConfig) (*Server, error) { if config == nil { return nil, fmt.Errorf("Must provide configuration") } // If no security set, initialize the object as empty if config.Security == nil { config.Security = &SecurityConfig{} } // Check if the socket is provided to enable the REST gateway to communicate // to the unix domain socket if len(config.Socket) == 0 { return nil, fmt.Errorf("Must provide unix domain socket for SDK") } if len(config.RestPort) == 0 { return nil, fmt.Errorf("Must provide REST Gateway port for the SDK") } // Set default log locations var ( accessLog, auditLog *os.File err error ) if config.AuditOutput == nil { auditLog, err = openLog(defaultAuditLog) if err != nil { return nil, err } config.AuditOutput = auditLog } if config.AccessOutput == nil { accessLog, err := openLog(defaultAccessLog) if err != nil { return nil, err } config.AccessOutput = accessLog } // Create a gRPC server on the network netServer, err := newSdkGrpcServer(config) if err != nil { return nil, err } // Create a gRPC server on a unix domain socket udsConfig := *config udsConfig.Net = "unix" udsConfig.Address = config.Socket udsServer, err := newSdkGrpcServer(&udsConfig) if err != nil { return nil, err } // Create REST Gateway and connect it to the unix domain socket server restGateway, err := newSdkRestGateway(config, udsServer) if err != nil { return nil, err } return &Server{ config: *config, netServer: netServer, udsServer: udsServer, restGateway: restGateway, auditLog: auditLog, accessLog: accessLog, }, nil }
[ "func", "New", "(", "config", "*", "ServerConfig", ")", "(", "*", "Server", ",", "error", ")", "{", "if", "config", "==", "nil", "{", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ")", "\n", "}", "\n\n", "// If no security set, initialize the object as empty", "if", "config", ".", "Security", "==", "nil", "{", "config", ".", "Security", "=", "&", "SecurityConfig", "{", "}", "\n", "}", "\n\n", "// Check if the socket is provided to enable the REST gateway to communicate", "// to the unix domain socket", "if", "len", "(", "config", ".", "Socket", ")", "==", "0", "{", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ")", "\n", "}", "\n", "if", "len", "(", "config", ".", "RestPort", ")", "==", "0", "{", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ")", "\n", "}", "\n\n", "// Set default log locations", "var", "(", "accessLog", ",", "auditLog", "*", "os", ".", "File", "\n", "err", "error", "\n", ")", "\n", "if", "config", ".", "AuditOutput", "==", "nil", "{", "auditLog", ",", "err", "=", "openLog", "(", "defaultAuditLog", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "config", ".", "AuditOutput", "=", "auditLog", "\n", "}", "\n", "if", "config", ".", "AccessOutput", "==", "nil", "{", "accessLog", ",", "err", ":=", "openLog", "(", "defaultAccessLog", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "config", ".", "AccessOutput", "=", "accessLog", "\n", "}", "\n\n", "// Create a gRPC server on the network", "netServer", ",", "err", ":=", "newSdkGrpcServer", "(", "config", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// Create a gRPC server on a unix domain socket", "udsConfig", ":=", "*", "config", "\n", "udsConfig", ".", "Net", "=", "\"", "\"", "\n", "udsConfig", ".", "Address", "=", "config", ".", "Socket", "\n", "udsServer", ",", "err", ":=", "newSdkGrpcServer", "(", "&", "udsConfig", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// Create REST Gateway and connect it to the unix domain socket server", "restGateway", ",", "err", ":=", "newSdkRestGateway", "(", "config", ",", "udsServer", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "Server", "{", "config", ":", "*", "config", ",", "netServer", ":", "netServer", ",", "udsServer", ":", "udsServer", ",", "restGateway", ":", "restGateway", ",", "auditLog", ":", "auditLog", ",", "accessLog", ":", "accessLog", ",", "}", ",", "nil", "\n", "}" ]
// New creates a new SDK server
[ "New", "creates", "a", "new", "SDK", "server" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/server/sdk/server.go#L183-L252
143,805
libopenstorage/openstorage
api/server/sdk/server.go
Start
func (s *Server) Start() error { if err := s.netServer.Start(); err != nil { return err } else if err := s.udsServer.Start(); err != nil { return err } else if err := s.restGateway.Start(); err != nil { return err } return nil }
go
func (s *Server) Start() error { if err := s.netServer.Start(); err != nil { return err } else if err := s.udsServer.Start(); err != nil { return err } else if err := s.restGateway.Start(); err != nil { return err } return nil }
[ "func", "(", "s", "*", "Server", ")", "Start", "(", ")", "error", "{", "if", "err", ":=", "s", ".", "netServer", ".", "Start", "(", ")", ";", "err", "!=", "nil", "{", "return", "err", "\n", "}", "else", "if", "err", ":=", "s", ".", "udsServer", ".", "Start", "(", ")", ";", "err", "!=", "nil", "{", "return", "err", "\n", "}", "else", "if", "err", ":=", "s", ".", "restGateway", ".", "Start", "(", ")", ";", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n\n", "return", "nil", "\n", "}" ]
// Start all servers
[ "Start", "all", "servers" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/server/sdk/server.go#L255-L265
143,806
libopenstorage/openstorage
api/server/sdk/server.go
UseCluster
func (s *Server) UseCluster(c cluster.Cluster) { s.netServer.useCluster(c) s.udsServer.useCluster(c) }
go
func (s *Server) UseCluster(c cluster.Cluster) { s.netServer.useCluster(c) s.udsServer.useCluster(c) }
[ "func", "(", "s", "*", "Server", ")", "UseCluster", "(", "c", "cluster", ".", "Cluster", ")", "{", "s", ".", "netServer", ".", "useCluster", "(", "c", ")", "\n", "s", ".", "udsServer", ".", "useCluster", "(", "c", ")", "\n", "}" ]
// UseCluster will setup a new cluster object for the gRPC handlers
[ "UseCluster", "will", "setup", "a", "new", "cluster", "object", "for", "the", "gRPC", "handlers" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/server/sdk/server.go#L289-L292
143,807
libopenstorage/openstorage
api/server/sdk/server.go
UseVolumeDrivers
func (s *Server) UseVolumeDrivers(d map[string]volume.VolumeDriver) { s.netServer.useVolumeDrivers(d) s.udsServer.useVolumeDrivers(d) }
go
func (s *Server) UseVolumeDrivers(d map[string]volume.VolumeDriver) { s.netServer.useVolumeDrivers(d) s.udsServer.useVolumeDrivers(d) }
[ "func", "(", "s", "*", "Server", ")", "UseVolumeDrivers", "(", "d", "map", "[", "string", "]", "volume", ".", "VolumeDriver", ")", "{", "s", ".", "netServer", ".", "useVolumeDrivers", "(", "d", ")", "\n", "s", ".", "udsServer", ".", "useVolumeDrivers", "(", "d", ")", "\n", "}" ]
// UseVolumeDrivers will setup a new driver object for the gRPC handlers
[ "UseVolumeDrivers", "will", "setup", "a", "new", "driver", "object", "for", "the", "gRPC", "handlers" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/server/sdk/server.go#L295-L298
143,808
libopenstorage/openstorage
api/server/sdk/server.go
UseAlert
func (s *Server) UseAlert(a alerts.FilterDeleter) { s.netServer.useAlert(a) s.udsServer.useAlert(a) }
go
func (s *Server) UseAlert(a alerts.FilterDeleter) { s.netServer.useAlert(a) s.udsServer.useAlert(a) }
[ "func", "(", "s", "*", "Server", ")", "UseAlert", "(", "a", "alerts", ".", "FilterDeleter", ")", "{", "s", ".", "netServer", ".", "useAlert", "(", "a", ")", "\n", "s", ".", "udsServer", ".", "useAlert", "(", "a", ")", "\n", "}" ]
// UseAlert will setup a new alert object for the gRPC handlers
[ "UseAlert", "will", "setup", "a", "new", "alert", "object", "for", "the", "gRPC", "handlers" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/server/sdk/server.go#L301-L304
143,809
libopenstorage/openstorage
api/server/sdk/server.go
newSdkGrpcServer
func newSdkGrpcServer(config *ServerConfig) (*sdkGrpcServer, error) { if nil == config { return nil, fmt.Errorf("Configuration must be provided") } // Create a log object for this server name := "SDK-" + config.Net log := logrus.WithFields(logrus.Fields{ "name": name, }) // Save the driver for future calls var ( d volume.VolumeDriver err error ) if len(config.DriverName) != 0 { d, err = volumedrivers.Get(config.DriverName) if err != nil { return nil, fmt.Errorf("Unable to get driver %s info: %s", config.DriverName, err.Error()) } } // Setup authentication for issuer, _ := range config.Security.Authenticators { log.Infof("Authentication enabled for issuer: %s", issuer) // Check the necessary security config options are set if config.Security.Role == nil { return nil, fmt.Errorf("Must supply role manager when authentication enabled") } } if config.StoragePolicy == nil { return nil, fmt.Errorf("Must supply storage policy server") } // Create gRPC server gServer, err := grpcserver.New(&grpcserver.GrpcServerConfig{ Name: name, Net: config.Net, Address: config.Address, }) if err != nil { return nil, fmt.Errorf("Unable to setup %s server: %v", name, err) } s := &sdkGrpcServer{ GrpcServer: gServer, accessLogOutput: config.AccessOutput, auditLogOutput: config.AuditOutput, config: *config, name: name, log: log, clusterHandler: config.Cluster, driverHandlers: map[string]volume.VolumeDriver{ config.DriverName: d, DefaultDriverName: d, }, alertHandler: config.AlertsFilterDeleter, policyServer: config.StoragePolicy, } s.identityServer = &IdentityServer{ server: s, } s.clusterServer = &ClusterServer{ server: s, } s.nodeServer = &NodeServer{ server: s, } s.volumeServer = &VolumeServer{ server: s, specHandler: spec.NewSpecHandler(), } s.objectstoreServer = &ObjectstoreServer{ server: s, } s.schedulePolicyServer = &SchedulePolicyServer{ server: s, } s.cloudBackupServer = &CloudBackupServer{ server: s, } s.credentialServer = &CredentialServer{ server: s, } s.alertsServer = &alertsServer{ server: s, } s.clusterPairServer = &ClusterPairServer{ server: s, } s.clusterDomainsServer = &ClusterDomainsServer{ server: s, } s.roleServer = config.Security.Role s.policyServer = config.StoragePolicy return s, nil }
go
func newSdkGrpcServer(config *ServerConfig) (*sdkGrpcServer, error) { if nil == config { return nil, fmt.Errorf("Configuration must be provided") } // Create a log object for this server name := "SDK-" + config.Net log := logrus.WithFields(logrus.Fields{ "name": name, }) // Save the driver for future calls var ( d volume.VolumeDriver err error ) if len(config.DriverName) != 0 { d, err = volumedrivers.Get(config.DriverName) if err != nil { return nil, fmt.Errorf("Unable to get driver %s info: %s", config.DriverName, err.Error()) } } // Setup authentication for issuer, _ := range config.Security.Authenticators { log.Infof("Authentication enabled for issuer: %s", issuer) // Check the necessary security config options are set if config.Security.Role == nil { return nil, fmt.Errorf("Must supply role manager when authentication enabled") } } if config.StoragePolicy == nil { return nil, fmt.Errorf("Must supply storage policy server") } // Create gRPC server gServer, err := grpcserver.New(&grpcserver.GrpcServerConfig{ Name: name, Net: config.Net, Address: config.Address, }) if err != nil { return nil, fmt.Errorf("Unable to setup %s server: %v", name, err) } s := &sdkGrpcServer{ GrpcServer: gServer, accessLogOutput: config.AccessOutput, auditLogOutput: config.AuditOutput, config: *config, name: name, log: log, clusterHandler: config.Cluster, driverHandlers: map[string]volume.VolumeDriver{ config.DriverName: d, DefaultDriverName: d, }, alertHandler: config.AlertsFilterDeleter, policyServer: config.StoragePolicy, } s.identityServer = &IdentityServer{ server: s, } s.clusterServer = &ClusterServer{ server: s, } s.nodeServer = &NodeServer{ server: s, } s.volumeServer = &VolumeServer{ server: s, specHandler: spec.NewSpecHandler(), } s.objectstoreServer = &ObjectstoreServer{ server: s, } s.schedulePolicyServer = &SchedulePolicyServer{ server: s, } s.cloudBackupServer = &CloudBackupServer{ server: s, } s.credentialServer = &CredentialServer{ server: s, } s.alertsServer = &alertsServer{ server: s, } s.clusterPairServer = &ClusterPairServer{ server: s, } s.clusterDomainsServer = &ClusterDomainsServer{ server: s, } s.roleServer = config.Security.Role s.policyServer = config.StoragePolicy return s, nil }
[ "func", "newSdkGrpcServer", "(", "config", "*", "ServerConfig", ")", "(", "*", "sdkGrpcServer", ",", "error", ")", "{", "if", "nil", "==", "config", "{", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ")", "\n", "}", "\n\n", "// Create a log object for this server", "name", ":=", "\"", "\"", "+", "config", ".", "Net", "\n", "log", ":=", "logrus", ".", "WithFields", "(", "logrus", ".", "Fields", "{", "\"", "\"", ":", "name", ",", "}", ")", "\n\n", "// Save the driver for future calls", "var", "(", "d", "volume", ".", "VolumeDriver", "\n", "err", "error", "\n", ")", "\n", "if", "len", "(", "config", ".", "DriverName", ")", "!=", "0", "{", "d", ",", "err", "=", "volumedrivers", ".", "Get", "(", "config", ".", "DriverName", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "config", ".", "DriverName", ",", "err", ".", "Error", "(", ")", ")", "\n", "}", "\n", "}", "\n\n", "// Setup authentication", "for", "issuer", ",", "_", ":=", "range", "config", ".", "Security", ".", "Authenticators", "{", "log", ".", "Infof", "(", "\"", "\"", ",", "issuer", ")", "\n\n", "// Check the necessary security config options are set", "if", "config", ".", "Security", ".", "Role", "==", "nil", "{", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ")", "\n", "}", "\n", "}", "\n\n", "if", "config", ".", "StoragePolicy", "==", "nil", "{", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ")", "\n", "}", "\n\n", "// Create gRPC server", "gServer", ",", "err", ":=", "grpcserver", ".", "New", "(", "&", "grpcserver", ".", "GrpcServerConfig", "{", "Name", ":", "name", ",", "Net", ":", "config", ".", "Net", ",", "Address", ":", "config", ".", "Address", ",", "}", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "name", ",", "err", ")", "\n", "}", "\n\n", "s", ":=", "&", "sdkGrpcServer", "{", "GrpcServer", ":", "gServer", ",", "accessLogOutput", ":", "config", ".", "AccessOutput", ",", "auditLogOutput", ":", "config", ".", "AuditOutput", ",", "config", ":", "*", "config", ",", "name", ":", "name", ",", "log", ":", "log", ",", "clusterHandler", ":", "config", ".", "Cluster", ",", "driverHandlers", ":", "map", "[", "string", "]", "volume", ".", "VolumeDriver", "{", "config", ".", "DriverName", ":", "d", ",", "DefaultDriverName", ":", "d", ",", "}", ",", "alertHandler", ":", "config", ".", "AlertsFilterDeleter", ",", "policyServer", ":", "config", ".", "StoragePolicy", ",", "}", "\n", "s", ".", "identityServer", "=", "&", "IdentityServer", "{", "server", ":", "s", ",", "}", "\n", "s", ".", "clusterServer", "=", "&", "ClusterServer", "{", "server", ":", "s", ",", "}", "\n", "s", ".", "nodeServer", "=", "&", "NodeServer", "{", "server", ":", "s", ",", "}", "\n", "s", ".", "volumeServer", "=", "&", "VolumeServer", "{", "server", ":", "s", ",", "specHandler", ":", "spec", ".", "NewSpecHandler", "(", ")", ",", "}", "\n", "s", ".", "objectstoreServer", "=", "&", "ObjectstoreServer", "{", "server", ":", "s", ",", "}", "\n", "s", ".", "schedulePolicyServer", "=", "&", "SchedulePolicyServer", "{", "server", ":", "s", ",", "}", "\n", "s", ".", "cloudBackupServer", "=", "&", "CloudBackupServer", "{", "server", ":", "s", ",", "}", "\n", "s", ".", "credentialServer", "=", "&", "CredentialServer", "{", "server", ":", "s", ",", "}", "\n", "s", ".", "alertsServer", "=", "&", "alertsServer", "{", "server", ":", "s", ",", "}", "\n", "s", ".", "clusterPairServer", "=", "&", "ClusterPairServer", "{", "server", ":", "s", ",", "}", "\n", "s", ".", "clusterDomainsServer", "=", "&", "ClusterDomainsServer", "{", "server", ":", "s", ",", "}", "\n", "s", ".", "roleServer", "=", "config", ".", "Security", ".", "Role", "\n", "s", ".", "policyServer", "=", "config", ".", "StoragePolicy", "\n", "return", "s", ",", "nil", "\n", "}" ]
// New creates a new SDK gRPC server
[ "New", "creates", "a", "new", "SDK", "gRPC", "server" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/server/sdk/server.go#L307-L406
143,810
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
NewMockVolumeDriver
func NewMockVolumeDriver(ctrl *gomock.Controller) *MockVolumeDriver { mock := &MockVolumeDriver{ctrl: ctrl} mock.recorder = &MockVolumeDriverMockRecorder{mock} return mock }
go
func NewMockVolumeDriver(ctrl *gomock.Controller) *MockVolumeDriver { mock := &MockVolumeDriver{ctrl: ctrl} mock.recorder = &MockVolumeDriverMockRecorder{mock} return mock }
[ "func", "NewMockVolumeDriver", "(", "ctrl", "*", "gomock", ".", "Controller", ")", "*", "MockVolumeDriver", "{", "mock", ":=", "&", "MockVolumeDriver", "{", "ctrl", ":", "ctrl", "}", "\n", "mock", ".", "recorder", "=", "&", "MockVolumeDriverMockRecorder", "{", "mock", "}", "\n", "return", "mock", "\n", "}" ]
// NewMockVolumeDriver creates a new mock instance
[ "NewMockVolumeDriver", "creates", "a", "new", "mock", "instance" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L25-L29
143,811
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
Attach
func (m *MockVolumeDriver) Attach(arg0 string, arg1 map[string]string) (string, error) { ret := m.ctrl.Call(m, "Attach", arg0, arg1) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) Attach(arg0 string, arg1 map[string]string) (string, error) { ret := m.ctrl.Call(m, "Attach", arg0, arg1) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "Attach", "(", "arg0", "string", ",", "arg1", "map", "[", "string", "]", "string", ")", "(", "string", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ",", "arg1", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "string", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// Attach mocks base method
[ "Attach", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L37-L42
143,812
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CapacityUsage
func (m *MockVolumeDriver) CapacityUsage(arg0 string) (*api.CapacityUsageResponse, error) { ret := m.ctrl.Call(m, "CapacityUsage", arg0) ret0, _ := ret[0].(*api.CapacityUsageResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) CapacityUsage(arg0 string) (*api.CapacityUsageResponse, error) { ret := m.ctrl.Call(m, "CapacityUsage", arg0) ret0, _ := ret[0].(*api.CapacityUsageResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CapacityUsage", "(", "arg0", "string", ")", "(", "*", "api", ".", "CapacityUsageResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "CapacityUsageResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// CapacityUsage mocks base method
[ "CapacityUsage", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L50-L55
143,813
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
Catalog
func (m *MockVolumeDriver) Catalog(arg0, arg1, arg2 string) (api.CatalogResponse, error) { ret := m.ctrl.Call(m, "Catalog", arg0, arg1, arg2) ret0, _ := ret[0].(api.CatalogResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) Catalog(arg0, arg1, arg2 string) (api.CatalogResponse, error) { ret := m.ctrl.Call(m, "Catalog", arg0, arg1, arg2) ret0, _ := ret[0].(api.CatalogResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "Catalog", "(", "arg0", ",", "arg1", ",", "arg2", "string", ")", "(", "api", ".", "CatalogResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ",", "arg1", ",", "arg2", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "api", ".", "CatalogResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// Catalog mocks base method
[ "Catalog", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L63-L68
143,814
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CloudBackupCatalog
func (m *MockVolumeDriver) CloudBackupCatalog(arg0 *api.CloudBackupCatalogRequest) (*api.CloudBackupCatalogResponse, error) { ret := m.ctrl.Call(m, "CloudBackupCatalog", arg0) ret0, _ := ret[0].(*api.CloudBackupCatalogResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) CloudBackupCatalog(arg0 *api.CloudBackupCatalogRequest) (*api.CloudBackupCatalogResponse, error) { ret := m.ctrl.Call(m, "CloudBackupCatalog", arg0) ret0, _ := ret[0].(*api.CloudBackupCatalogResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CloudBackupCatalog", "(", "arg0", "*", "api", ".", "CloudBackupCatalogRequest", ")", "(", "*", "api", ".", "CloudBackupCatalogResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "CloudBackupCatalogResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// CloudBackupCatalog mocks base method
[ "CloudBackupCatalog", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L76-L81
143,815
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CloudBackupCreate
func (m *MockVolumeDriver) CloudBackupCreate(arg0 *api.CloudBackupCreateRequest) (*api.CloudBackupCreateResponse, error) { ret := m.ctrl.Call(m, "CloudBackupCreate", arg0) ret0, _ := ret[0].(*api.CloudBackupCreateResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) CloudBackupCreate(arg0 *api.CloudBackupCreateRequest) (*api.CloudBackupCreateResponse, error) { ret := m.ctrl.Call(m, "CloudBackupCreate", arg0) ret0, _ := ret[0].(*api.CloudBackupCreateResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CloudBackupCreate", "(", "arg0", "*", "api", ".", "CloudBackupCreateRequest", ")", "(", "*", "api", ".", "CloudBackupCreateResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "CloudBackupCreateResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// CloudBackupCreate mocks base method
[ "CloudBackupCreate", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L89-L94
143,816
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CloudBackupDelete
func (m *MockVolumeDriver) CloudBackupDelete(arg0 *api.CloudBackupDeleteRequest) error { ret := m.ctrl.Call(m, "CloudBackupDelete", arg0) ret0, _ := ret[0].(error) return ret0 }
go
func (m *MockVolumeDriver) CloudBackupDelete(arg0 *api.CloudBackupDeleteRequest) error { ret := m.ctrl.Call(m, "CloudBackupDelete", arg0) ret0, _ := ret[0].(error) return ret0 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CloudBackupDelete", "(", "arg0", "*", "api", ".", "CloudBackupDeleteRequest", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "error", ")", "\n", "return", "ret0", "\n", "}" ]
// CloudBackupDelete mocks base method
[ "CloudBackupDelete", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L102-L106
143,817
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CloudBackupDeleteAll
func (m *MockVolumeDriver) CloudBackupDeleteAll(arg0 *api.CloudBackupDeleteAllRequest) error { ret := m.ctrl.Call(m, "CloudBackupDeleteAll", arg0) ret0, _ := ret[0].(error) return ret0 }
go
func (m *MockVolumeDriver) CloudBackupDeleteAll(arg0 *api.CloudBackupDeleteAllRequest) error { ret := m.ctrl.Call(m, "CloudBackupDeleteAll", arg0) ret0, _ := ret[0].(error) return ret0 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CloudBackupDeleteAll", "(", "arg0", "*", "api", ".", "CloudBackupDeleteAllRequest", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "error", ")", "\n", "return", "ret0", "\n", "}" ]
// CloudBackupDeleteAll mocks base method
[ "CloudBackupDeleteAll", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L114-L118
143,818
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CloudBackupEnumerate
func (m *MockVolumeDriver) CloudBackupEnumerate(arg0 *api.CloudBackupEnumerateRequest) (*api.CloudBackupEnumerateResponse, error) { ret := m.ctrl.Call(m, "CloudBackupEnumerate", arg0) ret0, _ := ret[0].(*api.CloudBackupEnumerateResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) CloudBackupEnumerate(arg0 *api.CloudBackupEnumerateRequest) (*api.CloudBackupEnumerateResponse, error) { ret := m.ctrl.Call(m, "CloudBackupEnumerate", arg0) ret0, _ := ret[0].(*api.CloudBackupEnumerateResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CloudBackupEnumerate", "(", "arg0", "*", "api", ".", "CloudBackupEnumerateRequest", ")", "(", "*", "api", ".", "CloudBackupEnumerateResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "CloudBackupEnumerateResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// CloudBackupEnumerate mocks base method
[ "CloudBackupEnumerate", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L126-L131
143,819
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CloudBackupGroupCreate
func (m *MockVolumeDriver) CloudBackupGroupCreate(arg0 *api.CloudBackupGroupCreateRequest) (*api.CloudBackupGroupCreateResponse, error) { ret := m.ctrl.Call(m, "CloudBackupGroupCreate", arg0) ret0, _ := ret[0].(*api.CloudBackupGroupCreateResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) CloudBackupGroupCreate(arg0 *api.CloudBackupGroupCreateRequest) (*api.CloudBackupGroupCreateResponse, error) { ret := m.ctrl.Call(m, "CloudBackupGroupCreate", arg0) ret0, _ := ret[0].(*api.CloudBackupGroupCreateResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CloudBackupGroupCreate", "(", "arg0", "*", "api", ".", "CloudBackupGroupCreateRequest", ")", "(", "*", "api", ".", "CloudBackupGroupCreateResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "CloudBackupGroupCreateResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// CloudBackupGroupCreate mocks base method
[ "CloudBackupGroupCreate", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L139-L144
143,820
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CloudBackupGroupSchedCreate
func (m *MockVolumeDriver) CloudBackupGroupSchedCreate(arg0 *api.CloudBackupGroupSchedCreateRequest) (*api.CloudBackupSchedCreateResponse, error) { ret := m.ctrl.Call(m, "CloudBackupGroupSchedCreate", arg0) ret0, _ := ret[0].(*api.CloudBackupSchedCreateResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) CloudBackupGroupSchedCreate(arg0 *api.CloudBackupGroupSchedCreateRequest) (*api.CloudBackupSchedCreateResponse, error) { ret := m.ctrl.Call(m, "CloudBackupGroupSchedCreate", arg0) ret0, _ := ret[0].(*api.CloudBackupSchedCreateResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CloudBackupGroupSchedCreate", "(", "arg0", "*", "api", ".", "CloudBackupGroupSchedCreateRequest", ")", "(", "*", "api", ".", "CloudBackupSchedCreateResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "CloudBackupSchedCreateResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// CloudBackupGroupSchedCreate mocks base method
[ "CloudBackupGroupSchedCreate", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L152-L157
143,821
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CloudBackupGroupSchedCreate
func (mr *MockVolumeDriverMockRecorder) CloudBackupGroupSchedCreate(arg0 interface{}) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudBackupGroupSchedCreate", reflect.TypeOf((*MockVolumeDriver)(nil).CloudBackupGroupSchedCreate), arg0) }
go
func (mr *MockVolumeDriverMockRecorder) CloudBackupGroupSchedCreate(arg0 interface{}) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudBackupGroupSchedCreate", reflect.TypeOf((*MockVolumeDriver)(nil).CloudBackupGroupSchedCreate), arg0) }
[ "func", "(", "mr", "*", "MockVolumeDriverMockRecorder", ")", "CloudBackupGroupSchedCreate", "(", "arg0", "interface", "{", "}", ")", "*", "gomock", ".", "Call", "{", "return", "mr", ".", "mock", ".", "ctrl", ".", "RecordCallWithMethodType", "(", "mr", ".", "mock", ",", "\"", "\"", ",", "reflect", ".", "TypeOf", "(", "(", "*", "MockVolumeDriver", ")", "(", "nil", ")", ".", "CloudBackupGroupSchedCreate", ")", ",", "arg0", ")", "\n", "}" ]
// CloudBackupGroupSchedCreate indicates an expected call of CloudBackupGroupSchedCreate
[ "CloudBackupGroupSchedCreate", "indicates", "an", "expected", "call", "of", "CloudBackupGroupSchedCreate" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L160-L162
143,822
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CloudBackupHistory
func (m *MockVolumeDriver) CloudBackupHistory(arg0 *api.CloudBackupHistoryRequest) (*api.CloudBackupHistoryResponse, error) { ret := m.ctrl.Call(m, "CloudBackupHistory", arg0) ret0, _ := ret[0].(*api.CloudBackupHistoryResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) CloudBackupHistory(arg0 *api.CloudBackupHistoryRequest) (*api.CloudBackupHistoryResponse, error) { ret := m.ctrl.Call(m, "CloudBackupHistory", arg0) ret0, _ := ret[0].(*api.CloudBackupHistoryResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CloudBackupHistory", "(", "arg0", "*", "api", ".", "CloudBackupHistoryRequest", ")", "(", "*", "api", ".", "CloudBackupHistoryResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "CloudBackupHistoryResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// CloudBackupHistory mocks base method
[ "CloudBackupHistory", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L165-L170
143,823
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CloudBackupRestore
func (m *MockVolumeDriver) CloudBackupRestore(arg0 *api.CloudBackupRestoreRequest) (*api.CloudBackupRestoreResponse, error) { ret := m.ctrl.Call(m, "CloudBackupRestore", arg0) ret0, _ := ret[0].(*api.CloudBackupRestoreResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) CloudBackupRestore(arg0 *api.CloudBackupRestoreRequest) (*api.CloudBackupRestoreResponse, error) { ret := m.ctrl.Call(m, "CloudBackupRestore", arg0) ret0, _ := ret[0].(*api.CloudBackupRestoreResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CloudBackupRestore", "(", "arg0", "*", "api", ".", "CloudBackupRestoreRequest", ")", "(", "*", "api", ".", "CloudBackupRestoreResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "CloudBackupRestoreResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// CloudBackupRestore mocks base method
[ "CloudBackupRestore", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L178-L183
143,824
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CloudBackupSchedCreate
func (m *MockVolumeDriver) CloudBackupSchedCreate(arg0 *api.CloudBackupSchedCreateRequest) (*api.CloudBackupSchedCreateResponse, error) { ret := m.ctrl.Call(m, "CloudBackupSchedCreate", arg0) ret0, _ := ret[0].(*api.CloudBackupSchedCreateResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) CloudBackupSchedCreate(arg0 *api.CloudBackupSchedCreateRequest) (*api.CloudBackupSchedCreateResponse, error) { ret := m.ctrl.Call(m, "CloudBackupSchedCreate", arg0) ret0, _ := ret[0].(*api.CloudBackupSchedCreateResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CloudBackupSchedCreate", "(", "arg0", "*", "api", ".", "CloudBackupSchedCreateRequest", ")", "(", "*", "api", ".", "CloudBackupSchedCreateResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "CloudBackupSchedCreateResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// CloudBackupSchedCreate mocks base method
[ "CloudBackupSchedCreate", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L191-L196
143,825
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CloudBackupSchedDelete
func (m *MockVolumeDriver) CloudBackupSchedDelete(arg0 *api.CloudBackupSchedDeleteRequest) error { ret := m.ctrl.Call(m, "CloudBackupSchedDelete", arg0) ret0, _ := ret[0].(error) return ret0 }
go
func (m *MockVolumeDriver) CloudBackupSchedDelete(arg0 *api.CloudBackupSchedDeleteRequest) error { ret := m.ctrl.Call(m, "CloudBackupSchedDelete", arg0) ret0, _ := ret[0].(error) return ret0 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CloudBackupSchedDelete", "(", "arg0", "*", "api", ".", "CloudBackupSchedDeleteRequest", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "error", ")", "\n", "return", "ret0", "\n", "}" ]
// CloudBackupSchedDelete mocks base method
[ "CloudBackupSchedDelete", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L204-L208
143,826
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CloudBackupSchedEnumerate
func (m *MockVolumeDriver) CloudBackupSchedEnumerate() (*api.CloudBackupSchedEnumerateResponse, error) { ret := m.ctrl.Call(m, "CloudBackupSchedEnumerate") ret0, _ := ret[0].(*api.CloudBackupSchedEnumerateResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) CloudBackupSchedEnumerate() (*api.CloudBackupSchedEnumerateResponse, error) { ret := m.ctrl.Call(m, "CloudBackupSchedEnumerate") ret0, _ := ret[0].(*api.CloudBackupSchedEnumerateResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CloudBackupSchedEnumerate", "(", ")", "(", "*", "api", ".", "CloudBackupSchedEnumerateResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "CloudBackupSchedEnumerateResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// CloudBackupSchedEnumerate mocks base method
[ "CloudBackupSchedEnumerate", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L216-L221
143,827
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CloudBackupStateChange
func (m *MockVolumeDriver) CloudBackupStateChange(arg0 *api.CloudBackupStateChangeRequest) error { ret := m.ctrl.Call(m, "CloudBackupStateChange", arg0) ret0, _ := ret[0].(error) return ret0 }
go
func (m *MockVolumeDriver) CloudBackupStateChange(arg0 *api.CloudBackupStateChangeRequest) error { ret := m.ctrl.Call(m, "CloudBackupStateChange", arg0) ret0, _ := ret[0].(error) return ret0 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CloudBackupStateChange", "(", "arg0", "*", "api", ".", "CloudBackupStateChangeRequest", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "error", ")", "\n", "return", "ret0", "\n", "}" ]
// CloudBackupStateChange mocks base method
[ "CloudBackupStateChange", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L229-L233
143,828
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CloudBackupStatus
func (m *MockVolumeDriver) CloudBackupStatus(arg0 *api.CloudBackupStatusRequest) (*api.CloudBackupStatusResponse, error) { ret := m.ctrl.Call(m, "CloudBackupStatus", arg0) ret0, _ := ret[0].(*api.CloudBackupStatusResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) CloudBackupStatus(arg0 *api.CloudBackupStatusRequest) (*api.CloudBackupStatusResponse, error) { ret := m.ctrl.Call(m, "CloudBackupStatus", arg0) ret0, _ := ret[0].(*api.CloudBackupStatusResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CloudBackupStatus", "(", "arg0", "*", "api", ".", "CloudBackupStatusRequest", ")", "(", "*", "api", ".", "CloudBackupStatusResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "CloudBackupStatusResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// CloudBackupStatus mocks base method
[ "CloudBackupStatus", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L241-L246
143,829
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CloudMigrateCancel
func (m *MockVolumeDriver) CloudMigrateCancel(arg0 *api.CloudMigrateCancelRequest) error { ret := m.ctrl.Call(m, "CloudMigrateCancel", arg0) ret0, _ := ret[0].(error) return ret0 }
go
func (m *MockVolumeDriver) CloudMigrateCancel(arg0 *api.CloudMigrateCancelRequest) error { ret := m.ctrl.Call(m, "CloudMigrateCancel", arg0) ret0, _ := ret[0].(error) return ret0 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CloudMigrateCancel", "(", "arg0", "*", "api", ".", "CloudMigrateCancelRequest", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "error", ")", "\n", "return", "ret0", "\n", "}" ]
// CloudMigrateCancel mocks base method
[ "CloudMigrateCancel", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L254-L258
143,830
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CloudMigrateStart
func (m *MockVolumeDriver) CloudMigrateStart(arg0 *api.CloudMigrateStartRequest) (*api.CloudMigrateStartResponse, error) { ret := m.ctrl.Call(m, "CloudMigrateStart", arg0) ret0, _ := ret[0].(*api.CloudMigrateStartResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) CloudMigrateStart(arg0 *api.CloudMigrateStartRequest) (*api.CloudMigrateStartResponse, error) { ret := m.ctrl.Call(m, "CloudMigrateStart", arg0) ret0, _ := ret[0].(*api.CloudMigrateStartResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CloudMigrateStart", "(", "arg0", "*", "api", ".", "CloudMigrateStartRequest", ")", "(", "*", "api", ".", "CloudMigrateStartResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "CloudMigrateStartResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// CloudMigrateStart mocks base method
[ "CloudMigrateStart", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L266-L271
143,831
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CloudMigrateStatus
func (m *MockVolumeDriver) CloudMigrateStatus(arg0 *api.CloudMigrateStatusRequest) (*api.CloudMigrateStatusResponse, error) { ret := m.ctrl.Call(m, "CloudMigrateStatus", arg0) ret0, _ := ret[0].(*api.CloudMigrateStatusResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) CloudMigrateStatus(arg0 *api.CloudMigrateStatusRequest) (*api.CloudMigrateStatusResponse, error) { ret := m.ctrl.Call(m, "CloudMigrateStatus", arg0) ret0, _ := ret[0].(*api.CloudMigrateStatusResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CloudMigrateStatus", "(", "arg0", "*", "api", ".", "CloudMigrateStatusRequest", ")", "(", "*", "api", ".", "CloudMigrateStatusResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "CloudMigrateStatusResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// CloudMigrateStatus mocks base method
[ "CloudMigrateStatus", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L279-L284
143,832
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CredsCreate
func (m *MockVolumeDriver) CredsCreate(arg0 map[string]string) (string, error) { ret := m.ctrl.Call(m, "CredsCreate", arg0) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) CredsCreate(arg0 map[string]string) (string, error) { ret := m.ctrl.Call(m, "CredsCreate", arg0) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CredsCreate", "(", "arg0", "map", "[", "string", "]", "string", ")", "(", "string", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "string", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// CredsCreate mocks base method
[ "CredsCreate", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L305-L310
143,833
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
CredsEnumerate
func (m *MockVolumeDriver) CredsEnumerate() (map[string]interface{}, error) { ret := m.ctrl.Call(m, "CredsEnumerate") ret0, _ := ret[0].(map[string]interface{}) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) CredsEnumerate() (map[string]interface{}, error) { ret := m.ctrl.Call(m, "CredsEnumerate") ret0, _ := ret[0].(map[string]interface{}) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "CredsEnumerate", "(", ")", "(", "map", "[", "string", "]", "interface", "{", "}", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "map", "[", "string", "]", "interface", "{", "}", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// CredsEnumerate mocks base method
[ "CredsEnumerate", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L330-L335
143,834
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
Detach
func (m *MockVolumeDriver) Detach(arg0 string, arg1 map[string]string) error { ret := m.ctrl.Call(m, "Detach", arg0, arg1) ret0, _ := ret[0].(error) return ret0 }
go
func (m *MockVolumeDriver) Detach(arg0 string, arg1 map[string]string) error { ret := m.ctrl.Call(m, "Detach", arg0, arg1) ret0, _ := ret[0].(error) return ret0 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "Detach", "(", "arg0", "string", ",", "arg1", "map", "[", "string", "]", "string", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ",", "arg1", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "error", ")", "\n", "return", "ret0", "\n", "}" ]
// Detach mocks base method
[ "Detach", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L367-L371
143,835
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
GetActiveRequests
func (m *MockVolumeDriver) GetActiveRequests() (*api.ActiveRequests, error) { ret := m.ctrl.Call(m, "GetActiveRequests") ret0, _ := ret[0].(*api.ActiveRequests) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) GetActiveRequests() (*api.ActiveRequests, error) { ret := m.ctrl.Call(m, "GetActiveRequests") ret0, _ := ret[0].(*api.ActiveRequests) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "GetActiveRequests", "(", ")", "(", "*", "api", ".", "ActiveRequests", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "ActiveRequests", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// GetActiveRequests mocks base method
[ "GetActiveRequests", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L404-L409
143,836
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
MountedAt
func (m *MockVolumeDriver) MountedAt(arg0 string) string { ret := m.ctrl.Call(m, "MountedAt", arg0) ret0, _ := ret[0].(string) return ret0 }
go
func (m *MockVolumeDriver) MountedAt(arg0 string) string { ret := m.ctrl.Call(m, "MountedAt", arg0) ret0, _ := ret[0].(string) return ret0 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "MountedAt", "(", "arg0", "string", ")", "string", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "string", ")", "\n", "return", "ret0", "\n", "}" ]
// MountedAt mocks base method
[ "MountedAt", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L442-L446
143,837
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
SnapEnumerate
func (m *MockVolumeDriver) SnapEnumerate(arg0 []string, arg1 map[string]string) ([]*api.Volume, error) { ret := m.ctrl.Call(m, "SnapEnumerate", arg0, arg1) ret0, _ := ret[0].([]*api.Volume) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) SnapEnumerate(arg0 []string, arg1 map[string]string) ([]*api.Volume, error) { ret := m.ctrl.Call(m, "SnapEnumerate", arg0, arg1) ret0, _ := ret[0].([]*api.Volume) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "SnapEnumerate", "(", "arg0", "[", "]", "string", ",", "arg1", "map", "[", "string", "]", "string", ")", "(", "[", "]", "*", "api", ".", "Volume", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ",", "arg1", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "[", "]", "*", "api", ".", "Volume", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// SnapEnumerate mocks base method
[ "SnapEnumerate", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L525-L530
143,838
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
Snapshot
func (m *MockVolumeDriver) Snapshot(arg0 string, arg1 bool, arg2 *api.VolumeLocator, arg3 bool) (string, error) { ret := m.ctrl.Call(m, "Snapshot", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) Snapshot(arg0 string, arg1 bool, arg2 *api.VolumeLocator, arg3 bool) (string, error) { ret := m.ctrl.Call(m, "Snapshot", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "Snapshot", "(", "arg0", "string", ",", "arg1", "bool", ",", "arg2", "*", "api", ".", "VolumeLocator", ",", "arg3", "bool", ")", "(", "string", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ",", "arg1", ",", "arg2", ",", "arg3", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "string", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// Snapshot mocks base method
[ "Snapshot", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L538-L543
143,839
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
SnapshotGroup
func (m *MockVolumeDriver) SnapshotGroup(arg0 string, arg1 map[string]string, arg2 []string) (*api.GroupSnapCreateResponse, error) { ret := m.ctrl.Call(m, "SnapshotGroup", arg0, arg1, arg2) ret0, _ := ret[0].(*api.GroupSnapCreateResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) SnapshotGroup(arg0 string, arg1 map[string]string, arg2 []string) (*api.GroupSnapCreateResponse, error) { ret := m.ctrl.Call(m, "SnapshotGroup", arg0, arg1, arg2) ret0, _ := ret[0].(*api.GroupSnapCreateResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "SnapshotGroup", "(", "arg0", "string", ",", "arg1", "map", "[", "string", "]", "string", ",", "arg2", "[", "]", "string", ")", "(", "*", "api", ".", "GroupSnapCreateResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ",", "arg1", ",", "arg2", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "GroupSnapCreateResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// SnapshotGroup mocks base method
[ "SnapshotGroup", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L551-L556
143,840
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
Status
func (mr *MockVolumeDriverMockRecorder) Status() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockVolumeDriver)(nil).Status)) }
go
func (mr *MockVolumeDriverMockRecorder) Status() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockVolumeDriver)(nil).Status)) }
[ "func", "(", "mr", "*", "MockVolumeDriverMockRecorder", ")", "Status", "(", ")", "*", "gomock", ".", "Call", "{", "return", "mr", ".", "mock", ".", "ctrl", ".", "RecordCallWithMethodType", "(", "mr", ".", "mock", ",", "\"", "\"", ",", "reflect", ".", "TypeOf", "(", "(", "*", "MockVolumeDriver", ")", "(", "nil", ")", ".", "Status", ")", ")", "\n", "}" ]
// Status indicates an expected call of Status
[ "Status", "indicates", "an", "expected", "call", "of", "Status" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L584-L586
143,841
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
Unmount
func (m *MockVolumeDriver) Unmount(arg0, arg1 string, arg2 map[string]string) error { ret := m.ctrl.Call(m, "Unmount", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 }
go
func (m *MockVolumeDriver) Unmount(arg0, arg1 string, arg2 map[string]string) error { ret := m.ctrl.Call(m, "Unmount", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "Unmount", "(", "arg0", ",", "arg1", "string", ",", "arg2", "map", "[", "string", "]", "string", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ",", "arg1", ",", "arg2", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "error", ")", "\n", "return", "ret0", "\n", "}" ]
// Unmount mocks base method
[ "Unmount", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L601-L605
143,842
libopenstorage/openstorage
volume/drivers/mock/driver.mock.go
UsedSize
func (m *MockVolumeDriver) UsedSize(arg0 string) (uint64, error) { ret := m.ctrl.Call(m, "UsedSize", arg0) ret0, _ := ret[0].(uint64) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockVolumeDriver) UsedSize(arg0 string) (uint64, error) { ret := m.ctrl.Call(m, "UsedSize", arg0) ret0, _ := ret[0].(uint64) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockVolumeDriver", ")", "UsedSize", "(", "arg0", "string", ")", "(", "uint64", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "uint64", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// UsedSize mocks base method
[ "UsedSize", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/volume/drivers/mock/driver.mock.go#L625-L630
143,843
libopenstorage/openstorage
api/client/volume/volume.go
GetAuthSupportedDriverVersions
func GetAuthSupportedDriverVersions(driverName, host, authstring, accesstoken string, tlsConfig *tls.Config) ([]string, error) { // Get a client handler if host == "" { host = client.GetUnixServerPath(driverName, volume.DriverAPIBase) } client, err := client.NewAuthClient(host, "", authstring, accesstoken, "") if err != nil { return []string{}, err } if tlsConfig != nil { client.SetTLS(tlsConfig) } versions, err := client.Versions(api.OsdVolumePath) if err != nil { return []string{}, err } return versions, nil }
go
func GetAuthSupportedDriverVersions(driverName, host, authstring, accesstoken string, tlsConfig *tls.Config) ([]string, error) { // Get a client handler if host == "" { host = client.GetUnixServerPath(driverName, volume.DriverAPIBase) } client, err := client.NewAuthClient(host, "", authstring, accesstoken, "") if err != nil { return []string{}, err } if tlsConfig != nil { client.SetTLS(tlsConfig) } versions, err := client.Versions(api.OsdVolumePath) if err != nil { return []string{}, err } return versions, nil }
[ "func", "GetAuthSupportedDriverVersions", "(", "driverName", ",", "host", ",", "authstring", ",", "accesstoken", "string", ",", "tlsConfig", "*", "tls", ".", "Config", ")", "(", "[", "]", "string", ",", "error", ")", "{", "// Get a client handler", "if", "host", "==", "\"", "\"", "{", "host", "=", "client", ".", "GetUnixServerPath", "(", "driverName", ",", "volume", ".", "DriverAPIBase", ")", "\n", "}", "\n\n", "client", ",", "err", ":=", "client", ".", "NewAuthClient", "(", "host", ",", "\"", "\"", ",", "authstring", ",", "accesstoken", ",", "\"", "\"", ")", "\n", "if", "err", "!=", "nil", "{", "return", "[", "]", "string", "{", "}", ",", "err", "\n", "}", "\n\n", "if", "tlsConfig", "!=", "nil", "{", "client", ".", "SetTLS", "(", "tlsConfig", ")", "\n", "}", "\n\n", "versions", ",", "err", ":=", "client", ".", "Versions", "(", "api", ".", "OsdVolumePath", ")", "\n", "if", "err", "!=", "nil", "{", "return", "[", "]", "string", "{", "}", ",", "err", "\n", "}", "\n", "return", "versions", ",", "nil", "\n", "}" ]
// GetAuthSupportedDriverVersions returns a list of supported versions // for the provided driver. It uses the given security params and // server endpoint or the standard unix domain socket // authstring can be set to the JWT Token and accesstoken set to an empty string.
[ "GetAuthSupportedDriverVersions", "returns", "a", "list", "of", "supported", "versions", "for", "the", "provided", "driver", ".", "It", "uses", "the", "given", "security", "params", "and", "server", "endpoint", "or", "the", "standard", "unix", "domain", "socket", "authstring", "can", "be", "set", "to", "the", "JWT", "Token", "and", "accesstoken", "set", "to", "an", "empty", "string", "." ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/client/volume/volume.go#L57-L77
143,844
libopenstorage/openstorage
api/client/volume/volume.go
GetSupportedDriverVersions
func GetSupportedDriverVersions(driverName, host string) ([]string, error) { // Get a client handler if host == "" { host = client.GetUnixServerPath(driverName, volume.DriverAPIBase) } client, err := client.NewClient(host, "", "") if err != nil { return []string{}, err } versions, err := client.Versions(api.OsdVolumePath) if err != nil { return []string{}, err } return versions, nil }
go
func GetSupportedDriverVersions(driverName, host string) ([]string, error) { // Get a client handler if host == "" { host = client.GetUnixServerPath(driverName, volume.DriverAPIBase) } client, err := client.NewClient(host, "", "") if err != nil { return []string{}, err } versions, err := client.Versions(api.OsdVolumePath) if err != nil { return []string{}, err } return versions, nil }
[ "func", "GetSupportedDriverVersions", "(", "driverName", ",", "host", "string", ")", "(", "[", "]", "string", ",", "error", ")", "{", "// Get a client handler", "if", "host", "==", "\"", "\"", "{", "host", "=", "client", ".", "GetUnixServerPath", "(", "driverName", ",", "volume", ".", "DriverAPIBase", ")", "\n", "}", "\n\n", "client", ",", "err", ":=", "client", ".", "NewClient", "(", "host", ",", "\"", "\"", ",", "\"", "\"", ")", "\n", "if", "err", "!=", "nil", "{", "return", "[", "]", "string", "{", "}", ",", "err", "\n", "}", "\n", "versions", ",", "err", ":=", "client", ".", "Versions", "(", "api", ".", "OsdVolumePath", ")", "\n", "if", "err", "!=", "nil", "{", "return", "[", "]", "string", "{", "}", ",", "err", "\n", "}", "\n", "return", "versions", ",", "nil", "\n", "}" ]
// GetSupportedDriverVersions returns a list of supported versions // for the provided driver. It uses the given server endpoint or the // standard unix domain socket
[ "GetSupportedDriverVersions", "returns", "a", "list", "of", "supported", "versions", "for", "the", "provided", "driver", ".", "It", "uses", "the", "given", "server", "endpoint", "or", "the", "standard", "unix", "domain", "socket" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/client/volume/volume.go#L82-L97
143,845
libopenstorage/openstorage
pkg/clusterdomain/clusterdomain.go
GetActiveMapFromClusterDomainInfos
func GetActiveMapFromClusterDomainInfos(clusterDomainInfos []*ClusterDomainInfo) types.ClusterDomainsActiveMap { activeMap := make(types.ClusterDomainsActiveMap) for _, clusterDomainInfo := range clusterDomainInfos { activeMap[clusterDomainInfo.Name] = clusterDomainInfo.State } return activeMap }
go
func GetActiveMapFromClusterDomainInfos(clusterDomainInfos []*ClusterDomainInfo) types.ClusterDomainsActiveMap { activeMap := make(types.ClusterDomainsActiveMap) for _, clusterDomainInfo := range clusterDomainInfos { activeMap[clusterDomainInfo.Name] = clusterDomainInfo.State } return activeMap }
[ "func", "GetActiveMapFromClusterDomainInfos", "(", "clusterDomainInfos", "[", "]", "*", "ClusterDomainInfo", ")", "types", ".", "ClusterDomainsActiveMap", "{", "activeMap", ":=", "make", "(", "types", ".", "ClusterDomainsActiveMap", ")", "\n", "for", "_", ",", "clusterDomainInfo", ":=", "range", "clusterDomainInfos", "{", "activeMap", "[", "clusterDomainInfo", ".", "Name", "]", "=", "clusterDomainInfo", ".", "State", "\n", "}", "\n", "return", "activeMap", "\n", "}" ]
// GetActiveMapFromClusterDomainInfos is a helper function that converts a list of ClusterDomainInfo // objects into a gossip cluster domain active map
[ "GetActiveMapFromClusterDomainInfos", "is", "a", "helper", "function", "that", "converts", "a", "list", "of", "ClusterDomainInfo", "objects", "into", "a", "gossip", "cluster", "domain", "active", "map" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/pkg/clusterdomain/clusterdomain.go#L84-L90
143,846
libopenstorage/openstorage
api/server/sdk/volume_snapshot.go
SnapshotCreate
func (s *VolumeServer) SnapshotCreate( ctx context.Context, req *api.SdkVolumeSnapshotCreateRequest, ) (*api.SdkVolumeSnapshotCreateResponse, error) { if s.cluster() == nil || s.driver(ctx) == nil { return nil, status.Error(codes.Unavailable, "Resource has not been initialized") } if len(req.GetVolumeId()) == 0 { return nil, status.Error(codes.InvalidArgument, "Must supply volume id") } else if len(req.GetName()) == 0 { return nil, status.Error(codes.InvalidArgument, "Must supply a name") } // Get access rights if err := s.checkAccessForVolumeId(ctx, req.GetVolumeId(), api.Ownership_Read); err != nil { return nil, err } readonly := true snapshotID, err := s.driver(ctx).Snapshot(req.GetVolumeId(), readonly, &api.VolumeLocator{ Name: req.GetName(), VolumeLabels: req.GetLabels(), }, false) if err != nil { if err == kvdb.ErrNotFound { return nil, status.Errorf( codes.NotFound, "Id %s not found", req.GetVolumeId()) } return nil, status.Errorf(codes.Internal, "Failed to create snapshot: %v", err.Error()) } return &api.SdkVolumeSnapshotCreateResponse{ SnapshotId: snapshotID, }, nil }
go
func (s *VolumeServer) SnapshotCreate( ctx context.Context, req *api.SdkVolumeSnapshotCreateRequest, ) (*api.SdkVolumeSnapshotCreateResponse, error) { if s.cluster() == nil || s.driver(ctx) == nil { return nil, status.Error(codes.Unavailable, "Resource has not been initialized") } if len(req.GetVolumeId()) == 0 { return nil, status.Error(codes.InvalidArgument, "Must supply volume id") } else if len(req.GetName()) == 0 { return nil, status.Error(codes.InvalidArgument, "Must supply a name") } // Get access rights if err := s.checkAccessForVolumeId(ctx, req.GetVolumeId(), api.Ownership_Read); err != nil { return nil, err } readonly := true snapshotID, err := s.driver(ctx).Snapshot(req.GetVolumeId(), readonly, &api.VolumeLocator{ Name: req.GetName(), VolumeLabels: req.GetLabels(), }, false) if err != nil { if err == kvdb.ErrNotFound { return nil, status.Errorf( codes.NotFound, "Id %s not found", req.GetVolumeId()) } return nil, status.Errorf(codes.Internal, "Failed to create snapshot: %v", err.Error()) } return &api.SdkVolumeSnapshotCreateResponse{ SnapshotId: snapshotID, }, nil }
[ "func", "(", "s", "*", "VolumeServer", ")", "SnapshotCreate", "(", "ctx", "context", ".", "Context", ",", "req", "*", "api", ".", "SdkVolumeSnapshotCreateRequest", ",", ")", "(", "*", "api", ".", "SdkVolumeSnapshotCreateResponse", ",", "error", ")", "{", "if", "s", ".", "cluster", "(", ")", "==", "nil", "||", "s", ".", "driver", "(", "ctx", ")", "==", "nil", "{", "return", "nil", ",", "status", ".", "Error", "(", "codes", ".", "Unavailable", ",", "\"", "\"", ")", "\n", "}", "\n\n", "if", "len", "(", "req", ".", "GetVolumeId", "(", ")", ")", "==", "0", "{", "return", "nil", ",", "status", ".", "Error", "(", "codes", ".", "InvalidArgument", ",", "\"", "\"", ")", "\n", "}", "else", "if", "len", "(", "req", ".", "GetName", "(", ")", ")", "==", "0", "{", "return", "nil", ",", "status", ".", "Error", "(", "codes", ".", "InvalidArgument", ",", "\"", "\"", ")", "\n", "}", "\n\n", "// Get access rights", "if", "err", ":=", "s", ".", "checkAccessForVolumeId", "(", "ctx", ",", "req", ".", "GetVolumeId", "(", ")", ",", "api", ".", "Ownership_Read", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "readonly", ":=", "true", "\n", "snapshotID", ",", "err", ":=", "s", ".", "driver", "(", "ctx", ")", ".", "Snapshot", "(", "req", ".", "GetVolumeId", "(", ")", ",", "readonly", ",", "&", "api", ".", "VolumeLocator", "{", "Name", ":", "req", ".", "GetName", "(", ")", ",", "VolumeLabels", ":", "req", ".", "GetLabels", "(", ")", ",", "}", ",", "false", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "kvdb", ".", "ErrNotFound", "{", "return", "nil", ",", "status", ".", "Errorf", "(", "codes", ".", "NotFound", ",", "\"", "\"", ",", "req", ".", "GetVolumeId", "(", ")", ")", "\n", "}", "\n", "return", "nil", ",", "status", ".", "Errorf", "(", "codes", ".", "Internal", ",", "\"", "\"", ",", "err", ".", "Error", "(", ")", ")", "\n", "}", "\n\n", "return", "&", "api", ".", "SdkVolumeSnapshotCreateResponse", "{", "SnapshotId", ":", "snapshotID", ",", "}", ",", "nil", "\n", "}" ]
// SnapshotCreate creates a read-only snapshot of a volume
[ "SnapshotCreate", "creates", "a", "read", "-", "only", "snapshot", "of", "a", "volume" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/server/sdk/volume_snapshot.go#L30-L67
143,847
libopenstorage/openstorage
api/server/sdk/volume_snapshot.go
SnapshotRestore
func (s *VolumeServer) SnapshotRestore( ctx context.Context, req *api.SdkVolumeSnapshotRestoreRequest, ) (*api.SdkVolumeSnapshotRestoreResponse, error) { if s.cluster() == nil || s.driver(ctx) == nil { return nil, status.Error(codes.Unavailable, "Resource has not been initialized") } if len(req.GetVolumeId()) == 0 { return nil, status.Error(codes.InvalidArgument, "Must supply volume id") } else if len(req.GetSnapshotId()) == 0 { return nil, status.Error(codes.InvalidArgument, "Must supply snapshot id") } // Get access rights if err := s.checkAccessForVolumeId(ctx, req.GetVolumeId(), api.Ownership_Write); err != nil { return nil, err } err := s.driver(ctx).Restore(req.GetVolumeId(), req.GetSnapshotId()) if err != nil { if err == kvdb.ErrNotFound { return nil, status.Errorf( codes.NotFound, "Id %s or %s not found", req.GetVolumeId(), req.GetSnapshotId()) } return nil, status.Errorf( codes.Internal, "Failed to restore volume %s to snapshot %s: %v", req.GetVolumeId(), req.GetSnapshotId(), err.Error()) } return &api.SdkVolumeSnapshotRestoreResponse{}, nil }
go
func (s *VolumeServer) SnapshotRestore( ctx context.Context, req *api.SdkVolumeSnapshotRestoreRequest, ) (*api.SdkVolumeSnapshotRestoreResponse, error) { if s.cluster() == nil || s.driver(ctx) == nil { return nil, status.Error(codes.Unavailable, "Resource has not been initialized") } if len(req.GetVolumeId()) == 0 { return nil, status.Error(codes.InvalidArgument, "Must supply volume id") } else if len(req.GetSnapshotId()) == 0 { return nil, status.Error(codes.InvalidArgument, "Must supply snapshot id") } // Get access rights if err := s.checkAccessForVolumeId(ctx, req.GetVolumeId(), api.Ownership_Write); err != nil { return nil, err } err := s.driver(ctx).Restore(req.GetVolumeId(), req.GetSnapshotId()) if err != nil { if err == kvdb.ErrNotFound { return nil, status.Errorf( codes.NotFound, "Id %s or %s not found", req.GetVolumeId(), req.GetSnapshotId()) } return nil, status.Errorf( codes.Internal, "Failed to restore volume %s to snapshot %s: %v", req.GetVolumeId(), req.GetSnapshotId(), err.Error()) } return &api.SdkVolumeSnapshotRestoreResponse{}, nil }
[ "func", "(", "s", "*", "VolumeServer", ")", "SnapshotRestore", "(", "ctx", "context", ".", "Context", ",", "req", "*", "api", ".", "SdkVolumeSnapshotRestoreRequest", ",", ")", "(", "*", "api", ".", "SdkVolumeSnapshotRestoreResponse", ",", "error", ")", "{", "if", "s", ".", "cluster", "(", ")", "==", "nil", "||", "s", ".", "driver", "(", "ctx", ")", "==", "nil", "{", "return", "nil", ",", "status", ".", "Error", "(", "codes", ".", "Unavailable", ",", "\"", "\"", ")", "\n", "}", "\n\n", "if", "len", "(", "req", ".", "GetVolumeId", "(", ")", ")", "==", "0", "{", "return", "nil", ",", "status", ".", "Error", "(", "codes", ".", "InvalidArgument", ",", "\"", "\"", ")", "\n", "}", "else", "if", "len", "(", "req", ".", "GetSnapshotId", "(", ")", ")", "==", "0", "{", "return", "nil", ",", "status", ".", "Error", "(", "codes", ".", "InvalidArgument", ",", "\"", "\"", ")", "\n", "}", "\n\n", "// Get access rights", "if", "err", ":=", "s", ".", "checkAccessForVolumeId", "(", "ctx", ",", "req", ".", "GetVolumeId", "(", ")", ",", "api", ".", "Ownership_Write", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "err", ":=", "s", ".", "driver", "(", "ctx", ")", ".", "Restore", "(", "req", ".", "GetVolumeId", "(", ")", ",", "req", ".", "GetSnapshotId", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "if", "err", "==", "kvdb", ".", "ErrNotFound", "{", "return", "nil", ",", "status", ".", "Errorf", "(", "codes", ".", "NotFound", ",", "\"", "\"", ",", "req", ".", "GetVolumeId", "(", ")", ",", "req", ".", "GetSnapshotId", "(", ")", ")", "\n", "}", "\n", "return", "nil", ",", "status", ".", "Errorf", "(", "codes", ".", "Internal", ",", "\"", "\"", ",", "req", ".", "GetVolumeId", "(", ")", ",", "req", ".", "GetSnapshotId", "(", ")", ",", "err", ".", "Error", "(", ")", ")", "\n", "}", "\n\n", "return", "&", "api", ".", "SdkVolumeSnapshotRestoreResponse", "{", "}", ",", "nil", "\n", "}" ]
// SnapshotRestore restores a volume to the specified snapshot id
[ "SnapshotRestore", "restores", "a", "volume", "to", "the", "specified", "snapshot", "id" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/server/sdk/volume_snapshot.go#L70-L106
143,848
libopenstorage/openstorage
api/server/sdk/volume_snapshot.go
SnapshotEnumerate
func (s *VolumeServer) SnapshotEnumerate( ctx context.Context, req *api.SdkVolumeSnapshotEnumerateRequest, ) (*api.SdkVolumeSnapshotEnumerateResponse, error) { if s.cluster() == nil || s.driver(ctx) == nil { return nil, status.Error(codes.Unavailable, "Resource has not been initialized") } resp, err := s.SnapshotEnumerateWithFilters( ctx, &api.SdkVolumeSnapshotEnumerateWithFiltersRequest{ VolumeId: req.GetVolumeId(), }, ) if err != nil { return nil, err } return &api.SdkVolumeSnapshotEnumerateResponse{ VolumeSnapshotIds: resp.GetVolumeSnapshotIds(), }, nil }
go
func (s *VolumeServer) SnapshotEnumerate( ctx context.Context, req *api.SdkVolumeSnapshotEnumerateRequest, ) (*api.SdkVolumeSnapshotEnumerateResponse, error) { if s.cluster() == nil || s.driver(ctx) == nil { return nil, status.Error(codes.Unavailable, "Resource has not been initialized") } resp, err := s.SnapshotEnumerateWithFilters( ctx, &api.SdkVolumeSnapshotEnumerateWithFiltersRequest{ VolumeId: req.GetVolumeId(), }, ) if err != nil { return nil, err } return &api.SdkVolumeSnapshotEnumerateResponse{ VolumeSnapshotIds: resp.GetVolumeSnapshotIds(), }, nil }
[ "func", "(", "s", "*", "VolumeServer", ")", "SnapshotEnumerate", "(", "ctx", "context", ".", "Context", ",", "req", "*", "api", ".", "SdkVolumeSnapshotEnumerateRequest", ",", ")", "(", "*", "api", ".", "SdkVolumeSnapshotEnumerateResponse", ",", "error", ")", "{", "if", "s", ".", "cluster", "(", ")", "==", "nil", "||", "s", ".", "driver", "(", "ctx", ")", "==", "nil", "{", "return", "nil", ",", "status", ".", "Error", "(", "codes", ".", "Unavailable", ",", "\"", "\"", ")", "\n", "}", "\n\n", "resp", ",", "err", ":=", "s", ".", "SnapshotEnumerateWithFilters", "(", "ctx", ",", "&", "api", ".", "SdkVolumeSnapshotEnumerateWithFiltersRequest", "{", "VolumeId", ":", "req", ".", "GetVolumeId", "(", ")", ",", "}", ",", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "api", ".", "SdkVolumeSnapshotEnumerateResponse", "{", "VolumeSnapshotIds", ":", "resp", ".", "GetVolumeSnapshotIds", "(", ")", ",", "}", ",", "nil", "\n\n", "}" ]
// SnapshotEnumerate returns a list of snapshots for the specified volume
[ "SnapshotEnumerate", "returns", "a", "list", "of", "snapshots", "for", "the", "specified", "volume" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/server/sdk/volume_snapshot.go#L109-L131
143,849
libopenstorage/openstorage
api/server/sdk/volume_snapshot.go
SnapshotEnumerateWithFilters
func (s *VolumeServer) SnapshotEnumerateWithFilters( ctx context.Context, req *api.SdkVolumeSnapshotEnumerateWithFiltersRequest, ) (*api.SdkVolumeSnapshotEnumerateWithFiltersResponse, error) { if s.cluster() == nil || s.driver(ctx) == nil { return nil, status.Error(codes.Unavailable, "Resource has not been initialized") } // Get access rights var volReq []string if len(req.GetVolumeId()) != 0 { if err := s.checkAccessForVolumeId(ctx, req.GetVolumeId(), api.Ownership_Read); err != nil { return nil, err } volReq = []string{req.GetVolumeId()} } else { volReq = nil } snapshots, err := s.driver(ctx).SnapEnumerate(volReq, req.GetLabels()) if err != nil { return nil, status.Errorf( codes.Internal, "Failed to enumerate snapshots in volume %s: %v", req.GetVolumeId(), err.Error()) } ids := make([]string, 0) for _, snapshot := range snapshots { // Check access if snapshot.IsPermitted(ctx, api.Ownership_Read) { ids = append(ids, snapshot.GetId()) } } return &api.SdkVolumeSnapshotEnumerateWithFiltersResponse{ VolumeSnapshotIds: ids, }, nil }
go
func (s *VolumeServer) SnapshotEnumerateWithFilters( ctx context.Context, req *api.SdkVolumeSnapshotEnumerateWithFiltersRequest, ) (*api.SdkVolumeSnapshotEnumerateWithFiltersResponse, error) { if s.cluster() == nil || s.driver(ctx) == nil { return nil, status.Error(codes.Unavailable, "Resource has not been initialized") } // Get access rights var volReq []string if len(req.GetVolumeId()) != 0 { if err := s.checkAccessForVolumeId(ctx, req.GetVolumeId(), api.Ownership_Read); err != nil { return nil, err } volReq = []string{req.GetVolumeId()} } else { volReq = nil } snapshots, err := s.driver(ctx).SnapEnumerate(volReq, req.GetLabels()) if err != nil { return nil, status.Errorf( codes.Internal, "Failed to enumerate snapshots in volume %s: %v", req.GetVolumeId(), err.Error()) } ids := make([]string, 0) for _, snapshot := range snapshots { // Check access if snapshot.IsPermitted(ctx, api.Ownership_Read) { ids = append(ids, snapshot.GetId()) } } return &api.SdkVolumeSnapshotEnumerateWithFiltersResponse{ VolumeSnapshotIds: ids, }, nil }
[ "func", "(", "s", "*", "VolumeServer", ")", "SnapshotEnumerateWithFilters", "(", "ctx", "context", ".", "Context", ",", "req", "*", "api", ".", "SdkVolumeSnapshotEnumerateWithFiltersRequest", ",", ")", "(", "*", "api", ".", "SdkVolumeSnapshotEnumerateWithFiltersResponse", ",", "error", ")", "{", "if", "s", ".", "cluster", "(", ")", "==", "nil", "||", "s", ".", "driver", "(", "ctx", ")", "==", "nil", "{", "return", "nil", ",", "status", ".", "Error", "(", "codes", ".", "Unavailable", ",", "\"", "\"", ")", "\n", "}", "\n\n", "// Get access rights", "var", "volReq", "[", "]", "string", "\n", "if", "len", "(", "req", ".", "GetVolumeId", "(", ")", ")", "!=", "0", "{", "if", "err", ":=", "s", ".", "checkAccessForVolumeId", "(", "ctx", ",", "req", ".", "GetVolumeId", "(", ")", ",", "api", ".", "Ownership_Read", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "volReq", "=", "[", "]", "string", "{", "req", ".", "GetVolumeId", "(", ")", "}", "\n", "}", "else", "{", "volReq", "=", "nil", "\n", "}", "\n\n", "snapshots", ",", "err", ":=", "s", ".", "driver", "(", "ctx", ")", ".", "SnapEnumerate", "(", "volReq", ",", "req", ".", "GetLabels", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "status", ".", "Errorf", "(", "codes", ".", "Internal", ",", "\"", "\"", ",", "req", ".", "GetVolumeId", "(", ")", ",", "err", ".", "Error", "(", ")", ")", "\n", "}", "\n\n", "ids", ":=", "make", "(", "[", "]", "string", ",", "0", ")", "\n", "for", "_", ",", "snapshot", ":=", "range", "snapshots", "{", "// Check access", "if", "snapshot", ".", "IsPermitted", "(", "ctx", ",", "api", ".", "Ownership_Read", ")", "{", "ids", "=", "append", "(", "ids", ",", "snapshot", ".", "GetId", "(", ")", ")", "\n", "}", "\n", "}", "\n\n", "return", "&", "api", ".", "SdkVolumeSnapshotEnumerateWithFiltersResponse", "{", "VolumeSnapshotIds", ":", "ids", ",", "}", ",", "nil", "\n", "}" ]
// SnapshotEnumerateWithFilters returns a list of snapshots for the specified // volume and labels
[ "SnapshotEnumerateWithFilters", "returns", "a", "list", "of", "snapshots", "for", "the", "specified", "volume", "and", "labels" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/server/sdk/volume_snapshot.go#L135-L174
143,850
libopenstorage/openstorage
api/server/sdk/volume_snapshot.go
SnapshotScheduleUpdate
func (s *VolumeServer) SnapshotScheduleUpdate( ctx context.Context, req *api.SdkVolumeSnapshotScheduleUpdateRequest, ) (*api.SdkVolumeSnapshotScheduleUpdateResponse, error) { if s.cluster() == nil || s.driver(ctx) == nil { return nil, status.Error(codes.Unavailable, "Resource has not been initialized") } if len(req.GetVolumeId()) == 0 { return nil, status.Error(codes.InvalidArgument, "Must supply volume id") } // Get volume specification // This checks for access also resp, err := s.Inspect(ctx, &api.SdkVolumeInspectRequest{ VolumeId: req.GetVolumeId(), }) if err != nil { return nil, err } // Check if caller has access to affect volume if !resp.GetVolume().IsPermitted(ctx, api.Ownership_Write) { return nil, status.Errorf( codes.PermissionDenied, "Cannot change the snapshot schedule for volume %s", req.GetVolumeId()) } // Determine if they exist for _, name := range req.GetSnapshotScheduleNames() { _, err := s.cluster().SchedPolicyGet(name) if err != nil { return nil, status.Errorf( codes.Aborted, "Error accessing schedule policy %s: %v", name, err) } } // Apply names to snapshot schedule in the Volume specification // merging with any schedule already there in "schedule" format. var pt *sched.PolicyTags if len(req.GetSnapshotScheduleNames()) != 0 { pt, err = sched.NewPolicyTagsFromSlice(req.GetSnapshotScheduleNames()) if err != nil { return nil, status.Errorf( codes.Internal, "Unable to parse policies: %v", err) } } snapscheds, _, err := sched.ParseScheduleAndPolicies(resp.GetVolume().GetSpec().GetSnapshotSchedule()) if err != nil { return nil, status.Errorf( codes.Internal, "Unable to parse snapshot schedule: %v", err) } snapshotSchedule := sched.ScheduleSummary(snapscheds, pt) // Update the volume specification _, err = s.Update(ctx, &api.SdkVolumeUpdateRequest{ VolumeId: req.GetVolumeId(), Spec: &api.VolumeSpecUpdate{ SnapshotScheduleOpt: &api.VolumeSpecUpdate_SnapshotSchedule{ SnapshotSchedule: snapshotSchedule, }, }, }) if err != nil { return nil, err } return &api.SdkVolumeSnapshotScheduleUpdateResponse{}, nil }
go
func (s *VolumeServer) SnapshotScheduleUpdate( ctx context.Context, req *api.SdkVolumeSnapshotScheduleUpdateRequest, ) (*api.SdkVolumeSnapshotScheduleUpdateResponse, error) { if s.cluster() == nil || s.driver(ctx) == nil { return nil, status.Error(codes.Unavailable, "Resource has not been initialized") } if len(req.GetVolumeId()) == 0 { return nil, status.Error(codes.InvalidArgument, "Must supply volume id") } // Get volume specification // This checks for access also resp, err := s.Inspect(ctx, &api.SdkVolumeInspectRequest{ VolumeId: req.GetVolumeId(), }) if err != nil { return nil, err } // Check if caller has access to affect volume if !resp.GetVolume().IsPermitted(ctx, api.Ownership_Write) { return nil, status.Errorf( codes.PermissionDenied, "Cannot change the snapshot schedule for volume %s", req.GetVolumeId()) } // Determine if they exist for _, name := range req.GetSnapshotScheduleNames() { _, err := s.cluster().SchedPolicyGet(name) if err != nil { return nil, status.Errorf( codes.Aborted, "Error accessing schedule policy %s: %v", name, err) } } // Apply names to snapshot schedule in the Volume specification // merging with any schedule already there in "schedule" format. var pt *sched.PolicyTags if len(req.GetSnapshotScheduleNames()) != 0 { pt, err = sched.NewPolicyTagsFromSlice(req.GetSnapshotScheduleNames()) if err != nil { return nil, status.Errorf( codes.Internal, "Unable to parse policies: %v", err) } } snapscheds, _, err := sched.ParseScheduleAndPolicies(resp.GetVolume().GetSpec().GetSnapshotSchedule()) if err != nil { return nil, status.Errorf( codes.Internal, "Unable to parse snapshot schedule: %v", err) } snapshotSchedule := sched.ScheduleSummary(snapscheds, pt) // Update the volume specification _, err = s.Update(ctx, &api.SdkVolumeUpdateRequest{ VolumeId: req.GetVolumeId(), Spec: &api.VolumeSpecUpdate{ SnapshotScheduleOpt: &api.VolumeSpecUpdate_SnapshotSchedule{ SnapshotSchedule: snapshotSchedule, }, }, }) if err != nil { return nil, err } return &api.SdkVolumeSnapshotScheduleUpdateResponse{}, nil }
[ "func", "(", "s", "*", "VolumeServer", ")", "SnapshotScheduleUpdate", "(", "ctx", "context", ".", "Context", ",", "req", "*", "api", ".", "SdkVolumeSnapshotScheduleUpdateRequest", ",", ")", "(", "*", "api", ".", "SdkVolumeSnapshotScheduleUpdateResponse", ",", "error", ")", "{", "if", "s", ".", "cluster", "(", ")", "==", "nil", "||", "s", ".", "driver", "(", "ctx", ")", "==", "nil", "{", "return", "nil", ",", "status", ".", "Error", "(", "codes", ".", "Unavailable", ",", "\"", "\"", ")", "\n", "}", "\n\n", "if", "len", "(", "req", ".", "GetVolumeId", "(", ")", ")", "==", "0", "{", "return", "nil", ",", "status", ".", "Error", "(", "codes", ".", "InvalidArgument", ",", "\"", "\"", ")", "\n", "}", "\n\n", "// Get volume specification", "// This checks for access also", "resp", ",", "err", ":=", "s", ".", "Inspect", "(", "ctx", ",", "&", "api", ".", "SdkVolumeInspectRequest", "{", "VolumeId", ":", "req", ".", "GetVolumeId", "(", ")", ",", "}", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "// Check if caller has access to affect volume", "if", "!", "resp", ".", "GetVolume", "(", ")", ".", "IsPermitted", "(", "ctx", ",", "api", ".", "Ownership_Write", ")", "{", "return", "nil", ",", "status", ".", "Errorf", "(", "codes", ".", "PermissionDenied", ",", "\"", "\"", ",", "req", ".", "GetVolumeId", "(", ")", ")", "\n", "}", "\n\n", "// Determine if they exist", "for", "_", ",", "name", ":=", "range", "req", ".", "GetSnapshotScheduleNames", "(", ")", "{", "_", ",", "err", ":=", "s", ".", "cluster", "(", ")", ".", "SchedPolicyGet", "(", "name", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "status", ".", "Errorf", "(", "codes", ".", "Aborted", ",", "\"", "\"", ",", "name", ",", "err", ")", "\n", "}", "\n", "}", "\n\n", "// Apply names to snapshot schedule in the Volume specification", "// merging with any schedule already there in \"schedule\" format.", "var", "pt", "*", "sched", ".", "PolicyTags", "\n", "if", "len", "(", "req", ".", "GetSnapshotScheduleNames", "(", ")", ")", "!=", "0", "{", "pt", ",", "err", "=", "sched", ".", "NewPolicyTagsFromSlice", "(", "req", ".", "GetSnapshotScheduleNames", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "status", ".", "Errorf", "(", "codes", ".", "Internal", ",", "\"", "\"", ",", "err", ")", "\n", "}", "\n", "}", "\n", "snapscheds", ",", "_", ",", "err", ":=", "sched", ".", "ParseScheduleAndPolicies", "(", "resp", ".", "GetVolume", "(", ")", ".", "GetSpec", "(", ")", ".", "GetSnapshotSchedule", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "status", ".", "Errorf", "(", "codes", ".", "Internal", ",", "\"", "\"", ",", "err", ")", "\n", "}", "\n", "snapshotSchedule", ":=", "sched", ".", "ScheduleSummary", "(", "snapscheds", ",", "pt", ")", "\n\n", "// Update the volume specification", "_", ",", "err", "=", "s", ".", "Update", "(", "ctx", ",", "&", "api", ".", "SdkVolumeUpdateRequest", "{", "VolumeId", ":", "req", ".", "GetVolumeId", "(", ")", ",", "Spec", ":", "&", "api", ".", "VolumeSpecUpdate", "{", "SnapshotScheduleOpt", ":", "&", "api", ".", "VolumeSpecUpdate_SnapshotSchedule", "{", "SnapshotSchedule", ":", "snapshotSchedule", ",", "}", ",", "}", ",", "}", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "&", "api", ".", "SdkVolumeSnapshotScheduleUpdateResponse", "{", "}", ",", "nil", "\n", "}" ]
// SnapshotScheduleUpdate updates the snapshot schedule in the volume. // It only manages the PolicyTags
[ "SnapshotScheduleUpdate", "updates", "the", "snapshot", "schedule", "in", "the", "volume", ".", "It", "only", "manages", "the", "PolicyTags" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/server/sdk/volume_snapshot.go#L178-L251
143,851
libopenstorage/openstorage
api/server/sdk/credentials.go
Create
func (s *CredentialServer) Create( ctx context.Context, req *api.SdkCredentialCreateRequest, ) (*api.SdkCredentialCreateResponse, error) { if s.driver(ctx) == nil { return nil, status.Error(codes.Unavailable, "Resource has not been initialized") } if len(req.GetName()) == 0 { return nil, status.Error(codes.InvalidArgument, "Must supply a name") } else if aws := req.GetAwsCredential(); aws != nil { return s.awsCreate(ctx, req, aws) } else if azure := req.GetAzureCredential(); azure != nil { return s.azureCreate(ctx, req, azure) } else if google := req.GetGoogleCredential(); google != nil { return s.googleCreate(ctx, req, google) } return nil, status.Error(codes.InvalidArgument, "Unknown credential type") }
go
func (s *CredentialServer) Create( ctx context.Context, req *api.SdkCredentialCreateRequest, ) (*api.SdkCredentialCreateResponse, error) { if s.driver(ctx) == nil { return nil, status.Error(codes.Unavailable, "Resource has not been initialized") } if len(req.GetName()) == 0 { return nil, status.Error(codes.InvalidArgument, "Must supply a name") } else if aws := req.GetAwsCredential(); aws != nil { return s.awsCreate(ctx, req, aws) } else if azure := req.GetAzureCredential(); azure != nil { return s.azureCreate(ctx, req, azure) } else if google := req.GetGoogleCredential(); google != nil { return s.googleCreate(ctx, req, google) } return nil, status.Error(codes.InvalidArgument, "Unknown credential type") }
[ "func", "(", "s", "*", "CredentialServer", ")", "Create", "(", "ctx", "context", ".", "Context", ",", "req", "*", "api", ".", "SdkCredentialCreateRequest", ",", ")", "(", "*", "api", ".", "SdkCredentialCreateResponse", ",", "error", ")", "{", "if", "s", ".", "driver", "(", "ctx", ")", "==", "nil", "{", "return", "nil", ",", "status", ".", "Error", "(", "codes", ".", "Unavailable", ",", "\"", "\"", ")", "\n", "}", "\n\n", "if", "len", "(", "req", ".", "GetName", "(", ")", ")", "==", "0", "{", "return", "nil", ",", "status", ".", "Error", "(", "codes", ".", "InvalidArgument", ",", "\"", "\"", ")", "\n", "}", "else", "if", "aws", ":=", "req", ".", "GetAwsCredential", "(", ")", ";", "aws", "!=", "nil", "{", "return", "s", ".", "awsCreate", "(", "ctx", ",", "req", ",", "aws", ")", "\n", "}", "else", "if", "azure", ":=", "req", ".", "GetAzureCredential", "(", ")", ";", "azure", "!=", "nil", "{", "return", "s", ".", "azureCreate", "(", "ctx", ",", "req", ",", "azure", ")", "\n", "}", "else", "if", "google", ":=", "req", ".", "GetGoogleCredential", "(", ")", ";", "google", "!=", "nil", "{", "return", "s", ".", "googleCreate", "(", "ctx", ",", "req", ",", "google", ")", "\n", "}", "\n", "return", "nil", ",", "status", ".", "Error", "(", "codes", ".", "InvalidArgument", ",", "\"", "\"", ")", "\n\n", "}" ]
// Create method creates credentials
[ "Create", "method", "creates", "credentials" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/server/sdk/credentials.go#L42-L61
143,852
libopenstorage/openstorage
api/server/sdk/credentials.go
Validate
func (s *CredentialServer) Validate( ctx context.Context, req *api.SdkCredentialValidateRequest, ) (*api.SdkCredentialValidateResponse, error) { if s.driver(ctx) == nil { return nil, status.Error(codes.Unavailable, "Resource has not been initialized") } if len(req.GetCredentialId()) == 0 { return nil, status.Error(codes.InvalidArgument, "Must provide credentials uuid") } // Check ownership _, err := s.Inspect(ctx, &api.SdkCredentialInspectRequest{ CredentialId: req.GetCredentialId(), }) if err != nil { return nil, err } err = s.driver(ctx).CredsValidate(req.GetCredentialId()) if err != nil { return nil, status.Errorf( codes.Internal, "failed to validate credentials: %v", err.Error()) } return &api.SdkCredentialValidateResponse{}, nil }
go
func (s *CredentialServer) Validate( ctx context.Context, req *api.SdkCredentialValidateRequest, ) (*api.SdkCredentialValidateResponse, error) { if s.driver(ctx) == nil { return nil, status.Error(codes.Unavailable, "Resource has not been initialized") } if len(req.GetCredentialId()) == 0 { return nil, status.Error(codes.InvalidArgument, "Must provide credentials uuid") } // Check ownership _, err := s.Inspect(ctx, &api.SdkCredentialInspectRequest{ CredentialId: req.GetCredentialId(), }) if err != nil { return nil, err } err = s.driver(ctx).CredsValidate(req.GetCredentialId()) if err != nil { return nil, status.Errorf( codes.Internal, "failed to validate credentials: %v", err.Error()) } return &api.SdkCredentialValidateResponse{}, nil }
[ "func", "(", "s", "*", "CredentialServer", ")", "Validate", "(", "ctx", "context", ".", "Context", ",", "req", "*", "api", ".", "SdkCredentialValidateRequest", ",", ")", "(", "*", "api", ".", "SdkCredentialValidateResponse", ",", "error", ")", "{", "if", "s", ".", "driver", "(", "ctx", ")", "==", "nil", "{", "return", "nil", ",", "status", ".", "Error", "(", "codes", ".", "Unavailable", ",", "\"", "\"", ")", "\n", "}", "\n\n", "if", "len", "(", "req", ".", "GetCredentialId", "(", ")", ")", "==", "0", "{", "return", "nil", ",", "status", ".", "Error", "(", "codes", ".", "InvalidArgument", ",", "\"", "\"", ")", "\n", "}", "\n\n", "// Check ownership", "_", ",", "err", ":=", "s", ".", "Inspect", "(", "ctx", ",", "&", "api", ".", "SdkCredentialInspectRequest", "{", "CredentialId", ":", "req", ".", "GetCredentialId", "(", ")", ",", "}", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "err", "=", "s", ".", "driver", "(", "ctx", ")", ".", "CredsValidate", "(", "req", ".", "GetCredentialId", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "status", ".", "Errorf", "(", "codes", ".", "Internal", ",", "\"", "\"", ",", "err", ".", "Error", "(", ")", ")", "\n", "}", "\n", "return", "&", "api", ".", "SdkCredentialValidateResponse", "{", "}", ",", "nil", "\n\n", "}" ]
// Validate validates a specified Credential.
[ "Validate", "validates", "a", "specified", "Credential", "." ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/server/sdk/credentials.go#L196-L225
143,853
libopenstorage/openstorage
api/server/sdk/credentials.go
Delete
func (s *CredentialServer) Delete( ctx context.Context, req *api.SdkCredentialDeleteRequest, ) (*api.SdkCredentialDeleteResponse, error) { if s.driver(ctx) == nil { return nil, status.Error(codes.Unavailable, "Resource has not been initialized") } if len(req.GetCredentialId()) == 0 { return nil, status.Error(codes.InvalidArgument, "Must provide credentials uuid") } // Check ownership resp, err := s.Inspect(ctx, &api.SdkCredentialInspectRequest{ CredentialId: req.GetCredentialId(), }) // This checks at least for READ access type to credential if err != nil { return nil, err } // This checks for admin access type to credential to be able to delete it if !resp.GetOwnership().IsPermittedByContext(ctx, api.Ownership_Admin) { return nil, status.Errorf( codes.PermissionDenied, "Only admin access type to credential is allowed to delete %v", req.GetCredentialId()) } err = s.driver(ctx).CredsDelete(req.GetCredentialId()) if err != nil { return nil, status.Errorf( codes.Internal, "failed to delete credentials: %v", err.Error()) } return &api.SdkCredentialDeleteResponse{}, nil }
go
func (s *CredentialServer) Delete( ctx context.Context, req *api.SdkCredentialDeleteRequest, ) (*api.SdkCredentialDeleteResponse, error) { if s.driver(ctx) == nil { return nil, status.Error(codes.Unavailable, "Resource has not been initialized") } if len(req.GetCredentialId()) == 0 { return nil, status.Error(codes.InvalidArgument, "Must provide credentials uuid") } // Check ownership resp, err := s.Inspect(ctx, &api.SdkCredentialInspectRequest{ CredentialId: req.GetCredentialId(), }) // This checks at least for READ access type to credential if err != nil { return nil, err } // This checks for admin access type to credential to be able to delete it if !resp.GetOwnership().IsPermittedByContext(ctx, api.Ownership_Admin) { return nil, status.Errorf( codes.PermissionDenied, "Only admin access type to credential is allowed to delete %v", req.GetCredentialId()) } err = s.driver(ctx).CredsDelete(req.GetCredentialId()) if err != nil { return nil, status.Errorf( codes.Internal, "failed to delete credentials: %v", err.Error()) } return &api.SdkCredentialDeleteResponse{}, nil }
[ "func", "(", "s", "*", "CredentialServer", ")", "Delete", "(", "ctx", "context", ".", "Context", ",", "req", "*", "api", ".", "SdkCredentialDeleteRequest", ",", ")", "(", "*", "api", ".", "SdkCredentialDeleteResponse", ",", "error", ")", "{", "if", "s", ".", "driver", "(", "ctx", ")", "==", "nil", "{", "return", "nil", ",", "status", ".", "Error", "(", "codes", ".", "Unavailable", ",", "\"", "\"", ")", "\n", "}", "\n\n", "if", "len", "(", "req", ".", "GetCredentialId", "(", ")", ")", "==", "0", "{", "return", "nil", ",", "status", ".", "Error", "(", "codes", ".", "InvalidArgument", ",", "\"", "\"", ")", "\n", "}", "\n\n", "// Check ownership", "resp", ",", "err", ":=", "s", ".", "Inspect", "(", "ctx", ",", "&", "api", ".", "SdkCredentialInspectRequest", "{", "CredentialId", ":", "req", ".", "GetCredentialId", "(", ")", ",", "}", ")", "\n", "// This checks at least for READ access type to credential", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n", "// This checks for admin access type to credential to be able to delete it", "if", "!", "resp", ".", "GetOwnership", "(", ")", ".", "IsPermittedByContext", "(", "ctx", ",", "api", ".", "Ownership_Admin", ")", "{", "return", "nil", ",", "status", ".", "Errorf", "(", "codes", ".", "PermissionDenied", ",", "\"", "\"", ",", "req", ".", "GetCredentialId", "(", ")", ")", "\n", "}", "\n\n", "err", "=", "s", ".", "driver", "(", "ctx", ")", ".", "CredsDelete", "(", "req", ".", "GetCredentialId", "(", ")", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "status", ".", "Errorf", "(", "codes", ".", "Internal", ",", "\"", "\"", ",", "err", ".", "Error", "(", ")", ")", "\n", "}", "\n\n", "return", "&", "api", ".", "SdkCredentialDeleteResponse", "{", "}", ",", "nil", "\n", "}" ]
// Delete deletes a specified credential
[ "Delete", "deletes", "a", "specified", "credential" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/server/sdk/credentials.go#L228-L266
143,854
libopenstorage/openstorage
api/server/sdk/credentials.go
Enumerate
func (s *CredentialServer) Enumerate( ctx context.Context, req *api.SdkCredentialEnumerateRequest, ) (*api.SdkCredentialEnumerateResponse, error) { if s.driver(ctx) == nil { return nil, status.Error(codes.Unavailable, "Resource has not been initialized") } credList, err := s.driver(ctx).CredsEnumerate() if err != nil { return nil, status.Errorf( codes.Internal, "Unable to enumerate credentials AWS: %v", err.Error()) } ids := make([]string, 0) for credId, cred := range credList { if s.isPermitted(ctx, api.Ownership_Read, cred) { ids = append(ids, credId) } } return &api.SdkCredentialEnumerateResponse{ CredentialIds: ids, }, nil }
go
func (s *CredentialServer) Enumerate( ctx context.Context, req *api.SdkCredentialEnumerateRequest, ) (*api.SdkCredentialEnumerateResponse, error) { if s.driver(ctx) == nil { return nil, status.Error(codes.Unavailable, "Resource has not been initialized") } credList, err := s.driver(ctx).CredsEnumerate() if err != nil { return nil, status.Errorf( codes.Internal, "Unable to enumerate credentials AWS: %v", err.Error()) } ids := make([]string, 0) for credId, cred := range credList { if s.isPermitted(ctx, api.Ownership_Read, cred) { ids = append(ids, credId) } } return &api.SdkCredentialEnumerateResponse{ CredentialIds: ids, }, nil }
[ "func", "(", "s", "*", "CredentialServer", ")", "Enumerate", "(", "ctx", "context", ".", "Context", ",", "req", "*", "api", ".", "SdkCredentialEnumerateRequest", ",", ")", "(", "*", "api", ".", "SdkCredentialEnumerateResponse", ",", "error", ")", "{", "if", "s", ".", "driver", "(", "ctx", ")", "==", "nil", "{", "return", "nil", ",", "status", ".", "Error", "(", "codes", ".", "Unavailable", ",", "\"", "\"", ")", "\n", "}", "\n\n", "credList", ",", "err", ":=", "s", ".", "driver", "(", "ctx", ")", ".", "CredsEnumerate", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "status", ".", "Errorf", "(", "codes", ".", "Internal", ",", "\"", "\"", ",", "err", ".", "Error", "(", ")", ")", "\n", "}", "\n\n", "ids", ":=", "make", "(", "[", "]", "string", ",", "0", ")", "\n", "for", "credId", ",", "cred", ":=", "range", "credList", "{", "if", "s", ".", "isPermitted", "(", "ctx", ",", "api", ".", "Ownership_Read", ",", "cred", ")", "{", "ids", "=", "append", "(", "ids", ",", "credId", ")", "\n", "}", "\n", "}", "\n\n", "return", "&", "api", ".", "SdkCredentialEnumerateResponse", "{", "CredentialIds", ":", "ids", ",", "}", ",", "nil", "\n\n", "}" ]
// Enumerate returns a list credentials ids
[ "Enumerate", "returns", "a", "list", "credentials", "ids" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/server/sdk/credentials.go#L269-L296
143,855
libopenstorage/openstorage
api/client/cluster/client.go
Enumerate
func (c *clusterClient) Enumerate() (api.Cluster, error) { clusterInfo := api.Cluster{} if err := c.c.Get().Resource(clusterPath + "/enumerate").Do().Unmarshal(&clusterInfo); err != nil { return clusterInfo, err } return clusterInfo, nil }
go
func (c *clusterClient) Enumerate() (api.Cluster, error) { clusterInfo := api.Cluster{} if err := c.c.Get().Resource(clusterPath + "/enumerate").Do().Unmarshal(&clusterInfo); err != nil { return clusterInfo, err } return clusterInfo, nil }
[ "func", "(", "c", "*", "clusterClient", ")", "Enumerate", "(", ")", "(", "api", ".", "Cluster", ",", "error", ")", "{", "clusterInfo", ":=", "api", ".", "Cluster", "{", "}", "\n\n", "if", "err", ":=", "c", ".", "c", ".", "Get", "(", ")", ".", "Resource", "(", "clusterPath", "+", "\"", "\"", ")", ".", "Do", "(", ")", ".", "Unmarshal", "(", "&", "clusterInfo", ")", ";", "err", "!=", "nil", "{", "return", "clusterInfo", ",", "err", "\n", "}", "\n", "return", "clusterInfo", ",", "nil", "\n", "}" ]
// Enumerate returns information about the cluster and its nodes
[ "Enumerate", "returns", "information", "about", "the", "cluster", "and", "its", "nodes" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/client/cluster/client.go#L165-L172
143,856
libopenstorage/openstorage
api/client/cluster/client.go
SecretGetDefaultSecretKey
func (c *clusterClient) SecretGetDefaultSecretKey() (interface{}, error) { var defaultKeyResp interface{} path := clusterPath + secretPath + "/defaultsecretkey" request := c.c.Get().Resource(path) err := request.Do().Unmarshal(&defaultKeyResp) if err != nil { return defaultKeyResp, err } return defaultKeyResp, nil }
go
func (c *clusterClient) SecretGetDefaultSecretKey() (interface{}, error) { var defaultKeyResp interface{} path := clusterPath + secretPath + "/defaultsecretkey" request := c.c.Get().Resource(path) err := request.Do().Unmarshal(&defaultKeyResp) if err != nil { return defaultKeyResp, err } return defaultKeyResp, nil }
[ "func", "(", "c", "*", "clusterClient", ")", "SecretGetDefaultSecretKey", "(", ")", "(", "interface", "{", "}", ",", "error", ")", "{", "var", "defaultKeyResp", "interface", "{", "}", "\n", "path", ":=", "clusterPath", "+", "secretPath", "+", "\"", "\"", "\n", "request", ":=", "c", ".", "c", ".", "Get", "(", ")", ".", "Resource", "(", "path", ")", "\n", "err", ":=", "request", ".", "Do", "(", ")", ".", "Unmarshal", "(", "&", "defaultKeyResp", ")", "\n", "if", "err", "!=", "nil", "{", "return", "defaultKeyResp", ",", "err", "\n", "}", "\n", "return", "defaultKeyResp", ",", "nil", "\n", "}" ]
// SecretGetDefaultSecretKey returns cluster wide secret key's value
[ "SecretGetDefaultSecretKey", "returns", "cluster", "wide", "secret", "key", "s", "value" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/client/cluster/client.go#L353-L362
143,857
libopenstorage/openstorage
api/client/cluster/client.go
SecretCheckLogin
func (c *clusterClient) SecretCheckLogin() error { path := clusterPath + secretPath + "/verify" request := c.c.Get().Resource(path) resp := request.Do() if resp.Error() != nil { return resp.FormatError() } return nil }
go
func (c *clusterClient) SecretCheckLogin() error { path := clusterPath + secretPath + "/verify" request := c.c.Get().Resource(path) resp := request.Do() if resp.Error() != nil { return resp.FormatError() } return nil }
[ "func", "(", "c", "*", "clusterClient", ")", "SecretCheckLogin", "(", ")", "error", "{", "path", ":=", "clusterPath", "+", "secretPath", "+", "\"", "\"", "\n", "request", ":=", "c", ".", "c", ".", "Get", "(", ")", ".", "Resource", "(", "path", ")", "\n", "resp", ":=", "request", ".", "Do", "(", ")", "\n", "if", "resp", ".", "Error", "(", ")", "!=", "nil", "{", "return", "resp", ".", "FormatError", "(", ")", "\n", "}", "\n", "return", "nil", "\n", "}" ]
// SecretCheckLogin validates session with secret store
[ "SecretCheckLogin", "validates", "session", "with", "secret", "store" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/client/cluster/client.go#L392-L400
143,858
libopenstorage/openstorage
api/client/cluster/client.go
SchedPolicyEnumerate
func (c *clusterClient) SchedPolicyEnumerate() ([]*sched.SchedPolicy, error) { var schedPolicies []*sched.SchedPolicy req := c.c.Get().Resource(clusterPath + SchedPath) if err := req.Do().Unmarshal(&schedPolicies); err != nil { return nil, err } return schedPolicies, nil }
go
func (c *clusterClient) SchedPolicyEnumerate() ([]*sched.SchedPolicy, error) { var schedPolicies []*sched.SchedPolicy req := c.c.Get().Resource(clusterPath + SchedPath) if err := req.Do().Unmarshal(&schedPolicies); err != nil { return nil, err } return schedPolicies, nil }
[ "func", "(", "c", "*", "clusterClient", ")", "SchedPolicyEnumerate", "(", ")", "(", "[", "]", "*", "sched", ".", "SchedPolicy", ",", "error", ")", "{", "var", "schedPolicies", "[", "]", "*", "sched", ".", "SchedPolicy", "\n", "req", ":=", "c", ".", "c", ".", "Get", "(", ")", ".", "Resource", "(", "clusterPath", "+", "SchedPath", ")", "\n\n", "if", "err", ":=", "req", ".", "Do", "(", ")", ".", "Unmarshal", "(", "&", "schedPolicies", ")", ";", "err", "!=", "nil", "{", "return", "nil", ",", "err", "\n", "}", "\n\n", "return", "schedPolicies", ",", "nil", "\n", "}" ]
// SchedPolicyEnumerate enumerates all configured policies
[ "SchedPolicyEnumerate", "enumerates", "all", "configured", "policies" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/client/cluster/client.go#L418-L427
143,859
libopenstorage/openstorage
api/client/cluster/client.go
SchedPolicyCreate
func (c *clusterClient) SchedPolicyCreate(name, schedule string) error { request := &sched.SchedPolicy{ Name: name, Schedule: schedule, } req := c.c.Post().Resource(clusterPath + SchedPath).Body(request) res := req.Do() if res.Error() != nil { return res.FormatError() } return nil }
go
func (c *clusterClient) SchedPolicyCreate(name, schedule string) error { request := &sched.SchedPolicy{ Name: name, Schedule: schedule, } req := c.c.Post().Resource(clusterPath + SchedPath).Body(request) res := req.Do() if res.Error() != nil { return res.FormatError() } return nil }
[ "func", "(", "c", "*", "clusterClient", ")", "SchedPolicyCreate", "(", "name", ",", "schedule", "string", ")", "error", "{", "request", ":=", "&", "sched", ".", "SchedPolicy", "{", "Name", ":", "name", ",", "Schedule", ":", "schedule", ",", "}", "\n\n", "req", ":=", "c", ".", "c", ".", "Post", "(", ")", ".", "Resource", "(", "clusterPath", "+", "SchedPath", ")", ".", "Body", "(", "request", ")", "\n", "res", ":=", "req", ".", "Do", "(", ")", "\n", "if", "res", ".", "Error", "(", ")", "!=", "nil", "{", "return", "res", ".", "FormatError", "(", ")", "\n", "}", "\n\n", "return", "nil", "\n", "}" ]
// SchedPolicyCreate creates a policy with given name and schedule
[ "SchedPolicyCreate", "creates", "a", "policy", "with", "given", "name", "and", "schedule" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/client/cluster/client.go#L430-L443
143,860
libopenstorage/openstorage
api/client/cluster/client.go
SchedPolicyDelete
func (c *clusterClient) SchedPolicyDelete(name string) error { req := c.c.Delete().Resource(clusterPath + SchedPath).Instance(name) res := req.Do() if res.Error() != nil { return res.FormatError() } return nil }
go
func (c *clusterClient) SchedPolicyDelete(name string) error { req := c.c.Delete().Resource(clusterPath + SchedPath).Instance(name) res := req.Do() if res.Error() != nil { return res.FormatError() } return nil }
[ "func", "(", "c", "*", "clusterClient", ")", "SchedPolicyDelete", "(", "name", "string", ")", "error", "{", "req", ":=", "c", ".", "c", ".", "Delete", "(", ")", ".", "Resource", "(", "clusterPath", "+", "SchedPath", ")", ".", "Instance", "(", "name", ")", "\n", "res", ":=", "req", ".", "Do", "(", ")", "\n\n", "if", "res", ".", "Error", "(", ")", "!=", "nil", "{", "return", "res", ".", "FormatError", "(", ")", "\n", "}", "\n\n", "return", "nil", "\n", "}" ]
// SchedPolicyDelete deletes a policy with given name
[ "SchedPolicyDelete", "deletes", "a", "policy", "with", "given", "name" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/api/client/cluster/client.go#L462-L471
143,861
libopenstorage/openstorage
alerts/mock/alerts.mock.go
NewMockFilterDeleter
func NewMockFilterDeleter(ctrl *gomock.Controller) *MockFilterDeleter { mock := &MockFilterDeleter{ctrl: ctrl} mock.recorder = &MockFilterDeleterMockRecorder{mock} return mock }
go
func NewMockFilterDeleter(ctrl *gomock.Controller) *MockFilterDeleter { mock := &MockFilterDeleter{ctrl: ctrl} mock.recorder = &MockFilterDeleterMockRecorder{mock} return mock }
[ "func", "NewMockFilterDeleter", "(", "ctrl", "*", "gomock", ".", "Controller", ")", "*", "MockFilterDeleter", "{", "mock", ":=", "&", "MockFilterDeleter", "{", "ctrl", ":", "ctrl", "}", "\n", "mock", ".", "recorder", "=", "&", "MockFilterDeleterMockRecorder", "{", "mock", "}", "\n", "return", "mock", "\n", "}" ]
// NewMockFilterDeleter creates a new mock instance
[ "NewMockFilterDeleter", "creates", "a", "new", "mock", "instance" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/alerts/mock/alerts.mock.go#L26-L30
143,862
libopenstorage/openstorage
alerts/mock/alerts.mock.go
Filter
func (mr *MockFilterDeleterMockRecorder) Filter(arg0 interface{}, arg1 ...interface{}) *gomock.Call { varargs := append([]interface{}{arg0}, arg1...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockFilterDeleter)(nil).Filter), varargs...) }
go
func (mr *MockFilterDeleterMockRecorder) Filter(arg0 interface{}, arg1 ...interface{}) *gomock.Call { varargs := append([]interface{}{arg0}, arg1...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockFilterDeleter)(nil).Filter), varargs...) }
[ "func", "(", "mr", "*", "MockFilterDeleterMockRecorder", ")", "Filter", "(", "arg0", "interface", "{", "}", ",", "arg1", "...", "interface", "{", "}", ")", "*", "gomock", ".", "Call", "{", "varargs", ":=", "append", "(", "[", "]", "interface", "{", "}", "{", "arg0", "}", ",", "arg1", "...", ")", "\n", "return", "mr", ".", "mock", ".", "ctrl", ".", "RecordCallWithMethodType", "(", "mr", ".", "mock", ",", "\"", "\"", ",", "reflect", ".", "TypeOf", "(", "(", "*", "MockFilterDeleter", ")", "(", "nil", ")", ".", "Filter", ")", ",", "varargs", "...", ")", "\n", "}" ]
// Filter indicates an expected call of Filter
[ "Filter", "indicates", "an", "expected", "call", "of", "Filter" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/alerts/mock/alerts.mock.go#L83-L86
143,863
libopenstorage/openstorage
cluster/mock/cluster.mock.go
NewMockCluster
func NewMockCluster(ctrl *gomock.Controller) *MockCluster { mock := &MockCluster{ctrl: ctrl} mock.recorder = &MockClusterMockRecorder{mock} return mock }
go
func NewMockCluster(ctrl *gomock.Controller) *MockCluster { mock := &MockCluster{ctrl: ctrl} mock.recorder = &MockClusterMockRecorder{mock} return mock }
[ "func", "NewMockCluster", "(", "ctrl", "*", "gomock", ".", "Controller", ")", "*", "MockCluster", "{", "mock", ":=", "&", "MockCluster", "{", "ctrl", ":", "ctrl", "}", "\n", "mock", ".", "recorder", "=", "&", "MockClusterMockRecorder", "{", "mock", "}", "\n", "return", "mock", "\n", "}" ]
// NewMockCluster creates a new mock instance
[ "NewMockCluster", "creates", "a", "new", "mock", "instance" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L32-L36
143,864
libopenstorage/openstorage
cluster/mock/cluster.mock.go
AddEventListener
func (m *MockCluster) AddEventListener(arg0 cluster.ClusterListener) error { ret := m.ctrl.Call(m, "AddEventListener", arg0) ret0, _ := ret[0].(error) return ret0 }
go
func (m *MockCluster) AddEventListener(arg0 cluster.ClusterListener) error { ret := m.ctrl.Call(m, "AddEventListener", arg0) ret0, _ := ret[0].(error) return ret0 }
[ "func", "(", "m", "*", "MockCluster", ")", "AddEventListener", "(", "arg0", "cluster", ".", "ClusterListener", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "error", ")", "\n", "return", "ret0", "\n", "}" ]
// AddEventListener mocks base method
[ "AddEventListener", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L44-L48
143,865
libopenstorage/openstorage
cluster/mock/cluster.mock.go
ClusterNotifyClusterDomainsUpdate
func (m *MockCluster) ClusterNotifyClusterDomainsUpdate(arg0 types.ClusterDomainsActiveMap) error { ret := m.ctrl.Call(m, "ClusterNotifyClusterDomainsUpdate", arg0) ret0, _ := ret[0].(error) return ret0 }
go
func (m *MockCluster) ClusterNotifyClusterDomainsUpdate(arg0 types.ClusterDomainsActiveMap) error { ret := m.ctrl.Call(m, "ClusterNotifyClusterDomainsUpdate", arg0) ret0, _ := ret[0].(error) return ret0 }
[ "func", "(", "m", "*", "MockCluster", ")", "ClusterNotifyClusterDomainsUpdate", "(", "arg0", "types", ".", "ClusterDomainsActiveMap", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "error", ")", "\n", "return", "ret0", "\n", "}" ]
// ClusterNotifyClusterDomainsUpdate mocks base method
[ "ClusterNotifyClusterDomainsUpdate", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L56-L60
143,866
libopenstorage/openstorage
cluster/mock/cluster.mock.go
CreatePair
func (m *MockCluster) CreatePair(arg0 *api.ClusterPairCreateRequest) (*api.ClusterPairCreateResponse, error) { ret := m.ctrl.Call(m, "CreatePair", arg0) ret0, _ := ret[0].(*api.ClusterPairCreateResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockCluster) CreatePair(arg0 *api.ClusterPairCreateRequest) (*api.ClusterPairCreateResponse, error) { ret := m.ctrl.Call(m, "CreatePair", arg0) ret0, _ := ret[0].(*api.ClusterPairCreateResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockCluster", ")", "CreatePair", "(", "arg0", "*", "api", ".", "ClusterPairCreateRequest", ")", "(", "*", "api", ".", "ClusterPairCreateResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "ClusterPairCreateResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// CreatePair mocks base method
[ "CreatePair", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L81-L86
143,867
libopenstorage/openstorage
cluster/mock/cluster.mock.go
EnumerateAlerts
func (m *MockCluster) EnumerateAlerts(arg0, arg1 time.Time, arg2 api.ResourceType) (*api.Alerts, error) { ret := m.ctrl.Call(m, "EnumerateAlerts", arg0, arg1, arg2) ret0, _ := ret[0].(*api.Alerts) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockCluster) EnumerateAlerts(arg0, arg1 time.Time, arg2 api.ResourceType) (*api.Alerts, error) { ret := m.ctrl.Call(m, "EnumerateAlerts", arg0, arg1, arg2) ret0, _ := ret[0].(*api.Alerts) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockCluster", ")", "EnumerateAlerts", "(", "arg0", ",", "arg1", "time", ".", "Time", ",", "arg2", "api", ".", "ResourceType", ")", "(", "*", "api", ".", "Alerts", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ",", "arg1", ",", "arg2", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "Alerts", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// EnumerateAlerts mocks base method
[ "EnumerateAlerts", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L167-L172
143,868
libopenstorage/openstorage
cluster/mock/cluster.mock.go
EnumerateNodeConf
func (m *MockCluster) EnumerateNodeConf() (*osdconfig.NodesConfig, error) { ret := m.ctrl.Call(m, "EnumerateNodeConf") ret0, _ := ret[0].(*osdconfig.NodesConfig) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockCluster) EnumerateNodeConf() (*osdconfig.NodesConfig, error) { ret := m.ctrl.Call(m, "EnumerateNodeConf") ret0, _ := ret[0].(*osdconfig.NodesConfig) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockCluster", ")", "EnumerateNodeConf", "(", ")", "(", "*", "osdconfig", ".", "NodesConfig", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "osdconfig", ".", "NodesConfig", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// EnumerateNodeConf mocks base method
[ "EnumerateNodeConf", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L193-L198
143,869
libopenstorage/openstorage
cluster/mock/cluster.mock.go
EnumerateNodeConf
func (mr *MockClusterMockRecorder) EnumerateNodeConf() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnumerateNodeConf", reflect.TypeOf((*MockCluster)(nil).EnumerateNodeConf)) }
go
func (mr *MockClusterMockRecorder) EnumerateNodeConf() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnumerateNodeConf", reflect.TypeOf((*MockCluster)(nil).EnumerateNodeConf)) }
[ "func", "(", "mr", "*", "MockClusterMockRecorder", ")", "EnumerateNodeConf", "(", ")", "*", "gomock", ".", "Call", "{", "return", "mr", ".", "mock", ".", "ctrl", ".", "RecordCallWithMethodType", "(", "mr", ".", "mock", ",", "\"", "\"", ",", "reflect", ".", "TypeOf", "(", "(", "*", "MockCluster", ")", "(", "nil", ")", ".", "EnumerateNodeConf", ")", ")", "\n", "}" ]
// EnumerateNodeConf indicates an expected call of EnumerateNodeConf
[ "EnumerateNodeConf", "indicates", "an", "expected", "call", "of", "EnumerateNodeConf" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L201-L203
143,870
libopenstorage/openstorage
cluster/mock/cluster.mock.go
EnumeratePairs
func (m *MockCluster) EnumeratePairs() (*api.ClusterPairsEnumerateResponse, error) { ret := m.ctrl.Call(m, "EnumeratePairs") ret0, _ := ret[0].(*api.ClusterPairsEnumerateResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockCluster) EnumeratePairs() (*api.ClusterPairsEnumerateResponse, error) { ret := m.ctrl.Call(m, "EnumeratePairs") ret0, _ := ret[0].(*api.ClusterPairsEnumerateResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockCluster", ")", "EnumeratePairs", "(", ")", "(", "*", "api", ".", "ClusterPairsEnumerateResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "ClusterPairsEnumerateResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// EnumeratePairs mocks base method
[ "EnumeratePairs", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L206-L211
143,871
libopenstorage/openstorage
cluster/mock/cluster.mock.go
EraseAlert
func (m *MockCluster) EraseAlert(arg0 api.ResourceType, arg1 int64) error { ret := m.ctrl.Call(m, "EraseAlert", arg0, arg1) ret0, _ := ret[0].(error) return ret0 }
go
func (m *MockCluster) EraseAlert(arg0 api.ResourceType, arg1 int64) error { ret := m.ctrl.Call(m, "EraseAlert", arg0, arg1) ret0, _ := ret[0].(error) return ret0 }
[ "func", "(", "m", "*", "MockCluster", ")", "EraseAlert", "(", "arg0", "api", ".", "ResourceType", ",", "arg1", "int64", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ",", "arg1", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "error", ")", "\n", "return", "ret0", "\n", "}" ]
// EraseAlert mocks base method
[ "EraseAlert", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L219-L223
143,872
libopenstorage/openstorage
cluster/mock/cluster.mock.go
GetClusterConf
func (m *MockCluster) GetClusterConf() (*osdconfig.ClusterConfig, error) { ret := m.ctrl.Call(m, "GetClusterConf") ret0, _ := ret[0].(*osdconfig.ClusterConfig) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockCluster) GetClusterConf() (*osdconfig.ClusterConfig, error) { ret := m.ctrl.Call(m, "GetClusterConf") ret0, _ := ret[0].(*osdconfig.ClusterConfig) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockCluster", ")", "GetClusterConf", "(", ")", "(", "*", "osdconfig", ".", "ClusterConfig", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "osdconfig", ".", "ClusterConfig", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// GetClusterConf mocks base method
[ "GetClusterConf", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L231-L236
143,873
libopenstorage/openstorage
cluster/mock/cluster.mock.go
GetData
func (m *MockCluster) GetData() (map[string]*api.Node, error) { ret := m.ctrl.Call(m, "GetData") ret0, _ := ret[0].(map[string]*api.Node) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockCluster) GetData() (map[string]*api.Node, error) { ret := m.ctrl.Call(m, "GetData") ret0, _ := ret[0].(map[string]*api.Node) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockCluster", ")", "GetData", "(", ")", "(", "map", "[", "string", "]", "*", "api", ".", "Node", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "map", "[", "string", "]", "*", "api", ".", "Node", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// GetData mocks base method
[ "GetData", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L244-L249
143,874
libopenstorage/openstorage
cluster/mock/cluster.mock.go
GetGossipState
func (m *MockCluster) GetGossipState() *cluster.ClusterState { ret := m.ctrl.Call(m, "GetGossipState") ret0, _ := ret[0].(*cluster.ClusterState) return ret0 }
go
func (m *MockCluster) GetGossipState() *cluster.ClusterState { ret := m.ctrl.Call(m, "GetGossipState") ret0, _ := ret[0].(*cluster.ClusterState) return ret0 }
[ "func", "(", "m", "*", "MockCluster", ")", "GetGossipState", "(", ")", "*", "cluster", ".", "ClusterState", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "cluster", ".", "ClusterState", ")", "\n", "return", "ret0", "\n", "}" ]
// GetGossipState mocks base method
[ "GetGossipState", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L257-L261
143,875
libopenstorage/openstorage
cluster/mock/cluster.mock.go
GetNodeConf
func (m *MockCluster) GetNodeConf(arg0 string) (*osdconfig.NodeConfig, error) { ret := m.ctrl.Call(m, "GetNodeConf", arg0) ret0, _ := ret[0].(*osdconfig.NodeConfig) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockCluster) GetNodeConf(arg0 string) (*osdconfig.NodeConfig, error) { ret := m.ctrl.Call(m, "GetNodeConf", arg0) ret0, _ := ret[0].(*osdconfig.NodeConfig) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockCluster", ")", "GetNodeConf", "(", "arg0", "string", ")", "(", "*", "osdconfig", ".", "NodeConfig", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "osdconfig", ".", "NodeConfig", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// GetNodeConf mocks base method
[ "GetNodeConf", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L269-L274
143,876
libopenstorage/openstorage
cluster/mock/cluster.mock.go
GetPair
func (m *MockCluster) GetPair(arg0 string) (*api.ClusterPairGetResponse, error) { ret := m.ctrl.Call(m, "GetPair", arg0) ret0, _ := ret[0].(*api.ClusterPairGetResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockCluster) GetPair(arg0 string) (*api.ClusterPairGetResponse, error) { ret := m.ctrl.Call(m, "GetPair", arg0) ret0, _ := ret[0].(*api.ClusterPairGetResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockCluster", ")", "GetPair", "(", "arg0", "string", ")", "(", "*", "api", ".", "ClusterPairGetResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "ClusterPairGetResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// GetPair mocks base method
[ "GetPair", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L295-L300
143,877
libopenstorage/openstorage
cluster/mock/cluster.mock.go
GetPairToken
func (m *MockCluster) GetPairToken(arg0 bool) (*api.ClusterPairTokenGetResponse, error) { ret := m.ctrl.Call(m, "GetPairToken", arg0) ret0, _ := ret[0].(*api.ClusterPairTokenGetResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockCluster) GetPairToken(arg0 bool) (*api.ClusterPairTokenGetResponse, error) { ret := m.ctrl.Call(m, "GetPairToken", arg0) ret0, _ := ret[0].(*api.ClusterPairTokenGetResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockCluster", ")", "GetPairToken", "(", "arg0", "bool", ")", "(", "*", "api", ".", "ClusterPairTokenGetResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "ClusterPairTokenGetResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// GetPairToken mocks base method
[ "GetPairToken", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L308-L313
143,878
libopenstorage/openstorage
cluster/mock/cluster.mock.go
GetSelfDomain
func (m *MockCluster) GetSelfDomain() (*clusterdomain.ClusterDomainInfo, error) { ret := m.ctrl.Call(m, "GetSelfDomain") ret0, _ := ret[0].(*clusterdomain.ClusterDomainInfo) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockCluster) GetSelfDomain() (*clusterdomain.ClusterDomainInfo, error) { ret := m.ctrl.Call(m, "GetSelfDomain") ret0, _ := ret[0].(*clusterdomain.ClusterDomainInfo) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockCluster", ")", "GetSelfDomain", "(", ")", "(", "*", "clusterdomain", ".", "ClusterDomainInfo", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "clusterdomain", ".", "ClusterDomainInfo", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// GetSelfDomain mocks base method
[ "GetSelfDomain", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L321-L326
143,879
libopenstorage/openstorage
cluster/mock/cluster.mock.go
InspectDomain
func (m *MockCluster) InspectDomain(arg0 string) (*clusterdomain.ClusterDomainInfo, error) { ret := m.ctrl.Call(m, "InspectDomain", arg0) ret0, _ := ret[0].(*clusterdomain.ClusterDomainInfo) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockCluster) InspectDomain(arg0 string) (*clusterdomain.ClusterDomainInfo, error) { ret := m.ctrl.Call(m, "InspectDomain", arg0) ret0, _ := ret[0].(*clusterdomain.ClusterDomainInfo) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockCluster", ")", "InspectDomain", "(", "arg0", "string", ")", "(", "*", "clusterdomain", ".", "ClusterDomainInfo", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "clusterdomain", ".", "ClusterDomainInfo", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// InspectDomain mocks base method
[ "InspectDomain", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L347-L352
143,880
libopenstorage/openstorage
cluster/mock/cluster.mock.go
NodeRemoveDone
func (m *MockCluster) NodeRemoveDone(arg0 string, arg1 error) { m.ctrl.Call(m, "NodeRemoveDone", arg0, arg1) }
go
func (m *MockCluster) NodeRemoveDone(arg0 string, arg1 error) { m.ctrl.Call(m, "NodeRemoveDone", arg0, arg1) }
[ "func", "(", "m", "*", "MockCluster", ")", "NodeRemoveDone", "(", "arg0", "string", ",", "arg1", "error", ")", "{", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ",", "arg1", ")", "\n", "}" ]
// NodeRemoveDone mocks base method
[ "NodeRemoveDone", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L360-L362
143,881
libopenstorage/openstorage
cluster/mock/cluster.mock.go
NodeStatus
func (m *MockCluster) NodeStatus() (api.Status, error) { ret := m.ctrl.Call(m, "NodeStatus") ret0, _ := ret[0].(api.Status) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockCluster) NodeStatus() (api.Status, error) { ret := m.ctrl.Call(m, "NodeStatus") ret0, _ := ret[0].(api.Status) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockCluster", ")", "NodeStatus", "(", ")", "(", "api", ".", "Status", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "api", ".", "Status", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// NodeStatus mocks base method
[ "NodeStatus", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L370-L375
143,882
libopenstorage/openstorage
cluster/mock/cluster.mock.go
ObjectStoreDelete
func (m *MockCluster) ObjectStoreDelete(arg0 string) error { ret := m.ctrl.Call(m, "ObjectStoreDelete", arg0) ret0, _ := ret[0].(error) return ret0 }
go
func (m *MockCluster) ObjectStoreDelete(arg0 string) error { ret := m.ctrl.Call(m, "ObjectStoreDelete", arg0) ret0, _ := ret[0].(error) return ret0 }
[ "func", "(", "m", "*", "MockCluster", ")", "ObjectStoreDelete", "(", "arg0", "string", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "error", ")", "\n", "return", "ret0", "\n", "}" ]
// ObjectStoreDelete mocks base method
[ "ObjectStoreDelete", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L396-L400
143,883
libopenstorage/openstorage
cluster/mock/cluster.mock.go
ObjectStoreInspect
func (m *MockCluster) ObjectStoreInspect(arg0 string) (*api.ObjectstoreInfo, error) { ret := m.ctrl.Call(m, "ObjectStoreInspect", arg0) ret0, _ := ret[0].(*api.ObjectstoreInfo) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockCluster) ObjectStoreInspect(arg0 string) (*api.ObjectstoreInfo, error) { ret := m.ctrl.Call(m, "ObjectStoreInspect", arg0) ret0, _ := ret[0].(*api.ObjectstoreInfo) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockCluster", ")", "ObjectStoreInspect", "(", "arg0", "string", ")", "(", "*", "api", ".", "ObjectstoreInfo", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "ObjectstoreInfo", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// ObjectStoreInspect mocks base method
[ "ObjectStoreInspect", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L408-L413
143,884
libopenstorage/openstorage
cluster/mock/cluster.mock.go
PeerStatus
func (m *MockCluster) PeerStatus(arg0 string) (map[string]api.Status, error) { ret := m.ctrl.Call(m, "PeerStatus", arg0) ret0, _ := ret[0].(map[string]api.Status) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockCluster) PeerStatus(arg0 string) (map[string]api.Status, error) { ret := m.ctrl.Call(m, "PeerStatus", arg0) ret0, _ := ret[0].(map[string]api.Status) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockCluster", ")", "PeerStatus", "(", "arg0", "string", ")", "(", "map", "[", "string", "]", "api", ".", "Status", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "map", "[", "string", "]", "api", ".", "Status", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// PeerStatus mocks base method
[ "PeerStatus", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L433-L438
143,885
libopenstorage/openstorage
cluster/mock/cluster.mock.go
ProcessPairRequest
func (m *MockCluster) ProcessPairRequest(arg0 *api.ClusterPairProcessRequest) (*api.ClusterPairProcessResponse, error) { ret := m.ctrl.Call(m, "ProcessPairRequest", arg0) ret0, _ := ret[0].(*api.ClusterPairProcessResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockCluster) ProcessPairRequest(arg0 *api.ClusterPairProcessRequest) (*api.ClusterPairProcessResponse, error) { ret := m.ctrl.Call(m, "ProcessPairRequest", arg0) ret0, _ := ret[0].(*api.ClusterPairProcessResponse) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockCluster", ")", "ProcessPairRequest", "(", "arg0", "*", "api", ".", "ClusterPairProcessRequest", ")", "(", "*", "api", ".", "ClusterPairProcessResponse", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "api", ".", "ClusterPairProcessResponse", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// ProcessPairRequest mocks base method
[ "ProcessPairRequest", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L446-L451
143,886
libopenstorage/openstorage
cluster/mock/cluster.mock.go
SchedPolicyEnumerate
func (m *MockCluster) SchedPolicyEnumerate() ([]*schedpolicy.SchedPolicy, error) { ret := m.ctrl.Call(m, "SchedPolicyEnumerate") ret0, _ := ret[0].([]*schedpolicy.SchedPolicy) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockCluster) SchedPolicyEnumerate() ([]*schedpolicy.SchedPolicy, error) { ret := m.ctrl.Call(m, "SchedPolicyEnumerate") ret0, _ := ret[0].([]*schedpolicy.SchedPolicy) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockCluster", ")", "SchedPolicyEnumerate", "(", ")", "(", "[", "]", "*", "schedpolicy", ".", "SchedPolicy", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "[", "]", "*", "schedpolicy", ".", "SchedPolicy", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// SchedPolicyEnumerate mocks base method
[ "SchedPolicyEnumerate", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L507-L512
143,887
libopenstorage/openstorage
cluster/mock/cluster.mock.go
SchedPolicyGet
func (m *MockCluster) SchedPolicyGet(arg0 string) (*schedpolicy.SchedPolicy, error) { ret := m.ctrl.Call(m, "SchedPolicyGet", arg0) ret0, _ := ret[0].(*schedpolicy.SchedPolicy) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockCluster) SchedPolicyGet(arg0 string) (*schedpolicy.SchedPolicy, error) { ret := m.ctrl.Call(m, "SchedPolicyGet", arg0) ret0, _ := ret[0].(*schedpolicy.SchedPolicy) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockCluster", ")", "SchedPolicyGet", "(", "arg0", "string", ")", "(", "*", "schedpolicy", ".", "SchedPolicy", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "*", "schedpolicy", ".", "SchedPolicy", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// SchedPolicyGet mocks base method
[ "SchedPolicyGet", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L520-L525
143,888
libopenstorage/openstorage
cluster/mock/cluster.mock.go
SecretGet
func (m *MockCluster) SecretGet(arg0 string) (interface{}, error) { ret := m.ctrl.Call(m, "SecretGet", arg0) ret0, _ := ret[0].(interface{}) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockCluster) SecretGet(arg0 string) (interface{}, error) { ret := m.ctrl.Call(m, "SecretGet", arg0) ret0, _ := ret[0].(interface{}) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockCluster", ")", "SecretGet", "(", "arg0", "string", ")", "(", "interface", "{", "}", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "interface", "{", "}", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// SecretGet mocks base method
[ "SecretGet", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L557-L562
143,889
libopenstorage/openstorage
cluster/mock/cluster.mock.go
SecretGetDefaultSecretKey
func (m *MockCluster) SecretGetDefaultSecretKey() (interface{}, error) { ret := m.ctrl.Call(m, "SecretGetDefaultSecretKey") ret0, _ := ret[0].(interface{}) ret1, _ := ret[1].(error) return ret0, ret1 }
go
func (m *MockCluster) SecretGetDefaultSecretKey() (interface{}, error) { ret := m.ctrl.Call(m, "SecretGetDefaultSecretKey") ret0, _ := ret[0].(interface{}) ret1, _ := ret[1].(error) return ret0, ret1 }
[ "func", "(", "m", "*", "MockCluster", ")", "SecretGetDefaultSecretKey", "(", ")", "(", "interface", "{", "}", ",", "error", ")", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "interface", "{", "}", ")", "\n", "ret1", ",", "_", ":=", "ret", "[", "1", "]", ".", "(", "error", ")", "\n", "return", "ret0", ",", "ret1", "\n", "}" ]
// SecretGetDefaultSecretKey mocks base method
[ "SecretGetDefaultSecretKey", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L570-L575
143,890
libopenstorage/openstorage
cluster/mock/cluster.mock.go
SecretSet
func (m *MockCluster) SecretSet(arg0 string, arg1 interface{}) error { ret := m.ctrl.Call(m, "SecretSet", arg0, arg1) ret0, _ := ret[0].(error) return ret0 }
go
func (m *MockCluster) SecretSet(arg0 string, arg1 interface{}) error { ret := m.ctrl.Call(m, "SecretSet", arg0, arg1) ret0, _ := ret[0].(error) return ret0 }
[ "func", "(", "m", "*", "MockCluster", ")", "SecretSet", "(", "arg0", "string", ",", "arg1", "interface", "{", "}", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ",", "arg1", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "error", ")", "\n", "return", "ret0", "\n", "}" ]
// SecretSet mocks base method
[ "SecretSet", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L595-L599
143,891
libopenstorage/openstorage
cluster/mock/cluster.mock.go
SecretSet
func (mr *MockClusterMockRecorder) SecretSet(arg0, arg1 interface{}) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretSet", reflect.TypeOf((*MockCluster)(nil).SecretSet), arg0, arg1) }
go
func (mr *MockClusterMockRecorder) SecretSet(arg0, arg1 interface{}) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecretSet", reflect.TypeOf((*MockCluster)(nil).SecretSet), arg0, arg1) }
[ "func", "(", "mr", "*", "MockClusterMockRecorder", ")", "SecretSet", "(", "arg0", ",", "arg1", "interface", "{", "}", ")", "*", "gomock", ".", "Call", "{", "return", "mr", ".", "mock", ".", "ctrl", ".", "RecordCallWithMethodType", "(", "mr", ".", "mock", ",", "\"", "\"", ",", "reflect", ".", "TypeOf", "(", "(", "*", "MockCluster", ")", "(", "nil", ")", ".", "SecretSet", ")", ",", "arg0", ",", "arg1", ")", "\n", "}" ]
// SecretSet indicates an expected call of SecretSet
[ "SecretSet", "indicates", "an", "expected", "call", "of", "SecretSet" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L602-L604
143,892
libopenstorage/openstorage
cluster/mock/cluster.mock.go
SecretSetDefaultSecretKey
func (m *MockCluster) SecretSetDefaultSecretKey(arg0 string, arg1 bool) error { ret := m.ctrl.Call(m, "SecretSetDefaultSecretKey", arg0, arg1) ret0, _ := ret[0].(error) return ret0 }
go
func (m *MockCluster) SecretSetDefaultSecretKey(arg0 string, arg1 bool) error { ret := m.ctrl.Call(m, "SecretSetDefaultSecretKey", arg0, arg1) ret0, _ := ret[0].(error) return ret0 }
[ "func", "(", "m", "*", "MockCluster", ")", "SecretSetDefaultSecretKey", "(", "arg0", "string", ",", "arg1", "bool", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ",", "arg1", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "error", ")", "\n", "return", "ret0", "\n", "}" ]
// SecretSetDefaultSecretKey mocks base method
[ "SecretSetDefaultSecretKey", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L607-L611
143,893
libopenstorage/openstorage
cluster/mock/cluster.mock.go
SetClusterConf
func (m *MockCluster) SetClusterConf(arg0 *osdconfig.ClusterConfig) error { ret := m.ctrl.Call(m, "SetClusterConf", arg0) ret0, _ := ret[0].(error) return ret0 }
go
func (m *MockCluster) SetClusterConf(arg0 *osdconfig.ClusterConfig) error { ret := m.ctrl.Call(m, "SetClusterConf", arg0) ret0, _ := ret[0].(error) return ret0 }
[ "func", "(", "m", "*", "MockCluster", ")", "SetClusterConf", "(", "arg0", "*", "osdconfig", ".", "ClusterConfig", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "error", ")", "\n", "return", "ret0", "\n", "}" ]
// SetClusterConf mocks base method
[ "SetClusterConf", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L619-L623
143,894
libopenstorage/openstorage
cluster/mock/cluster.mock.go
SetNodeConf
func (m *MockCluster) SetNodeConf(arg0 *osdconfig.NodeConfig) error { ret := m.ctrl.Call(m, "SetNodeConf", arg0) ret0, _ := ret[0].(error) return ret0 }
go
func (m *MockCluster) SetNodeConf(arg0 *osdconfig.NodeConfig) error { ret := m.ctrl.Call(m, "SetNodeConf", arg0) ret0, _ := ret[0].(error) return ret0 }
[ "func", "(", "m", "*", "MockCluster", ")", "SetNodeConf", "(", "arg0", "*", "osdconfig", ".", "NodeConfig", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "error", ")", "\n", "return", "ret0", "\n", "}" ]
// SetNodeConf mocks base method
[ "SetNodeConf", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L631-L635
143,895
libopenstorage/openstorage
cluster/mock/cluster.mock.go
SetSize
func (m *MockCluster) SetSize(arg0 int) error { ret := m.ctrl.Call(m, "SetSize", arg0) ret0, _ := ret[0].(error) return ret0 }
go
func (m *MockCluster) SetSize(arg0 int) error { ret := m.ctrl.Call(m, "SetSize", arg0) ret0, _ := ret[0].(error) return ret0 }
[ "func", "(", "m", "*", "MockCluster", ")", "SetSize", "(", "arg0", "int", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "error", ")", "\n", "return", "ret0", "\n", "}" ]
// SetSize mocks base method
[ "SetSize", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L643-L647
143,896
libopenstorage/openstorage
cluster/mock/cluster.mock.go
StartWithConfiguration
func (m *MockCluster) StartWithConfiguration(arg0 int, arg1 bool, arg2 string, arg3 []string, arg4 string, arg5 *cluster.ClusterServerConfiguration) error { ret := m.ctrl.Call(m, "StartWithConfiguration", arg0, arg1, arg2, arg3, arg4, arg5) ret0, _ := ret[0].(error) return ret0 }
go
func (m *MockCluster) StartWithConfiguration(arg0 int, arg1 bool, arg2 string, arg3 []string, arg4 string, arg5 *cluster.ClusterServerConfiguration) error { ret := m.ctrl.Call(m, "StartWithConfiguration", arg0, arg1, arg2, arg3, arg4, arg5) ret0, _ := ret[0].(error) return ret0 }
[ "func", "(", "m", "*", "MockCluster", ")", "StartWithConfiguration", "(", "arg0", "int", ",", "arg1", "bool", ",", "arg2", "string", ",", "arg3", "[", "]", "string", ",", "arg4", "string", ",", "arg5", "*", "cluster", ".", "ClusterServerConfiguration", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ",", "arg1", ",", "arg2", ",", "arg3", ",", "arg4", ",", "arg5", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "error", ")", "\n", "return", "ret0", "\n", "}" ]
// StartWithConfiguration mocks base method
[ "StartWithConfiguration", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L679-L683
143,897
libopenstorage/openstorage
cluster/mock/cluster.mock.go
StartWithConfiguration
func (mr *MockClusterMockRecorder) StartWithConfiguration(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartWithConfiguration", reflect.TypeOf((*MockCluster)(nil).StartWithConfiguration), arg0, arg1, arg2, arg3, arg4, arg5) }
go
func (mr *MockClusterMockRecorder) StartWithConfiguration(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartWithConfiguration", reflect.TypeOf((*MockCluster)(nil).StartWithConfiguration), arg0, arg1, arg2, arg3, arg4, arg5) }
[ "func", "(", "mr", "*", "MockClusterMockRecorder", ")", "StartWithConfiguration", "(", "arg0", ",", "arg1", ",", "arg2", ",", "arg3", ",", "arg4", ",", "arg5", "interface", "{", "}", ")", "*", "gomock", ".", "Call", "{", "return", "mr", ".", "mock", ".", "ctrl", ".", "RecordCallWithMethodType", "(", "mr", ".", "mock", ",", "\"", "\"", ",", "reflect", ".", "TypeOf", "(", "(", "*", "MockCluster", ")", "(", "nil", ")", ".", "StartWithConfiguration", ")", ",", "arg0", ",", "arg1", ",", "arg2", ",", "arg3", ",", "arg4", ",", "arg5", ")", "\n", "}" ]
// StartWithConfiguration indicates an expected call of StartWithConfiguration
[ "StartWithConfiguration", "indicates", "an", "expected", "call", "of", "StartWithConfiguration" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L686-L688
143,898
libopenstorage/openstorage
cluster/mock/cluster.mock.go
UpdateDomainState
func (m *MockCluster) UpdateDomainState(arg0 string, arg1 types.ClusterDomainState) error { ret := m.ctrl.Call(m, "UpdateDomainState", arg0, arg1) ret0, _ := ret[0].(error) return ret0 }
go
func (m *MockCluster) UpdateDomainState(arg0 string, arg1 types.ClusterDomainState) error { ret := m.ctrl.Call(m, "UpdateDomainState", arg0, arg1) ret0, _ := ret[0].(error) return ret0 }
[ "func", "(", "m", "*", "MockCluster", ")", "UpdateDomainState", "(", "arg0", "string", ",", "arg1", "types", ".", "ClusterDomainState", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ",", "arg1", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "error", ")", "\n", "return", "ret0", "\n", "}" ]
// UpdateDomainState mocks base method
[ "UpdateDomainState", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L703-L707
143,899
libopenstorage/openstorage
cluster/mock/cluster.mock.go
Uuid
func (m *MockCluster) Uuid() string { ret := m.ctrl.Call(m, "Uuid") ret0, _ := ret[0].(string) return ret0 }
go
func (m *MockCluster) Uuid() string { ret := m.ctrl.Call(m, "Uuid") ret0, _ := ret[0].(string) return ret0 }
[ "func", "(", "m", "*", "MockCluster", ")", "Uuid", "(", ")", "string", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ")", "\n", "ret0", ",", "_", ":=", "ret", "[", "0", "]", ".", "(", "string", ")", "\n", "return", "ret0", "\n", "}" ]
// Uuid mocks base method
[ "Uuid", "mocks", "base", "method" ]
71b7f37f99c70e697aa31ca57fa8fb1404629329
https://github.com/libopenstorage/openstorage/blob/71b7f37f99c70e697aa31ca57fa8fb1404629329/cluster/mock/cluster.mock.go#L739-L743