Skip to content

Added Get-AzureRMAutomationHybridRunbookWorkerGroup cmdlet #2325

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

Merged
merged 11 commits into from
Jun 28, 2016
Merged

Added Get-AzureRMAutomationHybridRunbookWorkerGroup cmdlet #2325

merged 11 commits into from
Jun 28, 2016

Conversation

robplank
Copy link
Contributor

No description provided.

@azurecla
Copy link

Hi @robplank, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.azure.com.

TTYL, AZPRBOT;

@azuresdkci
Copy link

Can one of the admins verify this patch?

@markcowl
Copy link
Member

@robplank There are merge conflicts, please update

@jodoglevy Can someone from the automation team review this PR?

@azurecla
Copy link

@robplank, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.

Thanks, AZPRBOT;

Updates to Get-HybridRunbookWorkerGroup cmdlet

more updates to the Get-hybridRunbookWorkerGroup cmdlet

Final updates to Get-AzureRMAutomationHybridRunbookWorkerGroup

fixed reference name
@robplank
Copy link
Contributor Author

@markcowl @jodoglevy merge conflicts are resolved

this.AutomationAccountName = accountName;
//this.ID = hybridRunbookWorkerGroup.Id;
this.Name = hybridRunbookWorkerGroup.Name;
//this.Credential = hybridRunbookWorkerGroup.Credential;
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove if the commented lines are not needed

@robplank
Copy link
Contributor Author

@felixcho-msft @safeermohammed Requested updates have been made

</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
Copy link
Contributor

Choose a reason for hiding this comment

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

InformationAction and InformationVariable are common parameters in PowerShell 5. No need to document.

@felixcho-work
Copy link
Contributor

@robplank I may not be reading the latest commits properly, but should I be seeing diff's where the merge conflicts are resolved?

@robplank
Copy link
Contributor Author

I don't see any merge conflicts, please let me know if you are sure there is a conflict that still exists after my update to the pull request yesterday.

@robplank
Copy link
Contributor Author

@felixcho-msft help file has been updated, let me know if you see anything else that needs to be fixed

@@ -42,6 +42,15 @@
using Runbook = Microsoft.Azure.Commands.Automation.Model.Runbook;
using Schedule = Microsoft.Azure.Commands.Automation.Model.Schedule;
using Variable = Microsoft.Azure.Commands.Automation.Model.Variable;
<<<<<<< 5a3f20949198c648832d7ae2bed4ba88898a4a3d
Copy link
Contributor

Choose a reason for hiding this comment

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

@robplank Re: conflicts

I still see these in AutomationClient.cs:
<<<<<<< 5a3f20949198c648832d7ae2bed4ba88898a4a3d
I think I see it in 2 places?

@robplank
Copy link
Contributor Author

@felixcho-msft I removed those two lines.

@hovsepm
Copy link
Contributor

hovsepm commented May 26, 2016

@azuresdkci add to whitelist

@jodoglevy
Copy link

please don't merge yet, I will review today

@felixcho-work
Copy link
Contributor

Don’t worry. We missed the cut-off date. They will merge for next release.

  • Felix

From: Joe Levy [mailto:[email protected]]
Sent: Thursday, May 26, 2016 2:07 PM
To: Azure/azure-powershell [email protected]
Cc: Felix Cho [email protected]; Mention [email protected]
Subject: Re: [Azure/azure-powershell] Added Get-AzureRMAutomationHybridRunbookWorkerGroup cmdlet (#2325)

please don't merge yet, I will review today


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com//pull/2325#issuecomment-221994889

[OutputType(typeof(HybridRunbookWorkerGroup))]
public class GetAzureAutomationHybridWorkerGroup : AzureAutomationBaseCmdlet
{
[Parameter(ParameterSetName = AutomationCmdletParameterSets.ByName,Position = 2, Mandatory = false, ValueFromPipeline = true, HelpMessage = "The Hybrid Runbook Worker Group Name")]

Choose a reason for hiding this comment

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

name should be lowercase in the help message

@markcowl
Copy link
Member

@robplank @felixcho-msft @jodoglevy Not to throw a wrench in the works, but I don't see any tests for the new cmdlet. Are we planning to add tests? It's OK if we add them separately, later in the sprint, I just want to know what the plan is for testing the new cmdlet.

@markcowl
Copy link
Member

@robplank @felixcho-msft @jodoglevy ping? Not knowing the testing strategy here will prevent us from merging this PR.

@robplank
Copy link
Contributor Author

@markcowl do you just need a unit test added? I don't see how the test are called

@robplank
Copy link
Contributor Author

@markcowl unit test created, let me know if I am missing anything else

@@ -102,7 +102,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
Copy link
Member

Choose a reason for hiding this comment

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

@robplank We no longer accept MSTest tests - please convert this to xunit, and you will be good. Mainly this is just re-attributing the methods, as the model for tests is largely the same

@markcowl
Copy link
Member

@robplank Thanks for going above and beyond with this contribution. I think the feature team may want to add an end-to-end test, but I will not gate on that. I hate tpo ask for anything additional, but we have stopped allowing new MSTest tests, as there is significant overhead in running them, and some compatibility concenrs. If you convert this to xunit, and mark these as Check-in tests

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]

we will be able to merge.

@robplank
Copy link
Contributor Author

@markcowl let me know if the changes are not correct.

@@ -19,7 +21,8 @@ public class GetAzureAutomationHybridWorkerGroupTest : RMTestBase

private GetAzureAutomationHybridWorkerGroup cmdlet;

[TestInitialize]
[Fact]
Copy link
Member

@markcowl markcowl Jun 20, 2016

Choose a reason for hiding this comment

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

@robplank Not quite. This depends on test execution order, which may vary from test run to test run. There are two options for test setup in xunit:

Option 1: setup that runs at the start of each test in the class - in this case, just use the constructor, the class constructor for the test class automatically runs at the start of each test. There is no need for adding any attributes in this case, if this is what you want, removing the attributes from the constructor will do the appropriate thing here.

Option 2: setup that runs only once before any tests in the class are executed. For this, use the IClassFixtiure pattern. You can find a good example of this here:

The mechanisms for test seup are described in detail here: https://xunit.github.io/docs/shared-context.html if you are interested.

@robplank
Copy link
Contributor Author

@markcowl please check that latest commit

@markcowl
Copy link
Member

@robplank. I opened a PR against your branch that actually enables these tests as part of check-in, can you take a look - it would automatically be added to this PR if you merge

@robplank
Copy link
Contributor Author

Thanks @markcowl , the PR has been merged

@markcowl
Copy link
Member

@robplank It looks like merge conflicts have crept in, can you update the PR? Most likely this was caused by merging another PR that updated the test targets, so just accepting the upstream changes should work.

@robplank
Copy link
Contributor Author

@markcowl @felixcho-msft @safeermohammed if the build error is something I need to fix please let me know what the error is.

@markcowl
Copy link
Member

@azuresdkci retest this please

@markcowl
Copy link
Member

@robplank it is not something you need to worry about. It is one of four flaky tests in the check-in tests

@markcowl markcowl merged commit b9d401d into Azure:dev Jun 28, 2016
@jodoglevy
Copy link

@robplank thanks for the contribution!

@markcowl thanks for all the help on this.

@safeermohammed
Copy link
Contributor

@robplank thanks Rob for these new cmdlets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants