Skip to content

Commit

Permalink
Removing not-needed deeper validations
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Jan 10, 2025
1 parent e05a0f8 commit 5123fb4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ func ValidateNetAppVolumeGroupOracleVolumes(volumeList *[]volumegroups.VolumeGro
volumeSpecRepeatCount := make(map[string]int)
applicationType := string(volumegroups.ApplicationTypeORACLE)

// Validating minimum volume count
if len(*volumeList) < len(RequiredVolumesForOracle()) {
errors = append(errors, fmt.Errorf("'minimum %v volumes are required for %v'", len(RequiredVolumesForOracle()), applicationType))
}

// Validating each volume
for _, volume := range pointer.From(volumeList) {
// Get protocol list
Expand All @@ -84,11 +79,6 @@ func ValidateNetAppVolumeGroupOracleVolumes(volumeList *[]volumegroups.VolumeGro
errors = append(errors, fmt.Errorf("'protocol type list cannot be empty'"))
}

// Validate protocol list is not > 1
if len(protocolTypeList) > 1 {
errors = append(errors, fmt.Errorf("'multi-protocol volumes are not supported, protocol count is %v'", len(protocolTypeList)))
}

// Getting protocol for next validations
if len(protocolTypeList) > 0 {
protocolType = protocolTypeList[0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ func ValidateNetAppVolumeGroupSAPHanaVolumes(volumeList *[]volumegroups.VolumeGr
volumeSpecRepeatCount := make(map[string]int)
applicationType := string(volumegroups.ApplicationTypeSAPNegativeHANA)

// Validating minimum volume count
if len(*volumeList) < len(RequiredVolumesForSAPHANA()) {
errors = append(errors, fmt.Errorf("'minimum %v volumes are required for %v'", len(RequiredVolumesForSAPHANA()), applicationType))
}

// Validating each volume
for _, volume := range pointer.From(volumeList) {
// Get protocol list
Expand All @@ -66,11 +61,6 @@ func ValidateNetAppVolumeGroupSAPHanaVolumes(volumeList *[]volumegroups.VolumeGr
errors = append(errors, fmt.Errorf("'protocol type list cannot be empty'"))
}

// Validate protocol list is not > 1
if len(protocolTypeList) > 1 {
errors = append(errors, fmt.Errorf("'multi-protocol volumes are not supported, protocol count is %v'", len(protocolTypeList)))
}

// Getting protocol for next validations
if len(protocolTypeList) > 0 {
protocolType = protocolTypeList[0]
Expand Down

0 comments on commit 5123fb4

Please sign in to comment.