Skip to content

Commit

Permalink
Disable & Enable agents in pool (#72)
Browse files Browse the repository at this point in the history
* added method to enable and disable agents in pool + unit tests

* added docs

* Updated parameter types for agent functions.

* Surfacing enabled on the Agent class.

* Surfacing enabled on the Agent class.
  • Loading branch information
Geertvdc authored and DarqueWarrior committed Aug 2, 2018
1 parent eb9f93c commit 391931b
Show file tree
Hide file tree
Showing 17 changed files with 418 additions and 22 deletions.
48 changes: 48 additions & 0 deletions .docs/Disable-VSTeamAgent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!-- #include "./common/header.md" -->

# Disable-VSTeamAgent

## SYNOPSIS

<!-- #include "./synopsis/Disable-VSTeamAgent.md" -->

## SYNTAX

## DESCRIPTION

<!-- #include "./synopsis/Disable-VSTeamAgent.md" -->

## EXAMPLES

## PARAMETERS

### -PoolId

Id of the pool.

```yaml
Type: int
Required: True
Accept pipeline input: true (ByValue)
```
### -Id
Id of the agent to disable.
```yaml
Type: int[]
Aliases: AgentID
Required: True
Accept pipeline input: true (ByPropertyName)
```
## INPUTS
### System.String
## OUTPUTS
## NOTES
## RELATED LINKS
48 changes: 48 additions & 0 deletions .docs/Enable-VSTeamAgent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!-- #include "./common/header.md" -->

# Enable-VSTeamAgent

## SYNOPSIS

<!-- #include "./synopsis/Enable-VSTeamAgent.md" -->

## SYNTAX

## DESCRIPTION

<!-- #include "./synopsis/Enable-VSTeamAgent.md" -->

## EXAMPLES

## PARAMETERS

### -PoolId

Id of the pool.

```yaml
Type: int
Required: True
Accept pipeline input: true (ByValue)
```
### -Id
Id of the agent to enable.
```yaml
Type: int[]
Aliases: AgentID
Required: True
Accept pipeline input: true (ByPropertyName)
```
## INPUTS
### System.String
## OUTPUTS
## NOTES
## RELATED LINKS
2 changes: 1 addition & 1 deletion .docs/Get-VSTeamPool.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
Id of the pool to return.

```yaml
Type: String
Type: int
Parameter Sets: ByID
Aliases: PoolID
Required: True
Expand Down
4 changes: 2 additions & 2 deletions .docs/Remove-VSTeamAgent.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
Id of the pool.

```yaml
Type: String
Type: int
Required: True
Accept pipeline input: true (ByValue)
```
Expand All @@ -31,7 +31,7 @@ Accept pipeline input: true (ByValue)
Id of the agent to remove.
```yaml
Type: int
Type: int[]
Aliases: AgentID
Required: True
Accept pipeline input: true (ByPropertyName)
Expand Down
1 change: 1 addition & 0 deletions .docs/synopsis/Disable-VSTeamAgent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Disables an agent in a pool.
1 change: 1 addition & 0 deletions .docs/synopsis/Enable-VSTeamAgent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Enables an agent in a pool.
8 changes: 6 additions & 2 deletions VSTeam.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@
'Show-VSTeamWorkItem',
'Get-VSTeamGitRef',
'Get-VSTeamAgent',
'Remove-VSTeamAgent')
'Remove-VSTeamAgent',
'Enable-VSTeamAgent',
'Disable-VSTeamAgent')

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
# CmdletsToExport = @()
Expand Down Expand Up @@ -304,7 +306,9 @@
'Remove-Policy',
'Get-GitRef',
'Get-Agent',
'Remove-Agent')
'Remove-Agent',
'Enable-Agent',
'Disable-Agent')

# DSC resources to export from this module
# DscResourcesToExport = @()
Expand Down
2 changes: 1 addition & 1 deletion docs/Get-VSTeamPool.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Returns the agent pools.
Id of the pool to return.

```yaml
Type: String
Type: int
Parameter Sets: ByID
Aliases: PoolID
Required: True
Expand Down
8 changes: 8 additions & 0 deletions docs/Team.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ Adds a work item to your project.

Clears the value stored in the default project parameter value.

### [Disable-VSTeamAgent](Disable-VSTeamAgent.md)

Disables an agent in a pool.

### [Enable-VSTeamAgent](Enable-VSTeamAgent.md)

Enables an agent in a pool.

### [Get-VSTeam](Get-VSTeam.md)

Returns a team.
Expand Down
8 changes: 8 additions & 0 deletions docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ Adds a work item to your project.

Clears the value stored in the default project parameter value.

### [Disable-VSTeamAgent](Disable-VSTeamAgent.md)

Disables an agent in a pool.

### [Enable-VSTeamAgent](Enable-VSTeamAgent.md)

Enables an agent in a pool.

### [Get-VSTeam](Get-VSTeam.md)

Returns a team.
Expand Down
Loading

0 comments on commit 391931b

Please sign in to comment.