Skip to content

Commit

Permalink
Merge pull request #425 from gaurav-dalvi/issue-423
Browse files Browse the repository at this point in the history
issue-423- commit-1
  • Loading branch information
shaleman authored Jun 24, 2016
2 parents 6e96e82 + 9e0e5ee commit 5698e1b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions netmaster/objApi/apiController.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,6 @@ func (ac *APIController) AppProfileCreate(prof *contivModel.AppProfile) error {
return core.Errorf("Tenant %s not found", prof.TenantName)
}

// Setup links
modeldb.AddLink(&prof.Links.Tenant, tenant)
modeldb.AddLinkSet(&tenant.LinkSets.AppProfiles, prof)

for _, epg := range prof.EndpointGroups {
epgKey := prof.TenantName + ":" + epg
epgObj := contivModel.FindEndpointGroup(epgKey)
Expand All @@ -250,6 +246,10 @@ func (ac *APIController) AppProfileCreate(prof *contivModel.AppProfile) error {
}
}

// Setup links
modeldb.AddLink(&prof.Links.Tenant, tenant)
modeldb.AddLinkSet(&tenant.LinkSets.AppProfiles, prof)

err := tenant.Write()
if err != nil {
log.Errorf("Error updating tenant state(%+v). Err: %v", tenant, err)
Expand Down

0 comments on commit 5698e1b

Please sign in to comment.