Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void DisasterRecoveryCreateGetUpdateDelete()

var checknameAlias = EventHubManagementClient.DisasterRecoveryConfigs.CheckNameAvailability(resourceGroup, namespaceName, new CheckNameAvailabilityParameter(disasterRecoveryName));

Assert.True(checknameAlias.NameAvailable, "The Alias Name: '"+ disasterRecoveryName + "' is not avilable");
Assert.True(checknameAlias.NameAvailable, "The Alias Name: '" + disasterRecoveryName + "' is not avilable");

//CheckNameAvaliability for Alias with same as namespace name (alternateName will be used in this case)
var checknameAliasSame = EventHubManagementClient.DisasterRecoveryConfigs.CheckNameAvailability(resourceGroup, namespaceName, new CheckNameAvailabilityParameter(namespaceName));
Expand All @@ -136,11 +136,14 @@ public void DisasterRecoveryCreateGetUpdateDelete()
//// Get the created DisasterRecovery config - Primary
var disasterRecoveryGetResponse = EventHubManagementClient.DisasterRecoveryConfigs.Get(resourceGroup, namespaceName, disasterRecoveryName);
Assert.NotNull(disasterRecoveryGetResponse);
if (disasterRecoveryGetResponse.PendingReplicationOperationsCount.HasValue)
Assert.True(disasterRecoveryGetResponse.PendingReplicationOperationsCount >= 0);
else
Assert.False(disasterRecoveryGetResponse.PendingReplicationOperationsCount.HasValue);
Assert.Equal(disasterRecoveryGetResponse.Role, RoleDisasterRecovery.Primary);

//// Get the created DisasterRecovery config - Secondary
var disasterRecoveryGetResponse_Sec = EventHubManagementClient.DisasterRecoveryConfigs.Get(resourceGroup, namespaceName2, disasterRecoveryName);
Assert.NotNull(disasterRecoveryGetResponse_Sec);
Assert.Equal(disasterRecoveryGetResponse_Sec.Role, RoleDisasterRecovery.Secondary);

//Get authorization rule thorugh Alias
Expand All @@ -157,6 +160,13 @@ public void DisasterRecoveryCreateGetUpdateDelete()
TestUtilities.Wait(TimeSpan.FromSeconds(10));
}

disasterRecoveryGetResponse = EventHubManagementClient.DisasterRecoveryConfigs.Get(resourceGroup, namespaceName, disasterRecoveryName);

if (disasterRecoveryGetResponse.PendingReplicationOperationsCount.HasValue)
Assert.True(disasterRecoveryGetResponse.PendingReplicationOperationsCount >= 0);
else
Assert.False(disasterRecoveryGetResponse.PendingReplicationOperationsCount.HasValue);

//// Break Pairing
EventHubManagementClient.DisasterRecoveryConfigs.BreakPairing(resourceGroup, namespaceName, disasterRecoveryName);
TestUtilities.Wait(TimeSpan.FromSeconds(10));
Expand All @@ -174,11 +184,21 @@ public void DisasterRecoveryCreateGetUpdateDelete()
Assert.NotNull(DisasterRecoveryResponse_update);
TestUtilities.Wait(TimeSpan.FromSeconds(10));

while (EventHubManagementClient.DisasterRecoveryConfigs.Get(resourceGroup, namespaceName, disasterRecoveryName).ProvisioningState != ProvisioningStateDR.Succeeded)
var getGeoDRResponse = EventHubManagementClient.DisasterRecoveryConfigs.Get(resourceGroup, namespaceName, disasterRecoveryName);

while (getGeoDRResponse.ProvisioningState != ProvisioningStateDR.Succeeded)
{
getGeoDRResponse = EventHubManagementClient.DisasterRecoveryConfigs.Get(resourceGroup, namespaceName, disasterRecoveryName);
TestUtilities.Wait(TimeSpan.FromSeconds(10));
}

getGeoDRResponse = EventHubManagementClient.DisasterRecoveryConfigs.Get(resourceGroup, namespaceName, disasterRecoveryName);

