+ healthmonitorBuilder.setUrlPath(healthMonitor.getLoadBalancerHealthMonitorUrlPath());
+ }
+ if (healthMonitor.getID() != null) {
+ healthmonitorBuilder.setUuid(toUuid(healthMonitor.getID()));
+ } else {
+ LOGGER.warn("Attempting to write neutron laod balancer health monitor without UUID");
+ }
+ return healthmonitorBuilder.build();
+ }
+
+ protected NeutronLoadBalancerHealthMonitor fromMd(Healthmonitor healthMonitor) {
+ final NeutronLoadBalancerHealthMonitor answer = new NeutronLoadBalancerHealthMonitor();
+ if (healthMonitor.isAdminStateUp() != null) {
+ answer.setLoadBalancerHealthMonitorAdminStateIsUp(healthMonitor.isAdminStateUp());
+ }
+ if (healthMonitor.getDelay() != null) {
+ answer.setLoadBalancerHealthMonitorDelay(healthMonitor.getDelay().intValue());
+ }
+ if (healthMonitor.getExpectedCodes() != null) {
+ answer.setLoadBalancerHealthMonitorExpectedCodes(healthMonitor.getExpectedCodes());
+ }
+ if (healthMonitor.getHttpMethod() != null) {
+ answer.setLoadBalancerHealthMonitorHttpMethod(healthMonitor.getHttpMethod());
+ }
+ if (healthMonitor.getMaxRetries() != null) {
+ answer.setLoadBalancerHealthMonitorMaxRetries(Integer.valueOf(healthMonitor.getMaxRetries()));
+ }
+ if (healthMonitor.getPools() != null) {
+ final List<Neutron_ID> list = new ArrayList<Neutron_ID>();
+ for (final Uuid id : healthMonitor.getPools()) {
+ list.add(new Neutron_ID(id.getValue()));
+ }
+ answer.setLoadBalancerHealthMonitorPools(list);
+ }
+ if (healthMonitor.getTenantId() != null) {
+ answer.setTenantID(healthMonitor.getTenantId());
+ }
+ if (healthMonitor.getTimeout() != null) {
+ answer.setLoadBalancerHealthMonitorTimeout(healthMonitor.getTimeout().intValue());
+ }
+ if (healthMonitor.getType() != null) {
+ answer.setLoadBalancerHealthMonitorType(PROBE_MAP.get(healthMonitor.getType()));
+ }
+ if (healthMonitor.getUrlPath() != null) {
+ answer.setLoadBalancerHealthMonitorUrlPath(healthMonitor.getUrlPath());