Skip to content

tsp - Add six brown field test cases#1520

Merged
dolauli merged 2 commits into
Azure:mainfrom
dolauli:tsp-brown
Sep 17, 2025
Merged

tsp - Add six brown field test cases#1520
dolauli merged 2 commits into
Azure:mainfrom
dolauli:tsp-brown

Conversation

@dolauli

@dolauli dolauli commented Sep 16, 2025

Copy link
Copy Markdown
Contributor

This pull request introduces new TypeSpec definitions and client customizations for Azure Hardware Security Modules (HSM) management, including models and operations for Cloud HSM Clusters, Dedicated HSMs, and Private Endpoint Connections. It also adds extensive client customization decorators to ensure proper naming and structure across SDKs, with special attention to C# and Python. The changes are organized into new resource models, operation interfaces, and client configuration files.

New Resource Models and Operations:

  • Cloud HSM Cluster Resource:

    • Defines the CloudHsmCluster model with properties, identity, and SKU details.
    • Provides a comprehensive CloudHsmClusters interface with CRUD operations, backup/restore actions, and status checks.
    • Includes operation-specific documentation and validation for parameters and properties.
  • Dedicated HSM Resource:

    • Introduces the DedicatedHsm model and the DedicatedHsms interface for managing dedicated HSM instances.
    • Supports CRUD operations, patching, listing, and network dependency endpoints.
    • Enforces property requirements and includes operation documentation.
  • Private Endpoint Connection Resource:

    • Adds the PrivateEndpointConnection model as a child of CloudHsmCluster.
    • Implements the PrivateEndpointConnections interface for managing private endpoint connections, including listing, creation, and deletion.
    • Sets name constraints and documentation for properties and operations.

Client Customizations and SDK Integration:

  • Client Naming and Flattening:

    • Applies @@clientName, @@clientLocation, and @@flattenProperty decorators to control SDK class and method names, especially for C# and Python.
    • Ensures consistent method and property naming for generated clients.
    • Handles operation grouping and naming for logical SDK structure. [1] [2]
  • SDK-Specific Enhancements:

    • Adds alternate property names, usage hints, and type substitutions for C# SDK generation.
    • Customizes operation names for backup/restore status and private endpoint management.
    • Ensures proper client structure for both management and data-plane operations.

These changes provide a robust foundation for Azure HSM management APIs, supporting both resource modeling and client SDK generation with detailed customization.

References:

  • Cloud HSM Cluster models and operations
  • Dedicated HSM models and operations
  • Private Endpoint Connection models and operations
  • Client customization and SDK integration [1] [2]

@dolauli
dolauli merged commit b24da40 into Azure:main Sep 17, 2025
103 checks passed
@dolauli
dolauli deleted the tsp-brown branch September 17, 2025 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant