Documentation ¶
Overview ¶
Package mock provides a mock implementation for dbmanager. It stores resources in a set of public maps that test programs can use to verify correctness.
Index ¶
- func New(invalidRVs bool) dbmanager.DBManager
- type MockManager
- func (m *MockManager) BindPVC(pvUID types.UID, pvcUID types.UID, bindTime unversioned.Time, rv string)
- func (m *MockManager) DeletePV(uid types.UID, deleteTime unversioned.Time, rv string)
- func (m *MockManager) DeletePVC(uid types.UID, deleteTime unversioned.Time, watcherNS, rv string)
- func (m *MockManager) DeletePod(uid types.UID, deleteTime unversioned.Time, watcherNS, rv string)
- func (m *MockManager) Destroy()
- func (m *MockManager) GetRV(resource resources.ResourceType, namespace string) string
- func (m *MockManager) InsertISCSI(targetPortal, iqn string, lun int, fsType string) int
- func (m *MockManager) InsertNFS(ipAddr, path string) int
- func (m *MockManager) InsertPV(uid types.UID, name string, createTime unversioned.Time, backendID int, ...)
- func (m *MockManager) InsertPVC(uid types.UID, name string, createTime unversioned.Time, namespace string, ...)
- func (m *MockManager) InsertPod(uid types.UID, name string, createTime unversioned.Time, namespace string, ...)
- func (m *MockManager) UpdatePV(uid types.UID, backendID int, backendType dbmanager.Table, storage int64, ...)
- func (m *MockManager) UpdatePVC(uid types.UID, storage int64, accessModes []api.PersistentVolumeAccessMode, ...)
- func (m *MockManager) ValidateConnection() error
- type PVAttrs
- type PVCAttrs
- type PodAttrs
- type ResourceAttrs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MockManager ¶
type MockManager struct { PodForUID map[types.UID]ResourceAttrs PVForUID map[types.UID]ResourceAttrs PVCForUID map[types.UID]ResourceAttrs Deletions int // contains filtered or unexported fields }
func (*MockManager) BindPVC ¶
func (m *MockManager) BindPVC(pvUID types.UID, pvcUID types.UID, bindTime unversioned.Time, rv string)
func (*MockManager) DeletePV ¶
func (m *MockManager) DeletePV(uid types.UID, deleteTime unversioned.Time, rv string)
func (*MockManager) DeletePVC ¶
func (m *MockManager) DeletePVC(uid types.UID, deleteTime unversioned.Time, watcherNS, rv string)
func (*MockManager) DeletePod ¶
func (m *MockManager) DeletePod(uid types.UID, deleteTime unversioned.Time, watcherNS, rv string)
func (*MockManager) Destroy ¶
func (m *MockManager) Destroy()
func (*MockManager) GetRV ¶
func (m *MockManager) GetRV(resource resources.ResourceType, namespace string) string
func (*MockManager) InsertISCSI ¶
func (m *MockManager) InsertISCSI( targetPortal, iqn string, lun int, fsType string, ) int
func (*MockManager) InsertNFS ¶
func (m *MockManager) InsertNFS(ipAddr, path string) int
func (*MockManager) InsertPV ¶
func (m *MockManager) InsertPV( uid types.UID, name string, createTime unversioned.Time, backendID int, backendType dbmanager.Table, storage int64, accessModes []api.PersistentVolumeAccessMode, json, rv string, )
func (*MockManager) InsertPVC ¶
func (m *MockManager) InsertPVC(uid types.UID, name string, createTime unversioned.Time, namespace string, storage int64, accessModes []api.PersistentVolumeAccessMode, json, watcherNS, rv string)
func (*MockManager) InsertPod ¶
func (m *MockManager) InsertPod(uid types.UID, name string, createTime unversioned.Time, namespace string, containers []resources.ContainerDesc, json, watcherNS, rv string)
func (*MockManager) UpdatePV ¶
func (m *MockManager) UpdatePV( uid types.UID, backendID int, backendType dbmanager.Table, storage int64, accessModes []api.PersistentVolumeAccessMode, json, rv string, )
func (*MockManager) UpdatePVC ¶
func (m *MockManager) UpdatePVC(uid types.UID, storage int64, accessModes []api.PersistentVolumeAccessMode, json, watcherNS, rv string)
func (*MockManager) ValidateConnection ¶
func (m *MockManager) ValidateConnection() error
type PVAttrs ¶
type PVCAttrs ¶
type PodAttrs ¶
type PodAttrs struct { Name string CreateTime unversioned.Time Namespace string UID types.UID Containers []resources.ContainerDesc }
type ResourceAttrs ¶
Click to show internal directories.
Click to hide internal directories.