-
Notifications
You must be signed in to change notification settings - Fork 4k
New PowerBI Dedicated module #5010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi some comments to take a look at.
In addition, there are a few additional things that need to be done.
(1) There are a few other files missing that you'll need in your project, such as a ChangeLog.md
, documentation
folder containing the breaking change markdown files, etc. You can check out the PowerBIEmbedded
project as a guide to the files you'll need.
(2) You will need to regenerate the .wxi
file so your module is a part of the installer. You can follow this guide for more information on how to do so.
(3) In order for your tests to run, you will need to add an entry for your test dll in the TestMappings.json
file.
(4) You will need to deprecate the AzureRM.PowerBIEmbedded
module. To do so, you will want to add a warning at the beginning of each cmdlet execution stating that the AzureRM.PowerBIEmbedded
module will be deprecated in an upcoming breaking change release, and that users should use the AzureRM.PowerBI
module instead.
# ProcessorArchitecture = '' | ||
|
||
# Modules that must be imported into the global environment prior to importing this module | ||
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '3.4.0'; }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi this should be in-sync with the latest version of AzureRM.Profile
, which is 4.0.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
# RootModule = '' | ||
|
||
# Version number of this module. | ||
ModuleVersion = '1.0.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi is this service in public preview? If so, then this should release as 0.1.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is GM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry.. GA so I leave the version 1.0.0
Copyright = '� Microsoft Corporation. All rights reserved.' | ||
|
||
# Description of the functionality provided by this module | ||
Description = 'Microsoft Azure PowerShell - PowerBI Embedded Capacity' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi please change this description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
FunctionsToExport = @() | ||
|
||
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. | ||
CmdletsToExport = 'Resume-AzureRmPowerBIEmbeddedCapacity', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi should these cmdlets have the prefix AzureRmPowerBIDedicated
, or is AzureRmPowerBIEmbedded
the correct prefix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AzureRmPowerBIEmbeddedCapacity
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '3.4.0'; }) | ||
|
||
# Assemblies that must be loaded prior to importing this module | ||
# RequiredAssemblies = @() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi uncomment this field and put your management SDK dll in this list (i.e., .\Microsoft.Azure.Management.PowerBIDedicated.dll
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("Commands.PowerBIDedicated")] | ||
[assembly: AssemblyDescription("")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi please fill in as much information as you can. You can use the AssemblyInfo.cs
file in Compute's project as an example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Administrator : {{[email protected]}} | ||
State : Succeeded | ||
ProvisioningState : Succeeded | ||
Id : /subscriptions/78e47976-009f-4d4a-a961-6046cdabf459/resourceGroups/testRG/providers/Microsoft.PowerBIDedicated/capacities/testcapacity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi not sure if you mind this subscription id being publicly visible in the example
## PARAMETERS | ||
|
||
### -DefaultProfile | ||
The credentials, account, tenant, and subscription used for communication with azure.```yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi this is a bug in the platyPS
module - you will need to move the ```yaml
string at the end of this line to a line by itself. Other parameters in this file follow the correct model. Please check all other markdown files for instances of this trailing ```yaml
string in parameter descriptions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -0,0 +1,7 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<packages> | |||
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net452" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi you will need to add your management SDK to this file, and you can go ahead and remove all of the other references found in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -0,0 +1,132 @@ | |||
# | |||
# Module manifest for module 'PSGet_AzureRM.PowerBIDedicated' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi sent another email about changing the name of this module to AzureRM.PowerBI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi more comments to take a look at
--> | ||
## Current Release | ||
|
||
## Version 1.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi please remove the ## Version 1.0.0
header and move the below information to be under the ## Current Release
header
<DelaySign>true</DelaySign> | ||
<SignAssembly>true</SignAssembly> | ||
<AssemblyOriginatorKeyFile>MSSharedLibKey.snk</AssemblyOriginatorKeyFile> | ||
<DelaySign>true</DelaySign> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi looks like you repeated an entry for <SignAssembly>
, <AssemblyOriginatorKeyFile>
, and <DelaySign>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi looks like this is still an issue
HelpMessage = "Name of resource group under which the user want to retrieve the capacity.")] | ||
[Parameter( | ||
ParameterSetName = CapacityParameterSet, | ||
Mandatory = false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi ResourceGroupName
should be mandatory in the parameter set with Name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name can go also without ResourceGroupName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
{ | ||
// List all capacities in given resource group if avaliable otherwise all capacities in the subscription | ||
var list = PowerBIClient.ListCapacities(ResourceGroupName); | ||
list.ForEach(capacity => WriteObject(capacity)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi for consistency, I would recommend changing this to WriteObject(list, true)
, which will enumerate the objects in the list for you and write them to the output stream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
{ | ||
[Cmdlet(VerbsCommon.Get, "AzureRmPowerBIEmbeddedCapacity"), | ||
OutputType(typeof(List<PSDedicatedCapacity>))] | ||
public class GetAzurePowerBIEmbeddedCapacity : PowerBICmdletBase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi the naming of these cmdlets still confuses me - you are receiving a DedicatedCapacity
object from the server and transforming it into a PSDedicatedCapacity
object, but the cmdlet is called Get-AzureRmPowerBIEmbeddedCapacity
instead of Get-AzureRmPowerBIDedicatedCapacity
. I was under the impression that PowerBIEmbedded
objects are separate from PowerBIDedicated
objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PSDedicatedCapacity changed to PSPowerBIEmbeddedCapacity
|
||
public override void ExecuteCmdlet() | ||
{ | ||
string capacityName = string.Empty; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi same comment about assigning this to Name
and removing the if-statement
Mandatory = false, | ||
HelpMessage = "Name of resource group under which want to test the capacity.")] | ||
[ValidateNotNullOrEmpty] | ||
public string ResourceGroupName { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi what value does ResourceGroupName
provide if Name
is unique?
|
||
namespace Microsoft.Azure.Commands.PowerBI | ||
{ | ||
[Cmdlet(VerbsData.Update, "AzureRmPowerBIEmbeddedCapacity", SupportsShouldProcess = true), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi same comment about DefaultParameterSetName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
|
||
public override void ExecuteCmdlet() | ||
{ | ||
string capacityName = string.Empty; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi same comment about setting this to Name
and removing the below if-statement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
{ | ||
get | ||
{ | ||
return _capacity.Sku.Name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi for Sku
and Tier
properties, should we be null-checking _capacity.Sku
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add check
Mandatory = true, | ||
HelpMessage = "Azure region where the capacity should be created.")] | ||
[ValidateNotNullOrEmpty] | ||
public string Location { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi please consider adding the LocationCompleter
for your creation scenarios that have a Location
parameter: https://github.com/Azure/azure-powershell/wiki/PowerShell-Cmdlet-Design-Guidelines#location-completer
This will allow users to tab through valid locations in which they can create the given resource (by using the resource type to determine valid locations)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added. thanks
@selasagi two more comments: (1) Please add the (2) Are you going to deprecate the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi some additional comments that need to be resolved
@@ -1687,6 +1687,30 @@ Global | |||
{8E5612F5-4F26-49CA-B9AC-67A4C1DB74F3}.Release|x64.Build.0 = Release|Any CPU | |||
{8E5612F5-4F26-49CA-B9AC-67A4C1DB74F3}.Release|x86.ActiveCfg = Release|Any CPU | |||
{8E5612F5-4F26-49CA-B9AC-67A4C1DB74F3}.Release|x86.Build.0 = Release|Any CPU | |||
{9056F1E3-0B1D-46CA-A435-F1E9AAE6DCC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi are the changes in this file still necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry.. this one belong to Commands.AnalysisServices.Test.csproj. shouldn't remove
@@ -19,36 +19,19 @@ | |||
--> | |||
## Current Release | |||
|
|||
## Version 4.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi please revert the deletions made to this file - the new content you are adding can remain under the ## Current Release
header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -12,7 +12,7 @@ | |||
# RootModule = '' | |||
|
|||
# Version number of this module. | |||
ModuleVersion = '4.0.0' | |||
ModuleVersion = '5.0.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi please revert this version bump - we will handle bumping the versions during the release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -112,8 +120,7 @@ PrivateData = @{ | |||
# IconUri = '' | |||
|
|||
# ReleaseNotes of this module | |||
ReleaseNotes = '* Add support for online help | |||
- Run Get-Help with the -Online parameter to open the online help in your default Internet browser' | |||
ReleaseNotes = '* Add support for PowerBI Embedded Capacity' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi please revert this change to the release notes - we will handle updating this section during the release using our tooling
@@ -0,0 +1,132 @@ | |||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi can this file be remove? I thought the cmdlets were being shipped with AzureRM.PowerBIEmbedded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
@@ -0,0 +1,229 @@ | |||
<?xml version="1.0" encoding="utf-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi any reason you are creating separate cmdlet and test projects for the new cmdlets? Why can't everything be contained in Commands.PowerBIEmbedded.Test
and Commands.Management.PowerBI
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to leave it separate because it will be easier later to remove the commands and the tests of the WorkspaceCollection
if (PassThru.IsPresent) | ||
{ | ||
// Update the capacity current state | ||
if (!PowerBIClient.TestCapacity(resourceGroupName, capacityName, out capacity)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi why is this second TestCapacity
call being made when PassThru
is provided? Shouldn't it be made regardless of whether or not the user wants output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If output required, I want that the output capacity state will be updateed/synced
if (PassThru.IsPresent) | ||
{ | ||
// Update the capacity current state | ||
if (!PowerBIClient.TestCapacity(resourceGroupName, capacityName, out capacity)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi same comment
tools/AzureRM/AzureRM.psd1
Outdated
@@ -87,6 +87,7 @@ RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; RequiredVersion = '4.0.0'; | |||
@{ModuleName = 'AzureRM.Network'; RequiredVersion = '5.0.0'; }, | |||
@{ModuleName = 'AzureRM.NotificationHubs'; RequiredVersion = '4.0.0'; }, | |||
@{ModuleName = 'AzureRM.OperationalInsights'; RequiredVersion = '4.0.0'; }, | |||
@{ModuleName = 'AzureRM.PowerBI'; RequiredVersion = '1.0.0'; }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi same comment - I thought the cmdlets would be shipped with AzureRM.PowerBIEmbedded
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi a few more comments. Also, are you still deprecating the existing workspace cmdlets in the future? If so, then you should add an Obsolete
attribute on each of the cmdlets so users will know that they should use the new cmdlets you are adding moving forward.
- Modifies an instance of PowerBI Embedded Capacity | ||
|
||
-## Version 4.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi looks like these headers have a -
character in front of them, which is affecting how the markdown is being rendered
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
setup/azurecmdfiles.wxi
Outdated
@@ -885,6 +885,9 @@ | |||
<Component Id="cmpA7B72722B1AC91C0B6B117CEAB00E3C0" Guid="*"> | |||
<File Id="fil40386C22E607E953293F5632EAC6393E" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.PowerBIEmbedded\Microsoft.Azure.Commands.Management.PowerBIEmbedded.dll-Help.xml" /> | |||
</Component> | |||
<Component Id="cmp20C58BA5A8D7263E84BE2BCB10783E8A" Guid="*"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi the .wxi
file should be regenerated since you are adding a couple new assemblies to the PowerBI
project
@@ -0,0 +1,24 @@ | |||
using System; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi this file is missing a license header
@@ -0,0 +1,36 @@ | |||
using System.Reflection; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi this file is missing a license header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selasagi both AssemblyVersion
and AssemblyFileVersion
should match the module version of AzureRM.PowerBIEmbedded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in commands & tests projects
Description
This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.
General Guidelines
Testing Guidelines
Cmdlet Signature Guidelines
ShouldProcess
and haveSupportShouldProcess=true
specified in the cmdlet attribute. You can find more information onShouldProcess
here.OutputType
attribute if any output is produced - if the cmdlet produces no output, it should implement aPassThru
parameter.Cmdlet Parameter Guidelines