Skip to content

Commit

Permalink
xDnsServerSetting: Add read-only property DsAvailable (#69)
Browse files Browse the repository at this point in the history
- Fix DsAvailaable key missing (issue #66).
  • Loading branch information
claudiospizzi authored and johlju committed Apr 27, 2018
1 parent 5fe333a commit 060cdf3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ class MSFT_xDnsServerSetting : OMI_BaseResource
[Write, Description("Restricts the type of records that can be dynamically updated on the server, used in addition to the AllowUpdate settings on Server and Zone objects.")] Uint32 UpdateOptions;
[Write, Description("Specifies whether the DNS Server writes NS and SOA records to the authority section on successful response.")] Boolean WriteAuthorityNS;
[Write, Description("Time, in seconds, the DNS Server waits for a successful TCP connection to a remote server when attempting a zone transfer.")] Uint32 XfrConnectTimeout;
[Read, Description("Indicates whether there is an available DS on the DNS Server.")] Boolean DsAvailable;
};

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ Please check out common DSC Resources [contributing guidelines](https://github.c
* **UpdateOptions**: Restricts the type of records that can be dynamically updated on the server, used in addition to the AllowUpdate settings on Server and Zone objects.
* **WriteAuthorityNS**: Specifies whether the DNS Server writes NS and SOA records to the authority section on successful response.
* **XfrConnectTimeout**: Time, in seconds, the DNS Server waits for a successful TCP connection to a remote server when attempting a zone transfer.
* **DsAvailable**: Indicates whether there is an available DS on the DNS Server. This is a read-only property.

## Versions

Expand All @@ -142,6 +143,7 @@ Please check out common DSC Resources [contributing guidelines](https://github.c
regardless of connecting to a remote machine or the local machine. Now CimSessions are only utilized when a computername or
computername and credential are used. ([issue #53](https://github.com/PowerShell/xDnsServer/issues/53)).
* Fixed all PSSA rule warnings.
* Fix DsAvailaable key missing ([#66](https://github.com/PowerShell/xDnsServer/issues/66).

### 1.9.0.0

Expand Down
9 changes: 8 additions & 1 deletion Tests/Unit/MSFT_xDnsServerSetting.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ try
$mockGetDnsDiag = @{
FilterIPAddressList = '10.1.1.1','10.0.0.1'
}
$mockReadOnlyProperties = @{
DsAvailable = $true
}
#endregion Pester Test Initialization

#region Example state 1
Expand All @@ -176,10 +179,14 @@ try
{
$getResult[$key] | Should be $mockGetCimInstance[$key]
}
elseIf ($key -eq 'LogIPFilterList')
elseif ($key -eq 'LogIPFilterList')
{
$getResult[$key] | Should be $mockGetDnsDiag[$key]
}
if ($key -eq 'DsAvailable')
{
$getResult[$key] | Should Be $mockReadOnlyProperties[$key]
}
}
}

Expand Down

0 comments on commit 060cdf3

Please sign in to comment.