mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-05 18:16:13 +00:00
Portworx Volume Driver in Kubernetes
- Add a new type PortworxVolumeSource - Implement the kubernetes volume plugin for Portworx Volumes under pkg/volume/portworx - The Portworx Volume Driver uses the libopenstorage/openstorage specifications and apis for volume operations. Changes for k8s configuration and examples for portworx volumes. - Add PortworxVolume hooks in kubectl, kube-controller-manager and validation. - Add a README for PortworxVolume usage as PVs, PVCs and StorageClass. - Add example spec files Handle code review comments. - Modified READMEs to incorporate to suggestions. - Add a test for ReadWriteMany access mode. - Use util.UnmountPath in TearDown. - Add ReadOnly flag to PortworxVolumeSource - Use hostname:port instead of unix sockets - Delete the mount dir in TearDown. - Fix link issue in persistentvolumes README - In unit test check for mountpath after Setup is done. - Add PVC Claim Name as a Portworx Volume Label Generated code and documentation. - Updated swagger spec - Updated api-reference docs - Updated generated code under pkg/api/v1 Godeps update for Portworx Volume Driver - Adds github.com/libopenstorage/openstorage - Adds go.pedge.io/pb/go/google/protobuf - Updates Godep Licenses
This commit is contained in:
49
vendor/github.com/libopenstorage/openstorage/api/status.go
generated
vendored
Normal file
49
vendor/github.com/libopenstorage/openstorage/api/status.go
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
package api
|
||||
|
||||
type StatusKind int32
|
||||
|
||||
const (
|
||||
// StatusSeverityLow indicates an OK status
|
||||
StatusSeverityLow StatusKind = iota
|
||||
// StatusSeverityMedium indicates a status which is in transition from OK to BAD or vice versa
|
||||
StatusSeverityMedium
|
||||
// StatusSeverityHigh indicates a BAD status
|
||||
StatusSeverityHigh
|
||||
)
|
||||
|
||||
var statusToStatusKind = map[Status]StatusKind{
|
||||
Status_STATUS_NONE: StatusSeverityHigh,
|
||||
Status_STATUS_INIT: StatusSeverityMedium,
|
||||
Status_STATUS_OK: StatusSeverityLow,
|
||||
Status_STATUS_OFFLINE: StatusSeverityHigh,
|
||||
Status_STATUS_ERROR: StatusSeverityHigh,
|
||||
Status_STATUS_NOT_IN_QUORUM: StatusSeverityHigh,
|
||||
Status_STATUS_DECOMMISSION: StatusSeverityHigh,
|
||||
Status_STATUS_MAINTENANCE: StatusSeverityHigh,
|
||||
Status_STATUS_STORAGE_DOWN: StatusSeverityHigh,
|
||||
Status_STATUS_STORAGE_DEGRADED: StatusSeverityHigh,
|
||||
Status_STATUS_NEEDS_REBOOT: StatusSeverityHigh,
|
||||
Status_STATUS_STORAGE_REBALANCE: StatusSeverityMedium,
|
||||
Status_STATUS_STORAGE_DRIVE_REPLACE: StatusSeverityMedium,
|
||||
// Add statuses before MAX
|
||||
Status_STATUS_MAX: StatusSeverityHigh,
|
||||
}
|
||||
|
||||
func StatusSimpleValueOf(s string) (Status, error) {
|
||||
obj, err := simpleValueOf("status", Status_value, s)
|
||||
return Status(obj), err
|
||||
}
|
||||
|
||||
func (x Status) SimpleString() string {
|
||||
return simpleString("status", Status_name, int32(x))
|
||||
}
|
||||
|
||||
func (x Status) StatusKind() StatusKind {
|
||||
statusType, _ := statusToStatusKind[x]
|
||||
return statusType
|
||||
}
|
||||
|
||||
// StatusKindMapLength used only for unit testing
|
||||
func StatusKindMapLength() int {
|
||||
return len(statusToStatusKind)
|
||||
}
|
Reference in New Issue
Block a user