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
6 changes: 3 additions & 3 deletions sdk/compute/arm-compute/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "fda2db441da3f1fab31bb235e97da3e33c8e3903",
"commit": "f70ac60ffff09732e98a5b1d9dbb1c3f1baab9b9",
"readme": "specification/compute/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:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\compute\\resource-manager\\readme.md --use=@autorest/[email protected] --generate-sample=true",
"autorest_command": "",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.3.2",
"release_tool": "@azure-tools/js-sdk-release-tools@2.4.1",
"use": "@autorest/[email protected]"
}
15 changes: 3 additions & 12 deletions sdk/compute/arm-compute/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
"@types/chai": "^4.2.8",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@azure/dev-tool": "^1.0.0",
"@azure/arm-network": "^26.0.0"
"@azure/dev-tool": "^1.0.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/compute/arm-compute",
"repository": {
Expand Down Expand Up @@ -110,13 +109,5 @@
}
]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-compute?view=azure-node-preview"
}
}
"autoPublish": true
}
2 changes: 1 addition & 1 deletion sdk/compute/arm-compute/review/arm-compute.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4992,7 +4992,7 @@ export interface ShareInfoElement {

// @public
export interface SharingProfile {
communityGalleryInfo?: any;
communityGalleryInfo?: CommunityGalleryInfo;
readonly groups?: SharingProfileGroup[];
permissions?: GallerySharingPermissionTypes;
}
Expand Down
3 changes: 3 additions & 0 deletions sdk/compute/arm-compute/src/computeManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ export class ComputeManagementClient extends coreClient.ServiceClient {
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
: `${packageDetails}`;

if (!options.credentialScopes) {
options.credentialScopes = ["https://management.azure.com/.default"];
}
const optionsWithDefaults = {
...defaults,
...options,
Expand Down
48 changes: 24 additions & 24 deletions sdk/compute/arm-compute/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3221,7 +3221,7 @@ export interface SharingProfile {
*/
readonly groups?: SharingProfileGroup[];
/** Information of community gallery if current gallery is shared to community. */
communityGalleryInfo?: any;
communityGalleryInfo?: CommunityGalleryInfo;
}

/** Group of the gallery sharing profile */
Expand All @@ -3232,6 +3232,28 @@ export interface SharingProfileGroup {
ids?: string[];
}

/** Information of community gallery if current gallery is shared to community */
export interface CommunityGalleryInfo {
/** The link to the publisher website. Visible to all users. */
publisherUri?: string;
/** Community gallery publisher support email. The email address of the publisher. Visible to all users. */
publisherContact?: string;
/** End-user license agreement for community gallery image. */
eula?: string;
/** The prefix of the gallery name that will be displayed publicly. Visible to all users. */
publicNamePrefix?: string;
/**
* Contains info about whether community gallery sharing is enabled.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly communityGalleryEnabled?: boolean;
/**
* Community gallery public name list.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly publicNames?: string[];
}

/** Contains information about the soft deletion policy of the gallery. */
export interface SoftDeletePolicy {
/** Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time. */
Expand Down Expand Up @@ -4275,28 +4297,6 @@ export interface OSFamilyListResult {
nextLink?: string;
}

/** Information of community gallery if current gallery is shared to community */
export interface CommunityGalleryInfo {
/** The link to the publisher website. Visible to all users. */
publisherUri?: string;
/** Community gallery publisher support email. The email address of the publisher. Visible to all users. */
publisherContact?: string;
/** End-user license agreement for community gallery image. */
eula?: string;
/** The prefix of the gallery name that will be displayed publicly. Visible to all users. */
publicNamePrefix?: string;
/**
* Contains info about whether community gallery sharing is enabled.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly communityGalleryEnabled?: boolean;
/**
* Community gallery public name list.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly publicNames?: string[];
}

/** The source image from which the Image Version is going to be created. */
export interface GalleryArtifactSource {
/** The managed artifact. */
Expand Down Expand Up @@ -5860,7 +5860,7 @@ export interface DedicatedHostInstanceViewWithName
export interface ImageOSDisk extends ImageDisk {
/** This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. <br><br> Possible values are: <br><br> **Windows** <br><br> **Linux** */
osType: OperatingSystemTypes;
/** The OS State. */
/** The OS State. For managed images, use Generalized. */
osState: OperatingSystemStateTypes;
}

Expand Down
107 changes: 54 additions & 53 deletions sdk/compute/arm-compute/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8374,7 +8374,8 @@ export const SharingProfile: coreClient.CompositeMapper = {
communityGalleryInfo: {
serializedName: "communityGalleryInfo",
type: {
name: "any"
name: "Composite",
className: "CommunityGalleryInfo"
}
}
}
Expand Down Expand Up @@ -8407,6 +8408,58 @@ export const SharingProfileGroup: coreClient.CompositeMapper = {
}
};

export const CommunityGalleryInfo: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "CommunityGalleryInfo",
modelProperties: {
publisherUri: {
serializedName: "publisherUri",
type: {
name: "String"
}
},
publisherContact: {
serializedName: "publisherContact",
type: {
name: "String"
}
},
eula: {
serializedName: "eula",
type: {
name: "String"
}
},
publicNamePrefix: {
serializedName: "publicNamePrefix",
type: {
name: "String"
}
},
communityGalleryEnabled: {
serializedName: "communityGalleryEnabled",
readOnly: true,
type: {
name: "Boolean"
}
},
publicNames: {
serializedName: "publicNames",
readOnly: true,
type: {
name: "Sequence",
element: {
type: {
name: "String"
}
}
}
}
}
}
};

export const SoftDeletePolicy: coreClient.CompositeMapper = {
type: {
name: "Composite",
Expand Down Expand Up @@ -10923,58 +10976,6 @@ export const OSFamilyListResult: coreClient.CompositeMapper = {
}
};

export const CommunityGalleryInfo: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "CommunityGalleryInfo",
modelProperties: {
publisherUri: {
serializedName: "publisherUri",
type: {
name: "String"
}
},
publisherContact: {
serializedName: "publisherContact",
type: {
name: "String"
}
},
eula: {
serializedName: "eula",
type: {
name: "String"
}
},
publicNamePrefix: {
serializedName: "publicNamePrefix",
type: {
name: "String"
}
},
communityGalleryEnabled: {
serializedName: "communityGalleryEnabled",
readOnly: true,
type: {
name: "Boolean"
}
},
publicNames: {
serializedName: "publicNames",
readOnly: true,
type: {
name: "Sequence",
element: {
type: {
name: "String"
}
}
}
}
}
}
};

export const GalleryArtifactSource: coreClient.CompositeMapper = {
type: {
name: "Composite",
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