diff --git a/src/AzureStack/CommerceAdmin/Commerce.Admin/Microsoft.AzureStack.Management.Commerce.Admin.csproj b/src/AzureStack/CommerceAdmin/Commerce.Admin/Microsoft.AzureStack.Management.Commerce.Admin.csproj
index 128b3500bdd1d..2d19ec42a52d2 100644
--- a/src/AzureStack/CommerceAdmin/Commerce.Admin/Microsoft.AzureStack.Management.Commerce.Admin.csproj
+++ b/src/AzureStack/CommerceAdmin/Commerce.Admin/Microsoft.AzureStack.Management.Commerce.Admin.csproj
@@ -7,6 +7,7 @@
0.1.0-preview
Microsoft.AzureStack.Management.Commerce.Admin
Microsoft Azure Stack;Commerce;REST HTTP client;azureostackfficial;netcore451511
+ This is a preview release of the AzureStack Commerce Admin SDK. Included with this release is support for gathering Usage Aggregates for subscriptions.
net452;netstandard1.4
diff --git a/src/AzureStack/FabricAdmin/Fabric.Admin.Tests/src/InfraRoleTests.cs b/src/AzureStack/FabricAdmin/Fabric.Admin.Tests/src/InfraRoleTests.cs
index af80c698006a9..ddd79c584f387 100644
--- a/src/AzureStack/FabricAdmin/Fabric.Admin.Tests/src/InfraRoleTests.cs
+++ b/src/AzureStack/FabricAdmin/Fabric.Admin.Tests/src/InfraRoleTests.cs
@@ -13,7 +13,6 @@ namespace Fabric.Tests {
/// Summary description for FabricTest
///
public class InfraRoleTests : FabricTestBase {
- private string InfraRoleName = "Backup controller";
private void ValidateInfraRole(InfraRole role) {
Assert.True(FabricCommon.ValidateResource(role));
@@ -70,13 +69,5 @@ public void TestGetAllInfraRoles() {
});
}
- // TODO: Figure out what this does before we call it and then break something
- [Fact(Skip ="No hardware")]
- public void TestScaleUpInfraRole() {
- RunTest((client) => {
- var role = client.InfraRoles.ScaleUp(Location, InfraRoleName);
- Assert.Null(role); // ???
- });
- }
}
}
diff --git a/src/AzureStack/FabricAdmin/Fabric.Admin.Tests/src/ScaleUnitTests.cs b/src/AzureStack/FabricAdmin/Fabric.Admin.Tests/src/ScaleUnitTests.cs
index b4c1342cea692..e3b28a6f33c7e 100644
--- a/src/AzureStack/FabricAdmin/Fabric.Admin.Tests/src/ScaleUnitTests.cs
+++ b/src/AzureStack/FabricAdmin/Fabric.Admin.Tests/src/ScaleUnitTests.cs
@@ -87,18 +87,5 @@ public void TestGetAllScaleUnits() {
});
});
}
-
- [Fact(Skip ="no hardware")]
- public void TestScaleOutScaleUnit() {
- RunTest((client) => {
- var scaleUnit = client.ScaleUnits.List(Location).GetFirst();
- var desc = new BareMetalNodeDescription()
- {
- // TODO
- };
- client.ScaleUnits.ScaleOut(Location, scaleUnit.Name, desc);
- });
- }
-
}
}
diff --git a/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/IInfraRolesOperations.cs b/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/IInfraRolesOperations.cs
index f3013601f5215..d7c3dc242e9f3 100644
--- a/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/IInfraRolesOperations.cs
+++ b/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/IInfraRolesOperations.cs
@@ -25,31 +25,6 @@ namespace Microsoft.AzureStack.Management.Fabric.Admin
///
public partial interface IInfraRolesOperations
{
- ///
- /// Create new infra role instances.
- ///
- ///
- /// Location of the resource.
- ///
- ///
- /// Infra role name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> ScaleUpWithHttpMessagesAsync(string location, string infraRole, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Get an infra role description.
///
@@ -101,31 +76,6 @@ public partial interface IInfraRolesOperations
///
Task>> ListWithHttpMessagesAsync(string location, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Create new infra role instances.
- ///
- ///
- /// Location of the resource.
- ///
- ///
- /// Infra role name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> BeginScaleUpWithHttpMessagesAsync(string location, string infraRole, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
/// Get a list of all infra roles at a location.
///
///
diff --git a/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/IScaleUnitsOperations.cs b/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/IScaleUnitsOperations.cs
index ae0e845061d2a..ac601a32a7eaf 100644
--- a/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/IScaleUnitsOperations.cs
+++ b/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/IScaleUnitsOperations.cs
@@ -25,34 +25,6 @@ namespace Microsoft.AzureStack.Management.Fabric.Admin
///
public partial interface IScaleUnitsOperations
{
- ///
- /// Scales out the cluster.
- ///
- ///
- /// Location of the resource.
- ///
- ///
- /// Name of the scale units.
- ///
- ///
- /// Descripion of the server to be added.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> ScaleOutWithHttpMessagesAsync(string location, string scaleUnit, BareMetalNodeDescription serversToBeAdded, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Get a scale unit.
///
@@ -104,34 +76,6 @@ public partial interface IScaleUnitsOperations
///
Task>> ListWithHttpMessagesAsync(string location, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Scales out the cluster.
- ///
- ///
- /// Location of the resource.
- ///
- ///
- /// Name of the scale units.
- ///
- ///
- /// Descripion of the server to be added.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> BeginScaleOutWithHttpMessagesAsync(string location, string scaleUnit, BareMetalNodeDescription serversToBeAdded, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
/// Get a list of all scale units at a location.
///
///
diff --git a/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/InfraRolesOperations.cs b/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/InfraRolesOperations.cs
index 2134eee176e25..094d3e16c5fdf 100644
--- a/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/InfraRolesOperations.cs
+++ b/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/InfraRolesOperations.cs
@@ -52,28 +52,6 @@ internal InfraRolesOperations(FabricAdminClient client)
///
public FabricAdminClient Client { get; private set; }
- ///
- /// Create new infra role instances.
- ///
- ///
- /// Location of the resource.
- ///
- ///
- /// Infra role name.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task> ScaleUpWithHttpMessagesAsync(string location, string infraRole, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send request
- AzureOperationResponse _response = await BeginScaleUpWithHttpMessagesAsync(location, infraRole, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
///
/// Get an infra role description.
///
@@ -469,238 +447,6 @@ internal InfraRolesOperations(FabricAdminClient client)
return _result;
}
- ///
- /// Create new infra role instances.
- ///
- ///
- /// Location of the resource.
- ///
- ///
- /// Infra role name.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> BeginScaleUpWithHttpMessagesAsync(string location, string infraRole, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (location == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "location");
- }
- if (infraRole == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "infraRole");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("location", location);
- tracingParameters.Add("infraRole", infraRole);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginScaleUp", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/System.{location}/providers/Microsoft.Fabric.Admin/fabricLocations/{location}/infraRoles/{infraRole}/ScaleUp").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
- _url = _url.Replace("{infraRole}", System.Uri.EscapeDataString(infraRole));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 500)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- // Deserialize Response
- if ((int)_statusCode == 202)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- // Deserialize Response
- if ((int)_statusCode == 500)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
///
/// Get a list of all infra roles at a location.
///
diff --git a/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/InfraRolesOperationsExtensions.cs b/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/InfraRolesOperationsExtensions.cs
index 0bd26ce4a4e33..33ccb30814a10 100644
--- a/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/InfraRolesOperationsExtensions.cs
+++ b/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/InfraRolesOperationsExtensions.cs
@@ -23,46 +23,6 @@ namespace Microsoft.AzureStack.Management.Fabric.Admin
///
public static partial class InfraRolesOperationsExtensions
{
- ///
- /// Create new infra role instances.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Location of the resource.
- ///
- ///
- /// Infra role name.
- ///
- public static OperationStatus ScaleUp(this IInfraRolesOperations operations, string location, string infraRole)
- {
- return operations.ScaleUpAsync(location, infraRole).GetAwaiter().GetResult();
- }
-
- ///
- /// Create new infra role instances.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Location of the resource.
- ///
- ///
- /// Infra role name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task ScaleUpAsync(this IInfraRolesOperations operations, string location, string infraRole, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ScaleUpWithHttpMessagesAsync(location, infraRole, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
///
/// Get an infra role description.
///
@@ -143,46 +103,6 @@ public static InfraRole Get(this IInfraRolesOperations operations, string locati
}
}
- ///
- /// Create new infra role instances.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Location of the resource.
- ///
- ///
- /// Infra role name.
- ///
- public static OperationStatus BeginScaleUp(this IInfraRolesOperations operations, string location, string infraRole)
- {
- return operations.BeginScaleUpAsync(location, infraRole).GetAwaiter().GetResult();
- }
-
- ///
- /// Create new infra role instances.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Location of the resource.
- ///
- ///
- /// Infra role name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task BeginScaleUpAsync(this IInfraRolesOperations operations, string location, string infraRole, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.BeginScaleUpWithHttpMessagesAsync(location, infraRole, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
///
/// Get a list of all infra roles at a location.
///
diff --git a/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/Models/BareMetalNodeDescription.cs b/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/Models/BareMetalNodeDescription.cs
deleted file mode 100644
index 7cedd7e56212b..0000000000000
--- a/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/Models/BareMetalNodeDescription.cs
+++ /dev/null
@@ -1,114 +0,0 @@
-// 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.AzureStack.Management.Fabric.Admin.Models
-{
- using Microsoft.AzureStack;
- using Microsoft.AzureStack.Management;
- using Microsoft.AzureStack.Management.Fabric;
- using Microsoft.AzureStack.Management.Fabric.Admin;
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// The description of a bare metal node used for ScaleOut operation on a
- /// cluster.
- ///
- public partial class BareMetalNodeDescription
- {
- ///
- /// Initializes a new instance of the BareMetalNodeDescription class.
- ///
- public BareMetalNodeDescription()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the BareMetalNodeDescription class.
- ///
- /// Bmc address of the physical
- /// machine.
- /// Vendor of the physical machine.
- /// Model of the physical machine.
- /// Serial number of the physical
- /// machine.
- /// Bios version of the physical
- /// machine.
- /// Name of the computer.
- /// Name of the cluster.
- /// Mac address of the bare metal
- /// node.
- public BareMetalNodeDescription(string bmcAddress = default(string), string vendor = default(string), string model = default(string), string serialNumber = default(string), string biosVersion = default(string), string computerName = default(string), string id = default(string), string macAddress = default(string))
- {
- BmcAddress = bmcAddress;
- Vendor = vendor;
- Model = model;
- SerialNumber = serialNumber;
- BiosVersion = biosVersion;
- ComputerName = computerName;
- Id = id;
- MacAddress = macAddress;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets bmc address of the physical machine.
- ///
- [JsonProperty(PropertyName = "bmcAddress")]
- public string BmcAddress { get; set; }
-
- ///
- /// Gets or sets vendor of the physical machine.
- ///
- [JsonProperty(PropertyName = "vendor")]
- public string Vendor { get; set; }
-
- ///
- /// Gets or sets model of the physical machine.
- ///
- [JsonProperty(PropertyName = "model")]
- public string Model { get; set; }
-
- ///
- /// Gets or sets serial number of the physical machine.
- ///
- [JsonProperty(PropertyName = "serialNumber")]
- public string SerialNumber { get; set; }
-
- ///
- /// Gets or sets bios version of the physical machine.
- ///
- [JsonProperty(PropertyName = "biosVersion")]
- public string BiosVersion { get; set; }
-
- ///
- /// Gets or sets name of the computer.
- ///
- [JsonProperty(PropertyName = "computerName")]
- public string ComputerName { get; set; }
-
- ///
- /// Gets or sets name of the cluster.
- ///
- [JsonProperty(PropertyName = "id")]
- public string Id { get; set; }
-
- ///
- /// Gets or sets mac address of the bare metal node.
- ///
- [JsonProperty(PropertyName = "macAddress")]
- public string MacAddress { get; set; }
-
- }
-}
diff --git a/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/Models/ProvisioningState.cs b/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/Models/ProvisioningState.cs
deleted file mode 100644
index 65d89d190b159..0000000000000
--- a/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/Models/ProvisioningState.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-// 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.AzureStack.Management.Fabric.Admin.Models
-{
- using Microsoft.AzureStack;
- using Microsoft.AzureStack.Management;
- using Microsoft.AzureStack.Management.Fabric;
- using Microsoft.AzureStack.Management.Fabric.Admin;
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// The state of the operation.
- ///
- public partial class ProvisioningState
- {
- ///
- /// Initializes a new instance of the ProvisioningState class.
- ///
- public ProvisioningState()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ProvisioningState class.
- ///
- /// The state of the
- /// operation.
- public ProvisioningState(string provisioningStateProperty = default(string))
- {
- ProvisioningStateProperty = provisioningStateProperty;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the state of the operation.
- ///
- [JsonProperty(PropertyName = "provisioningState")]
- public string ProvisioningStateProperty { get; set; }
-
- }
-}
diff --git a/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/ScaleUnitsOperations.cs b/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/ScaleUnitsOperations.cs
index 7729ea3a6d506..d4fd53d15a0b2 100644
--- a/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/ScaleUnitsOperations.cs
+++ b/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/ScaleUnitsOperations.cs
@@ -52,31 +52,6 @@ internal ScaleUnitsOperations(FabricAdminClient client)
///
public FabricAdminClient Client { get; private set; }
- ///
- /// Scales out the cluster.
- ///
- ///
- /// Location of the resource.
- ///
- ///
- /// Name of the scale units.
- ///
- ///
- /// Descripion of the server to be added.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task> ScaleOutWithHttpMessagesAsync(string location, string scaleUnit, BareMetalNodeDescription serversToBeAdded, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send request
- AzureOperationResponse _response = await BeginScaleOutWithHttpMessagesAsync(location, scaleUnit, serversToBeAdded, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
///
/// Get a scale unit.
///
@@ -472,252 +447,6 @@ internal ScaleUnitsOperations(FabricAdminClient client)
return _result;
}
- ///
- /// Scales out the cluster.
- ///
- ///
- /// Location of the resource.
- ///
- ///
- /// Name of the scale units.
- ///
- ///
- /// Descripion of the server to be added.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> BeginScaleOutWithHttpMessagesAsync(string location, string scaleUnit, BareMetalNodeDescription serversToBeAdded, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (location == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "location");
- }
- if (scaleUnit == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "scaleUnit");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- if (serversToBeAdded == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "serversToBeAdded");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("location", location);
- tracingParameters.Add("scaleUnit", scaleUnit);
- tracingParameters.Add("serversToBeAdded", serversToBeAdded);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginScaleOut", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/System.{location}/providers/Microsoft.Fabric.Admin/fabricLocations/{location}/scaleUnits/{scaleUnit}/ScaleOut").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
- _url = _url.Replace("{scaleUnit}", System.Uri.EscapeDataString(scaleUnit));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- if(serversToBeAdded != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(serversToBeAdded, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 500)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- // Deserialize Response
- if ((int)_statusCode == 202)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- // Deserialize Response
- if ((int)_statusCode == 500)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
///
/// Get a list of all scale units at a location.
///
diff --git a/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/ScaleUnitsOperationsExtensions.cs b/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/ScaleUnitsOperationsExtensions.cs
index 051fb52b77f8d..be74e45be86f5 100644
--- a/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/ScaleUnitsOperationsExtensions.cs
+++ b/src/AzureStack/FabricAdmin/Fabric.Admin/Fabric/Fabric.Admin/Generated/ScaleUnitsOperationsExtensions.cs
@@ -23,52 +23,6 @@ namespace Microsoft.AzureStack.Management.Fabric.Admin
///
public static partial class ScaleUnitsOperationsExtensions
{
- ///
- /// Scales out the cluster.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Location of the resource.
- ///
- ///
- /// Name of the scale units.
- ///
- ///
- /// Descripion of the server to be added.
- ///
- public static OperationStatus ScaleOut(this IScaleUnitsOperations operations, string location, string scaleUnit, BareMetalNodeDescription serversToBeAdded)
- {
- return operations.ScaleOutAsync(location, scaleUnit, serversToBeAdded).GetAwaiter().GetResult();
- }
-
- ///
- /// Scales out the cluster.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Location of the resource.
- ///
- ///
- /// Name of the scale units.
- ///
- ///
- /// Descripion of the server to be added.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task ScaleOutAsync(this IScaleUnitsOperations operations, string location, string scaleUnit, BareMetalNodeDescription serversToBeAdded, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ScaleOutWithHttpMessagesAsync(location, scaleUnit, serversToBeAdded, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
///
/// Get a scale unit.
///
@@ -149,52 +103,6 @@ public static ScaleUnit Get(this IScaleUnitsOperations operations, string locati
}
}
- ///
- /// Scales out the cluster.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Location of the resource.
- ///
- ///
- /// Name of the scale units.
- ///
- ///
- /// Descripion of the server to be added.
- ///
- public static OperationStatus BeginScaleOut(this IScaleUnitsOperations operations, string location, string scaleUnit, BareMetalNodeDescription serversToBeAdded)
- {
- return operations.BeginScaleOutAsync(location, scaleUnit, serversToBeAdded).GetAwaiter().GetResult();
- }
-
- ///
- /// Scales out the cluster.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Location of the resource.
- ///
- ///
- /// Name of the scale units.
- ///
- ///
- /// Descripion of the server to be added.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task BeginScaleOutAsync(this IScaleUnitsOperations operations, string location, string scaleUnit, BareMetalNodeDescription serversToBeAdded, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.BeginScaleOutWithHttpMessagesAsync(location, scaleUnit, serversToBeAdded, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
///
/// Get a list of all scale units at a location.
///
diff --git a/src/AzureStack/FabricAdmin/Fabric.Admin/Microsoft.AzureStack.Management.Fabric.Admin.csproj b/src/AzureStack/FabricAdmin/Fabric.Admin/Microsoft.AzureStack.Management.Fabric.Admin.csproj
index 034fcefea5aa8..df07f2220525c 100644
--- a/src/AzureStack/FabricAdmin/Fabric.Admin/Microsoft.AzureStack.Management.Fabric.Admin.csproj
+++ b/src/AzureStack/FabricAdmin/Fabric.Admin/Microsoft.AzureStack.Management.Fabric.Admin.csproj
@@ -7,6 +7,7 @@
0.1.0-preview
Microsoft.AzureStack.Management.Fabric.Admin
Microsoft Azure Stack;Fabric;REST HTTP client;azureostackfficial;netcore451511
+ This is a preview release of the AzureStack Fabric Admin SDK. Included with this release is support for gathering information about your AzureStack infrastructure and performing administrative operations.
net452;netstandard1.4
diff --git a/src/AzureStack/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Microsoft.AzureStack.Management.InfrastructureInsights.Admin.csproj b/src/AzureStack/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Microsoft.AzureStack.Management.InfrastructureInsights.Admin.csproj
index f8a8bce5a261f..fff9832bf77df 100644
--- a/src/AzureStack/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Microsoft.AzureStack.Management.InfrastructureInsights.Admin.csproj
+++ b/src/AzureStack/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Microsoft.AzureStack.Management.InfrastructureInsights.Admin.csproj
@@ -7,6 +7,7 @@
0.1.0-preview
Microsoft.AzureStack.Management.InfrastructureInsights.Admin
Microsoft Azure Stack;InfrastructureInsights;REST HTTP client;azureostackfficial;netcore451511
+ This is a preview release of the AzureStack InfrastructureInsights Admin SDK. Included with this release is support for gathering information about the health of your AzureStack infrastructure.
net452;netstandard1.4