Xc@s]ddlmZddlmZddlmZddlmZdeefdYZdS(i(t ELBRequest(tArg(t ArgumentError(tTabifyingMixintConfigureHealthCheckcBseZdZedddddeddddd d ed edd ed ddddd ed eddeddddddd eddedddddd ed eddeddddd d ed eddgZdZdZdZ RS(sEConfigure health checking for instance registerd with a load balancertLoadBalancerNametmetavartELBthelps.name of the load balancer to modify (required)s--healthy-thresholdtdestsHealthCheck.HealthyThresholdtCOUNTttypetrequiredsmnumber of consecutive successful health checks that will mark instances as Healthy (required)s --intervalsHealthCheck.IntervaltSECONDSs5approximate interval between health checks (required)s-ts--targetsHealthCheck.TargetsPROTOCOL:PORT[/PATH]s.connection target for health checks (required)s --timeoutsHealthCheck.Timeouts(maximum health check duration (required)s--unhealthy-thresholdsHealthCheck.UnhealthyThresholdsknumber of consecutive failed health checks that will mark instances as Unhealthy (required)cCstj||jd}|jd\}}}|sGtdn|jdkr}d|kr}tdj|ndS( NsHealthCheck.Targett:s9argument -t/--target: must have form PROTOCOL:PORT[/PATH]thttpthttpst/s9argument -t/--target: path is required for protocol '{0}'(RR(Rt configuretargst partitionRtlowertformat(tselfttargettprotocolt_trest((s`/usr/lib/python2.7/site-packages/euca2ools/commands/elasticloadbalancing/configurehealthcheck.pyR8s   cCs^|jd}|jddd}|jd krZ|j||jd|jds