@Override public List<Configuration> toVendorIndependentConfigurations() throws VendorConversionException { _c = new Configuration(_hostname, _vendor); _c.setDefaultCrossZoneAction(LineAction.PERMIT); _c.setDefaultInboundAction(LineAction.PERMIT); return ImmutableList.of(_c); } }
@Override public List<Configuration> toVendorIndependentConfigurations() throws VendorConversionException { _ipToInterfaceMap = new HashMap<>(); _c = new Configuration(_hostname, _format); _c.setDefaultCrossZoneAction(LineAction.PERMIT); _c.setDefaultInboundAction(LineAction.PERMIT); convertPrefixLists(); convertRouteMaps(); convertInterfaces(); convertVpns(); // TODO: convert routing processes return ImmutableList.of(_c); } }
@Override public Configuration build() { String name = _hostname != null ? _hostname : generateName(); Configuration configuration = new Configuration(name, _configurationFormat); if (_defaultCrossZoneAction != null) { configuration.setDefaultCrossZoneAction(_defaultCrossZoneAction); } if (_defaultInboundAction != null) { configuration.setDefaultInboundAction(_defaultInboundAction); } configuration.setDomainName(_domainName); return configuration; }
_c = new Configuration(hostname, _vendor); _c.setDefaultCrossZoneAction(LineAction.DENY); _c.setDefaultInboundAction(LineAction.PERMIT); _c.setDnsServers(getDnsServers()); _c.setNtpServers(getNtpServers());
_c = new Configuration(hostname, ConfigurationFormat.HOST); _c.setDefaultCrossZoneAction(LineAction.PERMIT); _c.setDefaultInboundAction(LineAction.PERMIT); _c.getVrfs().put(Configuration.DEFAULT_VRF_NAME, new Vrf(Configuration.DEFAULT_VRF_NAME));
@Test public void fillPropertyForcedString() { Configuration configuration = new Configuration("hostname", ConfigurationFormat.CISCO_IOS); configuration.setDefaultInboundAction(LineAction.PERMIT); String property = NodePropertySpecifier.DEFAULT_INBOUND_ACTION; PropertyDescriptor<Configuration> propertyDescriptor = NodePropertySpecifier.JAVA_MAP.get(property); RowBuilder row = Row.builder(); PropertySpecifier.fillProperty(propertyDescriptor, configuration, property, row); // the row should be filled out with the String value assertThat( row.build(), equalTo(Row.builder().put(property, LineAction.PERMIT.toString()).build())); }
_c.setDefaultInboundAction(_masterLogicalSystem.getDefaultInboundAction());
abstractConf.setIkePhase1Policies(conf.getIkePhase1Policies()); abstractConf.setIkePhase1Proposals(conf.getIkePhase1Proposals()); abstractConf.setDefaultInboundAction(conf.getDefaultInboundAction()); abstractConf.setIpAccessLists(conf.getIpAccessLists()); abstractConf.setIp6AccessLists(conf.getIp6AccessLists());
final Configuration c = new Configuration(_hostname, _vendor); c.getVendorFamily().setCisco(_cf); c.setDefaultInboundAction(LineAction.PERMIT); c.setDefaultCrossZoneAction(LineAction.PERMIT); c.setDnsServers(_dnsServers);