@Test public void testGetPVbootloaderArgs() throws Exception { final String os_name_Suse10Sp2_64 = "SUSE Linux Enterprise Server 10 SP2 (64-bit)"; final String os_name_Suse10Sp2_32 = "SUSE Linux Enterprise Server 10 SP2 (32-bit)"; final String os_name_Suse11Sp3_64 = "SUSE Linux Enterprise Server 11 SP3 (64-bit)"; final String os_name_Suse11Sp3_32 = "SUSE Linux Enterprise Server 11 SP3 (32-bit)"; final String os_name_Windows8_64 = "Windows 8 (64-bit)"; final String os_name_Windows8_32 = "Windows 8 (32-bit)"; final String pvBootLoaderArgs_32 = "--kernel /boot/vmlinuz-xenpae --ramdisk /boot/initrd-xenpae"; final String pvBootLoaderArgs_64 = "--kernel /boot/vmlinuz-xen --ramdisk /boot/initrd-xen"; Assert.assertEquals(CitrixHelper.getPVbootloaderArgs(os_name_Suse10Sp2_32), pvBootLoaderArgs_32); Assert.assertEquals(CitrixHelper.getPVbootloaderArgs(os_name_Suse10Sp2_64), pvBootLoaderArgs_64); Assert.assertEquals(CitrixHelper.getPVbootloaderArgs(os_name_Suse11Sp3_32), pvBootLoaderArgs_32); Assert.assertEquals(CitrixHelper.getPVbootloaderArgs(os_name_Suse11Sp3_64), pvBootLoaderArgs_64); Assert.assertEquals(CitrixHelper.getPVbootloaderArgs(os_name_Windows8_32), ""); Assert.assertEquals(CitrixHelper.getPVbootloaderArgs(os_name_Windows8_64), ""); }
public static String getPVbootloaderArgs(final String guestOS) { if (guestOS.startsWith("SUSE Linux Enterprise Server")) { if (guestOS.contains("64-bit")) { return "--kernel /boot/vmlinuz-xen --ramdisk /boot/initrd-xen"; } else if (guestOS.contains("32-bit")) { return "--kernel /boot/vmlinuz-xenpae --ramdisk /boot/initrd-xenpae"; } } return ""; }
CitrixHelper { public static String getPVbootloaderArgs(final String guestOS) { if (guestOS.startsWith("SUSE Linux Enterprise Server")) { if (guestOS.contains("64-bit")) { return "--kernel /boot/vmlinuz-xen --ramdisk /boot/initrd-xen"; } else if (guestOS.contains("32-bit")) { return "--kernel /boot/vmlinuz-xenpae --ramdisk /boot/initrd-xenpae"; } } return ""; } }
CitrixHelper { public static String getPVbootloaderArgs(final String guestOS) { if (guestOS.startsWith("SUSE Linux Enterprise Server")) { if (guestOS.contains("64-bit")) { return "--kernel /boot/vmlinuz-xen --ramdisk /boot/initrd-xen"; } else if (guestOS.contains("32-bit")) { return "--kernel /boot/vmlinuz-xenpae --ramdisk /boot/initrd-xenpae"; } } return ""; }  }
CitrixHelper { public static String getPVbootloaderArgs(final String guestOS) { if (guestOS.startsWith("SUSE Linux Enterprise Server")) { if (guestOS.contains("64-bit")) { return "--kernel /boot/vmlinuz-xen --ramdisk /boot/initrd-xen"; } else if (guestOS.contains("32-bit")) { return "--kernel /boot/vmlinuz-xenpae --ramdisk /boot/initrd-xenpae"; } } return ""; }  static long getXenServerStaticMax(final String stdType, final boolean bootFromCD); static long getXenServerStaticMin(final String stdType, final boolean bootFromCD); static String getProductVersion(final Host.Record record); static String getPVbootloaderArgs(final String guestOS); }
CitrixHelper { public static String getPVbootloaderArgs(final String guestOS) { if (guestOS.startsWith("SUSE Linux Enterprise Server")) { if (guestOS.contains("64-bit")) { return "--kernel /boot/vmlinuz-xen --ramdisk /boot/initrd-xen"; } else if (guestOS.contains("32-bit")) { return "--kernel /boot/vmlinuz-xenpae --ramdisk /boot/initrd-xenpae"; } } return ""; }  static long getXenServerStaticMax(final String stdType, final boolean bootFromCD); static long getXenServerStaticMin(final String stdType, final boolean bootFromCD); static String getProductVersion(final Host.Record record); static String getPVbootloaderArgs(final String guestOS);  }