-
Notifications
You must be signed in to change notification settings - Fork 541
Migrate Resource Health tools to new tool design #2952
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
Open
alzimmermsft
wants to merge
1
commit into
microsoft:main
Choose a base branch
from
alzimmermsft:MigrateResourceHealthToNewToolDesign
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+76
−211
Open
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions
3
servers/Azure.Mcp.Server/changelog-entries/1782414691894.yaml
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,3 @@ | ||
| changes: | ||
| - section: "Breaking Changes" | ||
| description: "Removed unused parameters from Resource Health tools." |
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
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 was deleted.
Oops, something went wrong.
19 changes: 16 additions & 3 deletions
19
...e.Mcp.Tools.ResourceHealth/src/Options/AvailabilityStatus/AvailabilityStatusGetOptions.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 |
|---|---|---|
| @@ -1,12 +1,25 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Text.Json.Serialization; | ||
| using Azure.Mcp.Core.Options; | ||
| using Microsoft.Mcp.Core.Options; | ||
|
|
||
| namespace Azure.Mcp.Tools.ResourceHealth.Options.AvailabilityStatus; | ||
|
|
||
| public class AvailabilityStatusGetOptions : BaseResourceHealthOptions | ||
| public sealed class AvailabilityStatusGetOptions : ISubscriptionOption | ||
| { | ||
| [JsonPropertyName(ResourceHealthOptionDefinitions.ResourceIdName)] | ||
| [Option(Description = "The Azure resource ID to get health status for (e.g., /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Compute/virtualMachines/{vm}).", Name = "resourceId")] | ||
| public string? ResourceId { get; set; } | ||
|
|
||
| [Option(Description = OptionDescriptions.ResourceGroup)] | ||
| public string? ResourceGroup { get; set; } | ||
|
|
||
| [Option(Description = OptionDescriptions.Subscription)] | ||
| public string? Subscription { get; set; } | ||
|
|
||
| [Option(Description = OptionDescriptions.Tenant)] | ||
| public string? Tenant { get; set; } | ||
|
|
||
| [OptionContainer(Prefix = "retry")] | ||
| public RetryPolicyOptions? RetryPolicy { get; set; } | ||
| } | ||
10 changes: 0 additions & 10 deletions
10
tools/Azure.Mcp.Tools.ResourceHealth/src/Options/BaseResourceHealthOptions.cs
This file was deleted.
Oops, something went wrong.
20 changes: 19 additions & 1 deletion
20
...cp.Tools.ResourceHealth/src/Options/ServiceHealthEvents/ServiceHealthEventsListOptions.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 |
|---|---|---|
| @@ -1,25 +1,43 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using Azure.Mcp.Core.Options; | ||
| using Microsoft.Mcp.Core.Options; | ||
|
|
||
| namespace Azure.Mcp.Tools.ResourceHealth.Options.ServiceHealthEvents; | ||
|
|
||
| public class ServiceHealthEventsListOptions : BaseResourceHealthOptions | ||
| public sealed class ServiceHealthEventsListOptions : ISubscriptionOption | ||
| { | ||
| /// <summary> Filter by event type (ServiceIssue, PlannedMaintenance, HealthAdvisory, Security). </summary> | ||
| [Option(Description = "Filter by event type (ServiceIssue, PlannedMaintenance, HealthAdvisory, Security). If not specified, all event types are included.")] | ||
| public string? EventType { get; set; } | ||
|
|
||
| /// <summary> Filter by status (Active, Resolved). </summary> | ||
| [Option(Description = "Filter by status (Active, Resolved). If not specified, all statuses are included.")] | ||
| public string? Status { get; set; } | ||
|
|
||
| /// <summary> Filter by tracking ID to get a specific service health event. </summary> | ||
| [Option(Description = "Filter by tracking ID to get a specific service health event.")] | ||
| public string? TrackingId { get; set; } | ||
|
|
||
| /// <summary> Additional OData filter expression to apply to the service health events query. </summary> | ||
| [Option(Description = "Additional OData filter expression to apply to the service health events query.")] | ||
| public string? Filter { get; set; } | ||
|
|
||
| /// <summary> Start time for the query in ISO 8601 format (e.g., 2024-01-01T00:00:00Z). </summary> | ||
| [Option(Description = "Start time for the query in ISO 8601 format (e.g., 2024-01-01T00:00:00Z). Events from this time onwards will be included.")] | ||
| public string? QueryStartTime { get; set; } | ||
|
|
||
| /// <summary> End time for the query in ISO 8601 format (e.g., 2024-01-31T23:59:59Z). </summary> | ||
| [Option(Description = "End time for the query in ISO 8601 format (e.g., 2024-01-31T23:59:59Z). Events up to this time will be included.")] | ||
| public string? QueryEndTime { get; set; } | ||
|
|
||
| [Option(Description = OptionDescriptions.Subscription)] | ||
| public string? Subscription { get; set; } | ||
|
|
||
| [Option(Description = OptionDescriptions.Tenant)] | ||
| public string? Tenant { get; set; } | ||
|
|
||
| [OptionContainer(Prefix = "retry")] | ||
| public RetryPolicyOptions? RetryPolicy { get; set; } | ||
|
alzimmermsft marked this conversation as resolved.
|
||
| } | ||
65 changes: 0 additions & 65 deletions
65
tools/Azure.Mcp.Tools.ResourceHealth/src/ResourceHealthOptionDefinitions.cs
This file was deleted.
Oops, something went wrong.
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.
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.