Skip to content

Commit

Permalink
DistributedEngines - class conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmelton committed Jul 25, 2021
1 parent bc8490e commit 962a5e5
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 55 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
title: "TssSiteSummary"
title: "SiteMetrics"
---

# TOPIC
This help topic describes the TssSiteMetric class in the Thycotic.SecretServer module
This help topic describes the Thycotic.PowerShell.DistributedEngines.SiteMetrics class in the Thycotic.SecretServer module

# CLASS
TssSiteMetric
Thycotic.PowerShell.DistributedEngines.SiteMetrics

# INHERITANCE
None

# DESCRIPTION
The TssSiteMetric class represents the SiteMetic object returned by Secret Server endpoint GET /distributed-engines/sites
The Thycotic.PowerShell.DistributedEngines.SiteMetrics class represents the SiteMetic object returned by Secret Server endpoint GET /distributed-engines/sites
List of Metrics for this site such as ConnectionStatusOffline, ConnectionStatusOnline, ActivationStatusPending, LostConnection, and more. Only returned on a search when IncludeSiteMetrics is true.

# CONSTRUCTORS
Expand All @@ -31,5 +31,4 @@ title: "TssSiteSummary"
# METHODS

# RELATED LINKS:
TssSiteSummary
Search-TssDistributedEngineSite
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
title: "TssSiteSummary"
title: "SiteSummary"
---

# TOPIC
This help topic describes the TssSiteSummary class in the Thycotic.SecretServer module
This help topic describes the Thycotic.PowerShell.DistributedEngines.SiteSummary class in the Thycotic.SecretServer module

# CLASS
TssSiteSummary
Thycotic.PowerShell.DistributedEngines.SiteSummary

# INHERITANCE
None

# DESCRIPTION
The TssSiteSummary class represents the SiteSummaryModel object returned by Secret Server endpoint GET /distributed-engines/sites
The Thycotic.PowerShell.DistributedEngines.SiteSummary class represents the SiteSummaryModel object returned by Secret Server endpoint GET /distributed-engines/sites

# CONSTRUCTORS
new()
Expand All @@ -39,7 +39,7 @@ title: "TssSiteSummary"
SiteId: integer (int32)
Id of Site

SiteMetrics: [TssSiteMetric[]]
SiteMetrics: SiteMetric[]
List of Metrics for this site such as ConnectionStatusOffline, ConnectionStatusOnline, ActivationStatusPending, LostConnection, and more. Only returned on a search when IncludeSiteMetrics is true.

SiteName: string
Expand Down
2 changes: 1 addition & 1 deletion docs/about_topics/distributed-engines/readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Distributed Engines
# Thycotic.PowerShell.DistributedEngines

{% include list.liquid all=true %}
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## OUTPUTS
### TssDomainSummary
### Thycotic.PowerShell.DirectoryServices.DomainSummary
## NOTES
Requires TssSession object returned by New-TssSession
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## OUTPUTS
### TssSiteSummary
### Thycotic.PowerShell.DistributedEngines.SiteSummary
## NOTES
Requires TssSession object returned by New-TssSession
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using System.Threading.Tasks;
using System.Management.Automation;
using System.Management.Automation.Runspaces;

namespace Thycotic.PowerShell.DistributedEngines
{
public class SiteMetrics
{
public string MetricDisplayName { get; set; }
public string MetricName { get; set; }
public int MetricValue { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Threading.Tasks;
using System.Management.Automation;
using System.Management.Automation.Runspaces;

namespace Thycotic.PowerShell.DistributedEngines
{
public class SiteSummary
{
public bool Active { get; set; }
public bool IsLocal { get; set; }
public DateTime? LastActivity { get; set; }
public int NumEnginesMissingNetFramework { get; set; }
public int OfflineEngineCount { get; set; }
public int OnlineEngineCount { get; set; }
public int SiteId { get; set; }
public SiteMetrics[] SiteMetrics { get; set; }
public string SiteName { get; set; }
}
}
28 changes: 0 additions & 28 deletions src/classes/distributed-engines/TssSiteSummary.class.ps1

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function Search-DistributedEngineSite {
Requires TssSession object returned by New-TssSession
#>
[CmdletBinding()]
[OutputType('TssSiteSummary')]
[OutputType('Thycotic.PowerShell.DistributedEngines.SiteSummary')]
param (
# TssSession object created by New-TssSession for authentication
[Parameter(Mandatory, ValueFromPipeline, Position = 0)]
Expand Down Expand Up @@ -102,7 +102,7 @@ function Search-DistributedEngineSite {
Write-Warning 'No Distributed Engine Sites found'
}
if ($restResponse.records) {
[TssSiteSummary[]]$restResponse.records
[Thycotic.PowerShell.DistributedEngines.SiteSummary[]]$restResponse.records
}
} else {
Write-Warning 'No valid session found'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Describe "$commandName verify parameters" {
}
}
Context "Command specific details" {
It "$commandName should set OutputType to TssSiteSummary" -TestCases $commandDetails {
$_.OutputType.Name | Should -Be 'TssSiteSummary'
It "$commandName should set OutputType to Thycotic.PowerShell.DistributedEngines.SiteSummary" -TestCases $commandDetails {
$_.OutputType.Name | Should -Be 'Thycotic.PowerShell.DistributedEngines.SiteSummary'
}
}
}

0 comments on commit 962a5e5

Please sign in to comment.