func (c CleanupSandbox) Execute(context executor.Context) error {
	logger := context.Logger().Session("cleanup-sandbox", lager.Data{"sandbox-name": c.SandboxName})
	logger.Info("start")
	defer logger.Info("complete")

	sandboxRepo := context.SandboxRepository()
	sbox, err := sandboxRepo.Get(c.SandboxName)
	if err != nil {
		if err == sandbox.NotFoundError {
			return nil
		}

		logger.Error("get-sandbox-failed", err)
		return fmt.Errorf("get sandbox: %s", err)
	}

	// TODO: move into sandbox
	sbox.Lock()
	defer sbox.Unlock()

	vethLinkCount, err := sbox.VethDeviceCount()
	if err != nil {
		return fmt.Errorf("counting veth devices: %s", err)
	}

	logger.Info("veth-links-remaining", lager.Data{"count": vethLinkCount})

	if vethLinkCount == 0 {
		err = sbox.Namespace().Execute(func(*os.File) error {
			err := context.LinkFactory().DeleteLinkByName(c.VxlanDeviceName)
			if err != nil {
				if context.LinkFactory().Exists(c.VxlanDeviceName) {
					return fmt.Errorf("destroying vxlan %s: %s", c.VxlanDeviceName, err)
				}
			}
			return nil
		})
		if err != nil {
			return fmt.Errorf("in namespace %s: %s", c.SandboxName, err)
		}

		err = sandboxRepo.Destroy(c.SandboxName)
		switch err {
		case nil:
		case sandbox.AlreadyDestroyedError:
		case sandbox.NotFoundError:
		default:
			return fmt.Errorf("sandbox destroy: %s", err)
		}
	}

	return nil
}
func (cn CreateSandbox) Execute(context executor.Context) error {
	logger := context.Logger().WithData(lager.Data{"sandbox-name": cn.Name})
	logger.Info("create-sandbox")
	defer logger.Info("create-sandbox-complete")

	_, err := context.SandboxRepository().Create(cn.Name)
	if err != nil {
		return fmt.Errorf("create sandbox: %s", err)
	}

	return nil
}
			It("returns the SandboxNamespaceRepository", func() {
				Expect(context.SandboxNamespaceRepository()).To(Equal(sandboxNamespaceRepository))
			})
		})

		Describe("SandboxRepository", func() {
			It("returns the SandboxRepository", func() {
				Expect(context.SandboxRepository()).To(Equal(sandboxRepository))
			})
		})

		Describe("ListenerFactory", func() {
			It("returns the ListenerFactory", func() {
				Expect(context.ListenerFactory()).To(Equal(listenerFactory))
			})
		})

		Describe("DNSServerFactory", func() {
			It("returns the DNSServerFactory", func() {
				Expect(context.DNSServerFactory()).To(Equal(dnsServerFactory))
			})
		})

		Describe("Logger", func() {
			It("returns the Logger with a new session", func() {
				Expect(context.Logger().SessionName()).NotTo(Equal(logger.SessionName()))
			})
		})
	})
})