Skip to content

Commit

Permalink
[mgmt] storage release (Azure#33099)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazrael2119 authored Feb 27, 2025
1 parent b05b383 commit 17b6dc9
Show file tree
Hide file tree
Showing 348 changed files with 4,449 additions and 2,153 deletions.
26 changes: 13 additions & 13 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/batch/arm-batch/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "js",
"TagPrefix": "js/batch/arm-batch",
"Tag": "js/batch/arm-batch_20f166d6fc"
"Tag": "js/batch/arm-batch_b0c61dc3f9"
}
2 changes: 1 addition & 1 deletion sdk/monitor/arm-monitor/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "js",
"TagPrefix": "js/monitor/arm-monitor",
"Tag": "js/monitor/arm-monitor_ac7d3f3bb5"
"Tag": "js/monitor/arm-monitor_86ac674e4d"
}
136 changes: 92 additions & 44 deletions sdk/monitor/arm-monitor/test/monitor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,13 @@ describe("Monitor test", () => {
const res = await logic_client.workflows.createOrUpdate(resourceGroup, workflowName, {
location: location,
definition: {
$schema:
"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
contentVersion: "1.0.0.0",
parameters: {},
triggers: {},
actions: {},
outputs: {},
},
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"triggers": {},
"actions": {},
"outputs": {}
}
});
workflowsId = (res.id || "/").substring(1);

Expand Down Expand Up @@ -149,6 +148,17 @@ describe("Monitor test", () => {
storageId = storageaccount.id || "";

// namespaces.beginCreateOrUpdateAndWait
await eventhub_client.namespaces.beginCreateOrUpdateAndWait(resourceGroup, namespaceName, {
sku: {
name: "Standard",
tier: "Standard",
},
location: location,
tags: {
tag1: "value1",
tag2: "value2",
}
}, testPollingOptions)
// namespaces.createOrUpdateAuthorizationRule
const authorization = await eventhub_client.namespaces.createOrUpdateAuthorizationRule(
resourceGroup,
Expand Down Expand Up @@ -179,23 +189,29 @@ describe("Monitor test", () => {
// skip this case as no data plane write permissions
it.skip("eventhub create test", async () => {
// eventHubs.createOrUpdate
});
await eventhub_client.eventHubs.createOrUpdate(resourceGroup, namespaceName, eventhubName, {
messageRetentionInDays: 4,
partitionCount: 4,
status: "Active",
captureDescription: {
enabled: true,
encoding: "Avro",
intervalInSeconds: 120,
sizeLimitInBytes: 10485763,
destination: {
name: "EventHubArchive.AzureBlockBlob",
storageAccountResourceId: "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroup + "/providers/Microsoft.Storage/storageAccounts/" + storageAccountName,
blobContainer: "container",
archiveNameFormat: "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}",
}
}
});
})

it("diagnosticSettings create test", async () => {
workflowsId = (
(await logic_client.workflows.get(resourceGroup, workflowName)).id || "/"
).substring(1);
storageId =
(await storage_client.storageAccounts.getProperties(resourceGroup, storageAccountName)).id ||
"";
authorizationId =
(
await eventhub_client.namespaces.getAuthorizationRule(
resourceGroup,
namespaceName,
authorizationRuleName,
)
).id || "";
workflowsId = ((await logic_client.workflows.get(resourceGroup, workflowName)).id || "/").substring(1)
storageId = (await storage_client.storageAccounts.getProperties(resourceGroup, storageAccountName)).id || "";
authorizationId = (await eventhub_client.namespaces.getAuthorizationRule(resourceGroup, namespaceName, authorizationRuleName)).id || "";
workspaceId = (await op_client.workspaces.get(resourceGroup, workspaceName)).id || "";
const res = await client.diagnosticSettings.createOrUpdate(workflowsId, diagnosticName, {
storageAccountId: storageId,
Expand All @@ -209,11 +225,11 @@ describe("Monitor test", () => {
enabled: true,
retentionPolicy: {
enabled: false,
days: 0,
},
},
],
});
days: 0
}
}
]
})
assert.equal(res.name, diagnosticName);
});

Expand All @@ -222,29 +238,41 @@ describe("Monitor test", () => {
assert.equal(res.name, diagnosticName);
});

it("diagnosticSettings list test", async () => {});
it("diagnosticSettings list test", async () => {
const res = await client.diagnosticSettings.list(workflowsId);
assert.ok(res);
});

it("diagnosticSettings delete test", async () => {});
it("diagnosticSettings delete test", async () => {
const res = await client.diagnosticSettings.delete(workflowsId, diagnosticName);
assert.ok(res);
});

it("logProfiles create test", async () => {
// delete sample logfile
//delete sample logfile
const resArray = new Array();
for await (const item of client.logProfiles.list()) {
resArray.push(item);
}
if (resArray.length >= 1) {
await client.logProfiles.delete("sample-log-profile");
await client.logProfiles.delete("sample-log-profile")
}
const res = await client.logProfiles.createOrUpdate(logProfileName, {
location: "",
locations: ["global"],
categories: ["Write", "Delete", "Action"],
locations: [
"global"
],
categories: [
"Write",
"Delete",
"Action"
],
retentionPolicy: {
enabled: true,
days: 3,
days: 3
},
storageAccountId: storageId,
});
storageAccountId: storageId
})
assert.equal(res.name, logProfileName);
});

