Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing Getter for the tmPartition entity #20

Merged
merged 2 commits into from
Apr 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions partitions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package bigip

// TMPartitions contains a list of all partitions on the BIG-IP system.
type TMPartitions struct {
TMPartitions []*TMPartition `json:"items"`
}

type TMPartition struct {
Name string `json:"name,omitempty"`
Kind string `json:"kind,omitempty"`
DefaultRouteDomain int `json:"defaultRouteDomain,omitempty"`
FullPath string `json:"fullPath,omitempty"`
SelfLink string `json:"selfLink,omitempty"`
}

// TMPartitions returns a list of partitions.
func (b *BigIP) TMPartitions() (*TMPartitions, error) {
var pList TMPartitions
if err, _ := b.getForEntity(&pList, "auth", "tmPartition"); err != nil {
return nil, err
}
return &pList, nil
}