Skip to content

Commit

Permalink
Compute migration to track 1 deprecation (#21949)
Browse files Browse the repository at this point in the history
* add compute.sdk project reference

* add sdk folder

* address comments

* update commit version to inputs

* rename Compute.Sdk folder to Compute.Management.Sdk

* resolve xmls, change compute.sdk reference to compute.management.sdk

* remove SDK reference.  generate track 1 with latest DiskRP version

* Update src/Compute/Compute.Management.Sdk/README.md

Co-authored-by: Vincent Dai <[email protected]>

* fix autorest cmd

* update autorest gen

* Update Compute.Management.Sdk.csproj

* generated with latest swagger versions. 2023-04-02 diskRP 2023-07-01 CRP

* update assembly version of sdk

---------

Co-authored-by: Theodore Chang <[email protected]>
Co-authored-by: Vincent Dai <[email protected]>
  • Loading branch information
3 people authored Aug 14, 2023
1 parent d338b92 commit 1acc696
Show file tree
Hide file tree
Showing 727 changed files with 160,919 additions and 6 deletions.
18 changes: 18 additions & 0 deletions src/Compute/Compute.Management.Sdk/Compute.Management.Sdk.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<PsModuleName>Compute</PsModuleName>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)..\..\Az.props" />

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Microsoft.Azure.PowerShell.Compute.Management.Sdk</AssemblyName>
<RootNamespace>Microsoft.Azure.Management.Compute</RootNamespace>
<NoWarn>$(NoWarn);CS0108;CS1573</NoWarn>
</PropertyGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.Post.props" />

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Microsoft.Azure.Management.Compute.Models
{
public partial class CapacityReservation : Resource
{
public CapacityReservation(string location, Sku sku, string id, string name, string type, IDictionary<string, string> tags, string reservationId, IList<SubResourceReadOnly> virtualMachinesAssociated, System.DateTime? provisioningTime, string provisioningState, CapacityReservationInstanceView instanceView, IList<string> zones)
: base(location, id, name, type, tags)
{
ReservationId = reservationId;
VirtualMachinesAssociated = virtualMachinesAssociated;
ProvisioningTime = provisioningTime;
ProvisioningState = provisioningState;
InstanceView = instanceView;
Sku = sku;
Zones = zones;
CustomInit();
}

public CapacityReservation(string location, Sku sku, string id, string name, string type, IDictionary<string, string> tags, string reservationId, IList<SubResourceReadOnly> virtualMachinesAssociated, System.DateTime? provisioningTime = default(System.DateTime?), string provisioningState = default(string), CapacityReservationInstanceView instanceView = default(CapacityReservationInstanceView), System.DateTime? timeCreated = default(System.DateTime?), IList<string> zones = default(IList<string>))
: base(location, id, name, type, tags)
{
ReservationId = reservationId;
VirtualMachinesAssociated = virtualMachinesAssociated;
ProvisioningTime = provisioningTime;
ProvisioningState = provisioningState;
InstanceView = instanceView;
TimeCreated = timeCreated;
Sku = sku;
Zones = zones;
CustomInit();
}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
namespace Microsoft.Azure.Management.Compute.Models
{
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

public partial class CapacityReservationUpdate : UpdateResource
{
public CapacityReservationUpdate(IDictionary<string, string> tags, string reservationId, IList<SubResourceReadOnly> virtualMachinesAssociated, System.DateTime? provisioningTime, string provisioningState, CapacityReservationInstanceView instanceView, Sku sku)
: base(tags)
{
ReservationId = reservationId;
VirtualMachinesAssociated = virtualMachinesAssociated;
ProvisioningTime = provisioningTime;
ProvisioningState = provisioningState;
InstanceView = instanceView;
Sku = sku;
CustomInit();
}

public CapacityReservationUpdate(IDictionary<string, string> tags, string reservationId, IList<SubResourceReadOnly> virtualMachinesAssociated = default(IList<SubResourceReadOnly>), System.DateTime? provisioningTime = default(System.DateTime?), string provisioningState = default(string), CapacityReservationInstanceView instanceView = default(CapacityReservationInstanceView), System.DateTime? timeCreated = default(System.DateTime?), Sku sku = default(Sku))
: base(tags)
{
ReservationId = reservationId;
VirtualMachinesAssociated = virtualMachinesAssociated;
ProvisioningTime = provisioningTime;
ProvisioningState = provisioningState;
InstanceView = instanceView;
TimeCreated = timeCreated;
Sku = sku;
CustomInit();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// <auto-generated>
// 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.
// </auto-generated>

namespace Microsoft.Azure.Management.Compute.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

public partial class CapacityReservationUtilization
{
public CapacityReservationUtilization(IList<SubResourceReadOnly> virtualMachinesAllocated)
{
VirtualMachinesAllocated = virtualMachinesAllocated;
CustomInit();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Microsoft.Azure.Management.Compute.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

public partial class CloudServiceNetworkProfile
{
public CloudServiceNetworkProfile(IList<LoadBalancerConfiguration> loadBalancerConfigurations, SubResource swappableCloudService)
{
LoadBalancerConfigurations = loadBalancerConfigurations;
SwappableCloudService = swappableCloudService;
CustomInit();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Microsoft.Azure.Management.Compute.Models
{
public partial class DedicatedHostGroup : Resource
{
public DedicatedHostGroup(string location, int platformFaultDomainCount, string id, string name, string type, IDictionary<string, string> tags, IList<SubResourceReadOnly> hosts, DedicatedHostGroupInstanceView instanceView, bool? supportAutomaticPlacement, IList<string> zones)
: base(location, id, name, type, tags)
{
PlatformFaultDomainCount = platformFaultDomainCount;
Hosts = hosts;
InstanceView = instanceView;
SupportAutomaticPlacement = supportAutomaticPlacement;
Zones = zones;
CustomInit();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Microsoft.Azure.Management.Compute.Models
{
public partial class DedicatedHostGroupUpdate : UpdateResource
{
public DedicatedHostGroupUpdate(int platformFaultDomainCount, IDictionary<string, string> tags, IList<SubResourceReadOnly> hosts, DedicatedHostGroupInstanceView instanceView, bool? supportAutomaticPlacement, IList<string> zones)
: base(tags)
{
PlatformFaultDomainCount = platformFaultDomainCount;
Hosts = hosts;
InstanceView = instanceView;
SupportAutomaticPlacement = supportAutomaticPlacement;
Zones = zones;
CustomInit();
}
}
}
177 changes: 177 additions & 0 deletions src/Compute/Compute.Management.Sdk/Customizations/Disk.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
namespace Microsoft.Azure.Management.Compute.Models
{
using System.Collections.Generic;

/// <summary>
/// Disk resource.
/// </summary>
public partial class Disk : Resource
{
/// <summary>
/// Initializes a new instance of the Disk class.
/// </summary>
/// <param name="location">Resource location</param>
/// <param name="creationData">Disk source information. CreationData
/// information cannot be changed after the disk has been
/// created.</param>
/// <param name="id">Resource Id</param>
/// <param name="name">Resource name</param>
/// <param name="type">Resource type</param>
/// <param name="tags">Resource tags</param>
/// <param name="managedBy">A relative URI containing the ID of the VM
/// that has the disk attached.</param>
/// <param name="managedByExtended">List of relative URIs containing
/// the IDs of the VMs that have the disk attached. maxShares should be
/// set to a value greater than one for disks to allow attaching them
/// to multiple VMs.</param>
/// <param name="zones">The Logical zone list for Disk.</param>
/// <param name="extendedLocation">The extended location where the disk
/// will be created. Extended location cannot be changed.</param>
/// <param name="timeCreated">The time when the disk was
/// created.</param>
/// <param name="osType">The Operating System type. Possible values
/// include: 'Windows', 'Linux'</param>
/// <param name="hyperVGeneration">The hypervisor generation of the
/// Virtual Machine. Applicable to OS disks only. Possible values
/// include: 'V1', 'V2'</param>
/// <param name="purchasePlan">Purchase plan information for the the
/// image from which the OS disk was created. E.g. - {name:
/// 2019-Datacenter, publisher: MicrosoftWindowsServer, product:
/// WindowsServer}</param>
/// <param name="diskSizeGB">If creationData.createOption is Empty,
/// this field is mandatory and it indicates the size of the disk to
/// create. If this field is present for updates or creation with other
/// options, it indicates a resize. Resizes are only allowed if the
/// disk is not attached to a running VM, and can only increase the
/// disk's size.</param>
/// <param name="diskSizeBytes">The size of the disk in bytes. This
/// field is read only.</param>
/// <param name="uniqueId">Unique Guid identifying the
/// resource.</param>
/// <param name="encryptionSettingsCollection">Encryption settings
/// collection used for Azure Disk Encryption, can contain multiple
/// encryption settings per disk or snapshot.</param>
/// <param name="provisioningState">The disk provisioning
/// state.</param>
/// <param name="diskIOPSReadWrite">The number of IOPS allowed for this
/// disk; only settable for UltraSSD disks. One operation can transfer
/// between 4k and 256k bytes.</param>
/// <param name="diskMBpsReadWrite">The bandwidth allowed for this
/// disk; only settable for UltraSSD disks. MBps means millions of
/// bytes per second - MB here uses the ISO notation, of powers of
/// 10.</param>
/// <param name="diskIOPSReadOnly">The total number of IOPS that will
/// be allowed across all VMs mounting the shared disk as ReadOnly. One
/// operation can transfer between 4k and 256k bytes.</param>
/// <param name="diskMBpsReadOnly">The total throughput (MBps) that
/// will be allowed across all VMs mounting the shared disk as
/// ReadOnly. MBps means millions of bytes per second - MB here uses
/// the ISO notation, of powers of 10.</param>
/// <param name="diskState">The state of the disk. Possible values
/// include: 'Unattached', 'Attached', 'Reserved', 'Frozen',
/// 'ActiveSAS', 'ActiveSASFrozen', 'ReadyToUpload',
/// 'ActiveUpload'</param>
/// <param name="encryption">Encryption property can be used to encrypt
/// data at rest with customer managed keys or platform managed
/// keys.</param>
/// <param name="maxShares">The maximum number of VMs that can attach
/// to the disk at the same time. Value greater than one indicates a
/// disk that can be mounted on multiple VMs at the same time.</param>
/// <param name="shareInfo">Details of the list of all VMs that have
/// the disk attached. maxShares should be set to a value greater than
/// one for disks to allow attaching them to multiple VMs.</param>
/// <param name="networkAccessPolicy">Possible values include:
/// 'AllowAll', 'AllowPrivate', 'DenyAll'</param>
/// <param name="diskAccessId">ARM id of the DiskAccess resource for
/// using private endpoints on disks.</param>
/// <param name="tier">Performance tier of the disk (e.g, P4, S10) as
/// described here:
/// https://azure.microsoft.com/en-us/pricing/details/managed-disks/.
/// Does not apply to Ultra disks.</param>
/// <param name="burstingEnabled">Set to true to enable bursting beyond
/// the provisioned performance target of the disk. Bursting is
/// disabled by default. Does not apply to Ultra disks.</param>
/// <param name="propertyUpdatesInProgress">Properties of the disk for
/// which update is pending.</param>
/// <param name="supportsHibernation">Indicates the OS on a disk
/// supports hibernation.</param>
/// <param name="securityProfile">Contains the security related
/// information for the resource.</param>
public Disk(string location, CreationData creationData, string id, string name, string type, IDictionary<string, string> tags, string managedBy, IList<string> managedByExtended, DiskSku sku, IList<string> zones, ExtendedLocation extendedLocation, System.DateTime? timeCreated, OperatingSystemTypes? osType, string hyperVGeneration, PurchasePlan purchasePlan, int? diskSizeGB, long? diskSizeBytes = default(long?), string uniqueId = default(string), EncryptionSettingsCollection encryptionSettingsCollection = default(EncryptionSettingsCollection), string provisioningState = default(string), long? diskIOPSReadWrite = default(long?), long? diskMBpsReadWrite = default(long?), long? diskIOPSReadOnly = default(long?), long? diskMBpsReadOnly = default(long?), string diskState = default(string), Encryption encryption = default(Encryption), int? maxShares = default(int?), IList<ShareInfoElement> shareInfo = default(IList<ShareInfoElement>), string networkAccessPolicy = default(string), string diskAccessId = default(string), string tier = default(string), bool? burstingEnabled = default(bool?), PropertyUpdatesInProgress propertyUpdatesInProgress = default(PropertyUpdatesInProgress), bool? supportsHibernation = default(bool?), DiskSecurityProfile securityProfile = default(DiskSecurityProfile))
: base(location, id, name, type, tags)
{
ManagedBy = managedBy;
ManagedByExtended = managedByExtended;
Sku = sku;
Zones = zones;
ExtendedLocation = extendedLocation;
TimeCreated = timeCreated;
OsType = osType;
HyperVGeneration = hyperVGeneration;
PurchasePlan = purchasePlan;
CreationData = creationData;
DiskSizeGB = diskSizeGB;
DiskSizeBytes = diskSizeBytes;
UniqueId = uniqueId;
EncryptionSettingsCollection = encryptionSettingsCollection;
ProvisioningState = provisioningState;
DiskIOPSReadWrite = diskIOPSReadWrite;
DiskMBpsReadWrite = diskMBpsReadWrite;
DiskIOPSReadOnly = diskIOPSReadOnly;
DiskMBpsReadOnly = diskMBpsReadOnly;
DiskState = diskState;
Encryption = encryption;
MaxShares = maxShares;
ShareInfo = shareInfo;
NetworkAccessPolicy = networkAccessPolicy;
DiskAccessId = diskAccessId;
Tier = tier;
BurstingEnabled = burstingEnabled;
PropertyUpdatesInProgress = propertyUpdatesInProgress;
SupportsHibernation = supportsHibernation;
SecurityProfile = securityProfile;
CustomInit();
}

public Disk(string location, CreationData creationData, string id, string name, string type, IDictionary<string, string> tags, string managedBy, IList<string> managedByExtended, DiskSku sku, IList<string> zones, ExtendedLocation extendedLocation, System.DateTime? timeCreated, OperatingSystemTypes? osType, string hyperVGeneration, PurchasePlan purchasePlan, SupportedCapabilities supportedCapabilities, int? diskSizeGB, long? diskSizeBytes, string uniqueId, EncryptionSettingsCollection encryptionSettingsCollection, string provisioningState, long? diskIOPSReadWrite, long? diskMBpsReadWrite, long? diskIOPSReadOnly, long? diskMBpsReadOnly, string diskState, Encryption encryption, int? maxShares, IList<ShareInfoElement> shareInfo, string networkAccessPolicy, string diskAccessId, string tier, bool? burstingEnabled = default(bool?), PropertyUpdatesInProgress propertyUpdatesInProgress = default(PropertyUpdatesInProgress), bool? supportsHibernation = default(bool?), DiskSecurityProfile securityProfile = default(DiskSecurityProfile), double? completionPercent = default(double?), string publicNetworkAccess = default(string), string dataAccessAuthMode = default(string), bool? optimizedForFrequentAttach = default(bool?))
: base(location, id, name, type, tags)
{
ManagedBy = managedBy;
ManagedByExtended = managedByExtended;
Sku = sku;
Zones = zones;
ExtendedLocation = extendedLocation;
TimeCreated = timeCreated;
OsType = osType;
HyperVGeneration = hyperVGeneration;
PurchasePlan = purchasePlan;
SupportedCapabilities = supportedCapabilities;
CreationData = creationData;
DiskSizeGB = diskSizeGB;
DiskSizeBytes = diskSizeBytes;
UniqueId = uniqueId;
EncryptionSettingsCollection = encryptionSettingsCollection;
ProvisioningState = provisioningState;
DiskIOPSReadWrite = diskIOPSReadWrite;
DiskMBpsReadWrite = diskMBpsReadWrite;
DiskIOPSReadOnly = diskIOPSReadOnly;
DiskMBpsReadOnly = diskMBpsReadOnly;
DiskState = diskState;
Encryption = encryption;
MaxShares = maxShares;
ShareInfo = shareInfo;
NetworkAccessPolicy = networkAccessPolicy;
DiskAccessId = diskAccessId;
Tier = tier;
BurstingEnabled = burstingEnabled;
PropertyUpdatesInProgress = propertyUpdatesInProgress;
SupportsHibernation = supportsHibernation;
SecurityProfile = securityProfile;
CompletionPercent = completionPercent;
PublicNetworkAccess = publicNetworkAccess;
DataAccessAuthMode = dataAccessAuthMode;
OptimizedForFrequentAttach = optimizedForFrequentAttach;
CustomInit();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Microsoft.Azure.Management.Compute.Models
{

public partial class DiskEncryptionSetParameters : SubResource
{
public DiskEncryptionSetParameters(string id = default(string))
: base(id)
{
CustomInit();
}
}
}
Loading

0 comments on commit 1acc696

Please sign in to comment.