diff --git a/sdk/databoxedge/arm-databoxedge/CHANGELOG.md b/sdk/databoxedge/arm-databoxedge/CHANGELOG.md index b1394f07976d..cb7263c0c2fa 100644 --- a/sdk/databoxedge/arm-databoxedge/CHANGELOG.md +++ b/sdk/databoxedge/arm-databoxedge/CHANGELOG.md @@ -1,15 +1,42 @@ # Release History - -## 2.0.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + +## 2.1.0 (2022-05-31) + +**Features** + + - Added operation group DeviceCapacityCheck + - Added operation group DeviceCapacityInfoOperations + - Added Interface ClusterCapacityViewData + - Added Interface ClusterGpuCapacity + - Added Interface ClusterMemoryCapacity + - Added Interface ClusterStorageViewData + - Added Interface DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams + - Added Interface DeviceCapacityInfoGetDeviceCapacityInfoOptionalParams + - Added Interface DeviceCapacityRequestInfo + - Added Interface HostCapacity + - Added Interface NumaNodeData + - Added Interface VmMemory + - Added Interface VmPlacementRequestResult + - Added Type Alias ClusterWitnessType + - Added Type Alias DeviceCapacityInfo + - Added Type Alias DeviceCapacityInfoGetDeviceCapacityInfoResponse + - Class DataBoxEdgeManagementClient has a new parameter deviceCapacityCheck + - Class DataBoxEdgeManagementClient has a new parameter deviceCapacityInfoOperations + - Type Alias DataBoxEdgeDeviceExtendedInfo has a new parameter systemData + - Type Alias DataBoxEdgeDeviceExtendedInfo has a new parameter clusterWitnessType + - Type Alias DataBoxEdgeDeviceExtendedInfo has a new parameter fileShareWitnessLocation + - Type Alias DataBoxEdgeDeviceExtendedInfo has a new parameter fileShareWitnessUsername + - Type Alias DataBoxEdgeDeviceExtendedInfo has a new parameter cloudWitnessStorageAccountName + - Type Alias DataBoxEdgeDeviceExtendedInfo has a new parameter cloudWitnessContainerName + - Type Alias DataBoxEdgeDeviceExtendedInfo has a new parameter cloudWitnessStorageEndpoint + - Type Alias Order has a new parameter kind + - Type Alias Order has a new parameter orderId + - Added Enum KnownClusterWitnessType + - Enum KnownSkuName has a new value EdgeMRTCP + - Enum KnownSkuName has a new value EP2128GPU1Mx1W + - Enum KnownSkuName has a new value EP2256GPU2Mx1 + - Enum KnownSkuName has a new value EP264Mx1W + ## 2.0.1 (2022-04-15) **features** diff --git a/sdk/databoxedge/arm-databoxedge/_meta.json b/sdk/databoxedge/arm-databoxedge/_meta.json index 17cab4e321fb..c037b36ee3f7 100644 --- a/sdk/databoxedge/arm-databoxedge/_meta.json +++ b/sdk/databoxedge/arm-databoxedge/_meta.json @@ -1,8 +1,8 @@ { - "commit": "e6a2296d02ec6c4b2c32479198bfbcb9b16ea247", - "readme": "specification\\databoxedge\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\databoxedge\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true", + "commit": "32cb9234db88cb71b5a4341c20d1c9bb64874c09", + "readme": "specification/databoxedge/resource-manager/readme.md", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/databoxedge/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220425.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6", - "use": "@autorest/typescript@6.0.0-alpha.19.20220408.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.3.1", + "use": "@autorest/typescript@6.0.0-alpha.19.20220425.1" } \ No newline at end of file diff --git a/sdk/databoxedge/arm-databoxedge/package.json b/sdk/databoxedge/arm-databoxedge/package.json index 6717ad7e252e..8dbdd297f8dc 100644 --- a/sdk/databoxedge/arm-databoxedge/package.json +++ b/sdk/databoxedge/arm-databoxedge/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for DataBoxEdgeManagementClient.", - "version": "2.0.2", + "version": "2.1.0", "engines": { "node": ">=12.0.0" }, @@ -40,9 +40,11 @@ "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^1.0.0", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2" + "cross-env": "^7.0.2", + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/databoxedge/arm-databoxedge", "repository": { @@ -93,7 +95,7 @@ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", "integration-test:browser": "echo skipped", "docs": "echo skipped" }, @@ -106,13 +108,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-databoxedge?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/databoxedge/arm-databoxedge/review/arm-databoxedge.api.md b/sdk/databoxedge/arm-databoxedge/review/arm-databoxedge.api.md index b15014618d64..e56d09b08d3a 100644 --- a/sdk/databoxedge/arm-databoxedge/review/arm-databoxedge.api.md +++ b/sdk/databoxedge/arm-databoxedge/review/arm-databoxedge.api.md @@ -303,6 +303,46 @@ export interface CloudErrorBody { message?: string; } +// @public +export interface ClusterCapacityViewData { + fqdn?: string; + gpuCapacity?: ClusterGpuCapacity; + lastRefreshedTime?: Date; + memoryCapacity?: ClusterMemoryCapacity; + totalProvisionedNonHpnCores?: number; +} + +// @public +export interface ClusterGpuCapacity { + gpuFreeUnitsCount?: number; + gpuReservedForFailoverUnitsCount?: number; + gpuTotalUnitsCount?: number; + gpuType?: string; + gpuUsedUnitsCount?: number; +} + +// @public +export interface ClusterMemoryCapacity { + clusterFailoverMemoryMb?: number; + clusterFragmentationMemoryMb?: number; + clusterFreeMemoryMb?: number; + clusterHypervReserveMemoryMb?: number; + clusterInfraVmMemoryMb?: number; + clusterMemoryUsedByVmsMb?: number; + clusterNonFailoverVmMb?: number; + clusterTotalMemoryMb?: number; + clusterUsedMemoryMb?: number; +} + +// @public +export interface ClusterStorageViewData { + clusterFreeStorageMb?: number; + clusterTotalStorageMb?: number; +} + +// @public +export type ClusterWitnessType = string; + // @public export interface CniConfig { readonly podSubnet?: string; @@ -409,10 +449,10 @@ export type DataBoxEdgeDevice = ARMBaseModel & { sku?: Sku; etag?: string; identity?: ResourceIdentity; - kind?: DataBoxEdgeDeviceKind; + readonly kind?: DataBoxEdgeDeviceKind; readonly systemData?: SystemData; readonly systemDataPropertiesSystemData?: SystemData; - dataBoxEdgeDeviceStatus?: DataBoxEdgeDeviceStatus; + readonly dataBoxEdgeDeviceStatus?: DataBoxEdgeDeviceStatus; readonly serialNumber?: string; readonly description?: string; readonly modelDescription?: string; @@ -433,6 +473,7 @@ export type DataBoxEdgeDevice = ARMBaseModel & { // @public export type DataBoxEdgeDeviceExtendedInfo = ARMBaseModel & { + readonly systemData?: SystemData; encryptionKeyThumbprint?: string; encryptionKey?: string; readonly resourceKey?: string; @@ -444,6 +485,12 @@ export type DataBoxEdgeDeviceExtendedInfo = ARMBaseModel & { readonly deviceSecrets?: { [propertyName: string]: Secret; }; + readonly clusterWitnessType?: ClusterWitnessType; + readonly fileShareWitnessLocation?: string; + readonly fileShareWitnessUsername?: string; + readonly cloudWitnessStorageAccountName?: string; + readonly cloudWitnessContainerName?: string; + readonly cloudWitnessStorageEndpoint?: string; }; // @public @@ -494,6 +541,10 @@ export class DataBoxEdgeManagementClient extends coreClient.ServiceClient { // (undocumented) containers: Containers; // (undocumented) + deviceCapacityCheck: DeviceCapacityCheck; + // (undocumented) + deviceCapacityInfoOperations: DeviceCapacityInfoOperations; + // (undocumented) devices: Devices; // (undocumented) diagnosticSettings: DiagnosticSettings; @@ -584,6 +635,48 @@ export interface DCAccessCode { authCode?: string; } +// @public +export interface DeviceCapacityCheck { + beginCheckResourceCreationFeasibility(resourceGroupName: string, deviceName: string, deviceCapacityRequestInfo: DeviceCapacityRequestInfo, options?: DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams): Promise, void>>; + beginCheckResourceCreationFeasibilityAndWait(resourceGroupName: string, deviceName: string, deviceCapacityRequestInfo: DeviceCapacityRequestInfo, options?: DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams): Promise; +} + +// @public +export interface DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams extends coreClient.OperationOptions { + capacityName?: string; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DeviceCapacityInfo = ARMBaseModel & { + readonly systemData?: SystemData; + timeStamp?: Date; + clusterStorageCapacityInfo?: ClusterStorageViewData; + clusterComputeCapacityInfo?: ClusterCapacityViewData; + nodeCapacityInfos?: { + [propertyName: string]: HostCapacity; + }; +}; + +// @public +export interface DeviceCapacityInfoGetDeviceCapacityInfoOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DeviceCapacityInfoGetDeviceCapacityInfoResponse = DeviceCapacityInfo; + +// @public +export interface DeviceCapacityInfoOperations { + getDeviceCapacityInfo(resourceGroupName: string, deviceName: string, options?: DeviceCapacityInfoGetDeviceCapacityInfoOptionalParams): Promise; +} + +// @public +export interface DeviceCapacityRequestInfo { + vmPlacementQuery: string[][]; + vmPlacementResults?: VmPlacementRequestResult[]; +} + // @public export interface Devices { beginCreateOrUpdateSecuritySettings(deviceName: string, resourceGroupName: string, securitySettings: SecuritySettings, options?: DevicesCreateOrUpdateSecuritySettingsOptionalParams): Promise, void>>; @@ -859,6 +952,18 @@ export interface GenerateCertResponse { publicKey?: string; } +// @public +export interface HostCapacity { + availableGpuCount?: number; + effectiveAvailableMemoryMbOnHost?: number; + gpuType?: string; + hostName?: string; + numaNodesData?: NumaNodeData[]; + vmUsedMemory?: { + [propertyName: string]: VmMemory; + }; +} + // @public export type HostPlatformType = string; @@ -1065,6 +1170,16 @@ export enum KnownClientPermissionType { ReadWrite = "ReadWrite" } +// @public +export enum KnownClusterWitnessType { + // (undocumented) + Cloud = "Cloud", + // (undocumented) + FileShare = "FileShare", + // (undocumented) + None = "None" +} + // @public export enum KnownContainerStatus { // (undocumented) @@ -1584,6 +1699,8 @@ export enum KnownSkuName { // (undocumented) EdgeMRMini = "EdgeMR_Mini", // (undocumented) + EdgeMRTCP = "EdgeMR_TCP", + // (undocumented) EdgePBase = "EdgeP_Base", // (undocumented) EdgePHigh = "EdgeP_High", @@ -1594,10 +1711,16 @@ export enum KnownSkuName { // (undocumented) EP21281T4Mx1W = "EP2_128_1T4_Mx1_W", // (undocumented) + EP2128GPU1Mx1W = "EP2_128_GPU1_Mx1_W", + // (undocumented) EP22562T4W = "EP2_256_2T4_W", // (undocumented) + EP2256GPU2Mx1 = "EP2_256_GPU2_Mx1", + // (undocumented) EP2641VPUW = "EP2_64_1VPU_W", // (undocumented) + EP264Mx1W = "EP2_64_Mx1_W", + // (undocumented) Gateway = "Gateway", // (undocumented) GPU = "GPU", @@ -2102,6 +2225,17 @@ export type NodesListByDataBoxEdgeDeviceResponse = NodeList_2; // @public export type NodeStatus = string; +// @public +export interface NumaNodeData { + effectiveAvailableMemoryInMb?: number; + freeVCpuIndexesForHpn?: number[]; + logicalCoreCountPerCore?: number; + numaNodeIndex?: number; + totalMemoryInMb?: number; + vCpuIndexesForHpn?: number[]; + vCpuIndexesForRoot?: number[]; +} + // @public export interface Operation { display?: OperationDisplay; @@ -2158,7 +2292,9 @@ export type OperationsStatusGetResponse = Job; // @public export type Order = ARMBaseModel & { + readonly kind?: string; readonly systemData?: SystemData; + readonly orderId?: string; contactInformation?: ContactDetails; shippingAddress?: Address; readonly currentStatus?: OrderStatus; @@ -2300,12 +2436,6 @@ export interface ResourceMoveDetails { // @public export type ResourceMoveStatus = string; -// @public -export interface ResourceTypeSku { - readonly resourceType?: string; - readonly skus?: SkuInformation[]; -} - // @public export type Role = ARMBaseModel & { kind: RoleTypes; @@ -2509,25 +2639,6 @@ export interface SkuCost { readonly quantity?: number; } -// @public -export interface SkuInformation { - readonly costs?: SkuCost[]; - readonly family?: string; - readonly kind?: string; - readonly locationInfo?: SkuLocationInfo[]; - readonly locations?: string[]; - readonly name?: string; - readonly requiredFeatures?: string[]; - readonly requiredQuotaIds?: string[]; - readonly tier?: string; -} - -// @public -export interface SkuInformationList { - readonly nextLink?: string; - readonly value?: ResourceTypeSku[]; -} - // @public export interface SkuLocationInfo { readonly location?: string; @@ -2732,8 +2843,8 @@ export interface TrackingInfo { // @public export type Trigger = ARMBaseModel & { - readonly systemData?: SystemData; kind: TriggerEventType; + readonly systemData?: SystemData; }; // @public @@ -2964,6 +3075,20 @@ export type UsersListByDataBoxEdgeDeviceResponse = UserList; // @public export type UserType = string; +// @public +export interface VmMemory { + currentMemoryUsageMB?: number; + startupMemoryMB?: number; +} + +// @public +export interface VmPlacementRequestResult { + isFeasible?: boolean; + message?: string; + messageCode?: string; + vmSize?: string[]; +} + // (No @packageDocumentation comment for this package) ``` diff --git a/sdk/databoxedge/arm-databoxedge/src/dataBoxEdgeManagementClient.ts b/sdk/databoxedge/arm-databoxedge/src/dataBoxEdgeManagementClient.ts index 177769be846e..4cbd5f2d4ae1 100644 --- a/sdk/databoxedge/arm-databoxedge/src/dataBoxEdgeManagementClient.ts +++ b/sdk/databoxedge/arm-databoxedge/src/dataBoxEdgeManagementClient.ts @@ -8,6 +8,11 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { OperationsImpl, @@ -15,6 +20,8 @@ import { DevicesImpl, AlertsImpl, BandwidthSchedulesImpl, + DeviceCapacityCheckImpl, + DeviceCapacityInfoOperationsImpl, DiagnosticSettingsImpl, JobsImpl, NodesImpl, @@ -37,6 +44,8 @@ import { Devices, Alerts, BandwidthSchedules, + DeviceCapacityCheck, + DeviceCapacityInfoOperations, DiagnosticSettings, Jobs, Nodes, @@ -87,7 +96,7 @@ export class DataBoxEdgeManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-databoxedge/2.0.2`; + const packageDetails = `azsdk-js-arm-databoxedge/2.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -134,12 +143,16 @@ export class DataBoxEdgeManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-06-01"; + this.apiVersion = options.apiVersion || "2022-03-01"; this.operations = new OperationsImpl(this); this.availableSkus = new AvailableSkusImpl(this); this.devices = new DevicesImpl(this); this.alerts = new AlertsImpl(this); this.bandwidthSchedules = new BandwidthSchedulesImpl(this); + this.deviceCapacityCheck = new DeviceCapacityCheckImpl(this); + this.deviceCapacityInfoOperations = new DeviceCapacityInfoOperationsImpl( + this + ); this.diagnosticSettings = new DiagnosticSettingsImpl(this); this.jobs = new JobsImpl(this); this.nodes = new NodesImpl(this); @@ -155,6 +168,35 @@ export class DataBoxEdgeManagementClient extends coreClient.ServiceClient { this.triggers = new TriggersImpl(this); this.supportPackages = new SupportPackagesImpl(this); this.users = new UsersImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return item.replace(/(?<==).*$/, apiVersion); + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); } operations: Operations; @@ -162,6 +204,8 @@ export class DataBoxEdgeManagementClient extends coreClient.ServiceClient { devices: Devices; alerts: Alerts; bandwidthSchedules: BandwidthSchedules; + deviceCapacityCheck: DeviceCapacityCheck; + deviceCapacityInfoOperations: DeviceCapacityInfoOperations; diagnosticSettings: DiagnosticSettings; jobs: Jobs; nodes: Nodes; diff --git a/sdk/databoxedge/arm-databoxedge/src/models/index.ts b/sdk/databoxedge/arm-databoxedge/src/models/index.ts index 4ade0383c344..4b84d507d562 100644 --- a/sdk/databoxedge/arm-databoxedge/src/models/index.ts +++ b/sdk/databoxedge/arm-databoxedge/src/models/index.ts @@ -307,7 +307,7 @@ export interface SystemData { lastModifiedBy?: string; /** The type of identity that last modified the resource. */ lastModifiedByType?: CreatedByType; - /** The type of identity that last modified the resource. */ + /** The timestamp of resource last modification (UTC) */ lastModifiedAt?: Date; } @@ -440,6 +440,126 @@ export interface BandwidthSchedulesList { readonly nextLink?: string; } +/** Object for Capturing DeviceCapacityRequestInfo */ +export interface DeviceCapacityRequestInfo { + /** Array containing the sizes of the VMs for checking if its feasible to create them on the appliance. */ + vmPlacementQuery: string[][]; + /** Array of the VMs of the sizes in VmSizes can be provisioned on the appliance. */ + vmPlacementResults?: VmPlacementRequestResult[]; +} + +/** List of VM sizes being checked for creation on appliance along with corresponding result. */ +export interface VmPlacementRequestResult { + /** List of VM sizes being checked. */ + vmSize?: string[]; + /** Boolean value indicating if the VM(s) in VmSize can be created. */ + isFeasible?: boolean; + /** MessageCode indicating reason for success or failure. */ + messageCode?: string; + /** Localized message to be displayed to the user to explain the check result. */ + message?: string; +} + +/** Cluster Storage Data. */ +export interface ClusterStorageViewData { + /** Total storage on the cluster in MB. */ + clusterTotalStorageMb?: number; + /** The available or free storage on the cluster in MB. */ + clusterFreeStorageMb?: number; +} + +/** Cluster Compute Data. */ +export interface ClusterCapacityViewData { + /** The FQDN of the cluster. */ + fqdn?: string; + /** The cluster's GPU capacity. */ + gpuCapacity?: ClusterGpuCapacity; + /** The cluster's memory capacity. */ + memoryCapacity?: ClusterMemoryCapacity; + /** The last time at which the ClusterCapacityViewData was set. */ + lastRefreshedTime?: Date; + /** The total # of vCPUs provisioned by non-HPN VM per appliance. */ + totalProvisionedNonHpnCores?: number; +} + +/** Cluster GPU Data. */ +export interface ClusterGpuCapacity { + /** The cluster GPU Type. */ + gpuType?: string; + /** The used GPU units count in the cluster. */ + gpuUsedUnitsCount?: number; + /** The free GPU units count in the cluster. */ + gpuFreeUnitsCount?: number; + /** The GPU units count reserved for failover in the cluster. */ + gpuReservedForFailoverUnitsCount?: number; + /** The total GPU units count in the cluster. */ + gpuTotalUnitsCount?: number; +} + +/** NodeCapacityInfo defines the required information to determine the placement of a VM. */ +export interface ClusterMemoryCapacity { + /** The free memory in the cluster in MB. */ + clusterFreeMemoryMb?: number; + /** The used memory in the cluster in MB. */ + clusterUsedMemoryMb?: number; + /** The failover memory in the cluster in MB. */ + clusterFailoverMemoryMb?: number; + /** The fragmentation memory in the cluster in MB. */ + clusterFragmentationMemoryMb?: number; + /** The memory reserved for Hyper-V in the cluster in MB. */ + clusterHypervReserveMemoryMb?: number; + /** The memory of the Infra VM in the cluster in MB. */ + clusterInfraVmMemoryMb?: number; + /** The total memory in the cluster in MB. */ + clusterTotalMemoryMb?: number; + /** The non-failover memory in the cluster in MB. */ + clusterNonFailoverVmMb?: number; + /** The memory used by VMs in the cluster in MB. */ + clusterMemoryUsedByVmsMb?: number; +} + +/** Host Capacity Data. */ +export interface HostCapacity { + /** The name of the host. */ + hostName?: string; + /** The available memory on the host accounting for VM placement size and any host VM reservations. */ + effectiveAvailableMemoryMbOnHost?: number; + /** The available amount of GPUs on the host to use after accounting for GPUS used by reservations on the host. */ + availableGpuCount?: number; + /** The VM used memory per VmId. */ + vmUsedMemory?: { [propertyName: string]: VmMemory }; + /** The GPU type of the VM. */ + gpuType?: string; + /** The numa nodes information for Hpn VMs. */ + numaNodesData?: NumaNodeData[]; +} + +/** VmMemory Data. */ +export interface VmMemory { + /** The total amount of RAM in the virtual machine, as seen by the guest operating system. For a virtual machine with dynamic memory enabled, this represents the initial memory available at startup. */ + startupMemoryMB?: number; + /** The current memory used by the virtual machine. */ + currentMemoryUsageMB?: number; +} + +/** NUMA node data. */ +export interface NumaNodeData { + /** The NUMA node index. */ + numaNodeIndex?: number; + /** The total memory on the NUMA node. */ + totalMemoryInMb?: number; + /** The logical cores per core count. */ + logicalCoreCountPerCore?: number; + /** The effective available memory on the NUMA node in MB. */ + effectiveAvailableMemoryInMb?: number; + /** The free VCPU indices for the Hpn VMs. */ + freeVCpuIndexesForHpn?: number[]; + /** The VCPU indices for Hpn VMs */ + vCpuIndexesForHpn?: number[]; + /** The VCPU indices for the root. */ + vCpuIndexesForRoot?: number[]; +} + /** RemoteApplicationType for which remote support settings is being modified */ export interface RemoteSupportSettings { /** Remote application type */ @@ -1452,83 +1572,6 @@ export interface PeriodicTimerSourceInfo { topic?: string; } -/** Resource type Sku object */ -export interface ResourceTypeSku { - /** - * The resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceType?: string; - /** - * The skus. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly skus?: SkuInformation[]; -} - -/** Sku information */ -export interface SkuInformation { - /** - * The sku name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The sku tier. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tier?: string; - /** - * The sku kind. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kind?: string; - /** - * The Sku family. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly family?: string; - /** - * The pricing info of the Sku. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly costs?: SkuCost[]; - /** - * The locations where Sku is available. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly locations?: string[]; - /** - * The locations where Sku is available with zones and sites info - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly locationInfo?: SkuLocationInfo[]; - /** - * The required quotaIds for the sku to be available. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly requiredQuotaIds?: string[]; - /** - * The required features for the sku to be available. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly requiredFeatures?: string[]; -} - -/** List of SKU Information objects */ -export interface SkuInformationList { - /** - * List of ResourceTypeSku objects - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ResourceTypeSku[]; - /** - * Links to the next set of results - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - /** The Data Box Edge/Gateway device. */ export type DataBoxEdgeDevice = ARMBaseModel & { /** The location of the device. This is a supported and registered Azure geographical region (for example, West US, East US, or Southeast Asia). The geographical region of a device cannot be changed once it is created, but if an identical geographical region is specified on update, the request will succeed. */ @@ -1541,8 +1584,11 @@ export type DataBoxEdgeDevice = ARMBaseModel & { etag?: string; /** Msi identity of the resource */ identity?: ResourceIdentity; - /** The kind of the device. */ - kind?: DataBoxEdgeDeviceKind; + /** + * The kind of the device. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly kind?: DataBoxEdgeDeviceKind; /** * DataBoxEdge Resource * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1553,8 +1599,11 @@ export type DataBoxEdgeDevice = ARMBaseModel & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemDataPropertiesSystemData?: SystemData; - /** The status of the Data Box Edge/Gateway device. */ - dataBoxEdgeDeviceStatus?: DataBoxEdgeDeviceStatus; + /** + * The status of the Data Box Edge/Gateway device. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly dataBoxEdgeDeviceStatus?: DataBoxEdgeDeviceStatus; /** * The Serial Number of Data Box Edge/Gateway device. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1637,7 +1686,7 @@ export type DataBoxEdgeDevice = ARMBaseModel & { /** Alert on the data box edge/gateway device. */ export type Alert = ARMBaseModel & { /** - * Alert generated in the resource + * Metadata pertaining to creation and last modification of Alert * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1681,7 +1730,7 @@ export type Alert = ARMBaseModel & { /** The bandwidth schedule details. */ export type BandwidthSchedule = ARMBaseModel & { /** - * Bandwidth object related to ASE resource + * Metadata pertaining to creation and last modification of BandwidthSchedule * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1695,10 +1744,27 @@ export type BandwidthSchedule = ARMBaseModel & { days: DayOfWeek[]; }; +/** Object for Capturing DeviceCapacityInfo */ +export type DeviceCapacityInfo = ARMBaseModel & { + /** + * Metadata pertaining to device capacity info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** Timestamp of request in UTC */ + timeStamp?: Date; + /** Cluster capacity data for storage resources (CSV). */ + clusterStorageCapacityInfo?: ClusterStorageViewData; + /** Cluster capacity data for compute resources (Memory and GPU). */ + clusterComputeCapacityInfo?: ClusterCapacityViewData; + /** The dictionary of individual node names and node capacities in the cluster. */ + nodeCapacityInfos?: { [propertyName: string]: HostCapacity }; +}; + /** The diagnostic proactive log collection settings of a device. */ export type DiagnosticProactiveLogCollectionSettings = ARMBaseModel & { /** - * DiagnosticProactiveLogCollectionSettings + * Metadata pertaining to creation and last modification of DiagnosticProactiveLogCollectionSettings * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1709,7 +1775,7 @@ export type DiagnosticProactiveLogCollectionSettings = ARMBaseModel & { /** The remote support settings of a device. */ export type DiagnosticRemoteSupportSettings = ARMBaseModel & { /** - * DiagnosticRemoteSupportSettings + * Represents resource creation and updation time * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1719,6 +1785,11 @@ export type DiagnosticRemoteSupportSettings = ARMBaseModel & { /** The extended Info of the Data Box Edge/Gateway device. */ export type DataBoxEdgeDeviceExtendedInfo = ARMBaseModel & { + /** + * Metadata pertaining to creation and last modification of DataBoxEdgeDevice + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; /** The digital signature of encrypted certificate. */ encryptionKeyThumbprint?: string; /** The public part of the encryption certificate. Client uses this to encrypt any secret. */ @@ -1743,12 +1814,42 @@ export type DataBoxEdgeDeviceExtendedInfo = ARMBaseModel & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly deviceSecrets?: { [propertyName: string]: Secret }; + /** + * Cluster Witness Type + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly clusterWitnessType?: ClusterWitnessType; + /** + * The witness location of file share. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fileShareWitnessLocation?: string; + /** + * The username of file share. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fileShareWitnessUsername?: string; + /** + * The Cloud Witness Storage account name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly cloudWitnessStorageAccountName?: string; + /** + * The Container for cloud witness in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly cloudWitnessContainerName?: string; + /** + * The Azure service endpoint of the cloud witness storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly cloudWitnessStorageEndpoint?: string; }; /** The network settings of a device. */ export type NetworkSettings = ARMBaseModel & { /** - * NetworkSettings on ASE device + * Metadata pertaining to creation and last modification of NetworkSettings * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1805,10 +1906,20 @@ export type Node = ARMBaseModel & { /** The order details. */ export type Order = ARMBaseModel & { /** - * Order configured on ASE resource + * It specify the order api version. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly kind?: string; + /** + * Metadata pertaining to creation and last modification of Order * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; + /** + * It specify the order resource id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly orderId?: string; /** The contact details. */ contactInformation?: ContactDetails; /** The shipping address. */ @@ -1847,7 +1958,7 @@ export type Role = ARMBaseModel & { /** Role type. */ kind: RoleTypes; /** - * Role configured on ASE resource + * Metadata pertaining to creation and last modification of Role * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1858,7 +1969,7 @@ export type Addon = ARMBaseModel & { /** Addon type. */ kind: AddonType; /** - * Addon type + * Metadata pertaining to creation and last modification of Addon * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1867,7 +1978,7 @@ export type Addon = ARMBaseModel & { /** The metric setting details for the role */ export type MonitoringMetricConfiguration = ARMBaseModel & { /** - * MonitoringConfiguration on ASE device + * Metadata pertaining to creation and last modification of MonitoringConfiguration * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1884,7 +1995,7 @@ export type SecuritySettings = ARMBaseModel & { /** Represents a share on the Data Box Edge/Gateway device. */ export type Share = ARMBaseModel & { /** - * Share on ASE device + * Metadata pertaining to creation and last modification of Share * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1916,7 +2027,7 @@ export type Share = ARMBaseModel & { /** The storage account credential. */ export type StorageAccountCredential = ARMBaseModel & { /** - * StorageAccountCredential object + * Metadata pertaining to creation and last modification of StorageAccountCredential * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1941,7 +2052,7 @@ export type StorageAccountCredential = ARMBaseModel & { /** Represents a Storage Account on the Data Box Edge/Gateway device. */ export type StorageAccount = ARMBaseModel & { /** - * StorageAccount object on ASE device + * Metadata pertaining to creation and last modification of StorageAccount * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1968,7 +2079,7 @@ export type StorageAccount = ARMBaseModel & { /** Represents a container on the Data Box Edge/Gateway device. */ export type Container = ARMBaseModel & { /** - * Container in DataBoxEdge Resource + * Metadata pertaining to creation and last modification of Container * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1993,20 +2104,20 @@ export type Container = ARMBaseModel & { /** Trigger details. */ export type Trigger = ARMBaseModel & { + /** Trigger Kind. */ + kind: TriggerEventType; /** - * Trigger in DataBoxEdge Resource + * Metadata pertaining to creation and last modification of Trigger * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; - /** Trigger Kind. */ - kind: TriggerEventType; }; /** The request object for trigger support package. */ export type TriggerSupportPackageRequest = ARMBaseModel & { - /** Start of the timespan of the log collection */ + /** MinimumTimeStamp from where logs need to be collected */ minimumTimeStamp?: Date; - /** MaximumTimeStamp until where logs need to be collected */ + /** Start of the timespan of the log collection */ maximumTimeStamp?: Date; /** * Type of files, which need to be included in the logs @@ -2019,7 +2130,7 @@ export type TriggerSupportPackageRequest = ARMBaseModel & { /** Details about ongoing updates and availability of updates on the device. */ export type UpdateSummary = ARMBaseModel & { /** - * UpdateSummary Result + * Metadata pertaining to creation and last modification of UpdateSummary * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -2135,7 +2246,7 @@ export type UpdateSummary = ARMBaseModel & { /** Represents a user who has access to one or more shares on the Data Box Edge/Gateway device. */ export type User = ARMBaseModel & { /** - * User in DataBoxEdge Resource + * Metadata pertaining to creation and last modification of User * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -2150,7 +2261,11 @@ export type User = ARMBaseModel & { userType: UserType; }; -/** CloudEdgeManagementRole role. */ +/** + * The preview of Virtual Machine Cloud Management from the Azure supports deploying and managing VMs on your Azure Stack Edge device from Azure Portal. + * For more information, refer to: https://docs.microsoft.com/en-us/azure/databox-online/azure-stack-edge-gpu-virtual-machine-overview + * By using this feature, you agree to the preview legal terms. See the https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms/ for additional details. + */ export type CloudEdgeManagementRole = Role & { /** * Local Edge Management Status @@ -2189,7 +2304,16 @@ export type IoTRole = Role & { roleStatus?: RoleStatus; }; -/** Kubernetes role. */ +/** + * The limited preview of Kubernetes Cluster Management from the Azure supports: + * 1. Using a simple turn-key option in Azure Portal, deploy a Kubernetes cluster on your Azure Stack Edge device. + * 2. Configure Kubernetes cluster running on your device with Arc enabled Kubernetes with a click of a button in the Azure Portal. + * Azure Arc enables organizations to view, manage, and govern their on-premises Kubernetes clusters using the Azure Portal, command line tools, and APIs. + * 3. Easily configure Persistent Volumes using SMB and NFS shares for storing container data. + * For more information, refer to the document here: https://databoxupdatepackages.blob.core.windows.net/documentation/Microsoft-Azure-Stack-Edge-K8-Cloud-Management-20210323.pdf + * Or Demo: https://databoxupdatepackages.blob.core.windows.net/documentation/Microsoft-Azure-Stack-Edge-K8S-Cloud-Management-20210323.mp4 + * By using this feature, you agree to the preview legal terms. See the https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms/ + */ export type KubernetesRole = Role & { /** Host OS supported by the Kubernetes role. */ hostPlatform?: PlatformType; @@ -2427,7 +2551,11 @@ export enum KnownSkuName { RCASmall = "RCA_Small", RCALarge = "RCA_Large", RDC = "RDC", - Management = "Management" + Management = "Management", + EP264Mx1W = "EP2_64_Mx1_W", + EP2128GPU1Mx1W = "EP2_128_GPU1_Mx1_W", + EP2256GPU2Mx1 = "EP2_256_GPU2_Mx1", + EdgeMRTCP = "EdgeMR_TCP" } /** @@ -2459,7 +2587,11 @@ export enum KnownSkuName { * **RCA_Small** \ * **RCA_Large** \ * **RDC** \ - * **Management** + * **Management** \ + * **EP2_64_Mx1_W** \ + * **EP2_128_GPU1_Mx1_W** \ + * **EP2_256_GPU2_Mx1** \ + * **EdgeMR_TCP** */ export type SkuName = string; @@ -2865,6 +2997,24 @@ export enum KnownEncryptionAlgorithm { */ export type EncryptionAlgorithm = string; +/** Known values of {@link ClusterWitnessType} that the service accepts. */ +export enum KnownClusterWitnessType { + None = "None", + Cloud = "Cloud", + FileShare = "FileShare" +} + +/** + * Defines values for ClusterWitnessType. \ + * {@link KnownClusterWitnessType} can be used interchangeably with ClusterWitnessType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **Cloud** \ + * **FileShare** + */ +export type ClusterWitnessType = string; + /** Known values of {@link JobStatus} that the service accepts. */ export enum KnownJobStatus { Invalid = "Invalid", @@ -3872,6 +4022,24 @@ export interface BandwidthSchedulesListByDataBoxEdgeDeviceNextOptionalParams /** Contains response data for the listByDataBoxEdgeDeviceNext operation. */ export type BandwidthSchedulesListByDataBoxEdgeDeviceNextResponse = BandwidthSchedulesList; +/** Optional parameters. */ +export interface DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams + extends coreClient.OperationOptions { + /** The capacity name. */ + capacityName?: string; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface DeviceCapacityInfoGetDeviceCapacityInfoOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getDeviceCapacityInfo operation. */ +export type DeviceCapacityInfoGetDeviceCapacityInfoResponse = DeviceCapacityInfo; + /** Optional parameters. */ export interface DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/databoxedge/arm-databoxedge/src/models/mappers.ts b/sdk/databoxedge/arm-databoxedge/src/models/mappers.ts index 712260119706..99401456d8c5 100644 --- a/sdk/databoxedge/arm-databoxedge/src/models/mappers.ts +++ b/sdk/databoxedge/arm-databoxedge/src/models/mappers.ts @@ -1018,6 +1018,385 @@ export const BandwidthSchedulesList: coreClient.CompositeMapper = { } }; +export const DeviceCapacityRequestInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DeviceCapacityRequestInfo", + modelProperties: { + vmPlacementQuery: { + serializedName: "properties.vmPlacementQuery", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + }, + vmPlacementResults: { + serializedName: "properties.vmPlacementResults", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VmPlacementRequestResult" + } + } + } + } + } + } +}; + +export const VmPlacementRequestResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VmPlacementRequestResult", + modelProperties: { + vmSize: { + serializedName: "vmSize", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + isFeasible: { + serializedName: "isFeasible", + type: { + name: "Boolean" + } + }, + messageCode: { + serializedName: "messageCode", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterStorageViewData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterStorageViewData", + modelProperties: { + clusterTotalStorageMb: { + serializedName: "clusterTotalStorageMb", + type: { + name: "Number" + } + }, + clusterFreeStorageMb: { + serializedName: "clusterFreeStorageMb", + type: { + name: "Number" + } + } + } + } +}; + +export const ClusterCapacityViewData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterCapacityViewData", + modelProperties: { + fqdn: { + serializedName: "fqdn", + type: { + name: "String" + } + }, + gpuCapacity: { + serializedName: "gpuCapacity", + type: { + name: "Composite", + className: "ClusterGpuCapacity" + } + }, + memoryCapacity: { + serializedName: "memoryCapacity", + type: { + name: "Composite", + className: "ClusterMemoryCapacity" + } + }, + lastRefreshedTime: { + serializedName: "lastRefreshedTime", + type: { + name: "DateTime" + } + }, + totalProvisionedNonHpnCores: { + serializedName: "totalProvisionedNonHpnCores", + type: { + name: "Number" + } + } + } + } +}; + +export const ClusterGpuCapacity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterGpuCapacity", + modelProperties: { + gpuType: { + serializedName: "gpuType", + type: { + name: "String" + } + }, + gpuUsedUnitsCount: { + serializedName: "gpuUsedUnitsCount", + type: { + name: "Number" + } + }, + gpuFreeUnitsCount: { + serializedName: "gpuFreeUnitsCount", + type: { + name: "Number" + } + }, + gpuReservedForFailoverUnitsCount: { + serializedName: "gpuReservedForFailoverUnitsCount", + type: { + name: "Number" + } + }, + gpuTotalUnitsCount: { + serializedName: "gpuTotalUnitsCount", + type: { + name: "Number" + } + } + } + } +}; + +export const ClusterMemoryCapacity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterMemoryCapacity", + modelProperties: { + clusterFreeMemoryMb: { + serializedName: "clusterFreeMemoryMb", + type: { + name: "Number" + } + }, + clusterUsedMemoryMb: { + serializedName: "clusterUsedMemoryMb", + type: { + name: "Number" + } + }, + clusterFailoverMemoryMb: { + serializedName: "clusterFailoverMemoryMb", + type: { + name: "Number" + } + }, + clusterFragmentationMemoryMb: { + serializedName: "clusterFragmentationMemoryMb", + type: { + name: "Number" + } + }, + clusterHypervReserveMemoryMb: { + serializedName: "clusterHypervReserveMemoryMb", + type: { + name: "Number" + } + }, + clusterInfraVmMemoryMb: { + serializedName: "clusterInfraVmMemoryMb", + type: { + name: "Number" + } + }, + clusterTotalMemoryMb: { + serializedName: "clusterTotalMemoryMb", + type: { + name: "Number" + } + }, + clusterNonFailoverVmMb: { + serializedName: "clusterNonFailoverVmMb", + type: { + name: "Number" + } + }, + clusterMemoryUsedByVmsMb: { + serializedName: "clusterMemoryUsedByVmsMb", + type: { + name: "Number" + } + } + } + } +}; + +export const HostCapacity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HostCapacity", + modelProperties: { + hostName: { + serializedName: "hostName", + type: { + name: "String" + } + }, + effectiveAvailableMemoryMbOnHost: { + serializedName: "effectiveAvailableMemoryMbOnHost", + type: { + name: "Number" + } + }, + availableGpuCount: { + serializedName: "availableGpuCount", + type: { + name: "Number" + } + }, + vmUsedMemory: { + serializedName: "vmUsedMemory", + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "VmMemory" } } + } + }, + gpuType: { + serializedName: "gpuType", + type: { + name: "String" + } + }, + numaNodesData: { + serializedName: "numaNodesData", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NumaNodeData" + } + } + } + } + } + } +}; + +export const VmMemory: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VmMemory", + modelProperties: { + startupMemoryMB: { + serializedName: "startupMemoryMB", + type: { + name: "Number" + } + }, + currentMemoryUsageMB: { + serializedName: "currentMemoryUsageMB", + type: { + name: "Number" + } + } + } + } +}; + +export const NumaNodeData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NumaNodeData", + modelProperties: { + numaNodeIndex: { + serializedName: "numaNodeIndex", + type: { + name: "Number" + } + }, + totalMemoryInMb: { + serializedName: "totalMemoryInMb", + type: { + name: "Number" + } + }, + logicalCoreCountPerCore: { + serializedName: "logicalCoreCountPerCore", + type: { + name: "Number" + } + }, + effectiveAvailableMemoryInMb: { + serializedName: "effectiveAvailableMemoryInMb", + type: { + name: "Number" + } + }, + freeVCpuIndexesForHpn: { + serializedName: "freeVCpuIndexesForHpn", + type: { + name: "Sequence", + element: { + type: { + name: "Number" + } + } + } + }, + vCpuIndexesForHpn: { + serializedName: "vCpuIndexesForHpn", + type: { + name: "Sequence", + element: { + type: { + name: "Number" + } + } + } + }, + vCpuIndexesForRoot: { + serializedName: "vCpuIndexesForRoot", + type: { + name: "Sequence", + element: { + type: { + name: "Number" + } + } + } + } + } + } +}; + export const RemoteSupportSettings: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3159,163 +3538,6 @@ export const PeriodicTimerSourceInfo: coreClient.CompositeMapper = { } }; -export const ResourceTypeSku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceTypeSku", - modelProperties: { - resourceType: { - serializedName: "resourceType", - readOnly: true, - type: { - name: "String" - } - }, - skus: { - serializedName: "skus", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SkuInformation" - } - } - } - } - } - } -}; - -export const SkuInformation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SkuInformation", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - tier: { - serializedName: "tier", - readOnly: true, - type: { - name: "String" - } - }, - kind: { - serializedName: "kind", - readOnly: true, - type: { - name: "String" - } - }, - family: { - serializedName: "family", - readOnly: true, - type: { - name: "String" - } - }, - costs: { - serializedName: "costs", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SkuCost" - } - } - } - }, - locations: { - serializedName: "locations", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - locationInfo: { - serializedName: "locationInfo", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SkuLocationInfo" - } - } - } - }, - requiredQuotaIds: { - serializedName: "requiredQuotaIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - requiredFeatures: { - serializedName: "requiredFeatures", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const SkuInformationList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SkuInformationList", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceTypeSku" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - export const DataBoxEdgeDevice: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3358,6 +3580,7 @@ export const DataBoxEdgeDevice: coreClient.CompositeMapper = { }, kind: { serializedName: "kind", + readOnly: true, type: { name: "String" } @@ -3378,6 +3601,7 @@ export const DataBoxEdgeDevice: coreClient.CompositeMapper = { }, dataBoxEdgeDeviceStatus: { serializedName: "properties.dataBoxEdgeDeviceStatus", + readOnly: true, type: { name: "String" } @@ -3620,6 +3844,50 @@ export const BandwidthSchedule: coreClient.CompositeMapper = { } }; +export const DeviceCapacityInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DeviceCapacityInfo", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + timeStamp: { + serializedName: "properties.timeStamp", + type: { + name: "DateTime" + } + }, + clusterStorageCapacityInfo: { + serializedName: "properties.clusterStorageCapacityInfo", + type: { + name: "Composite", + className: "ClusterStorageViewData" + } + }, + clusterComputeCapacityInfo: { + serializedName: "properties.clusterComputeCapacityInfo", + type: { + name: "Composite", + className: "ClusterCapacityViewData" + } + }, + nodeCapacityInfos: { + serializedName: "properties.nodeCapacityInfos", + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "HostCapacity" } } + } + } + } + } +}; + export const DiagnosticProactiveLogCollectionSettings: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3679,6 +3947,13 @@ export const DataBoxEdgeDeviceExtendedInfo: coreClient.CompositeMapper = { className: "DataBoxEdgeDeviceExtendedInfo", modelProperties: { ...ARMBaseModel.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, encryptionKeyThumbprint: { serializedName: "properties.encryptionKeyThumbprint", type: { @@ -3735,6 +4010,48 @@ export const DataBoxEdgeDeviceExtendedInfo: coreClient.CompositeMapper = { name: "Dictionary", value: { type: { name: "Composite", className: "Secret" } } } + }, + clusterWitnessType: { + serializedName: "properties.clusterWitnessType", + readOnly: true, + type: { + name: "String" + } + }, + fileShareWitnessLocation: { + serializedName: "properties.fileShareWitnessLocation", + readOnly: true, + type: { + name: "String" + } + }, + fileShareWitnessUsername: { + serializedName: "properties.fileShareWitnessUsername", + readOnly: true, + type: { + name: "String" + } + }, + cloudWitnessStorageAccountName: { + serializedName: "properties.cloudWitnessStorageAccountName", + readOnly: true, + type: { + name: "String" + } + }, + cloudWitnessContainerName: { + serializedName: "properties.cloudWitnessContainerName", + readOnly: true, + type: { + name: "String" + } + }, + cloudWitnessStorageEndpoint: { + serializedName: "properties.cloudWitnessStorageEndpoint", + readOnly: true, + type: { + name: "String" + } } } } @@ -3835,6 +4152,13 @@ export const Order: coreClient.CompositeMapper = { className: "Order", modelProperties: { ...ARMBaseModel.type.modelProperties, + kind: { + serializedName: "kind", + readOnly: true, + type: { + name: "String" + } + }, systemData: { serializedName: "systemData", type: { @@ -3842,6 +4166,13 @@ export const Order: coreClient.CompositeMapper = { className: "SystemData" } }, + orderId: { + serializedName: "properties.orderId", + readOnly: true, + type: { + name: "String" + } + }, contactInformation: { serializedName: "properties.contactInformation", type: { @@ -4309,19 +4640,19 @@ export const Trigger: coreClient.CompositeMapper = { }, modelProperties: { ...ARMBaseModel.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, kind: { serializedName: "kind", required: true, type: { name: "String" } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } diff --git a/sdk/databoxedge/arm-databoxedge/src/models/parameters.ts b/sdk/databoxedge/arm-databoxedge/src/models/parameters.ts index 582cea88c71f..0d3df186d347 100644 --- a/sdk/databoxedge/arm-databoxedge/src/models/parameters.ts +++ b/sdk/databoxedge/arm-databoxedge/src/models/parameters.ts @@ -18,6 +18,7 @@ import { DataBoxEdgeDeviceExtendedInfoPatch as DataBoxEdgeDeviceExtendedInfoPatchMapper, UploadCertificateRequest as UploadCertificateRequestMapper, BandwidthSchedule as BandwidthScheduleMapper, + DeviceCapacityRequestInfo as DeviceCapacityRequestInfoMapper, DiagnosticProactiveLogCollectionSettings as DiagnosticProactiveLogCollectionSettingsMapper, DiagnosticRemoteSupportSettings as DiagnosticRemoteSupportSettingsMapper, Order as OrderMapper, @@ -60,7 +61,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-06-01", + defaultValue: "2022-03-01", isConstant: true, serializedName: "api-version", type: { @@ -177,6 +178,21 @@ export const parameters3: OperationParameter = { mapper: BandwidthScheduleMapper }; +export const deviceCapacityRequestInfo: OperationParameter = { + parameterPath: "deviceCapacityRequestInfo", + mapper: DeviceCapacityRequestInfoMapper +}; + +export const capacityName: OperationQueryParameter = { + parameterPath: ["options", "capacityName"], + mapper: { + serializedName: "capacityName", + type: { + name: "String" + } + } +}; + export const proactiveLogCollectionSettings: OperationParameter = { parameterPath: "proactiveLogCollectionSettings", mapper: DiagnosticProactiveLogCollectionSettingsMapper diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/deviceCapacityCheck.ts b/sdk/databoxedge/arm-databoxedge/src/operations/deviceCapacityCheck.ts new file mode 100644 index 000000000000..0d0bedf32ef5 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operations/deviceCapacityCheck.ts @@ -0,0 +1,148 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { DeviceCapacityCheck } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + DeviceCapacityRequestInfo, + DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams +} from "../models"; + +/** Class containing DeviceCapacityCheck operations. */ +export class DeviceCapacityCheckImpl implements DeviceCapacityCheck { + private readonly client: DataBoxEdgeManagementClient; + + /** + * Initialize a new instance of the class DeviceCapacityCheck class. + * @param client Reference to the service client + */ + constructor(client: DataBoxEdgeManagementClient) { + this.client = client; + } + + /** + * Posts the device capacity request info to check feasibility. + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @param options The options parameters. + */ + async beginCheckResourceCreationFeasibility( + resourceGroupName: string, + deviceName: string, + deviceCapacityRequestInfo: DeviceCapacityRequestInfo, + options?: DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, deviceName, deviceCapacityRequestInfo, options }, + checkResourceCreationFeasibilityOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Posts the device capacity request info to check feasibility. + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @param options The options parameters. + */ + async beginCheckResourceCreationFeasibilityAndWait( + resourceGroupName: string, + deviceName: string, + deviceCapacityRequestInfo: DeviceCapacityRequestInfo, + options?: DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams + ): Promise { + const poller = await this.beginCheckResourceCreationFeasibility( + resourceGroupName, + deviceName, + deviceCapacityRequestInfo, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const checkResourceCreationFeasibilityOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/deviceCapacityCheck", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.deviceCapacityRequestInfo, + queryParameters: [Parameters.apiVersion, Parameters.capacityName], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/deviceCapacityInfoOperations.ts b/sdk/databoxedge/arm-databoxedge/src/operations/deviceCapacityInfoOperations.ts new file mode 100644 index 000000000000..de68906695ba --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operations/deviceCapacityInfoOperations.ts @@ -0,0 +1,73 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { DeviceCapacityInfoOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { + DeviceCapacityInfoGetDeviceCapacityInfoOptionalParams, + DeviceCapacityInfoGetDeviceCapacityInfoResponse +} from "../models"; + +/** Class containing DeviceCapacityInfoOperations operations. */ +export class DeviceCapacityInfoOperationsImpl + implements DeviceCapacityInfoOperations { + private readonly client: DataBoxEdgeManagementClient; + + /** + * Initialize a new instance of the class DeviceCapacityInfoOperations class. + * @param client Reference to the service client + */ + constructor(client: DataBoxEdgeManagementClient) { + this.client = client; + } + + /** + * Gets the properties of the specified device capacity info. + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param options The options parameters. + */ + getDeviceCapacityInfo( + resourceGroupName: string, + deviceName: string, + options?: DeviceCapacityInfoGetDeviceCapacityInfoOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, deviceName, options }, + getDeviceCapacityInfoOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getDeviceCapacityInfoOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/deviceCapacityInfo/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DeviceCapacityInfo + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/index.ts b/sdk/databoxedge/arm-databoxedge/src/operations/index.ts index 1d8cf8228116..d43d5a81a2a1 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/index.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/index.ts @@ -11,6 +11,8 @@ export * from "./availableSkus"; export * from "./devices"; export * from "./alerts"; export * from "./bandwidthSchedules"; +export * from "./deviceCapacityCheck"; +export * from "./deviceCapacityInfoOperations"; export * from "./diagnosticSettings"; export * from "./jobs"; export * from "./nodes"; diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/deviceCapacityCheck.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/deviceCapacityCheck.ts new file mode 100644 index 000000000000..451dbd5d5d19 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/deviceCapacityCheck.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + DeviceCapacityRequestInfo, + DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams +} from "../models"; + +/** Interface representing a DeviceCapacityCheck. */ +export interface DeviceCapacityCheck { + /** + * Posts the device capacity request info to check feasibility. + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @param options The options parameters. + */ + beginCheckResourceCreationFeasibility( + resourceGroupName: string, + deviceName: string, + deviceCapacityRequestInfo: DeviceCapacityRequestInfo, + options?: DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams + ): Promise, void>>; + /** + * Posts the device capacity request info to check feasibility. + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param deviceCapacityRequestInfo The device capacity request info. + * @param options The options parameters. + */ + beginCheckResourceCreationFeasibilityAndWait( + resourceGroupName: string, + deviceName: string, + deviceCapacityRequestInfo: DeviceCapacityRequestInfo, + options?: DeviceCapacityCheckCheckResourceCreationFeasibilityOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/deviceCapacityInfoOperations.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/deviceCapacityInfoOperations.ts new file mode 100644 index 000000000000..66567cfedf26 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/deviceCapacityInfoOperations.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + DeviceCapacityInfoGetDeviceCapacityInfoOptionalParams, + DeviceCapacityInfoGetDeviceCapacityInfoResponse +} from "../models"; + +/** Interface representing a DeviceCapacityInfoOperations. */ +export interface DeviceCapacityInfoOperations { + /** + * Gets the properties of the specified device capacity info. + * @param resourceGroupName The resource group name. + * @param deviceName The device name. + * @param options The options parameters. + */ + getDeviceCapacityInfo( + resourceGroupName: string, + deviceName: string, + options?: DeviceCapacityInfoGetDeviceCapacityInfoOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/index.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/index.ts index 1d8cf8228116..d43d5a81a2a1 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/index.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/index.ts @@ -11,6 +11,8 @@ export * from "./availableSkus"; export * from "./devices"; export * from "./alerts"; export * from "./bandwidthSchedules"; +export * from "./deviceCapacityCheck"; +export * from "./deviceCapacityInfoOperations"; export * from "./diagnosticSettings"; export * from "./jobs"; export * from "./nodes"; diff --git a/sdk/databoxedge/arm-databoxedge/test/sampleTest.ts b/sdk/databoxedge/arm-databoxedge/test/sampleTest.ts index 7ed89b043e1b..25aeb3ebcc36 100644 --- a/sdk/databoxedge/arm-databoxedge/test/sampleTest.ts +++ b/sdk/databoxedge/arm-databoxedge/test/sampleTest.ts @@ -7,35 +7,30 @@ */ import { - env, - record, - RecorderEnvironmentSetup, - Recorder + Recorder, + RecorderStartOptions, + env } from "@azure-tools/test-recorder"; -import * as assert from "assert"; +import { assert } from "chai"; +import { Context } from "mocha"; -const recorderEnvSetup: RecorderEnvironmentSetup = { - replaceableVariables: { - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" - }, - customizationsOnRecordings: [ - (recording: any): any => - recording.replace( - /"access_token":"[^"]*"/g, - `"access_token":"access_token"` - ) - ], - queryParametersToSkip: [] +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables }; describe("My test", () => { let recorder: Recorder; - beforeEach(async function() { - recorder = record(this, recorderEnvSetup); + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); }); afterEach(async function() { diff --git a/sdk/databoxedge/arm-databoxedge/tsconfig.json b/sdk/databoxedge/arm-databoxedge/tsconfig.json index c30ba030b1d5..3e6ae96443f3 100644 --- a/sdk/databoxedge/arm-databoxedge/tsconfig.json +++ b/sdk/databoxedge/arm-databoxedge/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-databoxedge": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"