Documentation
¶
Index ¶
- Constants
- Variables
- func AddFileObjects()
- func AddHost(hostID string, hostType string, initiatorIDs []string) (*types.Host, error)
- func AddHostGroup(hostGroupID string, hostIDs []string, hostFlags *types.HostFlags) (*types.HostGroup, error)
- func AddInitiator(initiatorID string, initiatorName string, initiatorType string, ...) (*types.Initiator, error)
- func AddMaskingView(maskingViewID string, storageGroupID string, hostID string, portGroupID string) (*types.MaskingView, error)
- func AddNewFileInterface(id, name string)
- func AddNewFileSystem(id, name string, sizeInMiB int64)
- func AddNewNASServer(id, name string)
- func AddNewNFSExport(id, name string)
- func AddNewSnapshot(source, SnapID string)
- func AddNewVolume(volumeID, volumeIdentifier string, size int, storageGroupID string) error
- func AddOneVolumeToStorageGroup(volumeID, volumeIdentifier, sgID string, size int) error
- func AddPort(id, identifier, portType string)
- func AddPortGroup(portGroupID string, portGroupType string, portIdentifiers []string) (*types.PortGroup, error)
- func AddPortGroupFromCreateParams(createParams *types.CreatePortGroupParams)
- func AddRDFStorageGroup(storageGroupID, symmetrixID string) (*types.RDFStorageGroup, error)
- func AddSpecificVolumeToStorageGroup(w http.ResponseWriter, volumeIDs []string, sgID string)
- func AddStorageGroup(storageGroupID string, storageResourcePoolID string, serviceLevel string) (*types.StorageGroup, error)
- func AddStorageGroupFromCreateParams(createParams *types.CreateStorageGroupParam)
- func AddTempSnapshots()
- func AddVolumeToStorageGroupTest(w http.ResponseWriter, name, size, sgID string)
- func CreateSnapshot(w http.ResponseWriter, r *http.Request, SnapID, executionOption string, ...)
- func DeletePortGroup(portGroupID string) (*types.PortGroup, error)
- func DeleteSnapshot(w http.ResponseWriter, r *http.Request, SnapID string, executionOption string, ...)
- func DeleteVolume(volID string) error
- func ExpandVolume(w http.ResponseWriter, param *types.ExpandVolumeParam, volID string, ...)
- func FreeVolume(w http.ResponseWriter, param *types.FreeVolumeParam, volID string, ...)
- func GetHandler() http.Handler
- func LinkSnapshot(w http.ResponseWriter, r *http.Request, sourceVolumeList []types.VolumeList, ...)
- func ModifyMobility(w http.ResponseWriter, param *types.EnableMobilityIDParam, volID string, ...)
- func NewVolume(volumeID, volumeIdentifier string, size int, sgList []string)
- func PerformActionOnRDFSG(w http.ResponseWriter, rdfNo, action string)
- func RemoveFileSystem(w http.ResponseWriter, fsID string)
- func RemoveHost(hostID string) error
- func RemoveHostGroup(hostGroupID string) error
- func RemoveMaskingView(w http.ResponseWriter, maskingViewID string)
- func RemoveNASServer(w http.ResponseWriter, nasID string)
- func RemoveNFSExport(w http.ResponseWriter, nfsID string)
- func RemoveStorageGroup(w http.ResponseWriter, storageGroupID string)
- func RemoveVolumeFromStorageGroup(w http.ResponseWriter, volumeIDs []string, sgID string)
- func RenameMaskingView(w http.ResponseWriter, param *types.RenameMaskingViewParam, ...)
- func RenameSnapshot(w http.ResponseWriter, r *http.Request, sourceVolumeList []types.VolumeList, ...)
- func RenameVolume(w http.ResponseWriter, param *types.ModifyVolumeIdentifierParam, volID string, ...)
- func Reset()
- func ReturnFileInterface(w http.ResponseWriter, interfaceID string)
- func ReturnFileSystem(w http.ResponseWriter, fsID string)
- func ReturnHost(w http.ResponseWriter, hostID string)
- func ReturnHostGroup(w http.ResponseWriter, hostGroupID string)
- func ReturnInitiator(w http.ResponseWriter, initiatorID string)
- func ReturnJobByID(w http.ResponseWriter, jobID string)
- func ReturnNASServer(w http.ResponseWriter, nasID string)
- func ReturnNFSExport(w http.ResponseWriter, nfsID string)
- func ReturnPortGroup(w http.ResponseWriter, portGroupID string)
- func ReturnRDFGroup(w http.ResponseWriter, rdfg string)
- func ReturnStorageGroup(w http.ResponseWriter, sgID string, remote bool)
- func UnlinkSnapshot(w http.ResponseWriter, r *http.Request, sourceVolumeList []types.VolumeList, ...)
- func UpdateFileSystem(id string, payload types.ModifyFileSystem)
- func UpdateHostGroupFromParams(hostGroupID string, updateParams *types.UpdateHostGroupParam)
- func UpdateNASServer(nasID string, payload types.ModifyNASServer)
- func UpdateNFSExport(id string, payload types.ModifyNFSExport)
- func UpdatePortGroupFromParams(portGroupID string, updateParams *types.EditPortGroup)
- type JobInfo
Constants ¶
const ( APIVersion = "{apiversion}" PREFIX = "/univmax/restapi/" + APIVersion PREFIXNOVERSION = "/univmax/restapi" PRIVATEPREFIX = "/univmax/restapi/private/" + APIVersion INTERNALPREFIX = "/univmax/restapi/internal/100" Debug = false DefaultStorageGroup = "CSI-Test-SG-1" DefaultStorageGroup1 = "CSI-Test-SG-2" DefaultASYNCProtectedSG = "csi-rep-sg-ns-test" DefaultMETROProtectedSG = "csi-rep-sg-ns-test" DefaultSymmetrixID = "000197900046" DefaultRemoteSymID = "000000000013" DefaultRDFDir = "OR-1C" DefaultRDFPort = 3 PostELMSRSymmetrixID = "000197900047" DefaultStoragePool = "SRP_1" DefaultServiceLevel = "Optimized" DefaultFcStoragePortWWN = "5000000000000001" DefaultAsyncRDFGNo = 13 DefaultAsyncRemoteRDFGNo = 13 DefaultAsyncRDFLabel = "csi-mock-async" DefaultMetroRDFGNo = 14 DefaultRemoteRDFGNo = 14 DefaultMetroRDFLabel = "csi-mock-metro" RemoteArrayHeaderKey = "RemoteArray" RemoteArrayHeaderValue = "true" DefaultNASServerID = "64xxx7a6-03b5-xxx-xxx-0zzzz8200209" DefaultNASServerName = "nas-1" DefaultFSID = "64xxx7a6-03b5-xxx-xxx-0zzzz8200208" DefaultFSName = "fs-ds-1" )
constants
const ( // KiB ... KiB // MiB ... MiB // GiB ... GiB // TiB ... TiB // PiB ... PiB )
Variables ¶
var Data struct { VolumeIDToIdentifier map[string]string VolumeIDToSize map[string]int VolumeIDIteratorList []string VolumeIDToSGList map[string][]string MaskingViewIDToHostID map[string]string MaskingViewIDToHostGroupID map[string]string MaskingViewIDToPortGroupID map[string]string MaskingViewIDToStorageGroupID map[string]string StorageGroupIDToMaskingViewID map[string]string JobIDToMockJob map[string]*JobInfo StorageGroupIDToNVolumes map[string]int StorageGroupIDToStorageGroup map[string]*types.StorageGroup StorageGroupIDToVolumes map[string][]string MaskingViewIDToMaskingView map[string]*types.MaskingView InitiatorIDToInitiator map[string]*types.Initiator HostIDToHost map[string]*types.Host PortGroupIDToPortGroup map[string]*types.PortGroup PortIDToSymmetrixPortType map[string]*types.SymmetrixPortType VolumeIDToVolume map[string]*types.Volume HostGroupIDToHostGroup map[string]*types.HostGroup JSONDir string InitiatorHost string // Snapshots VolIDToSnapshots map[string]map[string]*types.Snapshot SnapIDToLinkedVol map[string]map[string]*types.LinkedVolumes // SRDF StorageGroupIDToRDFStorageGroup map[string]*types.RDFStorageGroup AsyncRDFGroup *types.RDFGroup MetroRDFGroup *types.RDFGroup AsyncSGRDFInfo *types.SGRDFInfo MetroSGRDFInfo *types.SGRDFInfo // File FileSysIDToFileSystem map[string]*types.FileSystem NFSExportIDToNFSExport map[string]*types.NFSExport NASServerIDToNASServer map[string]*types.NASServer FileIntIDtoFileInterface map[string]*types.FileInterface }
Data are internal tables the Mock Unisphere uses to provide functionality.
var InducedErrors struct { NoConnection bool InvalidJSON bool BadHTTPStatus int GetSymmetrixError bool GetVolumeIteratorError bool GetVolumeError bool UpdateVolumeError bool DeleteVolumeError bool DeviceInSGError bool GetStorageGroupError bool GetStorageGroupSnapshotPolicyError bool InvalidResponse bool GetStoragePoolError bool UpdateStorageGroupError bool GetJobError bool JobFailedError bool VolumeNotCreatedError bool GetJobCannotFindRoleForUser bool CreateStorageGroupError bool StorageGroupAlreadyExists bool DeleteStorageGroupError bool GetStoragePoolListError bool GetPortGroupError bool GetPortError bool GetSpecificPortError bool GetPortISCSITargetError bool GetPortGigEError bool GetDirectorError bool GetInitiatorError bool GetInitiatorByIDError bool GetHostError bool CreateHostError bool DeleteHostError bool UpdateHostError bool GetMaskingViewError bool CreateMaskingViewError bool UpdateMaskingViewError bool MaskingViewAlreadyExists bool DeleteMaskingViewError bool PortGroupNotFoundError bool InitiatorGroupNotFoundError bool StorageGroupNotFoundError bool VolumeNotAddedError bool GetMaskingViewConnectionsError bool ResetAfterFirstError bool CreateSnapshotError bool DeleteSnapshotError bool LinkSnapshotError bool RenameSnapshotError bool GetSymVolumeError bool GetVolSnapsError bool GetGenerationError bool GetPrivateVolumeIterator bool SnapshotNotLicensed bool UnisphereMismatchError bool TargetNotDefinedError bool SnapshotExpired bool InvalidSnapshotName bool GetPrivVolumeByIDError bool CreatePortGroupError bool UpdatePortGroupError bool DeletePortGroupError bool ExpandVolumeError bool MaxSnapSessionError bool GetSRDFInfoError bool VolumeRdfTypesError bool GetSRDFPairInfoError bool GetProtectedStorageGroupError bool CreateSGReplicaError bool GetRDFGroupError bool GetSGOnRemote bool GetSGWithVolOnRemote bool RDFGroupHasPairError bool GetRemoteVolumeError bool InvalidLocalVolumeError bool InvalidRemoteVolumeError bool FetchResponseError bool RemoveVolumesFromSG bool ModifyMobilityError bool GetHostGroupError bool CreateHostGroupError bool DeleteHostGroupError bool UpdateHostGroupError bool GetHostGroupListError bool GetStorageGroupMetricsError bool GetVolumesMetricsError bool GetFileSysMetricsError bool GetStorageGroupPerfKeyError bool GetArrayPerfKeyError bool GetFreeRDFGError bool GetLocalOnlineRDFDirsError bool GetRemoteRDFPortOnSANError bool GetLocalOnlineRDFPortsError bool GetLocalRDFPortDetailsError bool CreateRDFGroupError bool GetStorageGroupSnapshotError bool DeleteStorageGroupSnapshotError bool GetStorageGroupSnapshotSnapError bool GetStorageGroupSnapshotSnapDetailError bool GetStorageGroupSnapshotSnapModifyError bool GetSnapshotPolicyError bool GetSnapshotPolicyListError bool CreateSnapshotPolicyError bool ModifySnapshotPolicyError bool DeleteSnapshotPolicyError bool GetFileSystemListError bool GetNFSExportListError bool GetNASServerListError bool GetFileSystemError bool CreateFileSystemError bool UpdateFileSystemError bool DeleteFileSystemError bool GetNASServerError bool UpdateNASServerError bool DeleteNASServerError bool GetNFSExportError bool CreateNFSExportError bool UpdateNFSExportError bool DeleteNFSExportError bool GetFileInterfaceError bool ExecuteActionError bool GetFreshMetrics bool }
InducedErrors constants
Functions ¶
func AddFileObjects ¶ added in v2.4.0
func AddFileObjects()
AddFileObjects adds file objects for mock objects
func AddHostGroup ¶ added in v2.2.0
func AddHostGroup(hostGroupID string, hostIDs []string, hostFlags *types.HostFlags) (*types.HostGroup, error)
AddHostGroup - Adds a host group to the mock data cache
func AddInitiator ¶
func AddInitiator(initiatorID string, initiatorName string, initiatorType string, dirPortKeys []string, hostID string) (*types.Initiator, error)
AddInitiator - Adds an initiator to the mock data cache
func AddMaskingView ¶
func AddMaskingView(maskingViewID string, storageGroupID string, hostID string, portGroupID string) (*types.MaskingView, error)
AddMaskingView - Adds a masking view to the mock data cache
func AddNewFileInterface ¶ added in v2.5.0
func AddNewFileInterface(id, name string)
AddNewFileInterface adds a new file interface into mock
func AddNewFileSystem ¶ added in v2.4.0
AddNewFileSystem adds a new file system into mock
func AddNewNASServer ¶ added in v2.4.0
func AddNewNASServer(id, name string)
AddNewNASServer adds new NAS server into mock
func AddNewNFSExport ¶ added in v2.4.0
func AddNewNFSExport(id, name string)
AddNewNFSExport new NFS Export into mock
func AddNewSnapshot ¶
func AddNewSnapshot(source, SnapID string)
AddNewSnapshot adds a snapshot to the mock cache
func AddNewVolume ¶
AddNewVolume - Add a volume to the mock data cache
func AddOneVolumeToStorageGroup ¶
AddOneVolumeToStorageGroup - Adds volume to a storage group in the mock cache
func AddPort ¶
func AddPort(id, identifier, portType string)
AddPort adds a port entry. Port type can either be "FibreChannel" or "GigE", or "" for a non existent port.
func AddPortGroup ¶
func AddPortGroup(portGroupID string, portGroupType string, portIdentifiers []string) (*types.PortGroup, error)
AddPortGroup - Adds a port group to the mock data cache
func AddPortGroupFromCreateParams ¶
func AddPortGroupFromCreateParams(createParams *types.CreatePortGroupParams)
AddPortGroupFromCreateParams - Adds a storage group from create params
func AddRDFStorageGroup ¶
func AddRDFStorageGroup(storageGroupID, symmetrixID string) (*types.RDFStorageGroup, error)
AddRDFStorageGroup ...
func AddSpecificVolumeToStorageGroup ¶
func AddSpecificVolumeToStorageGroup(w http.ResponseWriter, volumeIDs []string, sgID string)
AddSpecificVolumeToStorageGroup - Add volume based on volumeids to storage group mock cache
func AddStorageGroup ¶
func AddStorageGroup(storageGroupID string, storageResourcePoolID string, serviceLevel string, ) (*types.StorageGroup, error)
AddStorageGroup - Adds a storage group to the mock data cache
func AddStorageGroupFromCreateParams ¶
func AddStorageGroupFromCreateParams(createParams *types.CreateStorageGroupParam)
AddStorageGroupFromCreateParams - Adds a storage group from create params
func AddTempSnapshots ¶
func AddTempSnapshots()
AddTempSnapshots adds marked for deletion snapshots into mock to help snapcleanup thread to be functional
func AddVolumeToStorageGroupTest ¶
func AddVolumeToStorageGroupTest(w http.ResponseWriter, name, size, sgID string)
AddVolumeToStorageGroupTest - Adds volume to storage group and updates mock cache
func CreateSnapshot ¶
func CreateSnapshot(w http.ResponseWriter, r *http.Request, SnapID, executionOption string, sourceVolumeList []types.VolumeList)
CreateSnapshot - Creates a snapshot and updates mock cache
func DeletePortGroup ¶
DeletePortGroup - Remove PortGroup by ID 'portGroupID'
func DeleteSnapshot ¶
func DeleteSnapshot(w http.ResponseWriter, r *http.Request, SnapID string, executionOption string, deviceNameListSource []types.VolumeList, genID int64)
DeleteSnapshot - Deletes a snapshot and updates mock cache
func ExpandVolume ¶
func ExpandVolume(w http.ResponseWriter, param *types.ExpandVolumeParam, volID string, executionOption string)
ExpandVolume - Expands volume size in cache
func FreeVolume ¶
func FreeVolume(w http.ResponseWriter, param *types.FreeVolumeParam, volID string, executionOption string)
FreeVolume - handler for free volume job
func LinkSnapshot ¶
func LinkSnapshot(w http.ResponseWriter, r *http.Request, sourceVolumeList []types.VolumeList, targetVolumeList []types.VolumeList, executionOption, SnapID string)
LinkSnapshot - Links a snapshot and updates a mock cache
func ModifyMobility ¶ added in v2.1.0
func ModifyMobility(w http.ResponseWriter, param *types.EnableMobilityIDParam, volID string, executionOption string)
ModifyMobility modifes the mobility-id-enabled parameter of volume
func PerformActionOnRDFSG ¶ added in v2.5.0
func PerformActionOnRDFSG(w http.ResponseWriter, rdfNo, action string)
PerformActionOnRDFSG updates rdfNo with given action
func RemoveFileSystem ¶ added in v2.4.0
func RemoveFileSystem(w http.ResponseWriter, fsID string)
RemoveFileSystem removes File system from mock
func RemoveHostGroup ¶ added in v2.2.0
RemoveHostGroup - Removes hostGroup from mock cache
func RemoveMaskingView ¶
func RemoveMaskingView(w http.ResponseWriter, maskingViewID string)
RemoveMaskingView - Removes a masking view from the mock data cache
func RemoveNASServer ¶ added in v2.4.0
func RemoveNASServer(w http.ResponseWriter, nasID string)
RemoveNASServer removes NAS server
func RemoveNFSExport ¶ added in v2.4.0
func RemoveNFSExport(w http.ResponseWriter, nfsID string)
RemoveNFSExport removes NFS export object
func RemoveStorageGroup ¶
func RemoveStorageGroup(w http.ResponseWriter, storageGroupID string)
RemoveStorageGroup - Removes a storage group from the mock data cache
func RemoveVolumeFromStorageGroup ¶
func RemoveVolumeFromStorageGroup(w http.ResponseWriter, volumeIDs []string, sgID string)
RemoveVolumeFromStorageGroup - Remove volumes from storage group mock cache
func RenameMaskingView ¶ added in v2.1.0
func RenameMaskingView(w http.ResponseWriter, param *types.RenameMaskingViewParam, maskingViewID string, executionOption string)
RenameMaskingView - Renames masking view
func RenameSnapshot ¶
func RenameSnapshot(w http.ResponseWriter, r *http.Request, sourceVolumeList []types.VolumeList, executionOption, oldSnapID, newSnapID string)
RenameSnapshot - Renames a snapshot and updates mock cache
func RenameVolume ¶
func RenameVolume(w http.ResponseWriter, param *types.ModifyVolumeIdentifierParam, volID string, executionOption string, remote bool)
RenameVolume - renames volume in cache
func ReturnFileInterface ¶ added in v2.5.0
func ReturnFileInterface(w http.ResponseWriter, interfaceID string)
ReturnFileInterface returns File Interface object
func ReturnFileSystem ¶ added in v2.4.0
func ReturnFileSystem(w http.ResponseWriter, fsID string)
ReturnFileSystem returns File System object
func ReturnHost ¶
func ReturnHost(w http.ResponseWriter, hostID string)
ReturnHost - Returns a host from cache
func ReturnHostGroup ¶ added in v2.2.0
func ReturnHostGroup(w http.ResponseWriter, hostGroupID string)
ReturnHostGroup - Returns a hostGroup from cache
func ReturnInitiator ¶
func ReturnInitiator(w http.ResponseWriter, initiatorID string)
ReturnInitiator - Returns initiator from mock cache based on initiator id
func ReturnJobByID ¶
func ReturnJobByID(w http.ResponseWriter, jobID string)
ReturnJobByID - Returns job based on ID from mock cache
func ReturnNASServer ¶ added in v2.4.0
func ReturnNASServer(w http.ResponseWriter, nasID string)
ReturnNASServer returns NAS server object
func ReturnNFSExport ¶ added in v2.4.0
func ReturnNFSExport(w http.ResponseWriter, nfsID string)
ReturnNFSExport NFS export
func ReturnPortGroup ¶
func ReturnPortGroup(w http.ResponseWriter, portGroupID string)
ReturnPortGroup - Returns port group information from cache
func ReturnRDFGroup ¶ added in v2.2.0
func ReturnRDFGroup(w http.ResponseWriter, rdfg string)
ReturnRDFGroup - Returns RDF group information from mock cache
func ReturnStorageGroup ¶
func ReturnStorageGroup(w http.ResponseWriter, sgID string, remote bool)
ReturnStorageGroup - Returns storage group information from mock cache
func UnlinkSnapshot ¶
func UnlinkSnapshot(w http.ResponseWriter, r *http.Request, sourceVolumeList []types.VolumeList, targetVolumeList []types.VolumeList, executionOption, SnapID string)
UnlinkSnapshot - Unlinks a snapshot and updates mock cache
func UpdateFileSystem ¶ added in v2.4.0
func UpdateFileSystem(id string, payload types.ModifyFileSystem)
UpdateFileSystem updates an existing FileSystem
func UpdateHostGroupFromParams ¶ added in v2.2.0
func UpdateHostGroupFromParams(hostGroupID string, updateParams *types.UpdateHostGroupParam)
UpdateHostGroupFromParams - Updates HostGroup given an UpdateHostGroupParam payload
func UpdateNASServer ¶ added in v2.4.0
func UpdateNASServer(nasID string, payload types.ModifyNASServer)
UpdateNASServer updates NAS server
func UpdateNFSExport ¶ added in v2.4.0
func UpdateNFSExport(id string, payload types.ModifyNFSExport)
UpdateNFSExport updates NFS Export
func UpdatePortGroupFromParams ¶
func UpdatePortGroupFromParams(portGroupID string, updateParams *types.EditPortGroup)
UpdatePortGroupFromParams - Updates PortGroup given an EditPortGroup payload