Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #830 from caoruidong/add-release
Browse files Browse the repository at this point in the history
virtcontainers: Add missing API release calls
  • Loading branch information
bergwolf authored Oct 18, 2018
2 parents daf52de + 3f39d6e commit 708007e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions virtcontainers/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -874,9 +874,12 @@ func toggleInterface(ctx context.Context, sandboxID string, inf *grpc.Interface,
if err != nil {
return nil, err
}
defer s.releaseStatelessSandbox()

if add {
return s.AddInterface(inf)
}

return s.RemoveInterface(inf)
}

Expand Down Expand Up @@ -906,6 +909,7 @@ func ListInterfaces(ctx context.Context, sandboxID string) ([]*grpc.Interface, e
if err != nil {
return nil, err
}
defer s.releaseStatelessSandbox()

return s.ListInterfaces()
}
Expand All @@ -926,6 +930,8 @@ func UpdateRoutes(ctx context.Context, sandboxID string, routes []*grpc.Route) (
if err != nil {
return nil, err
}
defer s.releaseStatelessSandbox()

return s.UpdateRoutes(routes)
}

Expand All @@ -945,6 +951,7 @@ func ListRoutes(ctx context.Context, sandboxID string) ([]*grpc.Route, error) {
if err != nil {
return nil, err
}
defer s.releaseStatelessSandbox()

return s.ListRoutes()
}

0 comments on commit 708007e

Please sign in to comment.