Skip to content

Commit

Permalink
Added PatchVirtualServer and PatchVirtualAddress functions to update …
Browse files Browse the repository at this point in the history
…VirtualServer and VirtualAddress objects using patch method
  • Loading branch information
rawmind0 committed Jan 29, 2019
1 parent 158be62 commit cb91b48
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions ltm.go
Original file line number Diff line number Diff line change
Expand Up @@ -1824,11 +1824,17 @@ func (b *BigIP) DeleteVirtualServer(name string) error {
}

// ModifyVirtualServer allows you to change any attribute of a virtual server. Fields that
// can be modified are referenced in the VirtualServer struct.
// can be modified are referenced in the VirtualServer struct. Set all the attributes.
func (b *BigIP) ModifyVirtualServer(name string, config *VirtualServer) error {
return b.put(config, uriLtm, uriVirtual, name)
}

// PatchVirtualServer allows you to change any attribute of a virtual server. Fields that
// can be modified are referenced in the VirtualServer struct. Sets only the attributes specified.
func (b *BigIP) PatchVirtualServer(name string, config *VirtualServer) error {
return b.patch(config, uriLtm, uriVirtual, name)
}

// VirtualServerProfiles gets the profiles currently associated with a virtual server.
func (b *BigIP) VirtualServerProfiles(vs string) (*Profiles, error) {
var p Profiles
Expand Down Expand Up @@ -1891,11 +1897,17 @@ func (b *BigIP) VirtualAddressStatus(vaddr, state string) error {
}

// ModifyVirtualAddress allows you to change any attribute of a virtual address. Fields that
// can be modified are referenced in the VirtualAddress struct.
// can be modified are referenced in the VirtualAddress struct. Sets all the attributes.
func (b *BigIP) ModifyVirtualAddress(vaddr string, config *VirtualAddress) error {
return b.put(config, uriLtm, uriVirtualAddress, vaddr)
}

// PatchVirtualAddress allows you to change any attribute of a virtual address. Fields that
// can be modified are referenced in the VirtualAddress struct. Sets only the attributes specified.
func (b *BigIP) PatchVirtualAddress(vaddr string, config *VirtualAddress) error {
return b.patch(config, uriLtm, uriVirtualAddress, vaddr)
}

func (b *BigIP) DeleteVirtualAddress(vaddr string) error {
return b.delete(uriLtm, uriVirtualAddress, vaddr)
}
Expand Down

0 comments on commit cb91b48

Please sign in to comment.