@Test public void testShouldGetEndPointsForNovaAndARegionNameUsingCache() throws OpenStackException { OpenStackRegionImpl openStackRegion = new OpenStackRegionImpl(); String regionName = "RegionOne"; RegionCache regionCache = new RegionCache(); regionCache.putUrl("RegionOne", "compute", "http: String resultURL = openStackRegion.getNovaEndPoint(regionName); assertNotNull(resultURL); assertEquals("http: }
@Override public String getNovaEndPoint(String regionName) throws OpenStackException { String url = getEndPointByNameAndRegionName("compute", regionName); log.debug("getNovaEndPoint " + regionName + " " + url); Integer index = url.lastIndexOf("/"); url = url.substring(0, index + 1); return url; }
OpenStackRegionImpl implements OpenStackRegion { @Override public String getNovaEndPoint(String regionName) throws OpenStackException { String url = getEndPointByNameAndRegionName("compute", regionName); log.debug("getNovaEndPoint " + regionName + " " + url); Integer index = url.lastIndexOf("/"); url = url.substring(0, index + 1); return url; } }
OpenStackRegionImpl implements OpenStackRegion { @Override public String getNovaEndPoint(String regionName) throws OpenStackException { String url = getEndPointByNameAndRegionName("compute", regionName); log.debug("getNovaEndPoint " + regionName + " " + url); Integer index = url.lastIndexOf("/"); url = url.substring(0, index + 1); return url; } OpenStackRegionImpl(); }
OpenStackRegionImpl implements OpenStackRegion { @Override public String getNovaEndPoint(String regionName) throws OpenStackException { String url = getEndPointByNameAndRegionName("compute", regionName); log.debug("getNovaEndPoint " + regionName + " " + url); Integer index = url.lastIndexOf("/"); url = url.substring(0, index + 1); return url; } OpenStackRegionImpl(); @Override String getEndPointByNameAndRegionName(String type, String regionName); OpenStackAccess getTokenAdmin(); @Override String getNovaEndPoint(String regionName); @Override String getPuppetMasterEndPoint(String regionName); @Override String getQuantumEndPoint(String regionName); String getSdcEndPoint(String regionName); String getDefaultRegion(); String getSupportEndPoint(); SystemPropertiesProvider getSystemPropertiesProvider(); void setSystemPropertiesProvider(SystemPropertiesProvider systemPropertiesProvider); Client getClient(); void setClient(Client client); String getFederatedQuantumEndPoint(); String getChefServerEndPoint(String regionName); HttpClientConnectionManager getHttpConnectionManager(); void setHttpConnectionManager(HttpClientConnectionManager httpConnectionManager); RegionCache getRegionCache(); }
OpenStackRegionImpl implements OpenStackRegion { @Override public String getNovaEndPoint(String regionName) throws OpenStackException { String url = getEndPointByNameAndRegionName("compute", regionName); log.debug("getNovaEndPoint " + regionName + " " + url); Integer index = url.lastIndexOf("/"); url = url.substring(0, index + 1); return url; } OpenStackRegionImpl(); @Override String getEndPointByNameAndRegionName(String type, String regionName); OpenStackAccess getTokenAdmin(); @Override String getNovaEndPoint(String regionName); @Override String getPuppetMasterEndPoint(String regionName); @Override String getQuantumEndPoint(String regionName); String getSdcEndPoint(String regionName); String getDefaultRegion(); String getSupportEndPoint(); SystemPropertiesProvider getSystemPropertiesProvider(); void setSystemPropertiesProvider(SystemPropertiesProvider systemPropertiesProvider); Client getClient(); void setClient(Client client); String getFederatedQuantumEndPoint(); String getChefServerEndPoint(String regionName); HttpClientConnectionManager getHttpConnectionManager(); void setHttpConnectionManager(HttpClientConnectionManager httpConnectionManager); RegionCache getRegionCache();  }