Skip to content
Closed
Show file tree
Hide file tree
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
20 changes: 12 additions & 8 deletions sdk/compute/arm-compute/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# Release History

## 22.0.0 (2023-06-21)

**Features**

## 21.0.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed
- Added Interface DiskPurchasePlan

### Other Changes
**Breaking Changes**

- Type of parameter purchasePlan of interface Disk is changed from PurchasePlanAutoGenerated to DiskPurchasePlan
- Type of parameter purchasePlan of interface DiskRestorePoint is changed from PurchasePlanAutoGenerated to DiskPurchasePlan
- Type of parameter purchasePlan of interface DiskUpdate is changed from PurchasePlanAutoGenerated to DiskPurchasePlan
- Type of parameter purchasePlan of interface Snapshot is changed from PurchasePlanAutoGenerated to DiskPurchasePlan


## 21.0.0 (2023-05-17)

**Features**
Expand Down
8 changes: 4 additions & 4 deletions sdk/compute/arm-compute/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "a2140e7ff0a6c28df501b16c51fe85b762a386fc",
"commit": "462cd9381f116840ea36c6911bdf96bf38d3e5f3",
"readme": "specification/compute/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\compute\\resource-manager\\readme.md --use=@autorest/typescript@6.0.1 --generate-sample=true",
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --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/compute/resource-manager/readme.md --use=@autorest/typescript@^6.0.4",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.6.2",
"use": "@autorest/typescript@6.0.1"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.1",
"use": "@autorest/typescript@^6.0.4"
}
19 changes: 5 additions & 14 deletions sdk/compute/arm-compute/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for ComputeManagementClient.",
"version": "21.0.1",
"version": "22.0.0",
"engines": {
"node": ">=14.0.0"
},
"dependencies": {
"@azure/core-lro": "^2.5.0",
"@azure/core-lro": "^2.5.3",
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.7.0",
Expand Down Expand Up @@ -48,8 +48,7 @@
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@types/node": "^14.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/arm-network": "^26.0.0"
"@azure/dev-tool": "^1.0.0"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -112,13 +111,5 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/compute/arm-compute",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-compute?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/compute/arm-compute"
}
24 changes: 12 additions & 12 deletions sdk/compute/arm-compute/review/arm-compute.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ export interface Disk extends Resource {
readonly propertyUpdatesInProgress?: PropertyUpdatesInProgress;
readonly provisioningState?: string;
publicNetworkAccess?: PublicNetworkAccess;
purchasePlan?: PurchasePlanAutoGenerated;
purchasePlan?: DiskPurchasePlan;
securityProfile?: DiskSecurityProfile;
readonly shareInfo?: ShareInfoElement[];
sku?: DiskSku;
Expand Down Expand Up @@ -1849,6 +1849,14 @@ export interface DiskList {
value: Disk[];
}

// @public
export interface DiskPurchasePlan {
name: string;
product: string;
promotionCode?: string;
publisher: string;
}

// @public
export interface DiskRestorePoint extends ProxyOnlyResource {
completionPercent?: number;
Expand All @@ -1859,7 +1867,7 @@ export interface DiskRestorePoint extends ProxyOnlyResource {
networkAccessPolicy?: NetworkAccessPolicy;
readonly osType?: OperatingSystemTypes;
publicNetworkAccess?: PublicNetworkAccess;
purchasePlan?: PurchasePlanAutoGenerated;
purchasePlan?: DiskPurchasePlan;
readonly replicationState?: string;
securityProfile?: DiskSecurityProfile;
readonly sourceResourceId?: string;
Expand Down Expand Up @@ -2070,7 +2078,7 @@ export interface DiskUpdate {
osType?: OperatingSystemTypes;
readonly propertyUpdatesInProgress?: PropertyUpdatesInProgress;
publicNetworkAccess?: PublicNetworkAccess;
purchasePlan?: PurchasePlanAutoGenerated;
purchasePlan?: DiskPurchasePlan;
sku?: DiskSku;
supportedCapabilities?: SupportedCapabilities;
supportsHibernation?: boolean;
Expand Down Expand Up @@ -4461,14 +4469,6 @@ export interface PurchasePlan {
publisher: string;
}

// @public
export interface PurchasePlanAutoGenerated {
name: string;
product: string;
promotionCode?: string;
publisher: string;
}

// @public
export interface RecommendedMachineConfiguration {
memory?: ResourceRange;
Expand Down Expand Up @@ -5287,7 +5287,7 @@ export interface Snapshot extends Resource {
osType?: OperatingSystemTypes;
readonly provisioningState?: string;
publicNetworkAccess?: PublicNetworkAccess;
purchasePlan?: PurchasePlanAutoGenerated;
purchasePlan?: DiskPurchasePlan;
securityProfile?: DiskSecurityProfile;
sku?: SnapshotSku;
supportedCapabilities?: SupportedCapabilities;
Expand Down
2 changes: 1 addition & 1 deletion sdk/compute/arm-compute/src/computeManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export class ComputeManagementClient extends coreClient.ServiceClient {
credential: credentials
};

const packageDetails = `azsdk-js-arm-compute/21.0.1`;
const packageDetails = `azsdk-js-arm-compute/22.0.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand Down
10 changes: 5 additions & 5 deletions sdk/compute/arm-compute/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2812,7 +2812,7 @@ export interface DiskSku {
}

/** Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. */
export interface PurchasePlanAutoGenerated {
export interface DiskPurchasePlan {
/** The plan ID. */
name: string;
/** The publisher ID. */
Expand Down Expand Up @@ -2977,7 +2977,7 @@ export interface DiskUpdate {
/** Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. */
burstingEnabled?: boolean;
/** Purchase plan information to be added on the OS disk */
purchasePlan?: PurchasePlanAutoGenerated;
purchasePlan?: DiskPurchasePlan;
/** List of supported capabilities to be added on the OS disk. */
supportedCapabilities?: SupportedCapabilities;
/**
Expand Down Expand Up @@ -5484,7 +5484,7 @@ export interface Disk extends Resource {
/** The hypervisor generation of the Virtual Machine. Applicable to OS disks only. */
hyperVGeneration?: HyperVGeneration;
/** Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer} */
purchasePlan?: PurchasePlanAutoGenerated;
purchasePlan?: DiskPurchasePlan;
/** List of supported capabilities for the image from which the OS disk was created. */
supportedCapabilities?: SupportedCapabilities;
/** Disk source information. CreationData information cannot be changed after the disk has been created. */
Expand Down Expand Up @@ -5638,7 +5638,7 @@ export interface Snapshot extends Resource {
/** The hypervisor generation of the Virtual Machine. Applicable to OS disks only. */
hyperVGeneration?: HyperVGeneration;
/** Purchase plan information for the image from which the source disk for the snapshot was originally created. */
purchasePlan?: PurchasePlanAutoGenerated;
purchasePlan?: DiskPurchasePlan;
/** List of supported capabilities for the image from which the source disk from the snapshot was originally created. */
supportedCapabilities?: SupportedCapabilities;
/** Disk source information. CreationData information cannot be changed after the disk has been created. */
Expand Down Expand Up @@ -6264,7 +6264,7 @@ export interface DiskRestorePoint extends ProxyOnlyResource {
/** The hypervisor generation of the Virtual Machine. Applicable to OS disks only. */
hyperVGeneration?: HyperVGeneration;
/** Purchase plan information for the the image from which the OS disk was created. */
purchasePlan?: PurchasePlanAutoGenerated;
purchasePlan?: DiskPurchasePlan;
/** List of supported capabilities for the image from which the OS disk was created. */
supportedCapabilities?: SupportedCapabilities;
/**
Expand Down
12 changes: 6 additions & 6 deletions sdk/compute/arm-compute/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7441,10 +7441,10 @@ export const DiskSku: coreClient.CompositeMapper = {
}
};

export const PurchasePlanAutoGenerated: coreClient.CompositeMapper = {
export const DiskPurchasePlan: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "PurchasePlanAutoGenerated",
className: "DiskPurchasePlan",
modelProperties: {
name: {
serializedName: "name",
Expand Down Expand Up @@ -7911,7 +7911,7 @@ export const DiskUpdate: coreClient.CompositeMapper = {
serializedName: "properties.purchasePlan",
type: {
name: "Composite",
className: "PurchasePlanAutoGenerated"
className: "DiskPurchasePlan"
}
},
supportedCapabilities: {
Expand Down Expand Up @@ -14071,7 +14071,7 @@ export const Disk: coreClient.CompositeMapper = {
serializedName: "properties.purchasePlan",
type: {
name: "Composite",
className: "PurchasePlanAutoGenerated"
className: "DiskPurchasePlan"
}
},
supportedCapabilities: {
Expand Down Expand Up @@ -14429,7 +14429,7 @@ export const Snapshot: coreClient.CompositeMapper = {
serializedName: "properties.purchasePlan",
type: {
name: "Composite",
className: "PurchasePlanAutoGenerated"
className: "DiskPurchasePlan"
}
},
supportedCapabilities: {
Expand Down Expand Up @@ -16053,7 +16053,7 @@ export const DiskRestorePoint: coreClient.CompositeMapper = {
serializedName: "properties.purchasePlan",
type: {
name: "Composite",
className: "PurchasePlanAutoGenerated"
className: "DiskPurchasePlan"
}
},
supportedCapabilities: {
Expand Down
43 changes: 43 additions & 0 deletions sdk/compute/arm-compute/test/sampleTest.ts
Original file line number Diff line number Diff line change
@@ -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 {
Recorder,
RecorderStartOptions,
env
} from "@azure-tools/test-recorder";
import { assert } from "chai";
import { Context } from "mocha";

const replaceableVariables: Record<string, string> = {
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(this: Context) {
recorder = new Recorder(this.currentTest);
await recorder.start(recorderOptions);
});

afterEach(async function() {
await recorder.stop();
});

it("sample test", async function() {
console.log("Hi, I'm a test!");
});
});
10 changes: 2 additions & 8 deletions sdk/compute/arm-compute/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,11 @@
],
"declaration": true,
"outDir": "./dist-esm",
"importHelpers": true,
"paths": {
"@azure/arm-compute": [
"./src/index"
]
}
"importHelpers": true
},
"include": [
"./src/**/*.ts",
"./test/**/*.ts",
"samples-dev/**/*.ts"
"./test/**/*.ts"
],
"exclude": [
"node_modules"
Expand Down