@Test public void testNxos() { String n7000 = "boot system bootflash:n7000-s2-dk9.7.2.1.D1.1.bin sup-2 \n"; String nxos = "boot nxos bootflash:nxos.7.0.3.I4.7.bin \n"; String rancid = "!RANCID-CONTENT-TYPE: cisco-nx\n"; for (String fileText : ImmutableList.of(n7000, nxos, rancid)) { assertThat(identifyConfigurationFormat(fileText), equalTo(CISCO_NX)); } }
public static ConfigurationFormat identifyConfigurationFormat(String fileText) { return new VendorConfigurationFormatDetector(fileText).identifyConfigurationFormat(); }
VendorConfigurationFormatDetector { public static ConfigurationFormat identifyConfigurationFormat(String fileText) { return new VendorConfigurationFormatDetector(fileText).identifyConfigurationFormat(); } }
VendorConfigurationFormatDetector { public static ConfigurationFormat identifyConfigurationFormat(String fileText) { return new VendorConfigurationFormatDetector(fileText).identifyConfigurationFormat(); } private  VendorConfigurationFormatDetector(String fileText); }
VendorConfigurationFormatDetector { public static ConfigurationFormat identifyConfigurationFormat(String fileText) { return new VendorConfigurationFormatDetector(fileText).identifyConfigurationFormat(); } private  VendorConfigurationFormatDetector(String fileText); static ConfigurationFormat identifyConfigurationFormat(String fileText); }
VendorConfigurationFormatDetector { public static ConfigurationFormat identifyConfigurationFormat(String fileText) { return new VendorConfigurationFormatDetector(fileText).identifyConfigurationFormat(); } private  VendorConfigurationFormatDetector(String fileText); static ConfigurationFormat identifyConfigurationFormat(String fileText); static final String BATFISH_FLATTENED_JUNIPER_HEADER; static final String BATFISH_FLATTENED_PALO_ALTO_HEADER; static final String BATFISH_FLATTENED_VYOS_HEADER; }