Skip to content

Commit f15f2d7

Browse files
committed
Remove AllowPrimary field
See #2010 Missed in eb5b25e
1 parent 4e662d2 commit f15f2d7

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

src/Nest/Cluster/ClusterReroute/Commands/AllocateClusterRerouteCommandBase.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,10 @@ public interface IAllocateClusterRerouteCommand : IClusterRerouteCommand
1616

1717
public interface IAllocateReplicaClusterRerouteCommand : IAllocateClusterRerouteCommand
1818
{
19-
[JsonProperty("allow_primary")]
20-
bool AllowPrimary { get; }
2119
}
2220

2321
public interface IAllocateEmptyPrimaryRerouteCommand : IAllocateClusterRerouteCommand
2422
{
25-
[JsonProperty("allow_primary")]
26-
bool AllowPrimary { get; }
27-
2823
[JsonProperty("accept_data_loss")]
2924
bool AcceptDataLoss { get; set; }
3025
}
@@ -49,16 +44,12 @@ public abstract class AllocateClusterRerouteCommandBase : IAllocateClusterRerout
4944
public class AllocateReplicaClusterRerouteCommand : AllocateClusterRerouteCommandBase, IAllocateReplicaClusterRerouteCommand
5045
{
5146
public override string Name => "allocate_replica";
52-
53-
public bool AllowPrimary => false;
5447
}
5548

5649
public class AllocateEmptyPrimaryRerouteCommand : AllocateClusterRerouteCommandBase, IAllocateEmptyPrimaryRerouteCommand
5750
{
5851
public override string Name => "allocate_empty_primary";
5952

60-
public bool AllowPrimary => true;
61-
6253
public bool AcceptDataLoss { get; set; }
6354
}
6455

@@ -97,17 +88,13 @@ public class AllocateReplicaClusterRerouteCommandDescriptor
9788
: AllocateClusterRerouteCommandDescriptorBase<AllocateReplicaClusterRerouteCommandDescriptor, IAllocateReplicaClusterRerouteCommand>, IAllocateReplicaClusterRerouteCommand
9889
{
9990
public override string Name => "allocate_replica";
100-
101-
bool IAllocateReplicaClusterRerouteCommand.AllowPrimary => false;
10291
}
10392

10493
public class AllocateEmptyPrimaryRerouteCommandDescriptor
10594
: AllocateClusterRerouteCommandDescriptorBase<AllocateEmptyPrimaryRerouteCommandDescriptor, IAllocateEmptyPrimaryRerouteCommand>, IAllocateEmptyPrimaryRerouteCommand
10695
{
10796
public override string Name => "allocate_empty_primary";
10897

109-
bool IAllocateEmptyPrimaryRerouteCommand.AllowPrimary => true;
110-
11198
bool IAllocateEmptyPrimaryRerouteCommand.AcceptDataLoss { get; set; }
11299

113100
public AllocateEmptyPrimaryRerouteCommandDescriptor AcceptDataLoss(bool acceptDataLoss) => Assign(a => a.AcceptDataLoss = acceptDataLoss);

src/Tests/Cluster/ClusterReroute/ClusterRerouteApiTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ protected override LazyResponses ClientUsage() => Calls(
7575
{
7676
new Dictionary<string, object> { { "allocate_empty_primary", new
7777
{
78-
allow_primary = true,
7978
index = "project",
8079
node = "x",
8180
shard = 0,
@@ -90,7 +89,6 @@ protected override LazyResponses ClientUsage() => Calls(
9089
} } },
9190
new Dictionary<string, object> { { "allocate_replica", new
9291
{
93-
allow_primary = false,
9492
index = "project",
9593
node = "x",
9694
shard = 0

0 commit comments

Comments
 (0)