Skip to content

Commit

Permalink
Remove description attribute to fabricRsOosPath
Browse files Browse the repository at this point in the history
  • Loading branch information
lhercot committed Dec 10, 2021
1 parent fba7d2e commit 9db7ce9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 4 additions & 4 deletions client/fabricRsOosPath_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"github.com/ciscoecosystem/aci-go-client/models"
)

func (sm *ServiceManager) CreateOutofServiceFabricPath(tDn string, description string, fabricRsOosPathAttr models.OutofServiceFabricPathAttributes) (*models.OutofServiceFabricPath, error) {
func (sm *ServiceManager) CreateOutofServiceFabricPath(tDn string, fabricRsOosPathAttr models.OutofServiceFabricPathAttributes) (*models.OutofServiceFabricPath, error) {
rn := fmt.Sprintf(models.RnfabricRsOosPath, tDn)
parentDn := fmt.Sprintf(models.ParentDnfabricRsOosPath)
fabricRsOosPath := models.NewOutofServiceFabricPath(rn, parentDn, description, fabricRsOosPathAttr)
fabricRsOosPath := models.NewOutofServiceFabricPath(rn, parentDn, fabricRsOosPathAttr)
err := sm.Save(fabricRsOosPath)
return fabricRsOosPath, err
}
Expand All @@ -29,10 +29,10 @@ func (sm *ServiceManager) DeleteOutofServiceFabricPath(tDn string) error {
return sm.DeleteByDn(dn, models.FabricrsoospathClassName)
}

func (sm *ServiceManager) UpdateOutofServiceFabricPath(tDn string, description string, fabricRsOosPathAttr models.OutofServiceFabricPathAttributes) (*models.OutofServiceFabricPath, error) {
func (sm *ServiceManager) UpdateOutofServiceFabricPath(tDn string, fabricRsOosPathAttr models.OutofServiceFabricPathAttributes) (*models.OutofServiceFabricPath, error) {
rn := fmt.Sprintf(models.RnfabricRsOosPath, tDn)
parentDn := fmt.Sprintf(models.ParentDnfabricRsOosPath)
fabricRsOosPath := models.NewOutofServiceFabricPath(rn, parentDn, description, fabricRsOosPathAttr)
fabricRsOosPath := models.NewOutofServiceFabricPath(rn, parentDn, fabricRsOosPathAttr)
fabricRsOosPath.Status = "modified"
err := sm.Save(fabricRsOosPath)
return fabricRsOosPath, err
Expand Down
4 changes: 1 addition & 3 deletions models/fabric_rs_oos_path.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ type OutofServiceFabricPathAttributes struct {
TDn string `json:",omitempty"`
}

func NewOutofServiceFabricPath(fabricRsOosPathRn, parentDn, description string, fabricRsOosPathAttr OutofServiceFabricPathAttributes) *OutofServiceFabricPath {
func NewOutofServiceFabricPath(fabricRsOosPathRn, parentDn string, fabricRsOosPathAttr OutofServiceFabricPathAttributes) *OutofServiceFabricPath {
dn := fmt.Sprintf("%s/%s", parentDn, fabricRsOosPathRn)
return &OutofServiceFabricPath{
BaseAttributes: BaseAttributes{
DistinguishedName: dn,
Description: description,
Status: "created, modified",
ClassName: FabricrsoospathClassName,
Rn: fabricRsOosPathRn,
Expand Down Expand Up @@ -58,7 +57,6 @@ func OutofServiceFabricPathFromContainerList(cont *container.Container, index in
return &OutofServiceFabricPath{
BaseAttributes{
DistinguishedName: G(OutofServiceFabricPathCont, "dn"),
Description: G(OutofServiceFabricPathCont, "descr"),
Status: G(OutofServiceFabricPathCont, "status"),
ClassName: FabricrsoospathClassName,
Rn: G(OutofServiceFabricPathCont, "rn"),
Expand Down

0 comments on commit 9db7ce9

Please sign in to comment.