Skip to content

Commit

Permalink
Add zone object
Browse files Browse the repository at this point in the history
Signed-off-by: Sean McGinnis <[email protected]>
  • Loading branch information
stmcginnis committed Apr 17, 2024
1 parent 08be8a2 commit dbdd885
Show file tree
Hide file tree
Showing 2 changed files with 452 additions and 0 deletions.
21 changes: 21 additions & 0 deletions redfish/addresspool.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,27 @@ func (addresspool *AddressPool) Endpoints() ([]*Endpoint, error) {
return result, collectionError
}

// Zones gets the zones associated with this address pool.
func (addresspool *AddressPool) Zones() ([]*Zone, error) {
var result []*Zone

collectionError := common.NewCollectionError()
for _, uri := range addresspool.zones {
endpoint, err := GetZone(addresspool.GetClient(), uri)
if err != nil {
collectionError.Failures[uri] = err
} else {
result = append(result, endpoint)
}
}

if collectionError.Empty() {
return result, nil
}

return result, collectionError
}

// BFDSingleHopOnly shall contain the BFD-related properties for an Ethernet fabric that uses Bidirectional
// Forwarding Detection (BFD) for link fault detection.
type BFDSingleHopOnly struct {
Expand Down
Loading

0 comments on commit dbdd885

Please sign in to comment.