Skip to content
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

[Azure Load Testing] Fix Client Generation for Consolidated Admin/Run Clients #31920

Merged
merged 5 commits into from
Dec 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 9 additions & 22 deletions specification/loadtestservice/LoadTestService/client.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import "./main.tsp";
import "@azure-tools/typespec-client-generator-core";

using TypeSpec.Versioning;
using TypeSpec.Rest;
using Azure.ClientGenerator.Core;
using Microsoft.LoadTestService;

Expand Down Expand Up @@ -34,6 +35,11 @@ interface AdministrationOperations {
uploadTestFile is LoadTestAdministration.uploadTestFile;
deleteTestFile is LoadTestAdministration.deleteTestFile;
deleteTest is LoadTestAdministration.deleteTest;

createOrUpdateTestProfile is TestProfileAdministration.createOrUpdateTestProfile;
deleteTestProfile is TestProfileAdministration.deleteTestProfile;
getTestProfile is TestProfileAdministration.getTestProfile;
listTestProfiles is TestProfileAdministration.listTestProfiles;
}

#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
Expand Down Expand Up @@ -63,32 +69,13 @@ interface TestRunOperations {
listTestRuns is LoadTestRun.listTestRuns;
@clientName("stopTestRun", "javascript,python,java,csharp,go")
stop is LoadTestRun.stop;
}

// NOTE: `LoadTestAdministrationClient` will contain all administration operations and `LoadTestRunClient` will contain all run based operations
// A separate interface is made to just segregate the operations by resource type
#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@client({
name: "LoadTestAdministrationClient",
service: Microsoft.LoadTestService,
})
interface TestProfileAdministrationOperations {
createOrUpdateTestProfile is TestProfileAdministration.createOrUpdateTestProfile;
deleteTestProfile is TestProfileAdministration.deleteTestProfile;
getTestProfile is TestProfileAdministration.getTestProfile;
listTestProfiles is TestProfileAdministration.listTestProfiles;
}

#suppress "@azure-tools/typespec-azure-core/use-standard-names" "Existing name"
@client({
name: "LoadTestRunClient",
service: Microsoft.LoadTestService,
})
interface TestProfileRunOperations {
@clientName("BeginTestProfileRun", "python")
createOrUpdateTestProfileRun is TestProfileRunAdministration.createOrUpdateTestProfileRun;
deleteTestProfileRun is TestProfileRunAdministration.deleteTestProfileRun;
getTestProfileRun is TestProfileRunAdministration.getTestProfileRun;
listTestProfileRuns is TestProfileRunAdministration.listTestProfileRuns;
@clientName("stopTestProfileRun", "javascript,python,java,csharp,go")
stop is TestProfileRunAdministration.stop;
@action("stop")
stopTestProfileRun is TestProfileRunAdministration.stop;
}
Loading