@Test public void testIsValidNeutronID() { assertFalse(BaseHandler.isValidNeutronID(nullString)); assertTrue(BaseHandler.isValidNeutronID(uuid)); assertTrue(BaseHandler.isValidNeutronID(tenantId)); assertTrue(BaseHandler.isValidNeutronID(neutronId)); }
protected static final boolean isValidNeutronID(String id) { if (id == null) { return false; } boolean isValid = false; logger.trace("id - {}, length - {} ", id, id.length()); if (id.length() == UUID_LEN) { try { UUID fromUUID = UUID.fromString(id); String toUUID = fromUUID.toString(); isValid = toUUID.equalsIgnoreCase(id); } catch(IllegalArgumentException e) { logger.error(" IllegalArgumentExecption for id - {} ", id); isValid = false; } } else if ((id.length() > 0) && (id.length() <= KEYSTONE_ID_LEN)) { isValid = true; } else { isValid = false; } return isValid; }
BaseHandler { protected static final boolean isValidNeutronID(String id) { if (id == null) { return false; } boolean isValid = false; logger.trace("id - {}, length - {} ", id, id.length()); if (id.length() == UUID_LEN) { try { UUID fromUUID = UUID.fromString(id); String toUUID = fromUUID.toString(); isValid = toUUID.equalsIgnoreCase(id); } catch(IllegalArgumentException e) { logger.error(" IllegalArgumentExecption for id - {} ", id); isValid = false; } } else if ((id.length() > 0) && (id.length() <= KEYSTONE_ID_LEN)) { isValid = true; } else { isValid = false; } return isValid; } }
BaseHandler { protected static final boolean isValidNeutronID(String id) { if (id == null) { return false; } boolean isValid = false; logger.trace("id - {}, length - {} ", id, id.length()); if (id.length() == UUID_LEN) { try { UUID fromUUID = UUID.fromString(id); String toUUID = fromUUID.toString(); isValid = toUUID.equalsIgnoreCase(id); } catch(IllegalArgumentException e) { logger.error(" IllegalArgumentExecption for id - {} ", id); isValid = false; } } else if ((id.length() > 0) && (id.length() <= KEYSTONE_ID_LEN)) { isValid = true; } else { isValid = false; } return isValid; }  }
BaseHandler { protected static final boolean isValidNeutronID(String id) { if (id == null) { return false; } boolean isValid = false; logger.trace("id - {}, length - {} ", id, id.length()); if (id.length() == UUID_LEN) { try { UUID fromUUID = UUID.fromString(id); String toUUID = fromUUID.toString(); isValid = toUUID.equalsIgnoreCase(id); } catch(IllegalArgumentException e) { logger.error(" IllegalArgumentExecption for id - {} ", id); isValid = false; } } else if ((id.length() > 0) && (id.length() <= KEYSTONE_ID_LEN)) { isValid = true; } else { isValid = false; } return isValid; }  IContainerManager getContainerManager(); void unsetContainerManager(IContainerManager s); void setContainerManager(IContainerManager s); IForwardingRulesManager getForwardingRulesManager(); void unsetForwardingRulesManager(IForwardingRulesManager s); void setForwardingRulesManager(IForwardingRulesManager s); OVSDBConfigService getOVSDBConfigService(); void unsetOVSDBConfigService(OVSDBConfigService s); void setOVSDBConfigService(OVSDBConfigService s); IConnectionServiceInternal getConnectionService(); void unsetConnectionService(IConnectionServiceInternal s); void setConnectionService(IConnectionServiceInternal s); INeutronPortCRUD getNeutronPortCRUD(); void unsetNeutronPortCRUD(INeutronPortCRUD s); void setNeutronPortCRUD(INeutronPortCRUD s); INeutronSubnetCRUD getNeutronSubnetCRUD(); void unsetNeutronSubnetCRUD(INeutronSubnetCRUD s); void setNeutronSubnetCRUD(INeutronSubnetCRUD s); INeutronNetworkCRUD getNeutronNetworkCRUD(); void unsetNeutronNetworkCRUD(INeutronNetworkCRUD s); void setNeutronNetworkCRUD(INeutronNetworkCRUD s); }
BaseHandler { protected static final boolean isValidNeutronID(String id) { if (id == null) { return false; } boolean isValid = false; logger.trace("id - {}, length - {} ", id, id.length()); if (id.length() == UUID_LEN) { try { UUID fromUUID = UUID.fromString(id); String toUUID = fromUUID.toString(); isValid = toUUID.equalsIgnoreCase(id); } catch(IllegalArgumentException e) { logger.error(" IllegalArgumentExecption for id - {} ", id); isValid = false; } } else if ((id.length() > 0) && (id.length() <= KEYSTONE_ID_LEN)) { isValid = true; } else { isValid = false; } return isValid; }  IContainerManager getContainerManager(); void unsetContainerManager(IContainerManager s); void setContainerManager(IContainerManager s); IForwardingRulesManager getForwardingRulesManager(); void unsetForwardingRulesManager(IForwardingRulesManager s); void setForwardingRulesManager(IForwardingRulesManager s); OVSDBConfigService getOVSDBConfigService(); void unsetOVSDBConfigService(OVSDBConfigService s); void setOVSDBConfigService(OVSDBConfigService s); IConnectionServiceInternal getConnectionService(); void unsetConnectionService(IConnectionServiceInternal s); void setConnectionService(IConnectionServiceInternal s); INeutronPortCRUD getNeutronPortCRUD(); void unsetNeutronPortCRUD(INeutronPortCRUD s); void setNeutronPortCRUD(INeutronPortCRUD s); INeutronSubnetCRUD getNeutronSubnetCRUD(); void unsetNeutronSubnetCRUD(INeutronSubnetCRUD s); void setNeutronSubnetCRUD(INeutronSubnetCRUD s); INeutronNetworkCRUD getNeutronNetworkCRUD(); void unsetNeutronNetworkCRUD(INeutronNetworkCRUD s); void setNeutronNetworkCRUD(INeutronNetworkCRUD s);  }