/** * Obtains the template specified by the provided id * * @see com.att.cdp.zones.ComputeService#getTemplate(java.lang.String) */ @SuppressWarnings("nls") @Override public Template getTemplate(String id) throws ZoneException { checkArg(id, "id"); connect(); Context context = getContext(); trackRequest(); RequestState.put(RequestState.SERVICE, "Compute"); RequestState.put(RequestState.SERVICE_URL, nova.getEndpoint()); RequestState.put(RequestState.TEMPLATE, id); try { return new OpenStackTemplate(context, nova.getClient().flavors().show(id).execute()); } catch (OpenStackBaseException ex) { ExceptionMapper.mapException(ex); } catch (Exception e) { throw new ResourceNotFoundException(e); } return null; // for the compiler }
/** * Obtains the template specified by the provided id * * @see com.att.cdp.zones.ComputeService#getTemplate(java.lang.String) */ @SuppressWarnings("nls") @Override public Template getTemplate(String id) throws ZoneException { checkArg(id, "id"); connect(); Context context = getContext(); trackRequest(); RequestState.put(RequestState.SERVICE, "Compute"); RequestState.put(RequestState.SERVICE_URL, nova.getEndpoint()); RequestState.put(RequestState.TEMPLATE, id); try { return new OpenStackTemplate(context, nova.getClient().flavors() .show(id).execute()); } catch (OpenStackBaseException ex) { ExceptionMapper.mapException(ex); } catch (Exception e) { throw new ResourceNotFoundException(e); } return null; // for the compiler }