Skip to content

Commit bf48ca8

Browse files
authored
Merge branch 'master' into jikma/adddataflow
2 parents efa9ce9 + d12dfeb commit bf48ca8

File tree

113 files changed

+47564
-1392
lines changed

Some content is hidden

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

113 files changed

+47564
-1392
lines changed

.azure-pipelines/powershell-core.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ jobs:
1818
windows:
1919
OSName: ${{ variables.WindowsName }}
2020
ImageName: ${{ variables.WindowsImage }}
21-
linux:
22-
OSName: ${{ variables.LinuxName }}
23-
ImageName: ${{ variables.LinuxImage }}
2421
macOS:
2522
OSName: ${{ variables.MacOSName }}
2623
ImageName: ${{ variables.MacOSImage }}
@@ -43,9 +40,6 @@ jobs:
4340
windows:
4441
OSName: ${{ variables.WindowsName }}
4542
ImageName: ${{ variables.WindowsImage }}
46-
linux:
47-
OSName: ${{ variables.LinuxName }}
48-
ImageName: ${{ variables.LinuxImage }}
4943
macOS:
5044
OSName: ${{ variables.MacOSName }}
5145
ImageName: ${{ variables.MacOSImage }}
@@ -68,9 +62,6 @@ jobs:
6862
windows:
6963
OSName: ${{ variables.WindowsName }}
7064
ImageName: ${{ variables.WindowsImage }}
71-
linux:
72-
OSName: ${{ variables.LinuxName }}
73-
ImageName: ${{ variables.LinuxImage }}
7465
macOS:
7566
OSName: ${{ variables.MacOSName }}
7667
ImageName: ${{ variables.MacOSImage }}

.github/ISSUE_TEMPLATE/az-module-bug-report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Az module bug report
33
about: Report errors or unexpected behaviors for the Az module
44
title: ''
5-
labels: ''
5+
labels: triage
66
assignees: ''
77

88
---

.github/ISSUE_TEMPLATE/az-preview-bug-report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Az 4.x preview bug report
33
about: Report errors or unexpected behaviors specifically for the Az 4.0 module in preview
44
title: ''
5-
labels: 'Az 4.x Preview', 'Azure PS Team'
5+
labels: Az 4.x Preview, Azure PS Team, triage
66
assignees: ''
77
---
88

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Feature request
33
about: Suggest a new feature or improvement
44
title: ''
5-
labels: Azure PS Team, Feature Request
5+
labels: Azure PS Team, Feature Request, triage
66
assignees: ''
77

88
---

.github/ISSUE_TEMPLATE/internal-issue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Internal issue
33
about: Azure PowerShell team only
44
title: ''
5-
labels: Azure PS Team
5+
labels: Azure PS Team, triage
66
assignees: ''
77

88
---

src/HealthcareApis/HealthcareApis.Test/HealthcareApis.Test.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.Azure.Management.HealthcareApis" Version="1.0.1-preview" />
14+
<PackageReference Include="Microsoft.Azure.Management.HealthcareApis" Version="1.0.2" />
1515
</ItemGroup>
1616

1717
<ItemGroup>
1818
<ProjectReference Include="..\HealthcareApis\HealthcareApis.csproj" />
1919
</ItemGroup>
20-
21-
20+
2221
</Project>

