sandbox_freebsd.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package osl
  2. import "testing"
  3. // GenerateKey generates a sandbox key based on the passed
  4. // container id.
  5. func GenerateKey(containerID string) string {
  6. maxLen := 12
  7. if len(containerID) < maxLen {
  8. maxLen = len(containerID)
  9. }
  10. return containerID[:maxLen]
  11. }
  12. // NewSandbox provides a new sandbox instance created in an os specific way
  13. // provided a key which uniquely identifies the sandbox
  14. func NewSandbox(key string, osCreate, isRestore bool) (Sandbox, error) {
  15. return nil, nil
  16. }
  17. // GetSandboxForExternalKey returns sandbox object for the supplied path
  18. func GetSandboxForExternalKey(path string, key string) (Sandbox, error) {
  19. return nil, nil
  20. }
  21. // GC triggers garbage collection of namespace path right away
  22. // and waits for it.
  23. func GC() {
  24. }
  25. // InitOSContext initializes OS context while configuring network resources
  26. func InitOSContext() func() {
  27. return func() {}
  28. }
  29. // SetupTestOSContext sets up a separate test OS context in which tests will be executed.
  30. func SetupTestOSContext(t *testing.T) func() {
  31. return func() {}
  32. }
  33. // SetBasePath sets the base url prefix for the ns path
  34. func SetBasePath(path string) {
  35. }