Expand All @@ -266,9 +294,8 @@ describe("Monitor test", () => {
resourceGroup,
azureMonitorWorkspaceName,
{
location,
},
);
location
});
assert.equal(res.name, azureMonitorWorkspaceName);
});

Expand All @@ -287,23 +314,44 @@ describe("Monitor test", () => {

it("workspace delete test", async () => {
const resArray = new Array();
await client.azureMonitorWorkspaces.beginDeleteAndWait(resourceGroup, azureMonitorWorkspaceName);
for await (const item of client.azureMonitorWorkspaces.listByResourceGroup(resourceGroup)) {
resArray.push(item);
}
assert.equal(resArray.length, 0);
});

it("metric listAtSubscriptionScope test", async () => {});
it("metric listAtSubscriptionScope test", async () => {
await client.metricsOperations.listAtSubscriptionScope(
location,
{
metricnamespace: "microsoft.compute/virtualmachines"
}
);
});

it("metric list test", async () => {});
it("metric list test", async () => {
await client.metricsOperations.list(
"subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroup + "/providers/Microsoft.Storage/storageAccounts/" + storageAccountName + "/blobServices/default",
{
metricnamespace: "Microsoft.Storage/storageAccounts/blobServices"
}
);
});

it("delete parameters for diagnosticSettings", async () => {});
it("delete parameters for diagnosticSettings", async () => {
await logic_client.workflows.delete(resourceGroup, workflowName);
await storage_client.storageAccounts.delete(resourceGroup, storageAccountName);
await eventhub_client.namespaces.beginDeleteAndWait(resourceGroup, namespaceName, testPollingOptions);
await op_client.workspaces.beginDeleteAndWait(resourceGroup, workspaceName, testPollingOptions);
});

it("logProfiles delete test", async () => {
await client.logProfiles.delete(logProfileName);
const resArray = new Array();
for await (const item of client.logProfiles.list()) {
resArray.push(item);
}
assert.equal(resArray.length, 1); // still exist sample logfile
assert.equal(resArray.length, 1); //still exist sample logfile
});
});
56 changes: 47 additions & 9 deletions sdk/storage/arm-storage/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,53 @@
# Release History

## 18.3.1 (Unreleased)

## 18.4.0 (2025-02-27)
### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

- Added operation FileServices.getServiceUsage
- Added operation FileServices.listServiceUsages
- Added Interface AccountLimits
- Added Interface AccountUsage
- Added Interface AccountUsageElements
- Added Interface BurstingConstants
- Added Interface FileServicesGetServiceUsageOptionalParams
- Added Interface FileServicesListServiceUsagesNextOptionalParams
- Added Interface FileServicesListServiceUsagesOptionalParams
- Added Interface FileServiceUsage
- Added Interface FileServiceUsageProperties
- Added Interface FileServiceUsages
- Added Interface FileShareLimits
- Added Interface FileSharePropertiesFileSharePaidBursting
- Added Interface FileShareRecommendations
- Added Interface ObjectReplicationPolicyPropertiesMetrics
- Added Type Alias FileServicesGetServiceUsageResponse
- Added Type Alias FileServicesListServiceUsagesNextResponse
- Added Type Alias FileServicesListServiceUsagesResponse
- Interface FileShare has a new optional parameter fileSharePaidBursting
- Interface FileShare has a new optional parameter includedBurstIops
- Interface FileShare has a new optional parameter maxBurstCreditsForIops
- Interface FileShare has a new optional parameter nextAllowedProvisionedBandwidthDowngradeTime
- Interface FileShare has a new optional parameter nextAllowedProvisionedIopsDowngradeTime
- Interface FileShare has a new optional parameter nextAllowedQuotaDowngradeTime
- Interface FileShare has a new optional parameter provisionedBandwidthMibps
- Interface FileShare has a new optional parameter provisionedIops
- Interface FileShareItem has a new optional parameter fileSharePaidBursting
- Interface FileShareItem has a new optional parameter includedBurstIops
- Interface FileShareItem has a new optional parameter maxBurstCreditsForIops
- Interface FileShareItem has a new optional parameter nextAllowedProvisionedBandwidthDowngradeTime
- Interface FileShareItem has a new optional parameter nextAllowedProvisionedIopsDowngradeTime
- Interface FileShareItem has a new optional parameter nextAllowedQuotaDowngradeTime
- Interface FileShareItem has a new optional parameter provisionedBandwidthMibps
- Interface FileShareItem has a new optional parameter provisionedIops
- Interface ObjectReplicationPolicy has a new optional parameter metrics
- Enum KnownSkuName has a new value PremiumV2LRS
- Enum KnownSkuName has a new value PremiumV2ZRS
- Enum KnownSkuName has a new value StandardV2GRS
- Enum KnownSkuName has a new value StandardV2Gzrs
- Enum KnownSkuName has a new value StandardV2LRS
- Enum KnownSkuName has a new value StandardV2ZRS


## 18.3.0 (2024-06-27)

### Features Added
Expand Down
Loading

0 comments on commit 17b6dc9

Please sign in to comment.