Skip to content

Commit

Permalink
re-use the constants at VmDetailConstants
Browse files Browse the repository at this point in the history
  • Loading branch information
leolleeooleo committed Oct 1, 2021
1 parent 4025890 commit b8c1b18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Expand Up @@ -2493,11 +2493,11 @@ protected VideoDef createVideoDef(VirtualMachineTO vmTO) {
String videoHw = _videoHw;
int videoRam = _videoRam;
if (details != null) {
if (details.containsKey(VideoDef.VIDEO_MODEL)) {
videoHw = details.get(VideoDef.VIDEO_MODEL);
if (details.containsKey(VmDetailConstants.VIDEO_HARDWARE)) {
videoHw = details.get(VmDetailConstants.VIDEO_HARDWARE);
}
if (details.containsKey(VideoDef.VIDEO_RAM)) {
String value = details.get(VideoDef.VIDEO_RAM);
if (details.containsKey(VmDetailConstants.VIDEO_RAM)) {
String value = details.get(VmDetailConstants.VIDEO_RAM);
videoRam = NumbersUtil.parseInt(value, videoRam);
}
}
Expand Down
Expand Up @@ -1613,10 +1613,6 @@ public String toString() {
}

public static class VideoDef {

public static final String VIDEO_MODEL = "video.hardware";
public static final String VIDEO_RAM = "video.ram";

private String _videoModel;
private int _videoRam;

Expand Down

0 comments on commit b8c1b18

Please sign in to comment.