ApiConnector api = controller.getApiAccessor();
_serviceInstance = siObj;
_fq_name = StringUtils.join(siObj.getQualifiedName(), ':');
ServiceInstanceType props = siObj.getProperties();
// TODO: read management network names and cache network objects.
ObjectReference ref = siObj.getServiceTemplate().get(0);
if (ref != null) {
try {
ServiceTemplate tmpl = (ServiceTemplate) api.findById(ServiceTemplate.class, ref.getUuid());
_templateId = tmpl.getUuid();
} catch (IOException ex) {
s_logger.warn("service-template read", ex);
}
}