Skip to content

Commit e113dc0

Browse files
authored
upstream some differences from enterprise (hashicorp#8902)
1 parent 19abd50 commit e113dc0

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

agent/consul/state/catalog_events_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -1420,6 +1420,7 @@ func newTestEventServiceHealthRegister(index uint64, nodeNum int, svc string) st
14201420
CreateIndex: index,
14211421
ModifyIndex: index,
14221422
},
1423+
EnterpriseMeta: *structs.DefaultEnterpriseMeta(),
14231424
},
14241425
Checks: []*structs.HealthCheck{
14251426
{
@@ -1431,6 +1432,7 @@ func newTestEventServiceHealthRegister(index uint64, nodeNum int, svc string) st
14311432
CreateIndex: index,
14321433
ModifyIndex: index,
14331434
},
1435+
EnterpriseMeta: *structs.DefaultEnterpriseMeta(),
14341436
},
14351437
{
14361438
Node: node,
@@ -1444,6 +1446,7 @@ func newTestEventServiceHealthRegister(index uint64, nodeNum int, svc string) st
14441446
CreateIndex: index,
14451447
ModifyIndex: index,
14461448
},
1449+
EnterpriseMeta: *structs.DefaultEnterpriseMeta(),
14471450
},
14481451
},
14491452
},
@@ -1486,6 +1489,7 @@ func newTestEventServiceHealthDeregister(index uint64, nodeNum int, svc string)
14861489
CreateIndex: 10,
14871490
ModifyIndex: 10,
14881491
},
1492+
EnterpriseMeta: *structs.DefaultEnterpriseMeta(),
14891493
},
14901494
},
14911495
},
File renamed without changes.

api/namespace.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type Namespace struct {
2626

2727
// DeletedAt is the time when the Namespace was marked for deletion
2828
// This is nullable so that we can omit if empty when encoding in JSON
29-
DeletedAt *time.Time `json:"DeletedAt,omitempty"`
29+
DeletedAt *time.Time `json:"DeletedAt,omitempty" alias:"deleted_at"`
3030

3131
// CreateIndex is the Raft index at which the Namespace was created
3232
CreateIndex uint64 `json:"CreateIndex,omitempty"`
@@ -39,10 +39,10 @@ type Namespace struct {
3939
type NamespaceACLConfig struct {
4040
// PolicyDefaults is the list of policies that should be used for the parent authorizer
4141
// of all tokens in the associated namespace.
42-
PolicyDefaults []ACLLink `json:"PolicyDefaults"`
42+
PolicyDefaults []ACLLink `json:"PolicyDefaults" alias:"policy_defaults"`
4343
// RoleDefaults is the list of roles that should be used for the parent authorizer
4444
// of all tokens in the associated namespace.
45-
RoleDefaults []ACLLink `json:"RoleDefaults"`
45+
RoleDefaults []ACLLink `json:"RoleDefaults" alias:"role_defaults"`
4646
}
4747

4848
// Namespaces can be used to manage Namespaces in Consul Enterprise..

build-support/scripts/proto-gen.sh

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ function main {
7676
gogo_proto_imp_replace="${gogo_proto_imp_replace},Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types"
7777
gogo_proto_imp_replace="${gogo_proto_imp_replace},Mgoogle/api/annotations.proto=github.com/gogo/googleapis/google/api"
7878
gogo_proto_imp_replace="${gogo_proto_imp_replace},Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types"
79+
gogo_proto_imp_replace="${gogo_proto_imp_replace},Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types"
7980

8081
local proto_go_path=${proto_path%%.proto}.pb.go
8182
local proto_go_bin_path=${proto_path%%.proto}.pb.binary.go

0 commit comments

Comments
 (0)