lxd/container.go
func containerLoadFromAllProjects(s *state.State) ([]container, error) {
	var projects []string

	err := s.Cluster.Transaction(func(tx *db.ClusterTx) error {
		var err error
		projects, err = tx.ProjectNames()
		return err
	})
	if err != nil {
		return nil, err
	}

	containers := []container{}
	for _, project := range projects {
		projectContainers, err := containerLoadByProject(s, project)
		if err != nil {
			return nil, errors.Wrapf(nil, "Load containers in project %s", project)
		}
		containers = append(containers, projectContainers...)
	}

	return containers, nil
}
func containerLoadFromAllProjects(s *state.State) ([]container, error) {
	var projects []string

	err := s.Cluster.Transaction(func(tx *db.ClusterTx) error {
		var err error
		projects, err = tx.ProjectNames()
		return err
	})
	if err != nil {
		return nil, err
	}

	containers := []container{}
	for _, project := range projects {
		projectContainers, err := containerLoadByProject(s, project)
		if err != nil {
			return nil, errors.Wrapf(nil, "Load containers in project %s", project)
		}
		containers = append(containers, projectContainers...)
	}

	return containers, nil
}
// Load all containers across all projects.