Skip to content

Commit

Permalink
Merge pull request #59 from AtaxyaNetwork/FixIsoSR
Browse files Browse the repository at this point in the history
s/SrName/SrISOName
  • Loading branch information
ddelnano authored Apr 7, 2023
2 parents a267698 + b4d83eb commit 9cc7249
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions builder/xenserver/common/common_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,17 +271,17 @@ func (config CommonConfig) GetISOSR(c *Connection) (xenapi.SRRef, error) {

} else {
// Use the provided name label to find the SR to use
srs, err := c.GetClient().SR.GetByNameLabel(c.session, config.SrName)
srs, err := c.GetClient().SR.GetByNameLabel(c.session, config.SrISOName)

if err != nil {
return srRef, err
}

switch {
case len(srs) == 0:
return srRef, fmt.Errorf("Couldn't find a SR with the specified name-label '%s'", config.SrName)
return srRef, fmt.Errorf("Couldn't find a SR with the specified name-label '%s'", config.SrISOName)
case len(srs) > 1:
return srRef, fmt.Errorf("Found more than one SR with the name '%s'. The name must be unique", config.SrName)
return srRef, fmt.Errorf("Found more than one SR with the name '%s'. The name must be unique", config.SrISOName)
}

return srs[0], nil
Expand Down

0 comments on commit 9cc7249

Please sign in to comment.