Skip to content

Commit

Permalink
Updating SQL vnet rules and tests with migration flag and state (#3740)
Browse files Browse the repository at this point in the history
* Adding state and migration flag from latest swagger and updating tests

* Bumped version to 1.8.0-preview

* Removed whitespace at start of line

* Fixed merge conflict in Microsoft.Azure.Management.Sql.csproj
  • Loading branch information
kisantia authored and shahabhijeet committed Sep 29, 2017
1 parent 7f3d952 commit d9ea976
Show file tree
Hide file tree
Showing 10 changed files with 813 additions and 567 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,18 @@ public VirtualNetworkRule()
/// <param name="id">Resource ID.</param>
/// <param name="name">Resource name.</param>
/// <param name="type">Resource type.</param>
public VirtualNetworkRule(string virtualNetworkSubnetId, string id = default(string), string name = default(string), string type = default(string))
/// <param name="ignoreMissingVnetServiceEndpoint">Create firewall rule
/// before the virtual network has vnet service endpoint
/// enabled.</param>
/// <param name="state">Virtual Network Rule State. Possible values
/// include: 'Initializing', 'InProgress', 'Ready', 'Deleting',
/// 'Unknown'</param>
public VirtualNetworkRule(string virtualNetworkSubnetId, string id = default(string), string name = default(string), string type = default(string), bool? ignoreMissingVnetServiceEndpoint = default(bool?), string state = default(string))
: base(id, name, type)
{
VirtualNetworkSubnetId = virtualNetworkSubnetId;
IgnoreMissingVnetServiceEndpoint = ignoreMissingVnetServiceEndpoint;
State = state;
CustomInit();
}

Expand All @@ -56,6 +64,20 @@ public VirtualNetworkRule()
[JsonProperty(PropertyName = "properties.virtualNetworkSubnetId")]
public string VirtualNetworkSubnetId { get; set; }

/// <summary>
/// Gets or sets create firewall rule before the virtual network has
/// vnet service endpoint enabled.
/// </summary>
[JsonProperty(PropertyName = "properties.ignoreMissingVnetServiceEndpoint")]
public bool? IgnoreMissingVnetServiceEndpoint { get; set; }

/// <summary>
/// Gets virtual Network Rule State. Possible values include:
/// 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown'
/// </summary>
[JsonProperty(PropertyName = "properties.state")]
public string State { get; private set; }

/// <summary>
/// Validate the object.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

namespace Microsoft.Azure.Management.Sql.Models
{
using Microsoft.Azure;
using Microsoft.Azure.Management;
using Microsoft.Azure.Management.Sql;

/// <summary>
/// Defines values for VirtualNetworkRuleState.
/// </summary>
public static class VirtualNetworkRuleState
{
public const string Initializing = "Initializing";
public const string InProgress = "InProgress";
public const string Ready = "Ready";
public const string Deleting = "Deleting";
public const string Unknown = "Unknown";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,85 +4,16 @@
<PackageId>Microsoft.Azure.Management.Sql</PackageId>
<Description>Azure SQL Management SDK library</Description>
<AssemblyName>Microsoft.Azure.Management.Sql</AssemblyName>
<VersionPrefix>1.7.0-preview</VersionPrefix>
<VersionPrefix>1.8.0-preview</VersionPrefix>
<PackageTags>Microsoft Azure SQL Management;SQL;SQL Management</PackageTags>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>net452;netstandard1.4</TargetFrameworks>
<PackageReleaseNotes><![CDATA[Disclaimer:
We were using a slightly unorthodox convention for some operation ids. Some resource operations were “nested” inside others, e.g. blob auditing policies was nested inside databases as in client.Databases.GetBlobAuditingPolicies(..) instead of the flattened ARM standard client.DatabaseBlobAuditingPolicies.Get(…).
This convention has lead to some inconsistencies, makes some APIs difficult to find, and is at odds with future APIs. For example if we wanted to implement listing db audit policies by server, continuing the current convention would be client.Databases.ListBlobAuditingPoliciesByServer(..) which makes much less sense than the ARM standard which would be client.DatabaseBlobAuditingPolicies.ListByServer(…)`.
In order to resolve this and provide a good path moving forward, we have renamed the inconsistent operations to follow the ARM standard. This is an unfortunate breaking change, but it’s best to do now while the SDK is still in preview and since most of these operations were only recently added.
Breaking changes:
- SqlManagementClient.Database.GetBackupLongTermRetentionPolicy -> SqlManagementClient.BackupLongTermRetentionPolicies.Get
- SqlManagementClient.Database.CreateOrUpdateBackupLongTermRetentionPolicy -> SqlManagementClient.BackupLongTermRetentionPolicies.CreateOrUpdate
- SqlManagementClient.Servers.CreateBackupLongTermRetentionVault -> SqlManagementClient.BackupLongTermRetentionVaults.CreateOrUpdate
- SqlManagementClient.Servers.GetBackupLongTermRetentionVault -> SqlManagementClient.BackupLongTermRetentionVaults.Get
- SqlManagementClient.Database.ListRestorePoints -> SqlManagementClient.RestorePoints.ListByDatabase
- SqlManagementClient.Servers.CreateOrUpdateConnectionPolicy -> SqlManagementClient.ServerConnectionPolicies.CreateOrUpdate
- SqlManagementClient.Servers.GetConnectionPolicy -> SqlManagementClient.ServerConnectionPolicies.Get
- SqlManagementClient.Databases.CreateOrUpdateDataMaskingPolicy -> SqlManagementClient.DataMaskingPolicies.CreateOrUpdate
- SqlManagementClient.Databases.GetDataMaskingPolicy -> SqlManagementClient.DataMaskingPolicies.Get
- SqlManagementClient.Databases.CreateOrUpdateDataMaskingRule -> SqlManagementClient.DataMaskingRules.CreateOrUpdate
- SqlManagementClient.Databases.GetDataMaskingRule -> SqlManagementClient.DataMaskingRules.Get
- SqlManagementClient.Databases.ListDataMaskingRules -> SqlManagementClient.DataMaskingRules.ListByDatabase
- SqlManagementClient.Databases.GetThreatDetectionPolicy -> SqlManagementClient.DatabaseThreatDetectionPolicies.Get
- SqlManagementClient.Databases.CreateOrUpdateThreatDetectionPolicy -> SqlManagementClient.DatabaseThreatDetectionPolicies.CreateOrUpdate
- SqlManagementClient.Databases.CreateOrUpdateGeoBackupPolicy -> SqlManagementClient.GeoBackupPolicies.CreateOrUpdate
- SqlManagementClient.Databases.GetGeoBackupPolicy -> SqlManagementClient.GeoBackupPolicies.Get
- SqlManagementClient.Databases.ListGeoBackupPolicies -> SqlManagementClient.GeoBackupPolicies.ListByDatabase
- SqlManagementClient.Databases.DeleteReplicationLink -> SqlManagementClient.ReplicationLinks.Delete
- SqlManagementClient.Databases.GetReplicationLink -> SqlManagementClient.ReplicationLinks.Get
- SqlManagementClient.Databases.FailoverReplicationLink -> SqlManagementClient.ReplicationLinks.Failover
- SqlManagementClient.Databases.FailoverReplicationLinkAllowDataLoss -> SqlManagementClient.ReplicationLinks.FailoverAllowDataLoss
- SqlManagementClient.Databases.ListReplicationLinks -> SqlManagementClient.ReplicationLinks.ListByDatabase
- SqlManagementClient.ServerAzureADAdministrators.List -> SqlManagementClient.ServerAzureADAdministrators.ListByServer
- SqlManagementClient.Servers.GetServiceObjective -> SqlManagementClient.ServiceObjectives.Get
- SqlManagementClient.Servers.ListServiceObjectives -> SqlManagementClient.ServiceObjectives.ListByServer
- SqlManagementClient.ElasticPools.ListActivity -> SqlManagementClient.ElasticPoolActivities.ListByElasticPool
- SqlManagementClient.ElasticPools.ListDatabaseActivity -> SqlManagementClient.ElasticPoolDatabaseActivities.ListByElasticPool
- SqlManagementClient.ElasticPools.GetDatabase -> SqlManagementClient.Databases.GetByElasticPool
- SqlManagementClient.ElasticPools.ListDatabases -> SqlManagementClient.Databases.ListByElasticPool
- SqlManagementClient.RecommendedElasticPools.GetDatabases -> SqlManagementClient.Databases.GetByRecommendedElasticPool
- SqlManagementClient.RecommendedElasticPools.ListDatabases -> SqlManagementClient.Databases.ListByRecommendedElasticPool
- SqlManagementClient.Databases.GetServiceTierAdvisor -> SqlManagementClient.ServiceTierAdvisors.Get
- SqlManagementClient.Databases.ListServiceTierAdvisors -> SqlManagementClient.ServiceTierAdvisors.ListByDatabase
- SqlManagementClient.Databases.CreateOrUpdateTransparentDataEncryptionConfiguration -> SqlManagementClient.TransparentDataEncryptions.CreateOrUpdate
- SqlManagementClient.Databases.GetTransparentDataEncryptionConfiguration -> SqlManagementClient.TransparentDataEncryptions.Get
- SqlManagementClient.Databases.ListTransparentDataEncryptionActivity -> SqlManagementClient.TransparentDataEncryptionActivities.ListByConfiguration
- SqlManagementClient.Servers.ListUsages -> SqlManagementClient.ServerUsages.ListByServer
- SqlManagementClient.Databases.ListUsages -> SqlManagementClient.DatabaseUsages.ListByDatabase
- SqlManagementClient.Databases.GetBlobAuditingPolicy -> SqlManagementClient.DatabaseBlobAuditingPolicies.Get
- SqlManagementClient.Databases.CreateOrUpdateBlobAuditingPolicy -> SqlManagementClient.DatabaseBlobAuditingPolicies.CreateOrUpdate
- SqlManagementClient.Servers.ListEncryptionProtectors, -> SqlManagementClient.EncryptionProtectors.ListByServer
- SqlManagementClient.Servers.GetEncryptionProtector -> SqlManagementClient.EncryptionProtectors.Get
- SqlManagementClient.Servers.CreateOrUpdateEncryptionProtector -> SqlManagementClient.EncryptionProtectors.CreateOrUpdate
Features:
- Added server connection policy support
- Added .Update() for Server, Database, and ElasticPool
- Added support for Data Sync
- Added support for getting and canceling in-progress database update operations
- client.Operations.List() now returnes a full list of operations and not a limited subset]]></PackageReleaseNotes>
<PackageReleaseNotes>
<![CDATA[
New features:
- Added support for state and migration flag properties for SQL Vnet rules
]]>
</PackageReleaseNotes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
[assembly: AssemblyTitle("Microsoft Azure SQL Management Library")]
[assembly: AssemblyDescription("Provides management functionality for Microsoft Azure SQL.")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.7.0.0")]
[assembly: AssemblyFileVersion("1.8.0.0")]



Expand Down
Loading

0 comments on commit d9ea976

Please sign in to comment.