-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Refactor CloudMachineClient and related types into new package #46937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
christothes
merged 9 commits into
Azure:main
from
christothes:chriss/cm-package-refactor
Nov 1, 2024
Merged
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
229eaa2
Move types to new package
christothes ac127ac
fixup workspace
christothes 78dcd8e
cleanup tests
christothes 232a80f
export
christothes 61a5ac3
Update README.md
christothes 71b9512
update codeowners
christothes 5144b61
Merge branch 'chriss/cm-package-refactor' of https://github.com/chris…
christothes 608d153
Update .github/CODEOWNERS
christothes 72c2e57
Update .github/CODEOWNERS
christothes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| | ||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio Version 17 | ||
| VisualStudioVersion = 17.0.31903.59 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Azure.CloudMachine", "Azure.CloudMachine", "{780138CF-68C6-4323-982F-F18989E2FA86}" | ||
| EndProject | ||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.CloudMachine", "Azure.CloudMachine\src\Azure.CloudMachine.csproj", "{0EA29D2F-41E0-4826-9CD4-111109A2CFF7}" | ||
| EndProject | ||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.CloudMachine.Tests", "Azure.CloudMachine\tests\Azure.CloudMachine.Tests.csproj", "{8C1A29AE-E357-4C40-ACCC-7215FBFB368C}" | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|Any CPU = Debug|Any CPU | ||
| Release|Any CPU = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| {0EA29D2F-41E0-4826-9CD4-111109A2CFF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {0EA29D2F-41E0-4826-9CD4-111109A2CFF7}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {0EA29D2F-41E0-4826-9CD4-111109A2CFF7}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {0EA29D2F-41E0-4826-9CD4-111109A2CFF7}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| {8C1A29AE-E357-4C40-ACCC-7215FBFB368C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {8C1A29AE-E357-4C40-ACCC-7215FBFB368C}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {8C1A29AE-E357-4C40-ACCC-7215FBFB368C}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {8C1A29AE-E357-4C40-ACCC-7215FBFB368C}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(NestedProjects) = preSolution | ||
| {0EA29D2F-41E0-4826-9CD4-111109A2CFF7} = {780138CF-68C6-4323-982F-F18989E2FA86} | ||
| {8C1A29AE-E357-4C40-ACCC-7215FBFB368C} = {780138CF-68C6-4323-982F-F18989E2FA86} | ||
| EndGlobalSection | ||
| EndGlobal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Release History | ||
|
|
||
| ## 1.0.0-beta.1 (Unreleased) | ||
|
|
||
| ### Features Added | ||
|
|
||
| ### Breaking Changes | ||
|
|
||
| ### Bugs Fixed | ||
|
|
||
| ### Other Changes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <!-- | ||
| Add any shared properties you want for the projects under this package directory that need to be set before the auto imported Directory.Build.props | ||
| --> | ||
| <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" /> | ||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <!-- Import the common SDK build targets. --> | ||
| <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.targets))\Directory.Build.targets" | ||
| Condition="'$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.targets))' != ''" /> | ||
|
|
||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # Azure CloudMachine client library for .NET | ||
|
|
||
| TODO | ||
|
|
||
| ## Getting started | ||
|
|
||
| ### Install the package | ||
|
|
||
| Install the client library for .NET with [NuGet](https://www.nuget.org/ ): | ||
|
|
||
| ```dotnetcli | ||
| dotnet add package Azure.CloudMachine --prerelease | ||
| ``` | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| > You must have an [Azure subscription](https://azure.microsoft.com/free/dotnet/). | ||
|
|
||
| ### Authenticate the Client | ||
|
|
||
| ## Key concepts | ||
|
|
||
| TODO. | ||
|
|
||
| ## Examples | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| - File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues). | ||
| - Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags. | ||
|
|
||
| ## Next steps | ||
|
|
||
| ## Contributing | ||
|
|
||
| For details on contributing to this repository, see the [contributing | ||
| guide][cg]. | ||
|
|
||
| This project welcomes contributions and suggestions. Most contributions | ||
| require you to agree to a Contributor License Agreement (CLA) declaring | ||
| that you have the right to, and actually do, grant us the rights to use | ||
| your contribution. For details, visit <https://cla.microsoft.com>. | ||
|
|
||
| When you submit a pull request, a CLA-bot will automatically determine | ||
| whether you need to provide a CLA and decorate the PR appropriately | ||
| (for example, label, comment). Follow the instructions provided by the | ||
| bot. You'll only need to do this action once across all repositories | ||
| using our CLA. | ||
|
|
||
| This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For | ||
| more information, see the [Code of Conduct FAQ][coc_faq] or contact | ||
| <[email protected]> with any other questions or comments. | ||
|
|
||
| <!-- LINKS --> | ||
| [cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md | ||
| [coc]: https://opensource.microsoft.com/codeofconduct/ | ||
| [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ |
112 changes: 112 additions & 0 deletions
112
sdk/cloudmachine/Azure.CloudMachine/api/Azure.CloudMachine.netstandard2.0.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| namespace Azure.CloudMachine | ||
| { | ||
| public partial class CloudMachineClient : Azure.CloudMachine.CloudMachineWorkspace | ||
| { | ||
| protected CloudMachineClient() : base (default(Azure.Core.TokenCredential), default(Microsoft.Extensions.Configuration.IConfiguration)) { } | ||
| public CloudMachineClient(Azure.Core.TokenCredential credential = null, Microsoft.Extensions.Configuration.IConfiguration configuration = null) : base (default(Azure.Core.TokenCredential), default(Microsoft.Extensions.Configuration.IConfiguration)) { } | ||
| public Azure.CloudMachine.MessagingServices Messaging { get { throw null; } } | ||
| public Azure.CloudMachine.StorageServices Storage { get { throw null; } } | ||
| } | ||
| public partial class CloudMachineWorkspace : Azure.Core.ClientWorkspace | ||
| { | ||
| public CloudMachineWorkspace(Azure.Core.TokenCredential credential = null, Microsoft.Extensions.Configuration.IConfiguration configuration = null) { } | ||
| [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] | ||
| public string Id { get { throw null; } } | ||
| [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] | ||
| public override bool Equals(object obj) { throw null; } | ||
| [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] | ||
| public override Azure.Core.ClientConnectionOptions GetConnectionOptions(System.Type clientType, string instanceId = null) { throw null; } | ||
| [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] | ||
| public override int GetHashCode() { throw null; } | ||
| [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] | ||
| public override string ToString() { throw null; } | ||
| } | ||
| [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] | ||
| public readonly partial struct MessagingServices | ||
| { | ||
| private readonly object _dummy; | ||
| private readonly int _dummyPrimitive; | ||
| public void SendMessage(object serializable) { } | ||
| public void WhenMessageReceived(System.Action<string> received) { } | ||
| } | ||
| public partial class StorageFile | ||
| { | ||
| internal StorageFile() { } | ||
| public System.Threading.CancellationToken CancellationToken { get { throw null; } } | ||
| public string Path { get { throw null; } } | ||
| public string RequestId { get { throw null; } } | ||
| public void Delete() { } | ||
| public System.BinaryData Download() { throw null; } | ||
| [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] | ||
| public override bool Equals(object obj) { throw null; } | ||
| [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] | ||
| public override int GetHashCode() { throw null; } | ||
| public static implicit operator Azure.Response (Azure.CloudMachine.StorageFile result) { throw null; } | ||
| [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] | ||
| public override string ToString() { throw null; } | ||
| } | ||
| [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] | ||
| public readonly partial struct StorageServices | ||
| { | ||
| private readonly object _dummy; | ||
| private readonly int _dummyPrimitive; | ||
| public void DeleteBlob(string path) { } | ||
| public System.BinaryData DownloadBlob(string path) { throw null; } | ||
| public string UploadBinaryData(System.BinaryData data, string name = null, bool overwrite = false) { throw null; } | ||
| public string UploadBytes(byte[] bytes, string name = null, bool overwrite = false) { throw null; } | ||
| public string UploadBytes(System.ReadOnlyMemory<byte> bytes, string name = null, bool overwrite = false) { throw null; } | ||
| public string UploadJson(object json, string name = null, bool overwrite = false) { throw null; } | ||
| public string UploadStream(System.IO.Stream fileStream, string name = null, bool overwrite = false) { throw null; } | ||
| public void WhenBlobUploaded(System.Action<Azure.CloudMachine.StorageFile> function) { } | ||
| } | ||
| } | ||
| namespace Azure.CloudMachine.KeyVault | ||
| { | ||
| public static partial class KeyVaultExtensions | ||
| { | ||
| public static Azure.Security.KeyVault.Secrets.SecretClient GetKeyVaultSecretsClient(this Azure.Core.ClientWorkspace workspace) { throw null; } | ||
| } | ||
| } | ||
| namespace Azure.CloudMachine.OpenAI | ||
| { | ||
| public static partial class AzureOpenAIExtensions | ||
| { | ||
| public static OpenAI.Chat.ChatClient GetOpenAIChatClient(this Azure.Core.ClientWorkspace workspace) { throw null; } | ||
| public static OpenAI.Embeddings.EmbeddingClient GetOpenAIEmbeddingsClient(this Azure.Core.ClientWorkspace workspace) { throw null; } | ||
| } | ||
| } | ||
| namespace Azure.Core | ||
| { | ||
| public partial class ClientCache | ||
| { | ||
| public ClientCache() { } | ||
| public T Get<T>(System.Func<T> value, string id = null) where T : class { throw null; } | ||
| } | ||
| public enum ClientConnectionKind | ||
| { | ||
| EntraId = 0, | ||
| ApiKey = 1, | ||
| OutOfBand = 2, | ||
| } | ||
| [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] | ||
| public readonly partial struct ClientConnectionOptions | ||
| { | ||
| private readonly object _dummy; | ||
| private readonly int _dummyPrimitive; | ||
| public ClientConnectionOptions(string subclientId) { throw null; } | ||
| public ClientConnectionOptions(System.Uri endpoint, Azure.Core.TokenCredential credential) { throw null; } | ||
| public ClientConnectionOptions(System.Uri endpoint, string apiKey) { throw null; } | ||
| public string ApiKeyCredential { get { throw null; } } | ||
| public Azure.Core.ClientConnectionKind ConnectionKind { get { throw null; } } | ||
| public System.Uri Endpoint { get { throw null; } } | ||
| public string Id { get { throw null; } } | ||
| public Azure.Core.TokenCredential TokenCredential { get { throw null; } } | ||
| } | ||
| public abstract partial class ClientWorkspace | ||
| { | ||
| protected ClientWorkspace() { } | ||
| [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] | ||
| public Azure.Core.ClientCache Subclients { get { throw null; } } | ||
| public abstract Azure.Core.ClientConnectionOptions GetConnectionOptions(System.Type clientType, string instanceId = null); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| page_type: sample | ||
| languages: | ||
| - csharp | ||
| products: | ||
| # Including relevant stubs from https://review.docs.microsoft.com/help/contribute/metadata-taxonomies#product | ||
| - azure | ||
| name: Azure.CloudMachine samples for .NET | ||
| description: Samples for the Azure.CloudMachine client library. | ||
| --- | ||
|
|
||
| # Azure.CloudMachine Samples |
24 changes: 24 additions & 0 deletions
24
sdk/cloudmachine/Azure.CloudMachine/src/Azure.CloudMachine.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <Description>Azure.CloudMachine simplifies getting started with Azure in .NET.</Description> | ||
| <Version>1.0.0-beta.1</Version> | ||
| <TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks> | ||
| <LangVersion>12</LangVersion> | ||
|
|
||
| <!-- Disable warning CS1591: Missing XML comment for publicly visible type or member --> | ||
| <NoWarn>CS1591</NoWarn> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Azure.Core" /> | ||
| <PackageReference Include="Azure.AI.OpenAI" /> | ||
| <PackageReference Include="Azure.Identity" /> | ||
| <PackageReference Include="Azure.Messaging.ServiceBus" /> | ||
| <PackageReference Include="Azure.Messaging.EventGrid" /> | ||
| <PackageReference Include="Azure.Storage.Blobs" /> | ||
| <PackageReference Include="Azure.Security.KeyVault.Secrets" /> | ||
| <PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" VersionOverride="8.0.0" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.