Skip to content

Commit

Permalink
Merge pull request #69 from SNikalaichyk/dev
Browse files Browse the repository at this point in the history
xWebsite - Implemented support for non-HTTP bindings
  • Loading branch information
Tyson J. Hayes committed Jan 27, 2016
2 parents f5556f7 + f6688a1 commit 39d1ab7
Show file tree
Hide file tree
Showing 6 changed files with 1,967 additions and 1,419 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DSCResource.Tests
DSCResource.Tests
1,149 changes: 675 additions & 474 deletions DSCResources/MSFT_xWebsite/MSFT_xWebsite.psm1

Large diffs are not rendered by default.

36 changes: 17 additions & 19 deletions DSCResources/MSFT_xWebsite/MSFT_xWebsite.schema.mof
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
[ClassVersion("1.0.0")]
Class MSFT_xWebBindingInformation
class MSFT_xWebBindingInformation
{
[write]UInt16 Port;
[Write,ValueMap{"http", "https"},Values{"http", "https"}] string Protocol;
[write]String IPAddress;
[write]String HostName;
[write]String CertificateThumbprint;
[write,ValueMap{"My", "WebHosting"},Values{"My", "WebHosting"}] string CertificateStoreName;
[write,ValueMap{"0","1","2","3"},Values{"0","1","2","3"}] string SSLFlags;
[Write,ValueMap{"http","https","msmq.formatname","net.msmq","net.pipe","net.tcp"},Values{"http","https","msmq.formatname","net.msmq","net.pipe","net.tcp"}] String Protocol;
[Write] String BindingInformation;
[Write] String IPAddress;
[Write] UInt16 Port;
[Write] String HostName;
[Write] String CertificateThumbprint;
[Write,ValueMap{"My", "WebHosting"},Values{"My", "WebHosting"}] String CertificateStoreName;
[Write,ValueMap{"0","1","2","3"},Values{"0","1","2","3"}] String SslFlags;
};


[ClassVersion("2.0.0"), FriendlyName("xWebsite")]
class MSFT_xWebsite : OMI_BaseResource
{
[Key] string Name;
[Required] string PhysicalPath;
[write,ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] string Ensure;
[write,ValueMap{"Started","Stopped"},Values{"Started", "Stopped"}] string State;
[write, EmbeddedInstance("MSFT_xWebBindingInformation"), Description("Hashtable containing binding information (Port, Protocol, IPAddress, HostName, CertificateThumbPrint, CertificateStore)")] string BindingInfo[];
[write] string ApplicationPool;
[read] string Id;
[write, Description("The default pages for the website")] String DefaultPage[];
[Write,ValueMap{"Present", "Absent"},Values{"Present", "Absent"}] String Ensure;
[Key] String Name;
[Required] String PhysicalPath;
[Write,ValueMap{"Started","Stopped"},Values{"Started", "Stopped"}] String State;
[Write] String ApplicationPool;
[Write, EmbeddedInstance("MSFT_xWebBindingInformation"), Description("Website's binding information in the form of an array of embedded instances of the MSFT_xWebBindingInformation CIM class.")] String BindingInfo[];
[Write] String DefaultPage[];
[Write] String EnabledProtocols;
};


12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ Currently, only FastCgiModule is supported.

* **Name**: The desired name of the website.
* **PhysicalPath**: The path to the files that compose the website.
* **State**: State of the website: { Started | Stopped }
* **BindingInfo**: Website's binding information.
* **State**: The state of the website: { Started | Stopped }
* **BindingInfo**: Website's binding information in the form of an array of embedded instances of the MSFT_xWebBindingInformation CIM class.
* **ApplicationPool**: The website’s application pool.
* **EnabledProtocols**: The protocols that are enabled for the website.
* **Ensure**: Ensures that the website is **Present** or **Absent**.

### xWebApplication
Expand Down Expand Up @@ -65,14 +66,17 @@ Currently, only FastCgiModule is supported.

### Unreleased

* Fixed issue in xWebApplication where Set-TargetResource created a folder instead of an applicaition
* Fixed an issue in xWebApplication where Set-TargetResource attempted to modify a folder instead of an application.
* Added Tests to xWebApplication which will allow more changes if desired.
* Fixed binding compare issue in xWebsite which was causing bindings to be changed every DSC check.
* Modified README.MD to clean up Code Formatting
* Modified all unit/integration tests to utilize template system.
* xWebAppPool is now has feature parity to cWebAppPool - should now support most changes.
* Added Unit tests to IISFeatureDelegation, general script clean up
* Refactored xIisHandle to load script variables once, added unit tests.
* xWebsite updated:
* Fixed an issue in bindings comparison which was causing bindings to be reassigned on every consistency check.
* Added support for the following binding protocols: `msmq.formatname`, `net.msmq`, `net.pipe`, `net.tcp`.
* Added support for setting the `EnabledProtocols` property.

### 1.8.0.0

Expand Down
16 changes: 8 additions & 8 deletions Tests/Integration/MSFT_xWebsite.Integration.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
$global:DSCModuleName = 'xWebAdministration'
$global:DSCResourceName = 'MSFT_xWebsite'
$Global:DSCModuleName = 'xWebAdministration'
$Global:DSCResourceName = 'MSFT_xWebsite'

#region HEADER
if ( (-not (Test-Path -Path '.\DSCResource.Tests\')) -or `
(-not (Test-Path -Path '.\DSCResource.Tests\TestHelper.psm1')) )
[String] $moduleRoot = Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $Script:MyInvocation.MyCommand.Path))
if ( (-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResource.Tests'))) -or `
(-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResource.Tests\TestHelper.psm1'))) )
{
& git @('clone','https://github.com/PowerShell/DscResource.Tests.git')
& git @('clone','https://github.com/PowerShell/DscResource.Tests.git',(Join-Path -Path $moduleRoot -ChildPath '\DSCResource.Tests\'))
}
else
{
& git @('-C',(Join-Path -Path (Get-Location) -ChildPath '\DSCResource.Tests\'),'pull')
& git @('-C',(Join-Path -Path $moduleRoot -ChildPath '\DSCResource.Tests\'),'pull')
}

Import-Module .\DSCResource.Tests\TestHelper.psm1 -Force
Import-Module (Join-Path -Path $moduleRoot -ChildPath 'DSCResource.Tests\TestHelper.psm1') -Force
$TestEnvironment = Initialize-TestEnvironment `
-DSCModuleName $Global:DSCModuleName `
-DSCResourceName $Global:DSCResourceName `
Expand Down
Loading

0 comments on commit 39d1ab7

Please sign in to comment.