containers / virtcontainers

A Go package for building hardware virtualized container runtimes
Apache License 2.0
139 stars 43 forks source link

api: Refactor RunPod() #486

Closed jodh-intel closed 7 years ago

jodh-intel commented 7 years ago

Introduce some private functions to allow RunPod() to behave exactly as if CreatePod() + StartPod() had been called instead. Removing the duplicated code ensures the behaviour between the two methods for creating and starting a pod is consistent.

Note that this change modifies the RunPod() behaviour very slightly - the locking is now handled later, as was previously being done by CreatePod() + StartPod().

Fixes #485.

Signed-off-by: James O. D. Hunt james.o.hunt@intel.com

sameo commented 7 years ago

LGTM

Approved with PullApprove Approved with PullApprove

sboeuf commented 7 years ago

@jodh-intel thanks for this PR, we needed this factorization to be done at some point :)

sboeuf commented 7 years ago

LGTM

Approved with PullApprove Approved with PullApprove

devimc commented 7 years ago

lgtm

jodh-intel commented 7 years ago

I think this PR is going to need a manual merge due to coveralls being stuck (report is https://coveralls.io/jobs/31188810).