Skip to content

Commit

Permalink
Merge pull request scottdware#91 from f5devcentral/devel_vendor_sync_…
Browse files Browse the repository at this point in the history
…20112023

adding vendor sync changes
  • Loading branch information
RavinderReddyF5 authored Nov 20, 2023
2 parents 6ff3de7 + 5d7734e commit 95f22f4
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions sys.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ const (
uriAsm = "asm"
uriApm = "apm"
uriAvr = "avr"
uriAuth = "auth"
uriPartition = "partition"
uriFolder = "folder"
uriIlx = "ilx"
uriSyslog = "syslog"
uriSnmp = "snmp"
Expand Down Expand Up @@ -407,6 +410,12 @@ type Transaction struct {
FailureReason string `json:"failureReason,omitempty"`
}

type Partition struct {
Name string `json:"name,omitempty"`
RouteDomain int `json:"defaultRouteDomain"`
Description string `json:"description,omitempty"`
}

// Certificates returns a list of certificates.
func (b *BigIP) Certificates() (*Certificates, error) {
var certs Certificates
Expand Down Expand Up @@ -1056,3 +1065,35 @@ func (b *BigIP) GetOCSP(name string) (*OCSP, error) {
func (b *BigIP) DeleteOCSP(name string) error {
return b.delete(uriSys, "crypto", "cert-validator", "ocsp", name)
}

func (b *BigIP) CreatePartition(partition *Partition) error {
return b.post(partition, uriAuth, uriPartition)
}

func (b *BigIP) GetPartition(name string) (*Partition, error) {
var partition Partition
err, ok := b.getForEntity(&partition, uriAuth, uriPartition, name)

if err != nil {
return nil, err
}

if !ok {
return nil, nil
}

return &partition, err
}

func (b *BigIP) ModifyPartition(name string, partition *Partition) error {
return b.patch(partition, uriAuth, uriPartition, name)
}

func (b *BigIP) DeletePartition(name string) error {
return b.delete(uriAuth, uriPartition, name)
}

func (b *BigIP) ModifyFolderDescription(partition string, body map[string]string) error {
partition = fmt.Sprintf("~%s", partition)
return b.patch(body, uriSys, uriFolder, partition)
}

0 comments on commit 95f22f4

Please sign in to comment.