1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.redhat.vmtruckloader.service;
23
24 import lombok.Data;
25
26
27
28
29
30
31
32 @Data
33 public class MachineSpecification {
34
35 public MachineSpecification() {}
36
37 public MachineSpecification(String machineName) {
38 this.hostname = machineName;
39 }
40 private String env;
41 private String hostname;
42 private String role;
43 private String MAC;
44 private String ipAddress;
45 private String VLAN;
46 private String resourcePoolName;
47 private String datastoreName;
48 private String folder;
49 private int nbCpu;
50 private int vRAM;
51 private int diskSize = 20;
52
53 public String getVmName() {
54 return hostname;
55 }
56
57 public MachineSpecification addVLAN(String string) {
58 this.VLAN = string;
59 return this;
60 }
61
62 public MachineSpecification addRole(String string) {
63 role = string;
64 return this;
65 }
66
67 public MachineSpecification addEnv(String env) {
68 this.env = env;
69 return this;
70 }
71
72 public MachineSpecification addIpAddress(String string) {
73 ipAddress = string;
74 return this;
75 }
76
77 public MachineSpecification addResourcePool(String string) {
78 resourcePoolName = string;
79 return this;
80 }
81
82 public MachineSpecification addDatastore(String datastoreName) {
83 this.datastoreName = datastoreName;
84 return this;
85 }
86
87 public MachineSpecification addCpus(int i) {
88 this.nbCpu = i;
89 return this;
90 }
91
92 public MachineSpecification addRam(int ram) {
93 this.vRAM = ram;
94 return this;
95 }
96
97 public MachineSpecification addMacAddress(String macAddress) {
98 this.MAC = macAddress;
99 return this;
100 }
101 }