forked from jenkinsci/nomad-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:jenkinsci/nomad-plugin into upstr…
…eam-master * 'master' of github.com:jenkinsci/nomad-plugin: restrict visibility of attribute name to protected (jenkinsci#45) [maven-release-plugin] prepare for next development iteration [maven-release-plugin] prepare release v0.6.1 revert POST on doCheckName() (jenkinsci#44) [maven-release-plugin] prepare for next development iteration [maven-release-plugin] prepare release v0.6.0 add JENKINS_TUNNEL (jenkinsci#33) [maven-release-plugin] prepare for next development iteration [maven-release-plugin] prepare release v0.5.1 add Jenkinsfile bump version commiting fix to SECURITY-1058 (jenkinsci#42)
- Loading branch information
Showing
18 changed files
with
326 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/* `buildPlugin` step provided by: https://github.com/jenkins-infra/pipeline-library */ | ||
buildPlugin() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/java/org/jenkinsci/plugins/nomad/Api/Network.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.jenkinsci.plugins.nomad.Api; | ||
|
||
import java.util.List; | ||
|
||
public class Network { | ||
|
||
private Integer MBits; | ||
private List<Port> ReservedPorts; | ||
|
||
public Network(Integer mbits, List<Port> reservedPorts) { | ||
MBits = mbits; | ||
ReservedPorts = reservedPorts; | ||
} | ||
|
||
public Integer getMBits() { | ||
return MBits; | ||
} | ||
|
||
public void setMBits(Integer MBits) { | ||
this.MBits = MBits; | ||
} | ||
|
||
public List<Port> getReservedPorts() { | ||
return ReservedPorts; | ||
} | ||
|
||
public void setReservedPorts(List<Port> reservedPorts) { | ||
this.ReservedPorts = reservedPorts; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.jenkinsci.plugins.nomad.Api; | ||
|
||
import org.jenkinsci.plugins.nomad.NomadPortTemplate; | ||
|
||
public class Port { | ||
|
||
private String Label; | ||
private Integer Value; | ||
|
||
public Port(String label, Integer value) { | ||
this.Label = label; | ||
this.Value = value; | ||
} | ||
|
||
public Port(NomadPortTemplate template) { | ||
this.Label = template.getLabel(); | ||
this.Value = Integer.parseInt(template.getValue()); | ||
} | ||
|
||
public String getLabel() { | ||
return Label; | ||
} | ||
|
||
public void setLabel(String label) { | ||
this.Label = label; | ||
} | ||
|
||
public Integer getValue() { | ||
return Value; | ||
} | ||
|
||
public void setValue(Integer value) { | ||
this.Value = value; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/org/jenkinsci/plugins/nomad/Api/PortGroup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.jenkinsci.plugins.nomad.Api; | ||
|
||
import org.jenkinsci.plugins.nomad.NomadPortTemplate; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class PortGroup { | ||
|
||
private List<Port> ports = new ArrayList<>(); | ||
|
||
public PortGroup(List<? extends NomadPortTemplate> portTemplate) { | ||
for (NomadPortTemplate template : portTemplate) { | ||
ports.add(new Port(template)); | ||
} | ||
} | ||
|
||
public List<Port> getPorts() { | ||
return ports; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.