src/HealthcareApis/HealthcareApis.Test/ScenarioTests/HealthcareApisServiceTests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function Test-AzRmHealthcareApisService{
4646

4747
# Assert
4848
Assert-AreEqual $actual.Name $rname
49-
Assert-AreEqual $actual.Properties.CosmosDbConfiguration.OfferThroughput $offerThroughput
49+
Assert-AreEqual $actual.CosmosDbOfferThroughput $offerThroughput
5050
Assert-AreEqual $actual.Kind $kind
5151
#Update using parameters
5252
$newOfferThroughput = $offerThroughput - 600
@@ -55,7 +55,7 @@ function Test-AzRmHealthcareApisService{
5555
$updatedAccount = Get-AzHealthcareApisService -ResourceGroupName $rgname -Name $rname
5656
# Assert the update
5757
Assert-AreEqual $updatedAccount.Name $rname
58-
Assert-AreEqual $updatedAccount.Properties.CosmosDbConfiguration.OfferThroughput $newOfferThroughput
58+
Assert-AreEqual $updatedAccount.CosmosDbOfferThroughput $newOfferThroughput
5959

6060
$rname1 = $rname + "1"
6161
$created1 = New-AzHealthcareApisService -Name $rname1 -ResourceGroupName $rgname -Location $location -AccessPolicyObjectId $object_id -CosmosOfferThroughput $offerThroughput;
@@ -64,7 +64,7 @@ function Test-AzRmHealthcareApisService{
6464

6565
# Assert
6666
Assert-AreEqual $actual1.Name $rname1
67-
Assert-AreEqual $actual1.Properties.CosmosDbConfiguration.OfferThroughput $offerThroughput
67+
Assert-AreEqual $actual1.CosmosDbOfferThroughput $offerThroughput
6868

6969
$list = Get-AzHealthcareApisService -ResourceGroupName $rgname
7070

src/HealthcareApis/HealthcareApis.Test/SessionRecords/Microsoft.Azure.Commands.HealthcareApisService.Test.ScenarioTests.HealthcareApisServiceTests/TestAzRmHealthcareApisService.json

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

src/HealthcareApis/HealthcareApis/Az.HealthcareApis.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ PrivateData = @{
110110
# IconUri = ''
111111

112112
# ReleaseNotes of this module
113-
ReleaseNotes = '* Added Exception Handling around KeyNotFoundException'
113+
ReleaseNotes = '* Updated Powershell to latst version of SDK.'
114114

115115
# Prerelease string of this module
116116
# Prerelease = ''

src/HealthcareApis/HealthcareApis/ChangeLog.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,15 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21-
* Exception Handling
21+
* Updated the powershell version to 1.0.0
22+
* Updated the SDK version to 1.0.2
23+
* Update in tests to refer to new SDK version
24+
* Updated the output structure from nested to flattened.
2225

2326
## Version 0.1.2
2427
* Added Exception Handling around KeyNotFoundException
2528

29+
2630
## Version 0.1.1
2731
* Added Error Handling in all cmdlets
2832
* Fixed few typos

src/HealthcareApis/HealthcareApis/Common/HealthcareApisBaseCmdlet.cs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -115,23 +115,11 @@ protected void WriteHealthcareApisAccount(ServicesDescription healthcareApisAcco
115115
{
116116
if (healthcareApisAccount != null)
117117
{
118-
WriteObject(PSHealthcareApisService.Create(healthcareApisAccount));
118+
PSHealthcareApisService value = PSHealthcareApisService.Create(healthcareApisAccount);
119+
WriteObject(value);
119120
}
120121
}
121122

122-
protected void WriteHealthcareApisAccountList(
123-
IEnumerable<ServicesDescription> healthcareApisAccounts)
124-
{
125-
List<PSHealthcareApisService> output = new List<PSHealthcareApisService>();
126-
if (healthcareApisAccounts != null)
127-
{
128-
healthcareApisAccounts.ForEach(
129-
healthcareApisAccount => output.Add(PSHealthcareApisService.Create(healthcareApisAccount)));
130-
}
131-
132-
WriteObject(output, true);
133-
}
134-
135123
protected bool ValidateAndExtractName(string resourceId, out string resourceGroupName, out string resourceName)
136124
{
137125
ResourceIdentifier resourceIdentifier = new ResourceIdentifier(resourceId);

src/HealthcareApis/HealthcareApis/HealthcareApis.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<Import Project="$(MSBuildThisFileDirectory)..\..\Az.props" />
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.Azure.Management.HealthcareApis" Version="1.0.1-preview" />
11+
<PackageReference Include="Microsoft.Azure.Management.HealthcareApis" Version="1.0.2" />
1212
</ItemGroup>
1313

1414
</Project>

src/HealthcareApis/HealthcareApis/HealthcareApis/GetAzureRmHealthcareApisService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class GetAzureRmHealthcareApisService : HealthcareApisBaseCmdlet
4040
[Parameter(
4141
Mandatory = false,
4242
ParameterSetName = ListParameterSet,
43-
HelpMessage = "Resource Group Name.")]
43+
HelpMessage = "Resource Group Name.")]
4444
[ResourceGroupCompleter]
4545
[ValidateNotNullOrEmpty]
4646
public string ResourceGroupName { get; set; }

src/HealthcareApis/HealthcareApis/HealthcareApis/NewAzureRmHealthcareApisService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ private List<ServiceAccessPolicyEntry> GetAccessPolicies()
226226

227227
private Kind GetKind()
228228
{
229-
if(this.Kind == null && this.FhirVersion!=null)
229+
if (this.Kind == null && this.FhirVersion != null)
230230
{
231231
if (FhirVersion.ToLowerInvariant() == "r4")
232232
{
@@ -241,11 +241,11 @@ private Kind GetKind()
241241
throw new PSArgumentException(Resources.createService_InvalidFhirVersionMessage);
242242
}
243243
}
244-
else if(this.Kind== null && this.FhirVersion == null)
244+
else if (this.Kind == null && this.FhirVersion == null)
245245
{
246246
return Management.HealthcareApis.Models.Kind.FhirR4;
247247
}
248-
else if(this.FhirVersion != null)
248+
else if (this.FhirVersion != null)
249249
{
250250
return ParseKindFromVersion(this.FhirVersion);
251251
}

src/HealthcareApis/HealthcareApis/HealthcareApis/SetAzureRmHealthcareApisService.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,22 @@ public class SetAzureRmHealthcareApisService : HealthcareApisBaseCmdlet
7373
[ValidateNotNullOrEmpty]
7474
public string[] CorsOrigin { get; set; }
7575

76-
[Parameter(Mandatory = false,ParameterSetName = ServiceNameParameterSet, HelpMessage = "HealthcareApis FhirService List of Cors Headers. Specify HTTP headers which can be used during the request. Use \" * \" for any header.")]
77-
[Parameter(Mandatory = false,ParameterSetName = ResourceIdParameterSet, HelpMessage = "HealthcareApis FhirService List of Cors Headers. Specify HTTP headers which can be used during the request. Use \" * \" for any header.")]
76+
[Parameter(Mandatory = false, ParameterSetName = ServiceNameParameterSet, HelpMessage = "HealthcareApis FhirService List of Cors Headers. Specify HTTP headers which can be used during the request. Use \" * \" for any header.")]
77+
[Parameter(Mandatory = false, ParameterSetName = ResourceIdParameterSet, HelpMessage = "HealthcareApis FhirService List of Cors Headers. Specify HTTP headers which can be used during the request. Use \" * \" for any header.")]
7878
[ValidateNotNullOrEmpty]
7979
public string[] CorsHeader { get; set; }
8080

81-
[Parameter(Mandatory = false, ParameterSetName = ServiceNameParameterSet,HelpMessage = "HealthcareApis FhirService List of Cors Methods.")]
82-
[Parameter(Mandatory = false,ParameterSetName = ResourceIdParameterSet,HelpMessage = "HealthcareApis FhirService List of Cors Methods.")]
81+
[Parameter(Mandatory = false, ParameterSetName = ServiceNameParameterSet, HelpMessage = "HealthcareApis FhirService List of Cors Methods.")]
82+
[Parameter(Mandatory = false, ParameterSetName = ResourceIdParameterSet, HelpMessage = "HealthcareApis FhirService List of Cors Methods.")]
8383
[ValidateNotNullOrEmpty]
8484
public string[] CorsMethod { get; set; }
8585

86-
[Parameter(Mandatory = false,ParameterSetName = ServiceNameParameterSet,HelpMessage = "HealthcareApis FhirService Cors Max Age. Specify how long a result from a request can be cached in seconds. Example: 600 means 10 minutes.")]
87-
[Parameter(Mandatory = false,ParameterSetName = ResourceIdParameterSet,HelpMessage = "HealthcareApis FhirService Cors Max Age. Specify how long a result from a request can be cached in seconds. Example: 600 means 10 minutes.")]
86+
[Parameter(Mandatory = false, ParameterSetName = ServiceNameParameterSet, HelpMessage = "HealthcareApis FhirService Cors Max Age. Specify how long a result from a request can be cached in seconds. Example: 600 means 10 minutes.")]
87+
[Parameter(Mandatory = false, ParameterSetName = ResourceIdParameterSet, HelpMessage = "HealthcareApis FhirService Cors Max Age. Specify how long a result from a request can be cached in seconds. Example: 600 means 10 minutes.")]
8888
[ValidateNotNullOrEmpty]
8989
public int? CorsMaxAge { get; set; }
9090

91-
[Parameter(Mandatory = false,ParameterSetName = ServiceNameParameterSet, HelpMessage = "HealthcareApis FhirService AllowCorsCredentials.")]
91+
[Parameter(Mandatory = false, ParameterSetName = ServiceNameParameterSet, HelpMessage = "HealthcareApis FhirService AllowCorsCredentials.")]
9292
[Parameter(Mandatory = false, ParameterSetName = ResourceIdParameterSet, HelpMessage = "HealthcareApis FhirService AllowCorsCredentials.")]
9393
[ValidateNotNullOrEmpty]
9494
public SwitchParameter AllowCorsCredential { get; set; }
@@ -191,7 +191,7 @@ public override void ExecuteCmdlet()
191191
}
192192
case InputObjectParameterSet:
193193
{
194-
IList<PSHealthcareApisFhirServiceAccessPolicyEntry> entries = InputObject.Properties.AccessPolicies;
194+
IList<PSHealthcareApisFhirServiceAccessPolicyEntry> entries = InputObject.AccessPolicies;
195195
List<ServiceAccessPolicyEntry> accessPolicies = new List<ServiceAccessPolicyEntry>();
196196

197197
foreach (PSHealthcareApisFhirServiceAccessPolicyEntry entry in entries)
@@ -284,7 +284,7 @@ private ServicesDescription GenerateServiceDescription(ServicesDescription healt
284284

285285
private IDictionary<string, string> GetTags(ServicesDescription healthcareApisAccount)
286286
{
287-
if(this.Tag!=null && this.Tag.Count > 0)
287+
if (this.Tag != null && this.Tag.Count > 0)
288288
{
289289
Dictionary<string, string> tags = new Dictionary<string, string>();
290290
foreach (DictionaryEntry tag in this.Tag)
@@ -341,21 +341,21 @@ private ServicesDescription InputObjectToServiceDescription(ServicesDescription
341341
{
342342
AuthenticationConfiguration = new ServiceAuthenticationConfigurationInfo()
343343
{
344-
Authority = InputObject.Properties.AuthenticationConfiguration.Authority?? healthcareApisAccount.Properties.AuthenticationConfiguration.Authority,
345-
Audience = InputObject.Properties.AuthenticationConfiguration.Audience ?? healthcareApisAccount.Properties.AuthenticationConfiguration.Audience,
346-
SmartProxyEnabled = InputObject.Properties.AuthenticationConfiguration.SmartProxyEnabled !=healthcareApisAccount.Properties.AuthenticationConfiguration.SmartProxyEnabled ? InputObject.Properties.AuthenticationConfiguration.SmartProxyEnabled : healthcareApisAccount.Properties.AuthenticationConfiguration.SmartProxyEnabled
344+
Authority = InputObject.Authority ?? healthcareApisAccount.Properties.AuthenticationConfiguration.Authority,
345+
Audience = InputObject.Audience ?? healthcareApisAccount.Properties.AuthenticationConfiguration.Audience,
346+
SmartProxyEnabled = InputObject.SmartProxyEnabled != healthcareApisAccount.Properties.AuthenticationConfiguration.SmartProxyEnabled ? InputObject.SmartProxyEnabled : healthcareApisAccount.Properties.AuthenticationConfiguration.SmartProxyEnabled
347347
},
348348
CosmosDbConfiguration = new ServiceCosmosDbConfigurationInfo()
349349
{
350-
OfferThroughput = InputObject.Properties.CosmosDbConfiguration.OfferThroughput ?? healthcareApisAccount.Properties.CosmosDbConfiguration.OfferThroughput
350+
OfferThroughput = InputObject.CosmosDbOfferThroughput ?? healthcareApisAccount.Properties.CosmosDbConfiguration.OfferThroughput
351351
},
352352
CorsConfiguration = new ServiceCorsConfigurationInfo()
353353
{
354-
Origins = InputObject.Properties.CorsConfiguration.Origins ?? healthcareApisAccount.Properties.CorsConfiguration.Origins,
355-
Headers = InputObject.Properties.CorsConfiguration.Headers ?? healthcareApisAccount.Properties.CorsConfiguration.Headers,
356-
Methods = InputObject.Properties.CorsConfiguration.Methods ?? healthcareApisAccount.Properties.CorsConfiguration.Methods,
357-
MaxAge = InputObject.Properties.CorsConfiguration.MaxAge ?? healthcareApisAccount.Properties.CorsConfiguration.MaxAge,
358-
AllowCredentials = InputObject.Properties.CorsConfiguration.AllowCredentials ?? healthcareApisAccount.Properties.CorsConfiguration.AllowCredentials
354+
Origins = InputObject.CorsOrigins ?? healthcareApisAccount.Properties.CorsConfiguration.Origins,
355+
Headers = InputObject.CorsHeaders ?? healthcareApisAccount.Properties.CorsConfiguration.Headers,
356+
Methods = InputObject.CorsMethods ?? healthcareApisAccount.Properties.CorsConfiguration.Methods,
357+
MaxAge = InputObject.CorsMaxAge ?? healthcareApisAccount.Properties.CorsConfiguration.MaxAge,
358+
AllowCredentials = InputObject.CorsAllowCredentials ?? healthcareApisAccount.Properties.CorsConfiguration.AllowCredentials
359359
},
360360
AccessPolicies = accessPolicies
361361
},

src/HealthcareApis/HealthcareApis/Models/PSHealthcareApisService.cs

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Management.HealthcareApis.Models;
16+
using Newtonsoft.Json;
1617
using System;
1718
using System.Collections.Generic;
1819

@@ -28,28 +29,61 @@ public PSHealthcareApisService(ServicesDescription serviceDescription)
2829
this.Location = serviceDescription.Location;
2930
this.ResourceType = serviceDescription.Type;
3031
this.Tags = serviceDescription.Tags;
31-
this.Properties = new PSHealthcareApisServiceConfig(serviceDescription.Properties);
32+
this.CosmosDbOfferThroughput = serviceDescription.Properties.CosmosDbConfiguration?.OfferThroughput;
33+
this.CorsOrigins = serviceDescription.Properties.CorsConfiguration?.Origins;
34+
this.CorsHeaders = serviceDescription.Properties.CorsConfiguration?.Headers;
35+
this.CorsMethods = serviceDescription.Properties.CorsConfiguration?.Methods;
36+
this.CorsMaxAge = serviceDescription.Properties.CorsConfiguration?.MaxAge;
37+
this.CorsAllowCredentials = serviceDescription.Properties.CorsConfiguration?.AllowCredentials;
38+
this.Authority = serviceDescription.Properties.AuthenticationConfiguration?.Authority;
39+
this.Audience = serviceDescription.Properties.AuthenticationConfiguration?.Audience;
40+
this.SmartProxyEnabled = serviceDescription.Properties.AuthenticationConfiguration?.SmartProxyEnabled;
3241
this.Etag = serviceDescription.Etag;
3342
this.Kind = GetKindValue(serviceDescription.Kind);
43+
44+
var psAccessPolicies = new List<PSHealthcareApisFhirServiceAccessPolicyEntry>();
45+
foreach (ServiceAccessPolicyEntry accessPolicy in serviceDescription.Properties.AccessPolicies)
46+
{
47+
psAccessPolicies.Add(new PSHealthcareApisFhirServiceAccessPolicyEntry(accessPolicy));
48+
}
49+
50+
this.AccessPolicies = psAccessPolicies;
3451
}
3552

36-
public string ResourceGroupName { get; private set; }
53+
public IList<PSHealthcareApisFhirServiceAccessPolicyEntry> AccessPolicies { get; private set; }
3754

38-
public string Name { get; private set; }
55+
public string Audience { get; private set; }
56+
57+
public string Authority { get; private set; }
58+
59+
public bool? CorsAllowCredentials { get; private set; }
60+
public IList<string> CorsHeaders { get; private set; }
61+
62+
public int? CorsMaxAge { get; private set; }
63+
64+
public IList<string> CorsMethods { get; private set; }
65+
66+
public IList<string> CorsOrigins { get; private set; }
67+
68+
public int? CosmosDbOfferThroughput { get; private set; }
69+
70+
public string Etag { get; private set; }
3971

4072
public string Id { get; private set; }
4173

74+
public string Kind { get; private set; }
75+
4276
public string Location { get; private set; }
4377

44-
public string ResourceType { get; private set; }
78+
public string Name { get; private set; }
4579

46-
public string Kind { get; private set; }
80+
public string ResourceGroupName { get; private set; }
4781

4882
public IDictionary<string, string> Tags { get; private set; }
4983

50-
public PSHealthcareApisServiceConfig Properties { get; private set; }
84+
public string ResourceType { get; private set; }
5185

52-
public string Etag { get; private set; }
86+
public bool? SmartProxyEnabled { get; private set; }
5387

5488
public static PSHealthcareApisService Create(ServicesDescription healthcareApisAccount)
5589
{
@@ -73,7 +107,7 @@ private static string GetKindValue(Kind kind)
73107
switch (kind)
74108
{
75109
case Management.HealthcareApis.Models.Kind.Fhir:
76-
return "fhir-Stu3";
110+
return "fhir-R4";
77111
case Management.HealthcareApis.Models.Kind.FhirStu3:
78112
return "fhir-Stu3";
79113
case Management.HealthcareApis.Models.Kind.FhirR4:

src/HealthcareApis/HealthcareApis/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@
4545
// You can specify all the values or you can default the Build and Revision Numbers
4646
// by using the '*' as shown below:
4747
// [assembly: AssemblyVersion("0.7.1")]
48-
[assembly: AssemblyVersion("0.1.2")]
49-
[assembly: AssemblyFileVersion("0.1.2")]
48+
[assembly: AssemblyVersion("1.0.0")]
49+
[assembly: AssemblyFileVersion("1.0.0")]

0 commit comments

Comments
 (0)