if (getGeoDRResponse.PendingReplicationOperationsCount.HasValue)
Assert.True(getGeoDRResponse.PendingReplicationOperationsCount >= 0);
else
Assert.False(getGeoDRResponse.PendingReplicationOperationsCount.HasValue);

// Fail over
EventHubManagementClient.DisasterRecoveryConfigs.FailOver(resourceGroup, namespaceName2, disasterRecoveryName);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,16 @@ public ArmDisasterRecovery()
/// 'Primary' or 'PrimaryNotReplicating' or 'Secondary'. Possible
/// values include: 'Primary', 'PrimaryNotReplicating',
/// 'Secondary'</param>
public ArmDisasterRecovery(string id = default(string), string name = default(string), string type = default(string), ProvisioningStateDR? provisioningState = default(ProvisioningStateDR?), string partnerNamespace = default(string), string alternateName = default(string), RoleDisasterRecovery? role = default(RoleDisasterRecovery?))
/// <param name="pendingReplicationOperationsCount">Number of entities
/// pending to be replicated.</param>
public ArmDisasterRecovery(string id = default(string), string name = default(string), string type = default(string), ProvisioningStateDR? provisioningState = default(ProvisioningStateDR?), string partnerNamespace = default(string), string alternateName = default(string), RoleDisasterRecovery? role = default(RoleDisasterRecovery?), long? pendingReplicationOperationsCount = default(long?))
: base(id, name, type)
{
ProvisioningState = provisioningState;
PartnerNamespace = partnerNamespace;
AlternateName = alternateName;
Role = role;
PendingReplicationOperationsCount = pendingReplicationOperationsCount;
CustomInit();
}

Expand Down Expand Up @@ -94,5 +97,11 @@ public ArmDisasterRecovery()
[JsonProperty(PropertyName = "properties.role")]
public RoleDisasterRecovery? Role { get; private set; }

/// <summary>
/// Gets number of entities pending to be replicated.
/// </summary>
[JsonProperty(PropertyName = "properties.pendingReplicationOperationsCount")]
public long? PendingReplicationOperationsCount { get; private set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<PropertyGroup>
<PackageId>Microsoft.Azure.Management.EventHub</PackageId>
<Description>Provides developers with a library to create and manage all Azure Event Hubs resources. Note: This client library is for EventHub under Azure Resource Manager.</Description>
<Version>2.1.0</Version>
<Version>2.2.0</Version>
<AssemblyName>Microsoft.Azure.Management.EventHub</AssemblyName>
<PackageTags>Microsoft Azure EventHubs Management;Event Hubs;Event Hubs management;</PackageTags>
<PackageReleaseNotes>
<![CDATA[
This change adds $skip and $top support to Entity list calls in Eventhub .NET management client.
1) $skip and $top parameters (query) for the list calls to support fetch the required number of entities in list calls
Event Hubs:
1) Added property pendingReplicationOperationsCount to GeoDR
]]>
</PackageReleaseNotes>
<TargetFrameworks>net452;netstandard1.4</TargetFrameworks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[assembly: AssemblyDescription("Provides developers with a library to create and manage all Azure Event Hubs resources.")]

[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]

[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
Expand Down
15 changes: 9 additions & 6 deletions src/SDKs/_metadata/eventhub_resource-manager.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventhub/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\autorestsdkeh\azure-sdk-for-net\tools\..\src\SDKs\
2018-05-02 22:57:12 UTC
Installing AutoRest version: latest
AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/eventhub/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\AutorestSDKEH\azure-sdk-for-net\src\SDKs
2018-07-02 19:27:21 UTC
1) azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 7a65dadde5c7a77412003f30ee29fd9924b5497b
Commit: 44c3db5c408a744fcd607ddf8f0a3a6f8de911aa

2) AutoRest information
Requested version: latest
Bootstrapper version: C:\Users\v-ajnava\AppData\Roaming\npm `-- autorest@2.0.4262
Bootstrapper version: autorest@2.0.4280


Latest installed version:
.\tools\generate.ps1 was invoked by generate.ps1