5ab2d52e27
Allow a `/v1/jobs?all_namespaces=true` to list all jobs across all namespaces. The returned list is to contain a `Namespace` field indicating the job namespace. If ACL is enabled, the request token needs to be a management token or have `namespace:list-jobs` capability on all existing namespaces.
24 lines
670 B
Go
24 lines
670 B
Go
// +build !ent
|
|
|
|
package state
|
|
|
|
import (
|
|
memdb "github.com/hashicorp/go-memdb"
|
|
"github.com/hashicorp/nomad/nomad/structs"
|
|
)
|
|
|
|
// namespaceExists returns whether a namespace exists
|
|
func (s *StateStore) namespaceExists(txn *memdb.Txn, namespace string) (bool, error) {
|
|
return namespace == structs.DefaultNamespace, nil
|
|
}
|
|
|
|
// updateEntWithAlloc is used to update Nomad Enterprise objects when an allocation is
|
|
// added/modified/deleted
|
|
func (s *StateStore) updateEntWithAlloc(index uint64, new, existing *structs.Allocation, txn *memdb.Txn) error {
|
|
return nil
|
|
}
|
|
|
|
func (s *StateStore) NamespaceNames() ([]string, error) {
|
|
return []string{structs.DefaultNamespace}, nil
|
|
}
|