-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathJenkinsClientNodes.cs
More file actions
36 lines (31 loc) · 920 Bytes
/
JenkinsClientNodes.cs
File metadata and controls
36 lines (31 loc) · 920 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using JenkinsNET.Exceptions;
using JenkinsNET.Internal.Commands;
using JenkinsNET.Models;
namespace JenkinsNET
{
public class JenkinsClientNodes
{
private readonly IJenkinsContext context;
internal JenkinsClientNodes(IJenkinsContext context)
{
this.context = context;
}
/// <summary>
/// Gets the Jenkins Node information
/// </summary>
/// <exception cref="JenkinsNetException"></exception>
public IEnumerable<JenkinsNode> Get()
{
try {
var cmd = new NodesGetCommand(context);
cmd.Run();
return cmd.Result;
}
catch (Exception error) {
throw new JenkinsNetException("Failed to retrieve Jenkins description!", error);
}
}
}
}