Skip to content
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

xWebsite - Implemented support for non-HTTP bindings #69

Merged
merged 12 commits into from
Jan 27, 2016

Conversation

SNikalaichyk
Copy link
Contributor

  • Implemented support for the following binding protocols: "msmq.formatname", "net.msmq", "net.pipe", "net.tcp".
  • Implemented support for setting the "EnabledProtocols" property.
  • Test-* functions updated to return $true if the tested object is valid, is in the desired state, and does not require modification.
  • The module was redesigned and refactored.
  • Unit tests updated.

- Implemented support for the following binding protocols:
"msmq.formatname", "net.msmq", "net.pipe", "net.tcp".
- Implemented support for setting the "EnabledProtocols" property.
- Test-* functions updated to return $true if the tested object is
valid, is in the desired state, and does not require modification.
- The module was redesigned and refactored.
- Unit tests updated.
@msftclas
Copy link

Hi @SNikalaichyk, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft and real humans are currently evaluating your PR.

TTYL, MSBOT;

@SNikalaichyk SNikalaichyk changed the title Implemented support for non-HTTP bindings xWebsite - Implemented support for non-HTTP bindings Dec 11, 2015
@@ -110,6 +118,7 @@ function Set-TargetResource
[String]
$State = 'Started',

[ValidateLength(1, 64)]

Choose a reason for hiding this comment

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

Could you help me understand this change and what we're hoping to acomplish?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The application pool name must contain between 1 and 64 characters.

@KarolKaczmarek KarolKaczmarek added the needs review The pull request needs a code review. label Jan 6, 2016
[Required] String PhysicalPath;
[Write,ValueMap{"Started","Stopped"},Values{"Started", "Stopped"}] String State;
[Write] String ApplicationPool;
[Write, EmbeddedInstance("MSFT_xWebBindingInformation"), Description("Hashtable containing binding information")] String BindingInfo[];
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't a hash table, but instead an array of embedded instances. The description should be improved.

@TravisEz13
Copy link
Contributor

Add-windowsfeature should not be needed for unit test, and is not included in the current unit test suite. Please merge with the latest code.

@TravisEz13 TravisEz13 added waiting for author response The pull request is waiting for the author to respond to comments in the pull request. and removed needs review The pull request needs a code review. labels Jan 14, 2016
@SNikalaichyk
Copy link
Contributor Author

Hi @TravisEz13,
Your requirements have been implemented.

@TravisEz13
Copy link
Contributor

MSFT_xWebsite.psm1 line 866-869

        catch
        {
            throw $_.Exception.Message
        }

You should throw the exception, not the message.

@tysonjhayes
Copy link

MSFT_xWebsite.psm1 - General
Could we please move any verbose messages into the LocalizedData and call them like:

Write-Verbose -Message ( @( "$($MyInvocation.MyCommand): "
        $($LocalizedData.Key) -f $Parameter
        ) -join '')

When we eventually get around to PRs that do translation of the strings we can reference the right things.

MSFT_xWebsite.psm1 - Line - 51/140
Could we change this to use the Helper Module located in the root of the DSCResource Folder so we consistently throw the same message?

MSFT_xWebsite.psm1 - Line 94
Why are we adding Id as a return in Get-TargetResource? It doesn't look like we've added it as a parameter else where. Could we remove it?

MSFT_xWebsite.psm1 - Line 344
Why is this changed to elseif from else? Ensure can only be 'Absent' or 'Present' so we have no need for a third option, could we please revert this?

MSFT_xWebsite.psm1 - Line 530
Out of curisoty why are we filtering this to http/https can we have duplicate bindings with other protocols?

MSFT_xWebsite.psm1 - Line 946/947
Could you change this to [ValidateNotNullOrEmpty()] that covers both of these checks.

MSFT_xWebsite.psm1 - Line 689
In the Format-IPAddressString you throw an exception if it can't format but then catch and rethrow the exception. Let's just move this catch into the Format-IPAddress and handle it there (or just remove the try/catch in format-ipaddress and bubble it up here).

- Verbose messages moved to LocalizedData.
- Updated to use helper module
@SNikalaichyk
Copy link
Contributor Author

All of your requirements have been implemented.

MSFT_xWebsite.psm1 - Line 946/947
Could you change this to [ValidateNotNullOrEmpty()] that covers both of these checks.

I allow null and empty strings to be passed to the Format-IPAddressString and Test-PortNumber helper functions, not disallow.

MSFT_xWebsite.psm1 - Line 530
Out of curisoty why are we filtering this to http/https can we have duplicate bindings with other protocols?

Yes, it is possible to add identical non-standard bindings (such as "net.tcp") to different sites.

@TravisEz13 TravisEz13 added needs review The pull request needs a code review. and removed waiting for author response The pull request is waiting for the author to respond to comments in the pull request. labels Jan 21, 2016
@TravisEz13
Copy link
Contributor

Please include a summary of changes in an unreleased version change per the contribution guidelines

* Test scripts updated to use the latest templates.
* README updated.
@SNikalaichyk
Copy link
Contributor Author

Can you please re-run AppVeyor build? For some reason it timed out during the last commit.

@TravisEz13
Copy link
Contributor

I triggered a rerun in AppVeyor. It hasn't started yet.

@tysonjhayes
Copy link

LGTM. Thanks @SNikalaichyk

tysonjhayes pushed a commit that referenced this pull request Jan 27, 2016
xWebsite - Implemented support for non-HTTP bindings
@tysonjhayes tysonjhayes merged commit 39d1ab7 into dsccommunity:dev Jan 27, 2016
@vors vors removed the needs review The pull request needs a code review. label Jan 27, 2016
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.

6 participants