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

Commit

Permalink
vc:sandbox: rename newcontainer to fetchcontainer.
Browse files Browse the repository at this point in the history
The containers is not new but fech from an existing one.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
  • Loading branch information
jcvenegas committed Dec 13, 2018
1 parent 618cfbf commit 0d80202
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion virtcontainers/filesystem_resource_storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestFilesystemCreateAllResourcesSuccessful(t *testing.T) {
containers: map[string]*Container{},
}

if err := sandbox.newContainers(); err != nil {
if err := sandbox.fetchContainers(); err != nil {
t.Fatal(err)
}

Expand Down
4 changes: 2 additions & 2 deletions virtcontainers/sandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ func fetchSandbox(ctx context.Context, sandboxID string) (sandbox *Sandbox, err

// This sandbox already exists, we don't need to recreate the containers in the guest.
// We only need to fetch the containers from storage and create the container structs.
if err := sandbox.newContainers(); err != nil {
if err := sandbox.fetchContainers(); err != nil {
return nil, err
}

Expand Down Expand Up @@ -1257,7 +1257,7 @@ func (s *Sandbox) addContainer(c *Container) error {
// adds them to the sandbox. It does not create the containers
// in the guest. This should only be used when fetching a
// sandbox that already exists.
func (s *Sandbox) newContainers() error {
func (s *Sandbox) fetchContainers() error {
for _, contConfig := range s.config.Containers {
c, err := newContainer(s, contConfig)
if err != nil {
Expand Down

0 comments on commit 0d80202

Please sign in to comment.