Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.Reservations" Version="1.8.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Reservations" Version="1.9.0-preview" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Azure.Management.Reservations">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Reservations.1.8.0-preview\lib\net452\Microsoft.Azure.Management.Reservations.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Reservations.1.9.0-preview\lib\net452\Microsoft.Azure.Management.Reservations.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ function Test-GetCatalog
Assert-True { $item.Terms.Count -gt 0 }
Assert-True { $item.Locations.Count -gt 0 }
}

# Get CosmosDb catalog
$catalog = Get-AzureRmReservationCatalog -SubscriptionId $subscriptionId -ReservedResourceType CosmosDb
Foreach ($item in $catalog)
{
Assert-NotNull $item.ResourceType
Assert-NotNull $item.Name
Assert-True { $item.Terms.Count -gt 0 }
Assert-Null $item.Locations
}
}

<#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
- Additional information about change #1
-->
## Current Release
* Update to the latest .NET SDK version 1.9.0-preview.
* Add CosmosDb type in reserved resource enum type.
* Add name property in PatchProperties.

## Version 0.1.6
* Updated to the latest version of the Azure ClientRuntime.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class GetCatalog : AzureReservationsCmdletBase
public Guid SubscriptionId { get; set; }

[Parameter(Mandatory = true)]
[PSArgumentCompleter("VirtualMachines", "SqlDatabases", "SuseLinux")]
[PSArgumentCompleter("VirtualMachines", "SqlDatabases", "SuseLinux", "CosmosDb")]
[ValidateNotNullOrEmpty]
public string ReservedResourceType { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ public class PatchReservation : AzureReservationsCmdletBase
[ValidateNotNull]
public PSReservation Reservation { get; set; }

[Parameter(Mandatory = false)]
[ValidateNotNull]
public string Name { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see updated help documentation for the Name parameter. Also, please provide an example in the help using this parameter.


public override void ExecuteCmdlet()
{
if (ParameterSetName.Equals(Constants.ParameterSetNames.ObjectParameterSet))
Expand All @@ -68,11 +72,11 @@ public override void ExecuteCmdlet()
string subscriptionId = ValidateAndGetAppliedSubscription();
PreRegister(subscriptionId);

Patch = new Patch(AppliedScopeType, new List<string>() { AppliedScope }, InstanceFlexibility);
Patch = new Patch(AppliedScopeType, new List<string>() { AppliedScope }, InstanceFlexibility, Name);
}
else
{
Patch = new Patch(AppliedScopeType, instanceFlexibility: InstanceFlexibility);
Patch = new Patch(AppliedScopeType, instanceFlexibility: InstanceFlexibility, name: Name);
}
var response = new PSReservation(AzureReservationAPIClient.Reservation.Update(ReservationOrderId.ToString(), ReservationId.ToString(), Patch));
WriteObject(response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.Reservations" Version="1.8.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Reservations" Version="1.9.0-preview" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Azure.Management.Reservations">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Reservations.1.8.0-preview\lib\net452\Microsoft.Azure.Management.Reservations.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Reservations.1.9.0-preview\lib\net452\Microsoft.Azure.Management.Reservations.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration.Install" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ Update a `Reservation`.
### CommandLine (Default)
```
Update-AzureRmReservation -ReservationOrderId <Guid> -ReservationId <Guid> -AppliedScopeType <String>
[-AppliedScope <String>] [-InstanceFlexibility <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]
[-AppliedScope <String>] [-InstanceFlexibility <String>] [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### PipeObject
```
Update-AzureRmReservation -AppliedScopeType <String> [-AppliedScope <String>] [-InstanceFlexibility <String>]
-Reservation <PSReservation> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
-Reservation <PSReservation> [-Name <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```

Expand Down Expand Up @@ -107,6 +107,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -Name
{{Fill Name Description}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing a description for this parameter.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Making the change now. :)


```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Reservation
Pipe object parameter for `Reservation`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Azure.Management.Reservations" version="1.8.0-preview" targetFramework="net452" />
<package id="Microsoft.Azure.Management.Reservations" version="1.9.0-preview" targetFramework="net452" />
</packages>