Skip to content

Commit 24328e1

Browse files
generate code for compute service and update tests and session-records (Azure#23133)
* manual generate code for compute service * replace withRootPassword() to withSsh(sshPublicKey()) * update test case in compute * update test session records in compute * update api-version for other services' tests * update test case * remove unused imports * add breaking changes to change log and update pom.xml to skip revapi * remove note line in api-specs.json and add the changed comment
1 parent fbf4b48 commit 24328e1

File tree

240 files changed

+118730
-106233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+118730
-106233
lines changed

sdk/resourcemanager/api-specs.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@
7777
"dir": "azure-resourcemanager-compute",
7878
"source": "specification/compute/resource-manager/readme.md",
7979
"package": "com.azure.resourcemanager.compute",
80-
"args": "--payload-flattening-threshold=1 --tag=package-2021-03-01 --rename-model=UserAssignedIdentitiesValue:VirtualMachineIdentityUserAssignedIdentities,VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue:VirtualMachineScaleSetIdentityUserAssignedIdentities",
81-
"note": "Add '@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)' to 'userAssignedIdentities' property of class 'VirtualMachineIdentity', 'VirtualMachineScaleSetIdentity'"
80+
"args": "--payload-flattening-threshold=1 --tag=package-2021-04-01 --rename-model=UserAssignedIdentitiesValue:VirtualMachineIdentityUserAssignedIdentities,VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue:VirtualMachineScaleSetIdentityUserAssignedIdentities"
8281
},
8382
"consumption": {
8483
"dir": "azure-resourcemanager-consumption",

sdk/resourcemanager/azure-resourcemanager-compute/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# Release History
22

33
## 2.7.0-beta.1 (Unreleased)
4+
### Dependency Updates
5+
6+
- Updated `api-version` to `2021-04-01`.
7+
8+
### Breaking Changes
9+
10+
- property `publicIpAddressSkuName` in `PublicIpAddressSku` is renamed to `name`.
11+
- property `publicIpAddressSkuTier` in `PublicIpAddressSku` is renamed to `tier`.
12+
- Class `AggregationType` is renamed to `AggregationTypeEnum`.
13+
- Enum `SecurityTypes` changed to subclass of `ExpandableStringEnum`.
414

515

616
## 2.6.0 (2021-06-18)

sdk/resourcemanager/azure-resourcemanager-compute/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@
212212
<artifactId>revapi-maven-plugin</artifactId>
213213
<version>0.11.2</version> <!-- {x-version-update;org.revapi:revapi-maven-plugin;external_dependency} -->
214214
<configuration>
215+
<skip>true</skip>
215216
<analysisConfiguration>
216217
<revapi.ignore>
217218
<item>

sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/CapacityReservationGroupsClient.java

Lines changed: 449 additions & 0 deletions
Large diffs are not rendered by default.

sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/CapacityReservationsClient.java

Lines changed: 564 additions & 0 deletions
Large diffs are not rendered by default.

sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ComputeManagementClient.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,20 @@ public interface ComputeManagementClient {
157157
*/
158158
RestorePointsClient getRestorePoints();
159159

160+
/**
161+
* Gets the CapacityReservationGroupsClient object to access its operations.
162+
*
163+
* @return the CapacityReservationGroupsClient object.
164+
*/
165+
CapacityReservationGroupsClient getCapacityReservationGroups();
166+
167+
/**
168+
* Gets the CapacityReservationsClient object to access its operations.
169+
*
170+
* @return the CapacityReservationsClient object.
171+
*/
172+
CapacityReservationsClient getCapacityReservations();
173+
160174
/**
161175
* Gets the VirtualMachineScaleSetExtensionsClient object to access its operations.
162176
*

sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DiskRestorePointsClient.java

Lines changed: 335 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
5+
package com.azure.resourcemanager.compute.fluent.models;
6+
7+
import com.azure.core.annotation.Fluent;
8+
import com.azure.core.annotation.JsonFlatten;
9+
import com.azure.core.management.Resource;
10+
import com.azure.core.util.logging.ClientLogger;
11+
import com.azure.resourcemanager.compute.models.CapacityReservationGroupInstanceView;
12+
import com.azure.resourcemanager.compute.models.SubResourceReadOnly;
13+
import com.fasterxml.jackson.annotation.JsonIgnore;
14+
import com.fasterxml.jackson.annotation.JsonProperty;
15+
import java.util.List;
16+
import java.util.Map;
17+
18+
/**
19+
* Specifies information about the capacity reservation group that the capacity reservations should be assigned to.
20+
* &lt;br&gt;&lt;br&gt; Currently, a capacity reservation can only be added to a capacity reservation group at creation
21+
* time. An existing capacity reservation cannot be added or moved to another capacity reservation group.
22+
*/
23+
@JsonFlatten
24+
@Fluent
25+
public class CapacityReservationGroupInner extends Resource {
26+
@JsonIgnore private final ClientLogger logger = new ClientLogger(CapacityReservationGroupInner.class);
27+
28+
/*
29+
* Availability Zones to use for this capacity reservation group. The zones
30+
* can be assigned only during creation. If not provided, the group
31+
* supports only regional resources in the region. If provided, enforces
32+
* each capacity reservation in the group to be in one of the zones.
33+
*/
34+
@JsonProperty(value = "zones")
35+
private List<String> zones;
36+
37+
/*
38+
* A list of all capacity reservation resource ids that belong to capacity
39+
* reservation group.
40+
*/
41+
@JsonProperty(value = "properties.capacityReservations", access = JsonProperty.Access.WRITE_ONLY)
42+
private List<SubResourceReadOnly> capacityReservations;
43+
44+
/*
45+
* A list of references to all virtual machines associated to the capacity
46+
* reservation group.
47+
*/
48+
@JsonProperty(value = "properties.virtualMachinesAssociated", access = JsonProperty.Access.WRITE_ONLY)
49+
private List<SubResourceReadOnly> virtualMachinesAssociated;
50+
51+
/*
52+
* The capacity reservation group instance view which has the list of
53+
* instance views for all the capacity reservations that belong to the
54+
* capacity reservation group.
55+
*/
56+
@JsonProperty(value = "properties.instanceView", access = JsonProperty.Access.WRITE_ONLY)
57+
private CapacityReservationGroupInstanceView instanceView;
58+
59+
/**
60+
* Get the zones property: Availability Zones to use for this capacity reservation group. The zones can be assigned
61+
* only during creation. If not provided, the group supports only regional resources in the region. If provided,
62+
* enforces each capacity reservation in the group to be in one of the zones.
63+
*
64+
* @return the zones value.
65+
*/
66+
public List<String> zones() {
67+
return this.zones;
68+
}
69+
70+
/**
71+
* Set the zones property: Availability Zones to use for this capacity reservation group. The zones can be assigned
72+
* only during creation. If not provided, the group supports only regional resources in the region. If provided,
73+
* enforces each capacity reservation in the group to be in one of the zones.
74+
*
75+
* @param zones the zones value to set.
76+
* @return the CapacityReservationGroupInner object itself.
77+
*/
78+
public CapacityReservationGroupInner withZones(List<String> zones) {
79+
this.zones = zones;
80+
return this;
81+
}
82+
83+
/**
84+
* Get the capacityReservations property: A list of all capacity reservation resource ids that belong to capacity
85+
* reservation group.
86+
*
87+
* @return the capacityReservations value.
88+
*/
89+
public List<SubResourceReadOnly> capacityReservations() {
90+
return this.capacityReservations;
91+
}
92+
93+
/**
94+
* Get the virtualMachinesAssociated property: A list of references to all virtual machines associated to the
95+
* capacity reservation group.
96+
*
97+
* @return the virtualMachinesAssociated value.
98+
*/
99+
public List<SubResourceReadOnly> virtualMachinesAssociated() {
100+
return this.virtualMachinesAssociated;
101+
}
102+
103+
/**
104+
* Get the instanceView property: The capacity reservation group instance view which has the list of instance views
105+
* for all the capacity reservations that belong to the capacity reservation group.
106+
*
107+
* @return the instanceView value.
108+
*/
109+
public CapacityReservationGroupInstanceView instanceView() {
110+
return this.instanceView;
111+
}
112+
113+
/** {@inheritDoc} */
114+
@Override
115+
public CapacityReservationGroupInner withLocation(String location) {
116+
super.withLocation(location);
117+
return this;
118+
}
119+
120+
/** {@inheritDoc} */
121+
@Override
122+
public CapacityReservationGroupInner withTags(Map<String, String> tags) {
123+
super.withTags(tags);
124+
return this;
125+
}
126+
127+
/**
128+
* Validates the instance.
129+
*
130+
* @throws IllegalArgumentException thrown if the instance is not valid.
131+
*/
132+
public void validate() {
133+
if (capacityReservations() != null) {
134+
capacityReservations().forEach(e -> e.validate());
135+
}
136+
if (virtualMachinesAssociated() != null) {
137+
virtualMachinesAssociated().forEach(e -> e.validate());
138+
}
139+
if (instanceView() != null) {
140+
instanceView().validate();
141+
}
142+
}
143+
}

0 commit comments

Comments
 (0)