forked from apache/cloudstack
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathUnmanagedInstanceTO.java
More file actions
463 lines (334 loc) · 10.2 KB
/
Copy pathUnmanagedInstanceTO.java
File metadata and controls
463 lines (334 loc) · 10.2 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.cloudstack.vm;
import static com.cloud.utils.NumbersUtil.toHumanReadableSize;
import java.util.List;
public class UnmanagedInstanceTO {
public enum PowerState {
PowerUnknown,
PowerOn,
PowerOff
}
private String name;
private String internalCSName;
private String path;
private PowerState powerState;
private PowerState cloneSourcePowerState;
private Integer cpuCores;
private Integer cpuCoresPerSocket;
private Integer memory;
private Integer cpuSpeed;
private String operatingSystemId;
private String operatingSystem;
private String clusterName;
private String hostName;
private List<Disk> disks;
private List<Nic> nics;
private String vncPassword;
private String bootType;
private String bootMode;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getInternalCSName() {
return internalCSName;
}
public void setInternalCSName(String internalCSName) {
this.internalCSName = internalCSName;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public PowerState getPowerState() {
return powerState;
}
public void setPowerState(PowerState powerState) {
this.powerState = powerState;
}
public PowerState getCloneSourcePowerState() {
return cloneSourcePowerState;
}
public void setCloneSourcePowerState(PowerState cloneSourcePowerState) {
this.cloneSourcePowerState = cloneSourcePowerState;
}
public Integer getCpuCores() {
return cpuCores;
}
public void setCpuCores(Integer cpuCores) {
this.cpuCores = cpuCores;
}
public Integer getCpuCoresPerSocket() {
return cpuCoresPerSocket;
}
public void setCpuCoresPerSocket(Integer cpuCoresPerSocket) {
this.cpuCoresPerSocket = cpuCoresPerSocket;
}
public Integer getMemory() {
return memory;
}
public void setMemory(Integer memory) {
this.memory = memory;
}
public Integer getCpuSpeed() {
return cpuSpeed;
}
public void setCpuSpeed(Integer cpuSpeed) {
this.cpuSpeed = cpuSpeed;
}
public String getOperatingSystemId() {
return operatingSystemId;
}
public void setOperatingSystemId(String operatingSystemId) {
this.operatingSystemId = operatingSystemId;
}
public String getOperatingSystem() {
return operatingSystem;
}
public void setOperatingSystem(String operatingSystem) {
this.operatingSystem = operatingSystem;
}
public String getClusterName() {
return clusterName;
}
public void setClusterName(String clusterName) {
this.clusterName = clusterName;
}
public String getHostName() {
return hostName;
}
public void setHostName(String hostName) {
this.hostName = hostName;
}
public List<Disk> getDisks() {
return disks;
}
public void setDisks(List<Disk> disks) {
this.disks = disks;
}
public List<Nic> getNics() {
return nics;
}
public void setNics(List<Nic> nics) {
this.nics = nics;
}
public String getVncPassword() {
return vncPassword;
}
public void setVncPassword(String vncPassword) {
this.vncPassword = vncPassword;
}
public String getBootType() {
return bootType;
}
public void setBootType(String bootType) {
this.bootType = bootType;
}
public String getBootMode() {
return bootMode;
}
public void setBootMode(String bootMode) {
this.bootMode = bootMode;
}
public static class Disk {
private String diskId;
private String label;
private Long capacity;
private String fileBaseName;
private String imagePath;
private String controller;
private Integer controllerUnit;
private Integer position;
private String chainInfo;
private String datastoreName;
private String datastoreHost;
private String datastorePath;
private int datastorePort;
private String datastoreType;
public String getDiskId() {
return diskId;
}
public void setDiskId(String diskId) {
this.diskId = diskId;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public Long getCapacity() {
return capacity;
}
public void setCapacity(Long capacity) {
this.capacity = capacity;
}
public String getFileBaseName() {
return fileBaseName;
}
public void setFileBaseName(String fileBaseName) {
this.fileBaseName = fileBaseName;
}
public String getImagePath() {
return imagePath;
}
public void setImagePath(String imagePath) {
this.imagePath = imagePath;
}
public String getController() {
return controller;
}
public void setController(String controller) {
this.controller = controller;
}
public Integer getControllerUnit() {
return controllerUnit;
}
public void setControllerUnit(Integer controllerUnit) {
this.controllerUnit = controllerUnit;
}
public Integer getPosition() {
return position;
}
public void setPosition(Integer position) {
this.position = position;
}
public String getChainInfo() {
return chainInfo;
}
public void setChainInfo(String chainInfo) {
this.chainInfo = chainInfo;
}
public String getDatastoreName() {
return datastoreName;
}
public void setDatastoreName(String datastoreName) {
this.datastoreName = datastoreName;
}
public String getDatastoreHost() {
return datastoreHost;
}
public void setDatastoreHost(String datastoreHost) {
this.datastoreHost = datastoreHost;
}
public String getDatastorePath() {
return datastorePath;
}
public void setDatastorePath(String datastorePath) {
this.datastorePath = datastorePath;
}
public String getDatastoreType() {
return datastoreType;
}
public void setDatastoreType(String datastoreType) {
this.datastoreType = datastoreType;
}
public void setDatastorePort(int datastorePort) {
this.datastorePort = datastorePort;
}
public int getDatastorePort() {
return datastorePort;
}
@Override
public String toString() {
return "Disk {" +
"diskId='" + diskId + '\'' +
", capacity=" + toHumanReadableSize(capacity) +
", controller='" + controller + '\'' +
", controllerUnit=" + controllerUnit +
"}";
}
}
public static class Nic {
private String nicId;
private String adapterType;
private String macAddress;
private String network;
private Integer vlan;
private Integer pvlan;
private String pvlanType;
private List<String> ipAddress;
private String pciSlot;
public String getNicId() {
return nicId;
}
public void setNicId(String nicId) {
this.nicId = nicId;
}
public String getAdapterType() {
return adapterType;
}
public void setAdapterType(String adapterType) {
this.adapterType = adapterType;
}
public String getMacAddress() {
return macAddress;
}
public void setMacAddress(String macAddress) {
this.macAddress = macAddress;
}
public String getNetwork() {
return network;
}
public void setNetwork(String network) {
this.network = network;
}
public Integer getVlan() {
return vlan;
}
public void setVlan(Integer vlan) {
this.vlan = vlan;
}
public Integer getPvlan() {
return pvlan;
}
public void setPvlan(Integer pvlan) {
this.pvlan = pvlan;
}
public String getPvlanType() {
return pvlanType;
}
public void setPvlanType(String pvlanType) {
this.pvlanType = pvlanType;
}
public List<String> getIpAddress() {
return ipAddress;
}
public void setIpAddress(List<String> ipAddress) {
this.ipAddress = ipAddress;
}
public String getPciSlot() {
return pciSlot;
}
public void setPciSlot(String pciSlot) {
this.pciSlot = pciSlot;
}
@Override
public String toString() {
return "Nic{" +
"nicId='" + nicId + '\'' +
", adapterType='" + adapterType + '\'' +
", macAddress='" + macAddress + '\'' +
"}";
}
}
}